/* Bravo Cue Studio — booth-console look: navy cue rail, calm work surface,
   amber reserved for STANDBY / GO. */

:root {
  --bg: #EEF1F6;
  --panel: #FFFFFF;
  --panel-2: #F6F8FB;
  --ink: #1B2233;
  --ink-2: #48526B;
  --ink-3: #7A849C;
  --line: #DCE1EA;
  --line-strong: #C4CBD8;
  --navy: #1F2540;
  --navy-2: #2A3154;
  --navy-ink: #E8EBF5;
  --navy-dim: #9AA3C2;
  --blue: #2F5BEA;
  --blue-soft: #E7EDFD;
  --blue-ink: #1E43C0;
  --amber: #F2A93B;
  --amber-soft: #FDF1DC;
  --amber-ink: #5C3B00;
  --green: #2E9E6B;
  --green-soft: #E2F4EB;
  --danger: #D64545;
  --danger-soft: #FBE7E7;
  --shadow: 0 1px 2px rgba(27, 34, 51, .06), 0 4px 14px rgba(27, 34, 51, .06);
  --radius: 12px;
  --radius-sm: 8px;

  --font-ui: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-cue: "Bahnschrift", "DIN Alternate", "Barlow Semi Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --font-mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12162A;
    --panel: #1A1F36;
    --panel-2: #20263F;
    --ink: #E6E9F2;
    --ink-2: #B3BACD;
    --ink-3: #848CA6;
    --line: #2D3452;
    --line-strong: #3C4467;
    --navy: #0C0F1E;
    --navy-2: #1A1F36;
    --blue: #6E8DFF;
    --blue-soft: #232C55;
    --blue-ink: #A9BBFF;
    --amber-soft: #3A2E17;
    --amber-ink: #F6C77A;
    --green-soft: #173427;
    --danger-soft: #3B1D22;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 6px 10px; z-index: 50; }
.skip:focus { left: 8px; }

/* ── Layout ─────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: 272px 1fr; min-height: 100vh; }

.rail {
  background: var(--navy);
  color: var(--navy-ink);
  display: flex; flex-direction: column;
  padding: 20px 14px 16px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 18px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--amber); color: #1F2540;
  display: grid; place-items: center;
  font: 700 11px/1 var(--font-cue); letter-spacing: .04em;
}
.brand-text { font: 400 16px/1 var(--font-head); letter-spacing: .01em; }
.brand-text b { font-weight: 700; }

.show-card {
  display: grid; gap: 2px;
  background: var(--navy-2);
  border-radius: var(--radius-sm);
  padding: 12px 14px; margin: 0 2px 18px;
}
.eyebrow {
  font: 600 11px/1 var(--font-cue); letter-spacing: .14em; text-transform: uppercase;
  color: var(--navy-dim);
}
.show-title { font: 600 16px/1.3 var(--font-head); overflow-wrap: anywhere; }
.show-sub { font-size: 12px; color: var(--navy-dim); }

/* Cue stack: the steps read like a cue list, current one on standby */
.cue-stack { list-style: none; margin: 0; padding: 0; position: relative; flex: 1; }
.cue-stack::before {
  content: ""; position: absolute; left: 31px; top: 20px; bottom: 20px;
  width: 1px; background: #3A416A;
}
.cue {
  position: relative; display: grid; grid-template-columns: 40px 1fr; gap: 10px;
  width: 100%; text-align: left; border: 0; background: none; color: inherit; cursor: pointer;
  padding: 10px 10px 10px 12px; border-radius: var(--radius-sm);
}
.cue:hover { background: rgba(255, 255, 255, .05); }
.cue-num {
  position: relative; z-index: 1;
  width: 40px; height: 26px; border-radius: 6px;
  display: grid; place-items: center;
  font: 700 13px/1 var(--font-cue); letter-spacing: .05em;
  background: var(--navy); border: 1px solid #3A416A; color: var(--navy-dim);
}
.cue-text { display: grid; gap: 1px; min-width: 0; }
.cue-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cue-sum { font-size: 12px; color: var(--navy-dim); display: flex; align-items: center; gap: 6px; min-width: 0; }
.cue-sum > span.txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cue.is-ok .cue-num { border-color: var(--green); color: #BFE8D3; }
.cue.is-warn .cue-num { border-color: var(--danger); color: #F4B8B8; }
.cue[aria-current="step"] { background: rgba(242, 169, 59, .10); }
.cue[aria-current="step"] .cue-num { background: var(--amber); border-color: var(--amber); color: #1F2540; }
.tag {
  font: 700 10px/1 var(--font-cue); letter-spacing: .12em; text-transform: uppercase;
  padding: 3px 6px; border-radius: 4px;
}
.tag-standby { background: var(--amber); color: #1F2540; }
.tag-live { background: var(--green); color: #fff; }

.rail-foot { font-size: 12px; color: var(--navy-dim); padding: 12px 8px 0; border-top: 1px solid #333A60; display: grid; gap: 4px; }
.rail-foot .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--green); }
.rail-foot .dot.off { background: var(--danger); }
.rail-foot .signed { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px;
                     padding-top: 6px; border-top: 1px solid #333A60; }
.rail-foot .signed a { color: var(--sky, #8AB4F8); text-decoration: none; }
.rail-foot .signed a:hover { text-decoration: underline; }

main { min-width: 0; display: flex; flex-direction: column; outline: none; }
.step-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 32px 40px 8px; max-width: 1040px; width: 100%;
}
.cue-label {
  font: 700 13px/1 var(--font-cue); letter-spacing: .16em; color: var(--blue-ink);
  text-transform: uppercase;
}
.step-head h1 { font: 600 28px/1.15 var(--font-head); margin: 6px 0 4px; letter-spacing: -.01em; }
.step-head p { margin: 0; color: var(--ink-2); max-width: 64ch; }
.save-state { font-size: 12px; color: var(--ink-3); white-space: nowrap; }

.step-body { padding: 16px 40px 80px; max-width: 1040px; width: 100%; display: grid; gap: 16px; flex: 1; align-content: start; }

.step-nav {
  position: sticky; bottom: 0;
  display: flex; justify-content: space-between; gap: 12px;
  padding: 14px 40px; max-width: 1040px; width: 100%;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}

/* ── Groups & fields ────────────────────────────────────────────────── */
.group {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px 20px;
}
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.group-head h2 { font: 600 15px/1.3 var(--font-head); margin: 0; }
.group-head p { margin: 2px 0 0; color: var(--ink-3); font-size: 13px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px 20px; }
.field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field-head { display: flex; align-items: center; gap: 6px; }
.field-head label, .field-head .lbl { font-weight: 600; font-size: 13px; }
.hint { font-size: 12px; color: var(--ink-3); margin: 0; }
.hint b { color: var(--ink-2); font-weight: 600; }

details.more { border-top: 1px dashed var(--line); margin-top: 16px; padding-top: 12px; }
details.more > summary {
  cursor: pointer; color: var(--blue-ink); font-weight: 600; font-size: 13px; list-style: none;
  display: inline-flex; align-items: center; gap: 6px;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸"; transition: transform .15s; }
details.more[open] > summary::before { transform: rotate(90deg); }
details.more > .fields { margin-top: 14px; }

.tip {
  width: 18px; height: 18px; border-radius: 50%; flex: none;
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink-3);
  font: 700 11px/1 var(--font-ui); cursor: help; padding: 0;
  display: inline-grid; place-items: center;
}
.tip:hover, .tip[aria-expanded="true"] { border-color: var(--blue); color: var(--blue); }
.tooltip {
  position: fixed; z-index: 100; max-width: 320px;
  background: #1F2540; color: #EEF1F8; border-radius: 8px;
  padding: 10px 12px; font-size: 13px; line-height: 1.45;
  box-shadow: 0 8px 24px rgba(15, 18, 35, .28);
  pointer-events: none;
}
.tooltip b { color: #FFD28A; font-weight: 600; }

input[type=text], input[type=number], select, textarea {
  width: 100%; min-width: 0;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 8px 10px; min-height: 38px;
}
textarea { resize: vertical; min-height: 64px; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }

.path { display: flex; gap: 8px; }
.path input { font-family: var(--font-mono); font-size: 12.5px; }
.unit { position: relative; }
.unit input { padding-right: 64px; }
.unit span { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 12px; pointer-events: none; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink);
  border-radius: var(--radius-sm); padding: 8px 14px; min-height: 38px;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); background: var(--panel-2); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-ink); border-color: var(--blue-ink); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--blue-ink); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn-ghost:hover { background: var(--blue-soft); border-color: transparent; }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; }

/* Toggle switch */
.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track {
  flex: none; width: 38px; height: 22px; border-radius: 11px; margin-top: 1px;
  background: var(--line-strong); position: relative; transition: background .15s;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s;
}
.switch input:checked + .track { background: var(--blue); }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--blue); outline-offset: 2px; }
.switch-text { display: grid; gap: 1px; }
.switch-text .lbl { font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 6px; }
.switch-text .hint { margin: 0; }

/* Segmented */
.seg { width: max-content; max-width: 100%; justify-self: start; display: inline-flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.seg input:checked + span { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(27, 34, 51, .14); }
.seg input:focus-visible + span { outline: 2px solid var(--blue); }

/* Choice cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.card { position: relative; }
.card label {
  display: grid; gap: 4px; height: 100%;
  border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 40px 14px 17px;
  background: var(--panel); cursor: pointer; transition: border-color .12s, background .12s;
}
.card label:hover { border-color: var(--line-strong); }
.card input { position: absolute; opacity: 0; }
.card-title { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-desc { font-size: 12.5px; color: var(--ink-2); }
.card .tip { position: absolute; top: 12px; right: 12px; }
.card input:checked + label { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 4px 0 0 var(--blue); }
.card input:focus-visible + label { outline: 2px solid var(--blue); outline-offset: 2px; }
.badge { font: 700 10px/1 var(--font-cue); letter-spacing: .1em; text-transform: uppercase; padding: 3px 6px; border-radius: 4px; background: var(--green-soft); color: var(--green); }
.badge.warn { background: var(--amber-soft); color: var(--amber-ink); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 8px 5px 12px;
  background: var(--panel); font-size: 13px; font-weight: 600; cursor: pointer;
}
.chip input { accent-color: var(--blue); margin: 0; }
.chip:has(input:checked) { border-color: var(--blue); background: var(--blue-soft); }
.chip.disabled { opacity: .5; }
.mini-chip { font: 12px/1 var(--font-mono); background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; color: var(--ink-2); }

.note {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 13px; color: var(--ink-2);
}
.note.warn { background: var(--amber-soft); border-color: #EFD19E; color: var(--amber-ink); }
.note.bad { background: var(--danger-soft); border-color: #F0C1C1; color: var(--danger); }

/* Voice preview */
.preview { display: grid; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.preview-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.preview audio { width: 100%; height: 36px; }
.preview .from { font-size: 12px; color: var(--ink-3); }
.status-text { font-size: 12.5px; color: var(--ink-3); }
.status-text.bad { color: var(--danger); }

/* Scenes */
.scene-summary { display: flex; gap: 8px; align-items: center; }
.scene-summary input { font-family: var(--font-mono); flex: 0 1 150px; min-width: 110px; }

.scene-dialog {
  border: 0; border-radius: 14px; padding: 0; width: min(760px, calc(100vw - 32px)); max-height: min(720px, calc(100vh - 48px));
  background: var(--panel); color: var(--ink); box-shadow: 0 24px 60px rgba(15, 18, 35, .35);
}
.scene-dialog[open] { display: flex; flex-direction: column; }
.scene-dialog::backdrop { background: rgba(18, 22, 42, .55); }
.dlg-head { padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.dlg-head h2 { margin: 0; font: 600 18px/1.3 var(--font-head); }
.dlg-head p { margin: 2px 0 0; color: var(--ink-3); font-size: 13px; }
.dlg-body { overflow: auto; padding: 8px 12px; flex: 1; }
.dlg-foot { display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.dlg-foot .grow { flex: 1; color: var(--ink-2); font-size: 13px; }
.scene-row {
  display: grid; grid-template-columns: 24px 44px 1fr auto; gap: 10px; align-items: start;
  padding: 10px 8px; border-radius: var(--radius-sm); cursor: pointer;
}
.scene-row + .scene-row { border-top: 1px solid var(--line); }
.scene-row:hover { background: var(--panel-2); }
.scene-row:has(input:checked) { background: var(--blue-soft); }
.scene-row input { accent-color: var(--blue); width: 16px; height: 16px; margin: 3px 0 0; }
.scene-no { font: 700 13px/26px var(--font-cue); letter-spacing: .06em; text-align: center; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--ink-2); }
.scene-info { display: grid; gap: 2px; min-width: 0; }
.scene-info b { font-weight: 600; }
.scene-info .first { font-size: 12.5px; color: var(--ink-3); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scene-info .who { font-size: 12px; color: var(--ink-2); }
.scene-lines { font-size: 12px; color: var(--ink-3); white-space: nowrap; padding-top: 2px; }

/* ── Run step ───────────────────────────────────────────────────────── */
.run-grid { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; }
.checklist li + li { border-top: 1px solid var(--line); }
.checklist .cue-num { background: var(--panel-2); border-color: var(--line-strong); color: var(--ink-2); }
.checklist b { display: block; font-weight: 600; }
.checklist span.sum { font-size: 13px; color: var(--ink-2); }

.go-panel { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 24px 20px; }
.go {
  width: 148px; height: 148px; border-radius: 50%;
  border: 0; cursor: pointer; position: relative;
  background: radial-gradient(circle at 50% 38%, #FFC766, var(--amber) 62%, #D98E1F);
  color: #1F2540; font: 700 44px/1 var(--font-cue); letter-spacing: .06em;
  box-shadow: 0 0 0 8px var(--amber-soft), 0 10px 24px rgba(217, 142, 31, .35), inset 0 -4px 0 rgba(0, 0, 0, .12);
  transition: transform .1s;
}
.go:hover { transform: translateY(-1px); }
.go:active { transform: translateY(1px); box-shadow: 0 0 0 8px var(--amber-soft), 0 4px 10px rgba(217, 142, 31, .3), inset 0 2px 0 rgba(0, 0, 0, .12); }
.go small { display: block; font: 600 11px/1 var(--font-cue); letter-spacing: .18em; margin-top: 6px; opacity: .75; }
.go.hold { background: var(--panel-2); color: var(--ink-3); box-shadow: 0 0 0 8px var(--line); cursor: not-allowed; }
.go.stop { background: radial-gradient(circle at 50% 38%, #EC6B6B, var(--danger) 65%, #B23434); color: #fff; box-shadow: 0 0 0 8px var(--danger-soft), 0 10px 24px rgba(214, 69, 69, .3); font-size: 36px; }
.go-ready { animation: standby 2.4s ease-in-out infinite; }
@keyframes standby { 50% { box-shadow: 0 0 0 14px rgba(242, 169, 59, .18), 0 10px 24px rgba(217, 142, 31, .35), inset 0 -4px 0 rgba(0, 0, 0, .12); } }
.go-caption { font-size: 13px; color: var(--ink-2); max-width: 30ch; }
.problems { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; width: 100%; }
.problems li { background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: 8px 10px; font-size: 13px; }
.problems button { border: 0; background: none; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 0; }

details.cmd > summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); }
pre.code {
  font: 12.5px/1.55 var(--font-mono); background: var(--navy); color: #D8DEF2;
  border-radius: var(--radius-sm); padding: 12px 14px; overflow: auto; margin: 10px 0 0; white-space: pre;
}

.run-live { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; }
.stage-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.stage { display: grid; grid-template-columns: 22px 1fr auto; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 6px; font-size: 13px; }
.stage .lamp { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-strong); justify-self: center; }
.stage.running { background: var(--amber-soft); font-weight: 600; }
.stage.running .lamp { border-color: var(--amber); background: var(--amber); animation: blink 1s steps(2, start) infinite; }
.stage.done .lamp { border-color: var(--green); background: var(--green); }
.stage.error .lamp { border-color: var(--danger); background: var(--danger); }
.stage.skipped { color: var(--ink-3); }
.stage.skipped .lamp { border-style: dashed; }
.stage .st { font-size: 11px; color: var(--ink-3); font-family: var(--font-cue); letter-spacing: .08em; text-transform: uppercase; }
@keyframes blink { to { opacity: .35; } }

/* Run progress — one strip above the log, amber like the GO button */
.prog { display: grid; gap: 7px; margin: 0 0 12px; }
.prog-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.prog-head b { font: 700 12px/1 var(--font-cue); letter-spacing: .1em; text-transform: uppercase; }
.prog-head .what { font-size: 13px; color: var(--ink-2); }
.prog-head .eta { margin-left: auto; font: 12px/1 var(--font-mono); color: var(--ink-3); white-space: nowrap; }
.prog-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; position: relative; }
.prog-bar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--amber); transition: width .4s ease; }
.prog-bar.done i { background: var(--green); }
.prog-bar.failed i { background: var(--danger); }
/* Nothing counted yet: a sweep, not a fake percentage */
.prog-bar.waiting::after {
  content: ""; position: absolute; inset: 0; border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(242, 169, 59, .55), transparent);
  animation: sweep 1.6s linear infinite;
}
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.log-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.log {
  font: 12px/1.55 var(--font-mono); background: var(--navy); color: #C9D0E6;
  border-radius: var(--radius-sm); padding: 12px 14px; height: clamp(240px, 46vh, 460px); overflow: auto; margin: 0; white-space: pre-wrap; overflow-wrap: anywhere;
}
.log .l-step { color: #FFD28A; font-weight: 700; }
.log .l-err { color: #FF9C9C; }
.log .l-warn { color: #F3D48B; }
.log .l-ok { color: #8FE0B8; }

.run-banner { display: flex; align-items: center; gap: 12px; }
.run-banner .big { font: 700 22px/1 var(--font-cue); letter-spacing: .08em; text-transform: uppercase; }
.run-banner .time { font: 13px var(--font-mono); color: var(--ink-3); }

.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }
.stat b { display: block; font: 700 28px/1.1 var(--font-cue); }
.stat span { font-size: 12.5px; color: var(--ink-2); }
.files { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.files li { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.files li.hl { border-color: var(--green); background: var(--green-soft); }
.files .fname { font: 600 13px var(--font-mono); overflow-wrap: anywhere; }
.files .meta { font-size: 12px; color: var(--ink-3); }
.files .grow { flex: 1; min-width: 0; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90;
  background: #1F2540; color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); font-size: 13px;
}
.toast.bad { background: var(--danger); }

/* ── Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .run-grid, .run-live { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; padding: 12px 16px; }
  .brand { padding: 0 0 10px; }
  .show-card, .rail-foot { display: none; }
  .cue-stack { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
  .cue-stack::before { display: none; }
  .cue { grid-template-columns: auto; padding: 6px; }
  .cue-text { display: none; }
  .step-head, .step-body, .step-nav { padding-left: 16px; padding-right: 16px; }
  .step-head { padding-top: 20px; }
  .step-head h1 { font-size: 23px; }
  .results { grid-template-columns: 1fr; }
  .path { flex-wrap: wrap; }
  .scene-row { grid-template-columns: 24px 40px 1fr; }
  .scene-lines { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
