:root{--bg:#f3f6f7;--fg:#0e1a22;--muted:#4b5a65;--panel:#fff;--panel-2:#e9eff1;--border:#cfd9de;--accent:#0f766e;--accent-strong:#0b5f58;--accent-fg:#fff;--accent-soft:#d5f3ee;--focus:#0f766e;--error:#b42318;--good:#15703a;--warn:#9a4a00;--stage:#05090c;--shadow:0 1px 2px #0e1a220f, 0 4px 16px #0e1a220f;--radius:14px;color:var(--fg);background:var(--bg);-webkit-text-size-adjust:100%;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;line-height:1.45}@media (prefers-color-scheme:dark){:root{--bg:#0a1016;--fg:#e5edf1;--muted:#9fb0bb;--panel:#111a22;--panel-2:#172430;--border:#253542;--accent:#2dd4bf;--accent-strong:#5eead4;--accent-fg:#04201d;--accent-soft:#0f3a37;--focus:#5eead4;--error:#ff8a80;--good:#4ade80;--warn:#fbbf24;--shadow:0 1px 2px #0006}}*{box-sizing:border-box}body{background:var(--bg);margin:0}.app{max-width:960px;padding:max(10px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));margin:0 auto}h1,h2,h3{line-height:1.25}:focus-visible{outline:3px solid var(--focus);outline-offset:2px}button,select{max-width:100%;font:inherit;border:1px solid var(--border);background:var(--panel);min-height:44px;color:var(--fg);border-radius:10px;padding:8px 14px;font-size:1rem}button{cursor:pointer;justify-content:center;align-items:center;gap:8px;display:inline-flex}button:disabled,select:disabled{opacity:.55;cursor:not-allowed}button.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-fg);min-width:120px;font-weight:650}button.primary:hover:not(:disabled){background:var(--accent-strong);border-color:var(--accent-strong)}.muted{color:var(--muted)}.small{font-size:.875rem}.topbar{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px 16px;margin-bottom:12px;display:flex}.brand{color:var(--accent);align-items:center;gap:10px;display:flex}.brand h1{letter-spacing:-.01em;color:var(--fg);margin:0;font-size:1.3rem}.subtitle{color:var(--muted);margin:0;font-size:.8rem}.logo-ring{opacity:.35}.modes{flex-wrap:wrap;flex:260px;justify-content:flex-end;align-items:center;gap:8px;display:flex}.segmented{background:var(--panel-2);border:1px solid var(--border);border-radius:12px;flex:200px;max-width:320px;padding:3px;display:flex}.seg{color:var(--muted);background:0 0;border:none;flex:1 1 0;font-weight:600}.seg-active{background:var(--panel);color:var(--fg);box-shadow:var(--shadow);text-decoration:underline;-webkit-text-decoration-color:var(--accent);text-decoration-color:var(--accent);text-underline-offset:6px;text-decoration-thickness:3px}.tools-link{color:var(--muted);background:0 0;border-color:#0000;padding:8px 10px}.tools-active{color:var(--fg);border-color:var(--border);background:var(--panel)}.steps{gap:6px;margin:0 0 12px;display:flex;overflow-x:auto}.step{min-width:0;color:var(--muted);border-color:var(--border);white-space:nowrap;background:0 0;flex:1 1 0;font-size:.9rem}.step-active{color:var(--fg);border-color:var(--accent);background:var(--accent-soft);font-weight:650}.panel,.card{background:var(--panel);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow)}.panel{margin:0 0 12px;padding:16px}.card{margin:12px 0;padding:12px 14px}.card h3{margin:0 0 8px;font-size:1.05rem}.card p{margin:6px 0}.setup-head{align-items:flex-start;gap:12px;display:flex}.setup-head>div:first-child{flex:auto;min-width:0}.eyebrow{letter-spacing:.04em;text-transform:uppercase;color:var(--accent);margin:0 0 2px;font-size:.8rem;font-weight:650}.setup h2{margin:0 0 6px;font-size:1.35rem}.setup-instruction,.setup-practise{margin:0 0 6px}.setup-figure{flex:none;width:96px}.setup-figure .illustration{width:96px}.start{width:100%;min-height:52px;margin:8px 0 4px;font-size:1.1rem}.options{grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px 12px;margin:8px 0;display:grid}.options label,.controls label{color:var(--muted);flex-direction:column;gap:4px;font-size:.875rem;display:flex}.options-note{grid-column:1/-1;margin:0}.status{margin:8px 0;font-size:1rem}.status-error{color:var(--error);font-weight:600}.stage{background:var(--stage);border-radius:var(--radius);width:100%;height:min(62vh,640px);position:relative;overflow:hidden}.stage video,.stage canvas{width:100%;height:100%;position:absolute;inset:0}.stage video{object-fit:contain}.stage video.mirrored{transform:scaleX(-1)}.stage--placeholder{background:var(--panel-2);border:2px dashed var(--border);height:auto;margin:0 0 12px}.stage--placeholder video,.stage--placeholder canvas{display:none}.camera-placeholder{color:var(--muted);align-items:center;gap:10px;padding:12px 14px;display:flex}.camera-placeholder svg{flex:none}.camera-placeholder p{margin:0;font-size:.9rem}.stage--hidden{display:none}.phase-live .stage{height:max(260px,100svh - 250px);max-height:760px}.phase-live .modes,.phase-live .subtitle{display:none}.phase-live .topbar{margin-bottom:8px}.hud{pointer-events:none;color:#fff;text-shadow:0 1px 3px #000c;flex-direction:column;justify-content:space-between;padding:12px;display:flex;position:absolute;inset:0}.hud-top{align-items:baseline;gap:12px;display:flex}.hud-count{font-variant-numeric:tabular-nums;font-size:clamp(3.5rem,18vw,6rem);font-weight:750;line-height:1}.hud-phase{font-size:1.25rem;font-weight:650}.hud-bottom{flex-direction:column;gap:8px;display:flex}.hud-rep{text-shadow:none;background:#0000009e;border-radius:10px;margin:0;padding:8px 12px;font-size:1rem}.hud-cue{text-shadow:none;background:#040c10d1;border-left:6px solid #2dd4bf;border-radius:12px;padding:10px 12px}.hud-cue p{margin:0;font-size:clamp(1.2rem,5.2vw,1.6rem);font-weight:650;line-height:1.3}.hud-cue .hud-why{margin-top:4px;font-size:.95rem;font-weight:400}.hud-cue-kind{letter-spacing:.05em;text-transform:uppercase;color:#04201d;background:#2dd4bf;border-radius:999px;margin-bottom:4px;padding:1px 8px;font-size:.75rem;font-weight:700;display:inline-block}.hud-cue-correction{border-left-color:#fbbf24}.hud-cue-correction .hud-cue-kind{color:#2a1a00;background:#fbbf24}.live-bar{z-index:2;margin:12px calc(-1 * max(16px, env(safe-area-inset-left))) 0;padding:8px max(16px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-bottom));background:color-mix(in srgb, var(--bg) 94%, transparent);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-top:1px solid var(--border);position:sticky;bottom:0}.live-bar .status{color:var(--muted);margin:0 0 6px;font-size:.875rem}.live-actions{align-items:center;gap:10px;display:flex}.live-actions .voice{flex:auto;min-width:0}.finish{flex:50%;min-height:52px;font-size:1.1rem}.live-hint{margin:6px 0 0}@media (height<=520px) and (orientation:landscape){.phase-live .stage{height:max(180px,100svh - 150px)}.phase-live .topbar,.live-hint{display:none}}.voice{flex-wrap:wrap;align-items:center;gap:6px 12px;margin-top:8px;display:flex}.voice p{flex-basis:100%;margin:0}.voice-switch{min-height:44px;color:var(--fg);cursor:pointer;align-items:center;gap:8px;font-size:1rem;font-weight:600;display:inline-flex}.voice-switch input{width:22px;height:22px;accent-color:var(--accent)}.voice-compact{gap:2px 10px;margin:0}.voice-compact p{color:var(--muted);font-size:.8rem}.controls{flex-wrap:wrap;align-items:end;gap:12px;margin:8px 0;display:flex}.diagnostics{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:8px;margin:16px 0;display:grid}.diagnostics div{background:var(--panel);border:1px solid var(--border);border-radius:8px;padding:8px 10px}.diagnostics dt{color:var(--muted);font-size:.8rem}.diagnostics dd{font-variant-numeric:tabular-nums;margin:2px 0 0;font-weight:600}.report{flex-wrap:wrap;gap:8px;margin:12px 0;display:flex}.report pre{background:var(--panel);border:1px solid var(--border);-webkit-user-select:text;user-select:text;border-radius:8px;flex-basis:100%;max-height:320px;padding:10px;font-size:.75rem;overflow:auto}footer{color:var(--muted);margin-top:24px;font-size:.85rem}footer a{color:inherit}.settings,.howto{margin:12px 0}.howto{padding:0 16px}.settings summary,.howto summary{cursor:pointer;align-items:center;gap:8px;min-height:48px;font-weight:600;display:flex}.howto summary{color:var(--accent)}.howto[open]{padding-bottom:12px}.set-so-far{font-size:1.1rem}.aspects{margin:0;padding:0;list-style:none}.aspect{border-left:4px solid var(--border);margin:4px 0;padding:6px 0 6px 10px}.aspect-met{border-left-color:var(--good)}.aspect-adjust{border-left-color:var(--warn)}.outcome-met{color:var(--good)}.outcome-adjust{color:var(--warn)}.outcome-partial,.outcome-unable{color:var(--muted)}.tally{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%}.tally th,.tally td{text-align:left;border-bottom:1px solid var(--border);padding:4px 6px}.practise{border-left:6px solid var(--accent)}.practise-correction{border-left-color:var(--warn)}.practise-title{font-size:1.2rem;font-weight:650}.next{width:100%;margin:0 0 12px}.lesson-cue{font-size:1.1rem;font-weight:650}.badge{border:1px solid var(--border);vertical-align:middle;border-radius:999px;padding:2px 8px;font-size:.75rem;font-weight:600;display:inline-block}.badge-checked{color:var(--fg)}.badge-not-checked{color:var(--muted)}.lesson-note{border-left:4px solid var(--accent);background:var(--panel-2);border-radius:0 8px 8px 0;margin:12px 0;padding:10px 12px}.figures{flex-wrap:wrap;gap:12px;display:flex}.illustration{text-align:center;width:132px;color:var(--muted);margin:0;font-size:.8rem}.illustration svg{width:100%;height:auto}.ill-body,.ill-good,.ill-warn,.ill-ghost{fill:none;stroke-width:4px;stroke-linecap:round;stroke-linejoin:round}.ill-body{stroke:var(--fg)}.ill-good{stroke:var(--good)}.ill-warn{stroke:var(--warn)}.ill-ghost{stroke:var(--border);fill:none}.ill-guide,.ill-arrow{fill:none;stroke:var(--accent);stroke-width:2px;stroke-dasharray:4 3}.ill-arrow{stroke-dasharray:none;stroke-width:3px}.history{margin:16px 0}.history h2{margin:0 0 8px;font-size:1.35rem}.set-card{padding:14px 16px;font-size:1.05rem}.set-title{font-size:1.1rem}.set-headline{font-size:1.25rem;font-weight:700;line-height:1.3}.set-adjust{border-left:6px solid var(--warn)}.set-no-adjustment{border-left:6px solid var(--good)}.set-partial,.set-unable,.set-no-reps{border-left:6px solid var(--border)}.set-totals,.set-range{margin:4px 0}.set-list{margin:8px 0;padding-left:20px}.set-list li{margin:6px 0}.reps{margin:10px 0}.reps summary{cursor:pointer;min-height:44px;color:var(--accent);align-items:center;font-weight:600;display:flex}.attempt-list{margin:12px 0;padding-left:0;list-style:none}.attempt{border-left:4px solid var(--border);overflow-wrap:anywhere;margin:10px 0;padding:2px 0 2px 12px}.attempt p{margin:4px 0}.attempt-rep[data-outcome=adjust],.attempt-not-counted{border-left-color:var(--accent)}.attempt-reference,.attempt-omitted{color:var(--muted)}.attempt-next{font-weight:650}.attempt-details summary{cursor:pointer;min-height:44px;color:var(--accent);align-items:center;display:flex}.attempt .checks{margin:6px 0;padding-left:20px}.attempt .checks li{margin:4px 0}@media (width>=720px){.setup-figure,.setup-figure .illustration{width:120px}}
