/* Onam Show Console - design system and layout.
   Kasavu cream and gold with banana-leaf green; a dark control-room theme for show night. */

:root {
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino", Georgia, serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  --font-ml: "Noto Serif Malayalam", "Malayalam Sangam MN", "Kartika", serif;

  --bg: #F6F3EA;
  --bg-2: #EFEADC;
  --surface: #FFFFFF;
  --surface-2: #FBF9F4;
  --surface-3: #F3EFE4;
  --ink: #1B1E19;
  --ink-2: #3B4038;
  --muted: #6C6F64;
  --faint: #9C9D92;
  --line: #E6E0D1;
  --line-2: #D7D0BE;

  --brand: #136A42;
  --brand-hover: #0F5A37;
  --brand-ink: #FFFFFF;
  --brand-soft: #E2F0E6;
  --gold: #A97A1F;
  --gold-2: #D9A845;
  --gold-soft: #F7EDD5;
  --live: #D33A2C;
  --live-ink: #FFFFFF;
  --live-soft: #FBE6E2;
  --warn: #A86300;
  --warn-soft: #FBEFD8;
  --ok: #1D7A49;
  --ok-soft: #E0F1E6;
  --focus: #D9A845;

  --c-song: #2D63B0; --c-dance: #B23A6A; --c-skit: #7445B5; --c-instrumental: #127A70;
  --c-ceremony: #A6700E; --c-speech: #4F5D55; --c-interval: #6F6A5E; --c-other: #7A5C2E;

  --shadow-sm: 0 1px 2px rgba(40, 32, 10, .06);
  --shadow: 0 1px 2px rgba(40, 32, 10, .05), 0 6px 20px rgba(40, 32, 10, .06);
  --shadow-lg: 0 18px 60px rgba(25, 20, 5, .22);
  --radius: 14px;
  --radius-sm: 9px;
  --appbar-h: 64px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A0E0C; --bg-2: #0E1411; --surface: #121915; --surface-2: #161E1A; --surface-3: #1C2620;
    --ink: #ECEFEA; --ink-2: #C9D0C8; --muted: #8F9A91; --faint: #66716A; --line: #222D27; --line-2: #2E3B34;
    --brand: #3FB57A; --brand-hover: #4CC788; --brand-ink: #03130A; --brand-soft: #14281D;
    --gold: #E2B458; --gold-2: #F0C76E; --gold-soft: #2A2314;
    --live: #FF5B4D; --live-ink: #1A0302; --live-soft: #3A1714;
    --warn: #F0A63A; --warn-soft: #33240E; --ok: #4CC584; --ok-soft: #13281C; --focus: #F0C76E;
    --c-song: #7BA9F0; --c-dance: #F08DB4; --c-skit: #B79AF0; --c-instrumental: #5ED0C3;
    --c-ceremony: #E9B957; --c-speech: #A9B6AE; --c-interval: #B3AE9F; --c-other: #CDB088;
    --shadow-sm: none; --shadow: 0 1px 0 rgba(255, 255, 255, .02); --shadow-lg: 0 24px 70px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A0E0C; --bg-2: #0E1411; --surface: #121915; --surface-2: #161E1A; --surface-3: #1C2620;
  --ink: #ECEFEA; --ink-2: #C9D0C8; --muted: #8F9A91; --faint: #66716A; --line: #222D27; --line-2: #2E3B34;
  --brand: #3FB57A; --brand-hover: #4CC788; --brand-ink: #03130A; --brand-soft: #14281D;
  --gold: #E2B458; --gold-2: #F0C76E; --gold-soft: #2A2314;
  --live: #FF5B4D; --live-ink: #1A0302; --live-soft: #3A1714;
  --warn: #F0A63A; --warn-soft: #33240E; --ok: #4CC584; --ok-soft: #13281C; --focus: #F0C76E;
  --c-song: #7BA9F0; --c-dance: #F08DB4; --c-skit: #B79AF0; --c-instrumental: #5ED0C3;
  --c-ceremony: #E9B957; --c-speech: #A9B6AE; --c-interval: #B3AE9F; --c-other: #CDB088;
  --shadow-sm: none; --shadow: 0 1px 0 rgba(255, 255, 255, .02); --shadow-lg: 0 24px 70px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-ui); font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
h1, h2, h3, h4, p, ol, ul, dl, dd { margin: 0; }
ol, ul { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px;
  font: 600 11px/1 var(--font-mono); color: inherit; opacity: .75;
  border: 1px solid currentColor; border-radius: 5px; border-color: color-mix(in srgb, currentColor 35%, transparent);
}
.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i.sm { width: 15px; height: 15px; }
.i.lg { width: 22px; height: 22px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; }

.cat-song { --c: var(--c-song); } .cat-dance { --c: var(--c-dance); } .cat-skit { --c: var(--c-skit); }
.cat-instrumental { --c: var(--c-instrumental); } .cat-ceremony { --c: var(--c-ceremony); } .cat-speech { --c: var(--c-speech); }
.cat-interval { --c: var(--c-interval); } .cat-other { --c: var(--c-other); }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  min-height: 38px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 14px; line-height: 1;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.btn:hover:not(:disabled) { background: var(--surface-3); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover:not(:disabled) { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: var(--surface-3); }
.btn.danger { background: var(--live); border-color: var(--live); color: var(--live-ink); }
.btn.danger:hover:not(:disabled) { filter: brightness(1.06); background: var(--live); }
.btn.danger-ghost { background: transparent; border-color: transparent; color: var(--live); }
.btn.danger-ghost:hover:not(:disabled) { background: var(--live-soft); }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; gap: 6px; border-radius: 7px; }
.btn.lg { min-height: 46px; padding: 0 18px; font-size: 15px; border-radius: 11px; }
.btn.xl { min-height: 56px; padding: 0 22px; font-size: 16px; border-radius: 12px; }
.btn.armed { background: var(--warn); border-color: var(--warn); color: #1A0F00; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: none;
  border-radius: var(--radius-sm); border: 1px solid transparent; background: transparent; color: var(--ink-2);
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 7px; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--brand) 40%, transparent); }

/* ------------------------------------------------------------------ app bar */
.appbar { position: sticky; top: 0; z-index: 40; background: var(--surface); }
.appbar-in {
  display: flex; align-items: center; gap: 18px; height: var(--appbar-h);
  max-width: 1480px; margin: 0 auto; padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-ml { font-family: var(--font-ml); font-weight: 700; font-size: 12px; line-height: 1.3; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-name { font-family: var(--font-display); font-weight: 600; font-size: 19px; line-height: 1.15; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-name small { font-family: var(--font-ui); font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; margin-left: 8px; }

.views { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-3); border: 1px solid var(--line); margin-left: 8px; }
.views button {
  display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 16px; border-radius: 8px;
  border: 0; background: transparent; color: var(--muted); font-weight: 650; font-size: 14px;
}
.views button:hover { color: var(--ink); }
.views button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.views button[data-view="live"][aria-pressed="true"] { color: var(--live); }
.views .live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); display: none; }
.views.is-live .live-dot { display: inline-block; animation: pulse 1.4s ease-in-out infinite; }

.appbar-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.sys { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; padding: 0 10px; white-space: nowrap; }
.sys::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.sys[data-s="online"]::before { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }
.sys[data-s="offline"]::before { background: var(--live); }
.sys[data-s="offline"] { color: var(--live); }
.sys[data-s="warn"]::before { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent); }
.sys[data-s="warn"] { color: var(--warn); }
.sys[data-s="busy"]::before { background: var(--gold-2); animation: pulse 1.2s ease-in-out infinite; }
.stage-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.stage-btn.on .dot { background: var(--ok); }
.stage-btn.warn .dot { background: var(--warn); }

.kasavu {
  height: 6px;
  background:
    linear-gradient(var(--gold-2), var(--gold-2)) 0 1px / 100% 2px no-repeat,
    linear-gradient(var(--gold-2), var(--gold-2)) 0 4px / 100% 1px no-repeat,
    var(--surface);
  border-bottom: 1px solid var(--line);
}

.offline-bar { position: sticky; top: calc(var(--appbar-h) + 7px); z-index: 39; background: var(--live); color: #fff; text-align: center; padding: 8px 16px; font-weight: 600; font-size: 13.5px; }

/* ------------------------------------------------------------------ layout */
main { max-width: 1480px; margin: 0 auto; padding: 24px 24px 28px; }

/* Powered by Nexeor */
.credit { max-width: 1480px; margin: 0 auto; padding: 0 24px 28px; }
.credit a {
  display: flex; align-items: center; justify-content: center; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line);
  color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
}
.credit a:hover { color: var(--muted); }
.credit a:hover .credit-logo { opacity: 1; }
.credit-logo { height: 20px; width: auto; opacity: .85; transition: opacity .15s; }
.credit-logo.on-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .credit-logo.on-light { display: none; }
  :root:not([data-theme="light"]) .credit-logo.on-dark { display: inline; }
}
:root[data-theme="dark"] .credit-logo.on-light { display: none; }
:root[data-theme="dark"] .credit-logo.on-dark { display: inline; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card-head h2, .side-head h3 { font-size: 15px; font-weight: 700; letter-spacing: -.005em; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 18px; }
.page-title { font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1.1; letter-spacing: -.015em; }
.page-sub { margin-top: 6px; color: var(--muted); font-size: 14px; }
.page-sub b { color: var(--ink-2); font-weight: 650; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.search { position: relative; display: flex; align-items: center; }
.search .i { position: absolute; left: 11px; color: var(--faint); pointer-events: none; }
.search input[type="search"] {
  width: 260px; min-height: 38px; padding: 0 12px 0 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface);
}
.search input[type="search"]::placeholder { color: var(--faint); }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line); gap: 2px; }
.seg button, .seg label {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 11px; border-radius: 7px; border: 0;
  background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; cursor: pointer;
}
.seg button:hover, .seg label:hover { color: var(--ink); }
.seg button[aria-pressed="true"], .seg label:has(input:checked) { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg .n { font: 600 11.5px/1 var(--font-mono); padding: 3px 6px; border-radius: 99px; background: var(--bg-2); color: var(--muted); }
.seg button[aria-pressed="true"] .n { background: var(--gold-soft); color: var(--gold); }

/* ------------------------------------------------------------------ plan view */
.plan-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
.list-card { overflow: hidden; }
.list-head, .prow {
  display: grid; align-items: center; column-gap: 14px;
  grid-template-columns: 22px 24px 84px minmax(0, 1fr) 112px minmax(150px, 210px) 62px 34px;
}
.list-head {
  padding: 10px 14px 10px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line);
  font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint);
}
.list-head span:nth-child(7) { text-align: right; }
.prow {
  position: relative; padding: 10px 14px 10px 10px; min-height: 80px; background: var(--surface);
  border-bottom: 1px solid var(--line); transition: background .12s;
}
.prow:last-child { border-bottom: 0; }
.prow:hover { background: var(--surface-2); }
.prow::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); opacity: .9; }
.prow.is-dragging { z-index: 5; background: var(--surface); box-shadow: var(--shadow-lg); border-radius: 10px; transition: none; }
.prow.shifting { transition: transform .15s ease; }
.prow.drop-target { background: var(--gold-soft); outline: 2px dashed var(--gold-2); outline-offset: -4px; }
.prow.st-done .ptitle, .prow.st-skipped .ptitle { color: var(--muted); }
.prow.st-skipped .ptitle { text-decoration: line-through; }

.handle {
  display: flex; align-items: center; justify-content: center; width: 22px; height: 40px; padding: 0;
  border: 0; background: transparent; color: var(--faint); border-radius: 6px; cursor: grab; touch-action: none;
}
.handle:hover { color: var(--ink-2); background: var(--surface-3); }
.handle:active { cursor: grabbing; }
.pnum { font: 600 12.5px var(--font-mono); color: var(--faint); text-align: right; }
.ptime { display: flex; flex-direction: column; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ptime b { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.ptime span { font-size: 12px; color: var(--faint); margin-top: 2px; }
.prow.late .ptime b { color: var(--live); }
.pmain { min-width: 0; cursor: pointer; }
.ptitle { font-size: 15px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; letter-spacing: -.005em; }
.psub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.psub .none { color: var(--faint); }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap;
  color: var(--c, var(--muted)); background: color-mix(in srgb, var(--c, var(--muted)) 13%, transparent);
}
.chip.warn { --c: var(--warn); }
.chip.live { --c: var(--live); }
.chip.ok { --c: var(--ok); }
.chip.gold { --c: var(--gold); }
.chip.plain { --c: var(--muted); }
.chip .d { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* media slots in the running order */
.slot {
  position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; height: 63px; padding: 0 10px;
  border-radius: 9px; border: 1.5px dashed var(--line-2); background: transparent; color: var(--faint);
  font-size: 12.5px; font-weight: 600; text-align: left; overflow: hidden; transition: border-color .15s, background .15s, color .15s;
}
.slot:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.slot.need { border-color: color-mix(in srgb, var(--warn) 55%, var(--line-2)); color: var(--warn); }
.slot.need:hover { background: var(--warn-soft); }
.slot.over { border-color: var(--brand); border-style: solid; background: var(--brand-soft); color: var(--brand); }
.slot-v { justify-content: center; flex-direction: column; gap: 3px; padding: 0; }
.slot-v.has { border: 0; background: #000; }
.slot-v img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot-v .badge { position: absolute; left: 5px; bottom: 5px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; height: 18px; padding: 0 6px; border-radius: 5px; font: 600 10.5px/1 var(--font-mono); color: #fff; background: rgba(0, 0, 0, .65); }
.slot-v.has.img-missing { background: linear-gradient(135deg, #12422c, #0a2418); color: #E7B65A; }
.slot-a.has { border-style: solid; border-color: var(--line); background: var(--surface-2); color: var(--ink-2); }
.slot-a.has:hover { border-color: var(--brand); background: var(--brand-soft); }
.slot-a .slot-ic { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 8px; flex: none; background: var(--surface-3); color: var(--muted); }
.slot-a.has .slot-ic { background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.slot-a .slot-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.slot-a .slot-txt b { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot-a .slot-txt span { font: 500 11.5px var(--font-mono); color: var(--muted); }
.slot-a.info { border-style: solid; border-color: var(--line); color: var(--muted); }
.slot .up { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; background: color-mix(in srgb, var(--surface) 88%, transparent); color: var(--brand); font: 700 12px var(--font-mono); }
.slot .up i { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p, 0%); background: var(--brand); transition: width .2s; }

.pdur { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.pdur b { font-size: 15px; font-weight: 600; }
.pdur span { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.pdur.est b { color: var(--warn); }
.pdur.est span { color: var(--warn); }

.list-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.list-empty { padding: 56px 24px; text-align: center; }
.list-empty h3 { font-family: var(--font-display); font-weight: 600; font-size: 22px; }
.list-empty p { margin: 8px auto 18px; max-width: 46ch; color: var(--muted); }

/* plan sidebar */
.plan-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(var(--appbar-h) + 22px); }
.side-card { padding: 18px; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.side-head .count { font: 600 12px var(--font-mono); padding: 3px 8px; border-radius: 99px; background: var(--warn-soft); color: var(--warn); }
.side-head .count.zero { background: var(--ok-soft); color: var(--ok); }
.big-time { font: 600 40px/1.05 var(--font-mono); letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.verdict { margin-top: 8px; font-weight: 600; font-size: 13.5px; display: flex; gap: 6px; align-items: flex-start; }
.verdict.ok { color: var(--ok); } .verdict.bad { color: var(--live); } .verdict.none { color: var(--muted); font-weight: 500; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.kv dt { font-size: 12px; color: var(--muted); }
.kv dd { font: 600 15px var(--font-mono); margin-top: 2px; font-variant-numeric: tabular-nums; }
.side-meta { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.side-meta b { color: var(--ink); font-weight: 600; }
.meter + .meter { margin-top: 12px; }
.meter-l { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.meter-l span { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-2); }
.meter-l b { font: 600 12.5px var(--font-mono); color: var(--muted); }
.bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--brand); transition: width .4s ease; }
.bar.gold > i { background: var(--gold-2); }
.attn { display: flex; flex-direction: column; margin: 0 -8px; }
.attn button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; width: 100%; padding: 8px; border: 0; border-radius: 8px; background: transparent; text-align: left; }
.attn button:hover { background: var(--surface-3); }
.attn b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attn span { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; }
.attn .more { color: var(--brand); font-weight: 600; font-size: 13px; padding: 8px; }
.cloud-line { display: flex; align-items: center; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.cloud-line:empty { display: none; }
.cloud-line .i { color: var(--ok); }
.store-grid { display: flex; flex-direction: column; gap: 8px; }
.store-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.store-row > div { flex: 1; min-width: 0; }
.store-row b { display: block; font-weight: 650; }
.store-row p { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; font-family: var(--font-mono); }
.all-good { display: flex; align-items: center; gap: 10px; color: var(--ok); font-weight: 600; font-size: 13.5px; }
.strip { display: flex; gap: 2px; height: 12px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.strip i { background: var(--c); min-width: 3px; }
.strip i.st-done { opacity: .35; } .strip i.st-skipped { opacity: .12; } .strip i.st-live { background: var(--live); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.legend b { font: 600 12px var(--font-mono); color: var(--ink-2); }

/* ------------------------------------------------------------------ live view */
.live-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-bottom: 18px; padding: 0; overflow: hidden; }
.lb-item { padding: 14px 18px; border-right: 1px solid var(--line); min-width: 0; }
.lb-item:last-child { border-right: 0; }
.lb-l { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.lb-v { display: block; margin-top: 4px; font: 600 22px/1.15 var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-v.bad { color: var(--live); } .lb-v.ok { color: var(--ok); }
.lb-v small { font: 500 13px var(--font-ui); color: var(--muted); margin-left: 6px; }
.lb-item .bar { margin-top: 8px; height: 6px; }

.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 440px); gap: 18px; align-items: start; }
.live-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.onstage { padding: 22px 24px; position: relative; overflow: hidden; }
.onstage.is-live { border-color: color-mix(in srgb, var(--live) 45%, var(--line)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--live) 25%, transparent), var(--shadow); }
.onstage.is-live::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--live); }
.os-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.onair { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 11px; border-radius: 99px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; background: var(--live); color: var(--live-ink); }
.onair i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.4s ease-in-out infinite; }
.offair { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 11px; border-radius: 99px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; background: var(--surface-3); color: var(--muted); }
.os-started { font-size: 13px; color: var(--muted); }
.os-title { margin-top: 14px; font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.08; letter-spacing: -.015em; overflow-wrap: anywhere; }
.os-title.dim { color: var(--muted); }
.os-who { margin-top: 6px; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
.os-timer { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 20px; margin-top: 20px; }
.os-elapsed { display: flex; align-items: baseline; gap: 10px; }
.os-elapsed b { font: 600 52px/1 var(--font-mono); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.os-elapsed small { font: 500 16px var(--font-mono); color: var(--muted); }
.os-remain { font: 600 17px var(--font-mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.os-remain.over, .os-elapsed.over b { color: var(--live); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 12px; }
.progress > i { display: block; height: 100%; width: 0; background: var(--live); border-radius: inherit; transition: width .5s linear; }
.progress > i.over { background: repeating-linear-gradient(45deg, var(--live), var(--live) 8px, color-mix(in srgb, var(--live) 70%, #000) 8px, color-mix(in srgb, var(--live) 70%, #000) 16px); }
.os-media { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.om { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.om-ic { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; flex: none; background: var(--surface-3); color: var(--muted); }
.om.on .om-ic { background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }
.om.warn .om-ic { background: var(--warn-soft); color: var(--warn); }
.om-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.om-t span { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.om-t b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.om .bar { height: 4px; margin-top: 6px; }
.os-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.os-acts .btn kbd { margin-left: 2px; }

.upnext { padding: 20px 24px; }
.un-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.un-head .eyebrow { color: var(--gold); }
.un-time { font: 600 13px var(--font-mono); color: var(--muted); }
.un-body { display: flex; align-items: center; gap: 20px; margin-top: 10px; }
.un-text { min-width: 0; flex: 1; }
.un-text h2 { font-size: 24px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; overflow-wrap: anywhere; }
.un-text p { margin-top: 4px; color: var(--muted); }
.un-ready { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.go {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; flex: none;
  width: 168px; height: 112px; border-radius: 18px; border: 0; background: var(--brand); color: var(--brand-ink);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 35%, transparent), inset 0 -4px 0 rgba(0, 0, 0, .18);
  transition: transform .06s, filter .15s;
}
.go:hover:not(:disabled) { filter: brightness(1.07); }
.go:active:not(:disabled) { transform: translateY(2px); box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 30%, transparent), inset 0 -2px 0 rgba(0, 0, 0, .18); }
.go:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.go-l { display: inline-flex; align-items: center; gap: 8px; font: 800 30px/1 var(--font-ui); letter-spacing: .04em; }
.go-s { font-size: 12px; font-weight: 600; opacity: .85; max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.go.flash { animation: goflash .5s ease; }
.btn.flash { animation: attn 1.1s ease-in-out infinite; }
@keyframes attn { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--live) 0%, transparent); } }
@keyframes goflash { 0% { filter: brightness(1.6); } 100% { filter: none; } }
.un-then { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.un-then b { color: var(--ink-2); font-weight: 600; }

.monitor { padding: 0; overflow: hidden; position: sticky; top: calc(var(--appbar-h) + 22px); }
.mon-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; }
.mon-head h2 { font-size: 15px; font-weight: 700; }
.mon-pill { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.mon-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.mon-pill.on { color: var(--ok); } .mon-pill.on::before { background: var(--ok); }
.mon-pill.warn { color: var(--warn); } .mon-pill.warn::before { background: var(--warn); }
.mon-screen { padding: 0 16px; }
.mon-preview { width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-2); }
.mon-ctrl { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; }
.mon-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tog { justify-content: space-between; }
.tog[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tog[data-a="slate"][aria-pressed="true"] { background: var(--gold-2); border-color: var(--gold-2); color: #1A1200; }
.vol { display: flex; align-items: center; gap: 10px; }
.vol input { flex: 1; accent-color: var(--brand); }
.vol output { font: 600 12.5px var(--font-mono); width: 42px; text-align: right; color: var(--muted); }
.mon-status { border-top: 1px solid var(--line); padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; background: var(--surface-2); }
.scr-row { display: flex; align-items: flex-start; gap: 10px; }
.scr-row .i { margin-top: 1px; color: var(--muted); }
.scr-row b { font-weight: 600; }
.scr-row p { color: var(--muted); font-size: 12.5px; }
.scr-row.warn .i, .scr-row.warn b { color: var(--warn); }
.scr-row.bad .i, .scr-row.bad b { color: var(--live); }
.scr-row.good .i { color: var(--ok); }

.lorder { margin-top: 18px; overflow: hidden; }
.lrow {
  display: grid; align-items: center; column-gap: 12px; padding: 9px 14px 9px 10px; min-height: 56px; position: relative;
  grid-template-columns: 22px 84px 76px minmax(0, 1fr) 56px 54px auto; border-bottom: 1px solid var(--line); background: var(--surface);
}
.lrow:last-child { border-bottom: 0; }
.lrow.is-dragging { z-index: 5; box-shadow: var(--shadow-lg); border-radius: 10px; transition: none; }
.lrow.shifting { transition: transform .15s ease; }
.lstat { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.lrow.st-done { background: color-mix(in srgb, var(--ok) 6%, var(--surface)); }
.lrow.st-done .lstat { color: var(--ok); }
.lrow.st-done .lmain b { color: var(--muted); }
.lrow.st-live { background: color-mix(in srgb, var(--live) 9%, var(--surface)); box-shadow: inset 4px 0 0 var(--live); }
.lrow.st-live .lstat { color: var(--live); }
.lrow.st-live .lstat i { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: pulse 1.4s ease-in-out infinite; }
.lrow.st-next { background: color-mix(in srgb, var(--gold-2) 11%, var(--surface)); box-shadow: inset 4px 0 0 var(--gold-2); }
.lrow.st-next .lstat { color: var(--gold); }
.lrow.st-skipped .lmain b { text-decoration: line-through; color: var(--faint); }
.lrow.st-skipped .lstat { color: var(--faint); }
.ltime { font: 600 13px var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink-2); }
.ltime small { display: block; font: 500 11px var(--font-ui); color: var(--faint); }
.lmain { min-width: 0; }
.lmain b { display: block; font-size: 14.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lmain span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lmedia { display: inline-flex; gap: 6px; color: var(--line-2); }
.lmedia .on { color: var(--brand); }
.lmedia .miss { color: var(--warn); }
.ldur { font: 600 13px var(--font-mono); color: var(--muted); text-align: right; }
.lacts { display: flex; gap: 6px; justify-content: flex-end; }
.keys { margin-top: 14px; color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.keys span { display: inline-flex; align-items: center; gap: 6px; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

/* ------------------------------------------------------------------ drawer */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 8, .42); backdrop-filter: blur(2px); opacity: 0; transition: opacity .2s; }
.scrim.on { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(560px, 100vw);
  display: flex; flex-direction: column; background: var(--surface); box-shadow: var(--shadow-lg);
  transform: translateX(102%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.drawer.on { transform: none; }
.drawer form { display: flex; flex-direction: column; height: 100%; }
.dr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.dr-kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); }
.dr-head h2 { margin-top: 4px; font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
.dr-body { flex: 1; overflow-y: auto; padding: 18px 22px 26px; display: flex; flex-direction: column; gap: 14px; }
.dr-section { margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.dr-foot { display: flex; align-items: center; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--surface-2); }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label { font-size: 12.5px; font-weight: 650; color: var(--ink-2); }
.field .help { font-size: 12.5px; color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
input[type="text"], input[type="search"], input[type="number"], input[type="date"], input[type="time"], input:not([type]), select, textarea {
  width: 100%; min-height: 40px; padding: 8px 11px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea { resize: vertical; min-height: 76px; line-height: 1.45; }
input[type="number"], input[type="time"] { font-family: var(--font-mono); }
.field.invalid input { border-color: var(--live); }
.stepper { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.stepper:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.stepper button { width: 38px; border: 0; background: var(--surface-3); font-size: 18px; font-weight: 600; color: var(--ink-2); }
.stepper button:hover { background: var(--line); }
.stepper input { border: 0 !important; box-shadow: none !important; text-align: center; min-width: 0; flex: 1; border-radius: 0; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper span { display: flex; align-items: center; padding-right: 10px; color: var(--muted); font-size: 13px; }
.check { display: inline-flex; align-items: flex-start; gap: 9px; font-size: 13.5px; cursor: pointer; line-height: 1.4; }
.check input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--brand); flex: none; }
.check small { display: block; color: var(--muted); font-size: 12.5px; }

/* media cards (drawer and settings) */
.mcard { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); overflow: hidden; }
.mcard.over { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.mcard-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.mcard-ic { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); color: var(--muted); flex: none; }
.mcard.has .mcard-ic { background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--brand); }
.mcard-head div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.mcard-head b { font-size: 14px; font-weight: 700; }
.mcard-head span { font-size: 12.5px; color: var(--muted); }
.mcard-prev { position: relative; background: #000; aspect-ratio: 16 / 9; }
.mcard-prev video, .mcard-prev img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mcard audio { display: block; width: calc(100% - 28px); margin: 0 14px 4px; height: 38px; }
.mcard-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 14px; font-size: 12.5px; color: var(--muted); }
.mcard-meta .fname { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.mcard-acts { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: calc(100% - 28px); margin: 0 14px 14px;
  min-height: 110px; padding: 16px; border-radius: 10px; border: 1.5px dashed var(--line-2); background: var(--surface); color: var(--muted); text-align: center;
}
.drop:hover, .mcard.over .drop { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.drop b { color: var(--ink); font-size: 14px; }
.drop span { font-size: 12.5px; }
.uprog { padding: 0 14px 14px; }
.uprog-l { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; margin-bottom: 6px; color: var(--ink-2); }
.uprog-l b { font-family: var(--font-mono); font-weight: 600; }
.note-box { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 0 14px 14px; border-radius: 9px; background: var(--gold-soft); color: var(--ink-2); font-size: 12.5px; }
.note-box .i { color: var(--gold); margin-top: 1px; }
.media-opts { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px 0; }

/* ------------------------------------------------------------------ modal */
.modal { border: 0; padding: 0; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); width: min(880px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 40px)); }
.modal::backdrop { background: rgba(10, 12, 8, .5); backdrop-filter: blur(2px); }
.modal[open] { display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 22px; }
.modal-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 0; flex: 1; }
.modal-nav { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; border-right: 1px solid var(--line); background: var(--surface-2); }
.modal-nav button { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 12px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); font-weight: 600; text-align: left; }
.modal-nav button:hover { color: var(--ink); background: var(--surface-3); }
.modal-nav button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.modal-pane { padding: 20px 24px 26px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-pane h3 { font-size: 16px; font-weight: 700; }
.modal-pane .lead { color: var(--muted); margin-top: -8px; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 12px 22px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 13px; color: var(--muted); }
.saved-ind { display: inline-flex; align-items: center; gap: 6px; }
.saved-ind.on { color: var(--ok); }
.url-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.url-row code { flex: 1; min-width: 0; font: 600 13px var(--font-mono); overflow-wrap: anywhere; }
.url-row span { font-size: 12px; color: var(--muted); width: 92px; flex: none; }
.data-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.data-row:last-child { border-bottom: 0; }
.data-row b { display: block; font-weight: 650; }
.data-row p { color: var(--muted); font-size: 13px; margin-top: 2px; }

.modal-sm { width: min(440px, calc(100vw - 32px)); }
.ask { padding: 22px 22px 18px; }
.ask h2 { font-size: 18px; font-weight: 700; }
.ask p { margin-top: 8px; color: var(--muted); }
.ask-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ------------------------------------------------------------------ menu and toasts */
.menu { position: fixed; z-index: 80; min-width: 190px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; font-weight: 550; text-align: left; color: var(--ink); }
.menu button:hover, .menu button:focus-visible { background: var(--surface-3); outline: none; }
.menu button.danger { color: var(--live); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.toasts { position: fixed; inset: auto 20px 20px auto; margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; color: inherit; z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toasts:empty { display: none; }
.toast {
  display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100vw - 40px)); padding: 11px 16px; border-radius: 11px;
  background: var(--ink); color: var(--bg); font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow-lg); pointer-events: auto;
  animation: toastin .2s ease;
}
.toast.err { background: var(--live); color: #fff; }
.toast.ok .i { color: var(--ok); }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } }

/* file drop overlay for the whole list */
body.dragging-files .slot { border-color: var(--brand); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1240px) {
  .list-head, .prow { grid-template-columns: 22px 78px minmax(0, 1fr) 104px minmax(130px, 170px) 56px 34px; }
  .pnum, .list-head span:nth-child(2) { display: none; }
  .search input[type="search"] { width: 210px; }
}
@media (max-width: 1100px) {
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .plan-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-grid { grid-template-columns: minmax(0, 1fr); }
  .monitor { position: static; }
  .mon-body-wrap { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .credit { padding: 0 16px 24px; }
  :root { --appbar-h: 58px; }
  .appbar-in { padding: 0 16px; gap: 10px; }
  main { padding: 18px 16px 48px; }
  .brand-ml, .sys span, .stage-btn span.lbl { display: none; }
  .brand-name { font-size: 17px; }
  .brand-name small { display: none; }
  .views button { padding: 0 12px; }
  .list-head { display: none; }
  .prow { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "h main main" "h vid aud" "h time time"; row-gap: 8px; padding: 12px 12px 12px 8px; }
  .prow .handle { grid-area: h; align-self: start; }
  .prow .pmain { grid-area: main; padding-right: 56px; }
  .prow .ptime { grid-area: time; flex-direction: row; gap: 6px; align-items: center; }
  .prow .ptime span::before { content: "to "; }
  .prow .slot-v { grid-area: vid; }
  .prow .slot-a { grid-area: aud; }
  .prow .pdur { position: absolute; right: 12px; top: 12px; }
  .prow .kebab { position: absolute; right: 8px; bottom: 8px; }
  .plan-side { grid-template-columns: minmax(0, 1fr); }
  .live-bar { grid-template-columns: 1fr 1fr; }
  .lb-item:nth-child(2) { border-right: 0; }
  .lb-item:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .os-media { grid-template-columns: minmax(0, 1fr); }
  .un-body { flex-direction: column; align-items: stretch; }
  .go { width: 100%; height: 88px; }
  .lrow { grid-template-columns: 22px 64px minmax(0, 1fr) auto; }
  .lrow .ltime, .lrow .lmedia, .lrow .ldur { display: none; }
  .modal-body { grid-template-columns: minmax(0, 1fr); }
  .modal-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .row3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .page-actions, .search, .search input[type="search"] { width: 100%; }
  .seg { overflow-x: auto; max-width: 100%; }
  .row2 { grid-template-columns: minmax(0, 1fr); }
  .lb-v { font-size: 18px; }
  .os-elapsed b { font-size: 40px; }
  .views button .lbl { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
