:root { --page:#07131f; --surface:#0d1d2c; --surface-2:#112639; --surface-3:#183248; --line:#27445a; --ink:#eff7fc; --muted:#9eb3c3; --brand:#56d5c0; --brand-ink:#06211c; --danger:#ff9fa9; --success:#58d4a6; --warn:#f2c774; }
* { box-sizing:border-box; }
html { background:var(--page); min-width:320px; }
body { margin:0; background:radial-gradient(circle at 42% 0,#14364a 0,transparent 35rem),var(--page); color:var(--ink); font:16px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; }
button,input,select { font:inherit; } button { color:inherit; }
[hidden] { display:none !important; }

.app-shell { min-height:100vh; }
.topbar { align-items:center; background:rgba(6,18,29,.84); border-bottom:1px solid var(--line); display:flex; justify-content:space-between; gap:14px; min-height:74px; padding:12px 24px; }
.brand { align-items:center; display:flex; gap:11px; }
.brand-icon { align-items:center; background:var(--brand); border-radius:10px; color:var(--brand-ink); display:grid; font-size:28px; font-weight:700; height:34px; line-height:1; place-items:center; width:34px; }
.brand p { color:var(--brand); font:700 11px/1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.14em; margin:0 0 4px; }
.brand h1 { font-size:20px; line-height:1.1; margin:0; }
.topbar-right { align-items:center; display:flex; gap:18px; }
.connection { align-items:center; color:var(--muted); display:flex; font-size:13px; gap:8px; }
.connection i { background:#596e7e; border-radius:999px; height:8px; width:8px; }
.connection.ready i { background:var(--success); box-shadow:0 0 15px var(--success); }
.connection.busy i { background:var(--warn); box-shadow:0 0 15px var(--warn); }
.identity { color:var(--muted); font-size:12px; }
.identity strong { color:var(--ink); font:600 13px ui-monospace,SFMono-Regular,Menlo,monospace; }

.workspace { display:grid; grid-template-columns:238px minmax(0,1fr) 350px; min-height:calc(100vh - 74px); }
.slot-panel,.result-panel { background:rgba(7,19,31,.55); padding:21px 16px; }
.slot-panel { border-right:1px solid var(--line); }
.result-panel { border-left:1px solid var(--line); }
.panel-heading { align-items:center; display:flex; justify-content:space-between; margin:0 7px 12px; }
.panel-heading span { color:var(--muted); font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; }
.panel-heading strong { font:600 13px ui-monospace,SFMono-Regular,Menlo,monospace; }
.panel-heading small { color:var(--muted); font-size:11px; }

.slot-list { display:grid; gap:4px; }
.slot-button { align-items:center; background:transparent; border:1px solid transparent; border-radius:9px; cursor:pointer; display:flex; gap:10px; padding:8px; text-align:left; width:100%; }
.slot-button:hover { background:var(--surface); }
.slot-button.active { background:#123347; border-color:#28708a; }
.slot-number { align-items:center; background:#193246; border-radius:50%; color:#a8c2d0; display:flex; flex:0 0 auto; font:600 10px ui-monospace,SFMono-Regular,Menlo,monospace; height:27px; justify-content:center; width:27px; }
.slot-button.active .slot-number { background:var(--brand); color:var(--brand-ink); }
.slot-button strong { display:block; font-size:13px; font-weight:650; line-height:1.2; }
.slot-button small { color:var(--muted); display:block; font-size:11px; line-height:1.3; margin-top:2px; }

.main-panel { min-width:0; padding:24px; }
.capture-heading { align-items:start; display:flex; gap:20px; justify-content:space-between; margin-bottom:14px; }
.capture-heading p { color:var(--brand); font:700 11px/1.1 ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.06em; margin:0 0 6px; }
.capture-heading h2 { font-size:24px; letter-spacing:-.025em; line-height:1.2; margin:0; }
.duration-control { display:grid; gap:7px; min-width:195px; }
.duration-control span { color:var(--muted); display:flex; font-size:12px; justify-content:space-between; }
.duration-control strong { color:var(--ink); font:600 12px ui-monospace,SFMono-Regular,Menlo,monospace; }
.duration-control input { accent-color:var(--brand); cursor:pointer; width:100%; }

.tutorial-block { background:var(--surface); border:1px solid var(--line); border-radius:12px; margin-bottom:16px; overflow:hidden; }
.tutorial-block video { background:#050d14; display:block; max-height:270px; object-fit:contain; width:100%; }
.tutorial-caption { align-items:baseline; border-top:1px solid var(--line); display:flex; gap:10px; justify-content:space-between; padding:8px 12px; }
.tutorial-caption span { font-size:12px; font-weight:600; }
.tutorial-caption small { color:var(--muted); font-size:11px; }

.capture-frame { align-items:center; aspect-ratio:16/9; background:linear-gradient(135deg,#09141e,#111f2a 55%,#071118); border:1px solid #2b4a60; border-radius:15px; display:flex; justify-content:center; overflow:hidden; position:relative; }
.capture-frame video { background:#071118; height:100%; object-fit:cover; transition:transform .18s ease; width:100%; }
.capture-frame #review-video { object-fit:contain; }
.rotate-control { align-items:center; backdrop-filter:blur(6px); background:#06131dc9; border:1px solid var(--line); border-radius:9px; display:flex; gap:2px; padding:3px; position:absolute; right:10px; top:10px; z-index:3; }
.rotate-control button { background:transparent; border:0; border-radius:6px; color:var(--ink); cursor:pointer; font:600 14px/1 ui-monospace,SFMono-Regular,Menlo,monospace; height:30px; min-width:30px; padding:0 6px; }
.rotate-control button:hover { background:var(--surface-2); }
.rotate-control #rotate-value { color:var(--muted); font-size:11px; min-width:38px; }
.rotate-control #rotate-value.active { color:var(--brand); }
.camera-empty { align-items:center; color:var(--muted); display:grid; justify-items:center; position:relative; text-align:center; }
.camera-empty span { align-items:center; border:1px solid #406276; border-radius:50%; color:var(--brand); display:grid; font-size:26px; height:50px; margin-bottom:10px; place-items:center; width:50px; }
.camera-empty strong { color:var(--ink); font-size:15px; }
.camera-empty small { font-size:13px; margin-top:3px; }
.countdown-overlay { align-items:center; background:#06131dc9; display:grid; inset:0; justify-content:center; position:absolute; text-align:center; z-index:2; }
.countdown-overlay span { color:var(--brand); font:700 12px ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.12em; }
.countdown-overlay strong { color:#fff; font-size:88px; line-height:1; }
.countdown-overlay small { color:#c4d6e0; font-size:13px; }
.recording-overlay { background:transparent; inset:auto auto 18px 18px; position:absolute; z-index:2; }
.recording-overlay span { color:var(--danger); font:700 12px ui-monospace,SFMono-Regular,Menlo,monospace; letter-spacing:.1em; }
.recording-overlay span i { background:var(--danger); border-radius:50%; display:inline-block; height:9px; margin-right:5px; width:9px; }
.recording-overlay strong { display:block; font:600 22px ui-monospace,SFMono-Regular,Menlo,monospace; }

.status-message { align-items:center; color:var(--muted); display:flex; font-size:13px; gap:8px; margin:14px 0; }
.status-message span { color:var(--brand); font-size:19px; }
.status-message.error { color:var(--danger); }
.status-message.error span { color:var(--danger); }
.actions { display:flex; flex-wrap:wrap; gap:10px; justify-content:center; }
.button { align-items:center; border:1px solid transparent; border-radius:9px; cursor:pointer; display:inline-flex; font-size:14px; font-weight:650; justify-content:center; min-height:42px; padding:0 17px; }
.button:disabled { cursor:not-allowed; opacity:.5; }
.button-primary { background:var(--brand); color:var(--brand-ink); min-width:170px; }
.button-primary:hover:not(:disabled) { background:#78e6d3; }
.button-secondary { background:var(--surface); border-color:var(--line); color:var(--ink); }
.button-secondary:hover:not(:disabled) { background:var(--surface-2); border-color:#537187; }
.camera-select { background:var(--surface); border:1px solid var(--line); border-radius:9px; color:var(--ink); cursor:pointer; font-size:13px; max-width:230px; min-height:42px; padding:0 10px; }
.camera-select:focus { border-color:var(--brand); box-shadow:0 0 0 2px #56d5c01c; outline:none; }
.drop-zone { border:1px dashed #31556b; border-radius:10px; color:var(--muted); font-size:12px; margin-top:14px; padding:12px; text-align:center; }
.drop-zone.over { border-color:var(--brand); color:var(--brand); }

.result-empty { align-items:center; color:var(--muted); display:grid; gap:10px; justify-items:center; padding:28px 16px; text-align:center; }
.result-empty span { color:var(--brand); font-size:26px; }
.result-empty p { font-size:12px; margin:0; }

/* 模式切换 */
.mode-tabs { background:var(--surface); border:1px solid var(--line); border-radius:10px; display:inline-flex; gap:4px; margin-bottom:16px; padding:4px; }
.mode-tab { background:transparent; border:0; border-radius:7px; color:var(--muted); cursor:pointer; font-size:13px; font-weight:650; min-height:34px; padding:0 16px; }
.mode-tab:hover { color:var(--ink); }
.mode-tab.active { background:var(--brand); color:var(--brand-ink); }
.slot-panel.inactive { opacity:.5; }

/* 整段流程提示 */
.flow-hint { background:var(--surface); border:1px solid var(--line); border-radius:12px; margin-bottom:16px; padding:14px 16px; }
.flow-hint strong { font-size:13px; }
.flow-hint p { color:var(--muted); font-size:12px; margin:6px 0 10px; }
.flow-steps { display:flex; flex-wrap:wrap; gap:6px; }
.flow-step { align-items:center; background:var(--surface-2); border:1px solid var(--line); border-radius:999px; display:inline-flex; font-size:11px; gap:6px; padding:4px 10px 4px 5px; }
.flow-step b { align-items:center; background:var(--brand); border-radius:999px; color:var(--brand-ink); display:inline-flex; font-size:10px; height:17px; justify-content:center; width:17px; }

/* 步骤颜色（Step_1..Step_7） */
.s1 { background:#56d5c0; color:#06211c; }
.s2 { background:#6fb3ff; color:#04182c; }
.s3 { background:#b18cff; color:#170a2c; }
.s4 { background:#ffc46b; color:#2c1c04; }
.s5 { background:#ff9f7a; color:#2c1006; }
.s6 { background:#f2799b; color:#2c0713; }
.s7 { background:#9fd66b; color:#12260a; }

/* 打分板（整段流程） */
.score-board { display:grid; gap:10px; }
.score-card { background:var(--surface); border:1px solid var(--line); border-radius:10px; padding:11px; }
.score-head { align-items:baseline; display:flex; gap:8px; justify-content:space-between; margin-bottom:9px; }
.score-head strong { font-size:12px; }
.score-total { color:var(--brand); font:700 22px/1 ui-monospace,SFMono-Regular,Menlo,monospace; }
.score-total i { color:var(--muted); font-size:11px; font-style:normal; }
.score-steps { display:grid; gap:5px; list-style:none; margin:0 0 9px; padding:0; }
.score-steps li { align-items:center; display:grid; gap:7px; grid-template-columns:30px minmax(0,1fr) 44px 34px; opacity:.5; }
.score-steps li.ok { opacity:1; }
.score-track { background:#162f42; border-radius:999px; height:7px; overflow:hidden; }
.score-fill { height:100%; }
.score-count { color:var(--muted); font:600 10px ui-monospace,SFMono-Regular,Menlo,monospace; text-align:right; }
.score-value { font:600 11px ui-monospace,SFMono-Regular,Menlo,monospace; text-align:right; }
.score-note { color:var(--muted); display:block; font-size:10px; line-height:1.45; }

/* 时间轴 */
.timeline { padding:10px 11px 4px; }
.lane { align-items:center; display:grid; gap:8px; grid-template-columns:56px minmax(0,1fr); margin-bottom:6px; }
.lane-name { color:var(--muted); font-size:10px; line-height:1.25; text-align:right; }
.lane-name small { font-size:9px; }
.lane-track { background:#162f42; border-radius:5px; height:20px; overflow:hidden; position:relative; }
.lane-cell { border-radius:2px; height:100%; opacity:.55; position:absolute; top:0; }
.lane-block { align-items:center; border-radius:4px; color:#06211c; display:flex; font:700 10px ui-monospace,SFMono-Regular,Menlo,monospace; height:100%; justify-content:center; overflow:hidden; position:absolute; top:0; }
.lane-axis { color:var(--muted); display:flex; font:600 10px ui-monospace,SFMono-Regular,Menlo,monospace; justify-content:space-between; margin-left:64px; }
.sequence-line { align-items:center; border-top:1px solid var(--line); display:flex; flex-wrap:wrap; gap:4px; padding:9px 11px; font-size:11px; color:var(--muted); }
.sequence-line i { color:var(--muted); font-style:normal; margin:0 2px; }
.step-tag { border-radius:5px; display:inline-block; font:700 10px ui-monospace,SFMono-Regular,Menlo,monospace; padding:2px 6px; }
.seg-list { display:grid; gap:4px; list-style:none; margin:0; padding:4px 11px 12px; }
.seg-list li { align-items:center; display:flex; gap:8px; font-size:11px; }
.seg-time { font:600 11px ui-monospace,SFMono-Regular,Menlo,monospace; }
.seg-list em { color:var(--muted); font-style:normal; margin-left:auto; }
.result-progress { background:var(--surface-2); border:1px solid var(--line); border-radius:10px; padding:13px; }
.progress-head { align-items:baseline; display:flex; justify-content:space-between; margin-bottom:9px; }
.progress-head strong { font-size:13px; }
.progress-head span { color:var(--brand); font:600 12px ui-monospace,SFMono-Regular,Menlo,monospace; }
.progress-track { background:#1b3448; border-radius:999px; height:6px; overflow:hidden; }
.progress-fill { background:var(--brand); height:100%; transition:width .25s; width:0; }
.result-progress small { color:var(--muted); display:block; font-size:11px; margin-top:9px; }

.result-body { display:grid; gap:12px; }
.verdict { border:1px solid var(--line); border-radius:10px; display:grid; gap:3px; padding:12px; }
.verdict.ok { background:#0f2f28; border-color:#1f6b58; }
.verdict.bad { background:#331c22; border-color:#7a3b48; }
.verdict strong { font-size:14px; }
.verdict small { color:var(--muted); font-size:11px; }
.model-card { background:var(--surface); border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.model-head { align-items:center; border-bottom:1px solid var(--line); display:flex; gap:8px; justify-content:space-between; padding:9px 11px; }
.model-head strong { font-size:12px; }
.model-head .tag { border-radius:999px; font:600 10px ui-monospace,SFMono-Regular,Menlo,monospace; padding:2px 8px; }
.tag.ok { background:#13604f; color:#eafff9; }
.tag.bad { background:#6d2b36; color:#ffeef1; }
.model-pick { align-items:baseline; display:flex; gap:8px; padding:10px 11px 4px; }
.model-pick strong { font:700 17px ui-monospace,SFMono-Regular,Menlo,monospace; }
.model-pick span { color:var(--muted); font-size:11px; }
.prob-list { display:grid; gap:5px; padding:8px 11px 12px; }
.prob-row { align-items:center; display:grid; gap:8px; grid-template-columns:64px minmax(0,1fr) 48px; }
.prob-row.hit .prob-label,.prob-row.hit .prob-value { color:var(--brand); }
.prob-row.expected .prob-label { color:var(--warn); }
.prob-label { font:600 11px ui-monospace,SFMono-Regular,Menlo,monospace; }
.prob-track { background:#162f42; border-radius:999px; height:7px; overflow:hidden; }
.prob-fill { background:#3f7f97; height:100%; }
.prob-row.hit .prob-fill { background:var(--brand); }
.prob-value { color:var(--muted); font:600 11px ui-monospace,SFMono-Regular,Menlo,monospace; text-align:right; }
.window-strip { border-top:1px solid var(--line); padding:10px 11px; }
.window-strip h4 { color:var(--muted); font-size:11px; font-weight:600; margin:0 0 7px; }
.chips { display:flex; flex-wrap:wrap; gap:5px; }
.chip { border:1px solid var(--line); border-radius:6px; font:600 10px ui-monospace,SFMono-Regular,Menlo,monospace; padding:3px 6px; }
.chip.ok { background:#13604f; border-color:#1f6b58; color:#eafff9; }
.chip.bad { background:#472029; border-color:#6d2b36; color:#ffeef1; }

.feedback-block { border-top:1px solid var(--line); margin-top:16px; padding-top:14px; }
.feedback-block h3 { font-size:12px; margin:0 0 9px; }
.feedback-buttons { display:flex; gap:8px; }
.feedback-buttons .button { flex:1; font-size:13px; min-height:38px; padding:0 10px; }
.feedback-extra { display:grid; gap:8px; margin-top:10px; }
.feedback-extra label { color:var(--muted); display:grid; font-size:12px; gap:5px; }
.feedback-extra select,.feedback-extra input { background:var(--surface); border:1px solid var(--line); border-radius:7px; color:var(--ink); min-height:36px; outline:none; padding:6px 9px; }
.feedback-state { color:var(--success); display:block; font-size:11px; margin-top:9px; }

@media (max-width:1080px) { .workspace { grid-template-columns:214px minmax(0,1fr); } .result-panel { border-left:0; border-top:1px solid var(--line); grid-column:1/-1; } }
@media (max-width:680px) { .topbar { align-items:flex-start; flex-direction:column; gap:8px; padding:12px 14px; } .topbar-right { flex-wrap:wrap; gap:12px; } .workspace { display:block; } .slot-panel { border-bottom:1px solid var(--line); border-right:0; } .slot-list { grid-template-columns:repeat(2,minmax(0,1fr)); } .main-panel { padding:17px 14px; } .capture-heading { display:grid; } .duration-control { min-width:0; } .capture-frame { aspect-ratio:4/3; } .result-panel { padding:18px 14px; } }
