/* Video Studio — demo page layout. Requires tokens.css + components.css. */
html, body { margin: 0; }
body {
  font: var(--fw-regular) var(--fs-base)/1.5 var(--font-sans);
  color: var(--ink-800);
  background:
    radial-gradient(1200px 400px at 85% -120px, rgba(232, 118, 43, .10), transparent 70%),
    var(--paper);
  min-width: 1000px;
  -webkit-font-smoothing: antialiased;
}
button, select, input { font-family: inherit; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--ink-900); color: #fff;
  border-bottom: 2px solid var(--orange-500);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .18);
}
.topbar__row {
  display: flex; align-items: center; gap: var(--sp-4);
  padding: 10px var(--sp-5); max-width: 1680px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand__mark { width: 34px; height: 34px; }
.brand__name { font: var(--fw-bold) 17px/1.1 var(--font-serif); letter-spacing: .04em; }
.brand__sub { font-size: var(--fs-xs); color: var(--ink-300); letter-spacing: .06em; }
.roundinfo { display: flex; flex-direction: column; gap: 2px; flex: none; padding-left: var(--sp-4); border-left: 1px solid var(--ink-700); }
.roundinfo__main { font-weight: var(--fw-bold); font-size: var(--fs-lg); }
.roundinfo__main b { color: var(--orange-500); }
.stage-mini { display: none; color: var(--orange-300); font-size: var(--fs-md); font-weight: var(--fw-medium); white-space: nowrap; }
@media (max-width: 1260px) { .stage-mini { display: inline; } }
.roundinfo__sub { font: var(--fs-xs) var(--font-mono); color: var(--ink-300); }
.clock { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.clock__time { font: var(--fw-bold) 22px/1 var(--font-mono); color: var(--orange-500); letter-spacing: .04em; }
.clock__label { font-size: var(--fs-xs); color: var(--ink-300); margin-top: 3px; }
.stepper { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; justify-content: center; overflow: hidden; padding: 4px 0; }
.stepper .stage-node { color: var(--ink-400); }
.stepper .stage-node--done { color: var(--ink-400); }
.stepper .stage-node--done .stage-node__dot { background: var(--ink-700); border-color: var(--ink-700); color: var(--ink-300); }
.stepper .stage-node--active { color: #fff; }
.stepper__sep { width: 14px; height: 1px; background: var(--ink-700); flex: none; }
.controls { display: flex; align-items: center; gap: 6px; flex: none; }
.topbar .btn { background: var(--ink-800); border-color: var(--ink-700); color: #fff; }
.topbar .btn:hover { background: var(--ink-700); }
.topbar .btn--primary { background: var(--orange-500); border-color: var(--orange-500); }
.topbar .btn--primary:hover { background: var(--orange-600); }
.topbar .seg-ctrl { background: var(--ink-800); border-color: var(--ink-700); }
.topbar .seg-ctrl button { color: var(--ink-300); }
.topbar .seg-ctrl button + button { border-left-color: var(--ink-700); }
.topbar .seg-ctrl button[aria-pressed="true"] { background: var(--orange-500); color: #fff; }

/* ---------- layout ---------- */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5) var(--sp-8); max-width: 1680px; margin: 0 auto; align-items: start;
}
.main-col { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.side-col { display: flex; flex-direction: column; gap: var(--sp-4); position: sticky; top: 76px; max-height: calc(100vh - 92px); min-width: 0; }
.side-col .panel--log { flex: 1; min-height: 240px; display: flex; flex-direction: column; }

@media (max-width: 1500px) {
  .stepper .stage-node__label { display: none; }
  .stepper .stage-node--active .stage-node__label { display: inline; }
  .stepper__sep { width: 8px; }
}
@media (max-width: 1360px) {
  .layout { grid-template-columns: minmax(0, 1fr) 330px; }
  .topbar__row { gap: var(--sp-3); padding: 10px var(--sp-4); }
  .brand__sub { display: none; }
}
@media (max-width: 1260px) {
  /* not enough room next to the controls; the stage is still shown in 阶段流水线 */
  .stepper { display: none; }
  .controls { margin-left: auto; }
}
@media (max-width: 1180px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side-col { position: static; max-height: none; display: grid; grid-template-columns: 1fr 1fr; }
  .side-col .panel--log { grid-column: 1 / -1; max-height: 520px; }
  .brand__sub { display: none; }
}

/* ---------- summary ---------- */
.summary {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--ink-900) 0%, var(--ink-800) 60%, #3a2414 100%);
  color: #fff; border-radius: var(--r-lg); padding: var(--sp-5) var(--sp-6);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-5);
  box-shadow: var(--shadow-2); border: 1px solid #3a3530;
  animation: vs-rise .5s var(--ease);
}
.summary::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 118, 43, .35), transparent 70%); pointer-events: none;
}
.summary__eyebrow { font: var(--fw-medium) var(--fs-xs) var(--font-mono); color: var(--orange-300); letter-spacing: .12em; }
.summary__title { font: var(--fw-bold) var(--fs-2xl)/1.25 var(--font-serif); margin: 6px 0 4px; }
.summary__hook { color: var(--ink-300); margin: 0 0 var(--sp-3); }
.summary__stats { display: flex; gap: var(--sp-5); flex-wrap: wrap; margin-bottom: var(--sp-4); }
.summary__stat b { display: block; font: var(--fw-bold) var(--fs-xl) var(--font-mono); color: var(--orange-500); }
.summary__stat span { font-size: var(--fs-xs); color: var(--ink-300); }
.credits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; }
.credit { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--r-md); background: rgba(255, 255, 255, .05); min-width: 0; }
.credit__role { font-size: var(--fs-xs); color: var(--ink-300); }
.credit__name { font-weight: var(--fw-bold); }
.credit .engine-badge { margin-left: auto; background: rgba(255, 255, 255, .1); }
.summary__side { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-3); position: relative; z-index: 1; }
@keyframes vs-rise { from { opacity: 0; transform: translateY(8px); } }

/* ---------- topic board ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); padding-top: 6px; }
.votebox { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--sp-5); margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: var(--line); }
.votebox h4, .subhead { margin: 0 0 6px; font-size: var(--fs-sm); color: var(--ink-500); font-weight: var(--fw-medium); letter-spacing: .04em; }
.ballots { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 12px; font-size: var(--fs-md); }
.ballot { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ballot > .avatar, .ballot > .fav-badge { flex: none; }
.ballot__name { white-space: nowrap; flex: none; font-weight: var(--fw-bold); }
.ballot__arrow { color: var(--ink-300); flex: none; }
.ballot__target { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-700); }
.ballot--pending .ballot__target { color: var(--ink-300); }
.verdict { margin-top: 8px; font-size: var(--fs-md); color: var(--ink-500); }
.verdict b { color: var(--orange-600); }

/* ---------- assignment ---------- */
.assign-table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.assign-table th { text-align: left; font-size: var(--fs-xs); color: var(--ink-400); font-weight: var(--fw-medium); padding: 0 8px 6px; letter-spacing: .04em; }
.assign-table td { padding: 8px; border-top: var(--line); vertical-align: middle; }
.assign-table tr.is-manual td { background: color-mix(in srgb, var(--orange-100) 45%, white); }
.assign-table tr.is-fixed td { background: var(--gold-100); }
.assign-desc { color: var(--ink-500); font-size: var(--fs-sm); line-height: 1.45; max-width: 300px; }
.assign-mode { font-size: var(--fs-xs); font-weight: var(--fw-bold); padding: 3px 7px; border-radius: var(--r-sm); white-space: nowrap; }
.assign-mode--random { color: var(--ink-500); background: var(--ink-100); }
.assign-mode--manual { color: #fff; background: var(--orange-500); }
.assign-mode--fixed { color: var(--gold-100); background: var(--ink-900); }
.assign-bar { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: var(--line); }
.assign-seed { font: var(--fs-xs) var(--font-mono); color: var(--ink-400); margin-left: auto; }
.banner {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: 10px 12px; border-radius: var(--r-md); margin-bottom: var(--sp-3); font-size: var(--fs-md);
}
.banner--lock { background: var(--ink-900); color: var(--ink-100); }
.banner--lock b { color: var(--orange-500); }
.banner--gate { background: var(--orange-100); color: var(--orange-600); border: 1px solid var(--orange-300); animation: vs-rise .3s var(--ease); }
.banner--gate .btn { margin-left: auto; }
.banner--info { background: var(--surface-2); color: var(--ink-500); }

/* ---------- pipeline ---------- */
.stages { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: var(--sp-4); }
.stage-card {
  position: relative; border-radius: var(--r-md); padding: 8px 10px 9px; background: var(--surface-2);
  border: 1px solid var(--ink-100); min-width: 0;
}
.stage-card__top { display: flex; align-items: center; gap: 6px; justify-content: space-between; }
.stage-card__no { font: var(--fw-bold) var(--fs-xs) var(--font-mono); color: var(--ink-400); }
.stage-card__name { font-weight: var(--fw-bold); margin: 4px 0 2px; font-size: var(--fs-md); }
.stage-card__desc { font-size: var(--fs-xs); color: var(--ink-500); line-height: 1.4; }
.stage-card--active { background: #fff; border-color: var(--orange-500); box-shadow: var(--shadow-glow); }
.stage-card--done { background: var(--surface); }
.stage-card--done .stage-card__name { color: var(--ink-500); }
.stage-card:not(:last-child)::after {
  content: "›"; position: absolute; right: -8px; top: 50%; transform: translateY(-50%);
  color: var(--ink-300); font-size: 16px; z-index: 1;
}
.dag-wrap { overflow-x: auto; padding-bottom: 4px; }
.dag { position: relative; min-width: 860px; height: 400px; }
.dag svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.dag path { fill: none; stroke: var(--ink-200); stroke-width: 1.5; }
.dag path.is-done { stroke: var(--orange-300); }
.dag path.is-live { stroke: var(--orange-500); stroke-dasharray: 5 4; animation: vs-dash .8s linear infinite; }
@keyframes vs-dash { to { stroke-dashoffset: -9; } }
.dag-legend { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; font-size: var(--fs-xs); color: var(--ink-500); margin-top: var(--sp-2); }

/* ---------- segments ---------- */
.seg-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); }
.seg-empty { padding: var(--sp-5); text-align: center; color: var(--ink-400); border: 1px dashed var(--ink-200); border-radius: var(--r-md); font-size: var(--fs-md); }
.seg-stats { display: flex; gap: var(--sp-2); flex-wrap: wrap; }

/* ---------- swimlanes ---------- */
.lanes { position: relative; font-size: var(--fs-sm); }
.lanes__axis, .lane { display: grid; grid-template-columns: 116px minmax(0, 1fr); }
.lanes__axis { height: 22px; color: var(--ink-400); font: var(--fs-xs) var(--font-mono); }
.lanes__ticks { position: relative; border-bottom: var(--line); }
.lanes__ticks span { position: absolute; top: 3px; transform: translateX(-50%); white-space: nowrap; }
.lane { height: 32px; border-bottom: 1px dashed var(--ink-100); }
.lane__label { display: flex; align-items: center; gap: 6px; padding-right: 8px; min-width: 0; overflow: hidden; white-space: nowrap; }
.lane__label .who__name { font-size: var(--fs-sm); }
.lane__track { position: relative; min-width: 0; }
.lane--slot .lane__label { color: var(--ink-500); font-family: var(--font-mono); font-size: var(--fs-xs); }
.lane--slot { background: repeating-linear-gradient(90deg, transparent 0 39px, rgba(0,0,0,.015) 39px 40px); }
.lane--sep { border-top: 2px solid var(--ink-100); }
.lanes__now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--orange-500); pointer-events: none; z-index: 2; }
.lanes__now::before { content: attr(data-clock); position: absolute; top: -2px; left: 4px; font: var(--fw-bold) var(--fs-xs) var(--font-mono); color: var(--orange-600); background: var(--paper); padding: 0 3px; border-radius: 3px; }
.lanes__forecast { position: absolute; top: 22px; bottom: 0; border-left: 1px dashed var(--ink-300); pointer-events: none; }
.lanes__forecast::before { content: "预计完成 " attr(data-clock); position: absolute; bottom: -18px; right: 4px; white-space: nowrap; font: var(--fs-xs) var(--font-mono); color: var(--ink-400); }
.lanes-legend { display: flex; gap: var(--sp-3); flex-wrap: wrap; font-size: var(--fs-xs); color: var(--ink-500); margin-top: 26px; align-items: center; }
.legend-sw { display: inline-block; width: 18px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }

/* ---------- members ---------- */
.members { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.member-card {
  border: 1px solid var(--ink-100); border-radius: var(--r-lg); padding: var(--sp-3);
  display: flex; flex-direction: column; gap: 10px; background: var(--surface); min-width: 0;
  border-top: 3px solid var(--mc, var(--ink-200));
}
.member-card--busy { box-shadow: 0 0 0 1px color-mix(in srgb, var(--mc) 30%, transparent), var(--shadow-1); }
.member-card__head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.member-card__id { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.member-card__name { font-weight: var(--fw-bold); font-size: var(--fs-lg); display: flex; gap: 6px; align-items: center; }
.member-card__roles { display: flex; gap: 4px; flex-wrap: wrap; }
.member-card__sect { display: flex; flex-direction: column; gap: 5px; }
.member-card__label { font-size: var(--fs-xs); color: var(--ink-400); letter-spacing: .06em; }
.member-card__now { font-weight: var(--fw-medium); color: var(--ink-900); display: flex; justify-content: space-between; gap: 6px; }
.member-card__now .mono { color: var(--ink-400); font-size: var(--fs-xs); }
.member-card__idle { color: var(--ink-500); font-size: var(--fs-md); }
.donelist { display: flex; flex-wrap: wrap; gap: 4px; }
.donelist span { font-size: var(--fs-xs); padding: 2px 7px; border-radius: var(--r-pill); background: var(--st-done-bg); color: var(--st-done); }
.donelist .muted { background: none; padding: 0; color: var(--ink-400); }
.member-card__next { font-size: var(--fs-md); color: var(--ink-700); }
.member-card__next small { display: block; color: var(--ink-400); font-size: var(--fs-xs); }

/* ---------- sidebar ---------- */
.par-list, .next-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.par-item { display: grid; grid-template-columns: 20px minmax(0, 1fr) 56px; gap: 8px; align-items: center; font-size: var(--fs-md); }
.par-item__task { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.par-item__task b { font-weight: var(--fw-bold); }
.par-item--free .par-item__task { color: var(--ink-400); }
.par-item--idle .par-item__task { color: var(--ink-500); }
.par-head { margin: var(--sp-3) 0 6px; font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--ink-400); letter-spacing: .06em; display: flex; gap: 6px; }
.par-chain {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px;
  padding: 8px; border-radius: var(--r-md); background: var(--surface-2); border: 1px dashed var(--ink-200);
  font-size: var(--fs-sm);
}
.par-unit { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 2px; border-radius: var(--r-pill); background: var(--surface); box-shadow: inset 0 0 0 1px var(--ink-100); white-space: nowrap; }
.par-unit b { font-weight: var(--fw-bold); }
.par-chain__sep { font-style: normal; color: var(--orange-500); font-weight: var(--fw-bold); padding: 0 2px; }
.par-done { margin-top: 6px; font-size: var(--fs-xs); color: var(--ink-400); }
/* per-segment packaging strip (sidebar) */
.seg-strip { display: flex; flex-wrap: wrap; gap: 4px; }
.seg-strip__cell { min-width: 24px; height: 24px; padding: 0 4px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font: var(--fw-bold) var(--fs-xs) var(--font-mono); color: var(--st-queued); background: var(--st-queued-bg); }
.seg-strip__cell--packing { color: var(--orange-600); background: var(--st-active-bg); box-shadow: inset 0 0 0 1px var(--orange-300); }
.seg-strip__cell--done { color: var(--st-done); background: var(--st-done-bg); }
.seg-strip__cell--redo { color: var(--st-redo); background: var(--st-redo-bg); }
.unset-tag { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); font-size: var(--fs-sm); color: var(--orange-600); background: var(--orange-100); box-shadow: inset 0 0 0 1px var(--orange-300); }
.assign-table tr.is-unset td { background: color-mix(in srgb, var(--orange-100) 55%, var(--gold-100)); }
.summary__stat--folder b { font-size: var(--fs-md); padding-top: 6px; color: var(--gold-500); }

/* package checklist + folder tree (素材整理) */
.pack-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--sp-4); align-items: start; }
.pack-head { margin: 0 0 var(--sp-2); font-size: var(--fs-sm); color: var(--ink-500); font-weight: var(--fw-medium); letter-spacing: .04em; }
.pack-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow-y: auto; }
.pack-item { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 5px 8px; border-radius: var(--r-sm, 6px); background: var(--surface-2); font-size: var(--fs-sm); }
.pack-item__ico { font-weight: var(--fw-bold); text-align: center; color: var(--ink-400); }
.pack-item__main { min-width: 0; display: flex; flex-direction: column; }
.pack-item__main code { font: var(--fs-sm) var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pack-item__main small { color: var(--ink-400); font-size: var(--fs-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pack-item__st { font-size: var(--fs-xs); color: var(--ink-400); white-space: nowrap; }
.pack-item--ready, .pack-item--done { background: var(--st-done-bg); }
.pack-item--ready .pack-item__ico, .pack-item--done .pack-item__ico, .pack-item--ready .pack-item__st, .pack-item--done .pack-item__st { color: var(--st-done); }
.pack-item--redo { background: var(--st-redo-bg); }
.pack-item--redo .pack-item__ico, .pack-item--redo .pack-item__st { color: var(--st-redo); }
.pack-item--packing { background: var(--st-active-bg); }
.pack-item--packing .pack-item__ico, .pack-item--packing .pack-item__st { color: var(--orange-600); }
.pack-tree { font: var(--fs-sm)/1.65 var(--font-mono); background: var(--ink-900); color: var(--ink-200); border-radius: var(--r-md); padding: var(--sp-3) var(--sp-4); overflow-x: auto; }
.pack-tree__row { white-space: pre; }
.pack-tree__root { color: var(--gold-500); font-weight: var(--fw-bold); }
.pack-tree__dir { color: var(--ink-200); }
.pack-tree__branch { color: var(--ink-500); }
.pack-tree__mark { display: inline-block; width: 1.2em; text-align: center; }
.pack-tree__done .pack-tree__mark { color: #6FD3A1; }
.pack-tree__queued { color: var(--ink-400); }
.pack-tree__packing { color: var(--orange-300); }
.pack-tree__redo { color: #F29A94; }
.next-item { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; font-size: var(--fs-md); align-items: start; }
.next-item small { display: block; color: var(--ink-400); font-size: var(--fs-xs); }
.log { overflow-y: auto; flex: 1; min-height: 0; margin-right: -8px; padding-right: 8px; }
.empty { color: var(--ink-400); font-size: var(--fs-md); }
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-md); }
.history li { display: flex; gap: 8px; align-items: center; }
.history .mono { color: var(--ink-400); font-size: var(--fs-xs); }

/* ---------- settings drawer ---------- */
.drawer-mask { position: fixed; inset: 0; background: rgba(22, 21, 20, .35); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 92vw; z-index: 41;
  background: var(--surface); box-shadow: -10px 0 30px rgba(0, 0, 0, .15);
  transform: translateX(105%); transition: transform .25s var(--ease);
  display: flex; flex-direction: column;
}
.is-settings-open .drawer { transform: none; }
.is-settings-open .drawer-mask { opacity: 1; pointer-events: auto; }
.drawer__head { display: flex; align-items: center; padding: var(--sp-4) var(--sp-5); border-bottom: var(--line); }
.drawer__head h2 { margin: 0; font-size: var(--fs-lg); }
.drawer__head .btn { margin-left: auto; }
.drawer__body { padding: var(--sp-4) var(--sp-5); overflow-y: auto; display: flex; flex-direction: column; gap: var(--sp-5); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-weight: var(--fw-bold); font-size: var(--fs-md); display: flex; align-items: center; gap: 6px; }
.field__help { font-size: var(--fs-sm); color: var(--ink-500); line-height: 1.5; }
.field input[type="text"] { height: 30px; border: 1px solid var(--ink-200); border-radius: var(--r-sm); padding: 0 8px; font: var(--fs-sm) var(--font-mono); width: 100%; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 50;
  background: var(--ink-900); color: #fff; padding: 10px 16px; border-radius: var(--r-md);
  box-shadow: var(--shadow-2); font-size: var(--fs-md); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s var(--ease); border-left: 3px solid var(--orange-500);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1180px) {
  .board, .members { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pack-grid { grid-template-columns: minmax(0, 1fr); }
  .credits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-card__desc { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- live mode (index.html?live, js/live.js) ---------- */
.live { max-width: 1100px; margin: 0 auto; padding: var(--sp-4) var(--sp-5) var(--sp-8); display: flex; flex-direction: column; gap: var(--sp-4); }
.live[hidden], .live [hidden] { display: none !important; }
.is-live .layout, .is-live .stepper, .is-live .controls, .is-live .clock { display: none; }
.live-login { max-width: 480px; }
.live-login input { width: 100%; box-sizing: border-box; }
.live-bar { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.live-clock { font: var(--fw-bold) var(--fs-lg) var(--font-mono); color: var(--orange-600); }
.live-tools { margin-left: auto; display: flex; align-items: center; gap: var(--sp-3); }
.live-msg { color: var(--st-redo); font-size: var(--fs-md); }
.live-msg:empty { display: none; }
.live-body { display: flex; flex-direction: column; gap: var(--sp-4); }
.live-actions { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.live-inline { display: inline-flex; align-items: center; gap: var(--sp-2); margin-left: var(--sp-3); }
.live-hint { color: var(--ink-500); font-size: var(--fs-sm); }
.live-banner { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-2); border-radius: 8px; border: 1px solid var(--ink-200); background: var(--surface-2); }
.live-banner__main { flex: 1; min-width: 0; }
.live-banner__title { font-weight: var(--fw-bold); font-size: var(--fs-lg); }
.live-banner--review { background: var(--orange-100); border: 2px solid var(--orange-500); }
.live-banner--paused { background: var(--gold-100); border-color: var(--gold-500); }
.live-banner--notice { background: var(--st-queued-bg); border-color: var(--st-queued); }
.live-files { margin: 4px 0; padding-left: 18px; font-size: var(--fs-sm); }
.live-note { color: var(--ink-500); font-size: var(--fs-sm); }
.live-rows { display: flex; flex-direction: column; gap: 6px; }
.live-row { display: flex; align-items: center; gap: var(--sp-3); }
.live-row__k { width: 110px; color: var(--ink-500); }
.live-task, .live-report { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; padding: 6px 0; border-top: 1px solid var(--ink-100); }
.live-task__main { width: 220px; }
.live-task__meta { display: flex; align-items: center; gap: var(--sp-2); flex: 1; flex-wrap: wrap; }
.live-task__acts { display: flex; align-items: center; gap: var(--sp-2); }
.live-report__main { flex: 1; min-width: 0; }
.live-pill { font-size: var(--fs-xs); padding: 3px 8px; border-radius: 999px; color: var(--st-pending); background: var(--st-pending-bg); }
.live-pill--claimed, .live-pill--waiting, .live-pill--ready { color: var(--orange-600); background: var(--st-active-bg); }
.live-pill--done { color: var(--st-done); background: var(--st-done-bg); }
.live-pill--on_hold, .live-pill--stalled { color: var(--st-redo); background: var(--st-redo-bg); }
.live-pill--awaiting_owner { color: var(--gold-500); background: var(--gold-100); }
.live-pre { margin: 0; padding: var(--sp-3); max-height: 420px; overflow: auto; white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--ink-200); border-radius: 8px; font: var(--fs-sm) var(--font-mono); }
.live-img { display: block; max-width: 100%; max-height: 520px; margin-top: var(--sp-2); border: 1px solid var(--ink-200); border-radius: 8px; }
.live-num { width: 72px; }

/* ---------- live mode v2.4: prompts, proposers, review stages, task files, timers, outbox, director log ---------- */
.live-small { font-size: var(--fs-xs); }
.live-grid { display: grid; grid-template-columns: 220px 1fr; gap: var(--sp-4); align-items: start; }
.live-list { display: flex; flex-direction: column; gap: 4px; }
.live-list .btn { justify-content: space-between; text-align: left; height: auto; min-height: 26px; padding: 4px 9px; }
.live-list .btn.is-on { border-color: var(--orange-500); background: var(--orange-100); }
.live-tag { font-size: var(--fs-xs); padding: 1px 6px; border-radius: 999px; background: var(--gold-100); color: var(--gold-500); margin-left: 4px; }
.live-ta { width: 100%; box-sizing: border-box; min-height: 120px; font: var(--fs-sm) var(--font-mono); height: auto; padding: var(--sp-2); }
.live-edit { min-height: 320px; }
.live-wide { width: 100%; box-sizing: border-box; }
.live-hist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); }
.live-hist li { border-top: 1px solid var(--ink-100); padding-top: 6px; }
.live-hist pre { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; font: var(--fs-sm) var(--font-mono); }
.live-chk { display: inline-flex; align-items: center; gap: 4px; margin-right: var(--sp-3); font-size: var(--fs-md); }
.live-stage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px var(--sp-4); }
.live-timer { font: var(--fw-bold) var(--fs-md) var(--font-mono); color: var(--ink-700); }
.live-timer.is-warn { color: var(--orange-600); }
.live-timer.is-late { color: var(--st-redo); }
.live-pill--rework { color: var(--orange-600); background: var(--orange-100); border: 1px solid var(--orange-300); }
.live-pill--info { color: var(--st-queued); background: var(--st-queued-bg); }
.live-pill--late { color: var(--st-redo); background: var(--st-redo-bg); }
.live-table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
.live-table th, .live-table td { text-align: left; padding: 4px 8px; border-top: 1px solid var(--ink-100); vertical-align: top; }
.live-table th { color: var(--ink-500); font-weight: var(--fw-medium); }
.live-table td.wrap { word-break: break-word; max-width: 420px; }
.live-gen { flex-basis: 100%; padding: 4px 0 4px var(--sp-4); }
.live-diff { font: var(--fs-sm) var(--font-mono); border: 1px solid var(--ink-200); border-radius: 8px; overflow: auto; max-height: 420px; }
.live-diff div { white-space: pre-wrap; word-break: break-word; padding: 0 8px; }
.live-diff .is-add { background: var(--st-done-bg); color: var(--st-done); }
.live-diff .is-del { background: var(--st-redo-bg); color: var(--st-redo); }
.live-topichist { color: var(--ink-400); font-size: var(--fs-sm); margin: 4px 0 0; padding-left: 18px; }
.live-sub { margin-top: var(--sp-3); }
