/* Active typing is a viewport-sized workspace; only the passage scrolls. */
.typing-active .topbar{height:56px}
.typing-active body{overflow:hidden}
.typing-active .workspace{height:calc(100dvh - 56px);padding:14px 28px 12px;display:flex;flex-direction:column;max-width:1150px}
.typing-active .footer{display:none}
.typing-active .preview-banner{padding:5px 10px;margin-bottom:8px;flex-shrink:0}
.typing-active #page{flex:1;min-height:0}
.typing-stage{display:flex;flex-direction:column;height:100%;min-height:0}
.typing-stage .typing-head{margin-bottom:4px;flex-shrink:0;gap:16px}
.typing-stage .typing-head h1{font-size:22px;letter-spacing:-.5px;margin:0 0 4px}
.typing-stage .eyebrow{font-size:9px;margin-bottom:5px}
.typing-stage .recording{font-size:10px;margin:0}
.typing-stage .metrics{gap:24px}
.typing-stage .metric strong{font-size:23px}
.typing-stage .typebox{flex:1;min-height:80px;margin:10px 0 0;padding:15px 22px;overflow:hidden}
.typing-stage .passage{max-height:none;height:100%;font-size:21px;line-height:1.8;scroll-behavior:smooth}
.typing-stage .typehint{margin:7px 0 0;font-size:10px;flex-shrink:0}
.typing-stage .controls{margin:8px 0 7px;flex-shrink:0}
.guide-rig{position:relative;max-width:720px;width:100%;margin:0 auto;flex-shrink:0;isolation:isolate}
.guide-rig .keyboard{margin:0;max-width:none}
.guide-rig .key{height:34px;min-width:39px;font-size:10px;transition:background .08s,transform .08s}
.guide-rig .key.big{min-width:60px}
.guide-rig .key.space{width:250px}
.guide-rig .keyrow{margin:4px 0;gap:5px}
.hand-overlay{position:absolute;inset:0 0 17px;pointer-events:none;z-index:2}
.hand-svg{width:100%;height:100%;overflow:visible}
.hand-palm{fill:#e9aac5;fill-opacity:.16;stroke:#bd789b;stroke-opacity:.25;stroke-width:1.5}
.overlay-finger{fill:#d8a9be;fill-opacity:.15;stroke:#b37c98;stroke-opacity:.3;stroke-width:1.5;transition:fill-opacity .08s,stroke .08s}
.overlay-finger.active{fill:var(--primary-color);fill-opacity:.27;stroke:var(--primary-color);stroke-opacity:.65}
.overlay-finger.pressed{fill:var(--green);fill-opacity:.48;stroke:var(--green);stroke-opacity:.9}
.guide-rig .finger-label{font-size:10px;margin-top:4px;height:14px;text-align:center}
.typing-stage #save-state:empty{display:none}
.typing-stage #save-state:not(:empty){max-height:110px;overflow:auto;flex-shrink:0}
[data-theme=dark] .overlay-finger{fill:#efb1d2;stroke:#efb1d2}
@media(max-height:700px){.typing-active .workspace{padding-top:8px;padding-bottom:7px}.typing-stage .typing-head h1{font-size:18px}.typing-stage .recording{font-size:9px}.typing-stage .eyebrow{margin:0 0 3px}.guide-rig .key{height:29px}.guide-rig .keyrow{margin:3px 0}.typing-stage .passage{font-size:19px;line-height:1.7}.typing-stage .typebox{padding:10px 18px}.typing-stage .typehint{display:none}.typing-stage .controls{margin:5px 0}.typing-active .preview-banner{font-size:9px;padding:3px 8px}}
@media(max-width:1100px){.typing-active .sidebar{width:180px}.typing-active .shell{grid-template-columns:180px minmax(0,1fr)}.typing-active .workspace{padding-left:18px;padding-right:18px}.guide-rig .key{min-width:30px}.guide-rig .key.big{min-width:48px}.typing-stage .metrics{gap:14px}.typing-stage .typing-head h1{font-size:18px}}
@media(prefers-reduced-motion:reduce){.overlay-finger,.guide-rig .key{transition:none}.typing-stage .passage{scroll-behavior:auto}}
.content-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:24px 0}
.content-card h2{margin-top:16px;font-size:17px;line-height:1.5}
.content-audience{font-size:12px;line-height:1.8;color:var(--text2);min-height:48px}
.content-card details{border-top:1px solid var(--border);padding-top:15px;margin-top:18px}
.content-card summary{cursor:pointer;color:var(--primary-color);font-size:12px;font-weight:600}
.content-preview{font-size:13px;line-height:1.9;max-height:300px;overflow:auto;color:var(--text);padding-right:8px}
.content-rules ul{padding-left:20px;font-size:12px;line-height:2;color:var(--text2)}
@media(max-width:1100px){.content-grid{grid-template-columns:1fr}.content-audience{min-height:0}}

/* Original moving hands share key coordinates and do not intercept typing. */
.articulated .overlay-finger,.articulated .hand-palm{transition:d 130ms ease-out,fill-opacity 80ms;stroke-linejoin:round}
.articulated .hand-palm{fill:#e9aac5;fill-opacity:.15;stroke:#bd789b;stroke-opacity:.3;stroke-width:1.5}
.competition-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-top:24px}.competition-card h2{margin:16px 0}.competition-card .result-actions{flex-wrap:wrap;gap:10px}.competition-rules{display:grid;grid-template-columns:100px 1fr;font-size:12px;line-height:2}.competition-rules dt{color:var(--text2)}.competition-rules dd{margin:0}.muted-card{background:var(--card);border-style:dashed}.muted-card .badge{opacity:.75}
#competition-form{display:grid;gap:20px}#competition-form input:not([type=checkbox]),#competition-form textarea,.review-form input{font:inherit;padding:11px;border:1px solid var(--border);border-radius:8px;background:var(--bg);color:var(--text)}#competition-form textarea{width:100%;resize:vertical}.participant-picker{display:grid;grid-template-columns:1fr 2fr;gap:20px}.participant-picker fieldset{border:1px solid var(--border);border-radius:10px;padding:16px;min-width:0}.participant-picker label:not(.field){display:block;font-size:13px;padding:7px 0}.roster-list{max-height:280px;overflow:auto}.roster-list small{color:var(--text2)}.review-form{padding:18px 0;border-top:1px solid var(--border)}.own-result{background:color-mix(in srgb,var(--primary-color) 8%,transparent)}
@media(max-width:1100px){.competition-grid{grid-template-columns:1fr}}@media(prefers-reduced-motion:reduce){.articulated .overlay-finger,.articulated .hand-palm{transition:none}}
/* Fixed-proportion hands, with fingertip and key cues. */
.natural-hand{fill:#d9ad9a;fill-opacity:.19;stroke:#9c776c;stroke-opacity:.38;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.palm-detail{fill:none;stroke:#a07a6b;stroke-opacity:.2;stroke-width:1.2}.fingertip{fill:transparent;stroke:transparent;stroke-width:1.5}.fingertip.active{fill:var(--primary-color);fill-opacity:.5;stroke:var(--primary-color);stroke-opacity:.9}.fingertip.pressed{fill:var(--green);fill-opacity:.75}.natural-hands [data-hand]{transition:transform 110ms ease-out}.key-cue{fill:var(--primary-color);fill-opacity:.8;stroke:var(--card);stroke-width:1.5}.shift-cue{fill:var(--primary-color);fill-opacity:.65}
[data-theme=dark] .natural-hand{fill:#d6c4ba;fill-opacity:.15;stroke:#e4c6b7;stroke-opacity:.4}[data-theme=dark] .palm-detail{stroke:#e4c6b7;stroke-opacity:.3}
.goal-panel{display:grid;grid-template-columns:2fr 1fr;gap:30px;align-items:center;margin-top:24px}.goal-panel h2{margin:0}.goal-panel form{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end}.goal-message{width:100%;font-size:12px;color:var(--primary-color)}.goal-track{height:9px;border-radius:20px;background:var(--bg);overflow:hidden;max-width:500px;margin:20px 0}.goal-track span{display:block;height:100%;border-radius:20px;background:var(--primary-color)}.trend-panel{margin-top:20px}.progress-chart{width:100%;height:auto;max-height:240px;margin-top:20px;overflow:visible}.progress-chart text{font-size:10px;fill:var(--text2)}.chart-grid{fill:none;stroke:var(--border);stroke-width:1;stroke-dasharray:3 5}.chart-line{fill:none;stroke:var(--primary-color);stroke-width:2.5;stroke-linejoin:round}.chart-point{fill:var(--primary-color);stroke:var(--card);stroke-width:2}.own-rank{display:flex;justify-content:space-between;gap:20px;background:color-mix(in srgb,var(--primary-color) 7%,var(--card));border:1px solid color-mix(in srgb,var(--primary-color) 20%,var(--border));padding:16px 20px;border-radius:12px;margin:22px 0;font-size:13px}.participation-tiles{gap:12px;margin:24px 0}.participation-tiles .resulttile{padding:18px}.participation-tiles strong{font-size:27px}.participation-table{max-height:520px;overflow:auto}.participation-table th{position:sticky;top:0;background:var(--card);z-index:1}#participation-search{font:inherit;padding:11px;border:1px solid var(--border);border-radius:8px;background:var(--bg);color:var(--text)}
@media(max-width:1100px){.goal-panel{grid-template-columns:1fr}.own-rank{flex-wrap:wrap}}@media(prefers-reduced-motion:reduce){.natural-hands [data-hand]{transition:none}}
/* Joint-driven guide: reserve a small area for fading wrists below the keys. */
.guide-rig{padding-bottom:68px}.guide-rig .finger-label{position:absolute;bottom:0;left:0;width:100%;margin:0}.reaching-hand{fill:#b1a8a1;fill-opacity:.21;stroke:#8c8580;stroke-opacity:.5;stroke-width:1.6;stroke-linejoin:round;transition:d 120ms ease-out}.hand-crease{fill:none;stroke:#9a9087;stroke-opacity:.2;stroke-width:1.2;transition:d 120ms ease-out}.reaching-hands .fingertip{transition:cx 120ms ease-out,cy 120ms ease-out,fill 70ms}.reaching-hands .fingertip.active{fill:var(--primary-color);fill-opacity:.35;stroke:var(--primary-color);stroke-opacity:.55}
[data-theme=dark] .reaching-hand{fill:#c7c1bc;fill-opacity:.18;stroke:#d5cec8;stroke-opacity:.35}.hand-overlay[hidden]{display:none}.guide-rig:has(.hand-overlay[hidden]){padding-bottom:0}
@media(max-height:700px){.guide-rig{padding-bottom:48px}.typing-stage .typing-head h1{font-size:17px}.typing-stage .typebox{min-height:65px}.guide-rig .key{height:27px}.typing-stage .recording{font-size:9px}}
@media(prefers-reduced-motion:reduce){.reaching-hand,.hand-crease,.reaching-hands .fingertip{transition:none}}
/* Hands are retired. Compact key colours and a text cue provide guidance. */
.guide-rig{padding-bottom:23px}.guide-rig .finger-label{height:auto;min-height:16px;font-size:11px;color:var(--text2)}
.finger-colours .key[data-finger-group$='-pinky']{--finger-tint:#d4538f}.finger-colours .key[data-finger-group$='-ring']{--finger-tint:#bd8221}.finger-colours .key[data-finger-group$='-middle']{--finger-tint:#258d69}.finger-colours .key[data-finger-group$='-index']{--finger-tint:#3884ce}.finger-colours .key[data-finger-group$='-thumb']{--finger-tint:#8c61c1}
.finger-colours .key[data-finger-group]:not([data-finger-group='']){background:color-mix(in srgb,var(--finger-tint) 11%,var(--card));border-bottom:3px solid color-mix(in srgb,var(--finger-tint) 70%,var(--border))}
.guide-rig .keyboard .key.target{background:var(--primary-color);color:white;border-color:var(--primary-color);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary-color) 20%,transparent)}
.guide-rig .keyboard .key.pressed{background:var(--green);color:white;border-color:var(--green)}
