/* ArtDog Studio: the language of the studio's website. White background, near-black
   ink, square corners, very bold titles, one action colour (blue). The other colours
   are states, and a state is always written out too, never shown by colour alone.
   Mobile first, light theme only. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-wght.cd56e2ec63d7.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-400.79936b18df9f.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-500.b1c8a895f5fd.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("../fonts/ibm-plex-mono-latin-600.5a2ce7798732.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  /* Colours and their roles (see the Design tab of the screens recap). */
  --ink: #1f1e1d; /* text, borders, selected state, night block */
  --white: #ffffff; /* screens and cards */
  --paper: #f5f4ef; /* secondary areas */
  --grey: #4d4c49; /* secondary text, 8.6:1 on white */
  --rule: #cfc9be; /* thin separators, empty gauges (decorative) */
  --action: #2346d8; /* main buttons and links, 7.1:1 with white */
  --action-hover: #1a35a8;
  --pending: #f2c4ce; /* awaiting a decision, alerts to handle */
  --taken: #dcc8b6; /* slots taken by others */
  --penalty: #5a3a28; /* penalties, section labels, destructive secondary action */

  --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, monospace;
  --border: 2px solid var(--ink);
  --hairline: 1px solid var(--rule);
  --tabbar-height: 64px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

body.has-tabbar {
  padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom));
}

a {
  color: var(--action);
}

a:hover {
  color: var(--action-hover);
}

:focus-visible {
  outline: 3px solid var(--action);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  margin: 0 0 0.75rem;
  font-weight: 900;
  line-height: 1.05;
}

h1 {
  font-size: 30px;
  letter-spacing: -0.8px;
}

h2 {
  font-size: 20px;
  letter-spacing: -0.4px;
  margin-top: 1.75rem;
}

h3 {
  font-size: 17px;
  font-weight: 800;
}

/* Section label, in mono capitals: « 01 — Heures restantes ». */
.label {
  margin: 0 0 0.4rem;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--penalty);
}

.muted {
  color: var(--grey);
}

.mono {
  font-family: var(--mono);
  font-weight: 600;
}

/* --- Page frame ---------------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 16px 20px 14px;
  padding-top: max(16px, env(safe-area-inset-top));
  border-bottom: var(--hairline);
  background: var(--white);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.wordmark-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.wordmark-studio {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--penalty);
}

.site-user {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--grey);
}

.content {
  max-width: 40rem;
  margin: 0 auto;
  padding: 20px;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  padding: 0 8px env(safe-area-inset-bottom);
  background: var(--white);
  border-top: var(--border);
}

.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: var(--tabbar-height);
  padding: 6px 0;
  border-top: 3px solid transparent;
  font-size: 12px;
  color: var(--grey);
  text-decoration: none;
}

.tabbar a[aria-current="page"] {
  border-top-color: var(--ink);
  font-weight: 700;
  color: var(--ink);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink);
  background: var(--pending);
  border: 1px solid var(--ink);
}

/* --- Messages and notices -------------------------------------------------------- */

.messages {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.message {
  margin-bottom: 0.5rem;
  padding: 12px 14px;
  border: var(--border);
  font-weight: 600;
}

.message--success {
  background: var(--paper);
}

.message--warning {
  background: var(--pending);
}

.message--error {
  color: var(--white);
  background: var(--penalty);
  border-color: var(--ink);
}

.notice {
  margin: 1rem 0;
  padding: 12px 14px;
  background: var(--paper);
  border-left: 4px solid var(--ink);
}

.notice--warning {
  color: var(--white);
  background: var(--penalty);
  border-left-color: var(--ink);
}

/* --- Forms and buttons --------------------------------------------------------- */

.form div {
  margin-bottom: 1rem;
}

.form label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 13px;
  color: var(--grey);
}

.form input:not([type="hidden"]),
.form select,
.form textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: var(--border);
  border-radius: 0;
}

.form .helptext,
.form .helptext ul {
  font-size: 13px;
  color: var(--grey);
}

.errorlist {
  margin: 0 0 0.5rem;
  padding-left: 1.25rem;
  font-weight: 600;
  color: var(--penalty);
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border: 2px solid var(--action);
  border-radius: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--white);
  background: var(--action);
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover {
  color: var(--white);
  background: var(--action-hover);
  border-color: var(--action-hover);
}

.button--secondary,
.button--quiet {
  color: var(--ink);
  background: var(--white);
  border-color: var(--ink);
}

.button--secondary:hover,
.button--quiet:hover {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--ink);
}

.button--quiet {
  min-height: 44px;
  font-size: 15px;
  font-weight: 600;
}

.button--danger {
  color: var(--penalty);
  background: var(--white);
  border-color: var(--penalty);
}

.button--danger:hover {
  color: var(--white);
  background: var(--penalty);
  border-color: var(--penalty);
}

.button--block {
  width: 100%;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 1.25rem;
}

/* An impossible action stays visible, greyed, with an « i » revealing why. */
.action--disabled {
  color: var(--grey);
  opacity: 0.55;
}

.hint summary {
  list-style: none;
  cursor: pointer;
}

.hint summary::-webkit-details-marker {
  display: none;
}

.hint p {
  margin: 0.5rem 0 0;
  max-width: 18rem;
  font-size: 13px;
  white-space: normal;
  color: var(--grey);
}

.info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--grey);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--grey);
}

/* --- Figures (consequences before an action) ----------------------------------- */

.summary {
  font-size: 17px;
  font-weight: 700;
}

.figures {
  display: grid;
  grid-template-columns: 1fr auto;
  margin: 1rem 0;
  border: var(--border);
}

.figures dt,
.figures dd {
  margin: 0;
  padding: 12px 14px;
  border-bottom: var(--hairline);
}

.figures dd {
  font-family: var(--mono);
  font-weight: 600;
  text-align: right;
}

.figures dt:last-of-type,
.figures dd:last-of-type {
  border-bottom: 0;
}

.figure--main {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 900;
}

/* --- Calendar ---------------------------------------------------------------- */

.week-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 1rem;
}

.week-nav h2 {
  margin: 0;
  font-size: 20px;
  text-align: center;
}

.week-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border: var(--hairline);
}

.day h3 {
  margin: 1.5rem 0 0.5rem;
}

.slots {
  list-style: none;
  margin: 0;
  padding: 0;
}

.slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 60px;
  margin-bottom: 6px;
  padding: 0 16px;
  font-weight: 600;
  color: var(--ink);
  background: var(--white);
  border: var(--border);
}

.slot > a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  align-self: stretch;
  margin: 0 -16px;
  padding: 0 16px;
  color: inherit;
  text-decoration: none;
}

.slot-time {
  font-family: var(--mono);
  font-weight: 600;
}

.slot--free .slot-state {
  font-weight: 700;
  color: var(--action);
}

.slot--taken {
  background: var(--taken);
  border-color: var(--taken);
}

.slot--mine_confirmed {
  color: var(--white);
  background: var(--action);
  border-color: var(--action);
}

.slot--mine_pending {
  background: var(--pending);
}

.slot--maintenance {
  color: var(--grey);
  border-color: var(--rule);
  background: repeating-linear-gradient(-45deg, var(--white) 0 6px, var(--paper) 6px 12px);
}

.slot--too_late,
.slot--outside_subscription {
  color: var(--grey);
  border-color: var(--rule);
}

/* --- Sessions and requests ---------------------------------------------------- */

.sessions,
.requests,
.decisions {
  list-style: none;
  margin: 0;
  padding: 0;
}

.session,
.request {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 1rem;
  margin-bottom: 8px;
  padding: 14px 16px;
  border: var(--border);
}

.session em {
  font-style: normal;
  color: var(--grey);
}

.session-actions {
  display: flex;
  gap: 1rem;
  white-space: nowrap;
}

.session-actions a {
  font-weight: 700;
}

.request {
  display: grid;
  gap: 6px;
}

.request-what {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.request-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin-top: 6px;
}

.request-actions form {
  margin: 0;
}

.reject summary {
  list-style: none;
}

.reject summary::-webkit-details-marker {
  display: none;
}

.reject[open] form {
  margin-top: 12px;
}

.decision {
  margin-bottom: 8px;
  padding: 12px 14px;
  border: var(--border);
}

.decision--approve {
  background: var(--paper);
}

.decision--reject,
.decision--expire {
  border-top-width: 2px;
  background: var(--pending);
}

/* --- Home cards ------------------------------------------------------------------ */

.card {
  margin: 1.25rem 0;
  padding: 16px;
  border: var(--border);
}

.card h2 {
  margin: 0 0 0.75rem;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--penalty);
}

.card .figures {
  margin: 0;
  border: 0;
}

.card .figures dt,
.card .figures dd {
  padding: 8px 0;
}

.penalties {
  margin: 0;
  padding-left: 1.25rem;
}

/* --- Account and history --------------------------------------------------------- */

.menu {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  border-top: var(--hairline);
}

.menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: var(--hairline);
}

.tabs {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin-bottom: 1rem;
  border: var(--border);
}

.tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.tabs a[aria-current="page"] {
  font-weight: 700;
  color: var(--white);
  background: var(--ink);
}

.history {
  list-style: none;
  margin: 0;
  padding: 0;
}

.history-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 12px 0;
  border-bottom: var(--hairline);
}

.history-status,
.history-amount {
  white-space: nowrap;
  color: var(--grey);
}

.history-amount {
  font-family: var(--mono);
  font-weight: 600;
  color: var(--ink);
}

.history-amount--out {
  color: var(--penalty);
}

.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.pagination a {
  font-weight: 700;
}

.request-note {
  margin: 4px 0 0;
  padding: 8px 12px;
  font-style: italic;
  background: var(--paper);
  border-left: 3px solid var(--ink);
}

/* --- Utilities ------------------------------------------------------------------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.block {
  margin: 1.5rem 0;
}

.section-head,
.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 10px;
}

.section-head .label,
.card-head .label {
  margin: 0;
}

.section-head a {
  font-weight: 700;
  text-decoration: none;
}

.quiet-link {
  display: inline-block;
  padding: 6px 0;
  color: var(--ink);
}

.quiet-link strong {
  color: var(--action);
}

button:disabled,
button:disabled:hover {
  cursor: not-allowed;
  color: var(--grey);
  background: var(--paper);
  border-color: var(--rule);
}

.button--big {
  min-height: 56px;
  font-size: 17px;
}

.button--dashed {
  color: var(--ink);
  background: var(--white);
  border: 2px dashed var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.button--dashed:hover {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--ink);
}

/* --- Home ------------------------------------------------------------------------- */

.hero {
  margin-bottom: 20px;
}

.hero-figure {
  margin: 0;
  font-size: 88px;
  font-weight: 900;
  letter-spacing: -4px;
  line-height: 0.9;
}

.gauge {
  height: 6px;
  margin: 14px 0 8px;
  background: var(--rule);
}

.gauge span {
  display: block;
  height: 100%;
  background: var(--ink);
}

.hero .muted {
  margin: 0;
  font-size: 14px;
}

/* Full-width state band: rose = awaiting, brown = penalty. Always words, never colour alone. */
.band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 -20px 12px;
  padding: 14px 20px;
  color: var(--ink);
  text-decoration: none;
  border-top: var(--border);
  border-bottom: var(--border);
}

.band > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.band > span > span:last-child {
  font-weight: 600;
}

a.band:hover {
  color: inherit;
}

.band-label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}

.band--pending {
  background: var(--pending);
}

.band--penalty {
  color: var(--white);
  background: var(--penalty);
}

.band--penalty .band-label {
  color: var(--pending);
}

a.band--penalty:hover {
  color: var(--white);
}

.band--paper {
  background: var(--paper);
  border-width: 1px;
  border-color: var(--rule);
}

.tag {
  padding: 3px 8px;
  font-size: 13px;
  font-weight: 700;
}

.tag--mine {
  color: var(--white);
  background: var(--action);
}

.tag--pending {
  color: var(--ink);
  background: var(--pending);
}

.session-day {
  margin: 0 0 4px;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
}

.session-when .mono {
  display: block;
  font-size: 15px;
}

.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.pair .button {
  min-height: 46px;
  padding: 0 8px;
  font-size: 15px;
  font-weight: 600;
}

.hint--button summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  border: 2px solid var(--rule);
}

.free-row {
  display: flex;
  gap: 8px;
  margin: 0 -20px;
  padding: 0 20px 4px;
  overflow-x: auto;
}

.free-card {
  display: flex;
  flex: 0 0 136px;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  color: var(--ink);
  text-decoration: none;
  border: var(--border);
}

.free-card:hover {
  color: var(--ink);
  background: var(--paper);
}

.free-card .muted {
  font-size: 14px;
}

.free-cta,
.slot-cta {
  font-weight: 700;
  color: var(--action);
}

/* --- Calendar -------------------------------------------------------------------- */

.calendar-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.calendar-head .label {
  margin-bottom: 6px;
}

.calendar-title {
  margin: 0;
  font-size: 26px;
}

.balance-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border: var(--border);
}

.balance-chip span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--penalty);
}

.balance-chip strong {
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.strip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 14px;
  border-bottom: var(--hairline);
}

.strip-arrow {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 56px;
  color: var(--ink);
  border: var(--hairline);
}

.days {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
}

.day-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 56px;
  color: var(--ink);
  text-decoration: none;
  background: var(--white);
  border: var(--hairline);
}

.day-chip:hover {
  color: var(--ink);
}

.day-chip-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.day-chip-number {
  font-size: 17px;
  font-weight: 800;
}

.day-chip--mine,
.day-chip--mine:hover {
  color: var(--white);
  background: var(--action);
  border-color: var(--action);
}

.day-chip--pending {
  background: var(--pending);
  border-color: var(--pending);
}

.day-chip--full {
  background: var(--taken);
  border-color: var(--taken);
}

.day-chip[aria-current="date"],
.day-chip[aria-current="date"]:hover {
  color: var(--white);
  background: var(--ink);
  border: var(--border);
}

.day-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 12px;
}

.day-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.day-head .muted {
  font-size: 13px;
}

.slot {
  min-height: 72px;
}

.slot > a,
.slot-body {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  align-self: stretch;
  margin: 0 -16px;
  padding: 0 16px;
  color: inherit;
  text-decoration: none;
}

.slot > a:hover {
  color: inherit;
}

.slot-when {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.slot-meta {
  font-size: 14px;
  font-weight: 500;
}

.slot-night {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--pending);
}

.slot--night {
  margin-top: 4px;
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.slot--night .slot-cta {
  padding: 8px 12px;
  color: var(--white);
  background: var(--action);
}

.slot--night.slot--taken,
.slot--night.slot--too_late,
.slot--night.slot--outside_subscription {
  color: var(--white);
  background: var(--grey);
  border-color: var(--grey);
}

.slot--night.slot--mine_confirmed {
  background: var(--action);
  border-color: var(--action);
}

.slot--night.slot--mine_pending {
  color: var(--ink);
  background: var(--pending);
  border-color: var(--ink);
}

.slot--mine_confirmed .slot-night,
.slot--mine_pending .slot-night {
  color: inherit;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 4px 0 6px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: var(--grey);
}

.legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 12px;
  height: 12px;
}

.swatch--free {
  border: var(--border);
}

.swatch--mine {
  background: var(--action);
}

.swatch--pending {
  background: var(--pending);
}

.swatch--taken {
  background: var(--taken);
}

/* --- Sheets (Réserver, Annuler, Déplacer, Demande spéciale) ---------------------- */

.sheet {
  margin: 0 -20px -20px;
  padding: 10px 20px 28px;
  border-top: var(--border);
}

.sheet-handle {
  display: block;
  width: 40px;
  height: 4px;
  margin: 0 auto 14px;
  background: var(--ink);
}

.sheet-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sheet .band {
  margin: 16px -20px;
}

.sheet-title h1 {
  margin: 0;
  font-size: 32px;
  letter-spacing: -1px;
}

.sheet-title .label {
  margin-bottom: 6px;
}

.sheet-title .mono,
.sheet-title .muted {
  margin: 6px 0 0;
}

.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sheet-actions form {
  margin: 0;
}

.picks {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  border: 0;
}

.picks-day {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.pick {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 60px;
  color: var(--ink);
  background: var(--white);
  border: var(--border);
  cursor: pointer;
}

.pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pick-time {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}

.pick-state {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.pick:has(input:checked) {
  color: var(--white);
  background: var(--action);
  border-color: var(--action);
}

.pick:has(input:focus-visible) {
  outline: 3px solid var(--action);
  outline-offset: 2px;
}

.pick--off {
  cursor: not-allowed;
  background: var(--taken);
  border-color: var(--taken);
}

.pick--mine_confirmed {
  color: var(--white);
  background: var(--action);
  border-color: var(--action);
}

.pick--mine_pending {
  background: var(--pending);
  border-color: var(--pending);
}

.pick--too_late,
.pick--outside_subscription {
  color: var(--grey);
  background: var(--paper);
  border-color: var(--rule);
}

.pick--night {
  flex-direction: row;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.pick--night.pick--off {
  background: var(--grey);
  border-color: var(--grey);
}

.figures .figures-note {
  grid-column: 1 / -1;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  background: var(--paper);
}

.figures .figure-change {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
}

.figure-change s {
  font-size: 14px;
  color: var(--grey);
}

.figures .figure--penalty {
  color: var(--penalty);
}

.figures .figures-status {
  font-family: var(--sans);
  font-weight: 700;
  background: var(--pending);
  border-bottom: var(--border);
}

.times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.form .time-box {
  margin: 0;
  padding: 10px;
  border: var(--border);
}

.form .time-box select {
  min-height: 40px;
  padding: 0;
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  border: 0;
}

/* --- Studio (admins) ----------------------------------------------------------------- */

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.admin-tag {
  padding: 3px 7px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--white);
  background: var(--ink);
}

.requests-band {
  margin: -20px -20px 0;
  padding: 14px 20px 16px;
  background: var(--pending);
}

.requests-band h1.label {
  color: var(--ink);
}

.requests-count {
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.requests-band .request {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  background: var(--white);
}

.request-what {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.request-what:hover {
  color: var(--ink);
}

.request-who {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.request-who strong {
  font-size: 17px;
  font-weight: 800;
}

.request-why {
  font-size: 13px;
  color: var(--penalty);
}

.request-after {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  align-items: flex-end;
  gap: 2px;
}

.request-after span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--grey);
}

.request-after strong {
  font-size: 18px;
  font-weight: 900;
}

.requests-band .pair {
  margin-top: 0;
}

.requests-band .pair form {
  margin: 0;
}

.requests-band .pair button {
  min-height: 46px;
  font-size: 15px;
}

.requests-note {
  margin: 4px 0 0;
  font-size: 13px;
}

.agenda {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.agenda-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid transparent;
}

.agenda-time {
  flex-shrink: 0;
  width: 108px;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
}

.agenda-who {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.agenda-status {
  font-size: 13px;
  font-weight: 600;
}

.agenda-row--free {
  border: 2px dashed var(--ink);
}

.agenda-row--done {
  color: var(--grey);
  background: var(--paper);
}

.agenda-row--live {
  color: var(--white);
  background: var(--ink);
}

.agenda-row--booked {
  background: var(--taken);
}

.agenda-row--pending {
  background: var(--pending);
}

.agenda-row--night.agenda-row--booked {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.decision-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 6px;
}

/* --- Studio planning ----------------------------------------------------------------- */

.week-arrows {
  display: flex;
  gap: 6px;
}

.week-arrows .strip-arrow {
  width: 44px;
  height: 44px;
  border: var(--border);
}

.recap {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 12px;
  border: var(--border);
}

.recap div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 10px;
}

.recap div + div {
  border-left: var(--border);
}

.recap dt {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--penalty);
}

.recap dd {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}

.days--planning {
  gap: 4px;
  margin-bottom: 4px;
}

.day-chip--gauge {
  height: 66px;
  padding: 8px 4px 7px;
  border: 2px solid var(--rule);
}

.day-gauge {
  display: flex;
  width: 100%;
  height: 6px;
  margin-top: auto;
  background: var(--paper);
}

.day-gauge-booked {
  height: 100%;
  background: var(--ink);
}

.day-gauge-pending {
  height: 100%;
  background: var(--pending);
}

.day-chip[aria-current="date"] .day-gauge {
  background: var(--grey);
}

.day-chip[aria-current="date"] .day-gauge-booked {
  background: var(--taken);
}

.timeline {
  position: relative;
  margin: 12px 0 8px 48px;
  border-left: var(--border);
}

.timeline-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: var(--hairline);
}

.timeline-hour {
  position: absolute;
  left: -48px;
  width: 42px;
  margin-top: -8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  color: var(--grey);
}

.tl-block {
  position: absolute;
  left: 8px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
}

a.tl-block:hover {
  color: inherit;
  filter: brightness(0.97);
}

.tl-block-who {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 800;
}

.tl-block-time {
  flex: 1;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.tl-block-tag {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.tl-block--free {
  color: var(--grey);
  background: var(--white);
  border: 2px dashed var(--ink);
}

.tl-block--booked {
  background: var(--taken);
}

.tl-block--pending {
  background: var(--pending);
  border: var(--border);
}

.tl-block--live {
  color: var(--white);
  background: var(--ink);
}

a.tl-block--live:hover {
  color: var(--white);
}

.tl-block--done {
  color: var(--grey);
  background: var(--paper);
}

.timeline-night {
  position: relative;
  min-height: 44px;
  margin: 6px 0 12px 48px;
}

.timeline-night-label {
  position: absolute;
  top: 14px;
  left: -48px;
  width: 42px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

.tl-block--night {
  position: static;
  min-height: 44px;
}

.tl-block--night.tl-block--booked,
.tl-block--night.tl-block--live {
  color: var(--white);
  background: var(--ink);
}

/* --- Closures ----------------------------------------------------------------------- */

.slot--closed,
.tl-block--closed,
.day-chip--closed,
.pick--closed {
  color: var(--grey);
  background: repeating-linear-gradient(135deg, var(--white) 0 6px, var(--rule) 6px 12px);
  border-color: var(--rule);
}

a.tl-block--closed:hover {
  color: var(--grey);
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form .check input {
  width: 22px;
  min-height: 22px;
  margin: 0;
}

.form .check label {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}

/* --- Studio members ------------------------------------------------------------------ */

.add-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
}

.search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  font: inherit;
  color: var(--ink);
  background: var(--white);
  border: var(--border);
  border-radius: 0;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

.filters a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border: var(--border);
}

.filters a[aria-current] {
  font-weight: 700;
  color: var(--white);
  background: var(--ink);
}

.member-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--border);
}

.member-list li {
  border-bottom: var(--hairline);
}

.member-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 0;
  color: var(--ink);
  text-decoration: none;
}

.initials {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 14px;
  font-weight: 800;
  background: var(--taken);
}

.member-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.member-main strong {
  font-size: 16px;
}

.member-balance {
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.member-balance strong {
  font-size: 20px;
  font-weight: 900;
}

.member-balance span {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--grey);
}

.member-balance--big strong {
  font-size: 36px;
  letter-spacing: -1px;
}

.chip {
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 700;
}

.chip--penalty {
  color: var(--white);
  background: var(--penalty);
}

.chip--pending {
  color: var(--ink);
  background: var(--pending);
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}

.member-head {
  margin: 4px 0 16px;
}

.member-head h1 {
  margin-bottom: 6px;
  font-size: 34px;
}

.member-head .muted {
  margin: 0 0 8px;
  font-size: 14px;
}

.history-link {
  display: flex;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.form ul[id$="_direction"],
.form ul[id$="_status"],
.form div:has(> ul) ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.form ul label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 15px;
  color: var(--ink);
}

.form input[type="radio"],
.form input[type="checkbox"] {
  width: 20px;
  min-height: 20px;
  margin: 0;
}

/* --- Payments ------------------------------------------------------------------------ */

.band--action form {
  margin: 0;
}

.band--action button {
  min-height: 44px;
  padding: 0 16px;
  font-size: 15px;
}

.deposit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: var(--hairline);
  border-bottom: var(--hairline);
}

.deposit form {
  margin: 0;
}

.deposit button {
  min-height: 40px;
  font-size: 14px;
}

/* --- Plans --------------------------------------------------------------------------- */

.head-links {
  display: flex;
  gap: 16px;
  white-space: nowrap;
}

.plans-line {
  margin: -6px 0 12px;
  font-size: 14px;
}

.plan-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.plan-row > a {
  flex: 1;
}

.plan-row form {
  margin: 0;
}

.plan-row--off .member-main strong,
.plan-row--off .member-balance strong {
  color: var(--grey);
}

/* --- Contact inbox ------------------------------------------------------------------- */

.contact-message form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.contact-message--read {
  border-color: var(--rule);
}

.contact-body {
  padding: 10px 12px;
  background: var(--paper);
}

.brand-link {
  color: var(--ink);
  text-decoration: none;
}

.brand-link:hover {
  color: var(--ink);
}

/* --- Wide screens ---------------------------------------------------------------------- */

@media (min-width: 760px) {
  /* No sideways scrolling on a computer: the free slots wrap onto lines. */
  .free-row {
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    overflow: visible;
  }
}
