/* RecRoom by DCBC
   Studio wall paper, deep ink console, three track colours that mean the same thing everywhere:
   cobalt = voice, amber = effects, plum = music. Rec red is reserved for the final render. */

:root {
  --paper: #E9ECE4;
  --paper-2: #DDE2D6;
  --card: #FBFCF8;
  --ink: #18282A;
  --ink-2: #3E5052;
  --ink-3: #6E7E7E;
  --line: #C9D0C2;
  --line-soft: #DCE1D4;
  --console: #18282A;
  --console-2: #223638;
  --console-text: #D6E1DA;

  --vo: #2F55D9;
  --vo-soft: #DCE3FB;
  --sfx: #C47A00;
  --sfx-soft: #F6E6C6;
  --bgm: #8336AE;
  --bgm-soft: #ECDDF4;
  --orig: #5C6B69;

  --ok: #1F7A4C;
  --ok-soft: #D6EEDF;
  --warn: #9A5B00;
  --warn-soft: #F7E7C8;
  --err: #B42C2C;
  --err-soft: #F6DADA;
  --rec: #E0352F;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --shadow: 0 1px 0 rgba(24, 40, 42, .06), 0 6px 18px -10px rgba(24, 40, 42, .25);

  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.55 var(--f-body);
}
a { color: var(--vo); }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--vo); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(26px, 3.2vw, 34px); font-weight: 700; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 650; }
p { margin: 0 0 .8em; }
small, .muted { color: var(--ink-3); }
.mono, time, .tc { font-family: var(--f-mono); font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.side {
  background: var(--console); color: var(--console-text);
  padding: 22px 16px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; padding: 0 6px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font: 700 22px/1 var(--f-display); letter-spacing: -.02em; }
.brand-by { display: block; font: 500 11px/1.2 var(--f-body); color: #93A7A1; letter-spacing: .02em; margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-sm);
  color: var(--console-text); text-decoration: none; font-weight: 500;
}
.nav a:hover { background: var(--console-2); }
.nav a[aria-current="page"] { background: #2E4648; color: #fff; }
.nav svg { width: 18px; height: 18px; opacity: .8; }
.side-foot { margin-top: auto; font-size: 12px; color: #8EA39C; padding: 0 6px; }
.side-foot form { margin: 8px 0 0; }
.side-foot button { background: none; border: 0; color: #C9D7D0; padding: 0; cursor: pointer; font: inherit; text-decoration: underline; }
.cron-pill { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); display: inline-block; flex: none; }
.dot.ok { background: #3FCF84; } .dot.warn { background: #F0B03C; } .dot.err { background: var(--rec); }

.main { padding: 28px clamp(16px, 3vw, 40px) 80px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--ink-2); margin: 0; max-width: 62ch; }
.mobile-bar { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 40; transform: translateX(-102%); transition: transform .2s; height: auto; }
  .side.open { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .mobile-bar { display: flex; align-items: center; justify-content: space-between; background: var(--console); color: #fff; padding: 10px 16px; position: sticky; top: 0; z-index: 30; }
  .mobile-bar button { background: none; border: 1px solid #456; color: #fff; border-radius: var(--r-sm); padding: 6px 10px; font: inherit; }
  .main { padding-top: 18px; }
}

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: 13.5px; margin: 0 0 5px; color: var(--ink-2); }
.hint { display: block; font-weight: 400; color: var(--ink-3); font-size: 12.5px; margin-top: 4px; }
input:not([type]), input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], input[type=url], input[type=date], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 11px; min-height: 40px;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
textarea.script { min-height: 220px; font-family: var(--f-mono); font-size: 13.5px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--vo); box-shadow: 0 0 0 3px var(--vo-soft); }
.field { margin-bottom: 16px; }
.field-inline { display: flex; gap: 12px; flex-wrap: wrap; }
.field-inline > .field { flex: 1 1 180px; }
.check { display: flex; align-items: flex-start; gap: 9px; font-weight: 500; color: var(--ink); cursor: pointer; margin: 0; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); flex: none; }
.radio-row { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-row label { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-weight: 500; cursor: pointer; margin: 0; }
.radio-row input { accent-color: var(--ink); margin: 0; }
.radio-row label:has(input:checked) { border-color: var(--ink); background: var(--paper-2); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px/1 var(--f-body); padding: 11px 16px; min-height: 40px; border-radius: var(--r-sm);
  border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #24393B; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.small { padding: 7px 11px; min-height: 32px; font-size: 13px; }
.btn.danger { background: var(--err); border-color: var(--err); }
.btn.link { background: none; border: 0; color: var(--vo); padding: 0; min-height: 0; font-weight: 600; }
.btn[disabled], .btn.busy { opacity: .55; cursor: progress; }
.btn svg { width: 16px; height: 16px; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; padding: 0; }
.icon-btn:hover { background: var(--paper-2); }
.icon-btn svg { width: 17px; height: 17px; }

/* the single loud control */
.btn.rec { background: var(--rec); border-color: var(--rec); font-size: 15px; padding: 14px 20px; gap: 10px; }
.btn.rec .rec-light { width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
.btn.rec:hover { background: #C42B26; }

/* ---------- status, notices ---------- */
.flash { border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 14px; border: 1px solid; font-weight: 500; }
.flash.ok { background: var(--ok-soft); border-color: #A6D5B9; color: #134A2F; }
.flash.err { background: var(--err-soft); border-color: #E7AEAE; color: #7A1D1D; }
.flash.warn { background: var(--warn-soft); border-color: #E7C98F; color: #5E3A00; }
.note { background: var(--paper-2); border-radius: var(--r-md); padding: 12px 14px; font-size: 14px; color: var(--ink-2); }
.note.warn { background: var(--warn-soft); color: #5E3A00; }
.note.err { background: var(--err-soft); color: #7A1D1D; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.err { background: var(--err-soft); color: var(--err); }
.tag.vo { background: var(--vo-soft); color: var(--vo); }
.tag.sfx { background: var(--sfx-soft); color: #8A5600; }
.tag.bgm { background: var(--bgm-soft); color: var(--bgm); }
.tag.local { background: #E0EEEA; color: #245B4E; }

/* ---------- project list ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.proj {
  display: block; text-decoration: none; color: inherit; background: var(--card); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.proj:hover { border-color: var(--ink-3); }
.proj h3 { font-size: 18px; margin-bottom: 4px; }
.proj .meta { font-size: 13px; color: var(--ink-3); }
.proj .tracks { display: flex; gap: 4px; margin: 14px 0 10px; height: 6px; }
.proj .tracks span { flex: 1; border-radius: 3px; background: var(--line-soft); }
.proj .tracks .vo.on { background: var(--vo); } .proj .tracks .sfx.on { background: var(--sfx); } .proj .tracks .bgm.on { background: var(--bgm); }
.empty { text-align: center; padding: 56px 20px; border: 2px dashed var(--line); border-radius: var(--r-lg); color: var(--ink-2); }
.empty h2 { margin-bottom: 6px; }

.statline { display: flex; gap: 28px; flex-wrap: wrap; margin-bottom: 22px; }
.statline div { font-size: 13px; color: var(--ink-3); }
.statline strong { display: block; font: 700 22px/1.2 var(--f-display); color: var(--ink); }

/* ---------- signal path (project steps) ---------- */
.path { display: flex; align-items: center; margin: 0 0 24px; padding: 0; list-style: none; overflow-x: auto; }
.path li { display: flex; align-items: center; flex: none; }
.path li + li::before { content: ""; width: clamp(18px, 4vw, 54px); height: 2px; background: var(--line); margin: 0 6px; }
.path li.done + li::before, .path li.done::before { background: var(--ink); }
.path a, .path span {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
  text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; border: 1px solid var(--line); background: var(--card);
}
.path .n { font-family: var(--f-mono); font-size: 12px; color: var(--ink-3); }
.path li.done a { border-color: var(--ink); color: var(--ink); }
.path li.current a { background: var(--ink); color: #fff; border-color: var(--ink); }
.path li.current .n { color: #A9BCB6; }
.path li.locked span { opacity: .5; }

/* ---------- output switches (tri-state) ---------- */
.outputs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 760px) { .outputs { grid-template-columns: 1fr 1fr; } }
.out-opt { position: relative; }
.out-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.out-opt .face {
  border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 14px; background: #fff; min-height: 92px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px; transition: border-color .15s, background .15s;
}
.out-opt .face strong { font: 650 15px/1.2 var(--f-display); }
.out-opt .face small { font-size: 12.5px; }
.out-opt .box { width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--ink-3); display: grid; place-items: center; background: #fff; }
.out-opt input:checked + .face .box, .out-opt input:indeterminate + .face .box { background: var(--k, var(--ink)); border-color: var(--k, var(--ink)); }
.out-opt input:checked + .face .box::after { content: ""; width: 10px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.out-opt input:indeterminate + .face .box::after { content: ""; width: 10px; height: 2px; background: #fff; border-radius: 1px; }
.out-opt input:checked + .face { border-color: var(--k, var(--ink)); background: var(--ks, var(--paper-2)); }
.out-opt input:focus-visible + .face { outline: 2px solid var(--vo); outline-offset: 2px; }
.out-opt.all { --k: var(--ink); --ks: var(--paper-2); }
.out-opt.vo { --k: var(--vo); --ks: var(--vo-soft); }
.out-opt.sfx { --k: var(--sfx); --ks: var(--sfx-soft); }
.out-opt.bgm { --k: var(--bgm); --ks: var(--bgm-soft); }

/* upload */
.drop {
  border: 2px dashed var(--line); border-radius: var(--r-lg); padding: 22px; text-align: center; background: #fff;
  display: grid; gap: 8px; place-items: center; color: var(--ink-2); cursor: pointer;
}
.drop.over { border-color: var(--vo); background: var(--vo-soft); }
.drop input { display: none; }
.progress { width: 100%; height: 8px; background: var(--paper-2); border-radius: 4px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.video-thumb { width: 100%; border-radius: var(--r-md); background: #000; max-height: 280px; }

/* ---------- plan review ---------- */
.group { border-left: 4px solid var(--k); }
.group.vo { --k: var(--vo); } .group.sfx { --k: var(--sfx); } .group.bgm { --k: var(--bgm); }
.group-title { display: flex; align-items: center; gap: 10px; }
.group-title .swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--k); }
.items { display: flex; flex-direction: column; gap: 8px; }
.item {
  display: grid; grid-template-columns: 26px 92px 1fr auto; gap: 12px; align-items: start;
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 12px;
}
.item.ignored { opacity: .55; background: transparent; }
.item.ignored .item-text { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.item.approved { border-color: color-mix(in srgb, var(--k) 45%, var(--line-soft)); }
.item .when { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.item .when b { display: block; font-family: var(--f-body); font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.item-text { font-weight: 500; }
.item-text .who { font-weight: 700; color: var(--k); }
.item .why { font-size: 13px; color: var(--ink-3); margin-top: 3px; }
.item .chips { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.item .side-col { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.item .cost { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 6px 10px; font: 600 12.5px var(--f-body); cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"].approve { background: var(--ok); color: #fff; }
.seg button[aria-pressed="true"].ignore { background: var(--ink-3); color: #fff; }
.edit-panel { grid-column: 2 / -1; border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 4px; display: none; }
.item.editing .edit-panel { display: block; }
.diff { background: var(--warn-soft); border-radius: var(--r-sm); padding: 8px 10px; font-size: 13.5px; margin-top: 8px; }
@media (max-width: 720px) {
  .item { grid-template-columns: 22px 1fr; }
  .item .when { grid-column: 2; }
  .item .main-col { grid-column: 1 / -1; }
  .item .side-col { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .edit-panel { grid-column: 1 / -1; }
}

.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.char { background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 14px; }
.char h3 { color: var(--vo); }
.char dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 8px 0 0; font-size: 13px; }
.char dt { color: var(--ink-3); } .char dd { margin: 0; }
.scenes { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.scenes th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.scenes td { padding: 9px 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table-wrap { overflow-x: auto; }

.sticky-bar {
  position: sticky; bottom: 14px; z-index: 20; margin-top: 18px; background: var(--console); color: #fff;
  border-radius: var(--r-lg); padding: 12px 14px 12px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; box-shadow: 0 14px 30px -12px rgba(0,0,0,.45);
}
.sticky-bar .sum { font-size: 14px; color: var(--console-text); }
.sticky-bar .sum b { color: #fff; font-family: var(--f-mono); }
.sticky-bar .btn { background: #fff; color: var(--ink); border-color: #fff; }
.sticky-bar .btn.ghost { background: transparent; color: #fff; border-color: #4B6466; }

/* ---------- studio ---------- */
.gen-row {
  display: grid; grid-template-columns: 74px minmax(0, 1fr) minmax(220px, 300px) auto; gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 12px 14px;
}
.gen-row.affected { border-color: #E7C98F; background: #FFFBF1; }
.gen-row .when { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-2); }
.gen-row audio { width: 100%; height: 36px; }
.gen-row .what .who { font-weight: 700; color: var(--k); }
.gen-row .what .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.gen-row .acts { display: flex; gap: 6px; align-items: center; }
.state { font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.spin { width: 13px; height: 13px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 3s; } }
.versions { grid-column: 1 / -1; display: none; border-top: 1px dashed var(--line); padding-top: 10px; }
.gen-row.open .versions { display: block; }
.ver { display: grid; grid-template-columns: 54px minmax(160px, 260px) 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.ver + .ver { border-top: 1px solid var(--line-soft); }
.ver audio { width: 100%; height: 32px; }
.ver .vn { font-family: var(--f-mono); font-weight: 600; }
.regen { grid-column: 1 / -1; display: none; background: var(--paper); border-radius: var(--r-md); padding: 12px; }
.gen-row.regen-open .regen { display: block; }
@media (max-width: 900px) {
  .gen-row { grid-template-columns: 60px 1fr; }
  .gen-row .player, .gen-row .acts { grid-column: 1 / -1; }
  .ver { grid-template-columns: 44px 1fr; }
  .ver .vmeta, .ver .vacts { grid-column: 1 / -1; }
}

/* ---------- timeline ---------- */
.tl-wrap { background: var(--console); border-radius: var(--r-lg); color: var(--console-text); padding: 16px; }
.tl-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 16px; margin-bottom: 14px; }
@media (max-width: 960px) { .tl-top { grid-template-columns: 1fr; } }
.tl-video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-md); }
.tl-transport { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; flex-wrap: wrap; }
.tl-transport .tc { font-size: 18px; color: #fff; min-width: 96px; }
.tl-transport button { background: var(--console-2); color: #fff; border: 1px solid #3A5153; border-radius: var(--r-sm); height: 36px; padding: 0 12px; font: 600 13.5px var(--f-body); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.tl-transport button:hover { background: #2C4446; }
.tl-transport select { width: auto; background: var(--console-2); color: #fff; border-color: #3A5153; min-height: 36px; padding: 4px 8px; }
.inspector { background: var(--console-2); border-radius: var(--r-md); padding: 14px; }
.inspector h3 { color: #fff; }
.inspector label { color: #A9BCB6; }
.inspector input, .inspector select { background: #142224; color: #fff; border-color: #3A5153; min-height: 34px; padding: 6px 9px; }
.inspector .hint, .inspector small { color: #8EA39C; }
.inspector .check { color: var(--console-text); }
.lanes { position: relative; overflow-x: auto; border-radius: var(--r-md); background: #122022; }
.lanes-inner { position: relative; min-width: 100%; }
.ruler { height: 26px; position: relative; border-bottom: 1px solid #2E4446; font: 11px var(--f-mono); color: #7F9690; }
.ruler span { position: absolute; top: 6px; transform: translateX(3px); }
.ruler span::before { content: ""; position: absolute; left: -3px; top: -6px; width: 1px; height: 26px; background: #2E4446; }
.lane { position: relative; height: 58px; border-bottom: 1px solid #22383A; }
.lane-head {
  position: sticky; left: 0; z-index: 3; width: 128px; height: 100%; background: #18292B; display: flex; flex-direction: column; justify-content: center;
  padding: 0 10px; gap: 4px; border-right: 1px solid #2E4446; font-size: 12.5px; font-weight: 600; color: #fff;
}
.lane-head .ms { display: flex; gap: 4px; }
.lane-head .ms button { font: 700 10.5px var(--f-mono); width: 24px; height: 20px; border-radius: 4px; border: 1px solid #3A5153; background: transparent; color: #A9BCB6; cursor: pointer; padding: 0; }
.lane-head .ms button[aria-pressed="true"].m { background: var(--rec); border-color: var(--rec); color: #fff; }
.lane-head .ms button[aria-pressed="true"].s { background: #F0B03C; border-color: #F0B03C; color: #1a1a1a; }
.lane-head i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; }
.clip {
  position: absolute; top: 8px; height: 42px; border-radius: 6px; padding: 4px 7px; font-size: 11.5px; color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  cursor: grab; touch-action: none; user-select: none; border: 1px solid rgba(255,255,255,.18);
}
.clip.vo { background: var(--vo); } .clip.sfx { background: var(--sfx); } .clip.bgm { background: var(--bgm); }
.clip.muted { opacity: .35; }
.clip.sel { box-shadow: 0 0 0 2px #fff; z-index: 2; }
.clip.dragging { cursor: grabbing; }
.clip .fi, .clip .fo { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(0,0,0,.35), transparent); pointer-events: none; }
.clip .fo { right: 0; background: linear-gradient(270deg, rgba(0,0,0,.35), transparent); }
.lane.orig .wave { position: absolute; top: 14px; bottom: 14px; border-radius: 6px; background: repeating-linear-gradient(90deg, #4A5C5B 0 2px, transparent 2px 5px); opacity: .8; }
.playhead { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; z-index: 5; pointer-events: none; }
.mixer { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
@media (max-width: 760px) { .mixer { grid-template-columns: 1fr 1fr; } }
.strip { background: var(--console-2); border-radius: var(--r-md); padding: 10px 12px; }
.strip b { font-size: 13px; color: #fff; display: flex; align-items: center; gap: 6px; }
.strip input[type=range] { width: 100%; accent-color: #fff; }
.strip .db { font: 12px var(--f-mono); color: #A9BCB6; }

.render-card { border: 2px solid var(--ink); }
.exports { display: grid; gap: 8px; }
.export { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line-soft); border-radius: var(--r-md); padding: 10px 12px; font-size: 14px; }

/* ---------- providers ---------- */
.routing { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 980px) { .routing { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .routing { grid-template-columns: 1fr; } }
.route { border-radius: var(--r-md); padding: 12px; background: #fff; border: 1px solid var(--line-soft); border-top: 4px solid var(--k, var(--ink)); }
.route.vo { --k: var(--vo); } .route.sfx { --k: var(--sfx); } .route.bgm { --k: var(--bgm); }
.prov-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
@media (max-width: 420px) { .prov-list { grid-template-columns: 1fr; } }
.prov { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; }
.prov.off { box-shadow: none; }
.prov-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.prov h3 { margin: 0; font-size: 17px; }
.prov .links { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13.5px; }
.prov .links a.get { font-weight: 700; }
.prov details { border-top: 1px solid var(--line-soft); padding-top: 8px; }
.prov summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.prov .status-line { font-size: 13px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; margin: 0; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.switch input::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff; top: 3px; left: 3px; transition: left .15s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { left: 19px; }
.switch input:disabled { opacity: .45; cursor: not-allowed; }
.price-grid { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 6px 8px; align-items: center; font-size: 13px; }

/* usage */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 10px; }
.bars div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; font-size: 12px; color: var(--ink-3); }
.bars i { display: block; width: 100%; max-width: 56px; background: var(--ink); border-radius: 4px 4px 0 0; min-height: 2px; }
.bars div:last-child i { background: var(--vo); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 12.5px; color: var(--ink-3); font-weight: 600; padding: 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 8px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.data td.num { font-family: var(--f-mono); text-align: right; white-space: nowrap; }

/* system */
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { display: grid; grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.checks li span:last-child { font-family: var(--f-mono); font-size: 13px; color: var(--ink-2); word-break: break-word; }
pre.cmd { background: var(--console); color: #DDE8E2; padding: 12px 14px; border-radius: var(--r-md); overflow-x: auto; font: 13px/1.5 var(--f-mono); white-space: pre-wrap; word-break: break-all; }

/* dialog */
dialog { border: 0; border-radius: var(--r-lg); padding: 22px; max-width: 460px; width: calc(100% - 32px); box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); color: var(--ink); background: var(--card); }
dialog::backdrop { background: rgba(18, 30, 32, .55); }
dialog .row { justify-content: flex-end; margin-top: 18px; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(20px); opacity: 0; z-index: 60;
  background: var(--console); color: #fff; padding: 11px 16px; border-radius: var(--r-md); font-weight: 500; max-width: calc(100% - 32px);
  transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--err); }

/* auth / install */
.solo { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--console); }
.solo .card { width: 100%; max-width: 440px; }
.solo.wide .card { max-width: 640px; }
.solo .brand { color: var(--ink); margin-bottom: 18px; padding: 0; }
.solo .brand-by { color: var(--ink-3); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
