:root{color-scheme:light;--bg:#f7f9fa;--canvas:#e6edf2;--surface:#fff;--surface-2:#edf3f6;--line:#cbd7df;--text:#14263e;--muted:#53677a;--action:#c9ec5d;--accent:#2b5683;--score:#285a87;--counter-bg:#e0f4a8;--counter-text:#14263e;--icon-bg:#e8f1f6;--selected-bg:#f3fbdc;--camera-top:#d8e7ef;--camera-bottom:#f5f9fb;--toast-bg:#152a45;--toast-text:#fff;--nav-bg:#f7f9faf2;--compete-bg:#edf6df;--compete-line:#c7dfa0;--ease:cubic-bezier(.23,1,.32,1);font-family:"Avenir Next",Avenir,"SF Pro Display",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none}
:root[data-theme=dark]{color-scheme:dark;--bg:#0e1c32;--canvas:#091427;--surface:#192a43;--surface-2:#20334d;--line:#344b67;--text:#f3f7fa;--muted:#a9bad0;--action:#d7f26a;--accent:#d7f26a;--score:#d7f26a;--counter-bg:#d7f26a;--counter-text:#14263e;--icon-bg:#243a55;--selected-bg:#273c38;--camera-top:#253d5b;--camera-bottom:#15263e;--toast-bg:#20314c;--toast-text:#f3f7fa;--nav-bg:#0e1c32f5;--compete-bg:#203543;--compete-line:#4f6a62}
.hide{visibility: hidden!important;display: none!important;}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;min-width:320px;background:var(--canvas);color:var(--text);-webkit-font-smoothing:antialiased}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,a:focus-visible{outline:2px solid var(--score);outline-offset:3px}button:active:not(:disabled){transform:scale(.975)}.app{position:relative;min-height:100dvh;max-width:520px;margin:auto;padding:0 24px 112px;background:var(--bg);box-shadow:0 24px 80px #0003}.topbar{height:82px;display:flex;align-items:center;justify-content:space-between}.wordmark{color:var(--text);font-size:24px;font-weight:800;letter-spacing:-.07em;text-decoration:none}.wordmark span{color:var(--action)}.wordmark .wordmark__dot{color:var(--action)}.topbar__tag{border:1px solid var(--line);border-radius:99px;padding:8px 11px;color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.14em}.view{padding-top:26px}.view[hidden]{display:none}.eyebrow{margin:0;color:var(--muted);font-size:10px;font-weight:800;letter-spacing:.17em;line-height:1.3}.eyebrow--accent{color:var(--accent)}h1,h2,p{margin-top:0}h1{margin:12px 0 14px;font-size:clamp(42px,11vw,60px);line-height:1.02;letter-spacing:-.065em;font-weight:760}h1 em{color:var(--score);font-style:normal}.home-heading>p:last-child,.view-intro{max-width:390px;color:var(--muted);font-size:15px;line-height:1.55}.home-heading{margin-bottom:32px}.hero-card{position:relative;min-height:350px;overflow:hidden;border-radius:28px;background:var(--action);color:#14263e}.hero-card__art{position:absolute;inset:0;overflow:hidden}.orbit{position:absolute;border:1.5px solid #201d1880;border-radius:50%;width:410px;height:410px;right:-205px;top:-220px}.orbit--two{width:310px;height:310px;right:-130px;top:-130px}.hero-card__glyph{position:absolute;right:28px;top:14px;font-size:150px;line-height:1;font-weight:300;transform:rotate(-20deg)}.hero-card__content{position:absolute;z-index:1;inset:auto 24px 24px}.hero-card .eyebrow{color:#28221b}.hero-card h2{margin:10px 0 2px;font-size:39px;letter-spacing:-.06em}.hero-card p{font-size:14px}.button{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:58px;padding:0 19px;border:0;border-radius:14px;font-weight:750;transition:transform 140ms var(--ease),background-color 160ms var(--ease)}.button span{font-size:23px;font-weight:400}.button--light{background:#f7f5ee;color:#14263e}.button--primary{background:var(--action);color:#14263e}.section-block{margin-top:37px}.section-head{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:16px}.section-head h2{margin:7px 0 0;font-size:25px;letter-spacing:-.045em}.text-button{border:0;background:none;color:var(--score);font-size:13px;font-weight:700}.text-button span{margin-left:5px}.set-list{display:grid;gap:9px}.empty-state{margin:0;padding:26px 18px;border:1px dashed var(--line);border-radius:17px;color:var(--muted);font-size:14px;line-height:1.5}.set-row{display:grid;grid-template-columns:44px 1fr auto;align-items:center;gap:12px;padding:14px;border:1px solid var(--line);border-radius:17px;background:var(--surface)}.set-row__icon{display:grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--icon-bg);color:var(--score);font-size:23px}.set-row strong{display:block;font-size:14px}.set-row small{display:block;margin-top:3px;color:var(--muted);font-size:12px}.set-row__reps{font-size:20px;font-weight:800;letter-spacing:-.04em}.set-row__reps small{display:inline;font-size:11px;font-weight:600;letter-spacing:0}.back-button{display:flex;align-items:center;gap:9px;margin:0 0 45px;padding:8px 0;border:0;background:none;color:var(--muted);font-size:14px}.back-button span{font-size:22px}.movement-list{display:grid;gap:12px;margin-top:31px}.movement-card{display:grid;grid-template-columns:62px 1fr 22px;align-items:center;gap:12px;width:100%;min-height:101px;padding:12px;border:1px solid var(--line);border-radius:19px;background:var(--surface);color:var(--text);text-align:left;transition:transform 140ms var(--ease),border-color 160ms var(--ease),background-color 160ms var(--ease)}.movement-card[aria-checked=true]{border-color:var(--action);background:var(--selected-bg)}.movement-card__symbol{display:grid;place-items:center;width:62px;height:62px;border-radius:13px;background:var(--surface-2);color:var(--score);font-size:39px;line-height:1}.movement-card strong{display:block;font-size:17px}.movement-card small{display:block;margin-top:4px;color:var(--muted);font-size:12px}.movement-card__check{display:grid;place-items:center;width:22px;height:22px;border:1px solid var(--line);border-radius:50%;color:transparent;font-size:12px}.movement-card[aria-checked=true] .movement-card__check{border-color:var(--action);background:var(--action);color:#111}.view-footer{margin-top:36px}.camera-box{display:grid;place-items:center;position:relative;overflow:hidden;min-height:260px;margin:27px 0 12px;border:1px solid var(--line);border-radius:20px;background:radial-gradient(circle at 50% 45%,var(--camera-top),var(--camera-bottom) 70%)}.camera-box video{width:100%;height:260px;object-fit:cover;transform:scaleX(-1)}#camera-placeholder{text-align:center}.camera-icon{display:block;color:var(--score);font-size:68px;line-height:1}#camera-placeholder strong,#camera-placeholder small{display:block}#camera-placeholder strong{margin-top:12px}#camera-placeholder small{margin-top:5px;color:var(--muted);font-size:12px}.secondary-button{width:100%;min-height:48px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);font-size:14px;font-weight:700}.inline-status{min-height:19px;margin:10px 0 0;color:var(--muted);font-size:12px}.session-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:35px}.counter-card{margin-top:35px;padding:30px 22px 25px;border-radius:28px;background:var(--counter-bg);color:var(--counter-text);text-align:center}.counter-card .eyebrow{color:#3b5366}.counter-card output{display:block;margin:14px 0 22px;font-size:clamp(98px,29vw,150px);font-weight:800;line-height:1;letter-spacing:-.085em}.counter-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px}.counter-controls button{height:74px;border:0;border-radius:17px;background:#14263e;color:var(--action);font-size:46px;line-height:1;transition:transform 140ms var(--ease)}.counter-controls button:first-child{background:#d9f56e;color:#14263e}.counter-card p{margin:18px 0 0;color:#344c63;font-size:12px}.history-summary{display:flex;align-items:center;justify-content:space-between;margin:32px 0 22px;padding:19px 22px;border-radius:17px;background:var(--surface)}.history-summary strong{color:var(--score);font-size:32px;line-height:1}.global-status{position:fixed;z-index:5;bottom:88px;left:50%;width:min(calc(100% - 32px),480px);margin:0;padding:13px 16px;border:1px solid var(--line);border-radius:13px;background:var(--toast-bg);color:var(--toast-text);font-size:13px;line-height:1.4;box-shadow:0 12px 32px #0005;transform:translateX(-50%)}.global-status[hidden]{display:none}.bottom-nav{position:fixed;z-index:4;bottom:0;left:50%;display:flex;width:min(100%,520px);height:calc(70px + env(safe-area-inset-bottom));padding:7px 24px env(safe-area-inset-bottom);border-top:1px solid var(--line);background:var(--nav-bg);transform:translateX(-50%);backdrop-filter:blur(12px)}.bottom-nav[hidden]{display:none}.bottom-nav button{display:grid;place-items:center;align-content:center;gap:2px;flex:1;border:0;background:none;color:var(--muted);font-size:11px;font-weight:700}.bottom-nav button span{font-size:23px;line-height:1.1}.bottom-nav button[aria-current=page]{color:var(--score)}@media(max-width:520px){body{background:var(--bg)}.app{box-shadow:none}}@media(min-width:521px){.app{min-height:100vh}}@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.button,.movement-card,.counter-controls button{transition:none}}
.session-camera{position:relative;overflow:hidden;height:clamp(210px,53vw,280px);margin-top:25px;border:1px solid var(--line);border-radius:20px;background:var(--surface)}
.session-camera video{width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}
.session-camera__label{position:absolute;left:12px;top:12px;padding:7px 9px;border-radius:7px;background:#1119;color:var(--score);font-size:9px;font-weight:800;letter-spacing:.14em}
.view--session .counter-card{margin-top:14px;padding:20px 20px 17px}
.view--session .counter-card output{margin:9px 0 4px;font-size:clamp(72px,22vw,108px)}
.view--session .counter-card p{min-height:19px;margin-top:5px;font-size:13px;font-weight:700}

.auth-form { display: grid; gap: 18px; margin: 28px 0 20px; }
.auth-form label { display: grid; gap: 8px; font-weight: 700; }
.auth-form input { width: 100%; box-sizing: border-box; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; }
.auth-form input:focus { outline: 2px solid var(--score); outline-offset: 2px; }
.auth-password{display:grid;gap:8px;font-weight:700}.auth-password__control{position:relative}.auth-form .auth-password__control input{padding-right:58px}.auth-password__control button{position:absolute;top:50%;right:5px;display:grid;place-items:center;width:44px;height:44px;padding:0;transform:translateY(-50%);border:0;border-radius:9px;background:transparent;color:var(--muted);cursor:pointer}.auth-password__control button:hover,.auth-password__control button[aria-pressed=true]{color:var(--text)}.auth-password__control button:focus-visible{outline:2px solid var(--score);outline-offset:-3px}.auth-password__control svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#auth-error { min-height: 1.3em; }

.presence-pill{display:inline-flex;align-items:center;gap:10px;margin:0 0 28px;padding:11px 17px;border:1px solid #484d40;border-radius:999px;background:#f7f7f1;color:#535b52;box-shadow:0 12px 30px #0002;font-size:16px}.presence-pill strong{font-size:16px;font-weight:800}.presence-pill strong:last-child{color:#128452}.presence-pill__separator{height:21px;width:1px;background:#cbd0c5}.presence-pill__dot{width:12px;height:12px;border-radius:50%;background:#25bd7a;box-shadow:0 0 0 5px #25bd7a20}.progress-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:-9px 0 23px}.progress-tile{display:grid;gap:7px;min-height:82px;padding:13px 12px;border:1px solid var(--line);border-radius:15px;background:var(--surface)}.progress-tile span{color:var(--muted);font-size:9px;font-weight:800;letter-spacing:.11em}.progress-tile strong{color:var(--score);font-size:23px;line-height:1.1}.compete-banner{display:flex;align-items:center;justify-content:space-between;width:100%;margin-top:20px;padding:17px;border:1px solid var(--compete-line);border-radius:17px;background:var(--compete-bg);color:var(--text);text-align:left}.compete-banner strong,.compete-banner small{display:block}.compete-banner small{margin-top:4px;color:var(--muted);font-size:12px}.compete-banner>span:last-child{color:var(--score);font-size:28px}.arena-actions{display:grid;gap:10px;margin-top:28px}.code-form{display:grid;gap:10px;margin-top:24px;font-size:13px;font-weight:750}.code-form__heading,.code-form__entry{display:flex;align-items:center;gap:8px}.code-form__heading{width:max-content}.code-form input{min-width:0;flex:1;padding:13px;border:1px solid var(--line);border-radius:11px;background:var(--surface);color:var(--text);font:inherit;letter-spacing:.12em;text-transform:uppercase}.code-form__entry button{align-self:stretch;padding:0 19px;border:0;border-radius:11px;background:var(--action);color:#14263e;font-weight:800}.code-info-button{display:grid;width:44px;height:44px;margin:-7px;padding:0;border:0;border-radius:50%;place-items:center;background:transparent;color:var(--muted)}.code-info-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.code-info-button[aria-expanded="true"]{background:var(--surface);color:var(--score)}.code-form__help{max-width:310px;margin:-2px 0 0;padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:var(--surface);color:var(--muted);font-size:11px;font-weight:600;line-height:1.45}.code-form__help[hidden]{display:none}.duel-list,.leaderboard-list{display:grid;gap:9px}.duel-card,.leader-row{padding:15px;border:1px solid var(--line);border-radius:15px;background:var(--surface)}.duel-card__top,.leader-row{display:flex;justify-content:space-between;align-items:center;gap:12px}.duel-card strong,.leader-row strong{font-size:14px}.duel-card small,.leader-row small{display:block;margin-top:4px;color:var(--muted);font-size:12px}.duel-card button{margin-top:12px;padding:8px 12px;border:1px solid var(--score);border-radius:9px;background:none;color:var(--score);font-size:12px;font-weight:750}.duel-card code{color:var(--score);font-size:15px;letter-spacing:.12em}.leader-row__score{color:var(--score);font-weight:800;white-space:nowrap}.leader-row__rank{width:27px;color:var(--muted);font-weight:800}
.bottom-nav button[hidden], .progress-grid[hidden], #personal-activity[hidden], #my-challenges[hidden], .demo-result[hidden] { display:none }
#auth-switch{display:block;width:100%;padding:8px 0;text-align:left}
.activity-list { display:grid; gap:9px }
.activity-card { display:flex; align-items:center; gap:12px; padding:13px; border:1px solid var(--line); border-radius:17px; background:var(--surface) }
.activity-card__avatar { display:grid; place-items:center; flex:none; width:42px; height:42px; border-radius:13px; background:var(--icon-bg); color:var(--score); font-weight:800 }
.activity-card__info { flex:1; min-width:0 }
.activity-card__info strong { display:block; overflow:hidden; text-overflow:ellipsis; font-size:14px }
.activity-card__info small { display:block; margin-top:3px; color:var(--muted); font-size:12px }
.activity-card__xp { color:var(--score); font-size:14px; white-space:nowrap }
.movement-card__symbol svg { display:block; width:52px; height:52px }
.demo-result { margin-top:20px; padding:18px; border:1px solid var(--score); border-radius:17px; background:var(--surface) }
.demo-result p { margin:6px 0 12px; color:var(--muted); font-size:13px; line-height:1.5 }
.global-status { top:calc(env(safe-area-inset-top) + 12px); bottom:auto; display:flex; align-items:center; gap:12px; min-height:62px; padding:12px 12px 12px 14px; border:1px solid #ffb2a1; border-left:5px solid #ff7456; border-radius:16px; background:#32221f; color:#fffaf6; box-shadow:0 16px 40px #0005; font-size:14px; font-weight:700; line-height:1.4 }
.global-status[data-tone=success] { border-color:#9acf80; border-left-color:#79d651; background:#213321 }
.global-status__icon { display:grid; place-items:center; flex:none; width:28px; height:28px; border-radius:50%; background:#ff7456; color:#1b1715; font-size:17px; font-weight:900 }
.global-status[data-tone=success] .global-status__icon { background:#9ce879 }
.global-status p { flex:1; margin:0 }
.global-status button { display:grid; place-items:center; flex:none; width:32px; height:32px; padding:0; border:0; border-radius:50%; background:#ffffff1b; color:#fff; font-size:23px; line-height:1 }
.global-status[hidden] { display:none }
.gym-section { margin:0 0 24px }
.gym-section .section-head { margin-bottom:12px }
.gym-section__live { display:inline-flex; align-items:center; gap:6px; color:var(--muted); font-size:11px; font-weight:750 }
.gym-section__live span { width:8px; height:8px; border-radius:50%; background:#28bd79 }
.gym-scene { position:relative; height:clamp(280px,82vw,360px); overflow:hidden; border:1px solid var(--line); border-radius:22px; background:#b9cbd7 }
.gym-scene canvas { display:block; width:100%; height:100%; touch-action:pan-y; cursor:grab }
.gym-scene canvas:active { cursor:grabbing }
.gym-scene__fallback { position:absolute; top:50%; left:50%; width:80%; margin:0; color:#2b5074; font-size:13px; text-align:center; transform:translate(-50%,-50%) }
.gym-scene__people { position:absolute; z-index:2; inset:0; pointer-events:none }
.gym-scene__people button { position:absolute; z-index:1; max-width:112px; overflow:hidden; padding:5px 8px; border:0; border-radius:99px; background:#277be5; color:#fff; box-shadow:0 3px 10px #0005; font-size:11px; font-weight:800; text-overflow:ellipsis; white-space:nowrap; transform:translate(-50%,-100%); pointer-events:auto }
.gym-scene__people .gym-scene__me { z-index:2; max-width:150px; border:1px solid #ecfab3; background:#d9f56e; color:#14263e; box-shadow:0 4px 15px #0b203080 }
.gym-scene__people .gym-scene__active { max-width:175px; border:1px solid #d9f56e; background:#14263e; color:#d9f56e }
.gym-scene__people .gym-scene__me.gym-scene__active { background:#d9f56e; color:#14263e }
.gym-scene__people button:focus-visible { outline:2px solid #fff; outline-offset:2px }
.gym-scene__people button:active:not(:disabled) { transform:translate(-50%,-100%) scale(.97) }
.gym-scene__brand { position:absolute; top:15px; right:15px; padding:5px 9px; border-radius:5px; background:#c9ec5d; color:#fff; font-size:11px; font-weight:900; letter-spacing:-.04em; pointer-events:none }
.gym-scene__brand span { color:#e8f9aa }
.gym-section__hint { margin:8px 2px 0; color:var(--muted); font-size:11px; line-height:1.4 }
.gym-player-detail { display:flex; justify-content:space-between; gap:10px; margin-top:9px; padding:11px 13px; border:1px solid var(--line); border-radius:12px; background:var(--surface); font-size:12px }
.gym-player-detail strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
.gym-player-detail span { color:#d9f56e; font-weight:800; white-space:nowrap }
.gym-player-detail[hidden] { display:none }

.topbar__actions{display:flex;align-items:center;gap:8px}.theme-select{max-width:90px;padding:7px 3px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--text);font-family:inherit;font-size:12px;font-weight:700}.theme-select:focus-visible{outline:2px solid var(--score);outline-offset:2px}.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-width:370px){.wordmark{font-size:21px}.topbar__actions{gap:4px}.theme-select{max-width:78px;font-size:11px}}
body:has(#home:not([hidden])) .app { max-width:none; padding:0; box-shadow:none }
body:has(#home:not([hidden])) .topbar { position:absolute; z-index:12; top:0; left:0; right:0; height:76px; padding:0 22px; color:#fff }
body:has(#home:not([hidden])) .wordmark, body:has(#home:not([hidden])) #account-button { color:#fff }
body:has(#home:not([hidden])) .theme-select { border-color:#ffffff66; background:#142a49bb; color:#fff }
body:has(#home:not([hidden])) .bottom-nav { width:100%; max-width:none; justify-content:center; border:0; background:linear-gradient(0deg,#0b1a30e8,#0b1a3000); backdrop-filter:none }
body:has(#home:not([hidden])) .bottom-nav button { flex:none; width:min(25vw,150px); color:#e2edf5 }
body:has(#home:not([hidden])) .bottom-nav button[aria-current=page] { color:#d9f56e }
#home { padding:0 }
#home .gym-section { position:relative; width:100%; height:100dvh; min-height:560px; margin:0; overflow:hidden; background:#b9cbd7 }
#home .gym-scene { position:absolute; inset:0; width:100%; height:100%; border:0; border-radius:0 }
#home .gym-scene canvas { touch-action:none }
#home .gym-scene::after { content:""; position:absolute; z-index:1; inset:0; background:linear-gradient(180deg,#10213b93 0%,transparent 23%,transparent 46%,#0b1a30a8 72%,#0b1a30e8 100%); pointer-events:none }
#home .gym-scene__brand { top:86px; right:22px; z-index:2 }
#home .gym-scene__fallback { z-index:2; color:#1d3d5e; font-weight:750 }
.gym-viewport__top { position:absolute; z-index:4; top:86px; left:22px; display:grid; justify-items:start; gap:10px }
#home .presence-pill { margin:0; padding:7px 12px; gap:8px; font-size:13px; box-shadow:0 8px 24px #0003 }
#home .presence-pill strong { font-size:13px }
#home .presence-pill__dot { width:9px; height:9px }
.gym-viewport__badge { padding:6px 9px; border:1px solid #ffffff75; border-radius:8px; background:#142a499c; color:#fff; font-size:9px; font-weight:900; letter-spacing:.13em }
#home .home-heading { position:absolute; z-index:4; right:22px; bottom:calc(100px + env(safe-area-inset-bottom)); left:22px; max-width:390px; margin:0; color:#fff; text-shadow:0 2px 15px #0b1a30a6; pointer-events:none }
#home .home-heading h1 { margin:0 0 18px; font-size:clamp(38px,9.5vw,60px) }
#home .home-heading h1 em { color:#d9f56e }
#home .home-heading button { pointer-events:auto }
#home .home-heading .button { max-width:280px; min-height:52px; text-shadow:none }
.gym-viewport__explore { margin-top:10px; padding:7px 0; border:0; background:none; color:#fff; font-size:12px; font-weight:800; text-decoration:underline; text-underline-offset:3px }
.gym-zoom { position:absolute; z-index:4; top:41%; right:16px; display:grid; gap:4px; padding:5px; border:1px solid #ffffff6b; border-radius:15px; background:#142a49bc; box-shadow:0 8px 25px #0004 }
.gym-zoom[hidden] { display:none }
.gym-zoom-toggle { visibility:hidden; position:absolute; z-index:4; top:41%; right:16px; display:grid; place-items:center; width:44px; height:44px; padding:0; border:1px solid #ffffff85; border-radius:14px; background:#142a49ba; color:#fff; box-shadow:0 8px 25px #0004 }
.gym-zoom-toggle svg { width:22px; height:22px }
.gym-zoom-toggle[aria-expanded=true] { right:70px }
.gym-zoom button { display:grid; place-items:center; width:38px; height:38px; padding:0; border:0; border-radius:10px; background:#ffffff1d; color:#fff; font-size:24px; line-height:1 }
.gym-zoom button:last-child { font-size:20px }
#home .gym-section__hint { position:absolute; z-index:4; top:160px; left:22px; margin:0; color:#fff; font-size:11px; text-shadow:0 2px 8px #000a }
#home .gym-player-detail { position:absolute; z-index:4; top:190px; left:22px; max-width:min(300px,calc(100% - 80px)); margin:0; border-color:#ffffff75; background:#142a49e8; color:#fff }
#home .gym-player-detail span { color:#d9f56e }
#home .home-body { max-width:520px; margin:auto; padding:32px 24px 100px }
#home .home-body .progress-grid { margin:0 0 24px }
#home .gym-scene__people { z-index:3 }
@media(max-height:650px){#home .gym-section{min-height:500px}#home .home-heading h1{font-size:38px}#home .gym-section__hint{display:none}}

body.sheet-open{overflow:hidden}
.sheet-backdrop{position:fixed;z-index:18;inset:0;background:#0b1a30b8;backdrop-filter:blur(3px)}
.sheet-backdrop[hidden]{display:none}
.view--sheet{position:fixed;z-index:19;bottom:0;left:50%;box-sizing:border-box;width:min(100%,520px);max-height:calc(100dvh - 176px - env(safe-area-inset-top));overflow-y:auto;overscroll-behavior:contain;padding:12px 22px calc(28px + env(safe-area-inset-bottom));border:1px solid var(--line);border-bottom:0;border-radius:28px 28px 0 0;background:var(--bg);box-shadow:0 -20px 70px #0005;transform:translateX(-50%)}
.view--sheet[hidden]{display:none}
.view--sheet:focus{outline:none}
.sheet-handle{display:block;width:42px;height:5px;margin:0 auto 12px;border-radius:999px;background:var(--line)}
.view--sheet h1{margin:8px 0 10px;font-size:clamp(34px,8vw,48px)}
.view--sheet .view-intro{margin-bottom:18px}
.view--sheet .view-footer{position:sticky;bottom:calc(-28px - env(safe-area-inset-bottom));z-index:1;margin-top:18px;padding:14px 0 calc(12px + env(safe-area-inset-bottom));background:var(--bg)}
.view--sheet .movement-list{margin-top:20px;gap:10px}
.view--sheet .movement-card{min-height:88px}
.global-status{z-index:30}
@media(min-width:521px){.view--sheet{bottom:16px;max-height:calc(100dvh - 192px);border-bottom:1px solid var(--line);border-radius:28px}}
@media(max-width:370px){.view--sheet{padding:10px 16px calc(16px + env(safe-area-inset-bottom))}.view--sheet h1{font-size:32px}.view--sheet .movement-list{margin-top:12px;gap:8px}.view--sheet .movement-card{min-height:76px}.view--sheet .view-intro{margin-bottom:10px}.view--sheet .view-footer{margin-top:8px;padding-top:8px}}
.topbar{position:sticky;z-index:12;top:0;height:68px;background:var(--bg)}
body:has(#home:not([hidden])) .topbar{background:transparent}
.view:not(#home):not(.view--sheet){padding-top:8px}
.view:not(#home):not(.view--sheet) .back-button{margin-bottom:18px}
#setup .camera-box{margin-top:20px}
body.sheet-open:has(#home:not([hidden])) .topbar{position:fixed;z-index:22;top:0;left:0;right:0;background:transparent}
body.sheet-open #home .gym-viewport__top{position:fixed;z-index:21}

/* Game shell */
.topbar,body:has(#home:not([hidden])) .topbar,body.sheet-open:has(#home:not([hidden])) .topbar{position:fixed;z-index:32;top:calc(10px + env(safe-area-inset-top));right:auto;left:50%;display:flex;width:min(calc(100% - 24px),560px);height:56px;padding:7px 9px 7px 14px;border:1px solid #ffffff26;border-radius:19px;background:#10243fe8;color:#fff;box-shadow:0 10px 32px #07162d38;transform:translateX(-50%);backdrop-filter:blur(16px)}
.topbar .wordmark,body:has(#home:not([hidden])) .wordmark{color:#fff;font-size:20px;white-space:nowrap}
.player-hud{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0}
.hud-xp{display:flex;align-items:baseline;gap:3px;padding:0 5px;color:#fff;white-space:nowrap}.hud-xp strong{font-size:14px}.hud-xp small{color:#b9cadd;font-size:8px;font-weight:900;letter-spacing:.08em}
.theme-select,body:has(#home:not([hidden])) .theme-select{width:48px;height:36px;padding:0 3px;border:1px solid #ffffff24;border-radius:11px;background:#ffffff10;color:#fff;font-size:10px}
.account-chip{display:flex;align-items:center;gap:6px;min-width:38px;max-width:92px;height:38px;padding:3px 8px 3px 3px;border:0;border-radius:12px;background:#ffffff12;color:#fff;font-size:11px;font-weight:800}.account-chip__avatar{display:grid;place-items:center;flex:none;width:31px;height:31px;border-radius:10px;background:var(--action);color:#14263e}.account-chip #account-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.status-rail{position:fixed;z-index:31;top:calc(74px + env(safe-area-inset-top));left:50%;display:flex;align-items:center;justify-content:center;gap:7px;width:min(calc(100% - 24px),560px);transform:translateX(-50%)}
.status-rail .presence-pill{display:flex;align-items:center;gap:6px;height:32px;margin:0;padding:0 10px;border:1px solid #ffffff26;border-radius:11px;background:#10243fd9;color:#dceaf3;box-shadow:0 8px 20px #07162d2e;font-size:11px;backdrop-filter:blur(12px)}.status-rail .presence-pill strong{font-size:11px}.status-rail .presence-pill strong:last-child{color:#55e59a}.status-rail .presence-pill__separator{height:14px;background:#ffffff2b}.status-rail .presence-pill__dot{width:7px;height:7px;box-shadow:0 0 0 3px #25bd7a20}
.daily-chip{display:flex;align-items:center;gap:4px;height:32px;padding:0 10px;border:1px solid #ffffff26;border-radius:11px;background:#10243fd9;color:#fff;font-size:10px;font-weight:750;box-shadow:0 8px 20px #07162d2e;backdrop-filter:blur(12px)}.daily-chip strong{color:#d9f56e;font-size:12px}

body:has(#home:not([hidden])) .app{padding:0}.app{padding:0 24px 100px}
.view:not(#home):not(.view--sheet){padding-top:calc(124px + env(safe-area-inset-top))}
.view:not(#home):not(.view--sheet) .back-button{margin-bottom:14px}
#home .gym-viewport__badge{position:absolute;z-index:4;top:calc(120px + env(safe-area-inset-top));right:16px}
#home .gym-section__hint{display:none}
#home .gym-scene__brand{display:none}
.live-nudge{position:absolute;z-index:5;top:calc(120px + env(safe-area-inset-top));left:16px;display:flex;align-items:center;gap:7px;max-width:calc(100% - 125px);height:32px;padding:0 4px 0 10px;border:1px solid #ffffff3b;border-radius:12px;background:#10243fdd;color:#fff;box-shadow:0 8px 24px #0003;font-size:11px;font-weight:750;backdrop-filter:blur(12px)}.live-nudge__dot{flex:none;width:7px;height:7px;border-radius:50%;background:#55e59a;box-shadow:0 0 0 3px #55e59a20}.live-nudge>span:nth-child(2){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.live-nudge button{display:grid;place-items:center;flex:none;width:26px;height:26px;padding:0;border:0;border-radius:9px;background:#ffffff16;color:#fff}
.home-actions{position:absolute;z-index:5;right:16px;bottom:calc(78px + env(safe-area-inset-bottom));left:16px;display:grid;grid-template-columns:1.15fr 1fr;gap:8px;max-width:430px;margin:auto}.home-action{display:flex;align-items:center;gap:10px;min-width:0;height:64px;padding:8px 12px;border:1px solid #ffffff32;border-radius:18px;background:#10243fe8;color:#fff;text-align:left;box-shadow:0 12px 32px #0004;backdrop-filter:blur(14px);transition:transform 140ms var(--ease),background-color 180ms var(--ease)}.home-action--primary{border-color:#e6f89d;background:var(--action);color:#14263e}.home-action__icon{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:12px;background:#ffffff19;font-size:22px}.home-action strong,.home-action small{display:block}.home-action strong{font-size:14px}.home-action small{margin-top:2px;color:#bdcfe0;font-size:10px}.home-action--primary small{color:#2a4016}
.demo-result--floating{position:absolute;z-index:6;right:16px;bottom:calc(154px + env(safe-area-inset-bottom));left:16px;max-width:430px;margin:auto;background:#10243fee;color:#fff}.demo-result--floating p{color:#c3cec7}

body:has(#home:not([hidden])) .bottom-nav{z-index:12;bottom:8px;width:min(calc(100% - 24px),560px);height:calc(62px + env(safe-area-inset-bottom));padding:5px 7px env(safe-area-inset-bottom);border:1px solid #ffffff24;border-radius:20px;background:#10243fee;box-shadow:0 10px 30px #0004;backdrop-filter:blur(16px)}
body:has(#home:not([hidden])) .bottom-nav button{width:auto;flex:1;color:#aebdb5}body:has(#home:not([hidden])) .bottom-nav button[aria-current=page]{border-radius:14px;background:#ffffff12;color:#d9f56e}.bottom-nav button span{font-size:19px}

.sheet-backdrop{z-index:18;background:#07130ebd;backdrop-filter:blur(2px)}
.view--sheet{z-index:20;max-height:none;overflow:visible;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;transform:translate(-50%,0);transition:transform 260ms cubic-bezier(.32,.72,0,1),opacity 180ms var(--ease)}
.sheet-surface{display:flex;max-height:calc(100dvh - 118px - env(safe-area-inset-top));padding-top:10px;overflow:hidden;flex-direction:column;border:1px solid var(--line);border-bottom:0;border-radius:26px 26px 0 0;background:var(--bg);box-shadow:0 -20px 65px #0006}
.sheet-content{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 22px calc(22px + env(safe-area-inset-bottom))}
.view--sheet-short{max-height:none}.view--sheet-short .sheet-surface{max-height:min(630px,calc(100dvh - 118px - env(safe-area-inset-top)))}
@starting-style{.view--sheet:not([hidden]){opacity:0;transform:translate(-50%,100%)}}
.sheet-handle{position:relative;width:70px;height:20px;margin:0 auto 1px;background:transparent;touch-action:none;cursor:grab}.sheet-handle::after{content:"";position:absolute;top:7px;left:14px;width:42px;height:5px;border-radius:999px;background:var(--line)}.sheet-handle:active{cursor:grabbing}.view--sheet h1{margin:6px 0 14px;font-size:clamp(34px,9vw,46px)}.view--sheet .view-footer{margin-top:14px;padding-top:10px}.view--sheet .movement-list{margin-top:10px}.view--sheet .movement-card{min-height:82px}
.svg-sprite{position:absolute;width:0;height:0;overflow:hidden}
.sheet-close{position:absolute;z-index:2;top:-22px;right:max(16px,env(safe-area-inset-right));display:flex;align-items:center;gap:8px;width:max-content;min-height:44px;margin:0;padding:0 17px;border:1px solid #ffffff17;border-radius:999px;background:#10243f;color:#fff;font-size:14px;font-weight:750;line-height:1;box-shadow:0 8px 22px #07162d45;transition:transform 140ms var(--ease),background-color 160ms var(--ease)}.sheet-close svg{flex:none;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
@media(hover:hover) and (pointer:fine){.sheet-close:hover{background:#1d3a5b}}
button[aria-busy="true"]{position:relative;overflow:hidden;cursor:wait}button[aria-busy="true"]:disabled{opacity:1}.button-loader{position:absolute;z-index:3;inset:0;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;border-radius:inherit;background:inherit;color:inherit;font-size:12px!important;font-weight:800!important;line-height:1!important}.text-button>.button-loader{background:var(--bg)}.button-loader__spinner{width:16px!important;height:16px!important;flex:none;border:2px solid color-mix(in srgb,currentColor 28%,transparent);border-top-color:currentColor;border-radius:50%;animation:button-loader-spin 700ms linear infinite}.button .button-loader__label{font-size:inherit;font-weight:inherit}@keyframes button-loader-spin{to{transform:rotate(1turn)}}
.arena-actions{grid-template-columns:repeat(3,1fr);gap:8px;margin-top:6px}.arena-action{display:grid;justify-items:start;min-width:0;min-height:88px;padding:11px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--text);text-align:left}.arena-action--primary{border-color:var(--action);background:var(--action);color:#14263e}.arena-action>span{font-size:21px}.arena-action strong{margin-top:5px;font-size:13px}.arena-action small{margin-top:2px;color:var(--muted);font-size:9px}.arena-action--primary small{color:#2a4016}.invite-share{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding:14px;border:1px solid var(--compete-line);border-radius:16px;background:var(--compete-bg)}.invite-share[hidden]{display:none}.invite-share>div{min-width:0}.invite-share strong,.invite-share small{display:block}.invite-share strong{margin-top:5px;color:var(--score);font-size:23px;letter-spacing:.13em}.invite-share small{margin-top:3px;color:var(--muted);font-size:10px}.invite-share button{flex:none;min-width:68px;min-height:44px;padding:0 14px;border:0;border-radius:12px;background:var(--action);color:#14263e;font-size:12px;font-weight:850}.code-form{margin-top:16px}.section-block{margin-top:26px}
.view--sheet .empty-state{padding:18px}
.daily-mark,.result-mark{display:grid;place-items:center;width:54px;height:54px;margin:5px 0 12px;border-radius:18px;background:var(--surface-2);font-size:28px}.result-mark{background:var(--action);color:#14263e;font-weight:900}.daily-reward{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border:1px solid var(--line);border-radius:15px;background:var(--surface)}.daily-reward span{color:var(--muted);font-size:11px}.daily-reward strong{color:var(--score);font-size:14px}
.profile-stats,.result-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.profile-stats>span,.result-stats>span{display:grid;gap:4px;padding:14px 10px;border:1px solid var(--line);border-radius:15px;background:var(--surface)}.stat-icon{width:25px;height:25px;margin-bottom:5px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.stat-icon--xp{color:var(--score)}.stat-icon--streak{color:var(--action)}.stat-icon--rank{color:#d9a829}.profile-stats strong,.result-stats strong{color:var(--score);font-size:22px}.profile-stats small,.result-stats small{color:var(--muted);font-size:9px;font-weight:850;text-transform:uppercase;letter-spacing:.08em}.profile-actions{display:grid;gap:12px;margin-top:18px}.profile-actions .text-button{justify-self:center;padding:8px;color:var(--accent)}
.result-score{display:flex;align-items:end;gap:10px;margin:4px 0 18px}.result-score strong{font-size:76px;line-height:.8;letter-spacing:-.08em}.result-score span{color:var(--muted);font-size:14px;font-weight:750}.result-stats[hidden]{display:none}

/* On-device movement coach */
#camera-placeholder{display:grid;width:100%;place-items:center;padding:16px 70px 16px 22px}
#camera-placeholder[hidden]{display:none}
.movement-guide{width:min(160px,52vw);color:var(--score)}
.movement-guide svg{display:block;width:100%;overflow:visible}
.movement-guide__pose{fill:none;stroke:currentColor;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;transform-origin:center}
.movement-guide__pose--squat,.movement-guide__pose--push{display:none}
.movement-guide[data-movement="push-ups"] .movement-guide__pose--push,.movement-guide[data-movement="squats"] .movement-guide__pose--squat{display:block}
.movement-guide__pose--start{animation:movement-pose-start 2.2s var(--ease) infinite}
.movement-guide__pose--finish{animation:movement-pose-finish 2.2s var(--ease) infinite}
@keyframes movement-pose-start{0%,38%{opacity:1;transform:translateY(0) scale(1)}52%,88%{opacity:0;transform:translateY(2px) scale(.98)}100%{opacity:1;transform:translateY(0) scale(1)}}
@keyframes movement-pose-finish{0%,38%{opacity:0;transform:translateY(-2px) scale(.98)}52%,88%{opacity:1;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-2px) scale(.98)}}
#camera-placeholder strong,#camera-placeholder small{display:block}
#camera-placeholder strong{margin-top:4px;font-size:14px}
#camera-placeholder small{margin-top:3px;color:var(--muted);font-size:10px}
.movement-guide--session{position:absolute;top:43px;left:10px;width:92px;padding:5px;border:1px solid #ffffff2d;border-radius:13px;background:#111a;color:#d9f56e;backdrop-filter:blur(7px)}
.motion-meter{--motion-progress:0;position:absolute;z-index:2;top:48px;right:11px;display:grid;justify-items:center;gap:4px;width:35px;padding:7px 5px;border:1px solid #ffffff2d;border-radius:14px;background:#111b;color:#fff;box-shadow:0 7px 20px #0004;backdrop-filter:blur(7px);transition:opacity 160ms var(--ease)}
.motion-meter>span:not(.motion-meter__track){font-size:7px;font-weight:900;letter-spacing:.08em}
.motion-meter__track{position:relative;width:7px;height:120px;border-radius:999px;background:linear-gradient(180deg,#d9f56e 0%,#d9f56e 48%,#80a6d1 52%,#80a6d1 100%);box-shadow:inset 0 0 0 2px #ffffff2f}
.motion-meter__track i{position:absolute;top:0;left:50%;width:15px;height:15px;border:3px solid #fff;border-radius:50%;background:#172e4b;box-shadow:0 3px 9px #0008;transform:translate(-50%,calc(var(--motion-progress) * 105px));transition:transform 120ms linear}
.motion-meter>strong{position:absolute;top:50%;right:43px;min-width:47px;padding:5px 7px;border-radius:8px;background:#111d;color:#d9f56e;font-size:8px;line-height:1;text-align:center;letter-spacing:.08em;transform:translateY(-50%);backdrop-filter:blur(6px)}
.motion-meter[data-ready="false"]{opacity:.5}.motion-meter[data-ready="false"] .motion-meter__track i{border-color:#b4c5cf}
.motion-meter--setup{top:28px;bottom:28px;background:color-mix(in srgb,var(--surface) 84%,transparent);color:var(--text);box-shadow:none}.motion-meter--setup>strong{background:var(--surface);color:var(--muted)}
.coach-cue{position:absolute;z-index:2;bottom:11px;left:11px;display:flex;align-items:baseline;gap:7px;max-width:calc(100% - 70px);padding:8px 11px;border:1px solid #ffffff2d;border-radius:12px;background:#111c;color:#fff;box-shadow:0 7px 20px #0004;backdrop-filter:blur(8px)}
.coach-cue strong{color:#d9f56e;font-size:18px;line-height:1}.coach-cue small{color:#dce7f0;font-size:9px;font-weight:750}.coach-cue.is-popping{animation:coach-pop 480ms var(--ease)}
@keyframes coach-pop{0%{opacity:.6;transform:translateY(7px) scale(.94)}55%{opacity:1;transform:translateY(-2px) scale(1.04)}100%{transform:translateY(0) scale(1)}}
.result-compare{display:grid;grid-template-columns:34px 1fr;align-items:start;gap:10px;margin:0 0 12px;padding:13px 14px;border:1px solid var(--compete-line);border-radius:15px;background:var(--compete-bg)}
.result-compare[hidden]{display:none}.result-compare>.stat-icon{width:27px;height:27px;margin:1px 0 0}.result-compare strong,.result-compare small{display:block}.result-compare strong{font-size:14px}.result-compare small{margin-top:3px;color:var(--muted);font-size:10px;line-height:1.4}.result-compare__track{display:block;height:6px;margin-top:9px;overflow:hidden;border-radius:999px;background:color-mix(in srgb,var(--line) 70%,transparent)}.result-compare__track i{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--action),var(--score));transition:width 480ms var(--ease)}

#setup .camera-box{margin-top:16px}.auth-form{gap:12px;margin:18px 0 14px}.auth-form input{padding:13px}.history-summary{margin:16px 0 14px}
@media(max-width:370px){.topbar,body:has(#home:not([hidden])) .topbar{padding-left:10px}.topbar .wordmark{font-size:18px}.hud-xp{padding:0 2px}.theme-select{width:43px}.account-chip{padding-right:3px}.account-chip #account-label{display:none}.status-rail{justify-content:flex-start;padding-left:4px}.home-actions{gap:6px}.home-action{padding:7px 9px}.home-action__icon{width:34px;height:34px}.sheet-content{padding-right:16px;padding-left:16px}.arena-action{padding:9px}.view:not(#home):not(.view--sheet){padding-top:calc(118px + env(safe-area-inset-top))}}
@media(min-width:521px){.view--sheet{bottom:12px;max-height:none;border:0;border-radius:0}.sheet-surface{max-height:calc(100dvh - 130px);border-bottom:1px solid var(--line);border-radius:26px}.view--sheet-short .sheet-surface{max-height:min(630px,calc(100dvh - 130px))}}
@media(prefers-reduced-motion:reduce){.view--sheet{transition:opacity 160ms ease}.home-action{transition:none}.button-loader__spinner,.movement-guide__pose,.coach-cue{animation:none}.movement-guide__pose--finish{opacity:0}.movement-guide__pose--start{opacity:1}.motion-meter__track i,.result-compare__track i{transition:none}}
.global-status{z-index:40;top:calc(env(safe-area-inset-top) + 116px)}
.ambient-toggle{display:grid;place-items:center;flex:none;width:36px;height:36px;padding:0;border:1px solid #ffffff24;border-radius:11px;background:#ffffff10;color:#fff}
.ambient-toggle svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ambient-toggle[aria-pressed="false"]{color:#aab8b0}
.ambient-toggle:focus-visible{outline:2px solid #d9f56e;outline-offset:2px}
@media(max-width:370px){.ambient-toggle{width:34px;height:34px}.ambient-toggle svg{width:18px;height:18px}}
.house-challenge-list{display:grid;gap:9px}.house-challenge-card{padding:16px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}.house-challenge-card__heading{display:flex;align-items:center;justify-content:space-between;gap:10px}.house-challenge-card__heading strong{font-size:15px}.house-challenge-card__heading span{color:var(--score);font-size:11px;font-weight:800;text-transform:uppercase}.house-challenge-card p{margin:7px 0 12px;color:var(--muted);font-size:12px}.house-challenge-card button{min-height:42px;padding:0 15px;border:1px solid var(--score);border-radius:10px;background:transparent;color:var(--score);font-size:12px;font-weight:750}
.cookie-note{position:fixed;z-index:15;bottom:calc(166px + env(safe-area-inset-bottom));left:50%;display:flex;align-items:center;gap:9px;width:min(calc(100% - 32px),430px);min-height:42px;padding:7px 8px 7px 13px;border:1px solid #ffffff30;border-radius:13px;background:#10243fee;color:#f4f8ef;box-shadow:0 9px 28px #07162d42;transform:translateX(-50%);backdrop-filter:blur(12px);font-size:12px;line-height:1.3}.cookie-note p{flex:1;margin:0}.cookie-note>span{font-size:15px}.cookie-note button{display:grid;place-items:center;flex:none;width:32px;height:32px;padding:0;border:0;border-radius:9px;background:#ffffff17;color:#fff;font-size:20px;line-height:1}.cookie-note[hidden],body.sheet-open .cookie-note,body:has(#home[hidden]) .cookie-note{display:none}
