/* ============================================================
   Rehearsal — design system v2
   Bright, modern, editorial-theatrical. Light, high-contrast, readable.
   Display: Fraunces (expressive serif).  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;

  --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: "Fraunces", Georgia, "Times New Roman", 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;
}
.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:
    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);
  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: rgba(255,255,255,.82);
  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; justify-content: space-between; min-height: 68px; gap: 12px; }
.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);
}
.main-nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.main-nav a { color: var(--ink); font-weight: 600; }
.main-nav a: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; }

/* 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;
  background: 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);
}
.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); }
.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],
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 auto; }
.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; }

.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 #fff, 0 0 0 1.5px var(--line); }
.swatches .swatch input:checked + .dot { box-shadow: inset 0 0 0 2px #fff, 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; }

/* Compact video tiles + click-to-play modal */
.vgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 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; }
.vthumb-btn { position: relative; display: block; width: 100%; border: 0; padding: 0; cursor: pointer; background: #000; aspect-ratio: 16/10; overflow: hidden; }
.vthumb-btn video, .vthumb-btn .vphold { width: 100%; height: 100%; object-fit: cover; display: block; background: #11101a; }
.vphold { display: grid; place-items: center; color: #ffffff66; }
.vthumb-btn .vplay { position: absolute; inset: 0; margin: auto; width: 46px; height: 46px; display: grid; place-items: center; background: rgba(0,0,0,.5); color: #fff; border-radius: 50%; pointer-events: none; }
.vcard .vmeta { padding: 9px 11px; }
.vcard .vmeta .vtitle { font-weight: 600; font-size: .9rem; display: block; margin: 4px 0 2px; }
.modal video { width: 100%; max-height: 70vh; border-radius: 10px; background: #000; display: block; }

/* 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; }
.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; }

/* Stage-direction transition note between scenes */
.transition { border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); border-radius: 10px; padding: 10px 14px; margin: 8px 0 8px 22px;
  background: repeating-linear-gradient(135deg, transparent, transparent 9px, color-mix(in srgb, var(--brand) 5%, transparent) 9px, color-mix(in srgb, var(--brand) 5%, transparent) 18px), var(--surface-2);
  font-size: .9rem; color: var(--ink); }
.transition .tr-label { display: inline-flex; align-items: center; gap: 5px; font-family: var(--ui); font-weight: 700; font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--brand); margin-bottom: 4px; }
.transition .tr-body { white-space: pre-wrap; }

/* 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: linear-gradient(160deg, #ffffff 0%, #faf5ff 55%, #fdf0f8 100%); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero h1 { font-size: 2.9rem; }
.hero .emoji { font-size: 3rem; }
.hero .lead { max-width: 580px; margin: 10px auto 24px; }

/* 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; }

@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; }
}

/* ===== Casting Network additions ===== */
.center { text-align: center; }
.doors { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin-top: 1.5rem; }
.door h2 { display: flex; align-items: center; gap: .5rem; margin-top: 0; }
.door .btn { margin-top: .5rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

fieldset { border: 1px solid var(--line, #e5e2dd); border-radius: 14px; padding: 1rem 1.25rem 1.25rem; margin: 0 0 1.25rem; }
fieldset legend { font-family: 'Fraunces', serif; font-weight: 600; padding: 0 .4rem; }
.row2 { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 540px) { .row2 { grid-template-columns: 1fr; } }
label.check, .check { display: flex; align-items: center; gap: .5rem; font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.chips-choice .chip { cursor: pointer; }
.chip { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .7rem; border-radius: 999px;
  background: var(--brand-tint, #0e749022); border: 1px solid transparent; font-size: .9rem; font-weight: 500; }
.chip input { margin: 0; }
.chip-static { background: #f0efec; color: #444; }

.badge { font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; background: #f0efec; vertical-align: middle; }
.badge-ok { background: #dff3e6; color: #1f6f54; }

.profile-head { display: flex; gap: 1.25rem; align-items: center; }
.profile-head .avatar { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center;
  background: var(--brand-tint, #0e749022); color: var(--brand, #0e7490); flex: none; }
.facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.credit-list { list-style: none; padding: 0; }
.credit-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--line, #eee); }
.plain { list-style: none; padding: 0; } .plain li { padding: .3rem 0; display: flex; gap: .5rem; align-items: center; }
form.inline { display: inline; } .listing-card { text-decoration: none; color: inherit; display: block; }

/* Listings & browse */
.filters { margin-top: 1rem; }
.filter-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; margin-bottom: .75rem; }
.filter-row > div { display: flex; flex-direction: column; gap: .3rem; }
.filter-row .grow { flex: 1 1 220px; }
.filter-actions { flex-direction: row !important; align-items: center; gap: .5rem; }
.row-actions { display: inline-flex; gap: .4rem; }
.listing-card .badge { float: right; }

/* Messaging */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.thread { display: flex; flex-direction: column; gap: .6rem; margin-top: 1rem; }
.msg { max-width: 80%; padding: .6rem .85rem; border-radius: 14px; background: #f0efec; align-self: flex-start; }
.msg-mine { align-self: flex-end; background: var(--brand-tint, #0e749022); }
.msg-meta { font-size: .75rem; color: #777; margin-bottom: .2rem; }
.thread-list { list-style: none; padding: 0; }
.thread-list li a { display: block; padding: .85rem 1rem; border: 1px solid var(--line,#e5e2dd); border-radius: 12px; margin-bottom: .6rem; text-decoration: none; color: inherit; }
.thread-list li a.unread { border-color: var(--brand,#0e7490); background: var(--brand-tint,#0e749022); }
.tl-head { display: flex; gap: .5rem; align-items: center; }
.tl-snip { font-size: .9rem; }
.applicant-list { list-style: none; padding: 0; }
.inline-actions { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }

/* Media */
.profile-head .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 24px; }
.media-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: .5rem; }
.media-item { text-align: center; }
.media-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; background: #f0efec; }
.media-item audio { width: 100%; }

/* Matching */
.match-why { font-size: .82rem; color: var(--brand,#0e7490); margin: .35rem 0 0; display: flex; align-items: center; gap: .3rem; }
