@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@500;600;700;800&family=Manrope:wght@500;600;700;800&display=swap');
:root{font-family:Manrope,Arial,sans-serif;background:#d7ff43;color:#171331;font-synthesis:none}*{box-sizing:border-box}html,body{margin:0;min-width:320px}button{font:inherit;cursor:pointer}button,a{-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #ff6238;outline-offset:2px}.phone-app{min-height:100dvh;background:#fff9ec;max-width:480px;margin:auto;box-shadow:0 0 0 2px #17133120}.app-bar{height:55px;padding:0 17px;background:#d7ff43;display:flex;align-items:center;justify-content:space-between;border-bottom:2px solid #171331}.brand{display:flex;align-items:center;text-decoration:none;color:#171331;font:800 29px/1 'DM Sans',Arial,sans-serif;letter-spacing:-.1em}.brand>span{color:#fa5836;margin-right:10px}.brand small{font-size:12px;letter-spacing:-.04em}.app-status{display:flex;align-items:center;gap:7px;font-size:10px;font-weight:800;letter-spacing:.035em}.app-status b{background:#171331;color:#d7ff43;padding:6px}.app-status span{font-size:9px}.exercise-pager{height:52px;display:grid;grid-template-columns:repeat(3,1fr);background:#fff9ec;border-bottom:2px solid #171331}.exercise-pager button{border:0;border-right:2px solid #171331;background:transparent;display:flex;align-items:center;justify-content:center;gap:6px;color:#171331;font-weight:800;font-size:12px}.exercise-pager button:last-child{border-right:0}.exercise-pager button b{font:800 11px 'DM Sans',Arial,sans-serif}.exercise-pager button[aria-current=step]{background:#ff6238}.stage{height:clamp(310px,41.5dvh,430px);position:relative;overflow:hidden;background:#2b16d6;color:white}.stage canvas{display:block;width:100%;height:100%;touch-action:none}.stage-top{position:absolute;top:15px;left:16px;right:16px;display:flex;justify-content:space-between;gap:8px;pointer-events:none;font-size:10px;font-weight:800;letter-spacing:.06em}.phase-cue{position:absolute;left:16px;right:16px;bottom:52px;pointer-events:none;display:flex;flex-direction:column;gap:6px}.cue-kicker{align-self:flex-start;background:#d7ff43;color:#171331;padding:5px 8px;font-size:10px;font-weight:800;letter-spacing:.06em}.phase-cue strong{font:800 clamp(22px,6vw,29px)/1.1 'DM Sans',Arial,sans-serif;letter-spacing:-.045em;max-width:290px;text-shadow:0 2px 12px #170d9d88}.force-key{position:absolute;right:16px;top:42px;display:flex;align-items:center;gap:4px;color:#d7ff43;pointer-events:none;font-size:9px;font-weight:800;letter-spacing:.04em;opacity:0;transition:opacity .25s}.force-key.visible{opacity:1}.force-symbol{font-size:22px;line-height:1}.turn-hint{position:absolute;bottom:16px;right:16px;pointer-events:none;color:#fff;font-size:9px;font-weight:800;letter-spacing:.06em}.model-fallback{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:40px;background:#2b16d6;color:white;font-size:16px}.model-fallback[hidden]{display:none}.instruction-sheet{background:#fff9ec;border-top:2px solid #171331;padding:15px 17px 98px}.sheet-overline{display:flex;justify-content:space-between;gap:10px;font-size:9px;font-weight:800;letter-spacing:.04em}.instruction-sheet h1{font:800 clamp(27px,7.5vw,35px)/1.02 'DM Sans',Arial,sans-serif;letter-spacing:-.07em;margin:11px 0 8px}.instruction-sheet h1 em{font-style:normal;color:#2b16d6}.instruction-sheet>p{font-size:13px;line-height:1.4;font-weight:700;margin:0 0 14px}.phase-track{display:grid;grid-template-columns:repeat(4,1fr);gap:3px}.phase-track span{border-top:4px solid #ded8cd;padding-top:5px;color:#777184;font-size:9px;font-weight:800;line-height:1.15;min-width:0}.phase-track span b{display:block;font-size:10px;color:inherit;letter-spacing:-.025em}.phase-track span.current{border-color:#ff6238;color:#171331}.phase-track span.done{border-color:#2b16d6;color:#171331}.dose-line{display:flex;align-items:center;justify-content:space-between;gap:14px;border-top:2px solid #171331;margin-top:12px;padding-top:9px}.timer{display:flex;align-items:end;gap:7px}.timer strong{font:800 49px/.9 'DM Sans',Arial,sans-serif;letter-spacing:-.1em;font-variant-numeric:tabular-nums}.timer>span{font-size:9px;font-weight:800;line-height:1.1;padding-bottom:3px}.dose-facts{display:flex;flex-direction:column;gap:4px;text-align:right;font-size:10px;font-weight:800}.progress{height:4px;background:#ddd7d1;margin:10px 0 0}.progress span{display:block;width:0;height:100%;background:#ff6238;transition:width .15s linear}.source-details{border-top:1px solid #171331;margin-top:13px;padding-top:10px;font-size:13px;line-height:1.5}.source-details summary{list-style:none;display:flex;justify-content:space-between;align-items:center;font-size:11px;font-weight:800;cursor:pointer;min-height:30px}.source-details summary::-webkit-details-marker{display:none}.source-details summary span{font-size:20px;line-height:1}.source-details[open] summary span{transform:rotate(45deg)}.source-details p{font-size:12px;line-height:1.5;margin:11px 0}.source-details a{display:block;color:#2b16d6;font-size:12px;font-weight:800;text-underline-offset:3px;margin:10px 0}.control-dock{position:fixed;z-index:10;left:50%;bottom:0;transform:translateX(-50%);width:min(100%,480px);padding:9px 15px calc(9px + env(safe-area-inset-bottom));display:flex;gap:8px;background:#d7ff43;border-top:2px solid #171331;box-shadow:0 -8px 22px #1713311f}.primary-action,.reset-action{border:2px solid #171331;min-height:58px;color:#171331;font-weight:800}.primary-action{flex:1;display:flex;align-items:center;justify-content:space-between;text-align:left;padding:10px 16px;background:#ff6238;font-size:15px}.primary-action span{font-size:20px;line-height:1}.reset-action{width:60px;background:#fff9ec;font-size:29px}.reset-action[hidden]{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-height:720px){.stage{height:310px}.instruction-sheet{padding-bottom:96px}}
@media(min-width:700px){body{padding:24px 0}.phone-app{min-height:900px;border:2px solid #171331}.control-dock{bottom:24px;width:480px}.stage{height:430px}}
@media(prefers-reduced-motion:reduce){.force-key,.progress span{transition:none}}

/* Production guided session: full seated illustration and thumb controls. */
.phone-app{padding-bottom:calc(155px + env(safe-area-inset-bottom))}
[hidden]{display:none!important}
.app-bar{height:60px;border-bottom:3px solid #171331}
.app-status{background:#171331;color:#d7ff43;padding:7px;font-size:10px;font-weight:800;text-align:center;line-height:1.15}
.intro{padding:18px 17px 20px;background:#d7ff43;border-bottom:3px solid #171331}
.intro-kicker{margin:0 0 6px!important;font-size:10px!important;letter-spacing:.08em;font-weight:800!important}
.intro h1{font:800 clamp(30px,9vw,43px)/.98 'DM Sans',Arial,sans-serif;letter-spacing:-.065em;margin:0 0 11px}
.intro h1 em{font-style:normal;color:#2b16d6}
.intro p{font-size:12px;line-height:1.42;font-weight:700;margin:0 0 6px}
.intro-timing{font-size:11px!important;opacity:.84}
body.session-started .intro{display:none}
.exercise-pager{min-height:56px;height:auto;grid-template-columns:repeat(3,minmax(0,1fr));border-bottom:3px solid #171331}
.exercise-pager button{min-width:0;padding:6px 2px}
.stage{height:410px}
.stage canvas{display:block;width:100%;height:100%;touch-action:pan-y}
.stage svg{position:absolute;left:0;top:30px;width:100%;height:300px;display:block}
.stage-top{z-index:2}
.floor{fill:none;stroke:#9d79ff;stroke-width:6}
.body path{fill:none;stroke:#ecc5b2;stroke-width:27;stroke-linecap:round;stroke-linejoin:round}
.body circle{fill:#ecc5b2}
.leg-shape path{fill:none;stroke:#ecc5b2;stroke-width:28;stroke-linecap:round;stroke-linejoin:round}
.foot-shape{fill:#ffd6ba;stroke:#e6aa9d;stroke-width:3}
.contact-dot{fill:#d7ff43;stroke:#171331;stroke-width:2}
.band-prop>path:not(:last-child){fill:none;stroke:#d7ff43;stroke-width:5;stroke-linecap:round}
.force-arrow path{fill:none;stroke:#d7ff43;stroke-width:5;stroke-linecap:round}
.label-contact path,.label-knee path,.label-towel path{fill:none;stroke:#fff9ec;stroke-width:1.5}
.label-contact rect,.label-knee rect,.label-towel rect{fill:#d7ff43}
.label-contact text,.label-knee text,.label-towel text{font:800 10px Manrope,Arial,sans-serif;fill:#171331}
.phase-cue{z-index:2;bottom:36px}
.diagram-key{position:absolute;bottom:5px;right:16px;font-size:9px;font-weight:800;margin:0;letter-spacing:.04em}
.instruction-sheet{border-top:3px solid #171331;padding-bottom:20px}
.instruction-sheet h2{font:800 clamp(26px,7.5vw,35px)/1.02 'DM Sans',Arial,sans-serif;letter-spacing:-.065em;margin:11px 0 8px}
.instruction-sheet h2 em{font-style:normal;color:#2b16d6}
.rest-note{font-size:11px!important;line-height:1.35!important;color:#4b4265}
.control-dock{padding:7px 12px calc(8px + env(safe-area-inset-bottom));display:grid;gap:7px;border-top:3px solid #171331}
.control-row{display:flex;gap:6px;min-width:0}
.control-row button{min-width:0;border:2px solid #171331;min-height:47px;font-weight:800;color:#171331}
.minor-action{flex:1;background:#fff9ec;font-size:10px;padding:4px}
.primary-action{flex:1;min-height:50px;font-size:14px;line-height:1.1;padding:7px 10px}
.skip-action{width:94px;background:#fff9ec;font-size:11px;padding:4px}
.no-script{position:fixed;bottom:150px;background:#fff9ec;padding:12px;z-index:20}
@media(max-width:340px){.exercise-pager button{font-size:11px}.app-status{font-size:9px}.phase-track span b{font-size:9px}.dose-facts{font-size:9px}}
@media(prefers-reduced-motion:reduce){.progress span{transition:none}}
.stage svg{top:27px;height:250px}
.animation-warning{position:absolute;top:45px;left:16px;right:16px;background:#d7ff43;color:#171331;padding:10px;font-size:12px;font-weight:800;z-index:4}
.intro-more{font-size:11px;font-weight:800;margin-top:6px}
.intro-more summary{cursor:pointer;min-height:25px;text-decoration:underline;text-underline-offset:3px}
.intro-more p{font-size:11px;margin:4px 0 0}

/* Quiet, high-contrast visual system for the approved 3D guide. */
:root{background:#e9e7de;color:#1c3136}
.phone-app{background:#f7f5ee;box-shadow:0 0 0 1px #c8d0c8}
.app-bar{background:#f7f5ee;border-bottom:1px solid #cad6ce}
.brand{color:#1c3136}.brand>span{color:#e97051}
.app-status{background:#193f45;color:#f7f5ee;border-radius:3px;font-size:9px;letter-spacing:.04em}
.intro{background:#f7f5ee;border-bottom:1px solid #cad6ce;padding:17px 17px 18px}
.intro-kicker{color:#477075}.intro h1{font-size:clamp(29px,8.6vw,40px);line-height:1.02;margin-bottom:9px}
.intro h1 em{color:#d8694c}.intro p{font-weight:600;line-height:1.47}
.intro-more{color:#356d72}.intro-more summary{text-decoration-color:#abc6bc}
.exercise-pager{background:#f7f5ee;border-bottom:1px solid #cad6ce}
.exercise-pager button{border-right:1px solid #cad6ce;color:#34545a}
.exercise-pager button[aria-current=step]{background:#f5cc85;color:#173f45}
.stage{background:#153b40;color:#f7f5ee;height:390px}
.stage-top{color:#d9e9dc;font-size:10px;letter-spacing:.08em}
.phase-cue{bottom:34px;gap:8px}
.cue-kicker{background:#f5ca78;color:#193f45;border-radius:2px;font-size:10px;letter-spacing:.08em}
.phase-cue strong{color:#fffaf0;text-shadow:0 2px 12px #09282ccc;font-size:clamp(19px,5.5vw,25px);line-height:1.12;max-width:350px}
.diagram-key{color:#d2e4d6}
.instruction-sheet{background:#f7f5ee;border-top:0;padding:18px 17px 20px}
.sheet-overline{color:#477075;letter-spacing:.06em}
.instruction-sheet h2{color:#1c3136;font-size:clamp(26px,7vw,32px);margin:12px 0 10px}
.instruction-sheet h2 em{color:#d8694c}
.instruction-sheet>p{font-weight:600;font-size:13px;line-height:1.55}
.phase-track span.current{border-color:#e97051}.phase-track span.done{border-color:#2a6e70}
.dose-line{border-top:1px solid #b6c6c1}.progress{background:#d6dfd7}.progress span{background:#e97051}
.rest-note{color:#4d6468!important;font-weight:600!important}
.source-details{border-color:#b6c6c1}.source-details a{color:#226d70}
.control-dock{background:#f7f5ee;border-top:1px solid #c2cec6;box-shadow:0 -5px 20px #1c313626}
.control-row button{border:1px solid #b9cac3;border-radius:3px;color:#1c3136}
.minor-action,.skip-action{background:#fffdf8}
.primary-action{background:#ed7654!important;border-color:#e66d4d!important;color:#fffaf0!important;font-size:15px}
.primary-action span{color:#fffaf0}
.animation-warning{background:#f5ca78;color:#1c3136;right:auto;max-width:calc(100% - 155px);font-size:10px;line-height:1.3}
@media(min-width:700px){.phone-app{border:1px solid #c8d0c8}.control-dock{border:1px solid #c2cec6}}
.stage-metrics{display:flex;align-items:center;gap:7px;white-space:nowrap}
.stage-metrics strong{background:#f5ca78;color:#193f45;padding:5px 7px;border-radius:2px;font-size:11px;line-height:1}
.stage-timer-panel{position:absolute;z-index:3;top:43px;right:16px;min-width:104px;min-height:86px;background:#f5ca78;color:#193f45;border-radius:3px;padding:7px 9px;display:grid;grid-template-columns:auto 1fr;align-items:end;gap:0 6px;box-shadow:0 4px 14px #09282c40}
.stage-timer-panel strong{font:800 43px/.9 'DM Sans',Arial,sans-serif;letter-spacing:-.08em;font-variant-numeric:tabular-nums}
.stage-timer-panel span{font-size:8px;font-weight:800;line-height:1.1;padding-bottom:3px}
.stage-timer-panel small{grid-column:1/-1;border-top:1px solid #193f4540;margin-top:5px;padding-top:4px;font-size:9px;font-weight:800;letter-spacing:.02em}
.dose-line{justify-content:flex-end;padding:7px 0;margin-top:12px;border-bottom:1px solid #b6c6c1}
.dose-facts{font-size:11px}
@media(max-width:340px){.stage-timer-panel{right:12px;min-width:96px}.stage-timer-panel strong{font-size:39px}}

/* The guide uses the visible Safari viewport; long reference text has its own view. */
html,body{height:100%;overflow:hidden}
.phone-app{height:var(--visible-height,100dvh);min-height:0;max-height:var(--visible-height,100dvh);padding:0;display:flex;flex-direction:column;overflow:hidden}
.app-bar{flex:none;height:calc(44px + var(--safe-top,env(safe-area-inset-top)));padding:var(--safe-top,env(safe-area-inset-top)) 11px 0;gap:7px}
.brand{font-size:25px;flex:none}.brand small{font-size:10px}
.app-status{font-size:8px;padding:5px;white-space:nowrap;margin-left:auto}
.history-shortcut{min-height:31px;flex:none;border:1px solid #aac2ba;border-radius:3px;background:#fffdf8;color:#1c3136;font-size:10px;font-weight:800;padding:3px 7px}
.intro{display:none}
.exercise-pager{flex:none;min-height:42px;height:42px}.exercise-pager button{font-size:11px;padding:3px 2px}
main{display:flex;flex:1;min-height:0;flex-direction:column;overflow:hidden}
.stage{height:auto;min-height:205px;flex:1}
.stage-top{top:9px;left:11px;right:11px;font-size:9px}
.stage-timer-panel{top:29px;right:10px;min-width:94px;min-height:71px;padding:5px 7px}
.stage-timer-panel strong{font-size:37px}.stage-timer-panel small{font-size:8px}
.phase-cue{left:11px;right:11px;bottom:12px;gap:5px}
.phase-cue strong{font-size:clamp(17px,4.7vw,21px);max-width:355px;line-height:1.1}
.cue-kicker{font-size:9px;padding:3px 6px}
.diagram-key{display:none}
.stage svg{top:9px;height:calc(100% - 18px)}
.instruction-sheet{flex:none;padding:8px 12px 7px}
.sheet-overline{font-size:8px}.instruction-sheet h2{font-size:clamp(20px,5.3vw,24px);margin:4px 0}
.instruction-sheet>p#exercise-summary{font-size:11.5px;line-height:1.25;margin:0 0 6px}
.phase-track span{font-size:8px;padding-top:3px;border-top-width:3px}.phase-track span b{font-size:9px}
.dose-line{justify-content:space-between;gap:4px;margin-top:5px;padding:4px 0;border-bottom:0}
.dose-facts,.dose-compact{font-size:9px;font-weight:800;white-space:nowrap}
.progress{margin:2px 0 0}
.instruction-sheet>p.source-compact{font-size:9px;line-height:1.2;color:#4d6468;margin:3px 0 0;font-weight:700}
.rest-note,.source-details{display:none}
.control-dock{position:relative;left:auto;bottom:auto;transform:none;width:100%;flex:none;padding:5px 10px calc(5px + var(--safe-bottom,env(safe-area-inset-bottom)));gap:4px;box-shadow:none}
.control-row{gap:5px}.control-row button{min-height:34px;font-size:10px;padding:3px 5px}
.primary-action{min-height:48px!important;font-size:14px!important;padding:7px 10px!important}
.skip-action{width:98px;font-size:10px}
.animation-warning{top:30px;left:10px;max-width:calc(100% - 126px)}
.view-return{border:1px solid #afc6bd;background:#fffdf8;color:#193f45;border-radius:3px;min-height:39px;padding:5px 12px;font-size:12px;font-weight:800}
.end-session-action{border:1px solid #c97d63;background:#f9e5dd;color:#763b2c;border-radius:3px;min-height:39px;padding:5px 9px;font-size:11px;font-weight:800;margin-left:7px}
body[data-view="info"] .phone-app{overflow-y:auto}
body[data-view="info"] .intro{display:block;flex:none;padding:14px 15px}
body[data-view="info"] .intro .view-return{margin-bottom:14px}
body[data-view="info"] .exercise-pager,body[data-view="info"] .stage,body[data-view="info"] .control-dock{display:none}
body[data-view="info"] main{display:block;overflow:visible;flex:none;min-height:auto}
body[data-view="info"] .instruction-sheet{padding:15px 16px 32px}
body[data-view="info"] .instruction-sheet>p#exercise-summary{font-size:14px;line-height:1.5;margin:8px 0 15px}
body[data-view="info"] .phase-track,body[data-view="info"] .dose-line,body[data-view="info"] .progress,body[data-view="info"] .source-compact{display:none}
body[data-view="info"] .rest-note,body[data-view="info"] .source-details{display:block}
body[data-view="history"] .intro,body[data-view="history"] .exercise-pager,body[data-view="history"] main,body[data-view="history"] .control-dock{display:none}
.history-view{flex:1;min-height:0;overflow-y:auto;padding:15px 14px calc(20px + var(--safe-bottom,env(safe-area-inset-bottom)));background:#f7f5ee}
.history-view h1{font:800 36px/1 'DM Sans',Arial,sans-serif;letter-spacing:-.06em;margin:15px 0 7px}.history-view h1 em{font-style:normal;color:#d8694c}
.history-intro{font-size:12px;line-height:1.45;font-weight:650;margin:0 0 10px}
.history-storage{font-size:11px;color:#42656b;font-weight:800;margin:0 0 13px}
.reported-action{width:100%;min-height:44px;text-align:left;border:1px solid #d28a68;border-radius:3px;background:#f5ca78;color:#193f45;font-size:12px;font-weight:800;padding:8px 10px;margin:0 0 12px}
.history-card{border:1px solid #b9cac3;border-radius:4px;background:#fffdf8;padding:13px;margin:0 0 10px}
.history-card header{display:flex;justify-content:space-between;gap:8px;align-items:start}
.history-card h2{font:800 18px/1.1 'DM Sans',Arial,sans-serif;margin:0 0 5px;letter-spacing:-.025em}
.history-card strong{font-size:10px;background:#f5ca78;color:#193f45;padding:4px 5px;border-radius:2px;white-space:nowrap}
.history-card p{font-size:11px;line-height:1.45;margin:5px 0;color:#315358}
.history-card details{border-top:1px solid #c5d2ca;margin-top:9px;padding-top:7px}
.history-card summary{font-size:11px;font-weight:800;min-height:26px;cursor:pointer}
.history-card ul{list-style:none;padding:0;margin:5px 0 0}.history-card li{font-size:11px;line-height:1.45;padding:4px 0;border-top:1px solid #e7ebe4}
.history-empty{padding:18px;border:1px dashed #9db8af;font-size:13px;line-height:1.45}
body.compact-height .stage{min-height:180px}
body.compact-height .phase-cue strong{font-size:16px}
body.compact-height .instruction-sheet{padding-top:5px;padding-bottom:5px}
body.compact-height .instruction-sheet h2{font-size:19px;margin:2px 0}
body.compact-height .instruction-sheet>p#exercise-summary{font-size:10.5px;margin-bottom:3px}
body.compact-height .control-row button{min-height:31px}
body.compact-height .primary-action{min-height:44px!important}
@media(min-width:700px){body{padding:0}.phone-app{min-height:0}.control-dock{bottom:auto;width:100%}.stage{height:auto}}
