/* ============================================================
   onsombul - design system v2
   Bright, modern, editorial-theatrical. Light, high-contrast, readable.
   Display: Momo Trust Display (geometric rounded).  UI/body: Inter.
   ============================================================ */
:root {
  /* App identity (constant - never overridden by a society) */
  --app-1: #6d28d9;          /* violet */
  --app-2: #ec4899;          /* pink   */
  --app-grad: linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);

  /* Brand accent - defaults to violet, overridden per-society */
  --brand: #6d28d9;
  --brand-tint: #6d28d914;
  --brand-ink: #ffffff;

  /* Neutrals - warm-cool light */
  --bg: #f6f4fb;
  --bg-2: #efeafc;
  --surface: #ffffff;
  --surface-2: #f4f1fb;
  --ink: #1d1832;            /* near-black, strong contrast */
  --muted: #615d77;
  --line: #e8e3f3;

  --ok: #15803d;
  --warn: #b45309;
  --err: #dc2626;

  /* chrome bits that themes remap */
  --header-bg: rgba(255,255,255,.82);
  --hero-grad: linear-gradient(160deg, #ffffff 0%, #faf5ff 55%, #fdf0f8 100%);
  --body-bg:
    radial-gradient(1100px 460px at 88% -8%, #f6e6fb 0%, rgba(246,230,251,0) 60%),
    radial-gradient(900px 420px at -5% 0%, #e6effb 0%, rgba(230,239,251,0) 55%),
    var(--bg);

  --radius: 18px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(29,24,50,.06), 0 2px 8px rgba(29,24,50,.05);
  --shadow: 0 4px 14px rgba(29,24,50,.07), 0 12px 32px rgba(109,40,217,.07);
  --shadow-lg: 0 12px 28px rgba(29,24,50,.10), 0 28px 60px rgba(109,40,217,.14);

  --ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Momo Trust Display", "Avenir Next", "Avenir", "Century Gothic", "Trebuchet MS", system-ui, sans-serif;
}
:root {
  /* tonal shades derived from the (possibly per-society) brand */
  --brand-strong: color-mix(in srgb, var(--brand) 80%, #000);
  --brand-soft:   color-mix(in srgb, var(--brand) 12%, #fff);
  --brand-grad:   linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #ec4899));
  /* cohesive jewel-tone palette for the different content areas (not a rainbow) */
  --c-music: #7c3aed; --c-scenes: #0d9488; --c-schedule: #d97706;
  --c-images: #e11d48; --c-videos: #4f46e5; --c-settings: #475569; --c-cast: #0369a1; --c-backstage: #be185d;
}

/* ---- Easy-reading comfort themes (remap neutrals; accents kept) ---- */
/* Warm dim (sepia): warm off-white, dimmed, low blue - accents read as-is */
:root[data-theme="warm"] {
  --bg: #e9e1d2; --bg-2: #e2d8c6;
  --surface: #f3ecdf; --surface-2: #e7dfce;
  --ink: #2f2a24; --muted: #6f675b; --line: #d8cfbc;
  --header-bg: rgba(243,236,223,.86);
  --hero-grad: linear-gradient(160deg, #f3ecdf 0%, #efe6d6 55%, #f1e7da 100%);
  --body-bg: radial-gradient(1100px 460px at 88% -8%, #efe2cf 0%, rgba(239,226,207,0) 60%), radial-gradient(900px 420px at -5% 0%, #ece4d2 0%, rgba(236,228,210,0) 55%), var(--bg);
  --brand-soft: color-mix(in srgb, var(--brand) 12%, var(--surface));
  --shadow-sm: 0 1px 2px rgba(70,52,28,.06), 0 2px 8px rgba(70,52,28,.05);
  --shadow: 0 4px 14px rgba(70,52,28,.07), 0 12px 32px rgba(90,62,28,.06);
  --shadow-lg: 0 12px 28px rgba(70,52,28,.10), 0 28px 60px rgba(90,62,28,.12);
}

/* Dusk: a soft warm dark - neutrals dark, accent foregrounds lightened to stay legible */
:root[data-theme="dusk"] {
  --bg: #211f26; --bg-2: #1b1a20;
  --surface: #2a2832; --surface-2: #322f3b;
  --ink: #ece6dc; --muted: #a79fb0; --line: #3a3744;
  --header-bg: rgba(33,31,38,.85);
  --hero-grad: linear-gradient(160deg, #2a2832 0%, #2c2733 55%, #30293a 100%);
  --body-bg: radial-gradient(1100px 460px at 88% -8%, #2c2536 0%, rgba(44,37,54,0) 60%), radial-gradient(900px 420px at -5% 0%, #232733 0%, rgba(35,39,51,0) 55%), var(--bg);
  --brand-soft: color-mix(in srgb, var(--brand) 24%, var(--surface));
  --brand-tint: color-mix(in srgb, var(--brand) 26%, var(--surface));
  --shadow-sm: 0 1px 2px rgba(0,0,0,.40);
  --shadow: 0 4px 14px rgba(0,0,0,.45);
  --shadow-lg: 0 14px 40px rgba(0,0,0,.55);
}
/* Lighten accent foregrounds on dusk (keeps the per-society hue, just brighter) */
:root[data-theme="dusk"] a,
:root[data-theme="dusk"] .btn-ghost,
:root[data-theme="dusk"] .badge-brand,
:root[data-theme="dusk"] .accent-tags a.badge,
:root[data-theme="dusk"] .transition .tr-label,
:root[data-theme="dusk"] .crumbs a:hover,
:root[data-theme="dusk"] .main-nav a.who:hover { color: color-mix(in srgb, var(--brand) 48%, #fff); }
/* Solid buttons keep their white-on-gradient text (the rule above must not leak into them) */
/* Solid buttons always keep their white-on-gradient text, in any theme or container */
:root[data-theme] .btn:not(.btn-ghost) { color: var(--brand-ink); }
:root[data-theme="dusk"] a.badge:hover { background: color-mix(in srgb, var(--brand) 24%, var(--surface)); color: color-mix(in srgb, var(--brand) 48%, #fff); }
:root[data-theme="dusk"] .badge-ok { background: #1f3a2a; color: #8fe0ad; }
:root[data-theme="dusk"] .badge-warn { background: #3a2e1c; color: #f0c478; }
.ic { display: inline-block; vertical-align: -0.18em; flex: 0 0 auto; }
.btn .ic, .viewtoggle .ic, .crumbs .ic, h1 .ic, h2 .ic, summary .ic { vertical-align: -0.16em; }

/* Large area tiles (production hub) */
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); margin: 8px 0 4px; }
.tile-link { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); position: relative; overflow: hidden; }
.tile-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.tile-link::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 120% at 100% 0%, var(--areac) 0%, transparent 55%); opacity: .07; pointer-events: none; }
.tile-link .chip { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; color: #fff; flex: 0 0 auto; background: linear-gradient(140deg, var(--areac), color-mix(in srgb, var(--areac) 58%, #000)); box-shadow: 0 6px 16px color-mix(in srgb, var(--areac) 40%, transparent); }
.tile-link h3 { margin: 0; font-size: 1.12rem; }
.tile-link .tsub { margin: 2px 0 0; font-size: .82rem; color: var(--muted); }
.tile-link .tgo { margin-left: auto; color: var(--muted); opacity: .6; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--body-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: no-preference) {
  a, .btn, .tile, .card, .chip, .segmented button { transition: all .16s ease; }
}
.wrap { max-width: 1000px; margin: 0 auto; padding: 0 20px; }
a { color: var(--brand); text-decoration: none; font-weight: 500; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.01em; line-height: 1.15; color: var(--ink); }
h1 { font-size: 2.1rem; margin: 0 0 8px; }
h2 { font-size: 1.4rem; margin: 30px 0 14px; }
h3 { font-size: 1.12rem; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.lead { color: var(--muted); font-size: 1.1rem; line-height: 1.55; margin-bottom: 22px; }

/* Header */
.site-header {
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.header-inner { display: flex; align-items: center; flex-wrap: wrap; min-height: 68px; gap: 10px 12px; padding-top: 10px; padding-bottom: 10px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px;
  background: var(--app-grad); color: #fff; font-size: 1.15rem; box-shadow: 0 4px 12px rgba(124,58,237,.35);
}
.brand-logo { width: 36px; height: 36px; border-radius: 10px; display: block; box-shadow: 0 4px 12px rgba(124,58,237,.35); }
.hero-mark { width: 60px; height: 60px; border-radius: 18px; display: block; box-shadow: 0 8px 20px rgba(124,58,237,.32); }
.main-nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.main-nav a:not(.btn) { color: var(--ink); font-weight: 600; }
.main-nav a:not(.btn):hover { color: var(--brand); text-decoration: none; }
.main-nav a.who { color: var(--muted); font-size: .9rem; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.main-nav a.who:hover { color: var(--brand); }
.main-nav a.who .ic { vertical-align: -0.16em; }
.header-tools { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
/* Nav sits inline (right) on desktop; on mobile it drops to its own full-width row. */
.main-nav { margin-left: 4px; }
.theme-pick { display: inline-flex; margin: 0; }
.theme-pick select { font-family: var(--ui); font-size: .8rem; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
/* Header search: an icon that opens a search row under the nav */
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
/* #76: make search a clearly-labelled affordance (icon + "Search" on wider screens). */
/* Sized to match the theme-picker pill (.theme-pick select: .8rem, 5px 9px). */
.search-btn { width: auto; height: auto; display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 5px 12px; }
.search-btn svg { width: 15px; height: 15px; }
.search-btn .search-btn-label { font-size: .8rem; font-weight: 600; }
@media (max-width: 600px) { .search-btn { width: 32px; height: 32px; padding: 0; } .search-btn .search-btn-label { display: none; } }
/* #77: remove the 300ms tap delay / double-tap-zoom so controls fire on first tap. */
button, .btn, a.btn, .tile-link, .icon-btn, .avail-toggle, .star-btn, .viewtoggle a, .chip-check, summary, label.chip { touch-action: manipulation; }
.search-panel { border-top: 1px solid var(--line); background: var(--header-bg); }
.search-panel[hidden] { display: none; }
.searchbar { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; margin: 10px 0; }
.searchbar .sb-ic { color: var(--muted); display: inline-flex; }
.searchbar input { border: 0; background: none; outline: none; font: inherit; font-size: .92rem; color: var(--ink); flex: 1; min-width: 0; }
.searchbar input::placeholder { color: var(--muted); }
.search-scope { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
.chip-toggle { display: inline-block; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .85rem; font-weight: 600; }
.chip-toggle:hover { text-decoration: none; border-color: var(--brand); color: var(--brand); }
.chip-toggle.on { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
@media (max-width: 760px) {
  /* Two clean rows: brand + tools on top, full-width nav below. */
  .main-nav { flex: 1 1 100%; margin-left: 0; gap: 12px 18px; justify-content: flex-start; }
  .header-tools { gap: 10px; }
}
/* Mid widths (small laptops / scaled HiDPI, no bottom tab bar yet): collapse the text-heavy
   header items to icons so it stays a single clean row instead of wrapping. My Dashboard is
   still the brand link; Platform + account are reachable via the account icon / Menu. */
@media (min-width: 761px) and (max-width: 980px) {
  .main-nav .nav-link-text { display: none; }
  .main-nav a.who .who-name { display: none; }
  .main-nav { gap: 12px; }
  .header-tools { gap: 10px; }
}

/* Inline area search filter */
.area-filter { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; margin-bottom: 14px; max-width: 320px; width: 100%; }
.area-filter .sb-ic { color: var(--muted); display: inline-flex; }
.area-filter input { border: 0; background: none; outline: none; font: inherit; font-size: .9rem; color: var(--ink); width: 100%; }
.filter-hidden { display: none !important; }

/* Header command-palette suggestion dropdown */
.sb-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 6px; max-height: 60vh; overflow: auto; }
.sb-opt { display: block; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-size: .92rem; }
.sb-opt:hover, .sb-opt.on { background: var(--brand-tint); }
.sb-lbl { font-weight: 600; }
.sb-sub { color: var(--muted); font-size: .82rem; }
.sb-tag { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--brand); background: var(--brand-tint); border-radius: 999px; padding: 1px 7px; margin-left: 4px; vertical-align: 1px; }
.sb-rec { color: var(--muted); border-top: 1px solid var(--line); margin-top: 4px; border-radius: 0 0 8px 8px; }
.sb-rec strong { color: var(--ink); }

/* Vertical only - keep .wrap's horizontal padding so content keeps edge margins on mobile. */
.page { padding-top: 30px; padding-bottom: 80px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  /* Solid colour fallback first: if the color-mix() inside --brand-grad ever
     fails to compute (older iOS Safari), the gradient background-image is
     dropped but this solid fill remains, so the button is never transparent. */
  background-color: var(--brand);
  background-image: var(--brand-grad);
  color: var(--brand-ink); border: 1px solid transparent;
  border-radius: 999px; padding: 11px 20px; font-size: 1rem; font-weight: 600;
  font-family: var(--ui); cursor: pointer; line-height: 1; box-shadow: var(--shadow-sm);
  -webkit-appearance: none; appearance: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; filter: saturate(1.05); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-lg { padding: 15px 30px; font-size: 1.08rem; }
.btn-ghost { background: var(--surface); color: var(--brand); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--brand-tint); border-color: var(--brand); }
.btn-danger { background: var(--err); color: #fff; }
.btn-block { width: 100%; }

/* Cards & tiles */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
a.linkcard { color: inherit; }
a.linkcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.cast-section-h { margin: 20px 0 9px; font-size: 1.22rem; font-weight: 800; color: var(--accent); letter-spacing: .01em; }
.grad-text { background: var(--app-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
/* "All areas" menu panel + compact nav menu (#114) */
.menu-panel { border-top: 1px solid var(--line); background: var(--surface, #fff); padding: 14px 0; }
.menu-body { max-height: 70vh; overflow-y: auto; }
.navmenu { display: flex; flex-direction: column; gap: 11px; }
.nav-filter-wrap { display: flex; align-items: center; gap: 8px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); max-width: 420px; }
.nav-filter-wrap svg { color: var(--muted, #8a8597); flex: 0 0 auto; }
.nav-filter-wrap input.nav-filter { border: 0; outline: 0; box-shadow: none; background: transparent; font: inherit; width: 100%; color: inherit; padding: 0; min-height: 0; border-radius: 0; }
.nav-chiprow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.nav-rowlabel { flex: 0 0 100%; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted, #8a8597); }
.nav-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: inherit; font-size: .84rem; line-height: 1.25; background: var(--surface, #fff); }
.nav-chip svg { color: var(--accent); flex: 0 0 auto; }
.nav-chip:hover { background: var(--brand-tint); border-color: var(--accent); }
.nav-chip-here { background: var(--brand-tint); border-color: var(--accent); font-weight: 650; }
.nav-chip-dim { color: var(--muted, #8a8597); border-style: dashed; }
.nav-chip-dim svg { color: var(--muted, #8a8597); }
.nav-acc { border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
.nav-acc > summary { display: flex; align-items: center; gap: 9px; padding: 11px 14px; cursor: pointer; list-style: none; border-radius: 12px; min-width: 0; }
.nav-acc > summary::-webkit-details-marker { display: none; }
.nav-acc > summary:hover { background: var(--brand-tint); }
.nav-acc[open] > summary { border-radius: 12px 12px 0 0; }
.nav-acc > summary svg { color: var(--accent); flex: 0 0 auto; }
.nav-acc-title { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.nav-count { margin-left: auto; flex: 0 0 auto; font-size: .74rem; color: var(--muted, #8a8597); }
.nav-acc > summary::after { content: '›'; flex: 0 0 auto; margin-left: 8px; color: var(--muted, #8a8597); font-size: 1.15rem; line-height: 1; transition: transform .15s; }
.nav-prod > summary::after { margin-left: auto; }
.nav-acc[open] > summary::after { transform: rotate(90deg); }
.nav-acc-body { padding: 2px 14px 13px; display: flex; flex-direction: column; gap: 10px; }
.nav-prod > summary { padding: 9px 12px; }
.nav-prod .nav-acc-body { padding: 2px 12px 12px; }
.nav-sect { display: flex; flex-direction: column; gap: 4px; }
.nav-sect-h { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: var(--muted, #8a8597); }
@media (max-width: 600px) {
  .nav-chip { padding: 7px 11px; }                /* bigger tap targets */
  .nav-acc-body, .nav-prod .nav-acc-body { padding-left: 10px; padding-right: 10px; }
  .nav-filter-wrap { max-width: none; }
}
/* Clash alert banner (dashboard Your schedule) */
.clash-alert { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; padding: 10px 14px; margin-bottom: 12px; border-radius: 10px; background: color-mix(in srgb, #d97706 12%, var(--surface, #fff)); border: 1px solid color-mix(in srgb, #d97706 35%, var(--line)); font-size: .9rem; }
.clash-alert.clash-done { background: color-mix(in srgb, #15803d 10%, var(--surface, #fff)); border-color: color-mix(in srgb, #15803d 30%, var(--line)); }
/* Clash-day per-line availability toggles (dashboard Your schedule) */
.av-part { background: color-mix(in srgb, #d97706 16%, var(--surface, #fff)); color: #b45309; }
.avail-toggle.av-off { color: #b91c1c; border-color: color-mix(in srgb, #b91c1c 35%, var(--line)); }
.cal-ev-row { display: flex; gap: 8px; align-items: center; }
.cal-ev-row .cal-ev { flex: 1; min-width: 0; }
.cal-ev-row form { flex: 0 0 auto; }
.cal-ev.is-off { opacity: .55; }
@media (max-width: 600px) { .cal-ev-row { flex-wrap: wrap; } .cal-ev-row form { margin-left: auto; } }
/* Show-password eye toggle (input.pw-reveal, enhanced in layout.php) */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 42px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; cursor: pointer; color: var(--muted, #8a8597); padding: 8px; display: flex; border-radius: 8px; }
.pw-eye:hover { color: var(--brand); }
/* Avatars + pronouns (#54) — round photo or initials circle, muted pronouns */
.avtr { border-radius: 50%; object-fit: cover; vertical-align: middle; flex: 0 0 auto; }
.avtr-blank { display: inline-flex; align-items: center; justify-content: center; background: var(--line); color: var(--muted); font-weight: 600; letter-spacing: .02em; user-select: none; }
.avtr-pron { color: var(--muted); font-size: .82em; font-weight: 400; }
/* PWA install banner (#119) — mobile only, sits above the tab bar */
.pwa-install { display: none; }
@media (max-width: 760px) {
  .pwa-install { position: fixed; left: 10px; right: 10px; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 59;
    display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px;
    background: var(--surface, #fff); border: 1px solid var(--line); box-shadow: 0 4px 16px rgba(0,0,0,.14); font-size: .86rem; }
  .pwa-install[hidden] { display: none; }
  .pwa-install-txt { flex: 1; min-width: 0; }
  .pwa-glyph { display: inline-block; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-weight: 700; }
  .pwa-install-x { border: 0; background: none; font-size: 1.2rem; color: var(--muted, #8a8597); cursor: pointer; padding: 2px 6px; }
}
/* Slim mobile top nav (Q4): bottom tab bar covers these, so hide them ≤760px,
   leaving logo+name · theme picker · logout-as-icon on one line. */
@media (max-width: 760px) {
  .hdr-sm-hide { display: none !important; }
  /* One slim row: logo+name (left) · theme picker · logout icon (right). */
  .header-inner { flex-wrap: nowrap; min-height: 0; gap: 8px; padding-top: 7px; padding-bottom: 7px; }
  .brand { flex: 0 1 auto; min-width: 0; }
  .header-tools { gap: 8px; flex-wrap: nowrap; }
  .main-nav { flex-wrap: nowrap; gap: 8px; margin-left: 0; flex: 0 0 auto; }
  .main-nav .logout-link { padding: 6px 9px; }
  .main-nav .logout-link .logout-label { display: none; }
}
@media (min-width: 761px) { .main-nav .logout-link svg { display: none; } }
/* Mobile bottom tab bar (#119 PWA shell) — hidden on desktop */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; display: flex;
    background: var(--surface, #fff); border-top: 1px solid var(--line);
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); }
  .tabbar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 6px 2px; border-radius: 10px; text-decoration: none; color: var(--muted, #8a8597);
    font-size: .68rem; font-weight: 600; letter-spacing: .01em; }
  .tabbar-item svg { color: currentColor; }
  .tabbar-active { color: var(--brand); }
  .tabbar-item:active { background: var(--brand-tint); }
  body:has(.tabbar) { padding-bottom: 64px; }     /* content clears the fixed bar */
  body:has(.tabbar) .site-footer { margin-bottom: 8px; }
}
/* Settings section nav — sidebar on desktop, <details> burger on mobile (#115) */
.settings-layout { display: flex; gap: 22px; align-items: flex-start; }
.settings-nav { flex: 0 0 210px; }
.settings-content { flex: 1; min-width: 0; }
.settings-nav > summary { display: none; }
.settings-nav-body { display: flex; flex-direction: column; gap: 2px; }
.settings-nav-h { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #8a8597); margin: 12px 0 4px; }
.settings-nav-link { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; text-decoration: none; color: inherit; font-size: .92rem; }
.settings-nav-link svg { flex: 0 0 auto; color: var(--accent); }
.settings-nav-link:hover { background: var(--brand-tint); }
.settings-nav-link.on { background: var(--brand-tint); color: var(--accent); font-weight: 700; }
@media (max-width: 760px) {
  .settings-layout { display: block; }
  .settings-nav { margin-bottom: 14px; }
  .settings-nav > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; list-style: none; }
  .settings-nav > summary::-webkit-details-marker { display: none; }
  .settings-nav-body { display: none; }
  .settings-nav[open] .settings-nav-body { display: flex; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
}
/* FAQ accordion (#113) */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item > summary { cursor: pointer; font-weight: 700; padding: 11px 0; list-style: none; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::before { content: "+"; color: var(--accent); font-weight: 800; margin-right: 8px; }
.faq-item[open] > summary::before { content: "\2212"; }
.faq-item > p { margin: 0 0 14px; color: var(--ink, inherit); }
/* Top-level Cast/Crew/People switcher: bigger + clearly above the sub-tabs */
.viewtoggle.area-switch { border-width: 2px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.viewtoggle.area-switch a { padding: 11px 24px; font-size: 1.02rem; font-weight: 700; }
/* one-line "also called" footer under a group (#111 chosen layout) */
.cast-alsocalled { margin: 2px 0 2px; padding: 6px 14px; font-size: .82rem; color: var(--muted); }
.cast-alsocalled strong { color: var(--ink); font-weight: 600; }
.cc-grp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--line); }
.cc-grp-row .cc-grp-name { flex: 1 1 120px; min-width: 0; }
.cc-grp-row .cc-grp-ctl { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.cast-sub { margin: 8px 0 4px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.roster-called { border-style: dashed; opacity: .92; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tile-body { padding: 20px; flex: 1; }
.tile-accent { height: 7px; background: var(--app-grad); }
.tile h3 a { color: var(--ink); }
.tile h3 a:hover { color: var(--brand); text-decoration: none; }
.stat { font-family: var(--display); font-size: 2.2rem; font-weight: 600; line-height: 1; color: var(--brand); }

/* Badges */
.badge { display: inline-block; border-radius: 999px; padding: 3px 11px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); vertical-align: middle; }
.badge-brand { background: var(--brand-tint); color: var(--brand); border-color: transparent; }
.badge-ok { color: var(--ok); background: #e7f6ed; border-color: transparent; }
a.badge { cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 3px; }
a.badge:hover { text-decoration: none; background: var(--brand-tint); color: var(--brand); border-color: transparent; }
/* On accent-tinted entries (songs/scenes), tags adopt the entry's accent.
   badge-brand already reads --brand/--brand-tint, which the card overrides;
   this also tints clickable link-tags (e.g. songs in a scene). */
.accent-tags a.badge { background: var(--brand-tint); color: var(--brand); border-color: transparent; }
h1 > .ic:first-child, h2 > .ic:first-child { color: var(--brand); vertical-align: -0.15em; margin-right: 4px; }
.empty .big .ic { color: var(--brand); opacity: .8; }
summary > .ic:first-child { color: var(--brand); margin-right: 4px; }
.badge-warn { color: var(--warn); background: #fdf2e2; border-color: transparent; }

/* Forms */
form.stack { display: grid; gap: 18px; max-width: 560px; }
label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--ink); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number],
input[type=tel], input[type=search], input[type=url], input[type=time],
select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 1rem; font-family: var(--ui); background: var(--surface); color: var(--ink);
}
input::placeholder, textarea::placeholder { color: #9b97ad; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-tint); }
textarea { min-height: 120px; resize: vertical; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 180px; }
.field-hint { font-weight: 400; color: var(--muted); font-size: .85rem; }

/* Flash */
.flash { padding: 13px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .95rem; font-weight: 500; border: 1px solid transparent; }
.flash-info    { background: #eaf1fe; color: #1e4fa3; }
.flash-success { background: #e7f6ed; color: var(--ok); }
.flash-error   { background: #fdeaea; color: var(--err); }
.flash-warn    { background: #fdf3e2; color: var(--warn); }

/* Tables */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: .95rem; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
th { background: var(--surface-2); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }

/* Breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; margin-bottom: 16px; }
.crumbs a { color: var(--muted); font-weight: 500; }
.crumbs a:hover { color: var(--brand); }
.crumbs span { color: #c9c3da; }
.crumb-current { color: var(--ink); font-weight: 600; }

/* Back-navigation buttons */
.backbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.backbar .ic { vertical-align: -0.18em; }

/* Empty states */
.empty { text-align: center; padding: 60px 22px; color: var(--muted); background: var(--surface); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.empty .big { font-size: 2.6rem; margin-bottom: 10px; }

/* Segmented control - part selector */
.segmented { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 18px; }
.segmented button {
  background: var(--surface); border: 1.5px solid var(--line); color: var(--ink);
  border-radius: 999px; padding: 10px 20px; font-size: .95rem; font-weight: 600; font-family: var(--ui); cursor: pointer; box-shadow: var(--shadow-sm);
}
.segmented button:hover { border-color: var(--brand); color: var(--brand); }
.segmented button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: var(--shadow); }

/* Audio player */
.player {
  position: sticky; bottom: 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 20px; margin-top: 20px; z-index: 20;
}
.player .now { font-family: var(--display); font-weight: 600; font-size: 1.15rem; margin-bottom: 14px; }
.player .transport { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.player .big-play { width: 60px; height: 60px; border-radius: 50%; font-size: 1.4rem; flex: 0 0 auto; background: var(--app-grad); border: 0; box-shadow: 0 6px 18px rgba(124,58,237,.4); }
.player .big-play:hover { transform: scale(1.05); }
.scrubber { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 200px; }
.scrubber input[type=range] { flex: 1; accent-color: var(--brand); height: 6px; }
.time { font-variant-numeric: tabular-nums; font-size: .85rem; color: var(--muted); min-width: 44px; font-weight: 500; }
.player-tools { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 14px; align-items: center; }
.chip { background: var(--surface-2); border: 1.5px solid var(--line); border-radius: 999px; padding: 7px 14px; font-size: .82rem; font-weight: 600; cursor: pointer; color: var(--ink); display: inline-flex; gap: 6px; align-items: center; }
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand-tint); color: var(--brand); border-color: var(--brand); }
.speed-group { display: inline-flex; gap: 5px; }

.part-row.is-active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

/* Lyrics + sheet music */
.lyrics { white-space: pre-wrap; font-size: 1.08rem; line-height: 1.75; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.sheet-frame { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); }
.sheet-img { max-width: 100%; border: 1px solid var(--line); border-radius: var(--radius); }

/* Recorder */
.recorder { text-align: center; padding: 26px; border: 2px dashed var(--line); border-radius: var(--radius); background: linear-gradient(var(--surface), var(--surface-2)); }
.rec-dot { color: var(--err); }
.timer { font-family: var(--display); font-variant-numeric: tabular-nums; font-size: 1.9rem; font-weight: 600; margin: 10px 0; }
.waveform { width: 100%; height: 56px; display: block; margin: 6px 0; }

/* Schedule - toolbar, compact list, calendar */
.sched-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.viewtoggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--surface); }
.viewtoggle a { padding: 7px 16px; font-size: .85rem; color: var(--ink); font-weight: 600; }
.viewtoggle a:hover { text-decoration: none; background: var(--surface-2); }
.viewtoggle a.on { background: var(--brand); color: var(--brand-ink); }

.sdate { font-family: var(--display); font-weight: 600; font-size: .98rem; margin: 16px 0 2px; }
.sdate.past { color: var(--muted); font-weight: 500; }
.srow { display: flex; align-items: baseline; gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.srow .stype { font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; flex: 0 0 100px; width: 100px; text-align: center; box-sizing: border-box; }
.srow .stime { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .8rem; min-width: 52px; flex: 0 0 auto; }
.srow .sbody { flex: 1; min-width: 0; }
.srow .sbody strong { font-weight: 600; font-size: .94rem; }
.srow .smeta { display: block; color: var(--muted); font-size: .8rem; }
.srow .sact { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.srow .ical { text-decoration: none; font-size: 1rem; opacity: .8; }
.srow .ical:hover { opacity: 1; }
.srow .sedit { display: inline; }
.srow .sedit > summary { cursor: pointer; list-style: none; opacity: .7; font-size: .9rem; }
.srow .sedit > summary::-webkit-details-marker { display: none; }
.srow .xbtn { border: 0; background: none; cursor: pointer; font-size: .9rem; opacity: .7; padding: 0; }
.srow .xbtn:hover, .srow .sedit > summary:hover { opacity: 1; }
.srow .away-note { color: var(--warn); }
.srow .away-note .ic { vertical-align: -0.14em; }
/* #28 live scheduling clash warning */
.reh-away { background: #fdf2e2; border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); color: var(--warn); border-radius: 10px; padding: 9px 12px; font-size: .85rem; }
.reh-away strong { display: block; margin-bottom: 4px; }
.reh-away ul { margin: 0 0 4px; padding-left: 18px; }
.reh-away li { margin: 1px 0; }
.reh-away .muted { color: color-mix(in srgb, var(--warn) 70%, var(--muted)); }
.reh-away .field-hint { color: color-mix(in srgb, var(--warn) 60%, var(--muted)); }
:root[data-theme="dusk"] .reh-away { background: #3a2e1c; color: #f0c478; }

/* #68 attendance register */
.att-tally .badge { margin-left: 4px; }
.att-b-absent { color: var(--err); background: #fdeaea; border-color: transparent; }
.att-list { display: flex; flex-direction: column; }
.att-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.att-row:last-child { border-bottom: 0; }
.att-who { flex: 1 1 180px; min-width: 0; }
.att-who strong { font-weight: 600; }
.att-roles { font-size: .82rem; margin-left: 6px; }
.att-away { margin-left: 6px; background: var(--line); color: var(--muted); border-color: transparent; }
.att-pick { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.att-opt { position: relative; font-size: .8rem; font-weight: 600; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; user-select: none; background: var(--surface); color: var(--muted); }
.att-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.att-opt:hover { border-color: var(--brand); }
.att-opt.att-present.on { background: #e7f6ed; color: var(--ok); border-color: transparent; }
.att-opt.att-late.on    { background: #fdf2e2; color: var(--warn); border-color: transparent; }
.att-opt.att-absent.on  { background: #fdeaea; color: var(--err); border-color: transparent; }
.att-opt.att-excused.on { background: #efe9fb; color: var(--brand); border-color: transparent; }
.att-opt.att-none.on    { background: var(--line); color: var(--ink); border-color: transparent; }
.att-note { flex: 1 1 160px; min-width: 120px; }
@media (max-width: 560px) { .att-note { flex: 1 1 100%; } }
:root[data-theme="dusk"] .att-opt.att-present.on { background: #1f3a2a; color: #8fe0ad; }
:root[data-theme="dusk"] .att-opt.att-late.on    { background: #3a2e1c; color: #f0c478; }
:root[data-theme="dusk"] .att-opt.att-absent.on, :root[data-theme="dusk"] .att-b-absent { background: #3a1f1f; color: #f0a0a0; }

.calnav { margin: 8px 0 10px; }
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.caldow { text-align: center; font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.calcell { min-height: 76px; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: var(--surface); overflow: hidden; }
.calcell.empty { background: transparent; border: 0; }
.calcell.past { background: var(--surface-2); opacity: .55; }
.calcell.today { border: 2px solid var(--brand); box-shadow: 0 0 0 2px var(--brand-tint); }
.caldate { font-weight: 700; color: var(--muted); font-size: .8rem; margin-bottom: 2px; }
.calcell.today .caldate { color: var(--brand); }
.calev { display: block; border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; font-size: .66rem; font-weight: 600; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.calev:hover { text-decoration: none; filter: brightness(.97); }
@media (max-width: 560px) {
  .calcell { min-height: 58px; padding: 2px; }
  .caldate { font-size: .72rem; }
  .calev { font-size: 0; padding: 3px; margin-bottom: 2px; border-radius: 3px; } /* dots on mobile */
}

/* Rehearsal images gallery */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.gal-item { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.gal-img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; cursor: zoom-in; background: var(--surface-2); }
.gal-item figcaption { padding: 8px 10px; font-size: .85rem; display: flex; flex-direction: column; gap: 4px; }
.lightbox { position: fixed; inset: 0; background: rgba(15,10,20,.88); display: grid; place-items: center; z-index: 100; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 95vw; max-height: 90vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lb-close { position: fixed; top: 16px; right: 20px; font-size: 2rem; line-height: 1; color: #fff; background: none; border: 0; cursor: pointer; }

/* Modal popup (event details, etc.) */
.modal { position: fixed; inset: 0; background: rgba(15,10,20,.6); display: grid; place-items: center; z-index: 120; padding: 20px; }
.modal[hidden] { display: none; }
.modal-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-width: 460px; width: 100%; padding: 22px 24px; position: relative; max-height: 88vh; overflow: auto; }
.modal-x { position: absolute; top: 10px; right: 12px; font-size: 1.6rem; line-height: 1; color: var(--muted); background: none; border: 0; cursor: pointer; }
.modal-x:hover { color: var(--ink); }
.evtype { display: inline-block; border-radius: 999px; padding: 3px 12px; font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.evtitle { margin: 10px 0 14px; }
.evrow { display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.evrow .evlabel { flex: 0 0 70px; color: var(--muted); font-weight: 600; }
.evactions { margin-top: 16px; }

/* Accent swatch picker */
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches .swatch { position: relative; cursor: pointer; font-weight: 400; }
.swatches .swatch input { position: absolute; opacity: 0; width: 0; height: 0; }
.swatches .swatch .dot { display: block; width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--surface), 0 0 0 1.5px var(--line); }
.swatches .swatch input:checked + .dot { box-shadow: inset 0 0 0 2px var(--surface), 0 0 0 2.5px var(--ink); }
.swatches .swatch-inherit { display: inline-flex; align-items: center; padding: 4px 12px; border: 1.5px solid var(--line); border-radius: 999px; font-size: .85rem; color: var(--muted); }
.swatches .swatch-inherit:has(input:checked) { border-color: var(--ink); color: var(--ink); font-weight: 600; }

/* Video library scene sub-headers */
.vid-subhead { font-family: var(--ui); font-weight: 700; font-size: .92rem; letter-spacing: .01em; color: var(--ink); margin: 16px 0 10px; }
.vid-subhead.muted { font-weight: 600; color: var(--muted); }
.vid-subhead .ic { vertical-align: -0.16em; }

/* Collapsible act sections (music / scenes / videos) */
.act-section { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.act-section > .act-summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 15px 18px;
  font-family: var(--display); font-weight: 700; font-size: 1.25rem; color: var(--ink);
  border-left: 5px solid var(--act-accent, var(--brand));
  background: linear-gradient(90deg, color-mix(in srgb, var(--act-accent, var(--brand)) 10%, var(--surface)), var(--surface)); }
.act-section > .act-summary::-webkit-details-marker { display: none; }
.act-section > .act-summary::after { content: ''; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
.act-section[open] > .act-summary::after { transform: rotate(45deg); }
.act-summary .act-count { font-family: var(--ui); font-weight: 600; font-size: .8rem; color: var(--muted); }
.act-body { padding: 14px 16px; }
.act-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); font-size: .85rem; color: var(--muted); }
.act-tools form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.act-tools .swatches .swatch .dot { width: 20px; height: 20px; }
.act-tools .swatch-inherit { padding: 2px 8px; font-size: .78rem; }

/* Video tiles - larger landscape cards with an inline player */
.vgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.vcard { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); border-left: 4px solid var(--brand); display: flex; flex-direction: column; }
.vplayer { width: 100%; aspect-ratio: 16 / 9; background: #000; object-fit: contain; display: block; }
.vembed { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
.vembed iframe { width: 100%; height: 100%; border: 0; display: block; }
.vcard .vmeta { padding: 10px 13px; }
.vcard .vmeta .badge { font-size: .64rem; padding: 2px 8px; }
.vcard .vmeta .vtitle { font-weight: 600; font-size: .92rem; display: block; margin: 5px 0 2px; }

/* Scene cards - compact */
.scene-card { padding: 12px 14px; }
.scene-card .sc-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.scene-card .sc-meta { font-size: .82rem; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
/* Tell role tags (cast = blue) and song tags (music = purple) apart at a glance. The
   .sc-meta scope beats the generic .accent-tags a.badge rule that would otherwise repaint
   songs in the scene accent. Colour text + tinted fill; falls back to coloured text on the
   default grey chip if color-mix() is unsupported. */
.sc-meta .badge-cast { color: var(--c-cast); background: color-mix(in srgb, var(--c-cast) 12%, var(--surface)); border-color: transparent; }
.sc-meta a.badge-song { color: var(--c-music); background: color-mix(in srgb, var(--c-music) 12%, var(--surface)); border-color: transparent; }
.sc-lbl-cast { color: var(--c-cast); } .sc-lbl-song { color: var(--c-music); }
/* Marketing / "What onsombul does" page — themed colour bands */
.feat-hero { padding-bottom: 8px; }
.feat-eyebrow { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); margin: 0 0 -2px; }
.feat-band { --band: var(--brand); border-radius: var(--radius); padding: 26px 24px; margin-top: 16px;
  background: color-mix(in srgb, var(--band) 7%, var(--surface)); border: 1px solid color-mix(in srgb, var(--band) 14%, var(--line)); }
.feat-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--band); margin: 0; }
.feat-band > h2 { font-size: clamp(1.35rem, 3.4vw, 1.85rem); margin: 4px 0 4px; line-height: 1.15; }
.feat-band > .feat-hook { font-size: 1.02rem; margin: 0 0 18px; max-width: 60ch; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: 14px; }
.feat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.feat-card .feature-chip { margin-bottom: 10px; }
.feat-card h3 { margin: 0 0 5px; font-size: 1.04rem; }
.feat-card p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.55; }
.feat-rights { margin-top: 18px; background: var(--brand-tint); border: 0; }
.sc-lbl-cast .ic, .sc-lbl-song .ic { vertical-align: -0.12em; }
.scene-imgs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.scene-imgs img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; cursor: zoom-in; border: 1px solid var(--line); }
.scene-imgs .si-wrap { position: relative; }
.scene-imgs .si-del { position: absolute; top: -6px; right: -6px; background: var(--surface); border: 1px solid var(--line); border-radius: 50%; width: 20px; height: 20px; line-height: 1; cursor: pointer; color: var(--err); font-size: .8rem; padding: 0; }

/* Scene detail: full synopsis, entrances/exits, welfare flags (Dracula review) */
.scene-synopsis { white-space: pre-wrap; line-height: 1.55; font-size: .9rem; color: var(--ink); }
.sc-block > summary, details.mt > summary { cursor: pointer; }
.sc-block > summary { font-size: .82rem; color: var(--muted); }
.block-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.block-table th { text-align: left; font-weight: 600; white-space: nowrap; vertical-align: top; padding: 3px 10px 3px 0; width: 1%; }
.block-table td { padding: 3px 0; vertical-align: top; }
.block-table tr + tr th, .block-table tr + tr td { border-top: 1px solid var(--line); }
.ee-label { display: inline-block; font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); width: 26px; }
.block-edit { width: 100%; border-collapse: collapse; }
.block-edit th { text-align: left; font-weight: 600; font-size: .85rem; white-space: nowrap; padding: 3px 10px 3px 0; vertical-align: middle; }
.block-edit td { padding: 3px 4px 3px 0; }
.block-edit input { width: 100%; font-size: .85rem; padding: 5px 8px; }
.wa-flags { display: flex; flex-direction: column; gap: 6px; }
.wa-flag { border: 1px solid var(--line); border-left: 4px solid var(--fc, var(--warn)); border-radius: 8px; padding: 7px 10px; background: var(--surface); }
.wa-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wa-head { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--fc, var(--warn)); }
.wa-head .ic { vertical-align: -0.12em; }
.wa-lock { font-size: .68rem; font-weight: 600; color: var(--err); display: inline-flex; align-items: center; gap: 3px; }
.wa-del { margin-left: auto; }
.wa-note { font-size: .88rem; line-height: 1.45; margin-top: 2px; color: var(--ink); }
.wa-resp { font-size: .76rem; color: var(--muted); margin-top: 2px; }

/* Scenes stage-action: section headers, script media, entrance/exit moves */
.sc-block-h { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 12px; display: flex; align-items: center; gap: 5px; }
.sc-block-h .ic { vertical-align: -0.12em; }
.sc-media-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: .9rem; border-bottom: 1px solid var(--line); }
.sc-media-row:last-child { border-bottom: 0; }
.sc-media-row details { flex: 1; }
.sc-media-row summary { cursor: pointer; }
.move-row { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.move-row:last-child { border-bottom: 0; }
.move-type { flex: 0 0 auto; font-size: .64rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; letter-spacing: .04em; }
.move-enter { background: #e7f6ed; color: var(--ok); }
.move-exit  { background: #fdeaea; color: var(--err); }
.move-body { flex: 1; min-width: 0; font-size: .9rem; }
.move-act { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; }
.move-act .xbtn { border: 0; background: none; cursor: pointer; opacity: .65; padding: 0 2px; font-size: .95rem; }
.move-act .xbtn:hover { opacity: 1; }
.move-act .sedit > summary { list-style: none; cursor: pointer; opacity: .65; }
.move-act .sedit > summary::-webkit-details-marker { display: none; }
:root[data-theme="dusk"] .move-enter { background: #1f3a2a; color: #8fe0ad; }
:root[data-theme="dusk"] .move-exit  { background: #3a1f1f; color: #f0a0a0; }
/* Technical: cue rows + mic plot */
.cue-dept-h { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.cue-note { font-size: .86rem; line-height: 1.45; background: var(--brand-tint); border-radius: 8px; padding: 6px 10px; margin: 4px 0; white-space: pre-wrap; }
.cue-note-edit > summary { list-style: none; } .cue-note-edit > summary::-webkit-details-marker { display: none; }
.cue-row { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.cue-row:last-child { border-bottom: 0; }
.cue-dept { flex: 0 0 auto; font-size: .62rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.cue-num { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .82rem; min-width: 40px; }
.cue-seq { flex: 0 0 auto; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .72rem; padding: 1px 7px; border-radius: 999px; background: var(--ink); color: var(--bg); white-space: nowrap; }
.cue-page { font-size: .72rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.aa-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px solid var(--line); }
.aa-row:last-child { border-bottom: 0; }
.aa-main { flex: 1; min-width: 160px; }
.aa-row audio { flex: 0 0 auto; max-width: 260px; }
.aa-act { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; }
.aa-act .sedit > summary { list-style: none; cursor: pointer; opacity: .7; } .aa-act .sedit > summary::-webkit-details-marker { display: none; }
.cue-fx { flex: 0 0 auto; display: inline-flex; gap: 4px; }
.cue-fx audio { height: 30px; max-width: 160px; }
/* Roadmap ("Things we're working on") */
.rm-h { margin: 22px 0 8px; font-size: 1.05rem; }
.rm-feature { display: flex; align-items: flex-start; gap: 14px; }
.rm-vote { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 46px; }
.rm-arrow { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; width: 38px; height: 28px; cursor: pointer; font-size: .9rem; line-height: 1; color: var(--muted); }
.rm-arrow:hover { border-color: var(--brand, #7c3aed); color: var(--brand, #7c3aed); }
.rm-arrow.is-on { background: var(--brand, #7c3aed); border-color: var(--brand, #7c3aed); color: #fff; }
.rm-arrow.is-on.down { background: #b3261e; border-color: #b3261e; }
.rm-score { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1rem; }
.rm-body { flex: 1; min-width: 0; }
/* Rehearsal tracklist rows */
.tl-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 7px 8px; cursor: pointer; font: inherit; color: inherit; }
.tl-row:hover { background: var(--brand-tint, rgba(0,0,0,.04)); }
.tl-row.is-active { background: var(--brand-tint, rgba(124,58,237,.1)); box-shadow: inset 3px 0 0 var(--brand, #7c3aed); }
.tl-play { flex: 0 0 auto; width: 20px; text-align: center; opacity: .8; }
.tl-label { flex: 1; min-width: 0; }
/* FX soundboard */
.sb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sb-pad { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; font: inherit; color: inherit; }
.sb-pad:hover { border-color: var(--brand, #7c3aed); }
.sb-pad.is-playing { border-color: var(--brand, #7c3aed); box-shadow: 0 0 0 2px var(--brand-tint, rgba(124,58,237,.25)); }
.sb-pad strong { font-size: .95rem; } .sb-pad .sb-cat { font-size: .72rem; color: var(--muted); }
.ll-scene > summary { cursor: pointer; }
.cue-body { flex: 1; min-width: 0; font-size: .9rem; }
.cue-meta { display: block; color: var(--muted); font-size: .8rem; }
.cue-act { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; }
.cue-act .xbtn { border: 0; background: none; cursor: pointer; opacity: .65; padding: 0 2px; font-size: .95rem; }
.cue-act .xbtn:hover { opacity: 1; } .cue-act .xbtn:disabled { opacity: .25; cursor: default; }
.cue-act .sedit > summary { list-style: none; cursor: pointer; opacity: .65; } .cue-act .sedit > summary::-webkit-details-marker { display: none; }
.mic-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.mic-table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 4px 10px 4px 0; }
.mic-table td { padding: 5px 10px 5px 0; border-top: 1px solid var(--line); vertical-align: top; }
.mic-table .xbtn { border: 0; background: none; cursor: pointer; opacity: .65; font-size: .95rem; padding: 0 2px; } .mic-table .xbtn:hover { opacity: 1; }
/* Print: a clean cue / scene sheet - hide chrome and editing controls */
@media print {
  header, .crumbs, .back-bar, .viewtoggle, .sched-toolbar, .area-filter, .flash,
  .cue-act, .cue-note-edit, .si-del, .btn, .scene-card > details, .act-tools,
  details.card > summary { display: none !important; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  details.act-section > .act-body { display: block !important; }
  a { color: #000; text-decoration: none; }
}

/* Stage-direction transition note between scenes - distinct but clean & readable */
.transition { border: 1px solid var(--line); border-left: 4px solid color-mix(in srgb, var(--brand) 60%, var(--line)); border-radius: 10px;
  padding: 11px 15px; margin: 8px 0 8px 22px; background: var(--surface-2); color: var(--ink); }
.transition .tr-label { display: inline-flex; align-items: center; gap: 5px; font-family: var(--ui); font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--brand); margin-bottom: 5px; }
.transition .tr-label .ic { vertical-align: -0.12em; }
.transition .tr-body { white-space: pre-wrap; line-height: 1.5; font-size: .92rem; color: var(--ink); }

/* Clickable schedule rows / calendar events */
.srow[data-ev] { cursor: pointer; }
.srow[data-ev]:hover { background: var(--brand-tint); }

/* Dropzone */
.dropzone { border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); background: var(--surface); cursor: pointer; }
.dropzone.drag { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); }

/* Hero (landing) */
.hero { position: relative; text-align: center; padding: 60px 26px; border-radius: 26px; overflow: hidden;
  background: var(--hero-grad); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero h1 { font-size: 2.6rem; margin: 6px 0 4px; }
.hero .emoji { font-size: 3rem; }
.hero-brand { display: inline-flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.hero-wordmark { font-family: var(--display); font-size: 2.5rem; line-height: 1; color: var(--ink); }
.hero .lead { max-width: 620px; margin: 10px auto 24px; }
/* Compact hero for utility pages (enquiry, privacy, feedback) - less vertical space */
.hero.hero-sm { padding: 30px 26px; }
.hero-sm h1 { font-size: 2rem; }
.hero-sm .hero-brand { margin-bottom: 12px; }
.hero-sm .hero-wordmark { font-size: 1.9rem; }

/* Logged-out landing: colour-coded feature tiles + screenshot lightbox */
.feature-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.feature-card {
  text-align: left; font: inherit; color: var(--ink); cursor: pointer; width: 100%;
  border-left: 4px solid var(--tile);
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-card:focus-visible { outline: 2px solid var(--tile); outline-offset: 2px; }
.feature-chip {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 13px;
  background: color-mix(in srgb, var(--tile) 15%, var(--surface));
  color: var(--tile); margin-bottom: 6px;
}
.feature-card h3 { margin: 2px 0 0; }
.feature-card > p { margin: 0; }
.feature-see {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; font-weight: 600; color: var(--tile);
  background: color-mix(in srgb, var(--tile) 12%, var(--surface));
  padding: 5px 11px; border-radius: 999px;
}
.modal-wide { max-width: 920px; }
.shot-img { max-width: 100%; max-height: 72vh; width: auto; height: auto; margin: 0 auto; border-radius: 12px; border: 1px solid var(--line); display: block; }

/* Utility */
.stack-list > * + * { margin-top: 12px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.inline-form { display: inline; margin: 0; }
.right { text-align: right; }
.mt { margin-top: 18px; } .mb { margin-bottom: 18px; }
details > summary { cursor: pointer; font-weight: 600; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; padding: 26px 0; margin-top: 30px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; }
.footer-legal { margin: 0; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--brand); }
.field-error { display: block; color: var(--err); font-size: .85rem; margin-top: 5px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.radio-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.radio-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 16px; background: var(--surface); }
.radio-pill:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-strong); }
.radio-pill input { accent-color: var(--brand); margin: 0; }
/* ---- Dashboard ("My societies") ---- */
.dash-h { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; margin: 28px 0 12px; }
.dash-h .ic { color: var(--brand); }
.quick-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.quick-tile { flex: 0 1 340px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 18px; margin: 0; }
.quick-tile:hover { text-decoration: none; }
.quick-tile > span:last-child { display: flex; flex-direction: column; align-items: center; line-height: 1.35; }
.quick-tile .muted { font-size: .85rem; }
.quick-ic { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px;
  background: color-mix(in srgb, var(--qc, var(--brand)) 15%, var(--surface)); color: var(--qc, var(--brand)); flex: none; }
/* upcoming calls - grouped by day, then society/production */
.cal-day { padding: 12px 0; border-top: 1px solid var(--line); }
.cal-day:first-of-type { border-top: 0; padding-top: 0; }
.cal-day-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cal-date { font-weight: 700; font-family: var(--display); font-size: 1.05rem; }
.cal-group-head { font-size: .82rem; font-weight: 600; color: var(--muted); margin: 8px 0 4px; padding-left: 9px; border-left: 3px solid var(--pc, var(--brand)); }
.cal-ev { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 10px; color: var(--ink); }
.cal-ev:hover { text-decoration: none; background: var(--brand-soft); }
.cal-ev.is-clash { background: color-mix(in srgb, var(--err) 9%, transparent); }
.cal-ev .stype { flex: 0 0 100px; width: 100px; text-align: center; white-space: nowrap; box-sizing: border-box; }
.cal-time { flex: 0 0 auto; min-width: 52px; font-weight: 600; font-size: .8rem; font-variant-numeric: tabular-nums; color: var(--muted); }
.cal-ev-title { flex: 1; min-width: 0; }
.stype { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; }
/* per-day availability status tag + toggle */
.cal-avail { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.av-tag { font-size: .72rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; text-transform: uppercase; letter-spacing: .02em; }
.av-yes { background: color-mix(in srgb, #15803d 16%, transparent); color: #15803d; }
.av-no  { background: color-mix(in srgb, var(--err) 15%, transparent); color: var(--err); }
.avail-toggle { background: none; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; color: var(--muted);
  font: inherit; font-size: .78rem; padding: 4px 12px; }
.avail-toggle:hover { border-color: var(--brand); color: var(--brand); }
/* star toggle */
.star-form { line-height: 0; }
.star-btn { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 4px; border-radius: 8px; line-height: 0; }
.star-btn svg { fill: none; }
.star-btn:hover { color: #f59e0b; background: color-mix(in srgb, #f59e0b 14%, transparent); }
.star-btn.is-fav { color: #f59e0b; }
.star-btn.is-fav svg { fill: #f59e0b; }
/* societies + productions */
.society-block .soc-head { display: inline-flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.soc-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.soc-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.prod-list { display: flex; flex-direction: column; gap: 8px; }
.prod-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 11px 14px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--pc, var(--brand)); }
.prod-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.prod-roles { font-size: .82rem; }
.prod-actions { display: flex; align-items: center; gap: 6px; }
.fav-tile .tile-body { gap: 10px; }
.past-block summary { display: flex; align-items: center; gap: 8px; }

/* ---- Society page header + admin action cards ---- */
.soc-header { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.soc-accent { width: 16px; height: 16px; border-radius: 5px; flex: none; }
.soc-meta { margin: 2px 0 0; font-size: .9rem; }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; align-items: start; margin-bottom: 22px; }
.admin-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease; }
a.admin-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.admin-card-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.admin-card-wrap .admin-card { border: 0; box-shadow: none; background: none; }
.admin-summary { cursor: pointer; list-style: none; }
.admin-summary::-webkit-details-marker { display: none; }
.admin-card-wrap[open] .admin-summary { border-bottom: 1px solid var(--line); }
.admin-form { padding: 16px 18px; }
.a-ic { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: color-mix(in srgb, var(--ac, var(--brand)) 15%, var(--surface)); color: var(--ac, var(--brand)); }
.a-text { display: flex; flex-direction: column; line-height: 1.3; }
.a-text .muted { font-size: .85rem; }

/* ---- Cast availability grid ---- */
.avail-filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.af-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.af-roles { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rf-label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.chip-check { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 12px; font-size: .82rem; cursor: pointer; background: var(--surface); user-select: none; line-height: 1.2; }
.chip-check input { margin: 0; accent-color: var(--brand); }
.chip-check:has(input:checked), .chip-check.rf-on { border-color: var(--brand); background: var(--brand-tint); color: var(--brand-strong); }
.chip-crew:has(input:checked) { border-color: var(--c-cast); background: color-mix(in srgb, var(--c-cast) 12%, var(--surface)); color: var(--c-cast); }
.avail-legend { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: .82rem; color: var(--muted); margin: 6px 0 12px; }
.avail-legend .cell { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; font-weight: 700; margin-right: 3px; }
.grid-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.avail-grid { border-collapse: collapse; font-size: .85rem; width: max-content; min-width: 100%; }
.avail-grid th, .avail-grid td { border: 1px solid var(--line); padding: 6px 8px; text-align: center; }
.avail-grid .rowhead { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; min-width: 180px; }
.avail-grid thead .rowhead { z-index: 2; }
.rh-roles { display: block; font-size: .72rem; color: var(--muted); margin-top: 2px; }
.colhead { vertical-align: bottom; min-width: 88px; border-top: 3px solid var(--cc, var(--brand)) !important; }
.date-group { font-weight: 700; text-align: center; background: var(--surface-2); white-space: nowrap; }
/* stronger divider between days in the grid */
.avail-grid .date-group { border-left: 2px solid var(--ink); }
.avail-grid .date-start { border-left: 2px solid var(--ink) !important; }
.colhead2 { vertical-align: bottom; min-width: 78px; border-top: 3px solid var(--cc, var(--brand)) !important; }
.colhead2 .ch-type { display: block; font-weight: 600; font-size: .74rem; color: var(--ink); }
.colhead2 .ch-time { display: block; font-size: .7rem; color: var(--muted); margin: 1px 0 4px; }
.ch-date { display: block; font-weight: 700; }
.ch-type { display: block; font-size: .72rem; color: var(--muted); margin: 1px 0 4px; }
.ch-count { font-size: .68rem; }
/* by-date view: one card per day, activities grouped inside */
.avail-day { padding: 12px 14px; }
.avail-day-head { font-size: 1.05rem; border-bottom: 1px solid var(--line); padding-bottom: 7px; margin-bottom: 4px; }
.avail-act { padding: 9px 0 9px 12px; }
.avail-act + .avail-act { border-top: 1px solid var(--line); }
td.cell { font-weight: 700; min-width: 46px; }
.cell-clash { background: color-mix(in srgb, var(--err) 22%, transparent); color: var(--err); }
.cell-away  { background: color-mix(in srgb, var(--err) 8%, transparent); color: color-mix(in srgb, var(--err) 55%, var(--muted)); }
.cell-ok    { background: color-mix(in srgb, #15803d 13%, transparent); color: #15803d; }
.cell-na    { color: var(--muted); }
@media print {
  .site-header, .site-footer, .backbar, .crumbs, .avail-filters, .theme-pick { display: none !important; }
  .grid-wrap { overflow: visible; border: 0; }
  .avail-grid { font-size: .68rem; }
}

/* ---- Unavailability entries (My account) ---- */
.ua-item { border-top: 1px solid var(--line); }
.ua-item > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; }
.ua-item > summary::-webkit-details-marker { display: none; }
.ua-edit-label { font-size: .8rem; color: var(--brand); white-space: nowrap; }
.ua-panel { display: flex; flex-direction: column; gap: 14px; padding: 4px 0 16px; }
.ua-carve { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }

/* Long-form legal / content pages */
.legal { max-width: 760px; margin-inline: auto; line-height: 1.65; }
.legal h2 { font-size: 1.25rem; margin: 30px 0 8px; }
.legal h2:first-child { margin-top: 0; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 14px; padding-left: 22px; }
.legal li { margin-bottom: 7px; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  .hero h1 { font-size: 2.1rem; }
  .player { bottom: 0; border-radius: var(--radius) var(--radius) 0 0; }
  /* Stack form rows so From/To date & time fields don't squish together on mobile.
     !important overrides the inline flex:0 on individual date/time field wrappers. */
  .row > *, .af-row > * { flex: 1 1 100% !important; min-width: 0 !important; }
  /* iOS Safari gives native date/time controls an intrinsic min-width and ignores
     width:100%, so they overflow their container on mobile. Strip the native
     appearance so they shrink to fill the field like every other input. (Desktop
     keeps its native calendar-picker affordance - this is mobile-only.)
     With appearance:none an empty control collapses in height on iOS, so pin a
     min-height to match the text inputs (12px padding + 1.5px border + line). */
  input[type=date], input[type=time], input[type=datetime-local], input[type=month], input[type=week] {
    -webkit-appearance: none; appearance: none; min-width: 0; max-width: 100%; width: 100%;
    min-height: 47px;
  }
  /* Schedule rows — stack into mini-cards on mobile so they don't cram. The type pill +
     time (+ actions / clash, pushed right) form a header line; the title and meta drop
     onto their own full-width lines below. Desktop keeps the single-line tag>time>detail. */
  .srow { flex-wrap: wrap; align-items: center; row-gap: 3px; padding: 11px 2px; }
  .srow .stype, .cal-ev .stype { flex: 0 0 auto; width: auto; }   /* pill shrinks to its label */
  .srow .stime { order: 1; }
  .srow .sact { order: 2; margin-left: auto; }                    /* edit/delete (or chevron) top-right */
  .srow .sbody { flex: 1 1 100%; order: 3; }                      /* title + meta drop below */
  .cal-ev { flex-wrap: wrap; align-items: center; row-gap: 2px; padding: 10px 10px; }
  .cal-ev .cal-time { order: 1; }
  .cal-ev .badge { order: 2; margin-left: auto; }                 /* clash badge top-right */
  .cal-ev-title { flex: 1 1 100%; order: 3; }
}

/* Notices / announcements (#38) */
.ntc { border: 1px solid var(--line); border-left: 4px solid var(--muted); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.ntc:first-of-type { margin-top: 0; }
.ntc-info { border-left-color: #6d28d9; }
.ntc-important { border-left-color: #d97706; background: rgba(251,191,36,.07); }
.ntc-urgent { border-left-color: #dc2626; background: rgba(248,113,113,.09); }
.ntc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ntc-badge { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: var(--line); color: var(--muted); white-space: nowrap; }
.ntc-info .ntc-badge, .ntc-badge.ntc-info { background: #ede9fe; color: #5b21b6; }
.ntc-important .ntc-badge, .ntc-badge.ntc-important { background: #fef3c7; color: #92400e; }
.ntc-urgent .ntc-badge, .ntc-badge.ntc-urgent { background: #fee2e2; color: #991b1b; }
.ntc-title { flex: 1; min-width: 0; }
.ntc-x { margin-left: auto; }
.ntc-dismiss { border: 1px solid var(--line); background: none; border-radius: 6px; cursor: pointer; font-size: .78rem; padding: 3px 9px; color: var(--muted); }
.ntc-dismiss:hover { background: var(--line); }
.ntc-body { margin: 6px 0 0; white-space: pre-line; }
.ntc-meta { margin: 6px 0 0; font-size: .8rem; color: var(--muted); }
.ntc-dismissed { opacity: .55; }
.ntc-row { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ntc-row:last-of-type { border-bottom: 0; }
.ntc-row-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1; min-width: 0; }
.ntc-row-sub { font-size: .8rem; width: 100%; }
.ntc-row-act { display: inline-flex; gap: 6px; align-items: center; }
.ntc-state { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; border-radius: 999px; padding: 1px 7px; border: 1px solid var(--line); color: var(--muted); }
.ntc-state-live { color: #065f46; border-color: #a7f3d0; background: #ecfdf5; }
.ntc-state-scheduled { color: #92400e; border-color: #fde68a; background: #fffbeb; }
.ntc-state-expired { opacity: .7; }
/* Header notices bell + dropdown (#58) */
.notice-btn { position: relative; }
.notice-badge { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #dc2626; color: #fff; font-size: .62rem; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--surface, #fff); }
.notice-panel { border-top: 1px solid var(--line); background: var(--surface, #fff); padding: 12px 0; }
.notice-body { max-width: 560px; }
.ntc-panel-list { display: flex; flex-direction: column; gap: 6px; }
.ntc-peek { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; border: 1px solid var(--line); border-left: 3px solid var(--muted); border-radius: 8px; padding: 8px 10px; text-decoration: none; color: inherit; }
.ntc-peek:hover { background: var(--line); }
.ntc-peek.ntc-info { border-left-color: #6d28d9; }
.ntc-peek.ntc-important { border-left-color: #d97706; }
.ntc-peek.ntc-urgent { border-left-color: #dc2626; }
.ntc-peek.ntc-unread { border-left-color: #6d28d9; background: color-mix(in srgb, var(--accent, #6d28d9) 8%, transparent); }
.ntc-peek-title { font-weight: 600; flex: 1 1 auto; min-width: 0; }
.ntc-peek-scope { flex: 1 1 100%; font-size: .78rem; color: var(--muted); }
.ntc-panel-empty { margin: 4px 0; }
.ntc-panel-all { display: inline-block; margin-top: 10px; font-size: .85rem; }
