:root {
  --ink: #171715;
  --muted: #74746d;
  --line: #deded7;
  --canvas: #efefe9;
  --paper: #fafaf6;
  --accent: #f04a23;
  --accent-dark: #cb3515;
  --lime: #c9ff38;
  --success: #2b9b65;
  --shadow: 0 18px 45px rgba(28, 28, 24, .08);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
button, input, select { font: inherit; }
button, select, input { outline: none; }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { box-shadow: 0 0 0 3px rgba(240, 74, 35, .24); }

.app-shell { min-height: 100vh; }
.topbar { height: 74px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #d1d1ca; background: rgba(250, 250, 246, .92); backdrop-filter: blur(16px); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: white; background: var(--ink); font-size: 13px; font-weight: 900; letter-spacing: -.5px; transform: skew(-7deg); }
.brand strong { display: block; font-size: 17px; letter-spacing: .04em; }
.brand small { display: block; margin-top: 2px; color: #8d8d85; font-size: 8px; letter-spacing: .18em; font-weight: 800; }
.top-status { display: flex; align-items: center; gap: 9px; color: #565650; font-size: 13px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #aaa; box-shadow: 0 0 0 4px rgba(120,120,120,.1); }
.status-dot.live { background: var(--success); box-shadow: 0 0 0 4px rgba(43,155,101,.12); }
.status-dot.error { background: #d83d32; box-shadow: 0 0 0 4px rgba(216,61,50,.12); }
.privacy-tag { margin-left: 7px; padding: 5px 9px; border: 1px solid #d8d8d0; border-radius: 99px; color: #77776f; font-size: 11px; }

.workspace { min-height: calc(100vh - 74px); padding: 18px; display: grid; grid-template-columns: minmax(270px, 320px) minmax(540px, 1fr) minmax(260px, 300px); align-items: start; gap: 14px; max-width: 1700px; margin: auto; }
.panel { background: var(--paper); border: 1px solid #ddddD5; border-radius: 8px; box-shadow: var(--shadow); }
.setup-panel, .results-panel { padding: 22px; }
.stage-panel { min-width: 0; padding: 16px; display: flex; flex-direction: column; }
.panel-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 25px; }
.panel-heading.compact { margin-bottom: 18px; }
.step-index { display: grid; place-items: center; flex: 0 0 34px; height: 34px; color: var(--accent); border: 1px solid #f0a18d; font-size: 11px; font-weight: 900; }
.panel-heading h2 { margin: 0; font-size: 17px; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }

fieldset { min-width: 0; }
.control-group { margin: 0 0 17px; padding: 0; border: 0; }
.control-group label, .control-group legend { display: block; margin-bottom: 8px; color: #50504b; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.control-group select, .control-group input[type="number"] { width: 100%; height: 42px; padding: 0 12px; color: var(--ink); background: #fff; border: 1px solid #d8d8d0; border-radius: 4px; transition: border .2s; }
.control-group select:hover, .control-group input:hover { border-color: #aaa9a0; }
.segmented { padding: 3px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; background: #e8e8e1; border-radius: 5px; }
.segment { padding: 8px 4px; color: #71716b; background: transparent; border: 0; border-radius: 3px; cursor: pointer; font-size: 11px; font-weight: 700; }
.segment.active { color: var(--ink); background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.07); }
.source-pane { display: none; margin-top: 13px; }
.source-pane.active { display: block; }
.camera-privacy { margin-bottom: 13px; padding: 11px 12px; color: #52524d; background: #fff7e9; border-left: 3px solid #f0a023; border-radius: 3px; }
.camera-privacy strong { display: block; font-size: 10px; }
.camera-privacy p { margin: 4px 0 0; font-size: 9px; line-height: 1.55; }
.sample-note { padding: 12px; color: #4f4f49; background: #f2f5e9; border-left: 3px solid var(--lime); border-radius: 3px; }
.sample-note strong { font-size: 10px; }
.sample-note p { margin: 4px 0 0; font-size: 9px; line-height: 1.55; }
.camera-buttons { margin-top: 9px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.secondary-button { min-height: 36px; padding: 7px 9px; color: #343430; background: #fff; border: 1px solid #d3d3cb; border-radius: 4px; cursor: pointer; font-size: 10px; font-weight: 800; }
.secondary-button:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.secondary-button:disabled { opacity: .5; cursor: default; }
.floor-calibration { grid-column: 1 / -1; padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f3f3ed; border-radius: 4px; }
.floor-calibration strong, .floor-calibration small { display: block; }
.floor-calibration strong { font-size: 10px; }
.floor-calibration small { margin-top: 3px; color: #77776f; font-size: 8px; line-height: 1.4; }
.floor-calibration-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.floor-calibration .secondary-button.active { color: #fff; background: var(--accent); border-color: var(--accent); }
.permission-state { margin: 9px 0 0; color: #7f7f78; font-size: 9px; }
.permission-state[data-state="allowed"] { color: var(--success); }
.permission-state[data-state="denied"], .permission-state[data-state="error"] { color: #c1382e; }
.inline-control { display: flex; align-items: center; gap: 10px; }
.inline-control input { max-width: 90px; }
.field-hint { color: #94948c; font-size: 11px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.upload-box { min-height: 85px; padding: 13px; display: grid !important; grid-template-columns: 34px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; border: 1px dashed #c8c8be; border-radius: 5px; background: #fff; cursor: pointer; }
.upload-box:hover { border-color: var(--accent); }
.upload-box input { position: absolute; opacity: 0; pointer-events: none; }
.upload-icon { grid-row: 1 / 3; width: 32px; height: 32px; display: grid; place-items: center; color: var(--accent); background: #fff0eb; border-radius: 50%; font-size: 20px; }
.upload-box strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.upload-box small { color: #92928a; font-size: 10px; font-weight: 400; }
.advanced { margin: 3px 0 19px; border-top: 1px solid #e0e0d8; border-bottom: 1px solid #e0e0d8; }
.advanced summary { padding: 13px 2px; color: #65655f; cursor: pointer; font-size: 11px; font-weight: 800; }
.advanced-grid { padding-top: 4px; }
.switch-row { margin-bottom: 13px; display: grid; grid-template-columns: 1fr auto; align-items: center; cursor: pointer; }
.switch-row strong, .switch-row small { display: block; }
.switch-row strong { font-size: 11px; }
.switch-row small { margin-top: 2px; color: #96968e; font-size: 9px; }
.switch-row input { position: absolute; opacity: 0; }
.switch { grid-column: 2; grid-row: 1; width: 36px; height: 20px; padding: 2px; background: #c8c8c0; border-radius: 99px; transition: .2s; }
.switch::after { content: ""; display: block; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px #888; transition: .2s; }
.switch-row input:checked + .switch { background: var(--accent); }
.switch-row input:checked + .switch::after { transform: translateX(16px); }
.primary-button { width: 100%; height: 48px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: var(--accent); border: 0; border-radius: 4px; cursor: pointer; font-weight: 900; box-shadow: 0 9px 22px rgba(240,74,35,.2); transition: .2s; }
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.primary-button:disabled { background: #aaa; box-shadow: none; cursor: wait; transform: none; }
.local-note { margin: 12px 0 0; color: #92928a; text-align: center; font-size: 9px; }

.stage-toolbar { min-height: 58px; padding: 0 5px 13px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow { color: var(--accent); font-size: 8px; font-weight: 900; letter-spacing: .2em; }
.stage-toolbar h1 { margin: 3px 0 0; font-size: clamp(16px, 1.6vw, 23px); letter-spacing: -.02em; }
.stage-actions { display: flex; gap: 5px; align-items: stretch; }
.stage-actions .toolbar-start { width: auto; min-width: 126px; height: 40px; padding: 0 12px; gap: 14px; font-size: 11px; box-shadow: none; }
.icon-button, .stop-button { min-width: 51px; height: 40px; padding: 4px 8px; display: grid; place-items: center; background: #fff; border: 1px solid #d8d8d0; border-radius: 4px; cursor: pointer; }
.icon-button span { height: 14px; line-height: 12px; font-size: 13px; font-weight: 800; }
.icon-button small { color: #77776f; font-size: 8px; }
.icon-button:disabled, .stop-button:disabled { opacity: .4; cursor: default; }
.icon-button.active { color: var(--accent); border-color: var(--accent); background: #fff4f0; }
.record-symbol { width: 10px; height: 10px !important; background: var(--accent); border-radius: 50%; }
.stop-button { display: block; color: #fff; background: var(--ink); border-color: var(--ink); font-size: 11px; font-weight: 800; }

.video-stage { position: relative; flex: 1 1 auto; min-height: 420px; display: grid; place-items: center; overflow: hidden; background: #171816; border-radius: 5px; }
.video-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at center, transparent 45%, rgba(0,0,0,.23)); }
.video-stage img, .video-stage video { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; z-index: 1; }
.video-stage video.mirrored { transform: scaleX(-1); }
.video-stage canvas#overlayCanvas { width: 100%; height: 100%; position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.video-stage canvas#overlayCanvas.floor-calibrating { pointer-events: auto; cursor: crosshair; }
.empty-stage { color: #74766f; text-align: center; z-index: 1; }
.empty-stage strong { display: block; margin-top: 14px; color: #c1c3bb; font-size: 14px; }
.empty-stage p { margin: 6px 0 0; font-size: 10px; }
.pose-figure { width: 90px; height: 120px; margin: auto; position: relative; opacity: .62; }
.pose-figure i { display: block; position: absolute; background: #6a6d65; border-radius: 99px; transform-origin: center top; }
.pose-figure .head { width: 20px; height: 20px; left: 35px; top: 0; border-radius: 50%; background: transparent; border: 3px solid #6a6d65; }
.pose-figure .body { width: 4px; height: 50px; left: 43px; top: 24px; }
.pose-figure .arm { width: 3px; height: 47px; top: 29px; }
.pose-figure .arm-left { left: 39px; transform: rotate(42deg); }
.pose-figure .arm-right { left: 48px; transform: rotate(-42deg); }
.pose-figure .leg { width: 4px; height: 53px; top: 70px; }
.pose-figure .leg-left { left: 42px; transform: rotate(18deg); }
.pose-figure .leg-right { left: 46px; transform: rotate(-18deg); }
.viewfinder-corner { position: absolute; width: 28px; height: 28px; z-index: 4; opacity: .75; }
.corner-tl { top: 14px; left: 14px; border-top: 2px solid var(--lime); border-left: 2px solid var(--lime); }
.corner-tr { top: 14px; right: 14px; border-top: 2px solid var(--lime); border-right: 2px solid var(--lime); }
.corner-bl { bottom: 14px; left: 14px; border-bottom: 2px solid var(--lime); border-left: 2px solid var(--lime); }
.corner-br { right: 14px; bottom: 14px; border-right: 2px solid var(--lime); border-bottom: 2px solid var(--lime); }
.video-badges { position: absolute; z-index: 5; top: 17px; left: 18px; display: flex; gap: 6px; }
.video-badges span { padding: 5px 8px; color: #fff; background: rgba(15,15,14,.72); border-radius: 3px; font-size: 8px; font-weight: 900; letter-spacing: .08em; backdrop-filter: blur(5px); }
.video-rep-badge { min-width: 78px; padding: 7px 10px; position: absolute; z-index: 6; top: 17px; right: 18px; display: flex; align-items: center; justify-content: space-between; gap: 9px; color: #fff; background: rgba(15,15,14,.82); border: 1px solid rgba(255,255,255,.16); border-radius: 4px; box-shadow: 0 5px 18px rgba(0,0,0,.2); backdrop-filter: blur(6px); }
.video-rep-badge[hidden] { display: none; }
.video-rep-badge span { font-size: 8px; font-weight: 800; }
.video-rep-badge strong { color: var(--lime); font-family: Impact, "Arial Narrow", sans-serif; font-size: 24px; line-height: 1; font-weight: 400; }
.live-dot { width: 6px; height: 6px; margin-right: 4px; display: inline-block; background: var(--accent); border-radius: 50%; animation: pulse 1.4s infinite; }
.loading-overlay { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; background: rgba(20,20,18,.82); }
.loading-overlay[hidden] { display: none; }
.loading-overlay strong { margin-top: 14px; font-size: 13px; }
.loading-overlay small { margin-top: 5px; color: #aaa; font-size: 9px; }
.spinner { width: 30px; height: 30px; border: 3px solid #555; border-top-color: var(--lime); border-radius: 50%; animation: spin .8s linear infinite; }
.progress-track { height: 3px; margin: 5px 0 0; overflow: hidden; background: #d7d7d0; }
.progress-track span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .3s; }
.recording-review { margin-top: 8px; padding: 9px; display: grid; grid-template-columns: 112px 1fr; gap: 10px; align-items: center; background: #20211f; border-radius: 5px; color: #fff; }
.recording-review[hidden] { display: none; }
.recording-review video { width: 112px; height: 64px; object-fit: contain; background: #000; border-radius: 3px; }
.recording-review strong, .recording-review small { display: block; }
.recording-review strong { font-size: 10px; }
.recording-review small { margin: 3px 0 7px; color: #aaa; font-size: 8px; }
.recording-review a { color: var(--lime); font-size: 9px; font-weight: 800; text-decoration: none; }
.runtime-strip { min-height: 66px; display: grid; grid-template-columns: repeat(4, 1fr); align-items: center; border-top: 0; }
.runtime-strip.runtime-five { grid-template-columns: repeat(5, 1fr); }
.runtime-strip.runtime-six { grid-template-columns: repeat(6, 1fr); }
.runtime-strip > div { padding: 4px 13px; border-right: 1px solid #dfdfd7; }
.runtime-strip > div:last-child { border: 0; }
.runtime-strip span, .runtime-strip strong { display: block; }
.runtime-strip span { margin-bottom: 5px; color: #92928a; font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.runtime-strip strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.runtime-strip b { font-size: 15px; }
.runtime-strip .good { color: var(--success); }
.runtime-strip .bad { color: #d83d32; }
.runtime-strip .neutral { color: #888; }
.report-ready-banner { margin-top: 2px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; background: #292a27; border-radius: 4px; }
.report-ready-banner[hidden] { display: none; }
.report-ready-banner strong, .report-ready-banner small { display: block; }
.report-ready-banner strong { font-size: 10px; }
.report-ready-banner small { margin-top: 2px; color: #aaa; font-size: 8px; }
.report-ready-banner button { min-height: 30px; padding: 6px 10px; color: #171816; background: var(--lime); border: 0; border-radius: 3px; cursor: pointer; font-size: 9px; font-weight: 900; }

.rep-card { min-height: 183px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: white; background: var(--ink); border-radius: 5px; position: relative; overflow: hidden; }
.rep-card::before { content: ""; position: absolute; width: 150px; height: 150px; border: 34px solid rgba(201,255,56,.05); border-radius: 50%; right: -75px; top: -75px; }
.rep-card span { color: #aaa; font-size: 9px; letter-spacing: .12em; }
.rep-primary { display: flex; align-items: flex-end; gap: 8px; position: relative; z-index: 1; }
.rep-card .rep-primary strong { margin: 3px 0 -3px; color: var(--lime); font-family: Impact, "Arial Narrow", sans-serif; font-size: 68px; line-height: 1; font-weight: 400; letter-spacing: -.03em; }
.rep-primary small { padding-bottom: 7px; }
.rep-breakdown { width: 100%; margin: 10px 0 8px; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; z-index: 1; }
.rep-breakdown div { padding: 0 6px; text-align: center; border-left: 1px solid rgba(255,255,255,.12); }
.rep-breakdown div:first-child { border-left: 0; }
.rep-breakdown b { display: block; color: #fff; font-size: 17px; line-height: 1.1; }
.rep-breakdown small { color: #999; font-size: 8px; }
.rep-card small { color: #d5d5cf; font-size: 10px; }
.phase-card { margin-top: 12px; padding: 15px; background: #fff; border: 1px solid #dfdfd7; border-radius: 5px; }
.phase-card span { color: #92928a; font-size: 9px; }
.phase-card strong { margin-top: 4px; display: block; font-size: 14px; text-transform: capitalize; }
.phase-line { height: 3px; margin-top: 13px; overflow: hidden; background: #e9e9e2; }
.phase-line i { display: block; width: 8%; height: 100%; background: var(--accent); transition: width .4s; }
.feedback-section { margin-top: 22px; }
.section-title { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 900; }
.section-title small { color: #9a9a92; font-size: 8px; font-weight: 500; }
.feedback-controls { display: flex; align-items: center; gap: 7px; }
.voice-toggle { min-height: 25px; padding: 4px 7px; color: #33422f; background: #eef4e8; border: 1px solid #cbd9c2; border-radius: 999px; cursor: pointer; font-size: 8px; font-weight: 800; }
.voice-toggle[aria-pressed="false"] { color: #77776f; background: #f2f2ec; border-color: #d8d8d0; }
.voice-toggle:disabled { opacity: .55; cursor: default; }
.voice-status { margin: 5px 0 0; color: #7c8b70; font-size: 8px; text-align: right; }
.feedback-list { margin-top: 10px; display: grid; gap: 7px; }
.feedback-empty { min-height: 92px; padding: 15px; display: flex; align-items: center; gap: 12px; color: #888; background: #f2f2ec; border-radius: 5px; }
.feedback-empty span { flex: 0 0 26px; height: 26px; display: grid; place-items: center; color: var(--success); border: 1px solid #b9d9c9; border-radius: 50%; }
.feedback-empty p { margin: 0; font-size: 10px; line-height: 1.6; }
.feedback-item { padding: 11px 11px 11px 13px; border-left: 3px solid var(--success); background: #f0f5f1; border-radius: 3px; }
.feedback-item.warn { border-color: #f0a023; background: #fff7e9; }
.feedback-item.error { border-color: #d83d32; background: #fff0ef; }
.feedback-item strong { display: block; margin-bottom: 3px; font-size: 9px; text-transform: uppercase; }
.feedback-item p { margin: 0; color: #5f5f59; font-size: 10px; line-height: 1.45; }
.standards-card { margin-top: 16px; padding: 12px; border: 1px solid #dfdfd7; border-radius: 5px; background: #fff; }
.standards-list { margin-top: 9px; display: grid; gap: 6px; }
.standards-list p { margin: 0; color: #77776f; font-size: 9px; line-height: 1.45; }
.standard-row { padding: 7px 8px; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; background: #f4f4ee; border-radius: 3px; }
.standard-row strong { font-size: 9px; }
.standard-row b { color: var(--success); font-size: 9px; }
.standard-row small { grid-column: 1 / -1; color: #85857e; font-size: 8px; }
.official-rule-list { margin-bottom: 3px; padding: 9px; border: 1px solid #e4ddbf; background: #fffbea; border-radius: 4px; }
.official-rule-list > b { display: block; margin-bottom: 6px; font-size: 9px; }
.official-rule-list p { margin: 5px 0; color: #5f5a47; }
.official-rule-list p span { margin-right: 5px; padding: 2px 4px; color: #6f632c; background: #eee4ad; border-radius: 2px; font-size: 7px; font-weight: 800; }
.tips-card { margin-top: 16px; padding: 12px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid #dfdfd7; border-radius: 5px; }
.tips-icon { flex: 0 0 20px; height: 20px; display: grid; place-items: center; color: var(--accent); border: 1px solid #f3b3a2; border-radius: 50%; font-size: 10px; font-weight: 900; }
.tips-card strong { font-size: 9px; }
.tips-card p { margin: 4px 0 0; color: #7c7c75; font-size: 9px; line-height: 1.5; }
.report-card { margin-top: 12px; padding: 13px; border: 1px solid #dfdfd7; border-radius: 5px; background: #fff; }
.report-card strong { font-size: 10px; }
.report-card p { margin: 4px 0 10px; color: #77776f; font-size: 9px; line-height: 1.5; }
.report-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.report-actions a, .report-actions button { min-height: 30px; padding: 7px 10px; color: #343430; background: #f4f4ee; border: 1px solid #d7d7cf; border-radius: 3px; text-decoration: none; cursor: pointer; font-size: 9px; font-weight: 800; }
.report-actions a[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.report-actions button { margin-left: auto; color: #a62d25; }
.report-actions #generateReportButton { margin-left: 0; color: #fff; background: var(--ink); border-color: var(--ink); }
.report-actions #generateReportButton:disabled { opacity: .45; cursor: default; }
.report-preview { margin-top: 10px; padding: 10px; color: #4d4d47; background: #f2f5e9; border-radius: 4px; font-size: 9px; line-height: 1.55; }
.report-preview[hidden] { display: none; }
.report-preview h3 { margin: 0 0 6px; color: var(--ink); font-size: 12px; }
.report-preview p { margin: 4px 0; }
.report-heading { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.report-heading small { color: #85857e; font-size: 7px; font-weight: 800; letter-spacing: .08em; }
.report-heading h3 { margin-top: 2px; }
.report-heading > strong { color: var(--success); font-size: 19px; }
.report-metrics { margin-top: 8px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.report-metrics span { padding: 7px 4px; display: grid; place-items: center; color: #77776f; background: #fff; border: 1px solid #dfe4d4; border-radius: 3px; font-size: 7px; text-align: center; }
.report-metrics b { display: block; color: #282824; font-size: 12px; }
.report-explanation { color: #77776f !important; font-size: 8px !important; }
.report-download-tip { margin-top: 8px !important; padding: 7px 8px; color: #4f5d36 !important; background: #fff; border: 1px solid #dfe4d4; border-radius: 3px; font-size: 8px !important; }
.privacy-footer { max-width: 1700px; margin: 0 auto; padding: 0 18px 22px; }
.privacy-footer details { padding: 13px 16px; color: #6e6e67; border: 1px solid #d8d8d0; border-radius: 6px; background: rgba(250,250,246,.7); font-size: 10px; }
.privacy-footer summary { color: #454540; cursor: pointer; font-weight: 800; }
.privacy-footer p { margin: 9px 0 0; line-height: 1.7; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 50; padding: 11px 17px; color: #fff; background: #222; border-radius: 4px; box-shadow: 0 10px 35px rgba(0,0,0,.2); font-size: 11px; opacity: 0; pointer-events: none; transform: translate(-50%, 15px); transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #b72e22; }
.status-body { min-height: 100vh; display: grid; place-items: center; }
.status-card { width: min(560px, calc(100% - 32px)); padding: 32px; background: var(--paper); border: 1px solid #d8d8d0; border-radius: 10px; }
.status-card h1 { margin: 8px 0; font-size: 24px; }
.status-card p { color: #676760; }
.status-card .ok { display: inline-flex; align-items: center; gap: 8px; color: #237d52; font-weight: 700; }
.status-card .ok::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--success); }
.status-card dl { margin: 24px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.status-card dt, .status-card dd { margin: 0; padding-bottom: 10px; border-bottom: 1px solid #e2e2da; }
.status-card dd { font-weight: 800; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; } }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 285px 1fr; }
  .results-panel { grid-column: 1 / -1; display: grid; grid-template-columns: 220px 1fr 1fr; gap: 12px; align-items: stretch; }
  .results-panel .panel-heading { grid-column: 1 / -1; }
  .rep-card { min-height: 150px; }
  .phase-card { margin-top: 0; }
  .feedback-section { margin-top: 0; }
  .tips-card { grid-column: 2 / -1; margin-top: 0; }
}

@media (max-width: 790px) {
  .topbar { height: 62px; padding: 0 15px; }
  .privacy-tag { display: none; }
  .workspace { min-height: calc(100vh - 62px); padding: 9px; display: flex; flex-direction: column; align-items: stretch; }
  .stage-panel { order: -1; }
  .stage-toolbar { align-items: flex-start; }
  .stage-actions { flex-wrap: wrap; justify-content: flex-end; }
  .video-stage { min-height: min(62vw, 420px); }
  .runtime-strip { grid-template-columns: 1fr 1fr; }
  .runtime-strip.runtime-five { grid-template-columns: 1fr 1fr; }
  .runtime-strip.runtime-six { grid-template-columns: 1fr 1fr; }
  .runtime-strip > div:nth-child(2) { border-right: 0; }
  .runtime-strip.runtime-five > div:nth-child(2), .runtime-strip.runtime-five > div:nth-child(4) { border-right: 0; }
  .runtime-strip.runtime-six > div:nth-child(even) { border-right: 0; }
  .runtime-strip > div { padding: 8px 12px; border-bottom: 1px solid #dfdfd7; }
  .results-panel { display: grid; grid-template-columns: 1fr 1fr; }
  .feedback-section, .tips-card { grid-column: 1 / -1; }
  .standards-card, .report-card { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .brand small { display: none; }
  .top-status { font-size: 11px; }
  .stage-toolbar { display: block; }
  .stage-actions { margin-top: 11px; display: grid; grid-template-columns: minmax(88px, 1fr) repeat(3, 36px) 44px; gap: 4px; }
  .stage-actions .toolbar-start { width: auto; min-width: 0; padding: 0 7px; gap: 5px; font-size: 10px; }
  .stage-actions .icon-button, .stage-actions .stop-button { width: auto; min-width: 0; padding-left: 2px; padding-right: 2px; }
  .stage-actions .stop-button { font-size: 9px; }
  .stage-toolbar h1 { font-size: 17px; }
  .video-stage { min-height: 56vw; }
  .video-rep-badge { min-width: 72px; padding: 6px 8px; top: 11px; right: 11px; }
  .video-rep-badge strong { font-size: 22px; }
  .setup-panel, .results-panel { padding: 17px; }
  .results-panel { display: block; }
  .results-panel > * { margin-top: 12px; }
  .two-columns { grid-template-columns: 1fr; gap: 0; }
  .recording-review { grid-template-columns: 88px 1fr; }
  .recording-review video { width: 88px; height: 56px; }
  .report-ready-banner { align-items: flex-start; }
}
