:root {
  color-scheme: light;
  --paper: #f5f4ef;
  --surface: #fffefa;
  --ink: #172a24;
  --muted: #53645d;
  --line: #d9e1da;
  --line-strong: #98ada0;
  --primary: #245b49;
  --primary-deep: #194536;
  --primary-wash: #e9f2eb;
  --forest: #142f28;
  --accent: #a64428;
  --danger: #9b3029;
  --danger-wash: #f9eae6;
  --success: #1c6147;
  --success-wash: #e6f2e9;
  --radius: 14px;
  --control: 9px;
  --tap: 48px;
  --side-gutter: 36px;
  --safe-gutter: max(var(--side-gutter), env(safe-area-inset-left), env(safe-area-inset-right));
  --quick: 140ms;
  --panel: 200ms;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  line-height: 1.6;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); }
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.18; letter-spacing: -.03em; font-weight: 760; }
h2 { font-size: clamp(1.16rem, 2.1vw, 1.4rem); line-height: 1.4; font-weight: 740; }
h3, h4 { line-height: 1.45; font-weight: 740; }
a { color: var(--primary-deep); text-underline-offset: .22em; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button, a, summary, .drill-choice, .file-box { touch-action: manipulation; }
button:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.subtle { color: var(--muted); font-size: .94rem; }
.error { color: var(--danger); background: var(--danger-wash); padding: 9px 12px; border-radius: var(--control); margin-block: 12px; font-size: .94rem; }
.danger { --text-button-color: var(--danger); }
.sr-only, .skip:not(:focus) { position: absolute; inline-size: 1px; block-size: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; z-index: 5; top: 8px; left: 8px; padding: 12px; background: var(--surface); }
.print-only { display: none; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.header-inner, .shell { width: min(1160px, calc(100% - var(--safe-gutter) - var(--safe-gutter))); margin-inline: auto; }
.header-inner { min-height: 70px; display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr); align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; justify-self: start; min-height: var(--tap); gap: 10px; color: var(--ink); text-decoration: none; font-size: 1rem; font-weight: 760; }
.brand-ball { position: relative; display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; overflow: hidden; border-radius: 50%; background: var(--accent); }
.brand-ball::before, .brand-ball::after { content: ""; position: absolute; border: 1px solid #ffffffba; transform: rotate(-35deg); }
.brand-ball::before { width: 17px; height: 42px; border-radius: 50%; }
.brand-ball::after { width: 46px; height: 1px; border-width: 1px 0 0; }
.work-nav { display: flex; align-self: stretch; gap: 24px; }
.work-nav a { display: grid; place-items: center; min-height: var(--tap); border-bottom: 3px solid transparent; padding: 3px 10px 0; font-weight: 640; color: var(--muted); text-decoration: none; white-space: nowrap; }
.work-nav a:hover, .work-nav a[aria-current] { color: var(--primary-deep); }
.work-nav a[aria-current] { border-color: var(--primary); font-weight: 760; }
.account { grid-column: 3; display: flex; align-items: center; justify-self: end; gap: 8px; font-size: .9rem; }
.account span { overflow: hidden; max-width: 140px; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }

.shell { padding-block: clamp(24px, 4vw, 46px) 40px; }
.page-heading, .section-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.page-heading { margin-bottom: 24px; gap: 20px 28px; }
.page-heading p, h2 + .subtle { margin-top: 6px; }
.page-heading > * { min-width: 0; }
.workflow-steps { display: flex; list-style: none; padding: 0; gap: 10px; }
.workflow-steps li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 9px; color: var(--muted); font-size: .88rem; white-space: nowrap; }
.workflow-steps li span { display: inline-grid; place-content: center; width: 24px; height: 24px; border: 1px solid var(--line-strong); border-radius: 50%; font-size: .77rem; font-variant-numeric: tabular-nums; }
.workflow-steps li[aria-current] { border-radius: var(--control); background: var(--primary-wash); color: var(--primary-deep); font-weight: 750; }
.workflow-steps li[aria-current] span { color: white; background: var(--primary-deep); border-color: var(--primary-deep); }
.workflow-steps li[data-complete="true"] span { border-color: var(--primary); color: var(--primary-deep); }

.task-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.card { min-width: 0; padding: clamp(18px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 2px 8px #23413108; }
.choice-hint { min-height: 1.6em; text-wrap: balance; }
.drill-choices { display: grid; gap: 8px; min-width: 0; border: 0; padding: 0; margin: 19px 0 0; }
.drill-choice { display: flex; min-height: 50px; align-items: center; gap: 11px; padding: 9px 13px; border: 1px solid var(--line); border-radius: var(--control); background: var(--surface); color: var(--ink); cursor: pointer; transition: background-color var(--quick), border-color var(--quick), transform var(--quick) var(--ease-out); }
.drill-choice:has(:checked), .drill-choice:has(:focus-visible) { border-color: var(--primary); background: var(--primary-wash); }
.drill-choice:active:not(:has(:disabled)) { transform: scale(.992); }
.drill-choice:has(:checked) strong { color: var(--primary-deep); }
.drill-choice:has(:disabled) { cursor: default; background: var(--paper); color: var(--muted); border-color: var(--line); }
.drill-choice input { flex: 0 0 20px; width: 20px; height: 20px; accent-color: var(--primary); margin: 0; }
.drill-label { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.drill-label strong { font-weight: 670; }
.drill-label small { color: var(--muted); }

.primary, .secondary, .text-button, .play-media { min-height: var(--tap); border-radius: var(--control); font-weight: 710; white-space: normal; transition: background-color var(--quick), border-color var(--quick), transform var(--quick) var(--ease-out); }
.primary, .secondary, .play-media { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 16px; text-decoration: none; }
.primary { border: 1px solid var(--primary); background: var(--primary); color: white; }
.secondary { border: 1px solid var(--line-strong); background: var(--surface); color: var(--primary-deep); }
.text-button { padding: 3px 8px; border: 1px solid transparent; color: var(--text-button-color, var(--primary-deep)); background: transparent; }
.primary:not(:disabled):active, .secondary:active, .play-media:active { transform: translateY(1px) scale(.985); }
.choice-actions, .upload-actions, .actions { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-top: 18px; }
.choice-actions .primary { min-width: min(100%, 190px); }
#next span, .record-arrow { transition: transform var(--quick) var(--ease-out); }
#next span { font-size: 1.2em; }
.mobile-shortcut, .watch-demo { display: none; }

.demo-card .section-header { margin-bottom: 13px; }
.meta-tag { color: var(--muted); font-size: .85rem; text-align: right; }
.media-stage {
  display: grid;
  position: relative;
  isolation: isolate;
  grid-template: 1fr / 1fr;
  min-height: 0;
  border-radius: var(--control);
  color: white;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, #2c5448 0%, var(--forest) 78%);
}
.demo-stage { height: clamp(286px, 39vh, 400px); }
.preview-stage { height: clamp(250px, 42vh, 410px); }
.media-stage::before { content: ""; position: absolute; z-index: -1; inset: 18% -16%; border: 1px solid #abc9ba48; border-radius: 50%; }
.media-stage > * { grid-area: 1 / 1; }
.media-stage img, .media-stage video { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.media-stage video { background: #121d19; z-index: 1; }
.media-stage img { opacity: 0; transition: opacity var(--panel) var(--ease-out); }
.media-stage img[data-ready="true"] { opacity: 1; }
.media-stage[data-state="loading"] video { opacity: 0; pointer-events: none; }
.media-stage[data-state="playing"] img, .media-stage[data-state="playing"] .preview-cover { visibility: hidden; }
.play-media, .media-loading { place-self: end center; margin: 12px; z-index: 2; color: white; background: #163f33; }
.play-media { border: 1px solid #b3cbc0; box-shadow: 0 2px 12px #0003; }
.play-media span { font-size: .87em; }
.media-caption, .media-loading { padding: 10px 13px; text-align: center; }
.media-caption { align-self: end; background: #152e26ee; }
.media-loading { border-radius: var(--control); font-weight: 680; }
.media-loading::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-inline-end: 7px; vertical-align: -.12em; border: 2px solid #b8cfc8; border-top-color: transparent; border-radius: 50%; animation: progress-rotate 1s linear infinite; }
.preview-cover { place-self: center; display: grid; justify-items: center; gap: 10px; padding: 10px 12px 62px; color: #e1ebe4; font-size: .92rem; text-align: center; }
.preview-mark { display: grid; place-items: center; width: 56px; height: 56px; padding-left: 3px; border: 1px solid #b3cbc098; border-radius: 50%; color: #fffefa; }
.shoot-guide { margin-top: 7px; }
#camera-action, #upload-instruction { white-space: pre-line; }
summary { color: var(--primary-deep); font-weight: 690; }
.shoot-guide summary, .timing-details summary, .report-evidence summary { min-height: var(--tap); padding-block: 11px; }
.shoot-guide p { color: var(--muted); font-size: .94rem; margin: 0 0 8px; overflow-wrap: anywhere; }

.upload-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
#upload-action { color: var(--ink); }
.file-box { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 140px; padding: 13px; border-radius: var(--control); border: 1px dashed var(--line-strong); background: var(--paper); text-align: center; cursor: pointer; transition: background-color var(--quick), border-color var(--quick); }
.file-box:active { border-color: var(--primary); background: var(--primary-wash); }
#upload-form { margin-top: 17px; }
#upload-form:has(#clip:focus-visible) .file-box { outline: 3px solid var(--accent); outline-offset: 3px; }
#upload-form:has(#clip:disabled) .file-box { cursor: default; opacity: .63; }
.upload-mark { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid var(--line); border-radius: var(--control); color: var(--primary-deep); background: var(--surface); font-size: 1.32rem; font-weight: 720; }
.file-title { color: var(--primary-deep); font-size: 1.05rem; font-weight: 740; }
.picked-file { display: flex; align-items: start; gap: 10px; margin-top: 10px; padding: 9px 11px; border-radius: var(--control); background: var(--primary-wash); }
.file-check { display: grid; flex: 0 0 23px; width: 23px; height: 23px; place-items: center; color: white; background: var(--primary); border-radius: 50%; font-size: .8rem; }
.filename { overflow-wrap: anywhere; color: var(--primary-deep); font-weight: 680; }
.upload-tip { margin-top: 8px; }
.upload-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 8px; padding: 8px 10px 8px 14px; border-radius: var(--control); margin-top: 10px; background: var(--primary-wash); }
.upload-progress label { color: var(--primary-deep); font-weight: 700; }
progress { width: 100%; grid-column: 1; grid-row: 2; accent-color: var(--primary); }
#cancel-upload { grid-column: 2; grid-row: 1 / span 2; }
.upload-connection { grid-column: 1 / -1; }
.shooting-card { border-block-start: 3px solid var(--accent); }
.shooting-card h2, .demo-card h2, .result-video h2 { scroll-margin-top: 16px; }
.shooting-list { margin: 12px 0; padding-inline-start: 1.25em; }
.shooting-list li + li { margin-top: 7px; }

.detail-toolbar { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.result-header { align-items: start; }
.result-header h1 { font-size: clamp(1.5rem, 3.5vw, 2.15rem); }
#result-date, #result-message { margin-top: 4px; }
#retry { margin-top: 14px; }
.result-body { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 18px; align-items: start; margin-top: 17px; }
.result-video { border: 1px solid var(--line); border-radius: var(--control); padding: 15px; }
.result-video h2 { margin-bottom: 10px; font-size: 1.16rem; }
.result-footer { margin-top: 12px; padding-top: 5px; border-top: 1px solid var(--line); }

.job-progress { margin-top: 14px; padding: 16px; border: 1px solid var(--line); border-radius: var(--control); background: var(--primary-wash); }
.job-progress h2 { font-size: 1.15rem; }
.progress-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; gap: 6px; padding: 0; margin-block: 12px; }
.progress-steps li { display: flex; min-width: 0; align-items: center; gap: 7px; border-radius: var(--control); padding: 7px; color: var(--muted); font-size: .86rem; }
.progress-steps li[data-state="current"] { background: var(--surface); color: var(--primary-deep); font-weight: 750; }
.step-mark { flex: 0 0 14px; width: 14px; height: 14px; border: 1px solid var(--line-strong); border-radius: 50%; }
[data-state="done"] .step-mark { display: grid; place-items: center; border-color: var(--primary); background: var(--primary); color: white; }
[data-state="done"] .step-mark::after { content: "✓"; font-size: 10px; line-height: 1; }
[data-state="current"] .step-mark { border: 2px solid var(--line-strong); border-top-color: var(--primary-deep); animation: progress-rotate 1s linear infinite; }
@keyframes progress-rotate { to { transform: rotate(360deg); } }
.progress-detail { font-weight: 720; overflow-wrap: anywhere; }
.progress-times { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; margin: 13px 0 11px; }
.progress-times dt, .timing-substep { color: var(--muted); }
.progress-times dt { font-size: .85rem; }
.progress-times dd { margin-top: 2px; font-weight: 730; font-variant-numeric: tabular-nums; }
#progress-connection { margin-top: 8px; }
.timing-details { margin-top: 13px; border-top: 1px solid var(--line); }
.timing-list { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; font-size: .9rem; }
.timing-list > * { padding-block: 3px; }
.timing-list dd { text-align: right; font-variant-numeric: tabular-nums; }
.timing-substep { padding-inline-start: 12px; }
#timing-note { margin-top: 5px; }

.report { border: 1px solid var(--line); border-radius: var(--control); padding: 14px 16px; min-width: 0; }
.report .section-header { gap: 8px; }
.report h2 { font-size: 1.16rem; }
.report-context { margin-block: 6px 10px; }
.report-coverage { color: var(--primary-deep); font-size: .9rem; font-weight: 700; }
.report-observation, .report-findings { margin-bottom: 7px; }
.report-findings { padding-inline-start: 1.25em; }
.report-findings li + li { margin-top: 6px; }
.report-findings strong { margin-inline-end: .45em; }
.practice-focus { margin-block: 9px 12px; padding: 13px 15px; background: var(--primary-wash); border-inline-start: 3px solid var(--primary); border-radius: 0 var(--control) var(--control) 0; }
.practice-focus h4 { font-size: 1.16rem; }
.practice-focus p:last-child { margin-top: 5px; }
.focus-label { margin-bottom: 3px; color: var(--primary-deep); font-size: .87rem; font-weight: 750; }
.report dt { margin-top: 8px; font-weight: 740; }
.report dd { color: var(--muted); margin-top: 2px; }
.report-note { margin-top: 10px; }
.report-evidence { border-top: 1px solid var(--line); margin-top: 11px; }

.status { flex: 0 0 auto; border-radius: 24px; padding: 4px 9px; color: var(--muted); background: var(--paper); font-size: .85rem; font-weight: 700; white-space: nowrap; }
.status:empty { display: none; }
.status[data-status="done"] { background: var(--success-wash); color: var(--success); }
.status[data-status="running"], .status[data-status="queued"], .status[data-status="uploading"] { background: var(--primary-wash); color: var(--primary-deep); }
.status[data-status="failed"] { background: var(--danger-wash); color: var(--danger); }
.history-card { padding-block: 9px; }
.history { list-style: none; padding: 0; }
.history li + li { border-top: 1px solid var(--line); }
.history button { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 15px; align-items: center; text-align: left; width: 100%; min-height: 66px; border: 0; border-radius: var(--control); padding: 8px 9px; color: var(--ink); background: var(--surface); }
.history button:hover { background: var(--primary-wash); }
.record-name { display: grid; gap: 1px; }
.record-name .subtle { font-size: .87rem; }
.record-arrow { color: var(--primary-deep); font-size: 1.2rem; }
.empty-state { padding-block: 26px; }
.empty-state .primary { margin-top: 14px; }

.login-view { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); margin-block: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.login-intro, .login-form { min-width: 0; padding: clamp(24px, 5vw, 54px); }
.login-intro { display: grid; align-content: center; position: relative; isolation: isolate; overflow: hidden; min-height: 375px; background: var(--forest); color: white; }
.login-intro h1 { font-size: clamp(2.35rem, 5.6vw, 4.25rem); line-height: 1.09; }
.login-intro p { max-width: 27ch; margin-top: 18px; color: #dde8df; }
.court-lines { position: absolute; z-index: -1; inline-size: 80%; block-size: 80%; inset: 10% -26% auto auto; color: #8db5a273; border: 1px solid; border-radius: 50%; }
.court-lines::before { content: ""; position: absolute; inset: 21%; border: 1px solid; border-radius: 50%; }
.court-lines span { position: absolute; inset: 45% 0 0; border-top: 1px solid; }
.login-form label { display: block; margin: 15px 0 4px; font-weight: 690; }
.login-form input { width: 100%; height: var(--tap); border: 1px solid var(--line-strong); border-radius: var(--control); padding: 0 11px; background: var(--surface); color: var(--ink); font-size: 1rem; }
.password-field { position: relative; }
.password-field input { padding-inline-end: 64px; }
.password-field button { position: absolute; right: 1px; top: 1px; min-height: calc(var(--tap) - 2px); min-width: 54px; }
.login-form .primary { width: 100%; margin-top: 17px; }
.login-view[data-enter]:not([hidden]) { animation: enter .32s ease-out both; }
@keyframes enter { from { opacity: .7; transform: translateY(5px); } }
.task-grid:not([hidden]), .history-view:not([hidden]), #selected:not([hidden]), .result-body:not([hidden]), .picked-file:not([hidden]) {
  animation: panel-in var(--panel) var(--ease-out) both;
}
@keyframes panel-in { from { opacity: .72; } }
details[open] > :not(summary) { animation: panel-in var(--panel) var(--ease-out) both; }

@media (hover: hover) and (pointer: fine) {
  .primary:hover:not(:disabled), .play-media:hover { background: var(--primary-deep); transform: translateY(-1px); }
  .secondary:hover { border-color: var(--primary); background: var(--primary-wash); }
  .text-button:hover:not(:disabled) { background: var(--primary-wash); text-decoration: underline; text-underline-offset: .22em; }
  .text-button.danger:hover { background: var(--danger-wash); }
  .drill-choice:hover:not(:has(:disabled)), .file-box:hover { border-color: var(--primary); background: var(--primary-wash); }
  #next:hover span, .history button:hover .record-arrow { transform: translateX(3px); }
  .primary:not(:disabled):active, .play-media:active { transform: translateY(1px) scale(.985); }
}

@media (max-width: 860px) {
  :root { --side-gutter: 20px; }
  .header-inner { gap: 10px; }
  .work-nav { gap: 10px; }
  .page-heading { align-items: start; flex-direction: column; gap: 10px; }
}

@media (max-width: 680px) {
  :root { --side-gutter: 15px; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; column-gap: 9px; row-gap: 0; padding-top: 3px; min-height: 55px; }
  .brand { gap: 8px; }
  .brand-ball { flex-basis: 28px; width: 28px; height: 28px; }
  .account { grid-column: 2; grid-row: 1; max-width: 122px; }
  .account span { max-width: 67px; }
  .work-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; gap: 8px; }
  .work-nav a { flex: 1; }
  .shell { padding-top: 23px; }
  .page-heading { margin-bottom: 17px; }
  .workflow-steps { gap: 2px; }
  .workflow-steps li { padding-inline: 7px; gap: 5px; }
  .workflow-steps li span { width: 22px; height: 22px; }
  .task-grid, .upload-grid, .result-body, .login-view { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 16px; }
  .choice-actions { margin-top: 14px; }
  .mobile-shortcut { display: inline-flex; align-items: center; gap: 8px; }
  .demo-card:not([data-open]) { display: none; }
  #jump-shoot { margin-top: 2px; padding-inline: 0; }
  #jump-video { justify-self: start; }
  .choice-actions > .primary { flex: 1; }
  .drill-choices { margin-top: 12px; gap: 7px; }
  .drill-choice { min-height: 48px; }
  .drill-option:has(input:checked) .drill-choice { border-end-start-radius: 0; border-end-end-radius: 0; }
  .drill-option:has(input:checked) .watch-demo {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    padding-inline: 13px;
    border-color: var(--primary);
    border-top: 0;
    border-start-start-radius: 0;
    border-start-end-radius: 0;
  }
  .watch-demo span {
    display: grid;
    place-items: center;
    flex: 0 0 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-size: .63em;
  }
  .demo-stage { height: clamp(245px, 35vh, 325px); }
  .preview-stage { height: clamp(250px, 41vh, 360px); }
  .upload-actions .primary { flex: 1; }
  .detail-toolbar { margin-bottom: 10px; }
  .result-video { padding: 12px; }
  .report { padding: 12px; }
  .job-progress { padding: 11px; }
  .progress-steps li { padding-inline: 4px; gap: 5px; font-size: .81rem; }
  .history button { gap: 8px; }
  .login-view { gap: 0; margin: 0; }
  .login-intro { min-height: 155px; padding: 22px; }
  .login-intro h1 { font-size: 2rem; }
  .login-intro h1 br { display: none; }
  .login-intro p { max-width: 36ch; margin-top: 7px; }
  .login-form { padding: 22px; }
}

@media (max-width: 360px) {
  :root { --side-gutter: 11px; }
  .brand { font-size: .95rem; }
  .account span { max-width: 53px; }
  .card { padding: 13px; }
  .workflow-steps li { font-size: .83rem; padding-inline: 5px; }
  .progress-steps li { padding-inline: 2px; }
}

@media (max-width: 680px) and (min-height: 500px) {
  :root { scroll-padding-block-end: calc(92px + env(safe-area-inset-bottom)); }
  .shell:has(#workspace:not([hidden]) :is(#choose-screen, #upload-screen):not([hidden])) {
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }
  .choice-actions, .upload-actions {
    position: fixed;
    inset: auto 0 0;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 0;
    padding: 10px var(--safe-gutter) calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--surface);
    box-shadow: 0 -4px 18px #18372a10;
  }
  .choice-actions .primary { min-width: 0; }
  .choice-actions { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
  body { background: white; }
  .shell { padding: 0; width: auto; }
  .topbar, .skip, .detail-toolbar, .result-footer, .result-header, .result-video,
  #result-message, #retry, #print, #jump-video, .job-progress, .timing-details { display: none !important; }
  .print-only { display: block; }
  .result-card, .report { border: 0; padding: 0; margin: 0; }
  .result-body { display: block; margin: 0; }
  .practice-focus { border-inline-start: 2px solid #222; background: white; }
}
