:root{color-scheme:light;box-sizing:border-box;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}html{scroll-padding-top:env(safe-area-inset-top,0px)}body{margin:0;padding:0;font:14px -apple-system,BlinkMacSystemFont,sans-serif;background:#fff;color:#000}img{max-width:100%}[hidden]:not([hidden=until-found i]){display:none!important}

/* Layout: one 16:9 monitor wall on deep black; transport and shot list below, like a DVR console. */
:root {
  --bg: #050505; --surface: #0d0c0a; --surface-2: #14120f; --line: #26231e;
  --fg: #e9e3d6; --muted: #8a8277; --faint: #5c564d;
  --amber: #f0a33a; --red: #ff4632; --blue: #4f86ff;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --f-ui: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-cond: "Space Grotesk", "Arial Narrow", Arial, sans-serif;
  color-scheme: dark;
}
[hidden] { display: none !important; }
html, body { background: var(--bg); color: var(--fg); }
body { font: 15px/1.5 var(--f-ui); }
.wrap { max-width: 1280px; margin: 0 auto; padding-inline: 16px; padding-block: 20px 48px; display: grid; gap: 14px; }
header.top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
h1 { margin: 0; font: 600 clamp(22px, 3.2vw, 34px)/1.1 var(--f-cond); letter-spacing: 0.06em; text-transform: uppercase; text-wrap: balance; }
.sub { color: var(--muted); font-size: 15px; }
.by { font: 400 12px var(--f-mono); color: var(--faint); letter-spacing: 0.08em; }
.stage { position: relative; background: #000; aspect-ratio: 16 / 9; width: 100%; max-width: 100%; overflow: hidden; border: 1px solid var(--line); }
.stage canvas { display: block; width: 100%; height: 100%; }
.stage:fullscreen { border: 0; display: grid; place-items: center; }
.stage.vertical { aspect-ratio: 9 / 16; width: min(100%, calc(78vh * 9 / 16)); justify-self: center; }
.stage.vertical:fullscreen canvas { width: auto; height: min(100vh, 177.78vw); }
.stage:fullscreen canvas { width: min(100vw, 177.78vh); height: auto; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font: 400 13px var(--f-mono); letter-spacing: 0.1em; }
.bigplay { position: absolute; left: 50%; bottom: 2.5%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; background: rgba(5,5,5,0.82); color: var(--fg); border: 1px solid #3b362f; font: 500 15px var(--f-ui); letter-spacing: 0.04em; cursor: pointer; }
.bigplay::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); }
.bigplay:hover { border-color: var(--amber); }
.transport { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 14px; }
button { font: 500 14px var(--f-ui); color: var(--fg); background: var(--surface-2); border: 1px solid var(--line); padding: 8px 14px; cursor: pointer; letter-spacing: 0.03em; }
button:hover { border-color: #4a443b; }
button:focus-visible, .scrub canvas:focus-visible, input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
button[disabled] { opacity: 0.5; cursor: progress; }
#play { min-width: 84px; }
button[aria-pressed="true"]#btnFoley { border-color: var(--amber); color: var(--amber); }
.time { font: 400 13px var(--f-mono); color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.scrub { min-width: 0; }
.scrub canvas { display: block; width: 100%; height: 44px; cursor: pointer; touch-action: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font: 400 11px var(--f-mono); color: var(--faint); letter-spacing: 0.06em; text-transform: uppercase; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: -1px; background: var(--c); }
.layers { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 0; }
.layers .lbl { font: 400 11px var(--f-mono); color: var(--faint); letter-spacing: 0.08em; text-transform: uppercase; margin-right: 12px; min-width: 4.5em; }
.layers button + button { margin-left: -1px; }
.layers button[aria-pressed="true"] { border-color: var(--amber); color: var(--amber); position: relative; z-index: 1; }
.layers .hint { color: var(--muted); font-size: 14px; margin-left: 14px; min-width: 0; flex: 1 1 260px; }
@media (max-width: 520px) { .layers .lbl { flex-basis: 100%; margin-bottom: 2px; } .layers button { padding: 8px 10px; } .layers .hint { margin-left: 0; flex-basis: 100%; } }
.now { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; padding: 12px 14px; background: var(--surface); border-left: 2px solid var(--amber); }
.now .id { font: 400 13px var(--f-mono); color: var(--amber); }
.now .meta { font: 400 12px var(--f-mono); color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; min-width: 0; }
.now .text { grid-column: 2; color: var(--fg); min-width: 0; max-width: 72ch; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.panel { background: var(--surface); border: 1px solid var(--line); padding: 16px; display: grid; gap: 12px; min-width: 0; }
.panel h2 { margin: 0; font: 600 16px var(--f-cond); letter-spacing: 0.1em; text-transform: uppercase; }
.panel p { margin: 0; color: var(--muted); max-width: 72ch; }
.tablewrap { overflow-x: auto; max-height: 460px; overflow-y: auto; }
table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 14px; }
td { padding: 7px 10px; border-top: 1px solid var(--line); vertical-align: top; }
tr[data-id] { cursor: pointer; }
tr[data-id]:hover td { background: var(--surface-2); }
tr.on td { background: #1b1711; }
td.mono { font: 400 12px var(--f-mono); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
td.beat { color: var(--muted); white-space: nowrap; font-size: 13px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font: 400 11px var(--f-mono); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; color: var(--fg); }
.chip::before { content: ""; width: 8px; height: 8px; background: var(--c); }
.row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
legend { font: 400 11px var(--f-mono); color: var(--faint); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 6px; }
label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.bar { height: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.bar > div { height: 100%; width: 0; background: var(--amber); transition: width 0.2s linear; }
.status { font: 400 12px var(--f-mono); color: var(--muted); min-height: 1.4em; overflow-wrap: anywhere; }
textarea { width: 100%; min-height: 160px; background: #000; color: var(--fg); border: 1px solid var(--line); font: 400 12px var(--f-mono); }
.note { color: var(--amber); font-size: 14px; }
.solobar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 8px 12px; background: #1b1711; border: 1px solid #3b362f; font: 400 12px var(--f-mono); color: var(--muted); }
.solobar b { color: var(--fg); font-weight: 400; }
input[type="text"], input:not([type]) { background: #000; color: var(--fg); border: 1px solid var(--line); padding: 7px 9px; font: 400 14px var(--f-ui); width: 12em; max-width: 100%; }
#screen { cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--surface-2); border: 1px solid #3b362f; padding: 10px 16px; font: 400 12px var(--f-mono); z-index: 5; max-width: calc(100vw - 32px); }
@media (max-width: 640px) {
  .transport { grid-template-columns: auto 1fr; }
  .scrub { grid-column: 1 / -1; }
  .now { grid-template-columns: 1fr; }
  .now .text { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) { .bar > div { transition: none; } }
