:root {
  --bg: #0a0b0f;
  --bg-2: #0e1015;
  --panel: #13151c;
  --panel-2: #191c25;
  --panel-3: #222633;
  --line: #22262f;
  --line-2: #2e3341;
  --text: #f1f2f6;
  --text-2: #c9cdd8;
  --muted: #8a91a3;
  --faint: #5b6174;
  --accent: #ff4d6d;
  --accent-2: #ff9e3d;
  --grad: linear-gradient(135deg, #ff4d6d, #ff9e3d);
  --accent-soft: rgba(255, 77, 109, .13);
  --good: #34d399;
  --good-soft: rgba(52, 211, 153, .13);
  --bad: #fb7185;
  --bad-soft: rgba(251, 113, 133, .12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .13);
  --info: #7aa7ff;
  --info-soft: rgba(122, 167, 255, .13);
  --violet: #b892ff;
  --violet-soft: rgba(184, 146, 255, .13);
  --radius: 18px;
  --radius-sm: 11px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --shadow-sm: 0 4px 14px rgba(0, 0, 0, .3);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  min-height: 100vh; background-image: radial-gradient(1200px 500px at 85% -15%, rgba(255, 77, 109, .07), transparent 60%),
  radial-gradient(900px 400px at -10% 0%, rgba(122, 167, 255, .05), transparent 60%); background-attachment: fixed; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.lg { width: 22px; height: 22px; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px;
  border: 1px solid var(--line-2); background: var(--panel-2); border-radius: var(--radius-sm); cursor: pointer;
  white-space: nowrap; text-decoration: none; font-weight: 550; font-size: 14px; color: var(--text-2);
  transition: background .15s, border-color .15s, color .15s, transform .06s, box-shadow .15s; }
.btn:hover { background: var(--panel-3); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .chip:focus-visible, .seg button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(255, 77, 109, .28); }
.btn.primary:hover { filter: brightness(1.07); color: #fff; }
.btn.good { background: var(--good-soft); border-color: rgba(52, 211, 153, .32); color: var(--good); }
.btn.good:hover { background: rgba(52, 211, 153, .22); }
.btn.bad { background: var(--bad-soft); border-color: rgba(251, 113, 133, .3); color: var(--bad); }
.btn.bad:hover { background: rgba(251, 113, 133, .2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.icon { width: 38px; padding: 0; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn.sm.icon { width: 32px; padding: 0; }
.btn[disabled] { opacity: .4; pointer-events: none; }
input, select, textarea { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  height: 40px; padding: 0 12px; width: 100%; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a91a3' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
label.field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 500; }
label.check { display: flex; align-items: center; gap: 9px; cursor: pointer; color: var(--text-2); }
label.check input { width: 17px; height: 17px; accent-color: var(--accent); }
kbd { font: 600 11px/1 var(--font); background: var(--panel-3); border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 5px; padding: 3px 6px; color: var(--text-2); }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted);
  height: 32px; padding: 0 12px; border-radius: 9px; cursor: pointer; font-size: 13.5px; font-weight: 550; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--panel-3); color: var(--text); box-shadow: var(--shadow-sm); }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.auto { background: var(--info-soft); color: var(--info); }
.pill.req { background: var(--warn-soft); color: var(--warn); }
.pill.manual { background: var(--violet-soft); color: var(--violet); }
.pill.approved { background: var(--good-soft); color: var(--good); }
.pill.discarded { background: var(--bad-soft); color: var(--bad); }
.pill.dark { background: rgba(8, 9, 12, .78); color: #fff; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .08); }

/* ---------- login ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(400px, 100%); background: rgba(19, 21, 28, .85); border: 1px solid var(--line);
  border-radius: 24px; padding: 36px 30px 30px; display: grid; gap: 16px; box-shadow: var(--shadow); backdrop-filter: blur(10px); }
.login-card .logo-big { width: 60px; height: 60px; margin: 0 auto 2px; display: block; border-radius: 16px; box-shadow: 0 10px 30px rgba(255, 77, 109, .35); }
.login-card h1 { margin: 0; text-align: center; font-size: 26px; letter-spacing: -.03em; }
.login-card p.sub { margin: -10px 0 6px; text-align: center; color: var(--muted); }
.login-card .btn { height: 44px; font-size: 15px; }
.login-card .foot { text-align: center; font-size: 12.5px; color: var(--faint); display: flex; align-items: center; justify-content: center; gap: 6px; }
.error { color: var(--bad); min-height: 1.2em; margin: 0; font-size: 13.5px; }

/* ---------- top bar ---------- */
header.top { position: sticky; top: 0; z-index: 30; background: rgba(10, 11, 15, .78); backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4); border-bottom: 1px solid var(--line); }
.bar { max-width: 1480px; margin: 0 auto; padding: 10px 22px; display: flex; align-items: center; gap: 14px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -.03em; text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.nav { display: flex; gap: 4px; margin-left: 10px; }
.nav a { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 10px; text-decoration: none;
  color: var(--muted); font-weight: 600; font-size: 14px; }
.nav a:hover { color: var(--text); background: var(--panel); }
.nav a.active { color: var(--text); background: var(--panel-2); }
.spacer { flex: 1; }
.live-select { width: auto; max-width: 300px; height: 36px; background-color: var(--panel); font-size: 13.5px; }
.status { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; color: var(--muted); white-space: nowrap; max-width: 280px;
  overflow: hidden; text-overflow: ellipsis; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; }
.status.on { color: var(--text); border-color: rgba(255, 77, 109, .45); background: var(--accent-soft); }
.status.on .dot { background: var(--accent); animation: pulse 1.6s infinite; }
.status.busy .dot { background: var(--warn); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 77, 109, .55); } 70% { box-shadow: 0 0 0 8px rgba(255, 77, 109, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0); } }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--grad); color: #fff; cursor: pointer; border: 2px solid var(--panel-2); }
.menu { position: absolute; right: 22px; top: 58px; width: 240px; background: var(--panel-2); border: 1px solid var(--line-2);
  border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 40; }
.menu .who { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu .who b { display: block; }
.menu .who span { font-size: 12.5px; color: var(--muted); }
.menu button { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 9px 12px; border-radius: 9px;
  cursor: pointer; color: var(--text-2); font-weight: 500; text-align: left; }
.menu button:hover { background: var(--panel-3); color: var(--text); }
.menu button.danger { color: var(--bad); }

/* ---------- page ---------- */
main { max-width: 1480px; margin: 0 auto; padding: 26px 22px 90px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.03em; line-height: 1.15; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.tabs-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.status-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.status-tabs::-webkit-scrollbar { display: none; }
.status-tabs button { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--muted);
  padding: 10px 14px 12px; cursor: pointer; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.status-tabs button:hover { color: var(--text); }
.status-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.status-tabs .count { font-size: 12px; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  background: var(--panel-2); color: var(--muted); }
.status-tabs button.active .count { background: var(--accent-soft); color: var(--accent); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.search { position: relative; flex: 1 1 240px; max-width: 340px; }
.search input { padding-left: 38px; background-color: var(--panel); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.toolbar select { width: auto; background-color: var(--panel); }
.toolbar .grow { flex: 1; }

/* ---------- clip cards ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 18px; }
.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: border-color .2s, transform .2s, box-shadow .2s; }
.card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: var(--shadow); }
.card.fresh { border-color: rgba(255, 77, 109, .7); animation: glow 2.5s ease-out 1; }
@keyframes glow { from { box-shadow: 0 0 0 5px var(--accent-soft); } to { box-shadow: none; } }
.card.discarded .media img { filter: grayscale(.8) brightness(.6); }
.media { position: relative; aspect-ratio: 9 / 16; background: #000; cursor: pointer; overflow: hidden; }
.media img, .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .45), transparent 22%, transparent 70%, rgba(0, 0, 0, .7)); pointer-events: none; }
.media.playing::after { display: none; }
.media .play { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  background: rgba(255, 255, 255, .95); color: #0a0b0f; display: grid; place-items: center; opacity: 0; transform: scale(.9);
  transition: opacity .2s, transform .2s; z-index: 2; box-shadow: var(--shadow); }
.media .play svg { margin-left: 3px; }
.card:hover .media .play { opacity: 1; transform: scale(1); }
.media .tl, .media .tr, .media .bl, .media .br { position: absolute; z-index: 2; display: flex; gap: 6px; pointer-events: none; }
.media .tl { top: 10px; left: 10px; }
.media .tr { top: 10px; right: 10px; }
.media .bl { bottom: 10px; left: 10px; }
.media .br { bottom: 10px; right: 10px; }
.media.playing .tl, .media.playing .tr, .media.playing .bl, .media.playing .br { display: none; }
.busy { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; text-align: center; padding: 16px;
  background: rgba(8, 9, 12, .8); color: var(--warn); font-weight: 600; font-size: 13.5px; backdrop-filter: blur(3px); }
.busy .spin { width: 28px; height: 28px; margin: 0 auto 10px; border-radius: 50%; border: 3px solid rgba(251, 191, 36, .22);
  border-top-color: var(--warn); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card .body { padding: 13px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .title { font-weight: 650; font-size: 15px; line-height: 1.35; letter-spacing: -.01em; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.card .meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.card .meta a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; }
.card .meta a:hover { color: var(--info); }
.card .meta .sep { color: var(--faint); }
.card .meta .last { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .actions { display: flex; gap: 6px; margin-top: 8px; }
.card .actions .main { flex: 1; }
.empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; color: var(--faint); margin-bottom: 10px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* ---------- dialogs ---------- */
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 22px; padding: 0;
  width: min(1040px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); box-shadow: var(--shadow); }
dialog[open] { display: flex; flex-direction: column; animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }
dialog::backdrop { background: rgba(3, 4, 6, .7); backdrop-filter: blur(4px); }
dialog.md { width: min(640px, calc(100vw - 24px)); }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.dlg-head h3 { margin: 0; font-size: 16.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -.01em; }
.dlg-body { padding: 18px 20px; overflow: auto; flex: 1; }
.dlg-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.dlg-foot .note { margin-right: auto; font-size: 13px; color: var(--muted); }
.form { display: grid; gap: 14px; }
.section { padding: 18px 0; border-top: 1px solid var(--line); }
.section:first-child { border-top: 0; padding-top: 0; }
.section h4 { margin: 0 0 4px; font-size: 15px; }
.section p.desc { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.alert { padding: 12px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; font-weight: 500;
  border: 1px solid rgba(251, 191, 36, .25); margin-bottom: 16px; display: flex; gap: 10px; align-items: flex-start; }
.strength { height: 5px; border-radius: 5px; background: var(--panel-3); overflow: hidden; margin-top: -6px; }
.strength i { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.list { display: grid; gap: 8px; }
.list .item { display: flex; align-items: center; gap: 12px; padding: 11px 13px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; }
.list .item .grow { flex: 1; min-width: 0; }
.list .item .grow b { display: block; font-weight: 600; }
.list .item .grow span { font-size: 12.5px; color: var(--muted); }

/* ---------- clip editor ---------- */
.editor { display: grid; grid-template-columns: 300px 1fr; gap: 22px; }
.player { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 9 / 16; }
.player video { width: 100%; height: 100%; display: block; }
.cap-preview { position: absolute; left: 6%; right: 6%; top: 69.5%; text-align: center; pointer-events: none; }
.cap-preview span { display: inline-block; background: rgba(0, 0, 0, .82); color: #ffe500; font: 900 17px/1.15 "Arial Black", Inter, sans-serif;
  text-transform: uppercase; padding: 5px 9px; border-radius: 6px; -webkit-text-stroke: .3px #000; }
.player-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; display: flex; justify-content: space-between; gap: 8px; }
.etabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.etabs button { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: var(--muted); padding: 9px 13px 11px;
  cursor: pointer; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.etabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.cap-tools { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cap-tools input { height: 34px; flex: 1 1 120px; min-width: 0; }
.cap-tools .btn { height: 34px; }
.lines { display: grid; gap: 6px; max-height: min(460px, 52vh); overflow: auto; padding: 2px 4px 2px 2px; }
.line { display: grid; grid-template-columns: 62px 1fr 32px; gap: 6px; align-items: center; border-radius: 11px; }
.line .ts { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--info); font-variant-numeric: tabular-nums;
  background: none; border: 0; cursor: pointer; padding: 0 2px; height: 34px; font-weight: 600; }
.line .ts:hover { color: var(--text); }
.line input { height: 36px; padding: 0 11px; }
.line.changed input { border-color: rgba(251, 191, 36, .65); background: rgba(251, 191, 36, .05); }
.line.removed input { text-decoration: line-through; opacity: .45; }
.line.added input { border-color: rgba(52, 211, 153, .6); background: rgba(52, 211, 153, .05); }
.line.active input { border-color: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }
.hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.line.selected { background: var(--panel-2); box-shadow: 0 0 0 1px var(--line-2); }
.line .ts small { color: var(--faint); font-weight: 500; }
.timing { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); display: grid; gap: 8px; }
.timing-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.timing-head .muted { font-size: 12.5px; }
.tm-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tm-row .lbl { width: 92px; font-size: 13px; color: var(--muted); }
.tm-row .val { min-width: 64px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13.5px; }
.tm-row .btn.sm { height: 30px; padding: 0 9px; }
.tm-row.all { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; }
.tm-note { font-size: 12px; }
.timing.off .tm-row[data-line] { opacity: .4; pointer-events: none; }
.history-list { display: grid; gap: 8px; }
.history-list div { padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; font-size: 13.5px; color: var(--text-2); }
.history-list div span { color: var(--faint); font-size: 12.5px; }
.time-box { display: grid; gap: 12px; }
.time-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.time-row .lbl { width: 62px; color: var(--muted); font-size: 13px; }
.time-row .val { min-width: 76px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.studio-cta { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: linear-gradient(135deg, rgba(255, 77, 109, .1), rgba(255, 158, 61, .06));
  border: 1px solid rgba(255, 77, 109, .25); margin-bottom: 18px; }
.studio-cta div { flex: 1; font-size: 13.5px; color: var(--text-2); }
.studio-cta b { display: block; color: var(--text); font-size: 14.5px; }

/* ---------- studio ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.stage { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stage video { width: 100%; aspect-ratio: 16 / 9; max-height: 52vh; object-fit: contain; background: #000; display: block; }
.controls { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.controls .clock { font-variant-numeric: tabular-nums; font-weight: 650; font-size: 14px; padding: 0 6px; }
.controls .clock span { color: var(--faint); font-weight: 500; }
.timeline-wrap { padding: 12px 14px 14px; display: grid; gap: 10px; }
.lane-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.lane-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
canvas.tl { width: 100%; display: block; border-radius: 10px; background: var(--bg-2); cursor: crosshair; touch-action: none; }
canvas.tl.overview { height: 92px; }
canvas.tl.detail { height: 120px; }
.zoom-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); }
.selection-bar { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; background: var(--bg-2); }
.selection-bar .sel { font-variant-numeric: tabular-nums; font-weight: 650; }
.selection-bar .sel em { font-style: normal; color: var(--muted); font-weight: 500; }
.selection-bar input { flex: 1 1 220px; height: 38px; }
.side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  max-height: calc(100vh - 110px); position: sticky; top: 82px; }
.side .seg { margin: 12px; align-self: flex-start; }
.side .scroll { overflow: auto; padding: 0 12px 12px; flex: 1; }
.side .search-in { padding: 0 12px 10px; }
.side .search-in input { height: 36px; }
.hl { padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); cursor: pointer; margin-bottom: 8px;
  transition: border-color .15s, background .15s; }
.hl:hover { border-color: var(--line-2); background: var(--panel-2); }
.hl .top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.hl .t { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; color: var(--info); }
.hl .why { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: var(--accent-soft); color: #ff8aa0; }
.hl .why.c { background: var(--info-soft); color: var(--info); }
.hl .why.l { background: var(--warn-soft); color: var(--warn); }
.hl p { margin: 0; font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tr-line { display: grid; grid-template-columns: 58px 1fr; gap: 8px; padding: 6px 8px; border-radius: 9px; cursor: pointer; font-size: 13.5px; color: var(--text-2); }
.tr-line:hover { background: var(--panel-2); }
.tr-line .t { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 12px; padding-top: 2px; }
.tr-line.now { background: var(--info-soft); color: var(--text); }
.tr-line.now .t { color: var(--info); }
.tr-line.in-sel .t { color: var(--accent); }
.mini-clip { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); margin-bottom: 8px; cursor: pointer; }
.mini-clip:hover { border-color: var(--line-2); }
.mini-clip img { width: 40px; height: 70px; object-fit: cover; border-radius: 7px; background: #000; flex: none; }
.mini-clip .grow { flex: 1; min-width: 0; }
.mini-clip b { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-clip span { font-size: 12px; color: var(--muted); }
.edit-banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--violet-soft); color: var(--violet);
  font-weight: 600; font-size: 13.5px; border-bottom: 1px solid rgba(184, 146, 255, .25); }
.edit-banner span { flex: 1; color: var(--text-2); font-weight: 500; }
.no-vod { padding: 60px 24px; text-align: center; color: var(--muted); }
.no-vod b { display: block; color: var(--text); font-size: 17px; margin-bottom: 6px; }

/* ---------- review ---------- */
.review { position: fixed; inset: 0; z-index: 60; background: #07080b; display: grid; grid-template-columns: 1fr minmax(320px, 420px); }
.review .stage2 { display: grid; place-items: center; padding: 24px; min-height: 0; }
.review video { max-height: calc(100dvh - 48px); max-width: 100%; aspect-ratio: 9 / 16; background: #000; border-radius: 18px; box-shadow: var(--shadow); }
.review .info { border-left: 1px solid var(--line); background: var(--panel); padding: 22px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.review .progress { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; }
.review .bar-track { height: 4px; background: var(--panel-3); border-radius: 4px; overflow: hidden; }
.review .bar-fill { height: 100%; background: var(--grad); transition: width .25s; }
.review h2 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -.02em; }
.review .why { color: var(--muted); font-size: 14px; }
.review .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.review .decide { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.review .decide .btn { height: 50px; font-size: 15.5px; border-radius: 14px; }
.review .navs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.review .keys { font-size: 12.5px; color: var(--faint); display: grid; gap: 7px; margin-top: auto; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 9px;
  background: var(--panel-3); border: 1px solid var(--line-2); padding: 11px 16px; border-radius: 13px; box-shadow: var(--shadow);
  transition: opacity .2s, transform .2s; z-index: 90; font-weight: 550; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(251, 113, 133, .4); color: var(--bad); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .studio { grid-template-columns: 1fr; }
  .side { position: static; max-height: 560px; }
}
@media (max-width: 860px) {
  .editor { grid-template-columns: 1fr; }
  .player { max-width: 260px; margin: 0 auto; width: 100%; }
  .review { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .review .stage2 { padding: 10px 10px 0; }
  .review video { max-height: calc(100dvh - 300px); border-radius: 14px; }
  .review .info { border-left: 0; border-top: 1px solid var(--line); padding: 14px 16px 18px; gap: 10px; }
  .review .keys, .review .why { display: none; }
  .review h2 { font-size: 16px; }
  .nav a span { display: none; }
}
@media (max-width: 640px) {
  .bar { padding: 8px 16px; gap: 8px; height: 56px; }
  .brand span, .status { display: none; }
  .nav { margin-left: 4px; }
  .live-select { flex: 1; min-width: 0; max-width: none; }
  .spacer { display: none; }
  .menu { right: 12px; }
  main { padding: 18px 16px 90px; }
  .page-head h1 { font-size: 21px; }
  .search { max-width: none; flex-basis: 100%; }
  .toolbar .grow { display: none; }
  .toolbar #reviewBtn { flex: 1; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card .body { padding: 10px; }
  .card .title { font-size: 13.5px; }
  .card .meta .last, .card .meta .sep.l { display: none; }
  .card .actions .btn.opt { display: none; }
  .card .actions .btn { height: 36px; }
  .card .actions .main span { display: none; }
  .row2 { grid-template-columns: 1fr; }
  .dlg-body { padding: 14px 16px; }
  .line { grid-template-columns: 1fr 32px; }
  .line .ts { grid-column: 1 / -1; height: 20px; }
  .tm-row .lbl { width: 100%; }
  .controls .btn span { display: none; }
}
