/* TwinEagles DJ Studio — console styling. Brand tokens match the main site;
   /theme.css overrides them with whatever is saved in the site's Appearance tab. */
/* Display face, self-hosted (same file as the main site). Body and mono (timers, data) use system faces, as on the main site. */
@font-face {
  font-family: 'Big Shoulders Display';
  src: url("fonts/BigShouldersDisplay-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  /* Stacking scale. Global layers use these; small local values (1-6 inside a component) and 15, 20, 30, 40, 50, 80
     are left as numbers where moving them onto the scale would change which of two layers wins.
     raised 2 < sticky 20 < dropdown 40 < overlay 60 < modal 1000 < toast 1100 */
  --z-raised: 2; --z-sticky: 20; --z-dropdown: 40; --z-overlay: 60; --z-modal: 1000; --z-toast: 1100;
  --ink: #0B1220; --paper: #F4F6F8;
  --field-border: #6A7E9E;   /* text fields: 3.5:1 on --card, 4:1 on --surface, 4.2:1 on --navy (WCAG 1.4.11) */   /* off-black / off-white: never pure #000 / #fff */
  --ink-soft: #C9D4E3;
  --gold: #C9A84C; --gold-dim: #8B6914; --navy: #0F1B2D; --surface: #161F2E; --card: #1E2A3D;
  --border: #2A3A52; --text: #E8ECF2; --muted: #93A3B8;
  /* 1.83.0: --onair-text is red for words (6.3:1 on navy, 5.2:1 on card); --onair stays for lamps, borders and fills. */
  --onair: #E5484D; --onair-text: #FF6B70; --ok: #3DBE8B; --warn: #E0A63A; --info: #5B9BD5;
  --display: 'Big Shoulders Display', 'Bahnschrift SemiCondensed', 'Arial Narrow', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --radius: 8px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--navy); color: var(--text); font: 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--ink-soft); text-decoration-color: var(--border); text-underline-offset: 3px; }
a:hover { color: var(--paper); text-decoration-color: var(--ink-soft); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: .01em; }
h1 { font-size: clamp(30px, 4vw, 42px); }
h2 { font-size: clamp(26px, 3.2vw, 36px); }
h3 { font-size: 21px; margin-bottom: 12px; }
h4 { font-size: 16px; margin: 14px 0 6px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
p { margin: 0 0 10px; }
.eyebrow { font: 500 11.5px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.eyebrow a { color: var(--muted); text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
/* A long unbroken string — a URL with a secret in it — that must not widen the page. */
.anywhere { overflow-wrap: anywhere; }
.bad { color: var(--onair-text); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; left: 0; top: 0; }
ul.plain, ol.plain { list-style: none; margin: 0; padding: 0; }

/* ── Shell ─────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--border); padding: 20px 14px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--text); padding: 0 6px; }
.brand b { display: block; font: 700 22px/1 var(--display); letter-spacing: .02em; }
.brand small { display: block; font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.brand-mark { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--gold); position: relative; flex: none; }
.brand-mark::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--onair); }
.nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--border) transparent; overscroll-behavior: contain; }
.nav-group { font: 500 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); opacity: .7; padding: 14px 12px 4px; }
.nav-group:first-child { padding-top: 2px; }
.nav a { color: var(--muted); text-decoration: none; padding: 7px 12px; border-radius: var(--radius); font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--card); }
.nav a.on { color: var(--navy); background: var(--gold); }
.nav a.ext { margin-top: 10px; font-size: 13px; }
.nav a.ext + a.ext { margin-top: 4px; }
.side .nav-toggle { display: none; }
.me { margin-top: auto; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; padding: 12px 6px 0; border-top: 1px solid var(--border); }
.me form { grid-column: 2; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: var(--navy); font-weight: 600; grid-row: span 2; }
.me-text b { display: block; font-size: 14px; }
.me-text small { color: var(--muted); font-size: 12px; }
.main { padding: 28px clamp(16px, 3vw, 40px) 40px; display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.foot { color: var(--muted); font-size: 12px; margin-top: auto; padding-top: 20px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

/* ── Controls ──────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; font: 600 14px/1 var(--body); padding: 10px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); color: var(--text); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--gold); color: var(--text); }
.btn-gold { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.btn-gold:hover { background: #dcbd62; color: var(--navy); }
.btn-danger { background: #C62828; border-color: #C62828; color: var(--paper); } /* 1.83.0: 5.2 to 1 (was 3.6) */
.btn-sm { padding: 6px 10px; font-size: 13px; }
.link { background: none; border: 0; color: var(--ink-soft); cursor: pointer; font: inherit; padding: 0; text-decoration: underline; }
input, select, textarea { font: inherit; color: var(--text); background: var(--navy); border: 1px solid var(--field-border); border-radius: var(--radius); padding: 9px 11px; width: 100%; min-width: 0; }
input[type=checkbox] { width: auto; accent-color: var(--gold); }
input[type=file] { padding: 8px; }
input:focus, select:focus { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); outline: none; }
label { font-weight: 500; font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.stack .btn { align-self: flex-start; margin-top: 6px; }
.narrow { max-width: 360px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
.checks { display: flex; flex-direction: column; gap: 6px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset[disabled] { opacity: .75; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 10px 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid .checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.actions { display: flex; gap: 10px; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.search input { width: min(280px, 100%); }
.crumbs { display: flex; gap: 6px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; }
.crumbs span { color: var(--muted); }
.inline-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 3px 0; }
.inline-form select { width: auto; padding: 5px 8px; font-size: 13px; }

/* ── Chips / flashes ───────────────────────────────── */
.chip { display: inline-flex; align-items: center; gap: 6px; font: 500 11.5px/1 var(--mono); padding: 5px 8px; border-radius: 4px; background: var(--card); color: var(--muted); border: 1px solid var(--border); white-space: nowrap; vertical-align: middle; }
.chip-ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.chip-warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.chip-error { color: var(--onair-text); border-color: color-mix(in srgb, var(--onair) 45%, transparent); }
.chip-idle, .chip-muted { color: var(--muted); }
.chip-busy, .chip-running { color: var(--info); }
.chip-onair { color: var(--paper); background: var(--onair); border-color: var(--onair); }
.chip-x { display: inline; margin: 0; }
.chip-x button { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0 0 0 2px; font-size: 12px; }
.chip-x button:hover { color: var(--onair-text); }
.count { font: 500 13px var(--mono); color: var(--muted); margin-left: 6px; }
.flash { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--border); border-left-width: 4px; background: var(--surface); }
.flash-ok { border-left-color: var(--ok); }
.flash-error { border-left-color: var(--onair); }
.flash-warn { border-left-color: var(--warn); }
.flash-info { border-left-color: var(--info); }

/* ── On-air lamp ───────────────────────────────────── */
.lamp { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; }
.onair-state { display: inline-flex; gap: 10px; align-items: center; padding: 8px 14px; border: 1.5px solid var(--border); border-radius: 4px; font: 600 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.onair-state[data-state=online] { color: var(--ok); border-color: var(--ok); }
.onair-state[data-state=online] .lamp { background: var(--ok); }
.onair-state[data-state=live] { color: var(--paper); border-color: var(--onair); background: color-mix(in srgb, var(--onair) 18%, transparent); }
.onair-state[data-state=live] .lamp { background: var(--onair); }
.onair-state[data-state=offline] { color: var(--onair-text); border-color: var(--onair); }
@media (prefers-reduced-motion: no-preference) {
  .onair-state[data-state=live] .lamp, .login .lamp { animation: pulse 1.6s ease-in-out infinite; }
}
@keyframes pulse { 50% { opacity: .35; } }

/* ── Now playing ───────────────────────────────────── */
.np { display: grid; grid-template-columns: 160px minmax(0, 1fr) 200px; gap: 24px; align-items: center; background: linear-gradient(135deg, var(--card), var(--surface)); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.np-art img { width: 160px; height: 160px; object-fit: cover; border-radius: 4px; display: block; background: var(--card); }
.np-body h2 { margin-bottom: 4px; overflow-wrap: anywhere; }
.np-artist { font-size: 18px; color: var(--gold); margin-bottom: 14px; }
.progress { height: 6px; background: var(--navy); border-radius: 4px; overflow: hidden; margin-bottom: 6px; }
.progress span { display: block; height: 100%; width: 0; background: var(--gold); transition: width .9s linear; }
.np-next { margin: 10px 0 0; color: var(--muted); }
.np-next b { color: var(--text); font-weight: 500; }
.np-stats { margin: 0; display: flex; flex-direction: column; gap: 12px; border-left: 1px solid var(--border); padding-left: 20px; }
.np-stats dt { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.np-stats dd { margin: 2px 0 0; font: 600 28px/1 var(--display); font-variant-numeric: tabular-nums; }
.history li, .rows li { display: flex; gap: 12px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.history li:last-child, .rows li:last-child { border-bottom: 0; }
.rows li .mono { color: var(--muted); min-width: 120px; }
.rows li.now { color: var(--text); }
.rows li.now .mono { color: var(--onair-text); }
.big-num { font: 700 44px/1 var(--display); margin-bottom: 8px; }
.big-num small { font: 400 14px var(--body); color: var(--muted); }
.kv { margin: 0; display: grid; gap: 10px; }
.kv div { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }

/* ── Tables ────────────────────────────────────────── */
.table-wrap { position: relative; max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
.data th { text-align: left; font: 500 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--card); padding: 9px 12px; white-space: nowrap; }
.data td { padding: 9px 12px; border-top: 1px solid var(--border); vertical-align: top; }
.data tr:hover td { background: color-mix(in srgb, var(--card) 55%, transparent); }
.data .num { text-align: right; }
.folder { font-weight: 600; text-decoration: none; }
.folder::before { content: "▸ "; color: var(--muted); }
.pager { display: flex; gap: 12px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.rules td { vertical-align: middle; }
.rules input { padding: 6px 8px; }
.rules input[size="5"] { width: 84px; }
.days { white-space: nowrap; }
.day-box { display: inline-flex; flex-direction: column; align-items: center; font: 400 10.5px var(--mono); color: var(--muted); margin-right: 3px; }

/* ── Settings form ─────────────────────────────────── */
.settings { display: flex; flex-direction: column; gap: 26px; }
.settings legend { font: 600 19px var(--display); color: var(--text); margin-bottom: 8px; padding: 0; }
.settings .btn-gold { align-self: flex-start; }
.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin: 8px 0 14px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 6px; align-items: center; margin-bottom: 6px; }
.pair span { color: var(--muted); }
.code { background: var(--navy); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; font: 13px/1.5 var(--mono); overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── Run log ───────────────────────────────────────── */
.log li { display: grid; grid-template-columns: 70px 60px minmax(0, 1fr); gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.log .lvl { font: 500 11px var(--mono); text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.lvl-error .lvl, .lvl-error { color: var(--onair-text); }
.lvl-warn .lvl { color: var(--warn); }
.lvl-ok .lvl { color: var(--ok); }
.lvl-dry .lvl { color: var(--info); }

/* ── Schedule ──────────────────────────────────────── */
.legend { display: flex; gap: 8px; flex-wrap: wrap; }
.week { display: grid; grid-template-columns: repeat(7, minmax(124px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.day { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 8px; min-width: 124px; }
.day.today { border-color: var(--gold); }
.day h3 { font-size: 20px; margin: 0 0 4px; }
.day h3 span { font: 400 12px var(--mono); color: var(--muted); }
.slot { border-radius: 4px; padding: 8px 10px; background: var(--card); border-left: 3px solid var(--muted); }
.slot p { margin: 0; }
.slot-title { font-weight: 600; margin: 2px 0; overflow-wrap: anywhere; }
.slot .chip { margin-top: 6px; white-space: normal; max-width: 100%; line-height: 1.3; }
.slot.off { opacity: .55; }
.slot.now { box-shadow: 0 0 0 1px var(--onair); }
.kind-show { border-left-color: var(--gold); }
.kind-playlist { border-left-color: var(--info); }
.kind-live { border-left-color: var(--onair); }
.legend .chip.kind-show { border-left: 3px solid var(--gold); }
.legend .chip.kind-playlist { border-left: 3px solid var(--info); }
.legend .chip.kind-live { border-left: 3px solid var(--onair); }

/* ── Sign in ───────────────────────────────────────── */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(ellipse at top, color-mix(in srgb, var(--gold) 12%, var(--navy)), var(--navy) 60%); }
.login { width: min(420px, 100%); display: flex; flex-direction: column; gap: 18px; }
.login-head { position: relative; }
.login-head h1 { font-size: 56px; color: var(--gold); }
.login .lamp { background: var(--onair); position: absolute; right: 0; top: 4px; box-shadow: 0 0 12px var(--onair); }
.login form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }

/* ── Shared bits (phases 2–7) ──────────────────────── */
[hidden] { display: none !important; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: var(--c, var(--gold)); vertical-align: middle; margin-right: 6px; }
.warn-text { color: var(--warn); }
.narrow-num { width: 70px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.meter { height: 8px; background: var(--navy); border-radius: 4px; overflow: hidden; border: 1px solid var(--border); }
.meter span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ok) 0 70%, var(--warn) 70% 90%, var(--onair) 90%); background-size: 100% 100%; transition: width .05s linear; }
.meter span.hot { box-shadow: inset 0 0 0 2px var(--onair); }
.inline-checks { flex-direction: row; flex-wrap: wrap; gap: 6px 18px; }
.pair-times { display: flex; gap: 8px; align-items: center; }
blockquote { margin: 8px 0; padding: 8px 12px; border: 1px solid var(--border); background: var(--card); border-radius: var(--radius); }
code { font-family: var(--mono); font-size: 12.5px; background: var(--navy); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
audio { max-width: 100%; height: 36px; }
.count:empty { display: none; }

/* Log */
.hour { scroll-margin-top: 16px; }
.hour-now { border-color: var(--onair); }
.hour-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.hour-head h3 { margin: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hour-head .actions { margin-left: auto; flex-wrap: wrap; }
.clock-chip { border-left: 3px solid var(--c, var(--gold)); color: var(--text); }
.kind-chip.k-song { color: var(--text); }
.kind-chip.k-jingle { color: var(--info); }
.kind-chip.k-spot { color: var(--gold); border-color: var(--gold-dim); }
.kind-chip.k-voice, .kind-chip.k-voice-slot { color: var(--onair-text); }
.kind-chip.k-note { color: var(--muted); font-style: italic; }
tr.k-voice-slot td, tr.k-note td { background: color-mix(in srgb, var(--card) 60%, transparent); }
.row-actions { white-space: nowrap; }
.row-actions > * { vertical-align: middle; }
.row-actions .inline-form { display: inline-flex; flex-wrap: nowrap; }
.swap { display: inline-block; position: relative; }
.swap summary { list-style: none; cursor: pointer; }
.swap summary::-webkit-details-marker { display: none; }
.swap[open] .picker-form { position: absolute; right: 0; z-index: 5; width: min(420px, 80vw); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.4); white-space: normal; }
.picker { position: relative; }
.picker-results { max-height: 260px; overflow-y: auto; margin-top: 4px; }
.picker-results:empty { display: none; }
.picker-item { display: block; width: 100%; text-align: left; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 4px; padding: 6px 8px; margin-bottom: 4px; cursor: pointer; font: inherit; }
.picker-item:hover, .picker-item:focus { border-color: var(--gold); }
.picker.picked input[type=search] { border-color: var(--ok); }
.picker-form .actions { margin-top: 8px; }
.wide-field { grid-column: span 2; }

/* Clocks */
.clocks-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.slot-rows { display: flex; flex-direction: column; gap: 6px; }
.slot-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 70px auto; gap: 6px; align-items: center; }
.slot-row .slot-text { grid-column: 2 / 4; }
.slot-row[data-kind=song] .slot-text, .slot-row[data-kind=jingle] .slot-text { display: none; }
.slot-row[data-kind=spots] .slot-pl, .slot-row[data-kind=spots] .slot-text { display: none; }
.slot-row[data-kind=spots] .slot-count { grid-column: 2; justify-self: start; }
.slot-row[data-kind=voice] .slot-pl, .slot-row[data-kind=voice] .slot-count,
.slot-row[data-kind=note] .slot-pl, .slot-row[data-kind=note] .slot-count { display: none; }
.slot-move { display: flex; gap: 4px; }
.grid-table select { padding: 4px 6px; font-size: 12.5px; min-width: 110px; }
.grid-table th[scope=row] { white-space: nowrap; }

/* Live studio */
.live { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; }
.live-carts { grid-column: 1 / -1; }
.live-reads { grid-column: 1 / -1; }
.channel { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.ch-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; flex-wrap: wrap; }
.ch-head select { width: auto; max-width: 60%; padding: 4px 8px; font-size: 13px; }
.ch-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ch-controls input[type=range] { width: 120px; padding: 0; accent-color: var(--gold); }
.mic-btn { min-width: 96px; justify-content: center; }
.file-btn { cursor: pointer; }

/* Decks (1.8): up to four, each its own strip inside the one channel box */
.decks { gap: 10px; }
.deck { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 6px; background: color-mix(in srgb, var(--card) 45%, transparent); }
.deck + .deck { margin-top: 8px; }
.deck-head { display: flex; align-items: baseline; gap: 10px; }
.deck-head .deck-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deck-drop { flex: none; line-height: 1; padding: 2px 8px; }
.deck .progress { margin-bottom: 0; }
.deck .progress span { transition: width .25s linear; }
.deck-time { display: flex; gap: 4px; font-variant-numeric: tabular-nums; }
.deck-assign { width: auto; padding: 3px 6px; font-size: 12px; }
.deck-cue.on { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.deck-head-actions { display: flex; gap: 8px; }
.xfader { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--border); }
.xfader input[type=range] { flex: 1; min-width: 140px; accent-color: var(--gold-dim); padding: 0; }
.xfader.on input[type=range] { accent-color: var(--gold); }
.xfader .xf-end { font: 600 12px var(--mono); letter-spacing: .1em; }

/* Load picker */
.dpick { position: fixed; inset: 0; background: rgba(9, 14, 24, .72); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; z-index: var(--z-overlay); overflow-y: auto; }
.dpick-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; width: min(560px, 100%); display: flex; flex-direction: column; gap: 12px; }
.dpick .tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.dpick .tab.on { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.pick-list { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.pick-row { width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; color: var(--text); padding: 8px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font: inherit; }
.pick-row:hover, .pick-row:focus-visible { background: var(--card); }
.pick-main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-sub { flex: none; font-variant-numeric: tabular-nums; }
.onair-state[data-state=loading] { color: var(--info); border-color: var(--info); }
.cart-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.cart { position: relative; overflow: hidden; min-height: 76px; border-radius: var(--radius); border: 1px solid var(--border); border-top: 4px solid var(--cart, var(--gold));
  background: var(--card); color: var(--text); font: 600 14px/1.25 var(--body); text-align: left; padding: 10px; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; }
.cart:hover { border-color: var(--cart, var(--gold)); }
.cart.playing { background: color-mix(in srgb, var(--cart, var(--gold)) 28%, var(--card)); }
.cart.loading { opacity: .6; }
.cart kbd { align-self: flex-end; font: 500 11px var(--mono); padding: 1px 6px; border: 1px solid var(--border); border-radius: 4px; color: var(--muted); }
.cart-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--cart, var(--gold)); }
.read { border: 1px solid var(--border); border-radius: var(--radius); padding: 6px 12px; margin-bottom: 12px; }
.read p { margin-bottom: 6px; }

/* Voice tracker */
.vt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.vt-rec .big-num { margin: 10px 0; }

/* Recordings, community */
.rec { border-top: 1px solid var(--border); padding: 10px 0; }
.rec summary { cursor: pointer; }
.rec-form { margin-top: 10px; }
.review { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; border-top: 1px solid var(--border); padding: 12px 0; }
.review.form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profile-head { flex-direction: row; align-items: center; gap: 14px; }
.profile-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }

/* Sports */
.game-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.game-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.game-card:hover { border-color: var(--gold); color: var(--text); }
.game-card.status-live { border-color: var(--onair); }
.game-card .mono { color: var(--gold); }
.scoreboard { --team: var(--gold); display: grid; grid-template-columns: 1fr minmax(180px, 240px) 1fr; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-top: 5px solid var(--team); border-radius: var(--radius); padding: 18px; }
.sb-team { text-align: center; }
.sb-name { font: 700 22px/1.1 var(--display); text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.sb-score { font: 700 clamp(56px, 9vw, 96px)/1 var(--display); margin: 6px 0 10px; }
.sb-btns { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.sb-btns .btn { min-width: 52px; min-height: 44px; justify-content: center; font-size: 16px; }
.sb-mid { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.kind-game { border-left-color: var(--ok); }
.legend .chip.kind-game { border-left: 3px solid var(--ok); }

/* Reports */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.stat b { font: 700 32px/1 var(--display); font-variant-numeric: tabular-nums; }
.top { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }

/* Public pages */
.public-card { width: min(520px, 100%); }
.public .login-head h1 { font-size: 48px; }
.recorder { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.public form.stack { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; }

/* ── Responsive ────────────────────────────────────── */
/* ── Pages moved from the website's Back Office ────── */
.filter-tabs { flex-wrap: wrap; gap: 8px; justify-content: flex-start; }
.btn-gold .count { color: inherit; }
.prewrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.row-actions { flex-wrap: wrap; }
.dj-cell { white-space: nowrap; }
.dj-thumb { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); flex: none; }
.dj-thumb.sm { width: 34px; height: 34px; vertical-align: middle; margin-right: 8px; border-width: 1px; }
.dj-photo-field { display: flex; gap: 14px; align-items: center; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin: 12px 0; }
.photo-card { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.photo-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--card); }
.photo-card figcaption { padding: 10px 12px; }
.photo-card p { margin: 0 0 6px; overflow-wrap: anywhere; }
.track-edit { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; border-top: 1px solid var(--border); padding: 14px 0; }
.track-art { width: 72px; height: 72px; border-radius: 4px; object-fit: cover; background: var(--card); border: 1px solid var(--border); }
.track-art.sm { width: 40px; height: 40px; }
.form-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
input.needs { border-color: var(--warn); }
.data.compare input { padding: 6px 8px; }
.data.compare th[scope=row] { color: var(--muted); font-weight: 500; white-space: nowrap; }
.upload-progress li { gap: 10px; }
.upload-progress li .mono { min-width: 0; overflow-wrap: anywhere; }
.log { max-height: 320px; overflow: auto; }

@media (max-width: 1100px) {
  .np { grid-template-columns: 120px minmax(0, 1fr); }
  .np-art img { width: 120px; height: 120px; }
  .np-stats { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; border-left: 0; border-top: 1px solid var(--border); padding: 14px 0 0; gap: 24px; }
}
@media (max-width: 1100px) {
  .vt { grid-template-columns: 1fr; }
  .live { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .form-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scoreboard { grid-template-columns: 1fr; }
  .clocks-layout, .review, .review.form-grid { grid-template-columns: 1fr; }
  .slot-row { grid-template-columns: 1fr 1fr; }
  .slot-row .slot-text, .slot-row .slot-pl { grid-column: 1 / -1; }
  .wide-field { grid-column: auto; }
  .swap[open] .picker-form { position: static; width: 100%; }
  .row-actions { white-space: normal; }
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 12px 16px; gap: 10px; }
  .side .nav-toggle { display: inline-flex; }
  .nav { display: none; width: 100%; }
  .nav.open { display: flex; }
  .me { display: none; }
  .nav.open ~ .me { display: grid; width: 100%; }
  .grid-2, .pairs, .form-grid { grid-template-columns: 1fr; }
  .kv div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 520px) {
  .form-grid.compact { grid-template-columns: 1fr; }
  .track-edit { grid-template-columns: 1fr; }
  .dj-photo-field { flex-direction: column; align-items: flex-start; }
  .np { grid-template-columns: 1fr; }
  .np-art img { width: 100%; height: auto; aspect-ratio: 1; max-width: 220px; }
  .rows li .mono { min-width: 0; }
}

/* Section breaks inside a panel; empty status lines take no space */
.panel .section-break { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); }
.status-line:empty { margin: 0; min-height: 0; }
.panel-foot { margin-top: 16px; }

/* ── 1.1: health, alerts, live listeners, analytics, prep, podcasts, 2FA ── */
.flash-alert { border-left-color: var(--onair); background: color-mix(in srgb, var(--onair) 12%, var(--surface)); }
.flash-alert p { margin: 0 0 6px; }
.alert-script { font-size: 17px; line-height: 1.5; }
.live-alerts { display: grid; gap: 10px; }
.live-alerts:empty { display: none; }
.alert-card.dim { opacity: .6; }
.warn-text { color: var(--warn); }

.live-listeners { grid-column: 1 / -1; }
.grid-2.tight { gap: 16px; }
.req-list { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.req { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.req p { margin: 0 0 4px; }
.req .actions { margin-top: 6px; }
.req-picker { margin-top: 10px; padding: 10px; border: 1px solid var(--gold-dim); border-radius: var(--radius); }
.chat-list { height: 340px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.chat-list li.staff b { color: var(--gold); }
.chat-form { display: flex; gap: 8px; margin-top: 8px; }
.chat-form input { flex: 1; min-width: 0; }

.heat { border-collapse: separate; border-spacing: 2px; font: 500 11px var(--mono); width: 100%; min-width: 720px; }
.heat th { color: var(--muted); font-weight: 500; padding: 2px 4px; text-align: center; }
.heat tbody th { text-align: left; }
.heat td { height: 30px; text-align: center; border-radius: 4px; color: var(--text); font-variant-numeric: tabular-nums; }
.heat-0 { background: color-mix(in srgb, var(--card) 70%, transparent); color: var(--muted) !important; }
.heat-1 { background: color-mix(in srgb, var(--gold) 14%, var(--card)); }
.heat-2 { background: color-mix(in srgb, var(--gold) 30%, var(--card)); }
.heat-3 { background: color-mix(in srgb, var(--gold) 48%, var(--card)); }
.heat-4 { background: color-mix(in srgb, var(--gold) 68%, var(--card)); color: var(--navy) !important; }
.heat-5 { background: var(--gold); color: var(--navy) !important; font-weight: 600; }

.news { display: grid; gap: 12px; }
.news a { text-decoration: none; color: var(--text); }
.news a:hover b { color: var(--gold); }
.points-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 16px; }

.qr { background: var(--paper); display: inline-block; padding: 6px; border-radius: var(--radius); line-height: 0; }
.qr svg { display: block; max-width: 100%; height: auto; }
.secret { font-size: 18px; letter-spacing: .08em; overflow-wrap: anywhere; }
.code-input { font-size: 24px; letter-spacing: .25em; text-align: center; }
.recovery { columns: 2; font-size: 17px; padding-left: 2.2em; margin: 12px 0; }
.codes-panel { border-color: var(--gold); }

.rec audio, .clip audio, .clip-page audio { width: 100%; margin: 8px 0; }
.clip-form h4 { margin-top: 0; }
.clip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.clip { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; background: var(--card); }
.clip img { width: 100%; height: auto; border-radius: 4px; display: block; margin-bottom: 8px; }
.cv-out { margin-top: 8px; display: grid; gap: 8px; justify-items: start; }
.cv-preview { width: 100%; max-height: 420px; border-radius: 4px; background: var(--ink); }
.copy-url { width: 100%; font-size: 12px; }
.clip-page { max-width: 640px; }
.clip-card { width: 100%; height: auto; border-radius: var(--radius); display: block; margin-bottom: 16px; }

@media print {
  .side, .no-print, .nav-toggle, .foot, .flash-ok, .flash-warn { display: none !important; }
  .shell { display: block; }
  body { background: var(--paper); color: var(--ink); }
  .panel { border: 1px solid #999; background: var(--paper); break-inside: avoid; }
  .muted, .eyebrow { color: #444; }
  a { color: var(--ink); }
}

.feed-msg { margin: 0 0 10px; color: var(--ok); }
.feed-msg.bad { color: var(--onair-text); }
.stat b.stat-text { font-size: 22px; line-height: 1.15; overflow-wrap: anywhere; }
.fc-rows li { display: grid; grid-template-columns: 3.2em 1fr; gap: 8px; align-items: baseline; }
.chat-list { height: clamp(160px, 40vh, 340px); }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form .field { flex: 0 1 220px; }

/* ── 1.2: Multitrack editor ───────────────────────────────────────────── */
.mt-features { columns: 2 260px; column-gap: 24px; margin: 8px 0 0; padding-left: 18px; }
.mt-quota { display: grid; gap: 6px; max-width: 420px; }
.mt-quota meter { width: 100%; height: 10px; }
.mt-asset-name { overflow-wrap: anywhere; }
.inline-menu { position: relative; display: inline-block; }
.inline-menu > summary { list-style: none; }
.inline-menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 240px; display: grid; gap: 8px; padding: 12px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.menu-pop .inline-form { margin: 0; }
.menu-pop .inline-form input { flex: 1 1 140px; }

.main:has(> .mt) { padding-block: 12px; gap: 10px; }
body.mt-focus .shell { grid-template-columns: minmax(0, 1fr); }
body.mt-focus .side, body.mt-focus .foot { display: none; }
body.mt-focus .main:has(> .mt) { padding-inline: 8px; }
.mt {
  --mt-bg: #0c1522; --mt-bg2: #101a2a; --mt-lane: #132034; --mt-lane2: #18283f;
  --mt-grid: var(--border); --mt-grid2: #1d2b40; --mt-text: var(--text); --mt-muted: var(--muted);
  --mt-sel: rgba(201, 168, 76, .18); --mt-head-w: 236px;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) 34px auto auto;
  height: calc(100dvh - 24px); min-height: 560px; min-width: 0;
  background: var(--mt-bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.mt:not(.mt-ready) { display: block; height: auto; min-height: 0; padding: 20px; }
.mt input, .mt select { width: auto; padding: 4px 6px; font-size: 13px; }
.mt input[type=range] { padding: 0; accent-color: var(--gold); background: transparent; border: 0; }
.mt button { font: inherit; }
.mt :focus-visible, .mt-dialog :focus-visible, .mt-popup :focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.mt kbd, .mt-popup kbd, .mt-dialog kbd { font: 500 11px/1 var(--mono); padding: 2px 5px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; background: var(--navy); color: var(--muted); white-space: nowrap; }

/* Top bar and menus */
.mt-top { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; padding: 6px 10px; background: var(--surface); border-bottom: 1px solid var(--border); }
.mt-top-l, .mt-top-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mt-top-l { flex: 1 1 240px; }
.mt .mt-title { font: 700 20px/1.1 var(--display); letter-spacing: .02em; background: transparent; border-color: transparent; padding: 3px 6px; min-width: 0; flex: 1 1 auto; max-width: 420px; }
.mt .mt-title:hover, .mt .mt-title:focus { border-color: var(--border); background: var(--navy); }
.mt-menus { display: flex; gap: 2px; flex-wrap: wrap; }
.mt-menu-btn { background: transparent; border: 0; color: var(--text); padding: 6px 10px; border-radius: 4px; cursor: pointer; font-size: 14px; }
.mt-menu-btn:hover, .mt-menu-btn[aria-expanded=true] { background: var(--card); }
.mt-save { font-family: var(--mono); color: var(--muted); white-space: nowrap; }
.mt-save.saving, .mt-save.pending, .mt-save.waiting, .mt-save.unsaved { color: var(--warn); }
.mt-save.error, .mt-save.conflict { color: var(--onair-text); }
.mt-save.saved { color: var(--ok); }
.mt-conflict { margin: 0; border-radius: 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Transport */
.mt-transport { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; padding: 6px 10px; background: var(--mt-bg2); border-bottom: 1px solid var(--border); }
.mt-tgroup { display: flex; align-items: center; gap: 3px; }
.mt-tbtn { position: relative; display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 4px 9px; border: 1px solid var(--border); border-radius: 4px; background: var(--card); color: var(--text); cursor: pointer; font-size: 13px; }
.mt-tbtn:hover { border-color: var(--gold); }
.mt-tbtn.on { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.mt-tbtn.rec .ico { color: var(--onair-text); }
.mt-tbtn.rec.on { background: var(--onair); border-color: var(--onair); color: var(--paper); }
.mt-tbtn.rec.on .ico { color: var(--paper); animation: mt-blink 1s steps(2, start) infinite; }
.mt-tbtn .ico { font-size: 12px; line-height: 1; }
.mt-tbtn .ico:empty::before { font-family: var(--body); }
.ico-go-start::before { content: "\23EE\FE0E"; }
.ico-rewind::before { content: "\23EA\FE0E"; }
.ico-play::before { content: "\25B6\FE0E"; }
.mt-tbtn.play.on .ico-play::before { content: "\23F8\FE0E"; }
.ico-stop::before { content: "\25A0\FE0E"; }
.ico-record::before { content: "\25CF\FE0E"; }
.ico-forward::before { content: "\23E9\FE0E"; }
.ico-go-end::before { content: "\23ED\FE0E"; }
.mt-tbtn.toggle .ico, .ico-zoom-in, .ico-zoom-out { display: none; }
.mt-clock { display: grid; min-width: 118px; padding: 2px 10px; background: #070d16; border: 1px solid var(--border); border-radius: 4px; cursor: pointer; line-height: 1.15; font-variant-numeric: tabular-nums; }
.mt-clock b { font-size: 19px; font-weight: 500; color: var(--gold); }
.mt-clock small { font-size: 11px; color: var(--muted); }
.mt .mt-bpm { width: 72px; }
.mt .mt-ts, .mt .mt-grid { width: auto; }
.mt-master-meter { width: 160px; height: 22px; background: #070d16; border-radius: 4px; }
@keyframes mt-blink { to { visibility: hidden; } }

/* Timeline scroller: a sticky canvas stage, a sticky corner and sticky track headers */
.mt-scroll { position: relative; overflow: auto; min-height: 0; background: var(--mt-bg); overscroll-behavior: contain; scrollbar-color: var(--border) var(--mt-bg); }
.mt-scroll:focus-visible { outline-offset: -2px; }
.mt-content { position: relative; }
.mt-stage { position: sticky; top: 0; left: 0; z-index: 1; }
.mt-canvas, .mt-overlay { position: absolute; left: 0; top: 0; display: block; }
.mt-canvas { touch-action: none; }
.mt-overlay { z-index: var(--z-raised); pointer-events: none; }
.mt-corner { position: sticky; left: 0; top: 0; z-index: 4; width: var(--mt-head-w); height: 34px; margin-bottom: -34px; display: flex; align-items: center; gap: 4px; padding: 0 6px; background: var(--surface); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); box-sizing: border-box; }
.mt-corner .btn-sm { padding: 4px 8px; font-size: 12px; }
.mt-heads { position: sticky; left: 0; z-index: 3; width: var(--mt-head-w); margin-top: 34px; }
.mt-empty { padding: 14px 10px; margin: 0; }
.mt-head { position: absolute; left: 0; right: 0; display: flex; box-sizing: border-box; background: var(--mt-bg2); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); border-left: 4px solid var(--c, var(--gold)); overflow: hidden; }
.mt-head.sel { background: #172742; }
.mt-head.dragging { z-index: 5; opacity: .85; box-shadow: 0 6px 18px rgba(0,0,0,.5); }
.mt-hbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 4px 6px; }
.mt-hl1, .mt-hl2, .mt-hl3 { display: flex; align-items: center; gap: 4px; min-width: 0; }
.mt-hl3 input[type=range] { flex: 1; min-width: 0; }
.mt-hl3 > .small { width: 26px; flex: none; }
.mt .mt-tname { flex: 1; min-width: 0; font-weight: 600; background: transparent; border-color: transparent; padding: 2px 4px; }
.mt .mt-tname:hover, .mt .mt-tname:focus { background: var(--navy); border-color: var(--border); }
.mt .mt-autosel { max-width: 100%; font-size: 12px; padding: 2px 4px; }
.mt-grip { width: 10px; height: 18px; flex: none; cursor: grab; background: radial-gradient(circle, var(--muted) 1px, transparent 1.5px) 0 0 / 5px 5px; opacity: .6; }
.mt-ttype { font: 500 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 3px 4px; border: 1px solid var(--border); border-radius: 4px; flex: none; }
.mt-hb { min-width: 26px; height: 24px; padding: 0 6px; border: 1px solid var(--border); border-radius: 4px; background: var(--card); color: var(--muted); font: 600 12px/1 var(--body); cursor: pointer; flex: none; }
.mt-hb:hover { color: var(--text); border-color: var(--gold); }
.mt-hb.on { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.mt-hb.solo.on { background: var(--info); border-color: var(--info); color: var(--paper); }
.mt-hb.arm.on { background: var(--onair); border-color: var(--onair); color: var(--paper); }
.mt-hb.mon.on { background: var(--ok); border-color: var(--ok); color: var(--navy); }
.mt-hb.fx.on { background: transparent; color: var(--gold); border-color: var(--gold-dim); }
.mt-hmeter { width: 8px; flex: none; align-self: stretch; margin: 4px 4px 4px 0; background: #070d16; border-radius: 4px; height: auto; }
.mt-hresize { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; cursor: ns-resize; }
.mt-hresize:hover { background: var(--gold-dim); }
.mt-head.collapsed .mt-hl2, .mt-head.collapsed .mt-hl3, .mt-head.collapsed .mt-hmeter, .mt-head.collapsed .mt-ttype { display: none; }
.mt.is-recording .mt-scroll { box-shadow: inset 0 0 0 2px var(--onair); }
.mt.kb-piano .mt-status::after { content: "Keyboard piano on — letter keys play notes"; color: var(--gold); margin-left: auto; }

.mt-navigator { display: block; width: 100%; height: 34px; cursor: pointer; border-top: 1px solid var(--border); touch-action: none; }

/* Dock */
.mt-dock { display: grid; grid-template-rows: auto minmax(0, 1fr); height: clamp(200px, 34vh, 340px); border-top: 1px solid var(--border); background: var(--surface); min-height: 0; }
.mt-dock.closed { height: auto; }
.mt-dock.closed .mt-dock-body { display: none; }
.mt-dock-tabs { display: flex; gap: 2px; overflow-x: auto; padding: 4px 8px 0; border-bottom: 1px solid var(--border); scrollbar-width: thin; }
.mt-tab { background: transparent; border: 1px solid transparent; border-bottom: 0; border-radius: 4px 4px 0 0; color: var(--muted); padding: 6px 12px; cursor: pointer; white-space: nowrap; font-size: 13px; }
.mt-tab:hover { color: var(--text); }
.mt-tab.on { color: var(--text); background: var(--card); border-color: var(--border); margin-bottom: -1px; }
.mt-dock-body { overflow: auto; padding: 10px 12px; min-height: 0; }
.mt-ph { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin-bottom: 10px; }
.mt-ph .field { margin: 0; }
.mt-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 4px 10px; font-size: 12px; background: var(--mt-bg2); border-top: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.mt-link { background: none; border: 0; padding: 0; color: var(--ink-soft); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.mt .mt-num { width: 64px; }

/* Effects */
.mt-fxlist { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); align-items: start; }
.mt-fx { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.mt-fx.off { opacity: .6; }
.mt-fx > summary { display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer; font-weight: 600; list-style: none; }
.mt-fx > summary::-webkit-details-marker { display: none; }
.mt-fx > summary::before { content: "\25B8"; color: var(--muted); transition: transform .15s; }
.mt-fx[open] > summary::before { transform: rotate(90deg); }
.mt-fx-btns { margin-left: auto; display: flex; gap: 3px; }
.mt-params { display: grid; gap: 6px; padding: 4px 10px 10px; }
.mt-param { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 1.1fr); gap: 2px 10px; align-items: center; font-size: 12px; }
.mt-param label { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; color: var(--muted); font-weight: 400; margin: 0; min-width: 0; }
.mt-param output { color: var(--text); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mt-param input[type=range], .mt-param select { width: 100%; }
.mt-param input[type=checkbox] { justify-self: start; }
.mt-param .mt-link { grid-column: 2; justify-self: start; }
.mt-fx > summary input[type=checkbox] { flex: none; margin: 0; }
.mt-fx > summary b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Mixer */
.mt-mixer { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; align-items: stretch; }
.mt-strip { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 84px; flex: none; padding: 6px 4px; background: var(--card); border: 1px solid var(--border); border-top: 3px solid var(--c, var(--gold)); border-radius: 4px; }
.mt-strip.sel { border-color: var(--gold); }
.mt-strip.master { width: 96px; background: #22304a; }
.mt-strip.group { background: #1b2940; }
.mt-strip-name { font-size: 12px; font-weight: 600; width: 100%; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-strip-mid { display: flex; gap: 4px; align-items: stretch; height: 124px; }
.mt .mt-fader { writing-mode: vertical-lr; direction: rtl; width: 22px; height: 120px; }
.mt-smeter { height: 120px; background: #070d16; border-radius: 4px; }
.mt-strip-btns { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.mt-strip .mt-pan { width: 70px; }

/* Takes, history, clips, spectrum */
.mt-takes { display: grid; gap: 6px; }
.mt-take { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.mt-take-cv { width: 100%; height: 44px; background: var(--mt-lane); border-radius: 4px; cursor: crosshair; touch-action: none; }
.mt-take-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.mt-history li { display: flex; gap: 8px; padding: 3px 0; }
.mt-history button.future { opacity: .5; }
.mt-history button.on { color: var(--gold); font-weight: 600; }
.mt-history button { background: none; border: 0; color: inherit; padding: 2px 4px; cursor: pointer; text-align: left; }
.mt-history button:hover { text-decoration: underline; }
.mt-cliptable td, .mt-cliptable th { padding: 4px 8px; font-size: 12px; }
.mt-spec, .mt-spectro { display: block; max-width: 100%; background: #070d16; border-radius: 4px; }

/* Piano roll */
.mt-roll { overflow: hidden; border: 1px solid var(--border); border-radius: 4px; background: var(--mt-bg); }
.mt-roll-cv { display: block; touch-action: none; cursor: crosshair; }

/* Dialogs, popups, toasts */
.mt-dialog { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 18px 20px; width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.mt-dialog.wide { width: min(860px, calc(100vw - 32px)); }
.mt-dialog::backdrop { background: rgba(4, 8, 14, .7); }
.mt-dialog h3 { margin: 0 0 10px; font: 700 22px/1.1 var(--display); letter-spacing: .02em; }
.mt-dialog form { display: grid; gap: 10px; }
.mt-dialog.wide form { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); align-items: start; }
.mt-dialog.wide form > h3, .mt-dialog.wide form > p, .mt-dialog.wide form > .actions, .mt-dialog.wide form > div:not(.field) { grid-column: 1 / -1; }
.mt-dialog .field { margin: 0; display: grid; gap: 4px; }
.mt-dialog .field > label { font-size: 13px; }
.mt-dialog .field output { font-size: 12px; color: var(--muted); }
.mt-dialog input[type=range] { padding: 0; accent-color: var(--gold); }
.mt-dialog input[type=color] { width: 60px; height: 32px; padding: 2px; }
.mt-dialog .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 6px; }
.mt-dialog .bad:empty { display: none; }
.mt-progress { width: min(380px, calc(100vw - 32px)); }
.mt-progress progress { width: 100%; height: 10px; accent-color: var(--gold); }
.mt-popup { position: fixed; z-index: var(--z-modal); min-width: 220px; max-height: calc(100dvh - 8px); overflow-y: auto; padding: 4px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 34px rgba(0,0,0,.55); }
.mt-popup button { display: flex; width: 100%; justify-content: space-between; gap: 18px; align-items: center; padding: 6px 10px; background: none; border: 0; border-radius: 4px; color: var(--text); font: 14px var(--body); cursor: pointer; text-align: left; }
.mt-popup button:hover:not([disabled]), .mt-popup button:focus-visible { background: var(--navy); outline: none; }
.mt-popup button[disabled] { color: var(--muted); opacity: .55; cursor: default; }
.mt-popup hr { border: 0; border-top: 1px solid var(--border); margin: 4px 2px; }
.mt-toasts { position: fixed; right: 16px; bottom: 16px; z-index: var(--z-toast); display: grid; gap: 8px; max-width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.mt-toast { padding: 10px 14px; background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--info); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.45); pointer-events: auto; font-size: 14px; }
.mt-toast.error { border-left-color: var(--onair); }
.mt-toast.ok { border-left-color: var(--ok); }
.mt-toast.warn { border-left-color: var(--warn); }
.mt-palette { display: grid; gap: 8px; }
.mt-palette li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 4px; cursor: pointer; }
.mt-palette li.on, .mt-palette li:hover { background: var(--navy); }
.mt-palette li.on { box-shadow: inset 3px 0 0 var(--gold); }
.mt-shortcuts td { vertical-align: middle; }
.mt-shortcuts td kbd { margin-right: 4px; }
.mt-libsearch { display: grid; gap: 8px; }
.mt-libsearch .rows { max-height: 320px; overflow-y: auto; }

/* Beat maker */
.mt-dialog.mt-beat { width: min(1100px, calc(100vw - 24px)); }
.mt-dialog input, .mt-dialog select, .mt-popup input { padding: 6px 8px; font-size: 14px; }
.mt-dialog .mt-ph input:not([type=checkbox]), .mt-dialog .mt-ph select, .mt-beat-ctl select, .mt-step-head select, .mt-dialog .mt-num { width: auto; }
.mt-dialog .mt-ph input[type=range], .mt-beat-ctl input[type=range], .mt-step-head input[type=range] { padding: 0; border: 0; background: transparent; accent-color: var(--gold); }
.mt-beat h4 { margin: 4px 0 0; }
.mt-beat-root > p.small { margin: 0; }
.mt-dock-body select, .mt-dock-body input { max-width: 100%; }
.mt-beat-root { display: grid; gap: 12px; min-width: 0; }
.mt-beat-head { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.mt-beat-ctl { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; }
.mt-beat-ctl input[type=range] { width: 100px; }
.mt-comp { display: grid; grid-template-columns: repeat(var(--bars, 8), minmax(34px, 1fr)); grid-auto-rows: 28px; gap: 2px; overflow-x: auto; padding: 4px; background: var(--mt-bg); border: 1px solid var(--border); border-radius: 4px; }
.mt-comp-bar { grid-row: 1; font: 10px/28px var(--mono); color: var(--muted); text-align: center; border-left: 1px solid var(--mt-grid2); cursor: pointer; }
.mt-comp-bar:nth-child(4n+1) { color: var(--text); }
.mt-block { grid-row: 2; position: relative; display: flex; align-items: center; padding: 0 12px 0 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; background: var(--gold-dim); color: var(--paper); border-radius: 4px; font-size: 12px; cursor: grab; touch-action: none; user-select: none; }
.mt-block.editing { outline: 2px solid var(--gold); }
.mt-block.sel { background: var(--gold); color: var(--navy); }
.mt-block.locked { cursor: default; background: #5a4c26; }
.mt-block-h { position: absolute; right: 0; top: 0; bottom: 0; width: 8px; cursor: ew-resize; background: rgba(255,255,255,.18); }
.mt-steps-wrap { max-height: 46vh; }
.mt-steps { display: grid; grid-template-columns: 270px repeat(var(--steps, 16), 24px); gap: 2px; align-items: center; min-width: max-content; }
.mt-step-head { font-size: 12px; display: flex; gap: 4px; align-items: center; position: sticky; left: 0; background: var(--surface); z-index: 1; padding-right: 4px; }
.mt-step-head select { width: 124px; }
.mt-step-head input[type=range] { width: 56px; }
.mt-step { width: 24px; height: 24px; padding: 0; border: 1px solid var(--border); border-radius: 4px; background: var(--mt-lane); cursor: pointer; touch-action: none; }
.mt-step.beat { background: var(--mt-lane2); }
.mt-step.bar { border-left: 2px solid var(--muted); }
.mt-step.on { background: rgba(201, 168, 76, calc(.3 + var(--v, 1) * .7)); border-color: var(--gold); }
.mt-step.playing { box-shadow: inset 0 0 0 2px var(--paper); }
.mt-step:disabled { cursor: default; opacity: .7; }
.mt-kitmaker { display: grid; gap: 6px; }
.mt-kitmaker .row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 13px; }

/* Phones and narrow windows */
@media (max-width: 900px) {
  .main:has(> .mt) { padding-inline: 8px; }
  .mt { height: calc(100dvh - 90px); min-height: 480px; }
  :is(.ico-go-start, .ico-rewind, .ico-play, .ico-stop, .ico-record, .ico-forward, .ico-go-end) + .lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .mt-tbtn { padding: 4px 8px; }
  .mt-tgroup { flex-wrap: wrap; }
  .mt-mm { display: none; }
  .mt-menus { order: 3; width: 100%; }
  .mt-dock { height: clamp(180px, 30vh, 280px); }
}
@media (max-width: 700px) {
  .mt-top { padding: 6px 8px; }
  .mt-top-r .btn-sm:not(.btn-gold) { display: none; }
  .mt-top-l { flex-basis: 100%; }
  .mt-top-r { margin-left: auto; }
  .mt-top-l .btn-sm { white-space: nowrap; }
  .mt .mt-title { font-size: 18px; }
  .mt-tbtn { min-height: 30px; padding: 3px 7px; font-size: 12px; }
  .mt-corner { padding: 0 3px; gap: 3px; }
  .mt-corner .btn-sm { font-size: 11px; padding: 3px 5px; white-space: nowrap; }
  .mt-ttype { display: none; }
  .mt-hbody { padding: 3px 4px; gap: 3px; }
  .mt-hb { min-width: 20px; height: 22px; padding: 0 3px; font-size: 11px; }
  .mt-hl2 { gap: 2px; }
  .mt-hmeter { margin-right: 2px; width: 6px; }
  .mt-tab { padding: 6px 9px; }
  .mt-dock-body { padding: 8px; }
  .mt-transport { gap: 4px 8px; }
  .mt-tempo .small { display: none; }
  .mt-clock { min-width: 96px; }
  .mt-clock b { font-size: 16px; }
  .mt-dialog.wide form { grid-template-columns: 1fr; }
  .mt-steps { grid-template-columns: 240px repeat(var(--steps, 16), 26px); }
  .mt-step-head select { width: 100px; }
  .mt-step { width: 26px; height: 26px; }
  .mt-status { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .mt-tbtn.rec.on .ico { animation: none; }
  .mt-fx > summary::before { transition: none; }
}
@media print { .mt { display: none; } }

/* ── 1.3: listener email, spot recordings, guest studio, restart ───────── */
.pre-wrap { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0 0; }
.mail-card, .take-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); padding: 12px 14px; display: grid; gap: 8px; }
.mail-card + .mail-card, .take-card + .take-card { margin-top: 10px; }
.mail-head, .take-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 12px; flex-wrap: wrap; }
.mail-head p { margin: 2px 0 0; }
.mail-body summary { cursor: pointer; color: var(--muted); }
.mail-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.mail-do { flex: 1 1 100%; }
.mail-do > summary { list-style: none; display: inline-flex; }
.mail-do > summary::-webkit-details-marker { display: none; }
.mail-do[open] > summary { border-color: var(--gold); }
.mail-do form { margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.take-card audio { width: 100%; max-width: 520px; }
.take-note { margin: 0; padding: 8px 10px; border-left: 3px solid var(--warn); background: var(--surface); }
.take-form { display: grid; gap: 8px; }
.take-form textarea { max-width: 520px; }
.restart-form .field { min-width: 200px; }
body.bare { background: var(--navy); }
.bare-main { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; display: grid; gap: 16px; }
.bare-brand { display: flex; align-items: center; gap: 10px; margin: 0; }
.bare-brand b { display: block; font: 700 22px/1 var(--display); }
.bare-brand small { display: block; font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.guest h1 { font-size: clamp(28px, 6vw, 40px); margin-bottom: 10px; }
.guest-steps { padding-left: 20px; display: grid; gap: 4px; }
.guest-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0; }
.guest-meter { height: 14px; border-radius: 8px; background: var(--card); border: 1px solid var(--border); overflow: hidden; }
.guest-meter span { display: block; height: 100%; width: 0; background: var(--ok); transition: width .08s linear; }
.guest-meter span.hot { background: var(--onair); }
.guest-time { font-size: 40px; margin: 10px 0 4px; font-variant-numeric: tabular-nums; }
.guest.is-recording .guest-time { color: var(--onair-text); }
.guest.is-recording .guest-time::before { content: "\25CF\FE0E  "; font-size: 24px; vertical-align: middle; }
@media (prefers-reduced-motion: reduce) { .guest-meter span { transition: none; } }

/* Multitrack 1.3 */
.mt-ttype.duck-key { color: var(--gold); border-color: var(--gold-dim); }
.mt-ttype.duck-duck { color: var(--info); border-color: color-mix(in srgb, var(--info) 50%, transparent); }
.mt-comments { display: grid; gap: 6px; }
.mt-comments li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 4px; background: var(--card); }
.mt-comments li.focus { border-color: var(--info); box-shadow: inset 3px 0 0 var(--info); }
.mt-comments li.resolved { opacity: .55; }
.mt-comment-body p { margin: 4px 0 0; }
.mt-transcript { max-height: 100%; overflow-y: auto; line-height: 1.9; font-size: 15px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 4px; background: var(--mt-bg); }
.mt-transcript .w { cursor: pointer; border-radius: 4px; padding: 1px 1px; }
.mt-transcript .w:hover { background: var(--card); }
.mt-transcript .w.filler { color: var(--warn); }
.mt-transcript .w.hit { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.mt-transcript .w.on { background: var(--gold); color: var(--navy); }
.mt-transcript .w.playing { box-shadow: inset 0 -2px 0 var(--ok); }
.mt-transcript .gap { font: 11px var(--mono); color: var(--muted); padding: 1px 5px; margin: 0 3px; border: 1px dashed var(--border); border-radius: 4px; }
.mt-dialog .mt-share .rows li { justify-content: space-between; align-items: center; }
.mt-dialog .mt-share select { width: auto; }
.mt-linkrow { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.mt-linkrow input { font-family: var(--mono); font-size: 12px; }
.mt-dialog .mt-guestlinks .mt-ph input { flex: 1 1 200px; }
.mt-loud th { font-weight: 400; color: var(--muted); }
.mt-dialog .warn-text { color: var(--warn); }

/* ── Maintenance mode (1.3) ─────────────────────────────────────────────── */
.maint-page h1 { margin: 4px 0 10px; }
.maint-page .lead { font-size: 17px; margin: 0 0 12px; }
.maint-page .maint-live { margin: 16px 0 6px; }
.maint-page .maint-live .dot-live { display: inline-block; margin-right: 6px; vertical-align: middle; }
.dot-live { width: 9px; display: inline-block; height: 9px; border-radius: 50%; background: var(--onair); box-shadow: 0 0 0 3px color-mix(in srgb, var(--onair) 25%, transparent); flex: none; }
.maint-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between;
             margin: 0 0 14px; padding: 10px 12px; border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
             border-left-width: 4px; border-radius: 8px; background: color-mix(in srgb, var(--warn) 10%, transparent); }
.maint-bar b { font-weight: 600; }
.maint-bar .btn { flex: none; }

/* Provider pickers (1.4): only the chosen provider's fields are shown. */
.ok-text { color: var(--ok); }
.settings .prov[hidden] { display: none !important; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-row .btn { margin-top: 0; }
.lvl-note { max-width: 32ch; }
.confirm.armed { outline: 2px solid var(--gold); outline-offset: 2px; }
.confirm-note { display: block; margin-top: 6px; color: var(--text); max-width: 46ch; }
.stats + .stack { margin-top: 16px; }
.toolbar select.fit { width: auto; min-width: 12rem; }

/* Mixer board / control surface (1.9) */
.live-midi .toolbar { margin-bottom: 4px; }
.midi-map td { vertical-align: middle; }
.midi-map .row-actions { white-space: nowrap; }
.midi-hint { display: block; }

/* ── Report / Suggest and the wish list (1.10) ──────────────────────────── */
.tkt { position: fixed; right: 16px; bottom: 16px; z-index: 40;
       padding-bottom: env(safe-area-inset-bottom, 0px); display: flex; flex-direction: column;
       align-items: flex-end; gap: 8px; }
.tkt-open { display: inline-flex; align-items: center; gap: 6px; font: 600 13px/1 var(--body);
            padding: 9px 13px; border-radius: 12px; text-decoration: none;
            background: var(--card); color: var(--muted); border: 1px solid var(--border);
            box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.tkt-open:hover, .tkt.open .tkt-open { border-color: var(--gold); color: var(--gold); }
.tkt-open span { font-size: 14px; }
.tkt-panel { width: min(28rem, calc(100vw - 32px)); max-height: min(34rem, calc(100vh - 100px)); overflow: auto;
             background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px;
             box-shadow: 0 14px 40px rgba(0, 0, 0, .5); }
.tkt-panel form { display: flex; flex-direction: column; gap: 10px; }
.tkt-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tkt-head b { font: 600 17px/1.1 var(--display); letter-spacing: .01em; }
.tkt-x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 4px; line-height: 1; }
.tkt-x:hover { color: var(--text); }
.tkt-where { margin: -4px 0 0; color: var(--muted); }
.tkt-where code { font-family: var(--mono); color: var(--gold); }
.tkt-auto { margin: 0; }
.tkt-auto.has-errors { color: var(--warn); }
.tkt-actions { display: flex; gap: 8px; align-items: center; }
@media (max-width: 860px) { .tkt { right: 10px; bottom: 10px; } }
@media print { .tkt { display: none !important; } }

.tk-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.tk-counts a { text-decoration: none; }
.tk-counts .chip.on { color: var(--text); border-color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, transparent); }
.tk-list { display: flex; flex-direction: column; gap: 12px; }
.tk { border: 1px solid var(--border); border-left-width: 4px; border-radius: 8px; padding: 14px; background: var(--card); }
.tk.pri-high { border-left-color: var(--onair); }
.tk.st-done { border-left-color: var(--ok); opacity: .72; }
.tk.st-declined { border-left-color: var(--muted); opacity: .6; }
.tk.st-doing { border-left-color: var(--info); }
.tk.st-planned { border-left-color: var(--gold); }
.tk-top { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; justify-content: space-between; }
.tk-top h4 { margin: 0; color: var(--text); font: 600 16px/1.3 var(--body); text-transform: none; letter-spacing: 0; }
.tk-id { font: 500 12px/1 var(--mono); color: var(--muted); }
.tk-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.tk-detail { margin: 10px 0 0; white-space: pre-wrap; }
.tk-note { margin: 8px 0 0; padding-left: 10px; border-left: 2px solid var(--gold-dim); color: var(--muted); white-space: pre-wrap; }
.tk-errs { margin: 10px 0 0; }
.tk-errs summary { cursor: pointer; color: var(--warn); font-size: 13px; }
.tk-errs pre { margin: 8px 0 0; padding: 10px; overflow-x: auto; background: var(--navy);
               border: 1px solid var(--border); border-radius: var(--radius);
               font: 400 12px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; }
.tk-triage { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin: 12px 0 0;
             padding-top: 12px; border-top: 1px solid var(--border); }
.tk-triage .field { flex: 0 1 9rem; }
.tk-triage .field.grow { flex: 1 1 14rem; }
.tk-triage label { font-size: 12px; color: var(--muted); }
.tk-del { margin-left: auto; }

/* ── 1.11: call-in line ─────────────────────────────────────────────── */
.live-calls { grid-column: 1 / -1; }
.live-calls .toolbar { gap: 12px; flex-wrap: wrap; }
.call-list { display: grid; gap: 10px; margin: 10px 0; }
.caller { border: 1px solid var(--border); border-left: 4px solid var(--muted); border-radius: var(--radius); padding: 12px; background: var(--card); display: grid; gap: 8px; }
.caller[data-state=waiting] { border-left-color: var(--warn); }
.caller[data-state=waiting] .caller-name::before { content: "\260E\FE0E  "; color: var(--warn); }
.caller[data-state=hold] { border-left-color: var(--warn); }
.caller[data-state=private] { border-left-color: var(--ok); }
.caller[data-state=air] { border-left-color: var(--onair); box-shadow: 0 0 0 1px color-mix(in srgb, var(--onair) 40%, transparent); }
.caller[data-state=ended] { opacity: .55; }
.caller-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.caller-name { font-size: 17px; }
.caller-topic:empty { display: none; }
.caller-topic { margin: 0; }
.caller .ch-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.caller .ch-controls label { display: inline-flex; gap: 6px; align-items: center; }
.caller .chat-list { height: auto; max-height: 120px; }
.caller .chat-list:empty { display: none; }
.caller .chat-form { margin-top: 0; }
.seg { display: inline-flex; }
.seg .btn { border-radius: 0; margin-left: -1px; }
.seg .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); margin-left: 0; }
.seg .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.call-lines summary { cursor: pointer; font-weight: 600; margin: 6px 0; }
.call-line-form { align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.call-line-form .field:first-child { flex: 1 1 260px; }
#lineList li { align-items: center; }
.line-url { flex: 1 1 260px; min-width: 0; }
@media (max-width: 640px) { .seg .btn { padding-left: 8px; padding-right: 8px; } }

/* caller's page */
.callin .call-state { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 20px; margin: 6px 0 4px; }
.callin .call-state .mono { color: var(--muted); font-size: 16px; }
.callin[data-state=waiting] .lamp, .callin[data-state=connecting] .lamp { background: var(--warn); }
.callin[data-state=hold] .lamp { background: var(--warn); }
.callin[data-state=private] .lamp { background: var(--ok); }
.callin[data-state=air] .lamp { background: var(--onair); box-shadow: 0 0 12px var(--onair); }
.callin[data-state=air] .call-state b { color: var(--onair-text); }
.callin .ch-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.callin .chat-list { height: clamp(100px, 24vh, 200px); }
.callin .chat-list:empty::before { content: "No messages yet."; color: var(--muted); font-size: 13px; }
@media (prefers-reduced-motion: no-preference) {
  .callin[data-state=waiting] .lamp { animation: pulse 1.6s ease-in-out infinite; }
}
.callin .actions { margin-top: 14px; }

/* 1.11 call-in: video, hands, reactions, room */
.call-status { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.call-tools { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 8px 0; }
.call-note:empty { display: none; }
.call-list { display: flex; flex-direction: column; }
.caller { position: relative; overflow: hidden; }
.caller.has-hand { border-left-color: var(--gold); }
.caller-videos { display: none; gap: 8px; flex-wrap: wrap; }
.caller-videos.has-video { display: flex; }
.vid { margin: 0; position: relative; background: var(--ink); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.vid video { display: block; width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.vid figcaption { position: absolute; left: 6px; bottom: 4px; font: 500 11px/1.2 var(--mono); color: var(--paper); background: rgba(0,0,0,.55); padding: 2px 6px; border-radius: 4px; }
.caller-videos .vid { width: min(360px, 100%); aspect-ratio: 16 / 9; }
.vid-mine { width: 160px; aspect-ratio: 16 / 9; }
.call-room { margin: 12px 0; }
.call-room .chat-list { height: 150px; }
.call-room .chat-list:empty::before { content: "Messages here reach every caller you've picked up."; color: var(--muted); font-size: 13px; }
.reactions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.reactions .react { font-size: 18px; line-height: 1; padding: 6px 8px; }
.react-float { position: absolute; bottom: 10px; font-size: 30px; pointer-events: none; z-index: 5; animation: react-up 1.6s ease-out forwards; }
@keyframes react-up { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-120px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .react-float { animation: none; opacity: .9; } }
.call-lines { margin-top: 6px; }
.call-line-form .check { flex: 1 1 100%; }
.linklike { background: none; border: 0; padding: 0; color: var(--gold); text-decoration: underline; cursor: pointer; font: inherit; }
/* caller's page */
.callin { position: relative; overflow: hidden; }
.call-video { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; margin: 10px 0; }
.call-video .vid { aspect-ratio: 16 / 9; }
.callin .chat-list li.room b { color: var(--info); }
.callin .chat-list li.staff b { color: var(--gold); }
.callin .chat-form select { flex: 0 0 auto; max-width: 45%; }
.call-line-form { display: flex; flex-wrap: wrap; }
.call-line-form .check { order: 3; align-items: center; }

/* 1.11 safety delay */
.safety.armed { border-color: color-mix(in srgb, var(--warn) 60%, var(--border)); }
.dump-btn { font-weight: 800; letter-spacing: .08em; min-width: 96px; }
.dump-btn.fired, .bleep-btn.fired { box-shadow: 0 0 0 3px color-mix(in srgb, var(--onair) 55%, transparent); }
.bleep-btn { user-select: none; -webkit-user-select: none; touch-action: none; }

/* 1.11 Call-in Pro */
.clip-tools { margin-top: 0; }
.clip-suggest { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--gold); border-radius: var(--radius); background: color-mix(in srgb, var(--gold) 10%, transparent); margin: 8px 0; }
.clip-box, .notes-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; margin: 8px 0; background: var(--card); display: grid; gap: 8px; }
.clip-box audio { width: 100%; }
.notes-box pre { white-space: pre-wrap; font: inherit; margin: 0; }
.caller-screen { margin: 0; color: var(--text); }
.caller-screen.bad { color: var(--onair-text); }
.caller-cap { margin: 0; font-style: italic; color: var(--text); }
.caller.is-winner { border-left-color: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 60%, transparent); }
.contest-live { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0; }
.contest-live p { margin: 0; font-weight: 600; }
.contest-win { color: var(--gold); font-size: 17px; }
#contestHist pre { white-space: pre-wrap; max-height: 200px; overflow: auto; }
/* caller page */
.contest-banner { padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); font-weight: 600; margin: 8px 0; }
.contest-banner.open { border-color: var(--warn); color: var(--warn); }
.contest-banner.won { border-color: var(--gold); color: var(--gold); font-size: 20px; }
.screener { border: 1px dashed var(--info); border-radius: var(--radius); padding: 10px 12px; margin: 8px 0; }
.screener p { margin: 0 0 6px; }
.subtitles { border-left: 3px solid var(--info); padding: 6px 10px; margin: 8px 0; }
.subtitles ol { margin: 4px 0 0; display: grid; gap: 4px; }
.callin[data-state=callback] .lamp { background: var(--info); }
/* Eagle */
.eagle-talk { display: grid; justify-items: center; gap: 8px; margin: 16px 0; text-align: center; }
.eagle-orb { width: 96px; height: 96px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--gold), var(--gold-dim)); box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 18%, transparent); }
.eagle[data-state=listening] .eagle-orb { box-shadow: 0 0 0 10px color-mix(in srgb, var(--ok) 35%, transparent); }
.eagle[data-state=recording] .eagle-orb { background: radial-gradient(circle at 35% 35%, #ff7a7e, var(--onair)); }
.eagle[data-state=thinking] .eagle-orb { opacity: .7; }
.eagle-say { font-size: 20px; max-width: 34ch; margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .eagle[data-state=speaking] .eagle-orb, .eagle[data-state=listening] .eagle-orb { animation: pulse 1.4s ease-in-out infinite; }
}
/* Schedule integrity check (1.12) */
.sched-findings { display: flex; flex-direction: column; gap: 10px; }
.sched-findings .sf { border-left: 3px solid var(--border); padding: 2px 0 2px 12px; display: flex; flex-direction: column; gap: 2px; }
.sched-findings .sf b { font-weight: 600; }
.sched-findings .sf span { display: block; }
.sf-error { border-left-color: var(--onair); }
.sf-warn  { border-left-color: var(--warn); }
.sf-info  { border-left-color: var(--info); }

/* Studio check (1.12) */
.ck-summary h3 { margin-bottom: 4px; }
.ck-summary.ck-error { border-left: 4px solid var(--onair); }
.ck-summary.ck-warn  { border-left: 4px solid var(--warn); }
.ck-summary.ck-ok    { border-left: 4px solid var(--ok); }
.ck-list { display: flex; flex-direction: column; gap: 14px; }
.ck { display: flex; gap: 12px; align-items: flex-start; }
.ck-mark { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
           font: 700 12px/1 var(--body); margin-top: 1px; }
.ck-ok    .ck-mark { background: color-mix(in srgb, var(--ok) 20%, transparent); color: var(--ok); }
.ck-warn  .ck-mark { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.ck-error .ck-mark { background: color-mix(in srgb, var(--onair) 22%, transparent); color: var(--onair-text); }
.ck-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ck-body b { font-weight: 600; }
.ck-body span { display: block; overflow-wrap: anywhere; }

/* ── 1.14 scheduling ───────────────────────────────── */
.card-row { border-top: 1px solid var(--border); padding: 14px 0; }
.card-row:first-of-type { border-top: 0; }
.card-row p { margin: 0 0 6px; }
.kind-special { border-left-color: var(--ok); }
.kind-fillin { border-left-color: var(--warn); }
.legend .chip.kind-special { border-left: 3px solid var(--ok); }
.slot.replaced { opacity: .5; text-decoration: line-through; }
.publish-days { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.app-photo { border-radius: var(--radius); object-fit: cover; max-width: 100%; height: auto; }

/* 1.14.2/1.14.3 — DJ editor: shows + application panels (CSP blocks inline styles) */
.dj-shows-panel, .dj-app-panel { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }
.dj-shows-panel h3 { margin: 0 0 10px; }
.dj-app-panel h3 { margin: 0; }
.dj-shows-add { margin-top: 12px; }
.dj-shows-add > form { margin-top: 12px; }
.publish-days .check { margin: 0; }

/* 1.14.3 — Updates page, laid out like the website's Back Office → Updates */
.upd-sub { color: var(--muted); max-width: 900px; margin: 4px 0 18px; line-height: 1.55; }
.upd-ver { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.upd-ver b { font: 700 28px/1.1 var(--display); color: var(--gold); }
.upd-card { border-left: 3px solid var(--gold); margin-bottom: 16px; }
.upd-card.ready { border-left-color: var(--ok); }
.upd-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.upd-top strong { font-size: 16px; color: var(--text); }
.upd-muted { color: var(--muted); font-size: 13px; line-height: 1.5; }
.upd-gap { margin: 14px 0 0; }
.upd-notes { white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; max-height: 260px; overflow: auto; margin: 10px 0; }
.upd-card details summary { cursor: pointer; margin-top: 8px; }
.upd-files { list-style: none; margin: 6px 0 12px; padding: 0; max-height: 260px; overflow: auto; font-size: 13px; }
.upd-files li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--border); }
.upd-files code { font-size: 12.5px; color: var(--text); overflow-wrap: anywhere; }
.upd-acts { margin-left: auto; display: flex; gap: 6px; }
.upd-warn { background: color-mix(in srgb, var(--warn) 10%, transparent); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); color: var(--warn); border-radius: 8px; padding: 9px 13px; font-size: 13px; margin: 6px 0; }
.upd-bad { background: color-mix(in srgb, var(--onair) 8%, transparent); border: 1px solid color-mix(in srgb, var(--onair) 35%, transparent); color: var(--onair-text); border-radius: 8px; padding: 11px 14px; font-size: 13.5px; margin-bottom: 16px; }
.upd-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.upd-form input:not([type=hidden]) { max-width: 260px; }
.upd-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px dashed var(--border); border-radius: 12px; padding: 22px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.upd-drop.over, .upd-drop:hover { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 5%, transparent); }
.upd-drop.busy { opacity: .6; pointer-events: none; }
.upd-drop-ico { font-size: 26px; }
.upd-js .upd-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upd-js .upd-nojs { display: none; }
form#updForm:not(.upd-js) .btn { margin-top: 10px; }
@media (max-width: 600px) { .upd-acts { margin-left: 0; width: 100%; } .upd-form input:not([type=hidden]) { max-width: none; flex: 1 1 100%; } }
.nowrap { white-space: nowrap; }
.upd-drop { position: relative; }

/* 1.14.3 — sidebar categories that fold open and shut */
.nav { gap: 2px; }
.nav-cat > summary { list-style: none; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius); cursor: pointer; color: var(--text); font-weight: 600; font-size: 14px; user-select: none; }
.nav-cat > summary::-webkit-details-marker { display: none; }
.nav-cat > summary:hover { background: var(--card); }
.nav-cat > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.nav-cat.has-on > summary { color: var(--gold); }
.nav-ico { width: 20px; display: grid; place-items: center; flex-shrink: 0; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.nav-cat-name { flex: 1; min-width: 0; }
.nav-caret { width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex-shrink: 0; margin-right: 3px; }
.nav-cat[open] > summary .nav-caret { transform: rotate(45deg); }
.nav-badge { font: 600 11px/1 var(--mono); background: var(--onair); color: var(--paper); border-radius: 8px; padding: 3px 6px; }
.nav-items { display: flex; flex-direction: column; gap: 1px; margin: 2px 0 6px 19px; padding-left: 10px; border-left: 1px solid var(--border); }
.nav-items a { padding: 6px 10px; font-size: 13.5px; }
@media (prefers-reduced-motion: reduce) { .nav-caret { transition: none; } }

/* ── 1.16.0 Help: FAQ & how-to ─────────────────────── */
.help-lede { max-width: 70ch; margin-top: 8px; }
.help-meta { color: var(--muted); }
.help-search { display: flex; flex-direction: column; gap: 6px; }
.help-search input { width: 100%; font-size: 17px; padding: 12px 14px; }
.help-search p { margin: 0; }
.help-jump { display: flex; gap: 8px; flex-wrap: wrap; }
.help-section { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 16px; }
.help-section > h2 { border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.help-cat h3 { margin: 6px 0 10px; }
.help-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.help-card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.help-card:hover, .help-card:focus-visible { border-color: var(--gold); color: var(--text); transform: translateY(-2px); }
.help-card img, .help-card-ph { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top left; display: block; background: var(--surface); border-bottom: 1px solid var(--border); }
.help-card-ph { display: grid; place-items: center; font-size: 40px; }
.help-card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.help-card-body b { font-size: 16px; line-height: 1.3; }
.help-card .help-meta { margin-top: auto; padding-top: 6px; }
.help-faq-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.help-faq { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; }
.help-faq > summary { cursor: pointer; padding: 12px 14px; font-weight: 600; list-style: none; display: flex; gap: 10px; align-items: baseline; }
.help-faq > summary::-webkit-details-marker { display: none; }
.help-faq > summary::before { content: "+"; color: var(--gold); font: 600 18px/1 var(--mono); width: 14px; flex: none; }
.help-faq[open] > summary::before { content: "−"; }
.help-faq > summary:hover { color: var(--gold); }
.help-answer { padding: 0 14px 12px 38px; }
.help-answer p:last-child { margin-bottom: 0; }
.help-still { border-color: var(--gold-dim); }
.help-h2 { font-size: 26px; margin-bottom: 14px; }
.help-steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: flex; flex-direction: column; gap: 22px; }
.help-steps > li { counter-increment: step; position: relative; padding-left: 46px; }
.help-steps > li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: var(--navy); font: 700 17px/32px var(--display); text-align: center; }
.help-steps > li > p { margin: 3px 0 10px; max-width: 75ch; }
.help-shot { margin: 0; max-width: 900px; }
.help-shot a { display: inline-block; max-width: 100%; vertical-align: top; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.help-shot img { display: block; width: auto; max-width: 100%; height: auto; }
.help-shot figcaption { display: block; }
.help-shot figcaption { margin-top: 6px; }
.help-video video { display: block; width: 100%; max-width: 960px; height: auto; border-radius: var(--radius); border: 1px solid var(--border); background: var(--ink); }
.help-video p { margin: 8px 0 0; }
.help-tips ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.help-pn { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.help-zoom { max-width: min(96vw, 1400px); max-height: 94vh; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.help-zoom::backdrop { background: rgba(5, 10, 18, .85); }
.help-zoom form { text-align: right; margin-bottom: 8px; }
.help-zoom img { display: block; max-width: 100%; max-height: calc(94vh - 70px); margin: 0 auto; cursor: zoom-out; }
@media (max-width: 640px) {
  .help-steps > li { padding-left: 0; padding-top: 40px; }
  .help-steps > li::before { top: 0; }
  .help-answer { padding-left: 14px; }
}
@media print {
  .help-search, .help-jump, .help-pn, .help-video, #faqAll { display: none; }
}

/* ── 1.83.0: Help → Whole manual (views/help_manual.php) ─────────────── */
.man-toc ol { margin: 0; padding-left: 22px; }
.man-toc > ol { columns: 2 280px; column-gap: 28px; }
.man-toc > ol > li { break-inside: avoid; margin-bottom: 10px; font-weight: 600; }
.man-toc li li { font-weight: 400; margin: 2px 0; }
.man-cat { display: flex; flex-direction: column; gap: 14px; scroll-margin-top: 16px; }
.man-cat-h { border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-top: 10px; }
.man-guide, .man-faq { scroll-margin-top: 16px; }
.man-guide h3 { font-size: 22px; margin-bottom: 4px; }
.man-guide > p { margin: 0 0 16px; max-width: 75ch; }
.man-guide > p a { margin-left: 6px; }
.man-shot img { max-height: 420px; border: 1px solid var(--border); border-radius: var(--radius); }
.man-tips { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); }
.man-tips h4 { margin: 0 0 8px; }
.man-tips ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.man-faq dl { margin: 0; }
.man-faq dt { font-weight: 600; margin-top: 14px; }
.man-faq dt:first-child { margin-top: 4px; }
.man-faq dd { margin: 4px 0 0; max-width: 75ch; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .man-guide h3 { font-size: 19px; }
  .man-guide > p a { display: block; margin: 6px 0 0; }
}
@media print {
  .man-cat { display: block; break-before: page; }
  .man-cat-h { margin-top: 0; }
  .man-guide { margin-bottom: 14px; }
  .man-guide, .man-faq { break-inside: auto; }
  .man-guide h3, .man-faq dt { break-after: avoid; }
  .help-steps > li, .man-faq dd { break-inside: avoid; }
  .man-shot img { max-height: 300px; }
  .man-toc { break-inside: auto; }
  .man-toc a, .man-guide a { text-decoration: none; }
}

/* ── 1.17.0: touch targets ─────────────────────────────────────────────────────
   44px on touch screens. The live/call/multitrack tools keep their own sizing. */
@media (pointer: coarse) {
  .nav a, .nav-cat > summary { min-height: 44px; display: flex; align-items: center; }
  .btn:not(.mt-tbtn):not(.mt-hb) { min-height: 44px; }
  input:not([type=checkbox]):not([type=radio]):not([type=range]), select { min-height: 44px; }
}

/* 1.18: Shows editor — site / login / notes box, import preview */
.src-box { border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px 6px; margin: 4px 0; }
.src-box > legend { font-weight: 600; padding: 0 6px; }
.text-warn { color: var(--warn); }
.import-table td { vertical-align: top; }
.import-table tr.is-error td, .import-table tr.is-clash td { background: color-mix(in srgb, var(--warn) 8%, transparent); }

/* Shows: picking the days a show runs (1.19) */
.day-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.day-presets .btn.is-on { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.day-checks { display: flex; gap: 6px; flex-wrap: wrap; }
.day-check { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 6px 10px; gap: 6px; font: 500 12.5px var(--mono); letter-spacing: .04em; }
.day-check:has(input:checked) { border-color: var(--gold); color: var(--gold); }

/* ── Schedule: the calendar (1.19) ──────────────────
   Day and week are a time grid. Every block is positioned as a PERCENTAGE of
   the day rather than in pixels, so the grid can be any height — tall on a
   monitor, short and scrollable on a phone — without a single number changing.
   --top and --h come from the markup; everything else is here.               */
.cal-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.cal-title { font-size: 20px; margin: 0; flex: 1 1 auto; min-width: 180px; }
.cal-nav, .cal-views { display: flex; gap: 4px; }
.cal-nav .btn { min-width: 34px; }
.cal-views .btn.is-on { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.cal-hint { margin: 10px 0 0; }

.cal-grid-wrap { padding: 0; overflow: hidden; }
/* The gutter has to hold the widest hour label — "12:00 am", eight characters
   of the mono face — with room to spare. It used to be too narrow for it, and
   because the label is positioned from the right it spilled off the left edge
   and was cut off there: every hour read ":00 am". */
.cal-grid { --gutter: 68px; --hour: 46px; }
.cal-head, .cal-body { display: grid; grid-template-columns: var(--gutter) repeat(var(--cols, 7), minmax(96px, 1fr)); }
.cal-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--border); }
.cal-day .cal-head, .cal-day .cal-body { grid-template-columns: var(--gutter) 1fr; }
.cal-dayhead { padding: 8px 6px; text-align: center; border-left: 1px solid var(--border); }
.cal-dayhead a { text-decoration: none; color: var(--text); display: block; }
.cal-dayhead .dh-dow { font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: block; }
.cal-dayhead .dh-num { font-size: 19px; font-weight: 600; }
.cal-dayhead.is-today .dh-num { color: var(--navy); background: var(--gold); border-radius: 50%; display: inline-grid;
  place-items: center; width: 28px; height: 28px; }
.cal-dayhead.is-today .dh-dow { color: var(--gold); }

.cal-body { max-height: 70vh; overflow-y: auto; position: relative; }
.cal-gutter { position: relative; }
.cal-hour { height: var(--hour); position: relative; }
/* left AND right, so the label's width is the gutter's width rather than
   whatever the text happens to need: it can never reach past the left edge. */
.cal-hour span { position: absolute; left: 0; right: 6px; top: -7px; text-align: right;
  font: 400 11px var(--mono); color: var(--muted); white-space: nowrap; }
.cal-hour:first-child span { top: 2px; }

.cal-col { position: relative; border-left: 1px solid var(--border); }
.cal-col.is-today { background: color-mix(in srgb, var(--gold) 5%, transparent); }
.cal-slot { height: var(--hour); border-top: 1px solid color-mix(in srgb, var(--border) 60%, transparent); }
.cal-slot:first-child { border-top: 0; }

.cal-now { position: absolute; left: 0; right: 0; top: var(--top); height: 2px; background: var(--onair); z-index: var(--z-raised); pointer-events: none; }
.cal-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--onair); }

/* A block. Positioned over the slot lines, never between them. */
.ev { position: absolute; left: 3px; right: 3px; top: var(--top); height: var(--h); min-height: 16px;
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--muted);
  border-radius: 4px; padding: 3px 6px; overflow: hidden; display: flex; flex-direction: column; gap: 1px;
  font-size: 12px; z-index: 1; }
.ev:hover, .ev:focus-visible { z-index: 4; box-shadow: 0 2px 10px rgba(0,0,0,.45); }
/* When a show starts is one of the two things worth reading in a block, so it
   is not the smallest text on the page. The tight line box is what pays for
   the extra pixels — a half-hour block is still three lines deep. */
.ev-time { font-size: 12px; line-height: 1.15; color: var(--muted); }
.ev-title { font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.ev-note, .ev-flag { font-size: 11px; color: var(--muted); }
.ev-flag { color: var(--warn); }
.ev-chip { align-self: stretch; margin-top: 2px; max-width: 100%; white-space: normal; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; }
.ev.kind-show { border-left-color: var(--gold); }
.ev.kind-playlist { border-left-color: var(--info); }
.ev.kind-live { border-left-color: var(--onair); }
.ev.kind-game { border-left-color: var(--ok); }
.ev.is-off { opacity: .55; }
.ev.is-cancelled { opacity: .6; border-style: dashed; }
.ev.is-cancelled .ev-title { text-decoration: line-through; }
.ev.is-moved { border-left-style: double; border-left-width: 5px; }
/* A show that runs past midnight keeps going off the bottom rather than
   pretending to stop there. */
.ev.runs-over { border-bottom-left-radius: 0; border-bottom-right-radius: 0;
  border-bottom: 2px dotted color-mix(in srgb, var(--gold) 60%, transparent); }
/* touch-action, like every other draggable surface here: a finger has to be
   able to drag a show, and preventDefault in a pointerdown listener does not
   stop a touch scroll — the browser scrolls instead, fires pointercancel, and
   the drag is thrown away. Without this line the schedule simply cannot be
   edited on a tablet. The gutter and the empty slots still scroll. */
.ev.can-drag { cursor: grab; touch-action: none; }
.ev.can-drag.is-dragging { cursor: grabbing; opacity: .85; z-index: 6; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.ev-grip { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.ev-grip::after { content: ""; position: absolute; left: 50%; bottom: 2px; width: 22px; height: 2px; margin-left: -11px;
  border-radius: 1px; background: color-mix(in srgb, var(--text) 35%, transparent); opacity: 0; }
.ev.can-drag:hover .ev-grip::after, .ev.can-drag:focus-within .ev-grip::after { opacity: 1; }
/* Short blocks have no room for three lines; hide what matters least. The time
   keeps its size here too, so the time and the title share one line instead of
   stacking — a half-hour block still shows both, and a long title trails off
   rather than pushing the time out of the box. */
.ev.is-short .ev-note { display: none; }
.ev.is-short { padding: 1px 6px 2px; font-size: 11px; flex-flow: row wrap; align-items: baseline; gap: 0 5px; }
.ev.is-short .ev-time { line-height: 1.05; }
.ev.is-short .ev-title { line-height: 1.05; flex: 1 1 60px; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; overflow-wrap: normal; }

/* ── Month ───────────────────────────────────────── */
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); }
.cal-dow { background: var(--surface); padding: 6px; text-align: center;
  font: 500 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.cal-cell { background: var(--surface); min-height: 104px; padding: 4px 5px; display: flex; flex-direction: column; gap: 3px; }
.cal-cell.is-out { background: color-mix(in srgb, var(--surface) 70%, var(--navy)); }
.cal-cell.is-out .cal-cell-num { color: var(--muted); opacity: .6; }
.cal-cell.is-today { box-shadow: inset 0 0 0 1px var(--gold); }
.cal-cell-num { align-self: flex-end; font: 500 12px var(--mono); color: var(--text); text-decoration: none; }
.cal-cell.is-today .cal-cell-num { color: var(--navy); background: var(--gold); border-radius: 50%; width: 21px; height: 21px;
  display: grid; place-items: center; }
.cal-mini { display: flex; flex-direction: column; gap: 2px; overflow: hidden; }
.mini { font-size: 11.5px; line-height: 1.3; padding-left: 5px; border-left: 2px solid var(--muted); overflow-wrap: anywhere; }
.mini .mono { color: var(--muted); font-size: 10.5px; }
.mini.kind-show { border-left-color: var(--gold); }
.mini.kind-playlist { border-left-color: var(--info); }
.mini.kind-live { border-left-color: var(--onair); }
.mini.kind-game { border-left-color: var(--ok); }
.mini.is-cancelled { text-decoration: line-through; opacity: .6; }
.mini.is-off { opacity: .55; }

/* ── The question a drag asks before anything is written ── */
.cal-ask { position: fixed; inset: 0; z-index: var(--z-overlay); display: grid; place-items: center; padding: 16px;
  background: rgba(8, 13, 22, .72); }
.cal-ask-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; width: min(430px, 100%); display: flex; flex-direction: column; gap: 10px; }
.cal-ask-box h3 { margin: 0; }
.cal-ask-box p { margin: 0; }
.ask-cancel { align-self: flex-start; }

.cal-menu { position: absolute; z-index: 50; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px; min-width: 210px; box-shadow: 0 10px 30px rgba(0,0,0,.5);
  display: flex; flex-direction: column; gap: 2px; }
.cal-menu .menu-head { margin: 2px 8px 6px; font-weight: 600; font-size: 13px; }
.cal-menu .menu-form { margin: 0; }
.menu-item { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text);
  font: inherit; font-size: 13px; padding: 7px 8px; border-radius: 4px; cursor: pointer; text-decoration: none; }
.menu-item:hover, .menu-item:focus-visible { background: var(--card); color: var(--gold); }

@media (max-width: 760px) {
  /* Still wide enough for "12:00 am": the grid already scrolls sideways on a
     phone, so a readable gutter costs nothing a narrower one saves. */
  .cal-grid { --gutter: 64px; --hour: 40px; }
  .cal-head, .cal-body { grid-template-columns: var(--gutter) repeat(var(--cols, 7), minmax(78px, 1fr)); }
  .cal-grid-wrap { overflow-x: auto; }
  .cal-body { max-height: 66vh; }
  .ev-note { display: none; }
  .cal-cell { min-height: 76px; }
}
@media (prefers-reduced-motion: reduce) { .ev, .ev.is-dragging { transition: none !important; } }

/* 1.20: Facebook marketing */
.mk-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.mk-grid textarea { width: 100%; }
.mk-preview img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--border); display: block; margin-bottom: 8px; }
.mk-thumb { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: var(--surface); }
@media (max-width: 860px) { .mk-grid { grid-template-columns: 1fr; } .mk-preview { max-width: 360px; } }

/* 1.20.0 — holiday skins (website Back Office → Appearance → Holiday themes).
   The studio stays navy-and-gold to work in; it only gets a banner and the
   holiday's specials tinted on the Schedule. */
.hol-bar { display: flex; gap: 10px; align-items: center; margin: 0 0 14px; padding: 10px 12px;
  border: 1px solid #FF7A1A; border-radius: 8px; background: rgba(255,122,26,.10); color: var(--text); }
.hol-bar b { font-weight: 600; color: #FFB27A; }
.hol-bat { width: 26px; height: 15px; flex: none; fill: #FF7A1A; }
.ev.is-holiday, .mini.is-holiday { border-left-color: #FF7A1A; background: #2E1A12; }
.ev.is-holiday .ev-title { color: #FFB27A; }

/* 1.22.0 — Thanksgiving: gold instead of Halloween orange; Thankful Wall notes in Live Studio. */
.hol-bar.hol-thanksgiving { border-color: #E8A92E; background: rgba(232,169,46,.10); }
.hol-bar.hol-thanksgiving b { color: #F2C14E; }
.hol-bar.hol-thanksgiving .hol-bat { fill: #E8A92E; }
.ev.hol-thanksgiving, .mini.hol-thanksgiving { border-left-color: #E8A92E; background: #362417; }
.ev.hol-thanksgiving .ev-title { color: #F2C14E; }
.read-thanks { border-left: 3px solid #E8A92E; padding-left: 10px; }

/* 1.23.0 — Christmas (gold on cranberry) and New Year's (champagne on black) in the banner, Schedule and Live. */
.hol-bar.hol-christmas { border-color: #F2C14E; background: rgba(200,16,46,.14); }
.hol-bar.hol-christmas b { color: #F2C14E; }
.hol-bar.hol-christmas .hol-bat { fill: #2F9E6B; }
.ev.hol-christmas, .mini.hol-christmas { border-left-color: #D7263D; background: #3A1418; }
.ev.hol-christmas .ev-title { color: #F7C8C8; }
.hol-bar.hol-newyears { border-color: #E9D5A1; background: rgba(233,213,161,.08); }
.hol-bar.hol-newyears b { color: #E9D5A1; }
.hol-bar.hol-newyears .hol-bat { fill: #E9D5A1; }
.ev.hol-newyears, .mini.hol-newyears { border-left-color: #E9D5A1; background: #15141C; }
.ev.hol-newyears .ev-title { color: #E9D5A1; }
.read-top100 { border-left: 3px solid #E9D5A1; padding-left: 10px; }
.top100-list { columns: 2; column-gap: 24px; font-size: 13px; margin: 6px 0 0; padding-left: 2.4em; }
@media (max-width: 720px) { .top100-list { columns: 1; } }

/* 1.24 Productions */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.prod-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none; transition: border-color .15s; min-width: 0; }
.prod-card:hover, .prod-card:focus-visible { border-color: var(--gold); }
.prod-card img, .prod-card-blank { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--card); display: grid; place-items: center; font: 700 64px/1 var(--mono); color: var(--gold-dim); }
.prod-card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; }
.prod-hero { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
.prod-logo { width: 180px; max-width: 40vw; height: auto; border-radius: 8px; border: 1px solid var(--border); background: var(--card); }
.prod-hero-text { flex: 1 1 280px; min-width: 0; }
.prod-hero-text p { margin: 0 0 10px; }
.prod-links { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.prod-bar { width: 100%; height: 8px; margin: 4px 0 12px; accent-color: var(--gold); }
.prod-check li { padding: 2px 0; }
.prod-check form { margin: 0; }
.prod-tick { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; background: none; border: 0; color: var(--text); font: inherit; padding: 6px 4px; border-radius: 8px; cursor: pointer; min-height: 36px; }
.prod-tick:hover { background: var(--card); }
.prod-tick .box { flex: none; width: 18px; height: 18px; border: 1.5px solid var(--muted); border-radius: 4px; display: grid; place-items: center; font-size: 12px; line-height: 1; margin-top: 1px; }
.prod-tick.is-done { color: var(--muted); text-decoration: line-through; }
.prod-tick.is-done .box { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.prod-danger { margin-top: 20px; }

.prod-team { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin: 0; }
.prod-team legend { padding: 0 6px; font-weight: 600; }
.prod-team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 16px; margin-top: 8px; }
.prod-scope { margin: -6px 0 14px; }

/* 1.25 Productions: Launch / Update / End */
.panel[hidden], .prod-alert[hidden], .actions[hidden], #pl-done[hidden] { display: none !important; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.prod-pick { cursor: pointer; }
.prod-pick:focus-within { outline: 2px solid var(--gold, #C49A3C); outline-offset: 2px; }
.prod-alert { border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); border-radius: var(--radius); padding: 10px 14px; margin: 12px 0; }
.prod-alert.is-bad { border-color: color-mix(in srgb, var(--onair) 55%, transparent); }
/* 1.33: Gather into folder */
.prod-alert.is-ok { border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.prod-alert.is-warn { border-color: color-mix(in srgb, var(--warn) 55%, transparent); }
#gather .btn[hidden], #ga-pick-zip[hidden], #ga-how-fs[hidden], #ga-how-zip[hidden], #ga-done[hidden], #ga-retry-row[hidden] { display: none !important; }
#ga-rows td.ga-state { white-space: nowrap; }
#ga-rows tr.is-have td { color: var(--muted, #8a8f98); }
.prod-alert ul { margin: 6px 0 0 18px; padding: 0; }
.prod-plan { margin: 12px 0 14px 20px; padding: 0; }
.prod-plan li { margin: 0 0 8px; }
.prod-details { margin: 8px 0; }
.prod-details summary { cursor: pointer; font-weight: 500; padding: 4px 0; }
.prod-order { margin: 6px 0 6px 26px; padding: 0; font-size: 13.5px; }
.prod-order li { padding: 1px 0; }
.prod-order li.is-skip, .prod-order li.is-dup { color: var(--muted); }
.prod-order li.is-missing { color: var(--onair-text); font-weight: 500; }
.prod-log { list-style: none; margin: 10px 0 0; padding: 8px 10px; max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.prod-log li { padding: 2px 0; }
.prod-log li.is-ok::before { content: "✓ "; color: var(--ok); }
.prod-log li.is-warn::before { content: "! "; color: var(--warn); }
.prod-log li.is-error { color: var(--onair-text); }
.prod-log li.is-error::before { content: "✗ "; }
.prod-log li.is-info { color: var(--muted); }
#pl-run progress + progress { margin-top: 6px; }

/* 1.25.2 Production files */
.prod-files td { vertical-align: middle; }
.prod-files-dir td { font: 500 11.5px var(--mono); letter-spacing: .06em; color: var(--muted); background: color-mix(in srgb, var(--card) 55%, transparent); }
.prod-file-thumb { width: 32px; height: 32px; object-fit: contain; vertical-align: middle; border-radius: 4px; margin-right: 6px; background: var(--card); }
.prod-files-add { margin-top: 12px; }
.prod-files-add input[type=file] { max-width: 100%; }

/* 1.26 Production show book */
.prod-book-group { margin: 6px 0 14px; }
.prod-book-grp { margin: 14px 0 6px; font-size: 15px; }
.prod-page { border: 1px solid var(--border); border-radius: var(--radius); margin: 6px 0; background: color-mix(in srgb, var(--card) 40%, transparent); }
.prod-page > summary { cursor: pointer; padding: 10px 14px; font-weight: 500; }
.prod-page[open] > summary { border-bottom: 1px solid var(--border); }
.prod-page .md { padding: 4px 16px 10px; line-height: 1.55; }
.prod-page-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 12px; }
.prod-page-tools .inline-form { margin: 0; }
.md h3, .md h4, .md h5, .md h6 { margin: 16px 0 6px; }
.md h4 { font-size: 16px; } .md h5 { font-size: 14.5px; } .md h6 { font-size: 13.5px; }
.md p { margin: 8px 0; }
.md ul, .md ol { margin: 8px 0 8px 22px; padding: 0; }
.md li { margin: 3px 0; }
.md li.md-task { list-style: none; margin-left: -18px; }
.md li.md-task.is-done { color: var(--muted); }
.md blockquote { margin: 10px 0; padding: 6px 14px; border-left: 3px solid var(--gold, #C49A3C); background: color-mix(in srgb, var(--card) 60%, transparent); }
.md code { font-family: var(--mono); font-size: .92em; padding: 1px 4px; border-radius: 4px; background: color-mix(in srgb, var(--card) 70%, transparent); }
.md pre.md-code { font-family: var(--mono); font-size: 13px; padding: 10px 12px; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.md .md-table { margin: 10px 0; }
.md .md-table td, .md .md-table th { font-size: 13.5px; }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 14px 0; }
.prod-page-edit textarea { min-height: 420px; }
.prod-page-del { margin-top: 10px; }
.md .md-table td:first-child { white-space: nowrap; }
.prod-file-audio { width: 100%; max-width: 360px; height: 32px; margin-top: 4px; }

/* 1.27 Production episodes, running-order editor, sponsors, printable script */
.ep-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin: 8px 0; }
.ep-card-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.ep-card-head .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.ep-order { margin-top: 8px; }
.ep-order summary { cursor: pointer; font-size: 13.5px; }
.ep-order ol { margin: 6px 0 0 24px; padding: 0; font-size: 13.5px; }
.ep-kind { display: inline-block; min-width: 92px; font: 500 11px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ep-k-break .ep-kind { color: var(--gold, #C49A3C); }
.ep-k-spot .ep-kind { color: var(--ok); }
.ep-list { list-style: none; margin: 8px 0 14px; padding: 0; }
.ep-row { border: 1px solid var(--border); border-radius: var(--radius); margin: 4px 0; padding: 6px 8px; }
.ep-row.is-sel { outline: 2px solid var(--gold, #C49A3C); outline-offset: -1px; }
.ep-row-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ep-posnum { width: 58px; padding: 4px 6px; }
.ep-label { flex: 1 1 260px; min-width: 160px; padding: 5px 8px; }
.ep-tools { display: inline-flex; gap: 4px; margin-left: auto; }
.ep-state { white-space: nowrap; }
.ep-sub { margin: 3px 0 0 66px; }
.ep-script { margin: 8px 0 2px 66px; display: grid; gap: 6px; }
.ep-ta { width: 100%; min-height: 110px; }
.ep-rel { width: 100%; max-width: 420px; }
.ep-spot-copy { white-space: pre-wrap; padding: 8px 10px; border-left: 3px solid var(--ok); }
.ep-add { border-top: 1px solid var(--border); padding-top: 10px; display: grid; gap: 8px; }
.ep-add-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; position: relative; }
.ep-add-row #ep-search { flex: 1 1 360px; }
.ep-results { list-style: none; margin: 0; padding: 0; width: 100%; max-height: 260px; overflow-y: auto; }
.ep-results li { padding: 3px 0; }
.ep-result { text-align: left; }
.ep-save-row { margin-top: 14px; }
.ep-sponsor-pick li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--border); }
.ep-sponsor-pick input[type=text], .ep-sponsor-pick input:not([type]) { flex: 1 1 260px; }
.script-page { background: var(--paper) !important; color: #1a1a1a; }
.script-page h1, .script-page h2, .script-page h3, .script-page .md, .script-page .md p, .script-page .md li, .script-page .md strong { color: #1a1a1a; }
.script-page .muted, .script-page .script-cue { color: #555 !important; }
.script-page a { color: #0F3040; }
.script-doc { max-width: 820px; margin: 0 auto; padding: 24px 20px 60px; }
.script-ep { margin-top: 28px; }
.script-break { margin: 14px 0; padding: 8px 0 4px 14px; border-left: 3px solid var(--gold, #C49A3C); }
.script-break h3 { margin: 0 0 4px; font-size: 16px; }
.script-spot { border-left-color: var(--ok); }
.script-cue { margin: 6px 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }
@media print {
  .no-print { display: none !important; }
  .script-page, .script-doc { background: var(--paper) !important; color: var(--ink) !important; }
  .script-doc .muted, .script-cue { color: #444 !important; }
  .script-ep { break-before: page; }
  .script-ep:first-of-type { break-before: auto; }
  .script-break { break-inside: avoid; }
}

/* 1.28.0: production edit form laid out like Shows → Edit show */
.prod-airs td { vertical-align: middle; }
.prod-airs td:first-child { width: 42%; }
.prod-airs td:first-child input { width: 100%; min-width: 14rem; }
.prod-airs .pair-times { display: flex; align-items: center; gap: .4rem; flex-wrap: nowrap; }
.prod-airs .pair-times span { color: var(--muted, #8a94a6); }
@media (max-width: 720px) { .prod-airs td:first-child input { min-width: 10rem; } }
/* 1.29.0: Production Studio — the episode studio (views/production-editor.php, production-episode.js).
   Everything is scoped under .ep-editor / .studio-*. */
.ep-editor {
  --st-bg: var(--navy, #0F1B2D);
  --st-surface: var(--surface, #161F2E);
  --st-card: var(--card, #1E2A3D);
  --st-raise: #22304A;
  --st-line: var(--border, #2A3A52);
  --st-line-soft: rgba(147, 163, 184, .14);
  --st-text: var(--text, #E8ECF2);
  --st-ink: var(--ink-soft, #C9D4E3);
  --st-muted: var(--muted, #93A3B8);
  --st-gold: var(--gold, #C49A3C);
  --st-ok: var(--ok, #3DBE8B);
  --st-warn: var(--warn, #E0A63A);
  --st-bad: var(--onair, #E5484D);
  --st-info: var(--info, #5B9BD5);
  --k-break: var(--gold, #C49A3C);
  --k-song: #34C3B2;
  --k-audio: var(--info);
  --k-spot: #A68AF2;
  --k-note: #7D8BA0;
  --st-mono: var(--mono, ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace);
  --st-display: var(--display, 'Big Shoulders Display', 'Bahnschrift SemiCondensed', 'Arial Narrow', system-ui, sans-serif);
  --st-body: var(--body, system-ui, -apple-system, 'Segoe UI', sans-serif);
  --st-r: 8px;
  --st-head-h: 0px;
  position: relative;
  padding: 0;
  overflow: visible;
  background: linear-gradient(180deg, rgba(196, 154, 60, .035), transparent 220px), var(--st-surface);
  border-color: var(--st-line);
  border-radius: 12px;
  margin-bottom: 20px;
  color: var(--st-text);
}
.ep-editor .st-ic { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ep-editor .st-ic svg { width: 100%; height: 100%; display: block; }
.ep-editor [hidden] { display: none !important; }
.ep-editor .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }

/* ── Buttons ─────────────────────────────────────────────────────────── */
.ep-editor .studio-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 0 12px; margin: 0;
  font: 500 13.5px/1 var(--st-body); color: var(--st-ink);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--st-line); border-radius: 8px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.ep-editor .studio-btn:hover { background: rgba(255, 255, 255, .07); border-color: #3A4D6A; color: var(--paper); }
.ep-editor .studio-btn:disabled { opacity: .4; cursor: default; background: transparent; }
.ep-editor .studio-btn.is-on { background: rgba(196, 154, 60, .14); border-color: rgba(196, 154, 60, .55); color: #F1D99A; }
.ep-editor .studio-btn-gold { background: var(--st-gold); border-color: var(--st-gold); color: #10192A; font-weight: 600; box-shadow: 0 6px 20px -8px rgba(196, 154, 60, .7); }
.ep-editor .studio-btn-gold:hover { background: #D6AE52; border-color: #D6AE52; color: #0B1220; }
.ep-editor .studio-btn-gold.is-busy { opacity: .8; cursor: progress; }
.ep-editor .studio-btn-ai { color: #D9C9FF; border-color: rgba(166, 138, 242, .45); background: rgba(166, 138, 242, .08); }
.ep-editor .studio-btn-ai:hover { background: rgba(166, 138, 242, .16); color: var(--paper); border-color: rgba(166, 138, 242, .7); }
.ep-editor .studio-btn.is-done { border-color: var(--st-ok); color: var(--st-ok); }
.ep-editor .studio-link { background: none; border: 0; padding: 0; color: var(--st-ink); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-decoration-color: var(--st-line); text-underline-offset: 3px; }
.ep-editor .studio-link:hover { color: var(--paper); }
.ep-editor .studio-group, .ep-editor .studio-seg { display: inline-flex; }
.ep-editor .studio-group .studio-btn, .ep-editor .studio-seg .studio-btn { border-radius: 0; margin-left: -1px; }
.ep-editor .studio-group .studio-btn:first-child, .ep-editor .studio-seg .studio-btn:first-child { border-radius: 8px 0 0 8px; margin-left: 0; }
.ep-editor .studio-group .studio-btn:last-child, .ep-editor .studio-seg .studio-btn:last-child { border-radius: 0 8px 8px 0; }
.ep-editor .studio-group .studio-btn { width: 38px; padding: 0; }
.ep-editor .studio-btn.is-on { position: relative; z-index: 1; }

/* ── Sticky header ───────────────────────────────────────────────────── */
.ep-editor .studio-head {
  position: sticky; top: 0; z-index: 30;
  padding: 14px 20px 12px;
  background: #141D2D;
  border-bottom: 1px solid var(--st-line);
  border-radius: 12px 12px 0 0;
}
.ep-editor .studio-head-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.ep-editor .studio-back { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 10px 0 6px; margin-left: -6px; border-radius: 8px; color: var(--st-muted); text-decoration: none; font-size: 13px; }
.ep-editor .studio-back:hover { color: var(--paper); background: rgba(255, 255, 255, .05); }
.ep-editor .studio-eyebrow { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--st-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-editor .studio-brand { color: var(--st-gold); }
.ep-editor .studio-sep { opacity: .4; margin: 0 6px; }
.ep-editor .studio-save { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 12.5px; color: var(--st-muted); white-space: nowrap; min-height: 28px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, .03); border: 1px solid var(--st-line-soft); }
.ep-editor .studio-save-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-ok); box-shadow: 0 0 0 3px rgba(61, 190, 139, .18); flex: none; }
.ep-editor .studio-save.is-dirty .studio-save-dot { background: var(--st-warn); box-shadow: 0 0 0 3px rgba(224, 166, 58, .18); }
.ep-editor .studio-save.is-saving .studio-save-dot { background: var(--st-gold); animation: st-pulse 1s ease-in-out infinite; }
.ep-editor .studio-save.is-offline .studio-save-dot, .ep-editor .studio-save.is-error .studio-save-dot, .ep-editor .studio-save.is-conflict .studio-save-dot { background: var(--st-bad); box-shadow: 0 0 0 3px rgba(229, 72, 77, .2); }
.ep-editor .studio-save.is-error, .ep-editor .studio-save.is-conflict, .ep-editor .studio-save.is-offline { color: #FFB4B6; border-color: rgba(229, 72, 77, .35); }
@keyframes st-pulse { 50% { opacity: .35; transform: scale(.8); } }

.ep-editor .studio-titlebar { margin: 4px 0 8px; }
.ep-editor .studio-title {
  width: 100%; padding: 2px 8px; margin-left: -8px;
  font: 600 30px/1.15 var(--st-display); letter-spacing: .01em; color: var(--paper);
  background: transparent; border: 1px solid transparent; border-radius: 8px;
  resize: none; overflow: hidden; field-sizing: content; min-height: 0; display: block;
}
.ep-editor .studio-title:hover { border-color: var(--field-border); }
.ep-editor .studio-title:focus { background: rgba(0, 0, 0, .18); border-color: var(--gold); outline: none; }

/* Time bar */
.ep-editor .studio-timebar { display: grid; gap: 7px; margin-bottom: 10px; }
.ep-editor .studio-time-read { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.ep-editor .studio-time-lab { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--st-muted); }
.ep-editor .studio-time-big { font-size: 26px; font-weight: 500; color: var(--paper); letter-spacing: -.01em; line-height: 1; }
.ep-editor .studio-time-of { font-size: 14px; }
.ep-editor .studio-time-of .mono { color: var(--st-ink); }
.ep-editor .studio-verdict { font-size: 13px; font-weight: 600; padding: 4px 9px; border-radius: 999px; line-height: 1; align-self: center; }
.ep-editor .studio-verdict.is-good { color: #7EE2B8; background: rgba(61, 190, 139, .14); }
.ep-editor .studio-verdict.is-warn { color: #F4C46E; background: rgba(224, 166, 58, .14); }
.ep-editor .studio-verdict.is-over { color: var(--paper); background: var(--st-bad); letter-spacing: .04em; }
.ep-editor .studio-time-ends { margin-left: auto; }
.ep-editor .studio-meter { position: relative; display: flex; height: 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .04); }
.ep-editor .studio-meter > span { display: block; height: 100%; flex: none; transition: width .35s cubic-bezier(.2, .8, .2, 1); }
.ep-editor .studio-meter-known { background: linear-gradient(90deg, #2FA57A, var(--st-ok)); }
.ep-editor .studio-meter-est { background: repeating-linear-gradient(135deg, rgba(61, 190, 139, .55) 0 4px, rgba(61, 190, 139, .2) 4px 8px); }
.ep-editor .studio-meter.is-warn .studio-meter-known { background: linear-gradient(90deg, #B98325, var(--st-warn)); }
.ep-editor .studio-meter.is-warn .studio-meter-est { background: repeating-linear-gradient(135deg, rgba(224, 166, 58, .55) 0 4px, rgba(224, 166, 58, .2) 4px 8px); }
.ep-editor .studio-meter-over { background: repeating-linear-gradient(135deg, var(--st-bad) 0 5px, #B8343A 5px 10px); }
.ep-editor .studio-meter.is-over .studio-meter-known { background: linear-gradient(90deg, #B98325, var(--st-warn)); }
.ep-editor .studio-meter-ticks { position: absolute !important; inset: 0; width: 100%; pointer-events: none; background: repeating-linear-gradient(90deg, transparent 0 calc(33.333% - 1px), rgba(15, 27, 45, .9) calc(33.333% - 1px) 33.333%); }
.ep-editor .studio-meter.is-over .studio-meter-ticks { display: none; }

/* Chips + tools row */
.ep-editor .studio-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ep-editor .studio-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.ep-editor .studio-chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 13px;
  font: 500 12.5px/1 var(--st-body); border-radius: 999px; border: 1px solid var(--st-line); background: rgba(255, 255, 255, .03); color: var(--st-ink);
  cursor: pointer; white-space: nowrap;
}
.ep-editor button.studio-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.ep-editor .studio-chip:hover { background: rgba(255, 255, 255, .08); }
.ep-editor .studio-chip.is-warn { color: #F4C46E; border-color: rgba(224, 166, 58, .4); }
.ep-editor .studio-chip.is-bad { color: #FF9EA1; border-color: rgba(229, 72, 77, .45); }
.ep-editor .studio-chip.is-muted { color: var(--st-muted); }
.ep-editor .studio-chip.is-ok { color: #7EE2B8; border-color: rgba(61, 190, 139, .4); cursor: default; }
.ep-editor .studio-chip .st-ic { width: 14px; height: 14px; }
.ep-editor .studio-tools { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Conflict banner */
.ep-editor .studio-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 20px 0; padding: 10px 12px 10px 14px; border-radius: var(--st-r); background: linear-gradient(90deg, rgba(229, 72, 77, .18), rgba(229, 72, 77, .07)); border: 1px solid rgba(229, 72, 77, .45); }
.ep-editor .studio-banner-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--st-bad); color: var(--paper); font-weight: 700; flex: none; }
.ep-editor .studio-banner-text { flex: 1 1 260px; color: #FFE3E4; }
.ep-editor .studio-banner-acts { display: flex; gap: 8px; }
.ep-editor .studio-note { margin: 12px 20px 0; padding: 8px 12px; border-left: 3px solid var(--st-warn); background: rgba(224, 166, 58, .08); border-radius: 0 8px 8px 0; color: var(--st-ink); }

/* Description */
.ep-editor .studio-desc { margin: 14px 20px 4px; display: grid; gap: 4px; }
.ep-editor .studio-desc-label { font-size: 10.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--st-muted); }
.ep-editor .studio-desc textarea {
  resize: none; overflow: hidden; min-height: 40px; field-sizing: content;
  font: 14.5px/1.55 var(--st-body); color: var(--st-ink);
  background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 6px 8px; margin-left: -8px; width: calc(100% + 8px);
}
.ep-editor .studio-desc textarea::placeholder { color: rgba(147, 163, 184, .85); }
.ep-editor .studio-desc textarea:hover { border-color: var(--field-border); }
.ep-editor .studio-desc textarea:focus { border-color: var(--gold); background: rgba(0, 0, 0, .15); outline: none; }

/* ── Running order ───────────────────────────────────────────────────── */
.ep-editor .studio-view { position: relative; padding: 8px 20px 22px; }
.ep-editor .studio-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ep-editor .studio-row {
  --k: var(--k-note);
  position: relative; scroll-margin-top: 260px;
  background: var(--st-card); border: 1px solid var(--st-line-soft); border-radius: var(--st-r);
  transition: border-color .15s, background .15s, box-shadow .2s;
}
.ep-editor .studio-row::before { content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 4px 4px 0; background: var(--k); opacity: .85; }
.ep-editor .studio-row.k-break { --k: var(--k-break); background: linear-gradient(90deg, rgba(196, 154, 60, .06), transparent 40%), var(--st-card); }
.ep-editor .studio-row.k-song { --k: var(--k-song); }
.ep-editor .studio-row.k-audio { --k: var(--k-audio); }
.ep-editor .studio-row.k-spot { --k: var(--k-spot); }
.ep-editor .studio-row.k-note { --k: var(--k-note); background: rgba(30, 42, 61, .55); border-style: dashed; border-color: rgba(147, 163, 184, .2); }
.ep-editor .studio-row:hover { border-color: rgba(147, 163, 184, .3); }
.ep-editor .studio-row.is-sel { border-color: rgba(196, 154, 60, .7); box-shadow: 0 0 0 1px rgba(196, 154, 60, .35), 0 8px 24px -14px rgba(0, 0, 0, .9); }
.ep-editor .studio-row.is-dup { opacity: .72; }
.ep-editor .studio-row.is-dup .studio-label { text-decoration: line-through; text-decoration-color: rgba(147, 163, 184, .6); }
.ep-editor .studio-row.is-new { animation: st-new 1.1s ease-out; }
.ep-editor .studio-row.is-flash { animation: st-flash 1.2s ease-out; }
@keyframes st-new { from { background: rgba(196, 154, 60, .22); } }
@keyframes st-flash { 0%, 30% { box-shadow: 0 0 0 3px rgba(196, 154, 60, .6); } }
.ep-editor .studio-row.is-dragging { z-index: 20; opacity: .95; border-color: var(--st-gold); box-shadow: 0 22px 44px -16px rgba(0, 0, 0, .95), 0 0 0 1px var(--st-gold); transition: none; cursor: grabbing; }
.ep-editor .studio-row.is-grabbed { border-color: var(--st-gold); box-shadow: 0 0 0 2px rgba(196, 154, 60, .5), 0 16px 34px -18px rgba(0, 0, 0, .95); }
.ep-editor.is-dragging-any { user-select: none; -webkit-user-select: none; }
.ep-editor.is-dragging-any .studio-ins { display: none; }

.ep-editor .studio-row-main {
  display: grid; align-items: center; gap: 10px;
  grid-template-columns: 36px 92px 64px minmax(0, 1fr) auto 62px auto;
  padding: 6px 8px 6px 6px; min-height: 52px;
}
.ep-editor .studio-grip {
  width: 36px; height: 40px; padding: 0; margin: 0; display: grid; place-items: center;
  background: transparent; border: 0; border-radius: 8px; color: rgba(147, 163, 184, .55);
  cursor: grab; touch-action: none;
}
.ep-editor .studio-grip:hover, .ep-editor .studio-grip:focus-visible { color: var(--st-gold); background: rgba(196, 154, 60, .1); }
.ep-editor .studio-row.is-grabbed .studio-grip { color: #10192A; background: var(--st-gold); }
.ep-editor .studio-at { font-size: 12.5px; color: var(--st-muted); white-space: nowrap; }
.ep-editor .studio-row.is-sel .studio-at { color: var(--st-ink); }
.ep-editor .studio-kind {
  justify-self: start; font: 600 10.5px/1 var(--st-mono); letter-spacing: .09em; text-transform: uppercase;
  padding: 5px 7px; border-radius: 4px; color: var(--k);
  background: rgba(125, 139, 160, .12); border: 1px solid transparent;
}
.ep-editor .k-break .studio-kind { background: rgba(196, 154, 60, .13); border-color: rgba(196, 154, 60, .32); }
.ep-editor .k-song .studio-kind { background: rgba(52, 195, 178, .11); border-color: rgba(52, 195, 178, .3); }
.ep-editor .k-audio .studio-kind { background: rgba(91, 155, 213, .12); border-color: rgba(91, 155, 213, .32); color: #7DB3E3; }
.ep-editor .k-spot .studio-kind { background: rgba(166, 138, 242, .13); border-color: rgba(166, 138, 242, .34); }
.ep-editor .studio-labelwrap { min-width: 0; }
.ep-editor .studio-label {
  width: 100%; min-width: 0; padding: 5px 8px; margin-left: -8px;
  font: 500 15px/1.3 var(--st-body); color: var(--st-text);
  background: transparent; border: 1px solid transparent; border-radius: 8px; text-overflow: ellipsis;
}
.ep-editor .k-break .studio-label { font-weight: 600; color: var(--paper); }
.ep-editor .studio-label:hover { border-color: var(--st-line-soft); }
.ep-editor .studio-label:focus { background: rgba(0, 0, 0, .2); border-color: rgba(196, 154, 60, .55); outline: none; text-overflow: clip; }
.ep-editor .studio-sub { font: 11.5px/1.3 var(--st-mono); color: rgba(147, 163, 184, .92); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -1px; }
.ep-editor .studio-flags { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: wrap; }
.ep-editor .studio-flag { font: 500 11px/1 var(--st-body); padding: 4px 8px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent; }
.ep-editor .studio-flag.is-warn { color: #F4C46E; background: rgba(224, 166, 58, .12); border-color: rgba(224, 166, 58, .25); }
.ep-editor .studio-flag.is-bad { color: #FF9EA1; background: rgba(229, 72, 77, .12); border-color: rgba(229, 72, 77, .3); }
.ep-editor .studio-flag.is-info { color: #C9B8FF; background: rgba(166, 138, 242, .12); }
.ep-editor .studio-flag.is-muted { color: var(--st-muted); background: rgba(147, 163, 184, .1); }
.ep-editor .studio-dur { font-size: 13.5px; color: var(--st-ink); text-align: right; white-space: nowrap; }
.ep-editor .studio-dur.is-est { font-style: italic; color: var(--st-muted); }
.ep-editor .studio-dur.is-zero, .ep-editor .studio-dur.is-dup { color: var(--st-muted); }
.ep-editor .studio-dur[title] { cursor: help; }
.ep-editor .studio-rowtools { display: flex; gap: 2px; justify-content: flex-end; }
.ep-editor .studio-ibtn {
  width: 36px; height: 36px; padding: 0; margin: 0; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 8px; color: var(--st-muted); cursor: pointer;
  transition: background .15s, color .15s, opacity .15s;
}
.ep-editor .studio-ibtn:hover { background: rgba(255, 255, 255, .07); color: var(--paper); }
.ep-editor .studio-play { color: var(--k); }
.ep-editor .studio-aibtn { color: #C9B8FF; }
.ep-editor .studio-aibtn:hover, .ep-editor .studio-aibtn[aria-expanded="true"] { background: rgba(166, 138, 242, .16); color: var(--paper); }
.ep-editor .studio-del:hover { color: #FF9EA1; background: rgba(229, 72, 77, .12); }
@media (hover: hover) and (pointer: fine) {
  .ep-editor .studio-del { opacity: 0; }
  .ep-editor .studio-row:hover .studio-del, .ep-editor .studio-row:focus-within .studio-del, .ep-editor .studio-row.is-sel .studio-del { opacity: 1; }
}
.ep-editor .studio-row.is-playing .studio-play { background: var(--k); color: var(--navy); }
.ep-editor .studio-progress { position: absolute; left: 10px; bottom: 0; height: 2px; width: 0; max-width: calc(100% - 20px); background: var(--k); border-radius: 2px; box-shadow: 0 0 10px var(--k); pointer-events: none; transition: width .25s linear; }
.ep-editor .studio-row:not(.is-playing) .studio-progress { display: none; }

/* Insert-here */
.ep-editor .studio-ins {
  position: absolute; left: 50%; top: -15px; z-index: 5; transform: translateX(-50%) scale(.85);
  width: 40px; height: 26px; padding: 0; margin: 0; display: grid; place-items: center;
  border-radius: 999px; border: 1px solid rgba(196, 154, 60, .6); background: #172235; color: var(--st-gold);
  opacity: 0; cursor: pointer; transition: opacity .15s, transform .15s;
}
.ep-editor .studio-ins .st-ic { width: 14px; height: 14px; }
.ep-editor .studio-ins::after { content: ""; position: absolute; inset: -6px -2px; }
.ep-editor .studio-row:hover > .studio-ins, .ep-editor .studio-ins:focus-visible { opacity: 1; transform: translateX(-50%) scale(1); }
.ep-editor .studio-ins:hover { background: var(--st-gold); color: #10192A; }
.ep-editor .studio-list > .studio-row:first-child > .studio-ins { top: -12px; }

/* Scripts */
.ep-editor .studio-script { padding: 0 14px 12px 142px; display: grid; gap: 6px; }
.ep-editor .studio-ta {
  display: block; width: 100%; min-height: 54px; resize: none; overflow: hidden; field-sizing: content;
  padding: 10px 14px; margin: 0;
  font: 400 16.5px/1.65 var(--st-body); color: #DCE4EF; letter-spacing: .005em;
  background: rgba(8, 14, 26, .35); border: 1px solid transparent; border-left: 2px solid rgba(196, 154, 60, .35); border-radius: 4px 8px 8px 4px;
  transition: background .15s, border-color .15s;
}
.ep-editor .k-note .studio-ta { font-size: 14.5px; color: var(--st-ink); border-left-color: rgba(125, 139, 160, .45); min-height: 40px; font-family: var(--st-mono); }
.ep-editor .studio-ta::placeholder { color: rgba(147, 163, 184, .55); font-style: italic; }
.ep-editor .studio-ta:hover { background: rgba(8, 14, 26, .5); }
.ep-editor .studio-ta:focus { background: rgba(8, 14, 26, .6); border-color: rgba(196, 154, 60, .35); border-left-color: var(--st-gold); outline: none; box-shadow: 0 0 0 3px rgba(196, 154, 60, .08); }
.ep-editor .studio-script-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--st-muted); }
.ep-editor .studio-read { font-size: 11.5px; letter-spacing: .02em; }
.ep-editor .studio-rel { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-weight: 400; font-size: 11.5px; color: var(--st-muted); }
.ep-editor .studio-rel input { width: 210px; min-height: 36px; padding: 3px 8px; font-size: 12px; color: var(--st-ink); background: transparent; border: 1px solid var(--field-border); border-radius: 8px; }
.ep-editor .studio-rel input:focus { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); outline: none; }
.ep-editor .studio-peek { display: none; }
.ep-editor.is-compact .studio-row:not(.is-open) .studio-ta,
.ep-editor.is-compact .studio-row:not(.is-open) .studio-script-meta { display: none; }
.ep-editor.is-compact .studio-row:not(.is-open) .studio-peek {
  display: block; width: 100%; min-height: 36px; padding: 8px 12px; margin: 0; text-align: left;
  font: 14px/1.4 var(--st-body); color: var(--st-muted); background: rgba(8, 14, 26, .3);
  border: 0; border-left: 2px solid rgba(196, 154, 60, .3); border-radius: 4px 8px 8px 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: text;
}
.ep-editor.is-compact .studio-peek:hover { color: var(--st-ink); background: rgba(8, 14, 26, .5); }
.ep-editor .studio-peek.is-empty { font-style: italic; }
.ep-editor.is-compact .studio-script { padding-bottom: 8px; }

/* Spot copy */
.ep-editor .studio-spotcopy { margin: 0 14px 12px 142px; padding: 10px 14px; border-radius: 4px 8px 8px 4px; border-left: 2px solid rgba(166, 138, 242, .5); background: rgba(166, 138, 242, .06); }
.ep-editor .studio-spotcopy-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 12px; color: #C9B8FF; }
.ep-editor .studio-spotcopy-head .studio-link { font-size: 12px; }
.ep-editor .studio-spotcopy-text { margin-top: 6px; font-size: 15.5px; line-height: 1.6; color: #DCE4EF; white-space: pre-wrap; }
.ep-editor.is-compact .studio-spotcopy-text { display: none; }

/* AI suggestion */
.ep-editor .studio-sug { margin-top: 4px; padding: 12px 14px; border-radius: 8px; border: 1px solid rgba(166, 138, 242, .4); background: linear-gradient(135deg, rgba(166, 138, 242, .12), rgba(91, 155, 213, .06)); box-shadow: 0 10px 30px -18px rgba(166, 138, 242, .7); }
.ep-editor .studio-sug.is-error { border-color: rgba(229, 72, 77, .4); background: rgba(229, 72, 77, .07); box-shadow: none; }
.ep-editor .studio-sug-head { display: flex; align-items: center; gap: 8px; font: 600 12px/1.2 var(--st-mono); letter-spacing: .06em; text-transform: uppercase; color: #C9B8FF; }
.ep-editor .studio-sug-head .st-ic { width: 16px; height: 16px; }
.ep-editor .studio-sug-len { margin-left: auto; font-weight: 400; color: var(--st-muted); text-transform: none; letter-spacing: 0; }
.ep-editor .studio-sug-text { margin: 8px 0 10px; font-size: 16px; line-height: 1.65; color: #EEF1FA; white-space: pre-wrap; }
.ep-editor .studio-sug-err { margin: 8px 0; color: #FFC9CB; font-size: 14px; }
.ep-editor .studio-sug-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ep-editor .studio-shimmer-lines { height: 54px; margin-top: 10px; border-radius: 8px; background: linear-gradient(90deg, rgba(255, 255, 255, .04) 0%, rgba(201, 184, 255, .16) 40%, rgba(255, 255, 255, .04) 80%) 0 0 / 300% 100%; animation: st-shimmer 1.4s linear infinite;
  -webkit-mask: repeating-linear-gradient(180deg, var(--ink) 0 12px, transparent 12px 21px); mask: repeating-linear-gradient(180deg, var(--ink) 0 12px, transparent 12px 21px); }
.ep-editor .studio-shimmer { color: var(--st-muted); background: linear-gradient(90deg, var(--st-muted) 0%, var(--paper) 50%, var(--st-muted) 100%) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: st-shimmer 1.6s linear infinite; list-style: none; padding: 8px 0; margin: 0; }
@keyframes st-shimmer { to { background-position: -200% 0; } }

/* Menu */
.ep-editor .studio-menu { position: absolute; z-index: var(--z-dropdown); min-width: 180px; padding: 6px; display: grid; gap: 2px; border-radius: 8px; background: #1B2639; border: 1px solid rgba(166, 138, 242, .4); box-shadow: 0 20px 44px -12px rgba(0, 0, 0, .85); }
.ep-editor .studio-menu button { display: flex; align-items: center; min-height: 36px; padding: 0 12px; text-align: left; font: 14px var(--st-body); color: var(--st-text); background: transparent; border: 0; border-radius: 8px; cursor: pointer; }
.ep-editor .studio-menu button:hover, .ep-editor .studio-menu button:focus-visible { background: rgba(166, 138, 242, .18); color: var(--paper); outline: none; }

/* Drop marker */
.ep-editor .studio-drop { position: absolute; left: 14px; right: 14px; top: 0; height: 3px; z-index: 15; border-radius: 4px; background: var(--st-gold); box-shadow: 0 0 12px rgba(196, 154, 60, .8); pointer-events: none; }
.ep-editor .studio-drop::before { content: ""; position: absolute; left: -5px; top: -4px; width: 11px; height: 11px; border-radius: 50%; background: var(--st-gold); }

.ep-editor .studio-empty { list-style: none; padding: 28px 20px; text-align: center; color: var(--st-muted); border: 1px dashed var(--st-line); border-radius: var(--st-r); }
.ep-editor .studio-empty b { color: var(--st-text); }

/* ── Add bar ─────────────────────────────────────────────────────────── */
.ep-editor .studio-addhome { margin-top: 12px; }
.ep-editor .studio-slot { list-style: none; }
.ep-editor .studio-add {
  display: grid; gap: 10px; padding: 14px; border-radius: 12px;
  background: rgba(8, 14, 26, .35); border: 1px dashed rgba(196, 154, 60, .35);
}
.ep-editor .studio-add.is-inline { border-style: solid; border-color: rgba(196, 154, 60, .7); background: rgba(196, 154, 60, .05); box-shadow: 0 0 0 4px rgba(196, 154, 60, .07); margin: 4px 0; }
.ep-editor .studio-add-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.ep-editor .studio-add-where { font: 500 11px/1.3 var(--st-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--st-gold); }
.ep-editor .studio-search { position: relative; }
.ep-editor .studio-search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--st-muted); pointer-events: none; }
.ep-editor .studio-search input { width: 100%; min-height: 44px; padding: 10px 12px 10px 40px; font-size: 15px; border-radius: 8px; background: rgba(8, 14, 26, .55); border: 1px solid var(--field-border); color: var(--st-text); }
.ep-editor .studio-search input::placeholder, .ep-editor .studio-fill-row input::placeholder { color: rgba(147, 163, 184, .9); }
.ep-editor .studio-search input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(196, 154, 60, .12); }
.ep-editor .studio-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: 320px; overflow-y: auto; }
.ep-editor .studio-results:empty { display: none; }
.ep-editor .studio-results-note { font-size: 12.5px; color: var(--st-muted); padding: 4px 2px; list-style: none; margin: 0; }
.ep-editor .studio-result {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto 52px; align-items: center; gap: 10px;
  width: 100%; min-height: 40px; padding: 6px 10px; margin: 0; text-align: left;
  font: 14px/1.3 var(--st-body); color: var(--st-text); background: transparent; border: 1px solid transparent; border-radius: 8px; cursor: pointer;
}
.ep-editor .studio-result .st-ic { width: 16px; height: 16px; color: var(--k-song); }
.ep-editor .studio-result:hover, .ep-editor .studio-result:focus-visible { background: rgba(52, 195, 178, .09); border-color: rgba(52, 195, 178, .3); outline: none; }
.ep-editor .studio-result.is-added .st-ic { color: var(--st-ok); }
.ep-editor .studio-result.is-added { opacity: .65; }
.ep-editor .studio-result-t { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ep-editor .studio-result-t b { font-weight: 500; }
.ep-editor .studio-result-t span { color: var(--st-muted); margin-left: 8px; }
.ep-editor .studio-result-m { font-size: 12px; color: var(--st-muted); white-space: nowrap; }
.ep-editor .studio-result-len { font-size: 13px; text-align: right; color: var(--st-ink); }
.ep-editor .studio-add-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ep-editor .studio-spotpick { display: inline-flex; gap: 6px; flex: 1 1 320px; min-width: 0; }
.ep-editor .studio-spotpick select { flex: 1 1 auto; min-width: 0; min-height: 36px; padding: 0 10px; font-size: 13.5px; border-radius: 8px; background: rgba(8, 14, 26, .55); border: 1px solid var(--field-border); color: var(--st-text); }
.ep-editor .studio-dot { display: inline-block; width: 9px; height: 9px; border-radius: 4px; flex: none; }
.ep-editor .studio-dot.k-break { background: var(--k-break); }
.ep-editor .studio-dot.k-song { background: var(--k-song); }
.ep-editor .studio-dot.k-audio { background: var(--k-audio); }
.ep-editor .studio-dot.k-spot { background: var(--k-spot); }
.ep-editor .studio-dot.k-note { background: var(--k-note); }
.ep-editor .studio-dot.k-est { background: repeating-linear-gradient(135deg, rgba(196, 154, 60, .8) 0 2px, rgba(196, 154, 60, .25) 2px 4px); }
.ep-editor .studio-dot.k-out { background: var(--st-bad); width: 3px; border-radius: 1px; height: 12px; }

/* Fill the gap */
.ep-editor .studio-fill { padding: 12px; border-radius: 8px; background: linear-gradient(135deg, rgba(52, 195, 178, .09), rgba(91, 155, 213, .05)); border: 1px solid rgba(52, 195, 178, .3); display: grid; gap: 10px; }
.ep-editor .studio-fill-head { display: flex; gap: 8px; align-items: center; color: var(--st-text); font-size: 14px; }
.ep-editor .studio-fill-head .st-ic { color: var(--k-song); }
.ep-editor .studio-fill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ep-editor .studio-fill-row input { flex: 1 1 240px; min-width: 0; min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 8px; background: rgba(8, 14, 26, .55); border: 1px solid var(--field-border); color: var(--st-text); }
.ep-editor .studio-fill-row input:focus { border-color: var(--k-song); box-shadow: 0 0 0 1px var(--k-song); outline: none; }
.ep-editor .studio-fill-sum { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font: 12.5px var(--st-mono); color: var(--st-ink); }
.ep-editor .studio-fill-out:empty { display: none; }

/* ── Clock view ──────────────────────────────────────────────────────── */
.ep-editor .studio-clockview { padding-top: 18px; }
.ep-editor .studio-clocks { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.ep-editor .studio-clock { margin: 0; padding: 14px 10px 10px; border-radius: 12px; background: radial-gradient(circle at 50% 42%, rgba(196, 154, 60, .07), transparent 62%), var(--st-card); border: 1px solid var(--st-line-soft); text-align: center; }
.ep-editor .studio-clock svg { width: 100%; max-width: 280px; height: auto; display: block; margin: 0 auto; overflow: visible; }
.ep-editor .studio-clock figcaption { font: 500 11px var(--st-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--st-muted); margin-top: 4px; }
.ep-editor .clk-track { fill: none; stroke: rgba(255, 255, 255, .05); stroke-width: 28; }
.ep-editor .clk-inner { fill: rgba(8, 14, 26, .45); stroke: rgba(255, 255, 255, .04); }
.ep-editor .clk-tick { stroke: rgba(147, 163, 184, .35); stroke-width: 1.2; }
.ep-editor .clk-tick.is-major { stroke: rgba(201, 212, 227, .7); stroke-width: 2; }
.ep-editor .clk-min, .ep-editor .clk-hour, .ep-editor .clk-sub, .ep-editor .clk-sub2, .ep-editor .clk-inner, .ep-editor .clk-track, .ep-editor .clk-tick, .ep-editor .clk-out, .ep-editor .clk-now, .ep-editor .clk-now-dot { pointer-events: none; }
.ep-editor .clk-min { fill: rgba(147, 163, 184, .55); font: 500 10px var(--st-mono); text-anchor: middle; }
.ep-editor .clk-seg { fill: none; pointer-events: stroke; stroke-width: 26; stroke: var(--k-note); cursor: pointer; transition: stroke-width .15s, opacity .15s; outline: none; }
.ep-editor .clk-seg.k-break { stroke: var(--k-break); }
.ep-editor .clk-seg.k-song { stroke: var(--k-song); }
.ep-editor .clk-seg.k-audio { stroke: var(--k-audio); }
.ep-editor .clk-seg.k-spot { stroke: var(--k-spot); }
.ep-editor .clk-seg.is-est { opacity: .45; stroke-dasharray: 3 2; }
.ep-editor .clk-seg.is-over { stroke: var(--st-bad); opacity: .85; }
.ep-editor .clk-seg:hover, .ep-editor .clk-seg:focus-visible { stroke-width: 34; opacity: 1; }
.ep-editor .clk-seg.is-sel { stroke-width: 34; }
.ep-editor .clk-out { stroke: var(--st-bad); stroke-width: 3; stroke-linecap: round; }
.ep-editor .clk-now { stroke: var(--paper); stroke-width: 2.5; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .7)); }
.ep-editor .clk-now-dot { fill: var(--paper); }
.ep-editor .clk-hour { fill: var(--paper); font: 600 30px var(--st-display); text-anchor: middle; }
.ep-editor .clk-sub { fill: var(--st-ink); font: 500 11.5px var(--st-mono); text-anchor: middle; }
.ep-editor .clk-sub2 { fill: var(--st-muted); font: 400 11px var(--st-mono); text-anchor: middle; }
.ep-editor .clk-sub2.is-open { fill: #F4C46E; }
.ep-editor .studio-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; padding: 0; margin: 18px 0 0; font-size: 12.5px; color: var(--st-muted); }
.ep-editor .studio-legend li { display: inline-flex; align-items: center; gap: 7px; }

/* ── Drawers ─────────────────────────────────────────────────────────── */
.ep-editor .studio-drawer {
  position: fixed; z-index: var(--z-overlay); top: 12px; right: 12px; bottom: 12px; width: min(420px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 10px; padding: 16px; overflow-y: auto;
  background: rgba(22, 31, 46, .97); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--st-line); border-radius: 12px; box-shadow: -24px 0 60px -20px rgba(0, 0, 0, .9);
  animation: st-drawer .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes st-drawer { from { transform: translateX(24px); opacity: 0; } }
.ep-editor .studio-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ep-editor .studio-drawer-head h4 { margin: 0; display: inline-flex; gap: 8px; align-items: center; color: var(--st-text); font-size: 17px; letter-spacing: .06em; }
.ep-editor .studio-drawer-head h4 .st-ic { color: #C9B8FF; }
.ep-editor .studio-x { width: 36px; padding: 0; }
.ep-editor .studio-revs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ep-editor .studio-rev { padding: 10px 10px 10px 12px; border-radius: 8px; background: var(--st-card); border: 1px solid var(--st-line-soft); display: flex; gap: 10px; align-items: center; }
.ep-editor .studio-rev-info { flex: 1 1 auto; min-width: 0; display: grid; gap: 2px; }
.ep-editor .studio-rev.is-confirm { border-color: rgba(196, 154, 60, .6); background: rgba(196, 154, 60, .06); }
.ep-editor .studio-rev-top { display: flex; gap: 10px; align-items: baseline; font-size: 13.5px; flex-wrap: wrap; }
.ep-editor .studio-rev-top b { color: var(--st-gold); }
.ep-editor .studio-rev-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ep-editor .studio-rev-acts { display: flex; gap: 6px; flex: none; }
.ep-editor .studio-rev.is-confirm { flex-wrap: wrap; }
.ep-editor .studio-rev.is-confirm .studio-rev-acts { flex-basis: 100%; }
.ep-editor .studio-desk-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.ep-editor .studio-desk-live { display: grid; gap: 6px; padding: 10px; border-radius: 8px; background: rgba(166, 138, 242, .06); border: 1px solid rgba(166, 138, 242, .22); }
.ep-editor .studio-desk-liverow { display: flex; gap: 6px; }
.ep-editor .studio-desk-liverow select { min-height: 36px; padding: 0 8px; font-size: 13.5px; border-radius: 8px; background: rgba(8, 14, 26, .55); border: 1px solid var(--field-border); color: var(--st-text); }
.ep-editor .studio-desk-liverow select:first-of-type { flex: 1 1 auto; min-width: 0; }
.ep-editor .studio-desk-liverow #st-desk-secs { flex: none; width: 76px; }
.ep-editor .studio-desk-out { display: grid; gap: 10px; }
.ep-editor .studio-desk-card { padding: 12px 14px; border-radius: 8px; border: 1px solid rgba(166, 138, 242, .35); background: linear-gradient(135deg, rgba(166, 138, 242, .1), rgba(91, 155, 213, .04)); }
.ep-editor .studio-desk-card.is-error { border-color: rgba(229, 72, 77, .4); background: rgba(229, 72, 77, .06); }
.ep-editor .studio-desk-card .studio-sug-text { font-size: 14.5px; }

/* ── Toasts ──────────────────────────────────────────────────────────── */
.ep-editor .studio-toasts { position: fixed; z-index: 80; right: 20px; bottom: 20px; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.ep-editor .studio-toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: min(460px, calc(100vw - 32px));
  padding: 8px 8px 8px 14px; border-radius: 12px; font-size: 14px; color: var(--st-text);
  background: rgba(30, 42, 61, .97); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--st-line); border-left: 3px solid var(--st-muted); box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .9);
  animation: st-toast .22s cubic-bezier(.2, .8, .2, 1);
}
.ep-editor .studio-toast.is-ok { border-left-color: var(--st-ok); }
.ep-editor .studio-toast.is-bad { border-left-color: var(--st-bad); }
.ep-editor .studio-toast.is-info { border-left-color: var(--st-info); }
.ep-editor .studio-toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }
@keyframes st-toast { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.ep-editor .studio-toast-msg { flex: 1 1 auto; }
.ep-editor .studio-toast-act { min-height: 36px; padding: 0 12px; font: 600 13px var(--st-body); color: var(--st-gold); background: rgba(196, 154, 60, .1); border: 1px solid rgba(196, 154, 60, .4); border-radius: 8px; cursor: pointer; }
.ep-editor .studio-toast-act:hover { background: var(--st-gold); color: #10192A; }
.ep-editor .studio-toast-x { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; background: transparent; border: 0; border-radius: 8px; color: var(--st-muted); cursor: pointer; }
.ep-editor .studio-toast-x:hover { color: var(--paper); background: rgba(255, 255, 255, .07); }
.ep-editor .studio-toast-x .st-ic { width: 15px; height: 15px; }
.ep-editor .studio-offscreen { position: fixed; left: -9999px; top: 0; }

.ep-editor :focus-visible { outline: 2px solid var(--st-gold); outline-offset: 2px; }
.ep-editor .studio-label:focus-visible, .ep-editor .studio-ta:focus-visible, .ep-editor .studio-title:focus-visible { outline: none; }

/* ── Tablet ──────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  .ep-editor .studio-row-main { grid-template-columns: 36px 82px 58px minmax(0, 1fr) auto 56px auto; gap: 8px; }
  .ep-editor .studio-script, .ep-editor .studio-spotcopy { padding-left: 44px; }
  .ep-editor .studio-spotcopy { margin-left: 44px; padding-left: 14px; }
  .ep-editor .studio-tools .studio-btn > span:not(.st-ic) { display: none; }
  .ep-editor .studio-tools .studio-seg .studio-btn > span:not(.st-ic), .ep-editor #st-send > span:not(.st-ic) { display: inline; }
  .ep-editor .studio-tools .studio-btn { padding: 0 10px; }
}

/* ── Phone ───────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .ep-editor { border-radius: 12px; }
  .ep-editor .studio-head { position: relative; padding: 12px 14px; border-radius: 12px 12px 0 0; }
  .ep-editor .studio-head-top { flex-wrap: wrap; gap: 4px 10px; }
  .ep-editor .studio-eyebrow { order: 3; flex-basis: 100%; white-space: normal; }
  .ep-editor .studio-save { margin-left: auto; }
  .ep-editor .studio-title { font-size: 23px; }
  .ep-editor .studio-time-big { font-size: 22px; }
  .ep-editor .studio-time-ends { margin-left: 0; flex-basis: 100%; }
  .ep-editor .studio-tools { width: 100%; }
  .ep-editor .studio-tools .studio-btn > span:not(.st-ic) { display: inline; }
  .ep-editor .studio-tools .studio-seg .studio-btn .st-ic { display: none; }
  .ep-editor #st-send { flex: 1 1 100%; min-height: 44px; }
  .ep-editor .studio-desc, .ep-editor .studio-banner, .ep-editor .studio-note { margin-left: 14px; margin-right: 14px; }
  .ep-editor .studio-view { padding: 8px 10px 18px; }
  .ep-editor .studio-row { scroll-margin-top: 40px; }
  .ep-editor .studio-row-main {
    grid-template-columns: 36px auto minmax(0, 1fr) auto;
    grid-template-areas: "grip kind at dur" "grip label label label" "grip flags flags tools";
    gap: 2px 8px; padding: 8px 6px;
  }
  .ep-editor .studio-grip { grid-area: grip; align-self: stretch; height: auto; min-height: 44px; }
  .ep-editor .studio-at { grid-area: at; }
  .ep-editor .studio-kind { grid-area: kind; align-self: center; padding: 4px 6px; }
  .ep-editor .studio-labelwrap { grid-area: label; }
  .ep-editor .studio-flags { grid-area: flags; justify-content: flex-start; align-self: center; }
  .ep-editor .studio-dur { grid-area: dur; }
  .ep-editor .studio-rowtools { grid-area: tools; }
  .ep-editor .studio-label { font-size: 16px; }
  .ep-editor .studio-script { padding: 0 10px 10px 10px; }
  .ep-editor .studio-spotcopy { margin: 0 10px 10px; }
  .ep-editor .studio-ta { font-size: 16px; padding: 10px 12px; }
  .ep-editor .studio-rel { margin-left: 0; flex: 1 1 100%; }
  .ep-editor .studio-rel input { flex: 1 1 auto; width: auto; min-width: 0; }
  .ep-editor .studio-ins { opacity: .9; transform: translateX(-50%) scale(.9); }
  .ep-editor .studio-result { grid-template-columns: 18px minmax(0, 1fr) 48px; }
  .ep-editor .studio-result-m { display: none; }
  .ep-editor .studio-spotpick { flex-basis: 100%; }
  .ep-editor .studio-drawer { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 82vh; border-radius: 12px 12px 0 0; }
  .ep-editor .studio-toasts { left: 12px; right: 12px; bottom: 12px; justify-items: stretch; }
  .ep-editor .studio-toast { max-width: none; }
  .ep-editor .studio-clocks { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ep-editor *, .ep-editor *::before, .ep-editor *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ── 1.29.0 Production Studio: pages (episode cards, script page, show book, live mode, sponsors) ── */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.chip-gold { color: var(--gold, #C49A3C); border-color: color-mix(in srgb, var(--gold, #C49A3C) 50%, transparent); background: color-mix(in srgb, var(--gold, #C49A3C) 10%, transparent); }

/* Kind colours, shared by the cards and live mode */
.ro-k-break, .lv-k-break { --k: var(--gold, #C49A3C); }
.ro-k-song, .lv-k-song { --k: var(--teal, #3FB6B2); }
.ro-k-audio, .lv-k-audio { --k: var(--info, #5B9BD5); }
.ro-k-spot, .lv-k-spot { --k: #A78BFA; }
.ro-k-note, .lv-k-note { --k: #7D8A9E; }

/* ── Click-to-edit scripts (ProdInline) ── */
.sx-click { position: relative; cursor: text; border: 1px dashed transparent; border-radius: 8px; transition: border-color .15s, background-color .15s; }
.sx-click:hover { border-color: color-mix(in srgb, var(--gold, #C49A3C) 45%, transparent); background: color-mix(in srgb, var(--gold, #C49A3C) 5%, transparent); }
.sx-click:focus-visible { outline: 2px solid var(--gold, #C49A3C); outline-offset: 2px; }
.sx-click::after { content: "\270E  Edit"; position: absolute; top: 6px; right: 8px; font: 600 11px/1 var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase;
  color: var(--gold, #C49A3C); background: var(--navy, #0F1B2D); border: 1px solid color-mix(in srgb, var(--gold, #C49A3C) 50%, transparent); border-radius: 4px; padding: 4px 7px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.sx-click:hover::after, .sx-click:focus-visible::after { opacity: 1; }
.sx-click > :first-child { margin-top: 0; }
.sx-click > :last-child { margin-bottom: 0; }
.sx-cue { color: var(--muted, #93A3B8); font: 600 .74em/1.4 var(--mono, monospace); letter-spacing: .06em; }
.sx-cue-line { color: var(--muted, #93A3B8); }
.sx-dir { color: var(--muted, #93A3B8); font-style: italic; }
.sx-empty { color: var(--muted, #93A3B8); font-style: italic; margin: 0; }
.sx-edit { margin: 4px 0; }
.sx-ta { display: block; width: 100%; box-sizing: border-box; min-height: 120px; resize: vertical; overflow: hidden; font: 16px/1.6 var(--body, system-ui); color: var(--text, #E8ECF2);
  background: color-mix(in srgb, var(--navy, #0F1B2D) 85%, var(--ink)); border: 1px solid var(--gold, #C49A3C); border-radius: 8px; padding: 10px 12px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold, #C49A3C) 18%, transparent); }
.sx-ta:focus { outline: none; border-color: var(--gold, #C49A3C); }
.sx-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; color: var(--muted, #93A3B8); }
.sx-meta { font-family: var(--mono, monospace); font-variant-numeric: tabular-nums; }
.sx-hint { margin-left: auto; }
.sx-bar .btn { min-height: 36px; }
.sx-status { display: block; font-size: 12.5px; color: var(--muted, #93A3B8); min-height: 0; transition: opacity 1s; }
.sx-status:empty { display: none; }
.sx-status.is-ok { color: var(--ok, #3DBE8B); }
.sx-status.is-ok::before { content: "\2713  "; }
.sx-status.is-bad { color: var(--onair, #E5484D); }
.sx-status.is-dirty { color: var(--warn, #E0A63A); }
.sx-status.is-fade { opacity: .6; }

/* ── Episode cards ── */
.ep-cards-tip { margin: -4px 0 10px; }
.ep-card { position: relative; border: 1px solid var(--border, #2A3A52); border-radius: 8px; padding: 16px 18px 14px; margin: 12px 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--card, #1E2A3D) 70%, transparent), transparent 160px); }
.ep-card.is-next { border-color: color-mix(in srgb, var(--gold, #C49A3C) 55%, var(--border, #2A3A52));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold, #C49A3C) 18%, transparent), 0 18px 40px -28px color-mix(in srgb, var(--gold, #C49A3C) 70%, transparent); }
.ep-card.is-next::before { content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--gold, #C49A3C), transparent); }
.ep-card-head { display: flex; justify-content: space-between; gap: 14px 18px; flex-wrap: wrap; align-items: flex-start; }
.ep-card-id { flex: 1 1 380px; min-width: 0; }
.ep-when { display: flex; gap: 6px 10px; align-items: center; flex-wrap: wrap; margin: 0 0 6px; font: 500 12px/1.3 var(--mono, monospace); letter-spacing: .06em; text-transform: uppercase; color: var(--muted, #93A3B8); }
.ep-date { color: var(--gold, #C49A3C); }
.ep-card .ep-title { font: 600 22px/1.15 var(--display, system-ui); letter-spacing: .01em; text-transform: none; color: var(--text, #E8ECF2); margin: 0 0 4px; overflow-wrap: anywhere; }
.ep-meta { margin: 0; }
.ep-card-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ep-card-actions .btn { min-height: 40px; }
.ep-desc { margin: 10px 0 0; color: var(--ink-soft, #C9D4E3); }

.ep-time { margin: 14px 0 4px; }
.ep-time-text { margin: 0 0 7px; }
.ep-time-main { font-size: 15px; color: var(--text, #E8ECF2); }
.ep-time-delta { font-weight: 600; }
.ep-time[data-state=ok] .ep-time-delta { color: var(--ok, #3DBE8B); }
.ep-time[data-state=under] .ep-time-delta { color: var(--warn, #E0A63A); }
.ep-time[data-state=over] .ep-time-delta { color: var(--onair, #E5484D); }
.ep-time[data-state=unknown] .ep-time-delta { color: var(--muted, #93A3B8); font-weight: 400; }
.ep-meter { position: relative; height: 8px; border-radius: 4px; overflow: hidden; background: color-mix(in srgb, var(--border, #2A3A52) 80%, transparent); }
.ep-meter > span { position: absolute; top: 0; bottom: 0; left: 0; width: 0; transition: width .4s ease, left .4s ease; }
.ep-meter-fill { --c: var(--ok, #3DBE8B); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 55%, transparent), var(--c)); }
.ep-meter-est { --c: var(--ok, #3DBE8B); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 75%, transparent) 0 4px, color-mix(in srgb, var(--c) 25%, transparent) 4px 8px); }
.ep-time[data-state=under] .ep-meter > span { --c: var(--warn, #E0A63A); }
.ep-time[data-state=over] .ep-meter > span { --c: var(--onair, #E5484D); }
.ep-time[data-state=unknown] .ep-meter > span { --c: #7D8A9E; }

.ep-ready { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
.ep-ready .chip { min-height: 30px; }
.ep-flag { min-height: 36px !important; cursor: pointer; font: 500 12px/1 var(--mono, monospace); }
.ep-flag.is-warn { color: var(--warn, #E0A63A); border-color: color-mix(in srgb, var(--warn, #E0A63A) 45%, transparent); }
.ep-flag.is-bad { color: var(--onair, #E5484D); border-color: color-mix(in srgb, var(--onair, #E5484D) 45%, transparent); }
.ep-flag:hover { background: color-mix(in srgb, currentColor 12%, transparent); }

.ep-order { margin-top: 14px; border-top: 1px solid var(--border, #2A3A52); padding-top: 10px; }
.ep-order > summary { cursor: pointer; min-height: 36px; display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.ep-card .ep-order-h { text-transform: uppercase; font: 500 11.5px/1.3 var(--mono, monospace); letter-spacing: .14em; text-transform: uppercase; color: var(--muted, #93A3B8); margin: 2px 0 8px; }
.ep-order .ro { list-style: none; margin: 4px 0 0; padding: 0; font-size: 14px; }
.ro-row { display: grid; grid-template-columns: 70px 92px minmax(0, 1fr) auto; column-gap: 12px; align-items: baseline;
  padding: 5px 10px; border-left: 3px solid var(--k, var(--border, #2A3A52)); border-radius: 4px 8px 8px 4px; }
.ro-row + .ro-row { margin-top: 2px; }
.ro-row:hover { background: color-mix(in srgb, var(--card, #1E2A3D) 55%, transparent); }
.ro-k-break, .ro-k-note { padding-top: 10px; padding-bottom: 8px; margin: 8px 0; background: color-mix(in srgb, var(--k) 6%, transparent); }
.ro-k-note { border-left-style: dashed; }
.ro-time { font-size: 12px; color: var(--muted, #93A3B8); white-space: nowrap; }
.ro-kind { font: 500 10.5px/1.4 var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--k); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ro-label { min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.ro-k-break .ro-label { font-weight: 600; }
.ro-dur { font-size: 12px; color: var(--muted, #93A3B8); text-align: right; white-space: nowrap; }
.ro-dur.is-est { font-style: italic; }
.ro-dur.is-dup { color: var(--warn, #E0A63A); }
.ro-sx, .ro-row > .sx-edit, .ro-row > .sx-status { grid-column: 2 / -1; }
.ro-sx { margin: 8px 0 2px; padding: 8px 12px; font-size: 16px; line-height: 1.6; color: var(--text, #E8ECF2); max-width: 72ch; }
.ro-sx p { margin: 0 0 8px; }
.ro-row.is-flash { animation: ro-flash 1.6s ease-out; }
@keyframes ro-flash { 0%, 30% { background: color-mix(in srgb, var(--gold, #C49A3C) 22%, transparent); } 100% { background: transparent; } }

/* ── Sponsors → Place spots automatically ── */
.sp-rotate { margin-top: 16px; padding: 14px 16px; border: 1px dashed color-mix(in srgb, var(--gold, #C49A3C) 40%, var(--border, #2A3A52)); border-radius: 8px; }
.sp-rotate-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sp-rotate-head .btn { min-height: 40px; }
.sp-rotate-head .muted { flex: 1 1 280px; }
.sp-rot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-top: 12px; }
.sp-rot-ep { background: var(--card, #1E2A3D); border: 1px solid var(--border, #2A3A52); border-radius: 8px; padding: 10px 12px; min-width: 0; }
.sp-rot-ep h5 { margin: 0 0 6px; font-size: 13.5px; line-height: 1.3; }
.sp-rot-list li { display: grid; gap: 1px; padding: 6px 0; border-top: 1px solid color-mix(in srgb, var(--border, #2A3A52) 60%, transparent); }
.sp-rot-what { font-size: 13.5px; }
.sp-rot-what b { color: #C4B5FD; }
.sp-rot-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 12px 0 0; }
.sp-rot-status { margin: 10px 0 0; }
.sp-rot-status:empty { display: none; }
.sp-rot-status.is-ok { color: var(--ok, #3DBE8B); }
.sp-rot-status.is-bad { color: var(--onair, #E5484D); }

/* ── Show book: in-place editing ── */
.prod-book-note { margin: 0 0 8px; padding: 8px 12px; border-left: 3px solid var(--gold, #C49A3C); background: color-mix(in srgb, var(--gold, #C49A3C) 7%, transparent); border-radius: 0 8px 8px 0; }
.prod-page-tools .btn { min-height: 36px; }
.prod-page.is-editing { border-color: color-mix(in srgb, var(--gold, #C49A3C) 60%, var(--border, #2A3A52)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold, #C49A3C) 20%, transparent); }
.pg-editor { padding: 14px 16px 16px; display: grid; gap: 12px; }
.pg-ed-head { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.pg-ed-tlabel { flex: 1 1 320px; display: grid; gap: 4px; }
.pg-ed-title { font-weight: 600; }
.pg-ed-status { margin-left: auto; color: var(--muted, #93A3B8); min-height: 1.2em; }
.pg-ed-status.is-ok { color: var(--ok, #3DBE8B); }
.pg-ed-status.is-bad { color: var(--onair, #E5484D); }
.pg-ed-status.is-dirty { color: var(--warn, #E0A63A); }
.pg-ed-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.pg-ta { display: block; width: 100%; box-sizing: border-box; min-height: 320px; resize: vertical; font: 13.5px/1.65 var(--mono, monospace); tab-size: 2; }
.pg-ta:focus { border-color: var(--gold, #C49A3C); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold, #C49A3C) 15%, transparent); outline: none; }
.pg-ed-prev { border: 1px solid var(--border, #2A3A52); border-radius: 8px; background: color-mix(in srgb, var(--card, #1E2A3D) 45%, transparent); max-height: 75vh; overflow: auto; position: sticky; top: 12px; }
.pg-ed-cap { margin: 0; padding: 8px 14px; font: 500 11px/1.3 var(--mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--muted, #93A3B8); border-bottom: 1px solid var(--border, #2A3A52); }
.pg-preview { padding: 4px 14px 10px; line-height: 1.55; }
.pg-ed-help { margin: 0; }
.pg-conflict { border: 1px solid var(--warn, #E0A63A); background: color-mix(in srgb, var(--warn, #E0A63A) 10%, transparent); border-radius: 8px; padding: 10px 14px; }
.pg-conflict p { margin: 0 0 8px; }
.pg-conflict .actions { margin: 0; display: flex; gap: 8px; }
.pg-ed-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pg-ed-actions .btn, .pg-conflict .btn { min-height: 38px; }

/* ── Printable script page (paper by default; Teleprompter is dark) ── */
.script-page { --text: #16181d; --muted: #5d6573; --border: #d9dde3; --card: #f3f4f6; --ink-soft: #0F3040; --navy: var(--paper);
  background: var(--paper) !important; color: #16181d; }
.script-page h1, .script-page h2, .script-page h3, .script-page .md, .script-page .md p, .script-page .md li, .script-page .md strong { color: #16181d; }
.script-page .muted, .script-page .script-cue { color: #5d6573 !important; }
.sp-bar { position: sticky; top: 0; z-index: 5; display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; padding: 8px max(16px, calc(50% - 410px));
  background: #0F1B2D; color: #E8ECF2; box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.sp-bar a { color: #E8ECF2; }
.sp-bar .sp-back { display: inline-flex; align-items: center; min-height: 36px; }
.prod-folder { overflow-wrap: anywhere; }
.sp-bar-hint { color: #93A3B8; flex: 1 1 200px; }
.sp-bar-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-btn { min-height: 36px; min-width: 36px; padding: 0 12px; border-radius: 8px; border: 1px solid #2A3A52; background: #1E2A3D; color: #E8ECF2; font: 600 13px/1 var(--body, system-ui); cursor: pointer; }
.sp-btn:hover { border-color: var(--gold, #C49A3C); }
.sp-btn[aria-pressed=true] { background: var(--gold, #C49A3C); border-color: var(--gold, #C49A3C); color: #0F1B2D; }
.sp-head { margin-bottom: 8px; }
.sp-eyebrow { font: 500 11.5px/1.3 var(--mono, monospace); letter-spacing: .14em; text-transform: uppercase; color: #8B6914; margin: 0 0 6px; }
.script-page .script-doc h1 { font-size: clamp(30px, 4.4vw, 44px); line-height: 1.08; margin-bottom: 6px; }
.script-page .script-ep h2 { font-size: clamp(24px, 3vw, 32px); margin-top: 8px; line-height: 1.12; }
.script-page .sp-when { margin: 4px 0 14px; }
.script-page .sx-click:hover { background: #fffaf0; border-color: #e2c88a; }
.script-page .sx-click::after { background: var(--paper); color: #8B6914; border-color: #e2c88a; }
.script-page .sp-sx { padding: 6px 10px; margin-left: -10px; font-size: 16px; line-height: 1.6; }
.script-page .sx-cue, .script-page .sx-cue-line, .script-page .sx-cue-line .sx-cue { color: #5F6774; }
.script-page .sx-ta { background: var(--paper); color: #16181d; }
.script-page .sx-status.is-ok { color: #1f7a52; }
.script-page.is-tele { --text: #F2F4F7; --muted: #6B7686; background: #05080D !important; color: #F2F4F7; }
.script-page.is-tele h1, .script-page.is-tele h2, .script-page.is-tele h3, .script-page.is-tele .md, .script-page.is-tele .md p, .script-page.is-tele .md li, .script-page.is-tele .md strong { color: #F2F4F7; }
.script-page.is-tele .script-doc { max-width: 1180px; }
.script-page.is-tele .script-ep h2 { color: var(--gold, #C49A3C); }
.script-page.is-tele .script-break { border-left-width: 6px; padding-left: 22px; margin: 34px 0; }
.script-page.is-tele .script-break h3 { font-size: calc(var(--tele-size, 40px) * .5); color: var(--gold, #C49A3C); }
.script-page.is-tele .sp-sx { font-size: var(--tele-size, 40px); line-height: 1.38; font-weight: 500; }
.script-page.is-tele .sp-sx p { margin: 0 0 .6em; }
.script-page.is-tele .sx-cue, .script-page.is-tele .sx-cue-line, .script-page.is-tele .sx-dir { color: #7C8799 !important; font-size: .45em; }
.script-page.is-tele .sx-cue-line .sx-cue, .script-page.is-tele .sx-cue-line .sx-dir { font-size: 1em; }
.script-page.is-tele .sp-bar { padding-left: max(16px, calc(50% - 590px)); padding-right: max(16px, calc(50% - 590px)); }
.script-page.is-tele .muted, .script-page.is-tele .script-cue { color: #6B7686 !important; }
.script-page.is-tele .script-cue { font-size: 15px; }
.script-page.is-tele .sx-click:hover { background: rgba(196, 154, 60, .06); border-color: rgba(196, 154, 60, .4); }
.script-page.is-tele .sx-click::after { background: #05080D; color: var(--gold, #C49A3C); }
.script-page.is-tele .sx-ta { background: #0B111B; color: #F2F4F7; font-size: calc(var(--tele-size, 40px) * .6); }
.script-page.is-tele .sp-eyebrow { color: var(--gold, #C49A3C); }
@media print {
  .sp-bar, .sx-bar, .sx-status, .sx-edit { display: none !important; }
  .sx-click { border: 0 !important; background: none !important; padding-left: 0 !important; margin-left: 0 !important; }
  .sx-click::after { display: none !important; }
  .sx-click[hidden] { display: block !important; }
  .script-page.is-tele, .script-page.is-tele .script-doc { background: var(--paper) !important; color: var(--ink) !important; }
  .script-page.is-tele .sp-sx { font-size: 12pt; line-height: 1.5; }
  .script-page.is-tele .script-break h3 { font-size: 13pt; color: var(--ink); }
  .script-page.is-tele h1, .script-page.is-tele h2, .script-page.is-tele .md, .script-page.is-tele .md p, .script-page.is-tele .md strong { color: var(--ink) !important; }
  .script-page .sx-cue, .script-page .sx-cue-line { color: #444 !important; font-size: .85em; }
  .ep-card .sx-click::after { display: none; }
}

/* ── Live mode: the on-air console ── */
.live-page { margin: 0; background: #060B14; color: var(--text); min-height: 100vh; overflow-x: hidden; }
.lv { --lv-panel: #0B1424; --lv-line: #1A2940; --lv-dim: #7D8A9E; --lv-gold: var(--gold, #C49A3C); --lv-red: var(--onair, #E5484D);
  --lv-green: var(--ok, #3DBE8B); --lv-amber: var(--warn, #E0A63A);
  display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; gap: 12px; box-sizing: border-box; min-height: 100vh; padding: 12px 18px 10px;
  background: radial-gradient(1100px 520px at 12% -12%, rgba(196, 154, 60, .10), transparent 60%),
              radial-gradient(900px 600px at 105% 0%, rgba(63, 182, 178, .07), transparent 60%), #060B14; }
.lv-cap { display: block; font: 600 10.5px/1.2 var(--mono, monospace); letter-spacing: .18em; text-transform: uppercase; color: var(--lv-dim); }
.lv-top { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.lv-back { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 1px solid var(--lv-line); border-radius: 8px; color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: 13.5px; }
.lv-back:hover { border-color: var(--lv-gold); color: var(--paper); }
.lv-ident { display: grid; min-width: 0; flex: 1 1 260px; line-height: 1.2; }
.lv-eyebrow { font: 500 11px/1.3 var(--mono, monospace); letter-spacing: .12em; text-transform: uppercase; color: var(--lv-gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-ep { font: 600 19px/1.2 var(--display, system-ui); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-when { font-size: 12.5px; color: var(--lv-dim); }
.lv-lamp { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--lv-line);
  font: 700 13px/1 var(--mono, monospace); letter-spacing: .16em; text-transform: uppercase; color: var(--lv-dim); }
.lv-lamp-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.lv[data-state=onair] .lv-lamp { color: var(--paper); border-color: var(--lv-red); background: color-mix(in srgb, var(--lv-red) 85%, var(--ink)); box-shadow: 0 0 24px -4px var(--lv-red); }
.lv[data-state=onair] .lv-lamp-dot { background: var(--paper); animation: lv-pulse 1.6s ease-in-out infinite; }
.lv[data-state=rehearse] .lv-lamp { color: var(--lv-amber); border-color: var(--lv-amber); background: color-mix(in srgb, var(--lv-amber) 12%, transparent); }
.lv[data-state=rehearse] .lv-lamp-dot { animation: lv-pulse 2.4s ease-in-out infinite; }
@keyframes lv-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.lv-ctl { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lv-btn { min-height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--lv-line); background: var(--lv-panel); color: var(--text); font: 600 13.5px/1 var(--body, system-ui); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.lv-btn:hover { border-color: var(--lv-gold); }
.lv-btn:focus-visible, .lv-speed select:focus-visible, .lv-back:focus-visible, .lv-ri-in:focus-visible { outline: 2px solid var(--lv-gold); outline-offset: 2px; }
.lv-btn[aria-pressed=true] { background: var(--lv-amber); border-color: var(--lv-amber); color: #1a1205; }
.lv-sq { min-width: 40px; justify-content: center; padding: 0 8px; }
.lv-speed select { min-height: 38px; width: auto; padding: 0 8px; background: var(--lv-panel); color: var(--text); border: 1px solid var(--field-border); border-radius: 8px; }
.lv-btn[hidden], .lv-speed[hidden] { display: none; }

.lv-clocks { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 12px; }
.lv-tile { position: relative; min-width: 0; padding: 12px 16px 14px; border-radius: 12px; border: 1px solid var(--lv-line);
  background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 60%), var(--lv-panel); overflow: hidden; }
.lv-big { display: block; margin-top: 4px; font: 600 clamp(36px, 4.7vw, 76px)/1 var(--display, system-ui); font-variant-numeric: tabular-nums; letter-spacing: .01em; color: var(--paper);
  text-shadow: 0 0 28px rgba(196, 154, 60, .25); white-space: nowrap; }
.lv-mid { display: block; margin-top: 6px; font: 600 clamp(24px, 2.9vw, 42px)/1.05 var(--display, system-ui); font-variant-numeric: tabular-nums; color: #F2F4F7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-sub { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.35; color: var(--lv-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-plan .lv-sub { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lv-ampm { font-size: .36em; margin-left: .3em; letter-spacing: .08em; color: var(--lv-gold); vertical-align: .9em; }
.lv-clock { border-color: color-mix(in srgb, var(--lv-gold) 35%, var(--lv-line)); }
.lv[data-state=onair] .lv-clock { border-color: color-mix(in srgb, var(--lv-red) 50%, var(--lv-line)); }
.lv-meter { display: block; position: relative; height: 4px; margin-top: 10px; border-radius: 2px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.lv-meter > span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 2px; background: linear-gradient(90deg, rgba(196, 154, 60, .45), var(--lv-gold)); }
#lv-out.is-warn { color: var(--lv-amber); }
#lv-out.is-bad { color: var(--lv-red); }
.lv-brk .lv-mid { color: var(--lv-gold); }
.lv-brk .lv-mid.is-soon { color: var(--lv-amber); animation: lv-pulse 1s ease-in-out infinite; }
.lv-brk .lv-mid.is-now { color: var(--lv-red); }
.lv-plan .lv-mid { font-size: clamp(18px, 1.9vw, 28px); }
.lv-plan .lv-mid.is-ok { color: var(--lv-green); }
.lv-plan .lv-mid.is-warn { color: var(--lv-amber); }
.lv-plan .lv-mid.is-bad { color: var(--lv-red); }
.lv-drift-plan { color: var(--ink-soft); }

.lv-np { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; }
.lv-now, .lv-next { min-width: 0; padding: 10px 16px 12px; border-radius: 12px; border: 1px solid var(--lv-line); background: var(--lv-panel); }
.lv-next { opacity: .9; }
.lv-np-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; min-width: 0; }
.lv-np-label { flex: 1 1 auto; min-width: 0; font: 600 clamp(17px, 1.7vw, 24px)/1.2 var(--body, system-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-np-left { font-size: clamp(16px, 1.6vw, 22px); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.lv-kind { flex: none; font: 600 10.5px/1 var(--mono, monospace); letter-spacing: .1em; text-transform: uppercase; color: var(--k, var(--lv-dim));
  padding: 5px 8px; border-radius: 4px; border: 1px solid color-mix(in srgb, var(--k, #7D8A9E) 50%, transparent); background: color-mix(in srgb, var(--k, #7D8A9E) 12%, transparent); }
.lv-kind:empty { display: none; }
.lv-meter-now { height: 6px; }
.lv-meter-now > span { background: linear-gradient(90deg, rgba(63, 182, 178, .5), var(--teal, #3FB6B2)); transition: width .25s linear; }

.lv-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; min-height: 0; }
.lv-script { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; border-radius: 12px; border: 1px solid var(--lv-line);
  background: linear-gradient(180deg, rgba(196, 154, 60, .05), transparent 140px), #070D18; overflow: hidden; }
.lv-sx-head { display: flex; align-items: baseline; gap: 8px 14px; flex-wrap: wrap; padding: 14px 22px 10px; border-bottom: 1px solid var(--lv-line); }
.lv-sx-tag { font: 700 11px/1 var(--mono, monospace); letter-spacing: .16em; text-transform: uppercase; color: #0B111B; background: var(--lv-gold); padding: 6px 9px; border-radius: 4px; }
.lv-sx-tag:empty { display: none; }
.lv-sx-tag.is-now { background: var(--lv-red); color: var(--paper); }
.lv-sx-title { margin: 0; font: 600 clamp(20px, 2.2vw, 30px)/1.15 var(--display, system-ui); color: var(--paper); flex: 1 1 auto; min-width: 0; }
.lv-sx-meta { font-size: 13px; color: var(--lv-dim); }
.lv-sx { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 18px 26px 26px; scrollbar-width: thin; scrollbar-color: var(--lv-line) transparent; }
.lv-sx-body { font-size: var(--lv-fs, 46px); line-height: 1.32; font-weight: 500; color: #F5F7FA; max-width: 30em; padding: 6px 12px; margin-left: -12px; }
.lv-sx-body p { margin: 0 0 .55em; }
.lv-sx-body .sx-cue, .lv-sx-body .sx-cue-line, .lv-sx-body .sx-dir { color: #7C8799; font-size: .42em; letter-spacing: .08em; }
.lv-sx-body .sx-cue-line .sx-cue, .lv-sx-body .sx-cue-line .sx-dir { font-size: 1em; }
.lv-sx-body .sx-cue-line { line-height: 1.5; }
.lv-sx-body.sx-click::after { top: 10px; right: 12px; background: #070D18; }
.lv-sx .sx-ta.lv-ta { font-size: calc(var(--lv-fs, 46px) * .58); line-height: 1.4; background: #0B1424; color: #F5F7FA; min-height: 40vh; }
.lv-sx .sx-status { margin-top: 8px; font-size: 14px; }
.lv-sx-none { padding: 24px; color: var(--lv-dim); }
.lv-rail { min-width: 0; min-height: 0; overflow-y: auto; border-radius: 12px; border: 1px solid var(--lv-line); background: var(--lv-panel); padding: 10px 8px; scrollbar-width: thin; scrollbar-color: var(--lv-line) transparent; }
.lv-rail-h { padding: 2px 8px 8px; margin: 0; }
.lv-run { list-style: none; margin: 0; padding: 0; }
.lv-ri { border-radius: 8px; }
.lv-ri-in { display: grid; grid-template-columns: 44px 40px minmax(0, 1fr) auto; gap: 8px; align-items: center; width: 100%; box-sizing: border-box; min-height: 32px; padding: 4px 8px;
  border: 0; border-left: 3px solid var(--k); border-radius: 8px; background: none; color: var(--ink-soft); font: 13px/1.3 var(--body, system-ui); text-align: left; }
button.lv-ri-in { cursor: pointer; min-height: 38px; }
button.lv-ri-in:hover { background: rgba(255, 255, 255, .05); }
.lv-ri-at { font-size: 11.5px; color: var(--lv-dim); }
.lv-ri-kind { font: 600 9.5px/1 var(--mono, monospace); letter-spacing: .08em; text-transform: uppercase; color: var(--k); }
.lv-ri-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-k-break .lv-ri-label { font-weight: 600; color: #F2F4F7; }
.lv-ri-dur { font-size: 11.5px; color: var(--lv-dim); }
.lv-ri.is-done { opacity: .42; }
.lv-ri.is-now .lv-ri-in { background: color-mix(in srgb, var(--k) 18%, transparent); color: var(--paper); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k) 45%, transparent); }
.lv-ri.is-now .lv-ri-at::before { content: "\25B6 "; color: var(--lv-red); }
.lv-ri.is-shown .lv-ri-in { box-shadow: inset 0 0 0 1px var(--lv-gold); }
.lv-keys { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 12px; color: var(--lv-dim); padding: 2px 4px; }
.lv-keys kbd { display: inline-block; min-width: 18px; padding: 2px 5px; margin-right: 3px; border-radius: 4px; border: 1px solid var(--lv-line); background: var(--lv-panel); font: 600 11px/1.2 var(--mono, monospace); color: var(--ink-soft); text-align: center; }

@media (min-width: 901px) {
  .lv { height: 100vh; height: 100dvh; }
}
@media (max-width: 1100px) {
  .lv-main { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 900px) {
  .lv { padding: 10px 12px; gap: 10px; }
  .lv-clocks { grid-template-columns: 1fr 1fr; }
  .lv-clock, .lv-plan { grid-column: 1 / -1; }
  .lv-np { grid-template-columns: 1fr; }
  .lv-main { grid-template-columns: 1fr; }
  .lv-script { min-height: 60vh; }
  .lv-rail { max-height: 50vh; }
  .lv-sx-body { font-size: calc(var(--lv-fs, 46px) * .62); }
  .lv-keys { display: none; }
}
@media (max-width: 520px) {
  .lv-top { gap: 8px; }
  .lv-ident { order: 3; flex-basis: 100%; }
  .lv-ctl { order: 4; }
  .lv-tile { padding: 10px 12px; }
  .lv-sx { padding: 12px 14px 18px; }
  .lv-sx-head { padding: 12px 14px 8px; }
  .lv-sx-body { font-size: calc(var(--lv-fs, 46px) * .52); }
}

/* ── Phones: episode cards ── */
@media (max-width: 720px) {
  .ep-card { padding: 14px 12px 12px; }
  .ep-card-actions { width: 100%; }
  .ep-card-actions .btn { flex: 1 1 auto; justify-content: center; }
  .ro-row { grid-template-columns: 58px minmax(0, 1fr) auto; column-gap: 8px; padding-left: 8px; padding-right: 6px; }
  .ro-kind { display: none; }
  .ro-sx, .ro-row > .sx-edit, .ro-row > .sx-status { grid-column: 1 / -1; }
  .ro-sx { font-size: 15.5px; padding: 6px 8px; }
  .sx-hint { display: none; }
  .sx-meta { flex: 1 1 100%; }
  .sx-bar .sx-cancel { margin-left: auto; }
  .pg-ed-split { grid-template-columns: 1fr; }
  .pg-ed-prev { position: static; max-height: 50vh; }
  .sp-bar { padding: 8px 12px; }
  .sp-bar-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lv-lamp-dot, .lv-brk .lv-mid.is-soon, .lv[data-state=onair] .lv-lamp-dot, .lv[data-state=rehearse] .lv-lamp-dot { animation: none !important; }
  .ro-row.is-flash { animation: none; outline: 2px solid var(--gold, #C49A3C); }
  .ep-meter > span, .lv-meter-now > span, .sx-click, .sx-click::after, .sx-status { transition: none !important; }
}

/* 1.31.0: Productions → AI host voice */
.voice-desk [hidden] { display: none !important; }
.voice-desk { margin: 0 0 1.25rem; padding: 1rem 1.1rem; border: 1px solid rgba(196, 154, 60, .35); border-radius: 12px;
  background: linear-gradient(135deg, rgba(196, 154, 60, .08), rgba(15, 48, 64, .35)); }
.voice-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.voice-head h4 { margin: 0 0 .25rem; color: var(--gold, #C49A3C); letter-spacing: .02em; }
.voice-head p { margin: 0; max-width: 46rem; }
.voice-body { margin-top: 1rem; display: grid; gap: 1rem; }
.voice-settings { display: grid; grid-template-columns: minmax(14rem, 24rem) 1fr; gap: .75rem 1rem; align-items: start; }
.voice-settings .field { margin: 0; }
.voice-settings select, .voice-settings textarea { width: 100%; }
.voice-sample { grid-column: 1 / -1; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.voice-sample audio { height: 36px; max-width: 100%; }
.voice-summary { display: grid; gap: .5rem; }
.voice-status { margin: 0; font-weight: 600; }
.voice-bar { width: 100%; height: 8px; accent-color: var(--gold, #C49A3C); }
.voice-summary .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.voice-send { padding: .75rem 1rem; border-radius: 8px; background: rgba(46, 160, 110, .12); border: 1px solid rgba(46, 160, 110, .4); }
.voice-send p { margin: 0 0 .5rem; }
.voice-sent { margin: .5rem 0 0; }
.voice-sent .ok-text { color: #8fe0b5; }
.voice-ep { margin: .75rem 0 .35rem; font-size: .95rem; color: var(--text, #e8edf2); }
.voice-rows { margin: 0; display: grid; gap: .35rem; }
.voice-row { display: grid; grid-template-columns: minmax(10rem, 1fr) auto minmax(6rem, auto) auto; align-items: center; gap: .6rem;
  padding: .45rem .6rem; border-radius: 8px; background: rgba(255, 255, 255, .03); border-left: 3px solid rgba(255, 255, 255, .12); }
.voice-row.is-missing { border-left-color: #d9a441; }
.voice-row.is-ai { border-left-color: #a98cf0; }
.voice-row.is-recorded { border-left-color: #3fbf8a; }
.voice-row.is-error { border-left-color: #e5675f; }
.voice-row.is-busy { border-left-color: var(--gold, #C49A3C); background: rgba(196, 154, 60, .1); }
.voice-label { font-weight: 600; }
.voice-chip { justify-self: start; }
.is-missing .voice-chip { color: #f0c46b; border-color: rgba(217, 164, 65, .5); }
.is-ai .voice-chip { color: #cbb8ff; border-color: rgba(169, 140, 240, .5); }
.is-recorded .voice-chip { color: #8fe0b5; border-color: rgba(63, 191, 138, .5); }
.is-error .voice-chip { color: #ff9d96; border-color: rgba(229, 103, 95, .5); }
.is-busy .voice-chip::before { content: ''; display: inline-block; width: .55em; height: .55em; margin-right: .35em; border-radius: 50%;
  background: var(--gold, #C49A3C); animation: voice-pulse 1s ease-in-out infinite; }
.voice-tools { display: flex; gap: .35rem; justify-content: flex-end; }
.voice-tools .btn { min-height: 36px; }
.voice-err { grid-column: 1 / -1; margin: 0; }
@keyframes voice-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .is-busy .voice-chip::before { animation: none; } }
@media (max-width: 720px) {
  .voice-settings { grid-template-columns: 1fr; }
  .voice-row { grid-template-columns: 1fr auto; }
  .voice-info { grid-column: 1 / -1; }
  .voice-tools { grid-column: 1 / -1; justify-content: flex-start; }
}

/* 1.32.0: host break voices — AI voice / Recorded / Read live */
.voice-all { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .6rem .75rem; border-radius: 8px; background: rgba(255, 255, 255, .04); }
.voice-modes { display: inline-flex; border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; overflow: hidden; }
.voice-modes .btn { border: 0; border-radius: 0; min-height: 36px; padding: .3rem .8rem; background: transparent; }
.voice-modes .btn + .btn { border-left: 1px solid rgba(255, 255, 255, .14); }
.voice-modes .btn.is-on, .voice-modes .btn[aria-pressed="true"] { background: var(--gold, #C49A3C); color: #1a1408; font-weight: 700; }
.voice-modes .btn:focus-visible { outline: 2px solid var(--gold, #C49A3C); outline-offset: -2px; }
.voice-settings-box > summary { cursor: pointer; font-weight: 600; padding: .25rem 0; }
.voice-settings-box[open] > summary { margin-bottom: .6rem; }
.voice-row { grid-template-columns: minmax(9rem, 1fr) auto auto minmax(6rem, auto) auto; }
.voice-row.is-live { border-left-color: #5fb6e8; }
.voice-row.is-norec { border-left-color: #8a94a6; }
.is-live .voice-chip { color: #9fd6f5; border-color: rgba(95, 182, 232, .5); }
.is-norec .voice-chip { color: #c2c9d4; }
@media (max-width: 900px) {
  .voice-row { grid-template-columns: 1fr auto; }
  .voice-row .voice-modes { grid-column: 1 / -1; justify-self: start; }
}

/* 1.33.0: on-air promos in Host break voices */
.voice-promos { margin-top: 1rem; padding-top: .75rem; border-top: 1px solid rgba(255, 255, 255, .1); }
.voice-run { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .25rem 0 .5rem; }
.voice-run input[type="date"] { min-height: 36px; }
.voice-run .voice-every { width: 4.5rem; min-height: 36px; }
.voice-promos .voice-row { grid-template-columns: minmax(12rem, 1fr) auto minmax(6rem, auto) auto; }
@media (max-width: 900px) { .voice-promos .voice-row { grid-template-columns: 1fr auto; } }

/* 1.34.0: listener app */
.la-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.la-head h3, .la-head h4 { margin: 0; }
.la-posts { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; }
.la-posts li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; background: var(--bg, rgba(0,0,0,.15)); border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 11px; overflow-wrap: anywhere; }
.la-posts li.la-empty { background: none; border: 0; padding: 4px 0; }
.la-posts li.la-hidden { opacity: .55; }
.la-acts { display: flex; gap: 6px; flex-wrap: wrap; flex: none; margin: 0; }
.la-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.la-winner td { color: var(--gold, #C9A84C); font-weight: 600; }

/* 1.36: Missing music */
.mm-get a { margin-right: 8px; white-space: nowrap; }
.mm-get .btn { margin-top: 4px; }
.mm-free-out { margin-top: 6px; }
.mm-free-out ul { margin: 4px 0 0; padding-left: 18px; }
.mm-free-out li { margin: 2px 0; }
#mm-rows tr.is-off td { color: var(--muted); }
#mm-rows td.mm-state { white-space: nowrap; }

/* 1.39.2: when a voice was made, and whether it was redone */
.voice-chips { display: inline-flex; gap: .35rem; align-items: center; flex-wrap: wrap; justify-self: start; }
.voice-redo { color: #f5d38a; border-color: rgba(245, 211, 138, .45); }
.voice-redo:not([title^="Voiced once"]) { background: rgba(245, 211, 138, .08); }
.voice-name { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.voice-name .voice-info { line-height: 1.3; }
.voice-row { grid-template-columns: minmax(12rem, 1fr) auto auto auto; }
.voice-promos .voice-row { grid-template-columns: minmax(12rem, 1fr) auto auto; }
@media (max-width: 900px) {
  .voice-row, .voice-promos .voice-row { grid-template-columns: 1fr auto; }
  .voice-row .voice-modes, .voice-row .voice-chips { grid-column: 1 / -1; justify-self: start; }
}

/* 1.40.0: Productions → Still missing */
.prod-missing .pm-clear { margin: 0; color: #8fe0b5; }
.pm-prod { padding: .6rem 0 .2rem; border-top: 1px solid rgba(255, 255, 255, .08); }
.pm-prod:first-child { border-top: 0; padding-top: 0; }
.pm-head { margin: 0 0 .4rem; font-size: 1rem; }
.pm-head a { color: inherit; }
.pm-items { margin: 0; display: grid; gap: .3rem; }
.pm-item { display: flex; align-items: baseline; gap: .45rem; flex-wrap: wrap; padding: .35rem .55rem; border-radius: 8px;
  background: rgba(255, 255, 255, .03); border-left: 3px solid rgba(217, 164, 65, .7); }
.pm-item.is-urgent { border-left-color: #e5675f; background: rgba(229, 103, 95, .08); }
.pm-level { color: #f0c46b; border-color: rgba(217, 164, 65, .5); }
.is-urgent .pm-level { color: #ff9d96; border-color: rgba(229, 103, 95, .55); }
.pm-text { color: inherit; text-decoration: none; flex: 1 1 18rem; }
.pm-text:hover, .pm-text:focus-visible { text-decoration: underline; }

/* 1.42: syndicated shows (Shows editor, My shows) */
.episodes h4 { margin: 1.1rem 0 .5rem; }
.episodes details { margin-top: 1rem; }
.ep-date { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.ep-date input[type=date] { max-width: 11rem; }
.ep-upload .ep-progress { margin-left: .5rem; }
.attention ul.plain li { padding: .45rem 0; border-bottom: 1px solid var(--border); }
.attention ul.plain li:last-child { border-bottom: 0; }
.attention .inline-form { display: inline-flex; }
/* 1.43: breaks, promos, sponsors and music */
#extras { margin-top: 1.4rem; border-top: 1px solid var(--border); padding-top: 1rem; }
.show-extras .x-sec { margin: 1rem 0 1.4rem; }
.show-extras .x-list li { padding: .3rem 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.x-add { margin-top: .5rem; }
.x-add > summary { cursor: pointer; font-weight: 600; }
.x-add .form-grid { margin-top: .6rem; }
.x-up { margin-top: .4rem; padding-top: .6rem; border-top: 1px dashed var(--border); }
.lib-results li { margin: 3px 0; }
.lib-results .btn { text-align: left; white-space: normal; }

/* 1.46: format clock */
.fc-grid { display: grid; grid-template-columns: minmax(220px, 360px) minmax(0, 1fr); gap: 20px; align-items: start; margin: 10px 0; }
@media (max-width: 760px) { .fc-grid { grid-template-columns: minmax(0, 1fr); } }
.fc-fig { margin: 0; }
.fc-wheel { width: 100%; max-width: 360px; height: auto; display: block; }
.fc-wheel path, .fc-wheel circle { stroke: var(--ink); stroke-width: 1; }
.fc-local { fill: #7fd3ff; background: #7fd3ff; }
.fc-seg { fill: #e5383b; background: #e5383b; }
.fc-net { fill: #ffd60a; background: #ffd60a; }
.fc-hub { fill: var(--ink); }
.fc-labels text { fill: var(--ink); font: 600 11px var(--body); pointer-events: none; }
.fc-tick { fill: var(--text, currentColor); font: 600 13px var(--mono, monospace); }
.fc-key { display: inline-block; width: 11px; height: 11px; border-radius: 2px; border: 1px solid var(--ink); vertical-align: -1px; margin-left: 6px; }
.fc-key:first-child { margin-left: 0; }
.fc-hour td { background: var(--card); }
.fc-edit select, .fc-edit input { min-width: 0; }
.fc-form .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fc-legend { display: block; }
.fc-legend .fc-key { margin-left: 0; }
/* 1.47: the syndication page of one show */
.sync-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; position: sticky; top: 0; z-index: 5; background: var(--navy); padding: 6px 0; }
.sync-tabs a { padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px; }
.sync-tabs a.is-on, .sync-tabs a:hover { border-color: var(--gold, #C9A84C); color: var(--gold, #C9A84C); }
.tab-panel h2 { margin-top: 0; }
.sync-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 12px 0 18px; }
.sync-facts dt { color: var(--muted); font-weight: 600; }
.sync-facts dd { margin: 0; }
.ep-new { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ep-new-box { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.ep-new-box h3 { margin: 0 0 6px; }
.ep-card { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin: 12px 0; }
.ep-card.is-incomplete { border-color: var(--warn, #d9a441); }
.ep-card-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ep-card-head h4 { margin: 0; }
.ep-card-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-start; }
.seg-table td { vertical-align: top; }
.seg-up { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.seg-up input[type=file] { max-width: 15rem; }
.seg-tools { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.seg-songs { margin: 4px 0 0 1.2rem; padding: 0; }
.seg-all { margin: 10px 0; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.seg-all p { flex-basis: 100%; margin: 0; }
.old-eps { margin-top: 1rem; }
.sync-card { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; margin: 8px 0; }
@media (max-width: 640px) { .sync-facts { grid-template-columns: 1fr; } .sync-facts dt { margin-top: 6px; } }
.tab-panel, .ep-card { scroll-margin-top: 64px; }

/* 1.48: show artwork */
.art-add { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; margin: 10px 0 16px; padding: 12px 14px; border: 1px dashed var(--border); border-radius: 8px; }
.art-add .field { margin: 0; min-width: 0; }
.art-add input[type=file] { max-width: 100%; }
.art-add p { flex-basis: 100%; margin: 0; }
.art-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.art-card { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.art-card.is-logo { border-color: var(--gold, #C9A84C); }
.art-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--surface); }
.art-img img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.art-meta { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 0; overflow-wrap: anywhere; }
.art-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 0; }
.art-card .x-add { padding: 4px 12px 10px; }
.art-card .x-add input { max-width: 100%; }
.art-meta .chip { align-self: flex-start; margin: 2px 0; }
.week-guide tr.is-done td { opacity: .6; }
/* 1.50 Licences & royalties */
tr.is-current td { background: rgba(201,168,76,.08); }
.inline-form .input-sm, .input-sm { width: auto; padding: 5px 8px; font-size: 13px; min-height: 32px; }
td.bad, .mono.bad { color: var(--onair-text); font-weight: 700; }
#licence-form h4 { margin: 18px 0 6px; }
#filings td.mono, #licences td.mono { white-space: nowrap; }

/* 1.52: Auto download tab */
#fetch-form { margin-top: 16px; }
#download h3 { margin-top: 28px; }
#fetch-items .bad { color: var(--onair-text); }
/* 1.53: order and invoice lines */
.order-lines td { vertical-align: middle; }
.order-lines input[name="line_desc[]"], .order-lines input[name="desc[]"] { min-width: 140px; width: 100%; }
.order-lines .input-sm { width: 76px; min-width: 0; }
.order-lines select { width: auto; min-width: 0; max-width: 150px; }
.order-lines th:first-child, .order-lines td:first-child { width: 1%; }

/* 1.62: Fill in from their website (views/djs.php, views/shows.php) */
.site-fill { border: 1px dashed var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
.site-fill > label { display: block; font-weight: 500; margin-bottom: 6px; }
.site-fill-row { display: flex; gap: 8px; flex-wrap: wrap; }
.site-fill-row input { flex: 1 1 220px; min-width: 0; }
.site-fill-status { margin: 6px 0 0; }
.site-fill-status.bad { color: var(--danger, #e5484d); }
.site-filled { outline: 2px solid var(--gold); outline-offset: 1px; }

/* 1.79: AI Voice settings tabs (under the page's own sticky tabs, so not sticky) */
.sub-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.sub-tabs a { padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; color: var(--text); font-size: 13px; font-weight: 600; }
.sub-tabs a.is-on, .sub-tabs a:hover { border-color: var(--gold, #C9A84C); color: var(--gold, #C9A84C); }

/* ── 1.87: episode screen tools (production-episode-tools.js) ─────────────── */
.ep-editor .studio-btn-sm { min-height: 32px; padding: 0 10px; font-size: 12.5px; gap: 6px; }
.ep-editor .studio-btn-sm .st-ic svg { width: 15px; height: 15px; }
.ep-editor .studio-flag.is-ok { color: #7EE2B8; background: rgba(61, 190, 139, .12); border-color: rgba(61, 190, 139, .3); }

/* Host break voices */
.ep-editor .studio-voicebar { margin: -4px 14px 12px 142px; padding: 8px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border: 1px dashed var(--st-line); border-radius: 8px; }
.ep-editor .studio-voice-pick { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--st-muted); }
.ep-editor .studio-voice-pick select { min-height: 32px; padding: 2px 8px; font-size: 12.5px; color: var(--st-text); background: rgba(8, 14, 26, .55); border: 1px solid var(--field-border); border-radius: 8px; }
.ep-editor .studio-voice-acts { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ep-editor .studio-voice-note { flex: 1 1 220px; min-width: 0; color: var(--st-muted); }
.ep-editor.is-compact .studio-row:not(.is-open) .studio-voicebar { display: none; }

/* Songs that need replacing */
.ep-editor .studio-fixbar { margin: -2px 14px 12px 142px; padding: 8px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border-radius: 8px; background: rgba(224, 166, 58, .07); border: 1px solid rgba(224, 166, 58, .22); }
.ep-editor .studio-fix-text { flex: 1 1 240px; min-width: 0; color: #F4C46E; }
.ep-editor .studio-replace { flex: 1 1 100%; display: grid; gap: 8px; }
.ep-editor .studio-replace-q { width: 100%; min-height: 40px; padding: 8px 12px; font-size: 14px; border-radius: 8px; background: rgba(8, 14, 26, .55); border: 1px solid var(--field-border); color: var(--st-text); }
.ep-editor .studio-replace-q:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(196, 154, 60, .12); }
.ep-editor .studio-replace .studio-results { max-height: 240px; }
.ep-editor .studio-replace-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 12px; }

/* Recorder */
.ep-editor .studio-rec { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 16px; background: rgba(5, 9, 17, .72); }
.ep-editor .studio-rec[hidden] { display: none; }
.ep-editor .studio-rec-box { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; display: grid; gap: 12px; padding: 18px; background: var(--st-surface); border: 1px solid var(--st-line); border-radius: 12px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); }
.ep-editor .studio-rec-script { max-height: 38vh; overflow-y: auto; padding: 12px 14px; white-space: pre-wrap; font-size: 16px; line-height: 1.55; color: var(--st-text); background: rgba(8, 14, 26, .5); border-radius: 8px; border-left: 2px solid var(--k-break); }
.ep-editor .studio-rec-meter { height: 8px; border-radius: 999px; background: rgba(147, 163, 184, .15); overflow: hidden; }
.ep-editor .studio-rec-meter span { display: block; height: 100%; width: 0; background: var(--st-ok); transition: width .06s linear; }
.ep-editor .studio-rec-meter span.is-hot { background: var(--st-bad); }
.ep-editor .studio-rec-time { margin: 0; font-size: 28px; color: var(--st-text); font-variant-numeric: tabular-nums; }
.ep-editor .studio-rec-status { margin: 0; color: var(--st-muted); }
.ep-editor .studio-rec audio { width: 100%; }
.ep-editor .studio-rec-acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* Before it airs */
.ep-editor .studio-air { margin: 10px 20px 4px; border: 1px solid var(--st-line); border-radius: 8px; background: rgba(255, 255, 255, .02); }
.ep-editor .studio-air > summary { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; cursor: pointer; list-style: none; }
.ep-editor .studio-air > summary::-webkit-details-marker { display: none; }
.ep-editor .studio-air > summary::before { content: ''; width: 7px; height: 7px; border-right: 1.8px solid var(--st-muted); border-bottom: 1.8px solid var(--st-muted); transform: rotate(-45deg); transition: transform .15s; }
.ep-editor .studio-air[open] > summary::before { transform: rotate(45deg); }
.ep-editor .studio-air-title { font: 600 13px/1 var(--st-body); letter-spacing: .1em; text-transform: uppercase; color: var(--st-ink); }
.ep-editor .studio-air-lede { margin: 0 14px 10px; }
.ep-editor .studio-air-body { display: grid; gap: 10px; padding: 0 14px 14px; }
.ep-editor .studio-air-row { display: grid; gap: 8px; justify-items: start; padding: 10px 12px; border-radius: 8px; background: rgba(8, 14, 26, .35); border: 1px solid var(--st-line-soft); }
.ep-editor .studio-air-head { display: flex; align-items: center; gap: 8px; color: var(--st-text); font-size: 14px; }
.ep-editor .studio-air-dot { width: 9px; height: 9px; border-radius: 999px; background: var(--st-muted); flex: none; }
.ep-editor .studio-air-row.is-ok .studio-air-dot { background: var(--st-ok); }
.ep-editor .studio-air-row.is-warn .studio-air-dot { background: var(--st-warn); }
.ep-editor .studio-air-text { margin: 0; color: var(--st-ink); font-size: 13.5px; max-width: 70ch; }
.ep-editor .studio-air-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.ep-editor .studio-air-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.ep-editor .studio-air-list li.is-off .studio-air-what b { text-decoration: line-through; text-decoration-color: var(--st-muted); }
.ep-editor .studio-air-what { flex: 1 1 260px; min-width: 0; font-size: 13.5px; color: var(--st-text); }

@media (max-width: 960px) {
  .ep-editor .studio-voicebar, .ep-editor .studio-fixbar { margin-left: 44px; }
}
@media (max-width: 720px) {
  .ep-editor .studio-voicebar, .ep-editor .studio-fixbar { margin-left: 10px; margin-right: 10px; }
  .ep-editor .studio-air { margin-left: 12px; margin-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ep-editor .studio-rec-meter span, .ep-editor .studio-air > summary::before { transition: none; }
}
