/* ============================================================================
   FMC — BOOKING CALENDAR · SUNSET BOULEVARD SKIN
   Warm cream paper, cocoa topbar, craft-coded columns:
   Film = burnt orange · Music = mustard · Comedy = avocado.
   Tokens come from sb-core.css (linked before this file).
   SELECTORS ARE LOAD-BEARING — calendar.js renders into these classes and
   mirrors --row-h as ROW_H (compact 32 / coarse-compact 36 / comfy 56 —
   see rowH() in calendar.js; the pairs MUST stay in sync). Reskin only;
   never rename selectors.
   ============================================================================ */

/* ---- page-scoped helpers (brand tokens stay in sb-core) ---- */
body.cal {
  --cal-ink-soft: #3E4A6B;                    /* muted cocoa · 6.0:1 on cream  */
  --cal-hair-soft: rgba(18, 35, 75, 0.12);    /* hour rules                    */
  --cal-hair-faint: rgba(18, 35, 75, 0.06);   /* half-hour rules               */
  --cal-well: #FAF2DF;                        /* input wells · lifted paper    */
  background: var(--paper);
  color: var(--ink);
}

/* ---- craft bindings — the ONLY place --disc is set ----
   Film burnt orange · Music mustard · Comedy avocado.
   --disc      = raw accent (fills, rules, dots — never small text)
   --disc-ink  = AA-safe text form of the same hue (≥ 4.5:1 on cream) */
[data-disc="film"]   { --disc: var(--film);   --disc-ink: var(--film-ink); }
[data-disc="music"]  { --disc: var(--music);  --disc-ink: var(--music-ink); }
[data-disc="comedy"] { --disc: var(--comedy); --disc-ink: var(--comedy-ink); }
/* "busy" is not a craft — it is someone else's private booking, shown so the
   room's week stays truthful. Neutral by law (CLAUDE.md hard rule 2: small
   furniture is neutral ink, never a brand colour), and it must not read as a
   fourth discipline. --disc-ink stays AA on cream. */
[data-disc="busy"]   { --disc: rgba(18, 35, 75, 0.28); --disc-ink: var(--cal-ink-soft); }

/* JS toggles [hidden] on buttons/fields (deleteBtn, nameField, veil…) —
   author display rules (.btn inline-flex, .field grid) must never beat it */
[hidden] { display: none !important; }

.cal-app { min-height: 100vh; display: flex; flex-direction: column; }

/* <main> landmark wraps toolbar + caption + grid; it inherits the
   column-flex role .cal-app used to give its children directly */
.cal-main { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

/* no-JS notice — the grid renders empty without calendar.js */
.noscript-note {
  margin: 1rem clamp(1rem, 3vw, 2rem) 0;
  padding: 0.9rem 1.1rem;
  background: var(--paper-2);
  border: 2px solid var(--hair);
  border-left: 6px solid var(--film);
  border-radius: 10px;
  font-size: var(--fs-sm);
}

/* ============================================================
   TOP BAR — cocoa marquee strip
   ============================================================ */
.cal-top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.6rem clamp(1rem, 3vw, 2rem);
  background: var(--ink);
  color: var(--paper);
  border-bottom: 2px solid var(--hair-cream);
}
.cal-top :focus-visible { outline-color: var(--music); }

.cal-brand {
  display: inline-flex; align-items: center; gap: 0.75rem;
  text-decoration: none; color: var(--paper);
}
.cal-brand .rt-logo { flex: none; }
.cal-brand__text { display: flex; flex-direction: column; }
.cal-brand__word {
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.25rem; line-height: 1; letter-spacing: -0.01em;
}
.cal-brand__tag {
  margin-top: 0.2rem;
  font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--music);                        /* mustard on cocoa · 6.1:1 */
}

/* primary site nav in the top bar — cream links on cocoa (11:1) */
.cal-nav ul { display: flex; flex-wrap: wrap; gap: 0.15rem; align-items: center; list-style: none; margin: 0; padding: 0; }
.cal-nav a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0.4em 0.9em;    /* tap target ≥ 44px */
  border-radius: var(--radius);
  font-size: 0.85rem; font-weight: 600;
  color: var(--paper); text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.cal-nav a:not(.btn):hover { background: var(--ink-panel); }
.cal-nav a:not(.btn)[aria-current="page"] { background: var(--paper); color: var(--ink); }
.cal-nav .btn { margin-left: 0.5rem; }
@media (max-width: 960px) { .cal-nav { display: none; } } /* app bar stays one line; brand link covers the way home */

.cal-account { display: flex; align-items: center; gap: 0.7rem; }
.cal-account .who { text-align: right; line-height: 1.25; }
.cal-account .who b { font-size: 0.9rem; color: var(--paper); }
.cal-account .who span { display: block; font-size: 0.72rem; color: var(--paper-2); } /* 9.7:1 on cocoa */
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--music); color: var(--ink); /* cocoa on mustard · 6.1:1 */
  font-family: var(--font-display); font-weight: 400; font-size: 0.95rem;
}
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  min-height: 44px; display: inline-flex; align-items: center; /* tap target */
  color: var(--paper-2); font-size: 0.82rem;
  text-decoration: underline; text-underline-offset: 3px;
  transition: color 0.2s var(--ease);
}
.link-btn:hover { color: var(--music); }
/* Two of these sit side by side now (Account · Log out). Without this, the
   narrow header breaks "Log out" across two lines. */
.link-btn { white-space: nowrap; }

/* staff badge — mustard admit-pill next to the name in the account chip */
.staff-badge {
  display: inline-block; padding: 0.12em 0.55em; margin-left: 0.45em;
  border-radius: 999px;
  background: var(--music); color: var(--ink); /* cocoa on mustard · 6.1:1 */
  font-size: 0.6rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  vertical-align: 0.15em;
}

/* ============================================================
   BUTTONS — page variants on sb-core's .btn base
   ============================================================ */
.btn-gold { background: var(--music); color: var(--ink); box-shadow: var(--shadow-lift); } /* 6.1:1 */
.btn-gold:hover { background: var(--music-ink); color: var(--paper); transform: translateY(-2px); } /* 5.1:1 */
.btn-danger { background: transparent; border: 2px solid var(--film-ink); color: var(--film-ink); } /* 5.5:1 */
.btn-danger:hover { background: var(--film-ink); color: var(--paper); }

/* ============================================================
   TOOLBAR — room ticket stubs, craft chips, week nav
   ============================================================ */
.cal-toolbar {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  background: var(--paper);
  border-bottom: 2px solid var(--hair);
}
.toolbar-group { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.toolbar-spacer { flex: 1 1 auto; }

/* --- room pills: ticket-stub chips. Notch bites are cut with a mask on the
   ::before plate so the :focus-visible outline is never clipped. --- */
.room-pills { display: flex; gap: 0.45rem; flex-wrap: wrap; }
.pill {
  position: relative; isolation: isolate;
  min-height: 44px;                           /* tap target ≥ 44px */
  padding: 0.55rem 1.05rem 0.55rem 1.5rem;
  font-size: 0.85rem; font-weight: 600; line-height: 1.2;
  color: var(--ink);                          /* cocoa on deep cream · 9.7:1 */
  background: none; border: 0; cursor: pointer;
  transition: color 0.2s var(--ease);
}
.pill::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--paper-2);
  border: 1.5px solid var(--hair);
  border-radius: 8px;
  -webkit-mask:
    radial-gradient(circle 7px at 0 50%,    transparent 97%, #000) left  center / 51% 100% no-repeat,
    radial-gradient(circle 7px at 100% 50%, transparent 97%, #000) right center / 51% 100% no-repeat;
  mask:
    radial-gradient(circle 7px at 0 50%,    transparent 97%, #000) left  center / 51% 100% no-repeat,
    radial-gradient(circle 7px at 100% 50%, transparent 97%, #000) right center / 51% 100% no-repeat;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.pill::after { /* perforation line inside the stub */
  content: ""; position: absolute; left: 0.95rem; top: 7px; bottom: 7px;
  border-left: 1.5px dashed rgba(18, 35, 75, 0.4);
}
.pill:hover::before { background: var(--c-peach); }
.pill[aria-pressed="true"] { color: var(--ink); }        /* cocoa on mustard · 6.1:1 */
.pill[aria-pressed="true"]::before { background: var(--music); border-color: var(--music-ink); }
.pill[aria-pressed="true"]::after { border-left-color: rgba(18, 35, 75, 0.55); }

/* --- craft filter chips --- */
.disc-filter { display: flex; gap: 0.35rem; }
.disc-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 44px;                           /* tap target ≥ 44px */
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.82rem; font-weight: 600; line-height: 1.2;
  background: var(--paper); border: 1.5px solid var(--hair); color: var(--ink);
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.disc-chip::before { /* craft dot: All = tri-craft sunset wheel */
  content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--film) 0 120deg, var(--music) 0 240deg, var(--comedy) 0);
}
.disc-chip[data-disc]::before { background: var(--disc); }
.disc-chip:hover { background: var(--paper-2); }
.disc-chip[aria-pressed="true"]::before { background: currentColor; }
.disc-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); } /* All · 11:1 */
.disc-chip[data-disc="film"][aria-pressed="true"]   { background: var(--film-ink);    border-color: var(--film-ink);    color: var(--paper); } /* 5.5:1 */
.disc-chip[data-disc="music"][aria-pressed="true"]  { background: var(--music);       border-color: var(--music-ink);   color: var(--ink); }   /* dark on mustard · 6.1:1 */
.disc-chip[data-disc="comedy"][aria-pressed="true"] { background: var(--comedy-deep); border-color: var(--comedy-deep); color: var(--paper); } /* 6.1:1 */

/* --- week nav --- */
.weeknav { display: flex; align-items: center; gap: 0.4rem; }
.weeknav button:not(.btn--vinyl) {
  width: 44px; height: 44px; display: grid; place-items: center; /* tap target */
  border-radius: 10px; background: var(--paper-2);
  border: 1.5px solid var(--hair); color: var(--ink); cursor: pointer;
  transition: background 0.2s var(--ease);
}
.weeknav button:not(.btn--vinyl):hover { background: var(--c-peach); }
/* prev/next arrows are circular vinyls (.btn--vinyl from sb-core) —
   a little record-player control cluster */
.weeknav .btn--vinyl { width: 44px; height: 44px; }
/* button.today-btn (0,2,1) so it out-specifies the :not(.btn--vinyl) rule above */
.weeknav button.today-btn { width: auto; height: 44px; padding: 0 0.9rem; font-weight: 600; font-size: 0.85rem; }
.week-label {
  font-weight: 600; font-size: 0.95rem; min-width: 12ch; text-align: center;
  font-variant-numeric: tabular-nums;
}

/* --- utility toolbar buttons: density toggle + staff panel --- */
.tool-btn {
  min-height: 44px; padding: 0 0.9rem;        /* tap target ≥ 44px */
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px; background: var(--paper-2);
  border: 1.5px solid var(--hair); color: var(--ink);
  font-weight: 600; font-size: 0.85rem; cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.tool-btn:hover { background: var(--c-peach); }
.tool-btn.is-on { background: var(--music); border-color: var(--music-ink); color: var(--ink); } /* active toggle — dark on mustard */
.tool-btn--danger { color: var(--film-ink); border-color: var(--film-ink); } /* 5.5:1 */
.tool-btn--danger:hover { background: var(--film-ink); color: var(--paper); }

.room-caption { padding: 0.65rem clamp(1rem, 3vw, 2rem) 0; font-size: var(--fs-sm); color: var(--cal-ink-soft); }
.room-caption b { color: var(--ink); font-weight: 600; }

/* ============================================================
   THE GRID — call sheet on cream paper
   ============================================================ */
.cal-scroll { flex: 1 1 auto; overflow: auto; padding: 0.5rem clamp(0.5rem, 2vw, 1.5rem) 2rem; }
.cal-grid {
  /* Compact by default — the whole visible day fits a laptop screen.
     MUST match rowH() in calendar.js (compact 32 / coarse 36 / comfy 56). */
  --row-h: 32px;
  --cal-gutter: 64px;
  min-width: 780px; position: relative;
  display: grid; grid-template-columns: var(--cal-gutter) repeat(7, 1fr);
}
/* Comfortable density — calendar.js toggles .is-comfy (persisted, default Compact) */
.cal-grid.is-comfy { --row-h: 56px; }

/* ---- ALL-ROOMS availability matrix — reuses the gutter + 7-day grid,
   but rows are the four rooms and cells hold craft-coloured booking chips ---- */
.cal-grid--matrix { grid-template-columns: minmax(104px, 150px) repeat(7, minmax(0, 1fr)); }
.mx-roomlabel {
  position: sticky; left: 0; z-index: 2;
  display: flex; align-items: center;
  padding: 0.6rem 0.7rem;
  background: var(--paper);
  border-right: 2px solid var(--hair);
  border-bottom: 1px solid var(--cal-hair-soft);
  font-weight: 600; font-size: 0.82rem; line-height: 1.15; color: var(--ink);
}
.mx-cell {
  display: flex; flex-direction: column; gap: 0.3rem;
  min-height: 74px; padding: 0.4rem;
  border-left: 1px solid var(--cal-hair-soft);
  border-bottom: 1px solid var(--cal-hair-soft);
  cursor: copy;
  transition: background 0.16s ease, box-shadow 0.16s ease;
}
.mx-cell:hover { background: rgba(252, 164, 52, 0.06); box-shadow: inset 0 0 0 1.5px rgba(252, 164, 52, 0.35); }
.mx-cell.is-today { background: rgba(252, 164, 52, 0.09); }
.mx-cell.is-today:hover { background: rgba(252, 164, 52, 0.14); }
.mx-free { margin-top: 0.1rem; color: var(--cal-ink-soft); font-size: 0.72rem; font-weight: 500; }
.mx-chip {
  display: block; width: 100%; text-align: left;
  border: 0; border-left: 3px solid var(--disc-ink);
  border-radius: 6px; padding: 0.3rem 0.45rem;
  background: var(--disc); color: var(--disc-ink);
  font-family: inherit; font-weight: 600; font-size: 0.72rem; line-height: 1.2;
  cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease);
}
.mx-chip:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.mx-chip:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 2px; }
.mx-chip__t { font-variant-numeric: tabular-nums; opacity: 0.8; margin-right: 0.35em; }
.mx-chip.is-pub { box-shadow: inset 0 0 0 1.5px var(--disc-ink); }
.corner { position: sticky; top: 0; z-index: 3; background: var(--paper); border-bottom: 2px solid var(--hair); }
.day-head {
  position: sticky; top: 0; z-index: 3; background: var(--paper);
  text-align: center; padding: 0.5rem 0.2rem 0.45rem;
  border-bottom: 2px solid var(--hair);
}
.day-head .dow {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cal-ink-soft);
}
.day-head .dnum {
  font-family: var(--font-display); font-weight: 400; font-size: 1.2rem; line-height: 1;
  width: 2.1rem; height: 2.1rem; margin: 0.25rem auto 0;
  display: grid; place-items: center; border-radius: 50%;
}
.day-head.is-today .dow { color: var(--film-ink); }
.day-head.is-today .dnum { /* burnt-orange today ring */
  color: var(--film-ink);
  box-shadow: inset 0 0 0 2.5px var(--film);
}

.time-gutter { position: relative; }
.time-label {
  height: var(--row-h); box-sizing: border-box;
  font-size: 0.7rem; font-weight: 500; font-variant-numeric: tabular-nums;
  color: var(--cal-ink-soft);
  text-align: right; padding-right: 0.55rem; transform: translateY(-0.5em);
}

.day-col {
  position: relative;
  border-left: 1px solid var(--cal-hair-soft);
  cursor: copy;
}

/* keyboard route into a day column — skip-link pattern: invisible
   (but still in the a11y tree) until focused, then a small chip
   pinned to the top of its column. Gives day-cols a real focusable
   control without nesting interactive roles. */
.day-book {
  position: absolute; left: 4px; right: 4px; top: 3px; z-index: 6;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  background: var(--ink); color: var(--paper);   /* 11:1 */
  font-size: 0.72rem; font-weight: 600; line-height: 1.2;
  text-align: center; cursor: pointer;
  opacity: 0; pointer-events: none;
}
.day-book:focus-visible { opacity: 1; pointer-events: auto; outline-offset: 2px; }
.day-col.is-today {
  background: rgba(191, 10, 48, 0.05);        /* fallback: --c-orange wash */
  background: color-mix(in srgb, var(--film) 5%, transparent);
}
.hour-line { height: var(--row-h); border-bottom: 1px solid var(--cal-hair-soft); }
.hour-line.half::after { /* 30-min guide */
  content: ""; display: block; position: relative;
  top: calc(var(--row-h) / 2); height: 1px;
  background: var(--cal-hair-faint);
}

/* --- booking blocks: craft tint at low alpha + solid left rule --- */
.evt {
  position: absolute; left: 4px; right: 4px;
  border-radius: 6px; overflow: hidden;
  min-height: 20px;                           /* compact floor — title stays one readable line */
  padding: 0.15rem 0.5rem; font-size: 0.75rem; line-height: 1.25;
  color: var(--ink);
  background: var(--paper-2);                 /* fallback */
  background: color-mix(in srgb, var(--disc) 16%, var(--paper));
  border: 1px solid var(--hair);
  border-left: 4px solid var(--disc);
  cursor: pointer;
  /* transform only — animating box-shadow repaints the block +
     shadow region every frame of the hover; the lift still eases,
     the shadow lands instantly (imperceptible at 150ms) */
  transition: transform 0.15s var(--ease);
}
.evt:hover { transform: translateY(-1px); box-shadow: var(--shadow-lift); z-index: 5; }
.cal-grid.is-comfy .evt { padding: 0.35rem 0.5rem; }
.evt .evt-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evt .evt-owner { color: var(--ink); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* secondary line: whose booking it is */
.evt .evt-meta { color: var(--disc-ink); font-size: 0.68rem; font-variant-numeric: tabular-nums; }
.evt--xs .evt-owner,
.evt--xs .evt-meta { display: none; }         /* short blocks: category label only, one line */
.evt-pub {                                    /* "Open to the public" — mustard admit-dot */
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 0.35em;
  background: var(--music); box-shadow: 0 0 0 1.5px var(--ink);
}
.evt.mine { box-shadow: inset 0 0 0 1.5px var(--disc-ink); }
/* An anonymous block says "this hour is spoken for" and nothing else: no
   craft colour to read, no owner line, and it never claims to be yours. */
.evt--anon { background: rgba(18, 35, 75, 0.05); }
.evt--anon .evt-title { font-weight: 500; font-style: italic; }
.evt.mine .evt-title::after { content: " ·"; color: var(--disc-ink); }

/* --- now line: burnt orange, spindle dot on the left --- */
.now-line {
  position: absolute; left: 0; right: 0; height: 2px;
  background: var(--film); z-index: 4; pointer-events: none;
}
.now-line::before {
  content: ""; position: absolute; left: -4px; top: -3px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--film);
}

/* ============================================================
   SIGNED-OUT VEIL — dusk wash over the lot
   ============================================================ */
.signed-out {
  /* z-index sits ABOVE the grid content (which tops out at z-6) but BELOW the
     .cal-top header bar (z-40) and the mobile nav dropdown (z-150), so a
     signed-out visitor is gated from the calendar yet can still use the header
     to navigate or sign in — was z-60, which buried the whole header. */
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-items: center; padding: 1.5rem;
  background: rgba(18, 35, 75, 0.66);
  backdrop-filter: blur(4px);
}
.veil-card {
  max-width: 26rem; text-align: center;
  background: var(--paper); color: var(--ink);
  border-radius: var(--radius-plate); border-top: 8px solid var(--film);
  padding: 2.2rem 1.8rem 2rem;
  box-shadow: var(--shadow-plate);
}
.veil-card .rt-logo { display: block; margin: 0 auto 1.2rem; }
.veil-card .rt-logo--mini { --logo-size: 76px; }
.veil-title { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; line-height: 1.05; }
.veil-sub { color: var(--cal-ink-soft); font-size: var(--fs-sm); margin: 0.7rem 0 1.4rem; }

/* ============================================================
   DIALOGS — warm paper cards (grain via sb-core's .grain)
   ============================================================ */
dialog.modal {
  border: 0; border-top: 8px solid var(--film);
  border-radius: var(--radius-plate);
  padding: 0; max-width: 460px; width: calc(100% - 2rem);
  background: var(--paper); color: var(--ink);
  box-shadow: 0 40px 80px -24px rgba(18, 35, 75, 0.75);
}
dialog.modal::backdrop { background: rgba(18, 35, 75, 0.55); backdrop-filter: blur(3px); }
.modal-in { padding: 1.7rem; }
.modal-in h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.55rem; line-height: 1.05; }
.modal-in .sub { color: var(--cal-ink-soft); font-size: 0.9rem; margin-top: 0.35rem; }
.modal-close {
  position: absolute; top: 0.7rem; right: 0.7rem; z-index: 4;
  width: 44px; height: 44px; display: grid; place-items: center; /* tap target */
  background: var(--paper-2); border: 1.5px solid var(--hair); border-radius: 8px;
  color: var(--ink); cursor: pointer;
  transition: background 0.2s var(--ease);
}
.modal-close:hover { background: var(--c-peach); }

.field { display: grid; gap: 0.35rem; margin-top: 1rem; }
.field label {
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--cal-ink-soft);
}
.field input, .field select {
  background: var(--cal-well);
  border: 1.5px solid var(--hair); color: var(--ink);
  border-radius: 10px; padding: 0.7rem 0.8rem;
  font: inherit; font-size: 1rem;
}
.field input::placeholder { color: var(--cal-ink-soft); opacity: 1; }
.field input:focus, .field select:focus { outline: 3px solid var(--film-ink); outline-offset: 1px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }

/* --- craft segment picker --- */
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; }
.seg label {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  min-height: 44px;                           /* tap target ≥ 44px */
  padding: 0.6rem; border-radius: 10px;
  background: var(--paper); border: 1.5px solid var(--hair);
  font-size: 0.85rem; font-weight: 600; color: var(--ink);
  cursor: pointer; text-transform: none; letter-spacing: 0;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.seg label::before { content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--disc, var(--ink)); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.seg label:has(input:checked)::before { background: currentColor; }
.seg label[data-disc="film"]:has(input:checked)   { background: var(--film-ink);    border-color: var(--film-ink);    color: var(--paper); } /* 5.5:1 */
.seg label[data-disc="music"]:has(input:checked)  { background: var(--music);       border-color: var(--music-ink);   color: var(--ink); }   /* dark on mustard · 6.1:1 */
.seg label[data-disc="comedy"]:has(input:checked) { background: var(--comedy-deep); border-color: var(--comedy-deep); color: var(--paper); } /* 6.1:1 */

.form-error { margin-top: 0.9rem; color: var(--film-ink); font-weight: 500; font-size: 0.85rem; min-height: 1.1em; }
.modal-actions { display: flex; gap: 0.6rem; margin-top: 1.4rem; }
.modal-actions .btn { flex: 1; justify-content: center; }

/* --- auth tabs --- */
.tabs {
  display: flex; gap: 0.3rem;
  background: var(--paper-2); border: 1.5px solid var(--hair);
  padding: 0.25rem; border-radius: var(--radius); margin-bottom: 1rem;
}
.tabs button {
  flex: 1; min-height: 44px; padding: 0.55rem; border: 0; border-radius: var(--radius);
  background: transparent; color: var(--cal-ink-soft);  /* 5.3:1 on deep cream */
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); } /* 11:1 */

.proto-note { font-size: 0.78rem; color: var(--cal-ink-soft); margin-top: 1rem; line-height: 1.45; }
.proto-note__ico { display: inline-block; vertical-align: -2px; margin-right: 0.35em; color: var(--music-ink); }

/* --- booking form: "Open to the public" checkbox row --- */
.field label.check {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 0.9rem; font-weight: 600; color: var(--ink);
  text-transform: none; letter-spacing: 0; cursor: pointer;
}
.field label.check input { width: 1.15rem; height: 1.15rem; accent-color: var(--music-ink); cursor: pointer; flex: none; }
.field-help { font-size: 0.75rem; color: var(--cal-ink-soft); }

/* Mark required fields (category, owner, date) with a subtle asterisk so people
   fill them first time instead of hitting "Pick what you're booking." on submit.
   The .check row is never required, so exclude it. */
.field:has([required]) > label:not(.check)::after {
  content: " *"; color: var(--film-ink); font-weight: 700;
}

/* the "how can the public attend?" panel — revealed under the public toggle.
   A mustard-tinted card with a ticket-strap accent on the left edge. */
.pub-panel {
  margin-top: 0.7rem;
  padding: 0.85rem 0.95rem;
  background: rgba(252, 164, 52, 0.12);
  border: 1.5px solid var(--music-ink);
  border-left-width: 4px;
  /* was var(--radius) = 999px (a PILL token); on this tall panel that rounded
     the sides into a giant sideways oval whose outline cut across the text.
     A card radius, matching the inputs/segments in this modal. */
  border-radius: 12px;
}
.pub-panel[hidden] { display: none; }
.pub-panel .field { margin-top: 0.7rem; margin-bottom: 0; }
.pub-panel__lead { margin: 0; font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.pub-panel__or { margin: 0.9rem 0 0; font-size: 0.8rem; font-weight: 600; color: var(--cal-ink-soft); }
.pub-panel .opt { font-weight: 400; font-size: 0.85em; color: var(--cal-ink-soft); }
.pub-panel .is-muted { opacity: 0.48; }   /* dimmed when a ticket link is present */

/* --- membership gate --- */
.gate-catch {                                  /* the catchphrase, felt not buried */
  margin-top: 1.4rem;
  font-family: var(--font-display); font-weight: 400;
  font-size: 1.5rem; line-height: 1.1;         /* slab never below 24px */
  color: var(--ink);
}

/* --- staff panel --- */
.modal--staff { max-width: 560px; }
.staff-list {
  list-style: none; margin: 1.2rem 0 0; padding: 0;
  display: grid; gap: 0.5rem;
  max-height: 55vh; overflow: auto;
}
.staff-row {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.6rem 0.7rem;
  background: var(--cal-well);
  border: 1.5px solid var(--hair); border-radius: 10px;
}
.staff-row .staff-who { flex: 1 1 auto; min-width: 0; line-height: 1.3; }
.staff-row .staff-who b { display: block; font-size: 0.9rem; }
.staff-row .staff-who span { display: block; font-size: 0.75rem; color: var(--cal-ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-row .tool-btn { min-height: 36px; padding: 0 0.7rem; font-size: 0.78rem; }
.member-state { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cal-ink-soft); }
.member-state.is-on { color: var(--comedy-ink); }

/* ---- toast ----------------------------------------------------
   A PORT, not a new component: these rules are copied verbatim from
   sb-admin.css §toast, and the markup and the toast() function match
   admin.html / sb-admin.js. Two sheets carry it because the two pages
   share no stylesheet — if you change one, change the other.
   transform/opacity only, and flattened under reduced motion. */
.fd-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 1000;
  max-width: min(92vw, 440px);
  padding: 0.85em 1.2em;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  border-left: 6px solid var(--music);
  box-shadow: var(--shadow-plate);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}
.fd-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.fd-toast--err { border-left-color: var(--film); }

@media (prefers-reduced-motion: reduce) {
  .fd-toast { transition: opacity 0.25s var(--ease); transform: translate(-50%, 0); }
  .fd-toast.is-on { transform: translate(-50%, 0); }
}

/* ============================================================
   SMALL SCREENS
   ============================================================ */
@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .cal-account .who { display: none; }
  .week-label { min-width: auto; }
  .cal-brand__tag { display: none; }
  /* The avatar is the initials of a name that is already hidden at this width,
     so it says nothing here — and dropping it buys the room the two links need
     to sit on one line each. */
  .cal-account .avatar { display: none; }
  .cal-account { gap: 0.9rem; }
}

/* coarse pointers: the hover-revealed day-book buttons need a real
   thumb-sized target (they're always visible on touch, no hover there),
   and compact rows breathe up to 36px for thumbs — calendar.js mirrors
   this via matchMedia("(pointer: coarse)") in rowH() */
@media (pointer: coarse) {
  .day-book { padding: 0.85rem 0.5rem; opacity: 1; pointer-events: auto; }
  .cal-grid { --row-h: 36px; } /* .is-comfy (0,2,0) still wins at 56px */
  .staff-row .tool-btn { min-height: 44px; } /* thumbs get the full tap target */
}
