/* Autopilot: the web page. Light by default, dark when the device asks for it. */
@font-face { font-family: 'Public Sans'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/public-sans-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Public Sans'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/public-sans-latin-ext-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --bg: #f3f5f9; --card: #ffffff; --side: #ffffff; --fg: #1b2337; --muted: #6b7385; --faint: #9aa1b0;
  --line: #e9edf3; --soft: #f4f6fa; --hover: #f7f9fc;
  --accent: #1463e8; --accent-2: #0f52c6; --accent-soft: #eaf1fe; --on-accent: #ffffff;
  --orange: #f26b3a; --orange-soft: #fff0e9;
  --green: #14915a; --green-soft: #e6f6ee; --teal: #0e8f8a; --teal-soft: #e3f6f5;
  --amber: #b86e00; --amber-soft: #fff4dd; --red: #d63447; --red-soft: #fdecee;
  --slate: #56627a; --slate-soft: #eef1f6; --grey: #8a92a3; --grey-soft: #f1f2f5;
  --blue: #1463e8; --blue-soft: #eaf1fe;
  --shadow: 0 1px 2px rgba(20, 30, 55, .04), 0 10px 30px rgba(20, 30, 55, .06);
  --radius: 16px;
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1220; --card: #151c2c; --side: #121929; --fg: #e8edf7; --muted: #9ba5b9; --faint: #6f7a90;
    --line: #232c40; --soft: #1a2235; --hover: #1a2234;
    --accent: #4b8dff; --accent-2: #6aa0ff; --accent-soft: #172a4d; --on-accent: #ffffff;
    --orange: #ff8a5b; --orange-soft: #3a2218;
    --green: #3ccf8e; --green-soft: #12301f; --teal: #3fd0c9; --teal-soft: #102f2f;
    --amber: #ffc04d; --amber-soft: #352a12; --red: #ff6b7d; --red-soft: #3a1820;
    --slate: #aab4c8; --slate-soft: #202a3e; --grey: #8a93a6; --grey-soft: #1d2434;
    --blue: #6aa0ff; --blue-soft: #172a4d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.5 var(--sans); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1 { font-size: 1.6rem; line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; margin: 0; font-weight: 700; }
h3 { font-size: 1rem; margin: 18px 0 8px; font-weight: 650; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.mono { font-family: var(--mono); font-size: .86em; }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
svg.i.fill { fill: currentColor; stroke: none; width: 14px; height: 14px; }

/* ---------------------------------------------------------------- layout: sidebar + main */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column;
        gap: 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px; color: var(--fg); font-weight: 750; font-size: 1.22rem; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.who { display: flex; align-items: center; gap: 12px; background: var(--soft); border-radius: 14px; padding: 12px; }
.who .dot { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--card); box-shadow: var(--shadow); flex: none; }
.who .dot i { width: 12px; height: 12px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); }
.who .dot i.off { background: var(--amber); box-shadow: 0 0 0 5px var(--amber-soft); }
.who .dot i.fake { background: var(--grey); box-shadow: 0 0 0 5px var(--grey-soft); }
.who b { display: block; font-size: .95rem; }
.who span { color: var(--muted); font-size: .85rem; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--muted); font-weight: 500; }
.nav a:hover { background: var(--hover); color: var(--fg); text-decoration: none; }
.nav a.on { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.nav .badge { margin-left: auto; }
.side .bottom { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.side .bottom a, .side .bottom button { display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 10px 14px; border-radius: 12px; color: var(--muted);
  background: none; border: 0; font: inherit; font-weight: 500; cursor: pointer; text-align: left; width: 100%; }
.side .bottom a:hover, .side .bottom button:hover { background: var(--hover); color: var(--fg); text-decoration: none; }
.side .bottom button.on { color: var(--accent); }
.main { padding: 30px 34px 70px; min-width: 0; }
.main > .inner { max-width: 1480px; margin: 0 auto; }

.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
         background: var(--orange); color: #fff; font-size: .74rem; font-weight: 700; line-height: 1; }
.badge.soft { background: var(--slate-soft); color: var(--slate); }

/* ---------------------------------------------------------------- page head, alerts */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.crumbs { color: var(--muted); font-size: .88rem; margin-bottom: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 12px; margin-bottom: 14px; font-weight: 500; flex-wrap: wrap; }
.alert.warn { background: var(--amber-soft); color: var(--amber); }
.alert.info { background: var(--accent-soft); color: var(--accent); }
.alert.bad { background: var(--red-soft); color: var(--red); }
.alert > span { flex: 1; min-width: 0; }
.alert form { margin-left: auto; }

/* ---------------------------------------------------------------- cards */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; min-width: 0; }
.card + .card, .card + .section, .section + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.card.flush { padding: 0; }
.card.flush .card-head { padding: 20px 24px 0; }
.section { margin-top: 26px; }
.section > h2 { margin-bottom: 12px; }
.stats { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 18px; }
.stat { display: flex; gap: 14px; align-items: flex-start; }
.stat .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.stat .ico.orange { background: var(--orange-soft); color: var(--orange); }
.stat .ico.green { background: var(--green-soft); color: var(--green); }
.stat .ico.slate { background: var(--slate-soft); color: var(--slate); }
.stat .ico svg.i { width: 21px; height: 21px; }
.stat .label { color: var(--muted); font-size: .88rem; }
.stat .big { font-size: 1.55rem; font-weight: 750; line-height: 1.2; letter-spacing: -.01em; }
.stat .big.sm { font-size: 1.12rem; }
.stat .more { font-size: .86rem; color: var(--muted); }
.grid2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); align-items: start; }
.stats > .card + .card { margin-top: 0; }
.grid2 > .card + .card { margin-top: 0; }

/* ---------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 20px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 6px 0 12px; color: var(--muted); font-weight: 600; white-space: nowrap; flex: none; }
.tabs a:hover { color: var(--fg); text-decoration: none; }
.tabs a.on { color: var(--fg); }
.tabs a.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--orange); }
.tabs .badge { height: 20px; min-width: 20px; font-size: .72rem; }
.tabs a:not(.on) .badge.soft { background: var(--soft); }

/* ---------------------------------------------------------------- tables */
.tbl-wrap { overflow-x: auto; }
table { border-collapse: separate; border-spacing: 0; width: 100%; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: .88rem; padding: 14px 14px; background: var(--soft); white-space: nowrap; }
.tbl th:first-child { border-radius: 12px 0 0 12px; }
.tbl th:last-child { border-radius: 0 12px 12px 0; }
.tbl td { padding: 14px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr:hover { background: var(--hover); }
.tbl tbody tr.sel { background: var(--accent-soft); }
.tbl td.title b, .tbl td .strong { font-weight: 650; color: var(--fg); }
.tbl td .sub { display: block; color: var(--muted); font-size: .86rem; }
.tbl.compact td { padding: 11px 12px; }
.tbl.compact th { padding: 11px 12px; }
.empty { text-align: center; padding: 40px 10px; color: var(--muted); }

.unit-cell { display: flex; align-items: center; gap: 14px; min-width: 240px; }
.unit-cell .grow { min-width: 0; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.unit-cell .chips { margin-top: 4px; }
.status-cell { min-width: 150px; }
.status-cell .sub { margin: 6px 0; }
.show-sm { display: none !important; }
.cover { width: 40px; height: 71px; border-radius: 9px; flex: none; overflow: hidden; display: grid; place-items: center;
         background: linear-gradient(160deg, var(--accent-soft), var(--soft)); color: var(--accent); font-weight: 800; font-size: .78rem; position: relative; }
.cover.fb { background: linear-gradient(160deg, var(--green-soft), var(--soft)); color: var(--green); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ref { font-family: var(--mono); font-size: .84rem; font-weight: 600; color: var(--fg); white-space: nowrap; }
.series { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.series i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.series i.fb { background: var(--green); }

/* ---------------------------------------------------------------- pills, chips, platforms */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 650; padding: 4px 10px; border-radius: 999px; white-space: nowrap;
        background: var(--slate-soft); color: var(--slate); }
.t-blue { background: var(--blue-soft); color: var(--blue); }
.t-orange { background: var(--orange-soft); color: var(--orange); }
.t-green { background: var(--green-soft); color: var(--green); }
.t-teal { background: var(--teal-soft); color: var(--teal); }
.t-amber { background: var(--amber-soft); color: var(--amber); }
.t-red { background: var(--red-soft); color: var(--red); }
.t-grey { background: var(--grey-soft); color: var(--grey); }
.t-slate { background: var(--slate-soft); color: var(--slate); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 4px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.chip b { font-size: .7rem; font-weight: 800; letter-spacing: .03em; padding: 2px 6px; border-radius: 999px; background: var(--card); color: var(--fg); }
.chip.none { background: var(--soft); color: var(--faint); }
.pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.pfs { display: flex; gap: 5px; }
.pf { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--soft); color: var(--faint); position: relative; }
.pf svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.pf.done { background: var(--green-soft); color: var(--green); }
.pf.part { background: var(--teal-soft); color: var(--teal); }
.pf.pending { background: var(--blue-soft); color: var(--blue); }
.pf.failed { background: var(--red-soft); color: var(--red); }
.pf.manual { background: var(--orange-soft); color: var(--orange); }
.plat-row form.posted { display: flex; gap: 8px; flex-basis: 100%; }
.plat-row form.posted input { flex: 1; min-width: 0; padding: 7px 10px; font-size: .88rem; }
input[type=url] { width: 100%; font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; }
.pf.off { opacity: .5; }
.pf.off::after { content: ''; position: absolute; width: 20px; height: 2px; background: var(--faint); transform: rotate(-45deg); border-radius: 2px; }

/* ---------------------------------------------------------------- buttons and forms */
button, .btn { font: inherit; font-weight: 650; font-size: .92rem; border: 1px solid var(--line); background: var(--card); color: var(--fg); border-radius: 11px;
  padding: 9px 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; line-height: 1.3; }
button:hover, .btn:hover { background: var(--hover); text-decoration: none; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button.primary:hover, .btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
button.danger, .btn.danger { color: var(--red); }
button.ghost, .btn.ghost { border-color: transparent; background: transparent; color: var(--muted); }
button.sm, .btn.sm { padding: 6px 12px; font-size: .84rem; border-radius: 9px; }
button.lg, .btn.lg { padding: 13px 20px; font-size: 1rem; border-radius: 12px; }
button:disabled, .btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.row-play { opacity: 0; transition: opacity .12s; }
tr:hover .row-play, tr.sel .row-play, .row-play:focus { opacity: 1; }
@media (hover: none) { .row-play { opacity: 1; } }
form.inline { display: inline; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions.end { justify-content: flex-end; }
.actions + .actions { margin-top: 10px; }
textarea, input[type=text], input[type=password], input[type=search], input[type=datetime-local], select {
  width: 100%; font: inherit; color: var(--fg); background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; }
textarea:focus, input:focus, select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea { min-height: 90px; font-family: var(--mono); font-size: .86rem; line-height: 1.5; }
textarea.vo { min-height: 300px; }
label.field { display: block; margin: 14px 0 6px; font-weight: 600; font-size: .88rem; }
.search { position: relative; width: 260px; max-width: 100%; }
.page-head .actions { flex-wrap: nowrap; }
.search input { padding-left: 38px; background: var(--soft); border-color: transparent; }
.search svg.i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.switch { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.switch:last-of-type { border-bottom: 0; }
.switch input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }

/* ---------------------------------------------------------------- pagination */
.pager { display: flex; justify-content: center; align-items: center; gap: 6px; padding: 18px 0 4px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; color: var(--fg); font-weight: 500; }
.pager a:hover { background: var(--hover); text-decoration: none; }
.pager a.on { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.pager .off { color: var(--faint); }

/* ---------------------------------------------------------------- units list + preview */
.units-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.units-layout > .card + .card { margin-top: 0; }
.preview { position: sticky; top: 24px; }
.preview .who-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: -4px 0 14px; }
.seg { display: inline-flex; background: var(--soft); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 9px; font-size: .84rem; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--fg); box-shadow: var(--shadow); }
.preview .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.preview .btns .btn, .preview .btns button { width: 100%; padding: 13px 10px; font-size: .98rem; }
.preview .btns form { display: contents; }
@media (max-width: 1240px) { .units-layout { grid-template-columns: minmax(0, 1fr); } .preview { display: none; } }

/* the 9:16 player */
.player { position: relative; aspect-ratio: 9 / 16; width: 100%; border-radius: 16px; overflow: hidden; background: #0b0f19; color: #fff; }
.player.compact { aspect-ratio: 4 / 3; }
.player video, .player img.still { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: #0b0f19; }
.player img.still { object-fit: contain; }
.player .empty-media { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: #c9d2e3;
  background: radial-gradient(120% 80% at 50% 0%, #1f2b46 0%, #0b0f19 70%); }
.player .empty-media svg.i { width: 34px; height: 34px; opacity: .8; display: block; margin: 0 auto 10px; }
.player .big-play { position: absolute; inset: 0; margin: auto; width: 66px; height: 66px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: #111;
  display: grid; place-items: center; padding: 0; box-shadow: 0 8px 30px rgba(0, 0, 0, .35); }
.player .big-play:hover { background: #fff; }
.player .big-play svg { width: 26px; height: 26px; margin-left: 4px; fill: currentColor; stroke: none; }
.player.playing .big-play { display: none; }
.player .bar { position: absolute; left: 12px; right: 12px; bottom: 16px; display: flex; align-items: center; gap: 6px; }
.player .bar .t { background: rgba(10, 14, 25, .62); padding: 4px 9px; border-radius: 8px; font-size: .84rem; font-weight: 600; font-variant-numeric: tabular-nums; backdrop-filter: blur(6px); }
.player .bar .sp { margin-left: auto; }
.player .bar button { background: rgba(10, 14, 25, .62); color: #fff; border: 0; padding: 4px 9px; border-radius: 8px; font-size: .8rem; backdrop-filter: blur(6px); min-width: 32px; }
.player .bar button.lit { background: #fff; color: #111; }
.player .bar svg.i { width: 15px; height: 15px; }
.player .prog { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255, 255, 255, .22); cursor: pointer; }
.player .prog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); }
.player .prog i::after { content: ''; position: absolute; right: -5px; top: -3px; width: 11px; height: 11px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px var(--accent); }
.player .tag { position: absolute; top: 12px; left: 12px; background: rgba(10, 14, 25, .62); padding: 3px 9px; border-radius: 8px; font-size: .78rem; font-weight: 700; backdrop-filter: blur(6px); }

/* ---------------------------------------------------------------- unit page */
.unit-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.unit-head .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.panels { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); margin-top: 20px; align-items: start; }
.panels > .card + .card { margin-top: 0; }
@media (min-width: 1500px) { .panels.n2 { grid-template-columns: repeat(2, minmax(0, 560px)); } }
.panel .panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.panel .lang { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; letter-spacing: .03em; flex: none; }
.panel .panel-head .grow { flex: 1; min-width: 0; }
.panel .panel-head b { display: block; }
.panel .panel-head span.muted { font-size: .86rem; }
.panel .media { display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; }
.panel .media .player { max-width: 330px; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 18px 0 6px; }
.stepper div { text-align: center; font-size: .78rem; color: var(--faint); font-weight: 600; }
.stepper div::before { content: ''; display: block; height: 6px; border-radius: 6px; background: var(--line); margin-bottom: 7px; }
.stepper .done { color: var(--green); }
.stepper .done::before { background: var(--green); }
.stepper .now { color: var(--blue); }
.stepper .now::before { background: linear-gradient(90deg, var(--blue) 50%, var(--line) 50%); }
.stepper .wait { color: var(--orange); }
.stepper .wait::before { background: var(--orange); }
.stepper .failed { color: var(--red); }
.stepper .failed::before { background: var(--red); }
.stepper .part { color: var(--amber); }
.stepper .part::before { background: var(--amber); }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 14px; margin: 16px 0; font-size: .92rem; align-items: center; }
.kv > span:nth-child(odd) { color: var(--muted); }
.plat-list { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.plat-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--soft); font-size: .9rem; flex-wrap: wrap; }
.plat-row .pf { background: var(--card); }
.plat-row .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.plat-row .err { display: block; color: var(--muted); font-size: .82rem; }
details.box { border-top: 1px solid var(--line); padding: 10px 0 0; margin-top: 14px; }
details.box summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; align-items: center; gap: 8px; color: var(--fg); padding: 2px 0 8px; }
details.box summary::-webkit-details-marker { display: none; }
details.box summary::after { content: '›'; margin-left: auto; transform: rotate(90deg); color: var(--faint); font-size: 1.2rem; transition: transform .15s; }
details.box[open] summary::after { transform: rotate(-90deg); }
pre.box { white-space: pre-wrap; background: var(--soft); padding: 10px 12px; border-radius: 10px; font: .86rem/1.5 var(--sans); margin: 4px 0 10px; overflow-wrap: anywhere; }
.files { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-log { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: .84rem; }
.mini-log li { display: flex; gap: 8px; align-items: baseline; }
.mini-log time { color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mini-log span { overflow-wrap: anywhere; color: var(--muted); }
.mini-log li.error span { color: var(--red); }
.mini-log li.warn span { color: var(--amber); }
.placeholder-panel { text-align: center; padding: 30px 10px; color: var(--muted); }

/* ---------------------------------------------------------------- video detail page */
.video-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 22px; align-items: start; }
.video-layout > .col > .card:first-child { margin-top: 0; }
.video-layout .sticky { position: sticky; top: 24px; }
@media (max-width: 1000px) { .video-layout { grid-template-columns: minmax(0, 1fr); } .video-layout .sticky { position: static; } .video-layout .player { max-width: 360px; margin: 0 auto; } }
.sheet { width: 100%; border-radius: 12px; border: 1px solid var(--line); display: block; }
audio { width: 100%; }
.issues { margin: 6px 0; padding-left: 20px; overflow-wrap: anywhere; }
.issues li { margin: 4px 0; }
.err-box { white-space: pre-wrap; background: var(--red-soft); color: var(--red); padding: 10px 12px; border-radius: 10px; font: .82rem/1.5 var(--mono); margin: 8px 0 0; max-height: 260px; overflow: auto; }

/* ---------------------------------------------------------------- log */
.log td:first-child { white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.log .msg { white-space: pre-wrap; word-break: break-word; font-size: .9rem; }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 50; width: min(360px, calc(100vw - 32px)); }
.toast { background: var(--card); border-radius: 14px; box-shadow: 0 12px 40px rgba(15, 25, 50, .18); padding: 14px 14px 14px 16px; display: flex; gap: 12px; align-items: flex-start;
         border-left: 4px solid var(--accent); animation: toast-in .25s ease-out; }
.toast.orange { border-color: var(--orange); } .toast.green { border-color: var(--green); } .toast.red { border-color: var(--red); }
.toast.teal { border-color: var(--teal); } .toast.amber { border-color: var(--amber); }
.toast .grow { flex: 1; min-width: 0; }
.toast b { display: block; font-size: .92rem; }
.toast span { color: var(--muted); font-size: .88rem; }
.toast button { border: 0; background: none; padding: 0 2px; color: var(--faint); font-size: 1.2rem; line-height: 1; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }

/* ---------------------------------------------------------------- login */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: linear-gradient(115deg, var(--accent) 0 34%, var(--bg) 34% 100%); }
.login { width: min(400px, 100%); }
.login .brand { padding: 0 0 12px; }

/* ---------------------------------------------------------------- phone and tablet */
@media (max-width: 900px) {
  .app { display: block; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 8px; padding: 10px 12px; border-right: 0;
          border-bottom: 1px solid var(--line); overflow: visible; flex-wrap: wrap; }
  .brand { font-size: 1.05rem; padding: 0; }
  .brand img { width: 30px; height: 30px; }
  .who { display: none; }
  .side .bottom { margin: 0 0 0 auto; flex-direction: row; gap: 2px; }
  .side .bottom a, .side .bottom button { padding: 8px; width: auto; }
  .side .bottom .label { display: none; }
  .nav { flex-direction: row; order: 3; flex-basis: 100%; overflow-x: auto; gap: 2px; scrollbar-width: none; }
  .nav a { padding: 8px 12px; white-space: nowrap; }
  .nav a svg.i { display: none; }
  .main { padding: 18px 16px 60px; }
  .card { padding: 18px 16px; }
  .card.flush .card-head { padding: 16px 16px 0; }
  h1 { font-size: 1.35rem; }
  .hide-sm { display: none !important; }
  .show-sm { display: inline-flex !important; }
  .page-head .actions { flex-wrap: wrap; }
  .search { width: 100%; }
  .kv { grid-template-columns: 96px minmax(0, 1fr); }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .tabs { gap: 16px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .tabs a { white-space: nowrap; }
}
@media (max-width: 600px) {
  .tbl th, .tbl td { padding: 11px 10px; }
  .unit-cell { min-width: 0; gap: 10px; }
  .cover { width: 34px; height: 60px; }
  .panels { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .stat { flex-direction: column; gap: 8px; }
  .stat .big { font-size: 1.25rem; }
}
