@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Outfit:wght@400;500;600;700;800;900&display=swap');
:root{--ink:#202641;--pink:#ff638b;--purple:#6254d9}*{box-sizing:border-box}body{margin:0;background:#c5e5f0;color:var(--ink);font-family:'DM Sans',sans-serif;overflow:hidden}button,input{font:inherit}button{cursor:pointer;border:0}button:disabled{cursor:wait;opacity:.5}button:hover{filter:brightness(1.04)}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--purple);outline-offset:3px}#world,.vignette{position:fixed;inset:0;width:100%;height:100%}.vignette{pointer-events:none;background:linear-gradient(90deg,rgba(239,245,248,.98) 0%,rgba(239,245,248,.90) 30%,rgba(239,245,248,0) 64%)}header{position:fixed;top:0;left:0;right:0;padding:26px 4%;display:flex;justify-content:space-between;align-items:center;z-index:5}.brand{font-family:Outfit,sans-serif;font-weight:900;font-size:21px;letter-spacing:-.8px;display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink)}.brand-run{color:var(--pink)}.brand-icon{display:grid;place-items:center;background:var(--ink);color:white;font-size:29px;width:39px;height:41px;border-radius:12px;transform:rotate(-7deg)}.header-right{display:flex;align-items:center;gap:12px}.online{font-size:11px;font-weight:700;display:flex;gap:7px;align-items:center;background:#ffffffb8;border:1px solid #fff8;border-radius:30px;padding:10px 13px}.online i{width:6px;height:6px;background:#48b993;border-radius:50%}.icon{width:35px;height:35px;border-radius:50%;background:#fff9;color:var(--ink);font-weight:bold}main{position:absolute;top:125px;left:7%;width:430px}.eyebrow{font-size:10px;font-weight:800;letter-spacing:2px;display:flex;align-items:center;gap:12px}.eyebrow span{background:#e1dcf9;color:#7866c5;padding:6px 8px;border-radius:4px;letter-spacing:1.2px}h1{font-family:Outfit,sans-serif;font-weight:900;font-size:clamp(48px,4.5vw,72px);line-height:1.02;letter-spacing:-3px;margin:22px 0 18px}h1 em{font-style:normal;color:var(--pink)}.intro{font-size:14px;line-height:1.7;color:#666c81}.tags{display:flex;gap:14px;font-size:10px;font-weight:600;margin:20px 0 28px;color:#747990}.play-card{background:#ffffffeb;border:1px solid #fff;border-radius:20px;padding:22px;box-shadow:0 12px 45px #34436e0b;width:365px}.card-top{display:flex;justify-content:space-between;margin-bottom:19px}.step-label{font-size:9px;font-weight:800;letter-spacing:1px}.capacity{font-size:10px;color:#76988c}label{display:block;font-size:11px;font-weight:600;margin-bottom:8px}.name-field{display:flex;align-items:center;background:#f4f5f9;border:1px solid #e9eaf1;border-radius:9px;padding:0 12px;margin-bottom:12px}.mini-bean{width:15px;height:20px;border-radius:8px 8px 6px 6px;background:var(--pink);position:relative}.mini-bean:after{content:'••';background:white;border-radius:4px;position:absolute;font-size:9px;top:3px;left:2px;color:var(--ink)}input{min-width:0;border:0;outline:0;background:transparent;color:var(--ink);padding:13px;font-size:12px;width:100%}input::placeholder{color:#a0a3b3}.primary{width:100%;display:flex;align-items:center;justify-content:space-between;padding:15px 18px;background:var(--pink);border-radius:9px;color:#fff;font-size:13px;font-weight:700;box-shadow:0 4px 0 #e44973}.primary span{font-size:20px;line-height:16px}.or{display:flex;align-items:center;gap:9px;font-size:9px;color:#a3a7b6;margin:19px 0 13px}.or span{flex:1;height:1px;background:#ececf2}#join-form{display:flex;gap:8px}#code{border:1px solid #e9eaf1;background:#f7f8fb;border-radius:8px;width:48%;letter-spacing:3px;text-transform:uppercase;font-size:11px}#join{flex:1;color:var(--ink);background:#efedf8;border-radius:8px;font-size:11px;font-weight:700}#join span{margin-left:12px}.card-foot{text-align:center;font-size:9px;color:#9699aa;margin:17px 0 0}#course-card{position:fixed;bottom:100px;right:4%;background:#ffffffe6;backdrop-filter:blur(12px);border:1px solid #fff;border-radius:15px;padding:20px 23px;width:330px;transform:rotate(-2deg);box-shadow:0 10px 35px #26475915}.small-label{font-size:8px;letter-spacing:1.6px;color:#8b8a9d;font-weight:700}#course-card h2{font:700 20px Outfit;margin:7px 0}#course-card h2 span{float:right;color:var(--pink)}#course-card p{font-size:10px;color:#858799}#course-card>div{border-top:1px solid #e5e6ec;padding-top:13px;margin-top:15px;display:flex;justify-content:space-between;font-size:8px;letter-spacing:1px;font-weight:700}footer{position:fixed;bottom:24px;left:4%;right:4%;display:flex;justify-content:space-between;font-size:9px;font-weight:600;letter-spacing:1.3px;color:#70798b}footer b{margin:0 10px}.hidden{display:none!important}.panel{position:absolute;left:7%;top:50%;transform:translateY(-45%);background:#fffffff2;backdrop-filter:blur(16px);padding:30px;border-radius:22px;width:380px;max-height:78vh;overflow:auto;box-shadow:0 16px 55px #33446c18}.panel h2,dialog h2{font:800 34px Outfit;margin:15px 0 8px;letter-spacing:-1px}.panel>p{font-size:12px;color:#8a8d9f}.room-code{display:block;width:100%;padding:18px;background:#f0edf9;color:var(--purple);border:1px dashed #c1b8e6;border-radius:10px;font:700 30px Outfit;letter-spacing:6px;margin:22px 0}.room-code small{font-size:19px}.roster-head{display:flex;justify-content:space-between;font-size:10px;letter-spacing:1px;font-weight:bold;margin:20px 0 12px}#roster{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:20px}.player-chip{display:flex;align-items:center;gap:8px;background:#f4f5f9;padding:10px;border-radius:8px;font-size:11px;overflow:hidden;white-space:nowrap}.dot{width:10px;height:15px;display:inline-block;flex-shrink:0;border-radius:6px}.text-button{background:transparent;color:#83889a;font-size:11px;display:block;margin:20px auto 0}.race-top,.race-bottom{position:fixed;left:4%;right:4%;display:flex;justify-content:space-between;pointer-events:none}.race-top{top:100px}.race-bottom{bottom:35px}.hud-card{background:#ffffffe6;padding:16px 22px;border-radius:13px;box-shadow:0 6px 20px #2131430b}.hud-card small{display:block;font-size:9px;letter-spacing:1.5px;font-weight:700;color:#84889e;margin-bottom:7px}.hud-card strong{font:800 26px Outfit}.hud-card>span{font-size:10px;color:#82889a}.timing{text-align:right}.progress{width:185px;height:6px;background:#e9e6f4;border-radius:8px;margin:10px 0}.progress i{display:block;height:100%;width:0;background:var(--pink);border-radius:8px}#countdown{position:fixed;top:42%;left:50%;transform:translate(-50%,-50%);font:900 100px Outfit;color:white;text-shadow:0 7px 0 #6354d9;pointer-events:none}#finished{position:fixed;top:35%;left:50%;transform:translateX(-50%);font:900 44px Outfit;color:#fff;text-shadow:0 3px 0 #5745a5;text-align:center}#finished small{display:block;font:500 15px 'DM Sans';margin-top:12px}.rank-row{display:flex;justify-content:space-between;align-items:center;padding:12px 3px;border-bottom:1px solid #ebeaf1;font-size:12px}.rank-row:last-child{margin-bottom:22px}.rank-row span{display:flex;align-items:center;gap:9px}.rank-row.mine{color:var(--purple);font-weight:700}#toast{position:fixed;bottom:30px;left:50%;transform:translateX(-50%) translateY(100px);opacity:0;transition:.25s;background:var(--ink);color:white;border-radius:12px;padding:14px 22px;font-size:12px;z-index:50;max-width:90vw;text-align:center}#toast.show{transform:translateX(-50%) translateY(0);opacity:1}dialog{border:0;border-radius:20px;padding:30px;width:430px;color:var(--ink);box-shadow:0 15px 70px #27304633}dialog::backdrop{background:#27304655;backdrop-filter:blur(7px)}dialog p{font-size:13px;line-height:1.8;color:#777e92}dialog small{font-size:10px;color:#9699aa}#close-help{float:right}body.playing .vignette{background:none}body.in-room .vignette{background:linear-gradient(90deg,#eef3f5dd,transparent 65%)}#mobile{position:fixed;bottom:130px;left:20px;right:20px;display:flex;justify-content:space-between;align-items:end;pointer-events:none}#mobile button{pointer-events:auto;touch-action:none;background:#ffffffa8;color:var(--ink);border:2px solid white;border-radius:15px;padding:16px;font-weight:800;user-select:none}
@media(min-height:900px){main{top:16%}.play-card{margin-top:32px}}@media(max-height:780px) and (min-width:701px){main{top:95px}h1{font-size:52px;margin:16px 0}.intro{margin:10px 0}.tags{margin:14px 0}.play-card{padding:18px}.card-top{margin-bottom:12px}#course-card{bottom:80px}}@media(max-width:700px){header{padding:18px 5%}.brand{font-size:17px}.brand-icon{width:32px;height:35px}.online{font-size:9px;padding:9px}.header-right{gap:6px}main{top:105px;left:7%;width:86%}h1{font-size:49px;letter-spacing:-2px;margin:17px 0 12px}.intro{font-size:12px}.tags{font-size:8px;gap:12px;margin:16px 0 22px}.play-card{width:100%;max-width:365px}.vignette{background:linear-gradient(90deg,#eef3f5ef,#eef3f5bb 60%,#eef3f522)}#course-card{display:none}footer{font-size:7px;bottom:14px}footer span:last-child{display:none}.panel{left:5%;width:90%;max-width:390px;transform:translateY(-43%)}.race-top{top:85px}.hud-card{padding:12px 15px}.hud-card strong{font-size:22px}#finished{font-size:29px;width:90%}.race-bottom{bottom:20px}#countdown{font-size:80px}}@media(max-height:710px) and (max-width:700px){body:not(.playing){overflow-y:auto}main{top:90px;padding-bottom:55px}h1{font-size:40px}.intro{margin:6px 0}.tags{margin:13px 0}.play-card{padding:18px}footer{position:fixed;background:#eef3f5cc}.eyebrow{font-size:8px}}
#race-room{font-size:9px;color:#9193a4;letter-spacing:2px;margin-top:8px}#standings{position:fixed;right:4%;top:210px;background:#ffffffdf;backdrop-filter:blur(12px);border-radius:13px;padding:15px 18px;width:210px;pointer-events:none}#standings>small{font-size:9px;font-weight:800;letter-spacing:1.5px;color:#88899a}.leader{display:flex;justify-content:space-between;gap:10px;margin-top:12px;font-size:11px}.leader span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.leader.me{color:#dd487a;font-weight:bold}#race-actions{position:fixed;bottom:36px;left:50%;transform:translateX(-50%);display:flex;gap:7px}#race-actions button{background:#ffffffe0;padding:12px 16px;color:#66617e;border-radius:9px;font-size:10px;box-shadow:0 3px 15px #20264110}#race-actions #spectate{background:#6254d9;color:white}#ability{position:fixed;left:4%;bottom:145px;display:grid;grid-template-columns:auto 1fr;gap:7px 10px;align-items:center;color:#726a8d;font-size:11px;background:#ffffffdd;padding:12px 16px;border-radius:12px}#ability>b{background:#ece8f7;border:1px solid #d5cbea;border-bottom-width:3px;padding:7px;border-radius:6px;font-size:10px}#ability.ready>b{background:#ffe2ea;color:#d74170;border-color:#ffa9c0}#ability small{grid-column:1/-1;color:#9590a6;font-size:9px}.touch-actions{display:flex;flex-direction:column;gap:8px}#countdown{animation:countPulse 1s infinite}@keyframes countPulse{0%{scale:1.12}45%,100%{scale:1}}#mobile #dive-touch{background:#ffccdee0}#finished{pointer-events:none}#finished small{white-space:nowrap}
@media(max-width:700px){#standings{top:205px;width:155px;padding:12px;right:4%;background:#ffffffb8}.leader{font-size:9px;margin-top:8px}#ability{bottom:280px;font-size:9px;padding:10px}#ability small{display:none}#race-actions{bottom:98px;width:max-content}#race-actions button{font-size:9px;padding:10px}#stage-name{max-width:155px;font-size:8px}#race-room{font-size:8px}#mobile{bottom:142px}#finished small{white-space:normal}}
#section-banner{position:fixed;top:31%;left:50%;transform:translate(-50%,-10px);opacity:0;pointer-events:none;background:#6254d9ee;box-shadow:0 8px 0 #4936b666;color:#fff;padding:18px 30px;border-radius:14px;font:900 clamp(17px,3vw,35px) Outfit;white-space:nowrap;letter-spacing:1px}#section-banner.pop{animation:sectionEnter 3s forwards}@keyframes sectionEnter{0%{opacity:0;transform:translate(-50%,20px) scale(.8)}12%,75%{opacity:1;transform:translate(-50%,0) scale(1)}100%{opacity:0;transform:translate(-50%,-15px) scale(1)}}
#world-picker{display:flex;gap:5px;margin-top:15px}#world-picker button{flex:1;background:#f0edf8;color:#6c657f;padding:10px 5px;border-radius:8px;font-size:10px}#world-picker button.selected{background:#6254d9;color:white}#world-description{font-size:10px!important;line-height:1.6}#wardrobe-dialog{width:min(760px,94vw);max-height:90vh;overflow:auto}#close-wardrobe{float:right}.wardrobe-layout{display:grid;grid-template-columns:240px 1fr;gap:24px;margin-top:20px}.avatar-preview{background:linear-gradient(#eee5ff,#ffedf4);border-radius:16px;display:flex;flex-direction:column;align-items:center;padding:10px}.avatar-preview canvas{width:220px;height:250px}.avatar-preview strong{font-size:12px;text-align:center}.avatar-preview small{font-size:9px;text-align:center;padding:10px;color:#9390a1}.option-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:18px}.option-grid button{border:2px solid transparent;background:#f4f3f8;border-radius:9px;padding:11px 7px;font-size:11px;text-align:left;color:#625c78}.option-grid button.selected{background:#f3dded;border-color:#ff638b;color:#c53a69}#color-options{display:flex;gap:8px;margin:12px 0}#color-options button{width:27px;height:27px;border-radius:50%;border:3px solid white;outline:1px solid #ddd}#color-options button.selected{outline:3px solid #6254d9}#look-hint{font-size:10px!important;line-height:1.5}#wardrobe-dialog h2{font-size:29px}.panel{max-height:82vh}@media(max-width:600px){.wardrobe-layout{grid-template-columns:1fr;gap:15px}.avatar-preview{display:grid;grid-template-columns:130px 1fr}.avatar-preview canvas{width:130px;height:150px;grid-row:1/3}.avatar-preview strong{font-size:11px}.option-grid button{font-size:10px}#wardrobe-dialog h2{font-size:24px}.header-right{gap:4px}header .online{padding:8px;font-size:8px}header .icon{width:29px;height:29px}}
#social-status{grid-column:1/-1;font-size:10px;max-width:280px;color:#bc4a7a}#emote-bar{position:fixed;top:410px;right:4%;display:flex;gap:6px}#emote-bar button{background:#ffffffe8;border-radius:10px;padding:10px 13px;color:#6c617d;font-size:15px;box-shadow:0 3px 10px #20264112}#emote-bar button:active{transform:scale(.92)}.social-touch{display:flex;gap:5px}#mobile .social-touch button{padding:12px 9px;font-size:10px;background:#ffe4bfe8}#chaos-award{font-size:11px;color:#ae4d80;line-height:1.7;background:#fff0f5;border-radius:10px;padding:12px}@media(max-width:700px){#emote-bar{top:354px;gap:3px}#emote-bar button{font-size:12px;padding:9px}#ability{bottom:335px;max-width:220px}#social-status{font-size:9px}#mobile{bottom:136px}.touch-actions{gap:5px}#mobile .touch-actions>button{padding:12px}#ability small{display:block;font-size:8px}}@media(max-height:650px) and (max-width:700px){#ability{bottom:250px}#emote-bar{top:290px}.hud-card small{font-size:8px}}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.lobby-mode #room-panel{left:5%;width:375px;top:105px;transform:none;max-height:calc(100dvh - 130px)}#lobby-chat{position:fixed;right:5%;top:105px;bottom:25px;width:min(43%,500px);display:flex;flex-direction:column;background:#fffffff2;backdrop-filter:blur(15px);padding:25px;border-radius:22px;box-shadow:0 12px 45px #34436e15}.chat-heading{display:flex;justify-content:space-between;gap:10px;align-items:center}.chat-heading h2{font:800 24px Outfit;letter-spacing:-.6px;margin:10px 0 18px}.chat-heading .eyebrow{font-size:8px}.chat-live{font-size:9px;color:#47a989;font-weight:bold;white-space:nowrap}#chat-log{flex:1;min-height:130px;overflow:auto;overscroll-behavior:contain;padding:10px 5px;scrollbar-width:thin}.chat-empty{font-size:13px;line-height:1.9;color:#9b93a8;text-align:center;padding:35px 15px}.chat-message{background:#f2f0f8;border-radius:3px 13px 13px 13px;margin:10px 0;padding:11px 13px}.chat-message.mine{background:#ffeaf2;border-radius:13px 3px 13px 13px}.chat-message>div{display:flex;justify-content:space-between;gap:12px;align-items:center}.chat-message strong{font-size:11px;overflow-wrap:anywhere;text-shadow:0 0 1px #0002}.chat-message time{font-size:9px;color:#9a94a8}.chat-message p{font-size:13px;line-height:1.55;margin:7px 0 0;overflow-wrap:anywhere;white-space:pre-wrap}.chat-quick{display:flex;gap:5px;margin:12px 0}.chat-quick button{font-size:10px;padding:9px 7px;background:#f0edf8;color:#716584;border-radius:7px;flex:1}#chat-form{display:flex;gap:7px}#chat-input{border:1px solid #ded7ec;background:#faf8ff;border-radius:8px;font-size:13px}#chat-send{border-radius:8px;background:#6254d9;color:white;padding:0 15px;font-weight:600;font-size:12px}.chat-foot{display:flex;justify-content:space-between;gap:15px;font-size:9px;color:#938b9f;margin-top:10px}.chat-retention{font-size:9px;color:#a29baa;line-height:1.5;margin-bottom:0}.invite-row{display:flex;gap:7px}.invite-row button{flex:1;background:#6254d9;color:white;border-radius:8px;padding:11px 7px;font-size:11px}.invite-row button:last-child{background:#f0edf8;color:#76618e}.invite-explain{font-size:9px!important;color:#93899e!important;line-height:1.6}.invite-url{background:#f5f3fa;border-radius:6px;font-size:10px;padding:9px}.quick-controls{background:#f1f8f5;border:1px solid #def0e8;border-radius:11px;padding:12px;display:flex;flex-direction:column;gap:7px;font-size:11px;margin-bottom:17px}.quick-controls strong{font-size:11px;color:#498e76}.quick-controls small{font-size:9px;color:#7b9489}.quick-controls button{background:none;text-align:left;color:#74608e;padding:0;font-size:10px;text-decoration:underline}kbd{display:inline-block;background:white;border:1px solid #ded8e9;border-bottom-width:3px;padding:5px 8px;border-radius:6px;font:700 11px 'DM Sans';color:#6b5785}.quick-controls kbd{font-size:10px;padding:3px 5px}#help-dialog{width:min(550px,94vw);max-height:90dvh;overflow:auto}#help-dialog .help-goal{font-size:14px;color:#514666;line-height:1.6}.control-basics{display:grid;gap:10px;margin:20px 0}.control-basics>div{display:grid;grid-template-columns:100px 1fr;gap:15px;align-items:center;background:#f5f1fb;padding:14px;border-radius:10px}.control-basics kbd{text-align:center}.control-basics span{font-size:12px;line-height:1.6}.control-basics small{display:block;font-size:10px;line-height:1.6;color:#9a8daa}.mobile-help{display:flex;flex-direction:column;gap:8px;background:#eef8f4;border-radius:10px;padding:14px;font-size:12px;line-height:1.7}.mobile-help>b{color:#44866d}.extra-controls{margin:18px 0}.extra-controls summary{cursor:pointer;font-size:12px;font-weight:700;padding:12px 0;color:#79618e}.control-row{display:grid;grid-template-columns:100px 1fr;gap:15px;align-items:center;border-bottom:1px solid #f0ebf5;padding:11px 0;font-size:11px;line-height:1.6}.help-tip{background:#fff7e6;border-radius:10px;padding:13px;font-size:12px;line-height:1.7;color:#8c794e}#help-dialog .help-how{font-size:11px}#invite-note{font-size:11px;background:#f4eafb;color:#806195;border-radius:8px;padding:10px;line-height:1.6}
@media(max-width:900px){.lobby-mode #room-panel{width:340px;left:3%}#lobby-chat{right:3%;width:calc(94% - 360px);padding:18px}.chat-heading h2{font-size:20px}.chat-quick{flex-wrap:wrap}.chat-quick button{font-size:9px}#chat-send{padding:0 9px}}@media(max-width:700px){body.lobby-mode{overflow-y:auto}.lobby-mode #room-panel{position:relative;top:auto;left:auto;transform:none;margin:95px 5% 20px;width:90%;max-width:none;max-height:none;overflow:visible}.lobby-mode header{background:#eef3f5ee;backdrop-filter:blur(10px)}#lobby-chat{position:relative;top:auto;bottom:auto;right:auto;margin:0 5% 30px;width:90%;height:440px;padding:20px}#chat-input{font-size:16px}.chat-heading h2{font-size:22px}.chat-quick button{font-size:10px}#room-panel .room-code{margin:15px 0}.control-basics>div{grid-template-columns:88px 1fr;gap:10px}.control-row{grid-template-columns:90px 1fr;gap:10px}}
#action-feedback{position:fixed;left:50%;top:27%;transform:translateX(-50%);display:flex;align-items:center;flex-direction:column;gap:5px;pointer-events:none;text-align:center;width:max-content;max-width:85vw;padding:13px 22px;border-radius:14px;background:#fffffff0;border:2px solid var(--action-color,#ffbd50);box-shadow:0 5px 0 color-mix(in srgb,var(--action-color,#ffbd50),transparent 65%);animation:action-pop .2s ease-out}#action-feedback strong{font:900 clamp(21px,3vw,36px) Outfit;color:var(--action-color,#ffbd50);letter-spacing:1px}#action-feedback span{font-size:12px;color:#7a698b}@keyframes action-pop{from{opacity:.3;scale:.8}to{opacity:1;scale:1}}@media(max-width:700px){#action-feedback{top:29%;padding:10px 14px}#action-feedback span{font-size:10px}}
.course-heading{display:flex;justify-content:space-between;align-items:center;margin:22px 0 10px}.course-heading strong{font-size:12px}.course-heading span{font-size:9px;color:#a296ad}#world-picker{display:grid;grid-template-columns:1fr;gap:7px;margin:0}#world-picker .course-card{display:grid;grid-template-columns:28px 1fr auto;align-items:center;gap:5px 7px;text-align:left;border:2px solid transparent;border-radius:11px;padding:11px 10px;background:#f3f0f9;color:#6a5a80;box-shadow:none;opacity:1}#world-picker .course-card:disabled{cursor:default}#world-picker .course-card.selected{background:#ece4ff;border-color:#9781e3;color:#4f3685}#world-picker .course-card strong{font-size:12px}.course-icon{grid-row:1/4;font-size:23px}.course-badge{font-size:8px;padding:4px 6px;border-radius:5px;background:#e4dcef}.course-mini{position:relative;grid-column:2/4;height:19px;margin:2px 0}.course-mini i{position:absolute;top:5px;background:#c3b1e3;border-radius:1px;max-width:100%}.course-card.selected .course-mini i{background:#9675d4}.course-card-meta{grid-column:2/4;font-size:8px;opacity:.7}#world-picker .course-card.hardcore{background:#332339;color:#ffb7a6}#world-picker .course-card.hardcore.selected{border-color:#ff8663;box-shadow:0 0 0 2px #ff987029}#world-picker .hardcore .course-badge{background:#a84947;color:#fff2d4}#world-picker .hardcore .course-mini i{background:#f27a61}#random-course{width:100%;border-radius:8px;background:#f8f5fc;color:#8c76a2;font-size:10px;padding:11px;margin-top:9px}#selected-course{font:700 13px Outfit;margin:15px 0 6px;color:#6e5789}#course-info{font-size:9px;color:#9b8aa7;margin:0 0 8px}#hardcore-warning{background:#fff0e7;border:1px solid #ffc9b0;color:#b26b4b;font-size:10px;line-height:1.7;border-radius:9px;padding:12px;margin:12px 0}.course-mini{overflow:hidden}
.look-button{display:block;width:100%;padding:12px 14px;margin:0 0 16px;border-radius:10px;background:linear-gradient(110deg,#ece4ff,#ffdee9);border:1px solid #e7d4f0;color:#84609d;font-size:12px;font-weight:700;text-align:left}.look-button:hover{box-shadow:0 3px 12px #9b6bb621}#lobby-look{margin-top:18px}.skin-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:9px}.skin-heading label{margin:0;font-size:10px}.skin-heading button{background:#fff0de;color:#b1814d;border-radius:7px;padding:7px;font-size:9px;white-space:nowrap}.skin-options{grid-template-columns:repeat(2,1fr);gap:7px;margin-bottom:8px}.skin-options button{background:linear-gradient(135deg,#f6f0ff,#fff4f7);padding:12px 8px!important;font-weight:600}#skin-description{font-size:11px!important;color:#a288a9;line-height:1.5;margin-bottom:17px}.character-details{margin:12px 0 18px}.character-details summary{font-size:10px;cursor:pointer;color:#9382a2;padding:6px 0}.character-details>div{padding-top:8px}#wardrobe-dialog{width:min(850px,94vw)}#wardrobe-dialog h2{font-size:28px}.avatar-preview{position:sticky;top:0;align-self:start;min-height:310px}.wardrobe-layout{grid-template-columns:250px 1fr}.avatar-preview strong{line-height:1.7}.avatar-preview canvas{margin:10px 0}#outfit-options button{font-size:10px}@media(max-width:600px){.wardrobe-layout{grid-template-columns:1fr}.avatar-preview{position:relative;min-height:150px;top:auto}.avatar-preview canvas{margin:0}.skin-options button{font-size:10px}#wardrobe-dialog h2{font-size:22px}.skin-heading label{font-size:9px}}
@media(max-height:850px) and (min-width:701px){body:not(.playing):not(.lobby-mode){overflow-y:auto}#home{padding-bottom:65px}}
#wallet-button{border-radius:20px;background:#fff3d3;color:#a67c29;font-size:11px;font-weight:700;padding:10px 12px;white-space:nowrap}#progress-dialog{width:min(650px,94vw);max-height:90dvh;overflow:auto}#close-progress{float:right}.progress-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0}.progress-stats>div{background:#f6f0fa;padding:17px;border-radius:12px}.progress-stats small{display:block;font-size:9px;letter-spacing:1px;color:#9e8aaa}.progress-stats strong{font:800 29px Outfit;color:#81609c}#profile-status,.shop-intro{font-size:12px;color:#9a85a6}#progress-dialog h3{font:800 20px Outfit;margin-top:27px}#shop-items{display:grid;grid-template-columns:1fr 1fr;gap:10px}.shop-card,.challenge-card{background:#f7f3fb;border:1px solid #e9deef;border-radius:12px;padding:15px}.shop-card strong,.challenge-card strong{font-size:13px}.shop-card p,.challenge-card p{font-size:11px;line-height:1.7;color:#9e89a9;margin:8px 0}.shop-card button{background:#e9dcf6;color:#84619d;border-radius:7px;padding:10px;font-size:10px;width:100%}.shop-card button:disabled{opacity:.5;cursor:default}.challenge-card{margin-bottom:9px}.challenge-card.done{background:#eef8f1;border-color:#c9e6d2}.challenge-card progress{width:100%;height:7px;accent-color:#bb82bd}.challenge-card small{font-size:10px;color:#9a86a5;display:block;margin-top:8px}.profile-note{font-size:10px!important;color:#ac9cb2!important;line-height:1.7}.skin-options button:disabled{opacity:.6}#race-reward{padding:14px;border-radius:10px;background:#fff2ce;color:#a27b30;font-size:13px;line-height:1.8;margin:15px 0}@media(max-width:600px){.header-right .online{display:none}#wallet-button{padding:9px;font-size:10px}.progress-stats strong{font-size:24px}}
.skin-options button.locked{background:#f1edf5;color:#a695b0;border-style:dashed}

/* Compact touch controls: left analogue stick, right four actions. */
.stick-wrap{pointer-events:auto;display:grid;justify-items:center;gap:5px;user-select:none;-webkit-user-select:none}.stick-wrap>small{font-size:8px;font-weight:800;letter-spacing:1.4px;color:#4e536d;text-shadow:0 1px 3px #fff}#move-stick{width:112px;height:112px;position:relative;border:2px solid #ffffffc9;border-radius:50%;background:radial-gradient(circle,#ffffff35 36%,#ffffff80 38%,#ffffff40 70%);box-shadow:inset 0 0 16px #6254d916,0 4px 18px #20264116;touch-action:none;-webkit-touch-callout:none}#move-stick.active{border-color:#e0d4ff;background-color:#b9a5ed30}.stick-guides{position:absolute;inset:0;display:grid;place-items:center;font-size:76px;line-height:1;color:#6254d922;pointer-events:none}#stick-knob{position:absolute;left:50%;top:50%;width:44px;height:44px;margin:-22px;border:2px solid #fff;border-radius:50%;background:linear-gradient(145deg,#fff,#d4c7f2);box-shadow:0 3px 10px #51428230;pointer-events:none;will-change:transform}
#mobile .touch-actions{display:grid;grid-template-columns:52px 58px;grid-template-rows:46px 54px;gap:8px;align-items:center}#mobile .touch-actions>button{padding:3px;width:100%;height:100%;border:1px solid #ffffffe0;border-radius:15px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;box-shadow:0 3px 10px #20264116;font-size:20px;line-height:1;touch-action:none;-webkit-user-select:none;-webkit-touch-callout:none}#mobile .touch-actions small{font-size:8px;font-weight:800;letter-spacing:.25px}#mobile #jump-touch{background:#ff719dd9;color:#fff;font-size:25px;border-radius:19px}#mobile #grab-touch,#mobile #push-touch{background:#fff0d6dd}#mobile button.pressed{transform:scale(.94);filter:brightness(.88)}
@media(pointer:coarse){body.playing{overscroll-behavior:none}#mobile{bottom:calc(18px + env(safe-area-inset-bottom,0px));left:max(14px,env(safe-area-inset-left,0px));right:max(14px,env(safe-area-inset-right,0px));z-index:10;align-items:end}body.playing header{padding:calc(9px + env(safe-area-inset-top,0px)) 14px 9px}body.playing .brand{font-size:14px;gap:6px}body.playing .brand-icon{width:27px;height:29px;font-size:23px;border-radius:9px}body.playing .header-right .online{display:none}body.playing .icon{width:30px;height:30px}.race-top{top:calc(55px + env(safe-area-inset-top,0px));left:14px;right:14px}.hud-card{padding:8px 11px;border-radius:10px}.hud-card strong{font-size:19px}.hud-card small{font-size:7px;margin-bottom:4px;letter-spacing:1px}#race-room{font-size:7px;letter-spacing:.5px;margin-top:4px}.race-bottom{bottom:calc(147px + env(safe-area-inset-bottom,0px));left:14px;right:14px}.race-bottom .hud-card{padding:7px 10px}.race-bottom .hud-card>span{font-size:8px}.progress{width:130px;margin:6px 0;height:4px}#ability{left:14px;top:calc(135px + env(safe-area-inset-top,0px));bottom:auto;width:166px;padding:8px;gap:4px;font-size:8px}#ability>b{font-size:0;padding:0;border:0;background:none}#ability>b:after{content:'↗';font-size:15px}#ability small{display:none}#social-status{font-size:8px}#standings{right:14px;top:calc(135px + env(safe-area-inset-top,0px));width:115px;padding:9px}#standings>small{font-size:7px}.leader{font-size:8px;margin-top:6px}#race-actions{left:14px;bottom:calc(214px + env(safe-area-inset-bottom,0px));width:auto;transform:none;gap:4px}#race-actions button{font-size:8px;padding:8px 9px;border-radius:8px}#emote-bar{top:auto;right:14px;bottom:calc(214px + env(safe-area-inset-bottom,0px));gap:4px}#emote-bar button{padding:7px;font-size:12px;border-radius:8px}#action-feedback{top:30%;padding:8px 12px}#action-feedback span{font-size:10px}#section-banner{padding:10px 14px;font-size:17px}}
@media(pointer:coarse) and (max-height:500px){#ability,#standings{display:none}#move-stick{width:100px;height:100px}.stick-wrap>small{display:none}#mobile .touch-actions{grid-template-rows:44px 50px;gap:6px}.race-bottom{bottom:calc(126px + env(safe-area-inset-bottom,0px))}#race-actions,#emote-bar{bottom:calc(186px + env(safe-area-inset-bottom,0px))}}

#clear-look{padding:10px 14px;margin:13px 0 8px;border-radius:9px;background:#eee8f6;border:1px solid #dcd0ed;color:#79628f;font-size:11px;font-weight:700}.avatar-preview canvas{height:280px;width:220px}.avatar-preview small{line-height:1.6}#character-options button:first-child,#outfit-options button:first-child{border-style:dashed}#wardrobe-dialog .wardrobe-layout{gap:22px}@media(max-width:600px){.avatar-preview canvas{width:157px;height:200px}#clear-look{font-size:10px;padding:9px 12px;margin:8px 0}.avatar-preview{min-height:220px;grid-template-columns:157px minmax(0,1fr)}#clear-look{grid-column:1/-1}#wardrobe-dialog h2{font-size:24px}}

.world-rules{background:#f2edf9;padding:14px;border-radius:12px;margin:16px 0}.world-rules strong{font-size:12px;color:#735b8d}.world-rules p{font-size:11px;line-height:1.8;margin:9px 0}.world-rules small{font-size:10px}

/* Input surfaces own gestures; decorative wrappers never intercept a thumb. */
#world,#move-stick,#mobile [data-key]{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
#race-hud,.race-top,.race-bottom,#standings,#ability,#action-feedback,#section-banner,#finished,#countdown,#toast,.vignette{pointer-events:none}
#race-actions,#emote-bar,#mobile,.stick-wrap{pointer-events:none}#race-actions button,#emote-bar button,#mobile button,#move-stick{pointer-events:auto}
#mobile{z-index:30}#mobile-menu-toggle{display:none}
#mobile-menu{width:min(25rem,calc(100vw - 2rem));max-height:calc(100dvh - 2rem - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));padding:1rem;border-radius:1.1rem;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;color:#38304c}#mobile-menu:not([open]){display:none;pointer-events:none}#mobile-menu[open]{pointer-events:auto}#mobile-menu::backdrop{background:#20264170;backdrop-filter:blur(4px)}.mobile-menu-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}.mobile-menu-head h2{font:800 1.35rem Outfit;margin:0;letter-spacing:-.03rem}#mobile-menu button{min-height:2.75rem;border-radius:.65rem;background:#eee9f5;color:#6d577e;font-size:.75rem;font-weight:700;padding:.6rem;touch-action:manipulation}#mobile-menu button:disabled{opacity:.4;cursor:default}#mobile-menu #close-mobile-menu{width:2.75rem;background:#ece6f1;font-size:1.1rem}#mobile-menu .menu-status{font-size:.65rem;line-height:1.5;color:#94889d;margin:.55rem 0 1rem}.menu-note{background:#fff2d6;padding:.65rem;border-radius:.6rem;font-size:.7rem!important;line-height:1.5!important;color:#8a7251!important}.menu-buttons{display:grid;grid-template-columns:1fr 1fr;gap:.5rem}.menu-profile-stats{display:flex;justify-content:space-between;gap:.5rem;font-size:.7rem;padding:1rem 0;color:#8d7798}.menu-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:.4rem;margin:.5rem 0 1rem}.menu-stats>div{padding:.6rem;background:#f6f2fa;border-radius:.6rem}.menu-stats dt{font-size:.6rem;color:#a08baa}.menu-stats dd{margin:.3rem 0 0;font:700 .9rem Outfit}#mobile-menu h3{font:700 .9rem Outfit;margin:1rem 0 .5rem}.menu-leader{display:flex;justify-content:space-between;gap:.5rem;padding:.55rem 0;border-bottom:1px solid #eee8f4;font-size:.7rem}.menu-leader span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#menu-emotes{display:flex;gap:.5rem}#mobile-menu #menu-emotes button{font-size:1.1rem;flex:1}#menu-spectate,#menu-leave{width:100%;margin-top:.8rem}#mobile-menu #menu-leave{background:#ffe7ec;color:#b85476}.mobile-menu-open #mobile{visibility:hidden}
@media(max-width:768px),(any-pointer:coarse){
 header{pointer-events:none;padding:calc(.65rem + env(safe-area-inset-top,0px)) calc(.9rem + env(safe-area-inset-right,0px)) .65rem calc(.9rem + env(safe-area-inset-left,0px))}.brand{pointer-events:auto}.header-right{pointer-events:none}.header-right>button,.header-right>.online{display:none}#mobile-menu-toggle{display:grid;place-items:center;pointer-events:auto;min-width:2.75rem;min-height:2.75rem;background:#ffffffbd;opacity:.75;font-size:1.1rem;box-shadow:0 2px 10px #20264112}#mobile-menu-toggle:active{opacity:1}body.playing header{padding:calc(.65rem + env(safe-area-inset-top,0px)) calc(.9rem + env(safe-area-inset-right,0px)) .65rem calc(.9rem + env(safe-area-inset-left,0px));justify-content:flex-end}body.playing header .brand{display:none}body.playing #mobile-menu-toggle{width:2.75rem;height:2.75rem}
 body.playing #standings,body.playing #ability,body.playing #race-actions,body.playing #emote-bar,body.playing .race-bottom,body.playing #stage-name,body.playing #race-room,body.playing #section-banner,body.playing #action-feedback,body.playing #finished small{display:none!important}body.playing .race-top{top:calc(.8rem + env(safe-area-inset-top,0px));left:calc(.9rem + env(safe-area-inset-left,0px));right:auto;justify-content:flex-start;align-items:center;gap:.4rem;max-width:calc(100vw - 5.5rem - env(safe-area-inset-left,0px) - env(safe-area-inset-right,0px))}body.playing .race-top .hud-card{background:#ffffffbd;padding:.45rem .65rem;border-radius:1rem;box-shadow:none;white-space:nowrap}body.playing .race-top small{display:none}body.playing .race-top strong{font:800 clamp(.8rem,3vw,1rem) Outfit}body.playing #place:before{content:'🏁 ';font-size:.8rem}body.playing #timer:before{content:'◷ ';font-size:.9rem}
 #mobile{bottom:calc(1.5rem + env(safe-area-inset-bottom,0px));left:calc(1.25rem + env(safe-area-inset-left,0px));right:calc(1.25rem + env(safe-area-inset-right,0px));align-items:end;z-index:30}.stick-wrap>small{display:none}#move-stick{width:106px;height:106px;background:radial-gradient(circle,#ffffff40 36%,#ffffff8a 38%,#ffffff40 70%)}#stick-knob{width:42px;height:42px;margin:-21px}#mobile .touch-actions{grid-template-columns:44px 52px;grid-template-rows:44px 52px;gap:8px}#mobile .touch-actions>button{border-radius:50%;opacity:.75;font-size:1.2rem;box-shadow:0 2px 8px #20264115}#mobile .touch-actions small{display:none}#mobile #jump-touch{border-radius:50%;font-size:1.6rem}#mobile button.pressed{opacity:1}body.playing #toast{top:calc(4rem + env(safe-area-inset-top,0px));bottom:auto;padding:.45rem .7rem;border-radius:.7rem;font-size:.65rem;max-width:80vw;line-height:1.3}body.playing #countdown{font-size:3.5rem}body.playing #finished{font-size:1.3rem;top:25%}
}
@media(max-height:450px) and (any-pointer:coarse){#move-stick{width:96px;height:96px}#mobile{bottom:calc(1rem + env(safe-area-inset-bottom,0px))}}

.mobile-menu-head{position:sticky;top:0;background:#fff;z-index:1;padding:.2rem 0}#mobile-menu-toggle{touch-action:manipulation;user-select:none;-webkit-user-select:none}

#mobile svg{width:1.35rem;height:1.35rem;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}#mobile #jump-touch svg{width:1.6rem;height:1.6rem}.mobile-menu-head h2,#mobile-menu h3,.menu-stats dd,body.playing .race-top strong{font-family:Outfit,'DM Sans',sans-serif}

.secondary-play{display:block;width:100%;margin-top:10px;padding:12px;border-radius:9px;background:#eee9f7;color:#79638c;font-size:11px;font-weight:700}#match-status{font-size:10px;color:#9879a2;line-height:1.5;margin:8px 0}#lobbies-dialog{width:min(560px,94vw);max-height:88dvh;overflow:auto}#close-lobbies{float:right}#lobbies-dialog h2{font-size:28px}#lobbies-dialog>p{font-size:12px}#refresh-lobbies{border-radius:9px;padding:10px;background:#ece4f5;color:#7a638d}.open-lobby{display:grid;grid-template-columns:1fr auto;gap:5px 12px;padding:15px 0;border-bottom:1px solid #ede6f3}.open-lobby strong{font-size:13px}.open-lobby span{font-size:11px;color:#a086aa;grid-column:1}.open-lobby button{grid-column:2;grid-row:1/3;border-radius:9px;background:#ff6c96;color:white;padding:10px;font-size:11px}.controller-note{font-size:11px!important;padding:11px;border-radius:9px;background:#f0eaf8;color:#826791!important}.gamepad-help{background:#f3effa;padding:13px;border-radius:10px;margin:14px 0;font-size:12px}.gamepad-help p{font-size:11px;line-height:1.8;margin:8px 0 0}@media(max-width:768px){.secondary-play{padding:10px}.play-card{padding:18px}#lobbies-dialog h2{font-size:23px}}

#sprint-status{grid-column:1/-1;font-size:10px;color:#a47d2c}#mobile .touch-actions{grid-template-rows:44px 44px 52px}#mobile #sprint-touch{grid-column:2;grid-row:1;background:#fff2bad9;color:#99712c;position:relative;width:44px;height:44px;justify-self:end;border-radius:50%}#mobile #grab-touch{grid-column:1;grid-row:2}#mobile #push-touch{grid-column:2;grid-row:2}#mobile #dive-touch{grid-column:1;grid-row:3}#mobile #jump-touch{grid-column:2;grid-row:3}#sprint-touch-count{position:absolute;right:-2px;bottom:-2px;min-width:16px;min-height:16px;display:grid;place-items:center;background:#6a5e80;color:white;border-radius:50%;font:700 9px sans-serif}#sprint-touch-count:empty{display:none}#mobile #sprint-touch.cooling{opacity:.4}#mobile #sprint-touch.sprinting{background:#ffd36c;opacity:1;box-shadow:0 0 12px #ffc85790}

/* Chapter names stay above the action and never cover a route choice. */
#section-banner{top:calc(5.25rem + env(safe-area-inset-top,0px));max-width:65vw;overflow:hidden;text-overflow:ellipsis;padding:.55rem .9rem;border-radius:.75rem;background:#fffef5ed;color:#665279;box-shadow:0 4px 18px #30203a18;font:800 clamp(.7rem,1.25vw,.9rem)/1.2 Outfit,system-ui,sans-serif;letter-spacing:.06em}
/* Party modes: compact core HUD, details stay in the menu. */
.mode-picker,.team-options{display:flex;gap:5px;margin:10px 0}.mode-picker button,.team-options button{flex:1;padding:9px 6px;border-radius:8px;background:#eee9f7;color:#79638c;font-size:11px}.mode-picker button.selected,.team-options button.selected{background:#6655d9;color:white}.mode-hint{font-size:11px!important;line-height:1.5}.team-score{padding:7px 10px;margin:4px 0;background:#fffffff0;border-radius:5px;font-size:11px;color:#594c72}#team-scoreboard{position:fixed;right:4%;top:335px;width:210px;pointer-events:none}#mode-status{position:fixed;top:88px;left:50%;transform:translateX(-50%);background:#fffdf0e8;color:#78608b;font-size:11px;font-weight:800;border-radius:8px;padding:7px 12px;pointer-events:none;white-space:nowrap}#spectator-bar{position:fixed;top:85px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:10px;background:#fffffff0;color:#756087;padding:5px;border-radius:12px;font-size:12px;z-index:32}#spectator-bar button{width:32px;height:32px;background:#ece5f4;color:#715e83;border-radius:8px;font-size:22px}#spectator-name{max-width:45vw;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#item-slot{position:fixed;bottom:195px;right:4%;display:flex;align-items:center;gap:9px;background:#fff7e6ee;color:#7f6b43;border-radius:12px;padding:10px 13px;font-size:11px;z-index:25}#item-icon{font-size:25px}#elimination-screen{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(480px,88vw);max-height:75dvh;overflow:auto;z-index:45}#elimination-list{display:grid;grid-template-columns:1fr 1fr;gap:6px;font-size:11px}#elimination-list span{padding:6px;background:#eee9f5;border-radius:5px}.xp-progress{padding:12px 0;font-size:12px}.xp-progress progress,.challenge-card progress{display:block;width:100%;height:9px;margin:8px 0;accent-color:#8464d9}#rematch-status{font-size:12px;line-height:1.5}#mobile #item-touch{grid-column:1;grid-row:1;width:44px;height:44px;border-radius:50%;background:#fff2bad9;color:#94733c;justify-self:start;font-size:1.25rem}#mobile #item-touch:disabled{opacity:.35}
@media(max-width:768px),(pointer:coarse){body.playing #team-scoreboard,body.playing #item-slot{display:none}#mode-status{top:calc(3.5rem + env(safe-area-inset-top,0px));font-size:9px;padding:5px 8px}#spectator-bar{top:calc(3.3rem + env(safe-area-inset-top,0px));font-size:10px}#spectator-bar button{width:28px;height:28px}#elimination-screen h2{font-size:22px}.mode-picker button,.team-options button{font-size:10px;padding:9px 4px}}
#section-banner{top:calc(7.4rem + env(safe-area-inset-top,0px))}#team-scoreboard{top:210px}#results{max-height:85dvh;overflow:auto}#results-teams{margin:10px 0}

/* Distinct thumb targets: generous jump, forgiving hit areas, no overlay in the centre. */
#mobile .touch-actions{grid-template-columns:48px 60px;grid-template-rows:44px 48px 60px;gap:8px}
#mobile .touch-actions>button{position:relative;overflow:visible;opacity:.85;flex-shrink:0}
#mobile .touch-actions>button::before{content:"";position:absolute;inset:-4px;border-radius:inherit}
#mobile #jump-touch{width:60px;height:60px;border-width:2px;background:#ff719ded}
#mobile #jump-touch small{display:block;font-size:7px;letter-spacing:.2px;line-height:1}
#mobile #dive-touch{width:48px;height:52px}
#mobile #grab-touch,#mobile #push-touch{width:48px;height:48px;justify-self:center}
#mobile button.pressed{opacity:1;box-shadow:0 0 0 3px #fff7,0 2px 8px #20264115}
@media(max-height:450px) and (any-pointer:coarse){#mobile .touch-actions{grid-template-rows:40px 44px 54px;gap:8px}#mobile #jump-touch{width:54px;height:54px}#mobile #grab-touch,#mobile #push-touch{width:44px;height:44px}#mobile #dive-touch{height:48px}}

/* Independent rulesets and a thumb-first touch layout. */
.item-mode-picker{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:14px 0 8px}.item-mode-picker button{display:flex;flex-direction:column;align-items:flex-start;gap:4px;border:2px solid transparent;border-radius:12px;padding:12px 10px;text-align:left;color:#756287;background:#f1edf7}.item-mode-picker b{font-size:13px}.item-mode-picker small{font-size:10px}.item-mode-picker button.selected{border-color:#a88bea;background:#eae0ff;color:#65449d}.item-mode-picker button:disabled{opacity:1;cursor:default}
#item-slot>span:last-child{max-width:210px}#item-hint{display:block;font-size:10px;line-height:1.4;margin-top:4px;color:#978967}#item-status{position:fixed;top:160px;left:50%;transform:translateX(-50%);z-index:24;pointer-events:none;background:#fffffff0;color:#745485;padding:6px 10px;border-radius:9px;font-size:11px;max-width:85vw;text-align:center}
#move-zone{position:relative;display:block;width:clamp(120px,40vw,240px);height:210px;pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;z-index:1}
#move-zone #move-stick{position:absolute;left:0;bottom:0;width:116px;height:116px;pointer-events:none}#move-zone #stick-knob{width:46px;height:46px;margin:-23px}.touch-actions{z-index:2}
#mobile .touch-actions{grid-template-columns:58px 74px;grid-template-rows:44px 56px 74px;gap:10px;justify-items:center}
#mobile .touch-actions small{display:block;font-size:7px;line-height:1;letter-spacing:.1px;pointer-events:none}
#mobile #jump-touch{grid-column:2;grid-row:3;width:74px;height:74px;gap:5px;border-radius:30px;background:#ff6696f2}
#mobile #dive-touch{grid-column:1;grid-row:3;width:58px;height:58px;align-self:end;border-radius:22px;background:#d1c4f2ed}
#mobile #grab-touch{grid-column:1;grid-row:1;width:44px;height:44px;align-self:center;justify-self:center}
#mobile #push-touch{grid-column:2;grid-row:1;width:44px;height:44px;justify-self:center}
#mobile #sprint-touch{grid-column:1;grid-row:2;width:48px;height:48px;justify-self:center}
#mobile #item-touch{grid-column:2;grid-row:2;width:56px;height:56px;justify-self:center;border-radius:20px}
#mobile button.pressed{transform:scale(.97);box-shadow:0 0 0 3px #fff9,0 3px 10px #20264122}
#sprint-touch-count{position:absolute;right:-3px;top:-3px;border-radius:50%;background:#776285;color:white;min-width:16px;line-height:16px;font-size:9px}
body.touch-compact #mobile .touch-actions{grid-template-columns:48px 62px;grid-template-rows:40px 48px 62px;gap:8px}body.touch-compact #mobile #jump-touch{width:62px;height:62px;border-radius:24px}body.touch-compact #mobile #dive-touch{width:48px;height:48px}body.touch-compact #mobile #item-touch{width:48px;height:48px}
@media(max-width:768px),(any-pointer:coarse){#item-status{top:calc(5.8rem + env(safe-area-inset-top,0px));font-size:10px;padding:5px 8px}#mobile{bottom:calc(1.25rem + env(safe-area-inset-bottom,0px));left:calc(.9rem + env(safe-area-inset-left,0px));right:calc(.9rem + env(safe-area-inset-right,0px))}}
@media(max-height:450px) and (any-pointer:coarse){#move-zone{height:170px}#move-zone #move-stick{width:104px;height:104px}#mobile .touch-actions{grid-template-columns:50px 64px;grid-template-rows:40px 44px 64px;gap:8px}#mobile #jump-touch{width:64px;height:64px;border-radius:24px}#mobile #dive-touch{width:50px;height:50px}#mobile #item-touch{width:48px;height:48px}#mobile #sprint-touch{width:44px;height:44px}}

.format-label{display:block;margin-top:12px;color:#9986aa;font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}

/* Cooldowns stay on the action that will become available again. */
#mobile button.cooling::after{content:"";position:absolute;inset:-3px;border-radius:inherit;background:conic-gradient(#a799e8 calc(var(--cooldown,0)*1turn),#ffffff55 0);mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2px));-webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 3px),#000 calc(100% - 2px));pointer-events:none}
#mobile .action-count{position:absolute;right:-3px;top:-3px;min-width:16px;border-radius:50%;background:#776285;color:#fff;font:800 9px/16px system-ui,sans-serif;pointer-events:none}#mobile .action-count:empty{display:none}#mobile .touch-actions>button.cooling{opacity:.6}
#item-guide-dialog{width:min(620px,calc(100vw - 2rem));max-height:85dvh;overflow:auto;padding:24px;border-radius:18px}#item-guide-dialog>p{font-size:12px;line-height:1.6}#item-guide-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}.item-guide-card{padding:13px;background:#f0ebf8;border-radius:12px}.item-guide-card strong{font-size:13px;color:#66517e}.item-guide-card p{font-size:11px;line-height:1.55;margin:8px 0 0;color:#90809f}@media(max-width:450px){#item-guide-cards{grid-template-columns:1fr}#item-guide-dialog{padding:18px}}
#item-guide-dialog #close-item-guide{position:sticky;top:0;float:right;z-index:1;background:#ffffffed}
/* A separate collection receipt survives other action toasts and never blocks touch input. */
#item-pickup{position:fixed;right:4%;bottom:300px;z-index:26;display:flex;align-items:center;gap:.7rem;max-width:min(24rem,90vw);padding:.7rem 1rem;border:2px solid var(--item-color,#ffd46f);border-radius:1rem;background:#fffdf2f5;box-shadow:0 .35rem 1.2rem #4f35662b;pointer-events:none;animation:item-receipt .25s ease-out}
#item-pickup-icon{font-size:2.2rem;line-height:1.2}#item-pickup strong,#item-pickup small{display:block}#item-pickup strong{font:800 1rem Outfit;color:#433751}#item-pickup small{font-size:.7rem;color:#786184;margin-top:.2rem}
#item-slot.loaded,#mobile #item-touch.loaded{background:#fff3a9;color:#5c427e;border:2px solid var(--item-color,#ffc34a);box-shadow:0 0 0 3px #fff8,0 0 1rem var(--item-color,#ffc34a)}
#item-slot.loaded.item-collected,#mobile #item-touch.loaded.item-collected{animation:item-collected .7s ease-out 2}
@keyframes item-collected{0%,100%{transform:scale(1)}40%{transform:scale(1.14)}}@keyframes item-receipt{from{opacity:.2;translate:0 -.5rem}to{opacity:1;translate:0 0}}
@media(max-width:768px),(any-pointer:coarse){body.playing #item-pickup{top:calc(4.05rem + env(safe-area-inset-top,0px));bottom:auto;left:calc(.9rem + env(safe-area-inset-left,0px));right:calc(.9rem + env(safe-area-inset-right,0px));max-width:none;padding:.5rem .7rem;gap:.6rem}body.playing.has-round-progress #item-pickup{top:calc(7.45rem + env(safe-area-inset-top,0px))}#item-pickup-icon{font-size:1.9rem}#item-pickup strong{font-size:.85rem}#item-pickup small{font-size:.65rem}body.playing #item-status{top:calc(4.05rem + env(safe-area-inset-top,0px))}body.playing.has-round-progress #item-status{top:calc(7.45rem + env(safe-area-inset-top,0px))}body.playing.has-item-pickup #item-status{top:calc(8.1rem + env(safe-area-inset-top,0px))}body.playing.has-item-pickup.has-round-progress #item-status{top:calc(11.5rem + env(safe-area-inset-top,0px))}}
@media(prefers-reduced-motion:reduce){#item-pickup,#item-slot.loaded.item-collected,#mobile #item-touch.loaded.item-collected{animation:none}}
@media(max-width:768px),(any-pointer:coarse){body.has-item-pickup #toast{visibility:hidden}}

/* The finish window uses the existing clock, leaving the view free. */
body.final-sprint .race-top .timing{background:#fff0ccd9;box-shadow:0 0 0 2px #ffd47b80}body.final-sprint #timer{color:#ad683e}body.final-sprint #mode-status{background:#fff0d4eb;color:#9e633c}.result-note{font-size:11px!important;line-height:1.55;color:#9b8aa6}
body.final-sprint #timer-label{display:inline!important;font-size:8px;letter-spacing:.04em}

/* Keep the invite controls outside the independently scrolling lobby settings. */
.lobby-mode #room-panel{display:flex;flex-direction:column;height:calc(100dvh - 130px);padding:0;overflow:hidden}
.room-invite-header{flex:none;padding:16px 20px 14px;background:#fffefd;border-bottom:1px solid #e9e2f2}
.lobby-mode #room-panel .room-code{margin:8px 0 10px;padding:10px;font-size:28px;line-height:1.2;letter-spacing:5px;white-space:nowrap}
#room-settings{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;padding:0 20px 20px;scroll-padding:12px;scrollbar-width:thin}
#room-settings h2{font-size:24px;margin:18px 0 10px}
@media(max-width:700px){.lobby-mode #room-panel{margin:calc(84px + env(safe-area-inset-top,0px)) 5% 20px;height:calc(100dvh - 104px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));max-height:calc(100dvh - 104px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));overflow:hidden}.room-invite-header{padding:12px 16px}#room-settings{padding:0 16px 18px}}

/* Put joining friends next to the name, and let the whole home page scroll. */
body:not(.playing):not(.lobby-mode){overflow-y:auto}
#home{position:relative;top:auto;left:auto;width:min(430px,86%);margin:clamp(90px,14vh,150px) 0 35px 7%;padding-bottom:24px}
#home-footer{position:relative;bottom:auto;left:auto;right:auto;margin:0 4%;padding-bottom:24px;background:transparent}
.friend-join{margin:14px 0 0;padding:12px;background:#f1ecff;border:1px solid #c9b8f0;border-radius:12px}
.friend-join label{color:#4f3685;font-size:12px;font-weight:800;margin-bottom:8px}
#join-form{gap:8px;align-items:stretch}
#join-form #code{flex:1;min-width:0;width:0;min-height:48px;border:1px solid #ab94df;background:#fff;color:#352653;font-size:16px;font-weight:700;letter-spacing:2px;padding:10px 12px;opacity:1}
#join-form #code::placeholder{color:#87769f;opacity:1}
#join-form #join{flex:none;min-height:48px;padding:10px 12px;background:#6254d9;color:#fff;font-size:12px;white-space:nowrap}
#home .or{margin:16px 0 12px}
@media(max-width:1100px){#course-card{display:none}}
@media(max-width:700px){#home{margin-top:84px}#home>h1{font-size:38px;line-height:1.02;margin:10px 0}#home>.intro{font-size:12px;line-height:1.5;margin:8px 0 14px}#home>.tags{display:none}#home .play-card{margin-top:12px;padding:16px}#home .card-top{margin-bottom:12px}#home #name{font-size:16px}.friend-join{padding:10px}#home-footer{font-size:7px}}
@media(max-height:500px){#home{margin-top:78px}#home>.eyebrow,#home>h1,#home>.intro,#home>.tags{display:none}#home .play-card{margin-top:0;padding:14px}#home .card-top{margin-bottom:10px}.friend-join{margin-top:10px;padding:10px}}

.friend-join #invite-note{margin:8px 0 0;font-size:11px;line-height:1.4}

.audio-settings{margin:12px 0 18px;padding:14px;border-radius:12px;background:#f4f0fa;border:1px solid #e4dced}.audio-settings h3{font:800 16px Outfit,sans-serif;margin:0 0 10px;color:#57456f}.audio-toggles{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:14px}.audio-settings label{display:flex;justify-content:space-between;align-items:center;margin:10px 0 0;color:#5d4c76;font-size:12px}.audio-settings output{font-variant-numeric:tabular-nums;color:#79658f}.audio-settings input[type=range]{display:block;width:100%;height:40px;min-width:0;padding:0;border:0;background:transparent;accent-color:#7560da;cursor:pointer;touch-action:pan-y}.audio-settings input[type=range]:focus-visible{outline:3px solid #a18ce6;outline-offset:2px;border-radius:6px}#audio-status{font-size:11px;line-height:1.45;color:#806b91;margin:7px 0 0;min-height:16px}@media(min-width:769px){#mobile-menu-toggle{display:grid;place-items:center;width:36px;height:36px;border-radius:50%;background:#ffffffb3;color:#4f476b;font-size:19px}}

.mode-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.mode-picker button{min-width:0}body.survival-mode #world-picker,body.survival-mode #random-course{display:none}

body.survival-mode .item-mode-picker{display:none}

body.playing.dark-world .brand{color:#fff8f4;text-shadow:0 1px 8px #17152866}body.playing.dark-world .brand-icon{background:#eee8ff;color:#3b315c}body.playing.dark-world .brand-run{color:#ff86ad}

.shop-card[data-kind="outfit"]{border-top:3px solid #ad8be7}.shop-card[data-kind="accessory"]{border-top:3px solid #70ccba}#accessory-options button.locked,#outfit-options button.locked{opacity:.72}#outfit-options button,#accessory-options button{white-space:normal;overflow-wrap:anywhere}

.shop-filters{display:flex;gap:6px;flex-wrap:wrap;margin:14px 0}.shop-filters button{padding:8px 11px;border-radius:18px;background:#eee8f7;color:#625274}.shop-filters button.selected{background:#7556ca;color:white}.shop-thumbnail{display:block;width:100%;height:150px;object-fit:contain;border-radius:12px;background:linear-gradient(145deg,#e9e4fc,#ffe8ef);margin-bottom:10px}.shop-card{display:flex;flex-direction:column}.shop-card p{flex:1}.shop-card button{margin-top:auto}.preview-buttons{display:flex;gap:5px;justify-content:center;flex-wrap:wrap}.preview-buttons button{min-width:37px!important;padding:8px!important;margin:0!important}.preview-buttons button[aria-pressed="true"]{background:#8765cd;color:#fff}#avatar-canvas{touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab}#avatar-canvas:active{cursor:grabbing}.preview-gesture{font-size:10px;color:#887396}#look-purchase{font-size:12px;padding:11px;margin-top:10px;width:100%}#wardrobe-dialog .avatar-preview{position:sticky;top:0;align-self:start}@media(max-width:600px){#wardrobe-dialog .avatar-preview{position:relative}.shop-thumbnail{height:128px}.shop-filters button{font-size:11px;padding:7px 9px}}

#wardrobe-dialog .avatar-preview{gap:8px}#wardrobe-dialog .avatar-preview>*{flex-shrink:0}.preview-buttons button{border:1px solid #d8caed;border-radius:9px;background:#eee6fa;color:#685183;font-size:12px;font-weight:700}#wardrobe-shop{padding:10px 12px;border-radius:9px;border:1px solid #ddd0ed;background:#f0e9f8;color:#70558c;font-size:11px;font-weight:700;width:100%;margin-top:5px}#look-purchase{justify-content:center;line-height:1.5;min-height:48px;margin-bottom:5px}#wardrobe-dialog #clear-look{margin:0;font-size:10px}@media(max-width:600px){#wardrobe-dialog .avatar-preview{display:grid;grid-template-columns:140px minmax(0,1fr);gap:8px}#wardrobe-dialog .avatar-preview canvas{grid-column:1;grid-row:1/3;width:140px;height:180px;max-width:100%}#look-name{grid-column:2;grid-row:1}#wardrobe-dialog .avatar-preview>small:not(.preview-gesture){grid-column:2;grid-row:2;padding:2px}#wardrobe-dialog .preview-gesture,#wardrobe-dialog .preview-buttons,#look-purchase,#wardrobe-shop,#clear-look{grid-column:1/-1}}

#wardrobe-dialog #save-look{width:100%;justify-content:center;font-size:12px;min-height:44px;margin:3px 0 5px;grid-column:1/-1;line-height:1.4}#save-look.hidden{display:none!important}

#preview-unlock-info{grid-column:1/-1;font-size:11px;line-height:1.5;color:#715688;text-align:center;background:#ffffff91;border-radius:8px;padding:8px;margin:0;width:100%}

/* One compact objective strip keeps the new arenas readable on phones. */
body.arena-mode #world-picker,body.arena-mode #random-course,body.arena-mode .item-mode-picker{display:none}
#minigame-hud{position:fixed;z-index:12;top:calc(7rem + env(safe-area-inset-top,0px));left:50%;transform:translateX(-50%);max-width:calc(100vw - 2rem);width:max-content;display:flex;align-items:center;gap:.65rem;padding:.65rem .95rem;background:#fff5e8ed;border:1px solid #ffffffa0;border-radius:16px;box-shadow:0 4px 20px #49355416;pointer-events:none}
#minigame-icon{font-size:2rem;line-height:1}#minigame-hud strong{display:block;font-size:.92rem}#minigame-hud small{display:block;margin-top:.2rem;font-size:.72rem;color:#725a82}#minigame-hud[data-mode=football]{background:#f0f9e8ed}
@media(max-width:768px),(pointer:coarse){#minigame-hud{top:calc(5.25rem + env(safe-area-inset-top,0px));gap:.45rem;padding:.4rem .65rem;border-radius:12px;max-width:calc(100vw - 1.25rem)}#minigame-icon{font-size:1.6rem}#minigame-hud strong{font-size:.76rem}#minigame-hud small{font-size:.62rem}body.minigame-mode #mode-status{display:none}}
@media(max-height:500px) and (pointer:coarse){#minigame-hud{top:calc(.65rem + env(safe-area-inset-top,0px));max-width:43vw;padding:.3rem .5rem}#minigame-hud strong{font-size:.70rem}#minigame-hud small{font-size:.57rem}}

@media(max-width:768px),(pointer:coarse){body.playing.minigame-mode #toast{top:calc(9rem + env(safe-area-inset-top,0px))}}
@media(max-height:500px) and (pointer:coarse){body.playing.minigame-mode #toast{top:calc(4rem + env(safe-area-inset-top,0px))}}

#minigame-hud>div{min-width:0}#minigame-hint{font-weight:800;color:#506d58!important}#minigame-meter{display:block;height:3px;overflow:hidden;border-radius:3px;margin-top:.4rem;background:#7d78951f}#minigame-meter-fill{display:block;height:100%;background:#9c84d5;transform-origin:left;transition:transform .12s linear}#minigame-hud.urgent{border-color:#ee9d69;background:#fff1dbee}#minigame-hud.urgent #minigame-meter-fill{background:#e88050}#minigame-hud[data-mode=football] #minigame-meter-fill{background:#6db68a}

@media(max-width:768px),(pointer:coarse){body.playing.minigame-mode #toast{top:calc(10.25rem + env(safe-area-inset-top,0px))}}
@media(max-height:500px) and (pointer:coarse){body.playing.minigame-mode #toast{top:calc(5.5rem + env(safe-area-inset-top,0px))}}

#minigame-hud[data-mode=tag]{background:#fff6e5ed}#minigame-hud[data-mode=tag] #minigame-meter-fill{background:#d9a453}#mobile #grab-touch.target-near{background:#ffe8a5;opacity:1;box-shadow:0 0 0 3px #ffd15d77,0 0 18px #e7b44a55}

.bot-settings{margin:16px 0;border:1px solid #d8cbea;border-radius:14px;background:#f5effb;padding:13px}.bot-settings summary{cursor:pointer;font-weight:800;font-size:13px}.bot-settings p,.bot-settings>small{font-size:11px;line-height:1.6;color:#6d5b80}.bot-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.bot-options label{font-size:10px;font-weight:700}.bot-settings select{display:block;width:100%;min-height:40px;border:1px solid #cebee1;border-radius:9px;padding:8px;background:white;color:#514565;font:inherit;font-size:12px;touch-action:manipulation}.bot-tools{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.bot-tools button{padding:9px 11px;border-radius:9px;background:#e7dbf5;color:#5b4275;font-size:11px}.bot-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 0;border-top:1px solid #e2d7ec}.bot-row label{font-size:12px}.bot-row select{width:120px;flex-shrink:0}#bot-list{max-height:310px;overflow-y:auto;overscroll-behavior:contain}.bot-settings select:disabled{opacity:.7}@media(max-width:480px){.bot-options{grid-template-columns:1fr 1fr}.bot-options label:last-child{grid-column:1/-1}.bot-row select{width:110px}.bot-settings{padding:11px}}

html{touch-action:manipulation}body.playing,body.playing #world,body.playing #race-hud,body.playing #mobile,body.playing button{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}body.playing dialog,body.playing dialog *{touch-action:pan-y}input,select,textarea{font-size:max(16px,1em)}
.practice-entry{display:flex;flex-direction:column;align-items:center;width:100%;padding:12px;margin:0 0 7px;border-radius:12px;background:#eee5fb;color:#5e4588;font-weight:800}.practice-entry small{font-size:11px;font-weight:500;margin-top:4px}#offline-ready{display:block;font-size:10px;text-align:center;color:#756586;margin:0 0 12px}#room-world{display:block;width:100%;padding:12px;border:2px solid #dbd0ed;border-radius:12px;background:#fff;color:#3b3156;font-size:16px;cursor:pointer}.course-catalog{margin:12px 0}.course-catalog>summary{cursor:pointer;font-size:12px;font-weight:700;color:#655386}.practice-option{display:flex;align-items:center;gap:9px;padding:13px 0;font-weight:700;font-size:13px}.practice-option input{width:20px;height:20px;accent-color:#7255af}#practice-note{font-size:12px;color:#6e568a;background:#f3eafa;border-radius:9px;padding:10px;line-height:1.5}.session-buttons{display:grid;grid-template-columns:1fr 1fr;gap:9px}.session-buttons button{padding:13px 9px;border-radius:11px;background:#eee5fb;color:#5e4588;font-size:13px;font-weight:700}#session-tools{padding:0 0 18px;border-bottom:1px solid #e6dfec;margin-bottom:16px}#session-hint{font-size:12px;line-height:1.5;color:#756586}#waiting-note{position:fixed;z-index:8;top:135px;left:50%;transform:translateX(-50%);width:min(340px,85vw);background:#fff7e6ee;border-radius:12px;padding:12px;font-size:12px;text-align:center;pointer-events:none}#world-picker{pointer-events:auto}body.lobby-mode #room-settings{min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}body.lobby-mode #room-panel #room-world{position:relative;z-index:1}
@media(max-width:768px),(pointer:coarse){input,select,textarea{font-size:16px!important}}
/* Simple choices first; large targets and a start button that never scrolls out of view. */
#home-mode-state[hidden]{display:none!important}#home{top:100px}#home h1{font-size:clamp(38px,4.4vw,64px);line-height:1.06;margin:12px 0}#home .intro{font-size:16px;line-height:1.5;margin:12px 0 20px}#home .play-card{padding:24px;margin-top:20px;max-width:450px}#home .play-card>label{font-size:15px;font-weight:700}.home-actions{display:grid;gap:10px;margin:16px 0}.home-actions button{width:100%;min-height:52px;font-size:17px;border-radius:14px}#quickplay{background:#d9f2e8;color:#276750}.home-join{border:1px solid #e5deed;border-radius:12px;padding:12px;margin:12px 0}.home-join>summary{cursor:pointer;font-size:14px;font-weight:700;min-height:22px}.home-join[open] #join-form{margin-top:12px}.home-small-actions{display:flex;gap:9px;align-items:stretch;margin-top:14px}.home-small-actions>*{flex:1;margin:0!important;min-height:42px;font-size:13px!important}#course-card{display:none!important}
body.lobby-mode #room-panel{position:fixed;top:76px;bottom:14px;left:50%;transform:translateX(-50%);width:min(500px,calc(100vw - 24px));height:auto;max-height:none;display:flex;flex-direction:column;padding:0;overflow:hidden;border-radius:22px;background:#fffdf9;box-shadow:0 16px 60px #433a651b}body.lobby-mode .room-invite-header{flex-shrink:0;position:relative;top:auto;padding:13px 18px 10px;background:#fffdf9;border-bottom:1px solid #eee7f4}.lobby-code-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.lobby-code-row .room-code{font-family:inherit;font-size:24px;font-weight:900;letter-spacing:3px;background:#f0eafb;border:0;padding:6px 12px;min-height:42px;margin:4px 0}.lobby-code-row .invite-row{display:flex;gap:7px;margin:0}.lobby-code-row .invite-row button{font-size:12px;min-height:40px;padding:8px 10px;border-radius:10px}body.lobby-mode #room-settings{flex:1;min-height:0;overflow-y:auto;padding:8px 18px 12px;max-height:none}body.lobby-mode .lobby-footer{flex-shrink:0;padding:12px 18px 9px;background:#fffdf9;border-top:1px solid #e9e1f0}.lobby-footer #start{width:100%;min-height:48px;border-radius:13px;font-size:18px;margin:0}.lobby-footer #host-hint{font-size:11px;line-height:1.4;margin:8px 0 3px}.lobby-footer #leave{margin:0;padding:6px;font-size:12px}.kids-section{padding:13px 0;border-bottom:1px solid #eee7f4}.kids-section h2{display:flex;align-items:center;gap:9px;font-family:inherit;font-size:17px;margin:0 0 11px;font-weight:800}.kids-section h2>span{display:inline-grid;place-items:center;width:25px;height:25px;font-size:13px;color:#fff;background:#8e70bd;border-radius:9px}.kids-modes{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:0}.kids-modes button{min-height:49px;padding:8px 5px;border-radius:12px;font-size:13px;background:#f0edf6;border:2px solid transparent;color:#4b425c;font-weight:750}.kids-modes button.selected{background:#e8dcfa;border-color:#a282ce;color:#523276}.kids-modes button:last-child{grid-column:auto}.world-carousel{display:grid;grid-template-columns:40px 1fr 40px;gap:10px;align-items:center}.world-carousel>button{height:64px;border-radius:14px;font-size:34px;background:#f0e9f7;color:#725393}.world-art{--world-color:#e9d6f3;height:94px;position:relative;overflow:hidden;border-radius:16px;background:radial-gradient(ellipse at 12% 18%,#ffffffb9 0 8%,transparent 9%),radial-gradient(ellipse at 88% 22%,#ffffffa9 0 11%,transparent 12%),linear-gradient(150deg,#ffffff80,var(--world-color));display:flex;align-items:center;justify-content:center;gap:26px}.world-art:before{content:'';position:absolute;bottom:-5px;left:16%;width:68%;height:42px;background:repeating-linear-gradient(0deg,#c2e5e5 0 13px,#effaf5 13px 16px);transform:perspective(70px) rotateX(28deg);border:4px solid #faf6e7;border-radius:10px}.world-art #world-emoji{position:relative;z-index:1;font-size:50px;filter:drop-shadow(0 4px 1px #61507318)}.world-art #world-toys{position:relative;z-index:1;font-size:25px;letter-spacing:5px}.world-art #world-counter{position:absolute;right:8px;top:7px;border-radius:9px;background:#fff9;padding:3px 7px;font-size:10px;font-weight:800}#selected-course{font-size:15px;font-weight:800;text-align:center;margin:11px 0 5px}#world-description{font-size:12px;line-height:1.45;margin:3px 0 8px;max-height:36px;overflow:hidden;text-align:center;color:#756883}.course-catalog{margin:7px 0 0}.course-catalog summary{font-size:12px;min-height:26px;padding:5px 0}.course-catalog #room-world{margin:10px 0}.roster-head h2{margin:0}.roster-head{margin:0 0 10px}#roster{max-height:96px;overflow:auto}.player-chip{font-size:12px!important;padding:8px 10px!important}.bot-settings{margin:12px 0 0}.bot-settings>summary{min-height:35px;font-size:13px}.lobby-fold,.menu-fold{border-bottom:1px solid #eee5f2;padding:12px 0}.lobby-fold>summary,.menu-fold>summary{font-size:14px;font-weight:800;min-height:25px;cursor:pointer}.lobby-fold[open]>summary,.menu-fold[open]>summary{margin-bottom:13px}.practice-option{font-size:14px}#lobby-chat-wrap{display:none}body.lobby-mode #lobby-chat-wrap{display:block;position:fixed;top:96px;left:calc(50% + 270px);width:min(340px,calc(50vw - 285px));background:#fffdf8e8;padding:15px;border-radius:17px;max-height:calc(100dvh - 160px);overflow:auto}#lobby-chat-wrap>summary{font-size:14px;font-weight:800;cursor:pointer}body.lobby-mode #lobby-chat{position:static!important;display:block;width:auto!important;max-height:none!important;background:transparent;padding:12px 0 0;box-shadow:none}.simple-help{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:20px 0}.simple-help>div{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:15px 6px;border-radius:14px;background:#eee7f6}.simple-help b{font-size:37px}.simple-help strong{font-size:14px}.simple-help span{font-size:11px;line-height:1.5}#mobile-menu .audio-settings{margin:0;border:0}#mobile-menu .menu-fold{margin:0}body:not(.playing) #round-details{display:none}#hardcore-warning{font-size:12px;line-height:1.5;padding:8px;background:#ffeadf;border-radius:10px}
@media(max-width:1000px){body.lobby-mode #lobby-chat-wrap{left:auto;right:12px;top:auto;bottom:18px;width:auto;padding:10px;z-index:14;max-width:calc(100vw - 24px);max-height:70dvh}body.lobby-mode #lobby-chat-wrap[open]{bottom:14px;left:12px;right:12px;width:auto;background:#fffdf9;box-shadow:0 0 0 100vmax #2d233a55}body.lobby-mode .lobby-footer{padding-bottom:37px}}
@media(max-width:768px){#home{position:relative;top:auto;left:auto;width:auto;margin:86px 20px 35px;padding:0}#home h1{font-size:41px;margin-top:8px}#home .intro{font-size:14px;margin:10px 0 18px}#home .play-card{margin-top:0;padding:20px;max-width:none}#home .eyebrow{font-size:10px}#home-footer{position:relative;padding:0 20px 24px}body.lobby-mode #room-panel{top:70px;bottom:10px;width:calc(100vw - 20px);border-radius:19px}body.lobby-mode .room-invite-header{padding:10px 14px 8px}body.lobby-mode #room-settings{padding:3px 14px 9px}.kids-section{padding:10px 0}.kids-section h2{font-size:16px;margin-bottom:9px}.kids-modes button{min-height:46px;font-size:12px}.world-art{height:86px}.world-carousel{grid-template-columns:36px 1fr 36px;gap:8px}.world-carousel>button{height:54px}.lobby-code-row .room-code{font-size:21px}.lobby-code-row .invite-row button{font-size:11px;padding:8px}.lobby-footer #start{min-height:47px;font-size:17px}.lobby-footer #host-hint{font-size:10px}.lobby-footer #leave{font-size:11px}header .brand{font-size:18px}.simple-help{gap:6px}.simple-help strong{font-size:12px}.simple-help b{font-size:30px}#world-description{max-height:34px}}
@media(max-height:560px){body.lobby-mode #room-panel{top:58px;bottom:7px}.lobby-code-row .room-code{font-size:17px;min-height:28px}.room-invite-header .eyebrow{display:none}.lobby-footer #host-hint{display:none}.lobby-footer #leave{padding:2px}.lobby-footer #start{min-height:38px}.lobby-footer{padding-top:7px!important}.simple-help b{font-size:24px}}
/* Remove inherited positioning/margins from the former scrolling lobby layout. */
body.lobby-mode #room-panel{margin:0!important;right:auto!important;animation:none!important}body.lobby-mode #room-panel .kids-section h2{font-size:16px!important;font-family:inherit;line-height:1.3;letter-spacing:-.2px;margin:0 0 10px}body.lobby-mode #room-panel .roster-head h2{margin:0}.lobby-code-row .room-code{width:auto;min-width:0;flex:1}.lobby-code-row .invite-row{flex:0 0 auto}.lobby-footer{display:grid;grid-template-columns:38px 1fr;gap:3px 8px}.lobby-footer #start{grid-column:2;grid-row:1}.lobby-footer #leave{grid-column:1;grid-row:1;min-height:44px;font-size:22px}.lobby-footer #host-hint{grid-column:1/3;grid-row:2;text-align:center;margin:4px 0!important}
@media(max-width:1000px){body.lobby-mode .lobby-footer{padding-bottom:10px}body.lobby-mode #lobby-chat-wrap{top:13px;right:66px;bottom:auto;left:auto;width:42px;padding:9px;border-radius:50%;max-height:none;background:#fffc}body.lobby-mode #lobby-chat-wrap>summary{font-size:0;list-style:none;min-height:24px}body.lobby-mode #lobby-chat-wrap>summary::-webkit-details-marker{display:none}body.lobby-mode #lobby-chat-wrap>summary:before{content:'💬';font-size:20px}body.lobby-mode #lobby-chat-wrap[open]{top:88px;left:12px;right:12px;bottom:auto;width:auto;max-height:calc(100dvh - 110px);padding:14px;border-radius:18px;z-index:30}body.lobby-mode #lobby-chat-wrap[open]>summary{font-size:14px}body.lobby-mode #lobby-chat-wrap[open]>summary:before{content:'× ';font-size:24px}}

.menu-help-primary{display:block;width:100%;min-height:45px;margin:10px 0;padding:12px;border-radius:12px;font-size:15px;font-weight:800;color:#63447f;background:#eee4fa}#mobile-menu .menu-note{font-size:12px;line-height:1.5}#mobile-menu #menu-race-note{padding:9px 11px;margin:13px 0}

/* One arena card and two arrows keep the choice readable on a phone. */
.arena-carousel{display:flex;align-items:center;justify-content:space-between;gap:.7rem}.arena-carousel>div{display:grid;text-align:center;gap:.25rem;flex:1}.arena-carousel strong{font-size:2.8rem}.arena-carousel small{font-size:.75rem;opacity:.7}.arena-carousel button{width:2.5rem;height:2.5rem;padding:0;font-size:1.8rem}.arena-carousel+p{font-size:.88rem;text-align:center;margin:.7rem 0 .1rem}#arena-title{font-size:1.1rem}

/* The wardrobe never scrolls its close button or its live mirror out of reach. */
#wardrobe-dialog[open]{display:flex;flex-direction:column;width:min(940px,96vw);height:min(820px,94dvh);max-height:94dvh;overflow:hidden;padding:0;box-sizing:border-box}
.wardrobe-head{flex:none;padding:18px 22px 10px;background:#fff;z-index:3;border-bottom:1px solid #eee8f4}.wardrobe-head h2{font-size:24px;margin:6px 0}.wardrobe-head .eyebrow{font-size:10px}
#close-wardrobe{float:none;position:absolute;right:12px;top:10px;width:44px;height:44px;z-index:10;touch-action:manipulation;background:#f0eaf7;border:0;border-radius:50%;font-size:24px}
#wardrobe-dialog .wardrobe-layout{display:grid;grid-template-columns:minmax(220px,32%) minmax(0,1fr);gap:16px;flex:1;min-height:0;margin:0;padding:16px;overflow:hidden}
#wardrobe-dialog .avatar-preview{display:flex;flex-direction:column;min-height:0;overflow:auto;align-items:center;padding:12px;gap:8px}#wardrobe-dialog .avatar-preview canvas{width:180px;height:220px;flex:none;touch-action:none}#wardrobe-dialog .avatar-preview strong{font-size:13px}#wardrobe-dialog .avatar-preview small{padding:0}
.wardrobe-choices{overflow:auto;min-height:0;overscroll-behavior:contain;padding:0 6px 24px}.wardrobe-choices .option-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.wardrobe-choices button{min-height:44px;touch-action:manipulation}.option-grid button[hidden]{display:none!important}
.emote-slots,.emote-options{display:flex;gap:5px;flex-wrap:wrap;margin:8px 0 16px}.emote-options button,.emote-slots button{border:2px solid transparent;background:#eee8f7;border-radius:10px;font-size:24px;width:44px;height:44px;padding:0}.emote-slots button.selected,.emote-options button.selected{border-color:#a17acf;background:#e1d4f1}
#wardrobe-dialog.catalogue-preview .wardrobe-layout{grid-template-columns:1fr}#wardrobe-dialog.catalogue-preview .wardrobe-choices{display:none}#wardrobe-dialog.catalogue-preview .avatar-preview{width:min(420px,100%);justify-self:center;box-sizing:border-box}
@media(max-width:600px){#wardrobe-dialog .wardrobe-layout{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr);gap:8px;padding:10px}#wardrobe-dialog .avatar-preview{display:grid;grid-template-columns:110px minmax(0,1fr);gap:5px;padding:8px;max-height:245px}#wardrobe-dialog .avatar-preview canvas{width:110px;height:135px;grid-row:1/5}#wardrobe-dialog .avatar-preview strong{font-size:11px}#wardrobe-dialog .preview-gesture,#wardrobe-dialog .avatar-preview>small:not(.preview-gesture),#wardrobe-dialog .preview-buttons,#clear-look{display:none}#wardrobe-dialog .avatar-preview>button{padding:9px;font-size:11px;margin:0;min-height:38px}#wardrobe-dialog #save-look,#wardrobe-dialog #wardrobe-shop{grid-column:2}#wardrobe-dialog.catalogue-preview .wardrobe-layout{display:flex;justify-content:center}#wardrobe-dialog.catalogue-preview .avatar-preview{display:flex;max-height:none}#wardrobe-dialog.catalogue-preview .avatar-preview canvas{width:150px;height:185px}.wardrobe-head{padding:12px 18px 6px}.wardrobe-head h2{font-size:21px}.wardrobe-choices .option-grid{gap:5px;margin-bottom:12px}.wardrobe-choices .option-grid button{font-size:11px;padding:9px 6px}.kids-modes button:last-child{grid-column:auto}}

#community-settings select{display:block;width:100%;padding:11px;border:1px solid #ddd1ec;border-radius:12px;background:#f8f5fc;margin:8px 0;font-size:16px}#party-search{width:100%;padding:12px;border-radius:12px;border:0;background:#e9e0f4;color:#62478d;font-weight:750}#community-settings small{display:block;margin-top:8px;font-size:11px;color:#85798f}#lobby-start-notice{grid-column:1/-1;font-weight:800;color:#6d4aa2;margin:0 0 8px}.lobby-footer:has(#lobby-start-notice:not(.hidden)){padding-top:10px}
#help{display:none!important}#lobby-help{display:inline-flex;align-items:center;justify-content:center}
@media(max-width:1000px){body.lobby-mode #lobby-chat-wrap{right:116px}body.lobby-mode #lobby-chat-wrap[open]{left:12px;right:12px;width:auto}}
#lobby-help{pointer-events:auto;touch-action:manipulation;position:relative;z-index:16}

.wardrobe-head{position:relative;pointer-events:auto;display:block}#close-wardrobe{pointer-events:auto}

#climb-hud{position:fixed;z-index:12;left:50%;top:calc(env(safe-area-inset-top,0px) + 4.4rem);transform:translateX(-50%);padding:.55rem .85rem;border:1px solid #fff9;border-radius:1rem;background:#fff5e9e6;color:#5d4d7b;font-size:clamp(.73rem,1.5vw,.95rem);font-weight:800;white-space:nowrap;pointer-events:none;box-shadow:0 .35rem 1.2rem #5d589b15;backdrop-filter:blur(8px)}

.world-online{display:flex;align-items:center;gap:.45rem;width:max-content;max-width:100%;padding:.42rem .7rem;border:1px solid #ffffffb3;background:#fff9;border-radius:1rem;color:#63517f;font-size:clamp(.72rem,1.3vw,.88rem);font-weight:700;margin:.7rem 0}.world-online [data-status="offline"],.world-online [data-status="unavailable"]{color:#8e8398}#round-progress{display:none;pointer-events:none;user-select:none}#round-progress *{pointer-events:none}
@media(max-width:768px),(pointer:coarse){body.playing #round-progress:not(.hidden){display:block;position:fixed;z-index:15;left:calc(.9rem + env(safe-area-inset-left,0px));right:calc(.9rem + env(safe-area-inset-right,0px));top:calc(4.05rem + env(safe-area-inset-top,0px));padding:.48rem .7rem .62rem;border-radius:.85rem;background:#ffffffe0;box-shadow:0 .2rem 1rem #4b3b7712}.route-summary{display:flex;justify-content:space-between;align-items:center;gap:.5rem;font-size:.68rem;color:#786586;margin-bottom:.55rem}.route-summary strong{color:#584670;white-space:nowrap}.route-summary span{white-space:nowrap}#round-progress-track{position:relative;height:6px;border-radius:8px;background:#e2dcef;margin:0 .25rem}#round-progress-fill{position:absolute;inset:0;border-radius:8px;background:linear-gradient(90deg,#a48be6,#ed80a7);transform-origin:left;transition:transform .12s linear}.route-checkpoint{position:absolute;top:-2px;width:2px;height:10px;background:#fff;border-radius:1px;transform:translateX(-50%)}.route-player{position:absolute;top:-1px;width:8px;height:8px;border:1px solid #fff;border-radius:50%;background:#a48acb;transform:translateX(-50%);transition:left .12s linear}.route-player.bot{background:#acadb9}.route-player.own{z-index:3;top:-4px;width:14px;height:14px;border:2px solid #fff;background:#f45b8c;box-shadow:0 1px 4px #8f438a55}body.has-round-progress #mode-status,body.has-round-progress #climb-hud{display:none!important}body.has-round-progress #spectator-bar{top:calc(7.5rem + env(safe-area-inset-top,0px))}.world-online{font-size:.73rem;margin:.6rem 0}}
@media(max-height:500px) and (pointer:coarse){body.playing #round-progress:not(.hidden){top:calc(3.65rem + env(safe-area-inset-top,0px));padding:.35rem .65rem .5rem}.route-summary{margin-bottom:.4rem}}

.bot-level-hint{background:#f1edf8;color:#705887;border-radius:.6rem;padding:.55rem .65rem;font-size:.75rem;line-height:1.4}

@media(max-width:768px),(pointer:coarse){body.playing.has-round-progress #toast{top:calc(7.4rem + env(safe-area-inset-top,0px))}}
@media(max-height:500px) and (pointer:coarse){body.playing.has-round-progress #toast{top:calc(6.5rem + env(safe-area-inset-top,0px))}}

.mastery-card{margin:18px 0;padding:18px;border:1px solid #e5c16d;border-radius:18px;background:linear-gradient(135deg,#fff6d9,#fffdf8);color:#695023}.mastery-card h3{margin:8px 0}.mastery-card p{font-size:12px;line-height:1.6}.mastery-card #mastery-goals p{margin:4px 0}.mastery-card progress{width:100%;accent-color:#c99c34}.mastery-card button{width:100%;background:#6651ac;color:#fff;border-radius:10px;padding:12px;font-weight:800}.mastery-card.done{border-color:#bd9936}.room-code:not(button){display:flex;align-items:center;justify-content:center;cursor:default}#invite-url:not([hidden]){display:block;width:100%;margin-top:8px;min-width:0;font-size:16px}

.mastery-card summary{cursor:pointer;font-weight:800;font-size:14px}.mastery-card summary small{display:block;margin:6px 0 0 18px;font-size:11px;font-weight:500}.mastery-card>.eyebrow{margin-top:18px}

.favorite-looks{margin:0 0 16px;padding:12px;border:1px solid #dfd1ec;border-radius:14px;background:#faf7fe}.favorite-looks summary{cursor:pointer;font-weight:800;font-size:13px}.favorite-looks p{font-size:11px;line-height:1.55;color:#796787}.favorite-save-row{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin:10px 0}.favorite-save-row label{margin:0!important;font-size:12px}.favorite-save-row select{width:54px;font-size:16px;padding:8px;border:1px solid #ddd0ec;border-radius:8px}.favorite-save-row input{flex:1;min-width:110px;width:130px;font-size:16px;padding:8px;border:1px solid #ddd0ec;border-radius:8px}#favorite-save{padding:10px;width:100%;background:#6d55b7;color:#fff;border-radius:10px;font-weight:700;font-size:12px}.favorite-row{display:grid;grid-template-columns:minmax(0,1fr) auto 28px;align-items:center;gap:5px;padding:9px 0;border-top:1px solid #e6deef}.favorite-row strong{overflow:hidden;text-overflow:ellipsis;font-size:12px}.favorite-row button{padding:8px 6px;background:#e8dff6;color:#614794;border-radius:8px;font-size:11px}.favorite-row .favorite-remove{font-size:18px;background:#f8e6ec;color:#b85e7d}.weekly-bonus{padding:12px;border-radius:12px;background:#fff6d8;font-size:12px;color:#806125}.catalogue-preview #favorite-looks{display:none}

.favorite-row{grid-template-columns:minmax(0,1fr) auto 36px}.favorite-row button{min-height:36px}

.weekly-card{margin:18px 0;padding:16px;border:1px solid #c7dce8;border-radius:16px;background:#f0f8fc}.weekly-card summary{cursor:pointer;font-size:14px;font-weight:800}.weekly-card summary small{display:block;margin:6px 0 0 18px;font-size:11px;font-weight:500}#weekly-reset{font-size:11px;line-height:1.6}.weekly-card .challenge-card{background:#ffffffe0}.weekly-card .challenge-card p{font-size:12px;line-height:1.6;margin:8px 0}.weekly-card .weekly-bonus{margin-bottom:0}

#ready-toggle{width:100%;padding:12px;border-radius:12px;background:#d8f2e5;color:#37765a;font-weight:800;margin:12px 0 4px}#ready-toggle[aria-pressed=true]{background:#61b98d;color:white}.ready-count,.course-style-hint{font-size:11px;color:#7b6c8c;line-height:1.6}.player-chip.ready{box-shadow:inset 0 0 0 1px #8acaa5}.course-style-label{display:block;font-size:12px;margin:12px 0 6px}#course-style{width:100%;font-size:16px;padding:10px;border:1px solid #d6cbe6;border-radius:10px;background:#faf6ff}#results-podium{display:block;width:100%;height:250px;pointer-events:none}#results-podium[hidden]{display:none}#podium-names{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:8px 0 14px}#podium-names span{font-size:11px;border-radius:8px;padding:6px;background:#f0e9f8}#recovery-dialog{max-height:90dvh;overflow:auto;width:min(460px,calc(100vw - 28px));padding:24px}#close-recovery{float:right}.recovery-fold{border:1px solid #ded3e9;border-radius:12px;padding:12px;margin:14px 0}.recovery-fold summary{font-weight:800;cursor:pointer;font-size:14px}.recovery-fold textarea{width:100%;font-size:16px;min-height:80px;padding:10px;border:1px solid #d9cde4;border-radius:8px;resize:vertical;overflow-wrap:anywhere}.recovery-fold label{display:block;font-size:12px;margin:14px 0 6px}.recovery-fold button{display:block;width:100%;padding:12px;background:#7156bb;color:white;border-radius:10px;margin-top:8px;font-weight:700}#recovery-status,#recovery-preview{font-size:12px;line-height:1.7}#device-test-status{font-size:11px;white-space:pre-line}#device-test,#device-test-copy{font-size:12px}@media(max-width:768px),(pointer:coarse){#results-podium{height:210px}}

#results{max-height:calc(100dvh - 110px - env(safe-area-inset-top,0px));overflow-y:auto;overscroll-behavior:contain}.result-ranks{margin:12px 0}.result-ranks summary{cursor:pointer;font-size:12px;font-weight:700}

/* Compact new activities and connection recovery retain the mobile thumb zones. */
#reconnect-overlay{position:fixed;inset:0;z-index:9999;background:rgba(33,31,50,.76);display:grid;place-items:center;padding:1.25rem;backdrop-filter:blur(5px);touch-action:none}
#reconnect-overlay.hidden{display:none}#reconnect-overlay>div{width:min(100%,25rem);padding:1.7rem;border-radius:1.4rem;background:#fff5df;text-align:center;color:#302d47;box-shadow:0 1rem 4rem #15132b66}#reconnect-overlay h2{font-size:clamp(1.3rem,5vw,1.7rem)}.reconnect-spinner{display:inline-block;font-size:3rem;color:#d58926;animation:reconnect-turn 1.5s linear infinite}@keyframes reconnect-turn{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.reconnect-spinner{animation:none}}
#weekly-dialog{width:min(92vw,38rem);max-height:85dvh;overflow:auto}#weekly-list{padding:0;list-style:none;display:grid;gap:.4rem}#weekly-list li{display:flex;justify-content:space-between;gap:1rem;border-radius:.65rem;padding:.7rem .9rem;background:#eeebf5}#weekly-list .weekly-own{background:#ffdf86}#weekly-personal{font-weight:800;color:#584384}#weekly-dialog .session-buttons{position:sticky;bottom:0;background:#fff6ed;padding:.6rem 0}.home-small-actions{flex-wrap:wrap}@media(max-width:768px){#weekly-dialog{padding:1rem}#weekly-list li{font-size:.86rem}#reconnect-overlay>div{padding:1.25rem}}

body.honey-chase::after{content:"";position:fixed;inset:auto 0 0;height:24vh;pointer-events:none;z-index:3;background:linear-gradient(0deg,rgba(255,146,17,.45),rgba(255,184,39,.1) 35%,transparent 95%);opacity:var(--honey-pressure,0);transition:opacity .25s}body.honey-chase #round-progress-detail{color:#9a4f12}body.honey-chase #round-progress-fill{background:linear-gradient(90deg,#ffbd43,#e88b1d)}

#mode-intro{position:fixed;z-index:62;left:50%;top:45%;translate:-50% -50%;width:min(440px,92vw);padding:1.1rem;border:2px solid #fff;border-radius:1.4rem;background:#fffaf3f5;box-shadow:0 .6rem 2.4rem #46386535;text-align:center;pointer-events:none;color:#443859}#mode-intro-category{font-size:.72rem;font-weight:800;color:#8a6e9b}#mode-intro h2{font:900 clamp(1.2rem,4vw,1.7rem) Outfit;margin:.4rem 0 .8rem}#mode-intro-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:.5rem}#mode-intro-steps div{padding:.5rem .2rem;border-radius:.85rem;background:#f1eaf9}#mode-intro-steps span{display:block;font-size:clamp(1.8rem,6vw,2.5rem);height:3rem}#mode-intro-steps small{display:block;font-size:.7rem;font-weight:800;line-height:1.2}#mode-intro p{font-size:.82rem;line-height:1.5;margin:.8rem 0 0}body.show-mode-intro #countdown{top:calc(45% + 160px);font-size:3.2rem}body.show-mode-intro #mobile{visibility:hidden}@media(max-height:500px){#mode-intro{top:42%;width:min(540px,80vw);padding:.6rem 1rem}#mode-intro h2{font-size:1.2rem;margin:.15rem 0 .4rem}#mode-intro-steps span{height:2rem;font-size:1.65rem}#mode-intro-steps div{padding:.3rem}#mode-intro p{font-size:.72rem;margin:.4rem 0 0}body.show-mode-intro #countdown{top:calc(42% + 120px);font-size:2.5rem}}

#results-emotes{margin:.8rem 0;text-align:center}#results-emotes>small{font-size:.7rem;color:#8b739c}#results-emote-buttons{display:flex;justify-content:center;gap:.6rem;margin:.4rem 0}#results-emote-buttons button{width:3rem;height:2.7rem;font-size:1.6rem;border-radius:.8rem;background:#f1e8fa}#results-emote-buttons button:disabled{cursor:default;opacity:.45}#podium-reactions{display:flex;flex-wrap:wrap;justify-content:center;gap:.4rem}#podium-reactions span{font-size:.8rem;padding:.35rem .6rem;border-radius:1rem;background:#fff0c9}.coin-rules{font-size:.72rem!important;color:#8b769a;line-height:1.5}#cup-board{width:100%;margin:.6rem 0;padding:.65rem;border-radius:.8rem;background:#f0e9f9;color:#685380;font-size:.8rem}#weekly-previous{font-size:.8rem;line-height:1.5;color:#8b6e99}

/* Six actions in stable thumb zones; ITEM and JUMP have the largest targets. */
#mobile .touch-actions{grid-template-areas:"hold push" "sprint item" "dive jump";grid-template-columns:68px 88px;grid-template-rows:60px 80px 88px;gap:10px;align-items:center;justify-items:center;pointer-events:none}
#mobile .touch-actions>button{width:60px;height:60px;min-width:0;min-height:0;border-width:2px;border-radius:22px;gap:4px;padding:3px;opacity:.95;pointer-events:auto;touch-action:none}
#mobile .touch-actions small{display:block;font-size:9px;font-weight:900;line-height:1;letter-spacing:.05px;pointer-events:none}
#mobile #grab-touch{grid-area:hold;width:60px;height:60px;align-self:center;justify-self:center;background:#d8f3e8;color:#326d60}
#mobile #push-touch{grid-area:push;width:60px;height:60px;align-self:center;justify-self:center;background:#ffe2c3;color:#96602c}
#mobile #sprint-touch{grid-area:sprint;width:60px;height:60px;align-self:center;justify-self:center;background:#fff0b9}
#mobile #dive-touch{grid-area:dive;width:60px;height:60px;align-self:center;justify-self:center;background:#ded2fa}
#mobile #item-touch{grid-area:item;width:80px;height:80px;align-self:center;justify-self:center;border-radius:27px;gap:5px}
#mobile #jump-touch{grid-area:jump;width:88px;height:88px;align-self:center;justify-self:center;border-radius:31px;gap:6px}
#mobile #jump-touch svg{width:2rem;height:2rem}#mobile #jump-touch small{font-size:10px}#mobile #item-touch-icon{font-size:2.3rem;line-height:1;pointer-events:none}#mobile #item-touch-label{font-size:10px}#mobile .action-count,#sprint-touch-count{font-size:10px;min-width:18px;line-height:18px}
body.touch-compact #mobile .touch-actions{grid-template-columns:60px 80px;grid-template-rows:56px 72px 80px;gap:8px}
body.touch-compact #mobile #grab-touch,body.touch-compact #mobile #push-touch,body.touch-compact #mobile #sprint-touch,body.touch-compact #mobile #dive-touch{width:56px;height:56px}
body.touch-compact #mobile #item-touch{width:72px;height:72px;border-radius:25px}body.touch-compact #mobile #jump-touch{width:80px;height:80px;border-radius:28px}
#mobile .touch-actions{isolation:isolate}#mobile #item-touch.loaded.item-collected,#item-slot.loaded.item-collected{animation:item-ready-flash .65s ease-in-out 3}
@keyframes item-ready-flash{0%,100%{filter:brightness(1);box-shadow:0 0 0 3px #fff8,0 0 1rem var(--item-color,#ffc34a)}50%{filter:brightness(1.18);box-shadow:0 0 0 6px #fff,0 0 1.8rem var(--item-color,#ffc34a)}}
/* A horizontal controller leaves the middle of a landscape screen open. */
@media(orientation:landscape) and (max-height:540px){
 #mobile{bottom:calc(.9rem + env(safe-area-inset-bottom,0px));left:calc(.9rem + env(safe-area-inset-left,0px));right:calc(.9rem + env(safe-area-inset-right,0px))}
 #move-zone{width:clamp(130px,28vw,220px);height:155px}#move-zone #move-stick{width:108px;height:108px}
 #mobile .touch-actions{grid-template-areas:"hold push item" "sprint dive jump";grid-template-columns:60px 64px 88px;grid-template-rows:80px 88px;gap:10px}
 #mobile #grab-touch,#mobile #push-touch,#mobile #sprint-touch,#mobile #dive-touch{width:56px;height:56px}
 body.touch-compact #mobile .touch-actions{grid-template-columns:56px 56px 80px;grid-template-rows:72px 80px;gap:8px}
 body.touch-compact #mobile #grab-touch,body.touch-compact #mobile #push-touch,body.touch-compact #mobile #sprint-touch,body.touch-compact #mobile #dive-touch{width:52px;height:52px}
}
@media(orientation:landscape) and (max-height:360px){
 #mobile .touch-actions{grid-template-columns:56px 56px 80px;grid-template-rows:72px 80px;gap:8px}#mobile #item-touch{width:72px;height:72px}#mobile #jump-touch{width:80px;height:80px}
 #mobile #grab-touch,#mobile #push-touch,#mobile #sprint-touch,#mobile #dive-touch{width:52px;height:52px}#move-zone{height:140px}#move-zone #move-stick{width:96px;height:96px}
}
@media(max-width:350px) and (orientation:portrait){#mobile .touch-actions{grid-template-columns:60px 80px;grid-template-rows:56px 72px 80px;gap:8px}#mobile #item-touch{width:72px;height:72px}#mobile #jump-touch{width:80px;height:80px}#mobile #grab-touch,#mobile #push-touch,#mobile #sprint-touch,#mobile #dive-touch{width:56px;height:56px}#move-zone{width:125px}#move-zone #move-stick{width:104px;height:104px}}
@media(prefers-reduced-motion:reduce){#mobile #item-touch.loaded.item-collected,#item-slot.loaded.item-collected{animation:none}}
#mobile-menu #menu-display{display:block;width:100%;margin:.55rem 0;background:#e7e4fb;color:#5b4e8d}.touch-guide{font-size:.72rem!important;line-height:1.5;color:#877398}

/* Mega update: one responsive lobby, one event entry, clear play hierarchy. */
#home .home-actions #quickplay{background:#ff5e94;color:#fff;border-color:#ff5e94;box-shadow:0 4px 0 #dd4176}#home .home-actions #create{background:#fff;color:#4d4768;border:2px solid #dfd9ec;box-shadow:none}#home .home-actions button{min-height:54px;font-family:inherit}#home .card-foot{font-size:12px}
body.lobby-mode #room-panel{width:min(1120px,calc(100vw - 32px));max-width:none;top:82px;bottom:18px;border:1px solid #fff9;box-shadow:0 18px 70px #3d35582b}
body.lobby-mode .room-invite-header{padding:10px 18px}.room-invite-header .eyebrow{font-size:10px}.lobby-code-row .room-code{font-size:21px;letter-spacing:3px}.lobby-code-row .invite-row{margin-left:auto}
body.lobby-mode #room-settings{display:grid;grid-template-columns:188px minmax(0,1fr) 248px;gap:20px;padding:16px 18px;overflow:hidden}
#hub-main,#hub-party,#lobby-avatar-panel{min-height:0;min-width:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding:0 3px}
#lobby-avatar-panel{text-align:center;background:linear-gradient(160deg,#eee4fb,#e3f3ed);border-radius:18px;padding:18px 10px;display:flex;align-items:center;flex-direction:column;gap:8px}#lobby-avatar-canvas{width:154px;height:192px;max-width:100%;filter:drop-shadow(0 8px 6px #79628c26)}.hub-eyebrow{font-weight:850;font-size:10px;line-height:1.4;letter-spacing:1.2px;color:#6c5b86}#lobby-avatar-level{font-size:13px}#lobby-avatar-edit{border-radius:12px;min-height:44px;width:100%;background:#fff;color:#65517f;font-weight:800}#lobby-progress{display:grid;gap:7px;background:#fff9;color:#66537b;border-radius:12px;padding:12px 9px;width:100%;text-align:left}#lobby-progress b{font-size:12px}#lobby-progress small{font-size:11px;line-height:1.4}#lobby-avatar-panel>p{font-size:12px;color:#827094;line-height:1.5;margin:auto 0 0}
.hub-families{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.hub-families button{min-height:48px;border-radius:13px;background:#eee9f5;color:#6b587c;font-size:14px;font-weight:850;border:2px solid transparent}.hub-families button.selected{background:#eee0ff;border-color:#a17bd1;color:#5b3d7e}.hub-families button:disabled{opacity:.75}#hub-family-hint{font-size:12px;line-height:1.5;color:#8c7b9d;margin:9px 0 12px}
#lobby-mode-timeattack.cup-event{width:100%;display:flex;align-items:center;gap:12px;padding:11px;border-radius:16px;border:2px solid #e9ca7a;background:linear-gradient(130deg,#fff6d6,#fffdf5);text-align:left;color:#624b2e;min-height:118px;transition:background .16s,border-color .16s,transform .16s}.cup-event:active{transform:scale(.99)}#lobby-mode-timeattack.cup-event.selected{border-color:#bd8a35;background:#ffeaa8}.cup-event img{width:105px;height:87px;object-fit:cover;border-radius:11px}.cup-event-copy{display:grid;gap:5px;min-width:0}.cup-event-copy .hub-eyebrow{color:#92703d}.cup-event-copy>b{font-size:15px}.cup-event-copy>strong{font-size:12px;color:#af7735}.cup-event-copy>small{font-size:10px;line-height:1.4}#hub-main .kids-section{padding:13px 0}#hub-main .kids-section h2{font-size:15px}#hub-main .kids-modes{grid-template-columns:repeat(3,minmax(0,1fr))}#hub-main .kids-modes button{font-size:12px;min-height:48px;font-family:inherit}#hub-main [hidden]{display:none!important}
#world-illustration{height:160px;background:#f1eaf5}#hub-world-preview{width:100%;height:100%;object-fit:cover;display:block}#world-illustration:before,#world-emoji,#world-toys{display:none!important}#selected-course{font-family:inherit}#hub-route-record{font-size:12px;text-align:center;padding:8px;background:#fff2d9;border-radius:10px;color:#8b6632;line-height:1.45}#hub-main #world-description{max-height:none;font-size:12px}#hub-party .kids-section{padding-top:9px}#hub-party h2{font-size:15px}#hub-party .player-chip{font-size:12px!important}#hub-party #roster{max-height:150px}#hub-party .look-button{display:none}#hub-party #community-settings{margin-top:9px}
body.cup-selected #room-course-controls,body.cup-selected .hub-game-choices,body[data-lobby-family="rally"] #room-course-controls{display:none!important}#cup-board{font-size:12px;min-height:43px}body.cup-selected #cup-board{display:block!important;margin-bottom:13px}
body.lobby-mode .lobby-footer{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:10px 18px}.lobby-footer #start{width:min(390px,55%);margin-left:auto;order:3;min-height:49px}.lobby-footer #host-hint{margin:0;flex:1;min-width:140px;font-size:12px}.lobby-footer #leave{order:0;font-size:18px;min-width:40px;min-height:40px}.lobby-footer #lobby-start-notice{order:2;width:100%;margin:0}body.lobby-mode #lobby-chat-wrap{top:27px;left:auto;right:440px;width:auto;max-height:70dvh;padding:8px 12px;background:#ffffffe8;z-index:18}body.lobby-mode #lobby-chat-wrap[open]{top:76px;right:24px;width:330px;box-shadow:0 12px 50px #30213e33}body.lobby-mode #lobby-chat-wrap>summary{font-size:12px}
#cup-attempt,#guide-count{position:fixed;top:calc(7.5rem + env(safe-area-inset-top,0px));z-index:24;pointer-events:none;padding:7px 11px;border-radius:12px;background:#fffdf0eb;font-size:12px;color:#5f6e5c;max-width:calc(100vw - 28px)}#cup-attempt{left:14px}#guide-count{right:14px;color:#a17825}.has-item-pickup #guide-count{visibility:hidden}
@media(max-width:1000px){body.lobby-mode #room-panel{top:72px;bottom:10px;width:calc(100vw - 20px)}body.lobby-mode #room-settings{grid-template-columns:minmax(0,1fr);overflow-y:auto;padding:12px 14px;gap:12px}#hub-main,#hub-party,#lobby-avatar-panel{overflow:visible}#lobby-avatar-panel{display:grid;grid-template-columns:66px 1fr auto;grid-template-rows:auto auto;padding:8px 12px;gap:5px 10px;text-align:left;align-items:center}#lobby-avatar-canvas{grid-row:1/3;width:65px;height:81px}#lobby-avatar-panel>.hub-eyebrow,#lobby-avatar-panel>p{display:none}#lobby-avatar-level{grid-column:2;grid-row:1;font-size:12px}#lobby-avatar-edit{grid-column:3;grid-row:1;font-size:11px;padding:7px;min-height:38px}#lobby-progress{grid-column:2/4;grid-row:2;padding:7px;gap:3px}#lobby-progress small{font-size:10px}.cup-event img{width:94px;height:76px}#lobby-mode-timeattack.cup-event{min-height:109px}.cup-event-copy>b{font-size:14px}.cup-event-copy>small{font-size:10px}#hub-world-preview{object-fit:contain}#world-illustration{height:144px}body.lobby-mode #lobby-chat-wrap{top:14px;right:114px;padding:8px;font-size:0}body.lobby-mode #lobby-chat-wrap>summary{font-size:0}body.lobby-mode #lobby-chat-wrap>summary:after{content:'💬';font-size:19px}body.lobby-mode #lobby-chat-wrap[open]{top:69px;bottom:auto;left:12px;right:12px;width:auto;padding:14px}body.lobby-mode #lobby-chat-wrap[open]>summary{font-size:13px}.lobby-footer #host-hint{display:none}.lobby-footer #start{width:calc(100% - 58px)}body.lobby-mode .lobby-footer{gap:10px;padding:10px 14px}}
@media(orientation:landscape) and (max-height:560px){body.lobby-mode #room-panel{top:58px;bottom:7px;width:calc(100vw - 20px)}body.lobby-mode .room-invite-header{padding:3px 12px}body.lobby-mode .room-invite-header .eyebrow{display:none}.lobby-code-row .room-code{font-size:17px;min-height:28px;padding:3px 9px;margin:0}.lobby-code-row .invite-row button{min-height:30px;font-size:11px}.lobby-code-row{gap:8px}body.lobby-mode #room-settings{grid-template-columns:minmax(0,1fr) 205px;overflow:hidden;gap:16px;padding:8px 12px}#lobby-avatar-panel{display:none}#hub-main,#hub-party{overflow-y:auto}.hub-families button{min-height:38px;font-size:12px}.cup-event img{width:80px;height:65px}#lobby-mode-timeattack.cup-event{min-height:90px;padding:7px;gap:8px}.cup-event-copy{gap:3px}.cup-event-copy>b{font-size:12px}.cup-event-copy>small{font-size:9px}#hub-family-hint{font-size:10px;margin:5px 0 8px}body.lobby-mode .lobby-footer{padding:5px 12px}.lobby-footer #start{width:240px;min-height:38px;font-size:15px}.lobby-footer #leave{min-height:32px}.lobby-footer #host-hint{display:block!important;font-size:10px}.lobby-code-row .room-code{letter-spacing:2px}#cup-attempt,#guide-count{top:calc(6.4rem + env(safe-area-inset-top,0px));font-size:10px;padding:5px 8px}}
@media(max-width:360px){.cup-event img{width:78px}.cup-event-copy>small{font-size:9px}.hub-families button{font-size:12px}#lobby-avatar-edit{font-size:10px}body.lobby-mode #room-settings{padding:8px 11px}}
@media(prefers-reduced-motion:reduce){.cup-event,.hub-families button{transition:none!important}.cup-event:active{transform:none}}
body.lobby-mode #room-panel .lobby-code-row .room-code{flex:0 0 auto;width:auto;min-width:130px;min-height:0;padding:6px 12px;font-size:20px;line-height:1.2;display:inline-flex;align-items:center}body.lobby-mode #room-panel #room-code{font-size:inherit}.lobby-code-row{justify-content:flex-start}body.lobby-mode #lobby-chat-wrap>summary{list-style:none}body.lobby-mode #lobby-chat-wrap>summary::before{content:none!important}body.lobby-mode #lobby-chat-wrap>summary::-webkit-details-marker{display:none}#room-world[hidden]{display:none!important}#world-picker .course-mini{height:82px;background-size:cover;background-position:center;border-radius:10px;transform:none}#world-picker .course-mini i{display:none}#world-picker .course-card{font-family:inherit}
@media(max-width:1000px){body.lobby-mode #room-settings{grid-template-rows:max-content max-content max-content;align-content:start}}
@media(orientation:landscape) and (max-height:560px){body.lobby-mode #room-settings{grid-template-rows:minmax(0,1fr);align-content:stretch}body.lobby-mode #room-panel .lobby-code-row .room-code{font-size:16px;padding:4px 10px;min-width:110px}body.lobby-mode #room-panel .room-invite-header{padding:4px 12px}body.lobby-mode #room-panel .lobby-footer{padding:4px 12px}.lobby-code-row .invite-row button{height:30px;min-height:30px}}

/* During the brief show opening the course remains visible above the rule card. */
#tour-skip{position:fixed;top:calc(env(safe-area-inset-top) + 8rem);right:1rem;z-index:70;padding:.65rem .9rem;border:0;border-radius:1.5rem;background:#fff8e9e8;color:#66517d;font:700 .85rem system-ui;touch-action:manipulation}
body.course-tour #mode-intro{top:auto;bottom:1rem;transform:translateX(-50%);padding:.85rem;width:min(28rem,calc(100% - 2rem))}
body.course-tour #mode-intro-title{font-size:clamp(1.1rem,3vw,1.5rem)}
@media(max-height:450px){body.course-tour #mode-intro{left:1rem;transform:none;width:18rem;bottom:1rem}body.course-tour #mode-intro-steps{display:none}#tour-skip{top:4.5rem}}
/* v64: optional guided lesson and fewer actions for small hands. */
#mobile .action-hidden{display:none!important}
#mobile #touch-more{grid-area:more;width:66px;height:38px;border-radius:16px;font-size:11px;white-space:nowrap;background:#fff9e5df;color:#67597d;align-self:center;justify-self:center;pointer-events:auto}
body.simple-actions:not(.action-extra) #mobile .touch-actions{grid-template-areas:"context more" "dive jump" "item item";grid-template-columns:72px 88px;grid-template-rows:64px 88px 76px;gap:8px;align-items:center}
body.simple-actions:not(.action-extra) #mobile .simple-context{grid-area:context!important;width:64px;height:64px}
body.simple-actions:not(.action-extra) #mobile #dive-touch{width:68px;height:68px}
body.simple-actions:not(.action-extra) #mobile #jump-touch{width:88px;height:88px}
body.simple-actions:not(.action-extra) #mobile #item-touch{width:76px;height:76px;justify-self:end;margin-right:7px}
body.simple-actions.action-extra #mobile .touch-actions{grid-template-areas:"hold push" "sprint item" "dive jump" "more more";grid-template-rows:56px 72px 80px 38px;gap:6px}
body.simple-actions.action-extra #mobile #touch-more{justify-self:end;width:80px}
body.simple-actions:not(.has-item-pickup) #mobile .touch-actions:has(#item-touch.action-hidden){grid-template-rows:64px 88px 0}
.learn-prompt{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap;padding:.7rem;background:#e9f5ef;border-radius:1rem;margin:.6rem 0;color:#487365;font-size:.82rem}.learn-prompt>button{background:#d4eddf;color:#356553;min-height:40px}.learn-prompt #learn-dismiss{margin-left:auto;min-width:36px;padding:.4rem}
#tutorial-card{position:fixed;z-index:66;top:calc(68px + env(safe-area-inset-top,0px));left:50%;translate:-50% 0;width:min(450px,calc(100vw - 28px));padding:.9rem 1rem;border-radius:1.2rem;border:2px solid #fff8e8;background:#fffaf0f2;color:#574764;box-shadow:0 .6rem 2rem #45364b23;text-align:center;pointer-events:none}
#tutorial-progress{font-size:.7rem;color:#8a7697;font-weight:800}#tutorial-card>div{display:flex;align-items:center;justify-content:center;gap:.6rem}#tutorial-icon{font-size:1.8rem}#tutorial-title{font-size:1.2rem;margin:.35rem 0}#tutorial-hint{font-size:.82rem;line-height:1.45;margin:.3rem 0 .7rem}#tutorial-exit{pointer-events:auto;min-height:38px;font-size:.75rem;background:#eee2f0;color:#66516d}
body.tutorial-mode #race-hud,body.tutorial-mode #round-progress,body.tutorial-mode #standings,body.tutorial-mode #race-actions,body.tutorial-mode #ability,body.tutorial-mode #emote-bar,body.tutorial-mode #mode-status,body.tutorial-mode #section-banner,body.tutorial-mode #guide-count,body.tutorial-mode #action-feedback,body.tutorial-mode #minigame-hud{display:none!important}
body.tutorial-mode #mobile{visibility:visible!important}
#rally-stages{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.4rem;margin:1rem 0 .5rem}.rally-stage{display:flex;flex-direction:column;align-items:center;gap:.25rem;padding:.6rem .1rem;border:2px solid transparent;background:#eee8f5;border-radius:.85rem;min-width:0}.rally-stage>b{font-size:1.7rem}.rally-stage>span{font-size:.7rem;font-weight:800}.rally-stage>small{font-size:.65rem;color:#736684;min-height:1em}.rally-stage.done{background:#dcefe4}.rally-stage.current{border-color:#ec9f71;background:#fff0d8}.rally-stage.future{opacity:.65}#rally-next-title{font-size:1.1rem;margin:.8rem 0 .3rem}#rally-next-rule,#rally-alive{font-size:.8rem;line-height:1.4}#elimination-screen{max-height:calc(100dvh - 100px);overflow-y:auto;overscroll-behavior:contain}#elimination-screen #elimination-list{max-height:130px;overflow:auto}#spectator-auto{font-size:.68rem;min-width:54px;padding:.4rem}#spectator-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#device-test-past{grid-column:1/-1;font-size:.75rem}#device-test-history{padding-left:1.2rem;line-height:1.7}#device-test-status{white-space:pre-line}
@media(orientation:landscape) and (max-height:600px){body.simple-actions:not(.action-extra) #mobile .touch-actions{grid-template-areas:"context item more" "dive jump jump";grid-template-columns:64px 76px 52px;grid-template-rows:60px 80px;gap:6px}body.simple-actions:not(.action-extra) #mobile #jump-touch{width:80px;height:80px;justify-self:end}body.simple-actions:not(.action-extra) #mobile #item-touch{width:60px;height:60px;margin:0;justify-self:center}body.simple-actions:not(.action-extra) #mobile #dive-touch,body.simple-actions:not(.action-extra) #mobile .simple-context{width:56px;height:56px}#mobile #touch-more{width:52px;height:36px;font-size:9px}body.simple-actions.action-extra #mobile .touch-actions{grid-template-areas:"hold push item" "sprint dive jump" "more more more";grid-template-columns:56px 56px 80px;grid-template-rows:56px 80px 30px;gap:5px}#tutorial-card{top:calc(52px + env(safe-area-inset-top,0px));width:min(430px,55vw);padding:.45rem .7rem}#tutorial-icon{font-size:1.35rem}#tutorial-title{font-size:.95rem;margin:.15rem 0}#tutorial-hint{font-size:.7rem;margin:.2rem 0 .35rem}#tutorial-exit{min-height:30px;padding:.35rem .6rem}#tutorial-progress{font-size:.6rem}#elimination-screen{max-height:calc(100dvh - 70px)}#rally-stages{margin:.4rem 0}.rally-stage{padding:.3rem}.rally-stage>b{font-size:1.2rem}}
@media(max-width:350px) and (orientation:portrait){body.simple-actions:not(.action-extra) #mobile .touch-actions{grid-template-columns:64px 80px;grid-template-rows:56px 80px 68px;gap:6px}body.simple-actions:not(.action-extra) #mobile #jump-touch{width:80px;height:80px}body.simple-actions:not(.action-extra) #mobile #dive-touch,body.simple-actions:not(.action-extra) #mobile .simple-context{width:56px;height:56px}body.simple-actions:not(.action-extra) #mobile #item-touch{width:68px;height:68px}}

/* Reports stay inside one closable, scrollable dialog; the race HUD gains no panels. */
#bug-report-dialog{width:min(34rem,calc(100vw - 1.5rem));max-height:calc(100dvh - 2rem - env(safe-area-inset-bottom));box-sizing:border-box;overflow:auto;padding:1.2rem;border:0;border-radius:1.25rem;background:#fff9ef;color:#554968}#bug-report-dialog label{display:block;font-weight:700;margin:.8rem 0 .35rem}#bug-report-dialog select,#bug-report-dialog textarea{box-sizing:border-box;width:100%;font-size:1rem;padding:.7rem;border:2px solid #ddd3e5;border-radius:.6rem;background:#fff;color:#40354d}#bug-report-dialog textarea{resize:vertical}#bug-report-copy{width:100%;margin:.85rem 0 .4rem}#bug-report-data{font-family:monospace;white-space:pre;overflow:auto}#bug-report-dialog small{display:block;margin-top:.8rem}#device-test-compare{padding-left:1.3rem;font-size:.85rem;line-height:1.5}#device-test-comparison>summary{cursor:pointer;font-weight:700}
#bug-report-dialog .mobile-menu-head{display:flex;align-items:center;justify-content:space-between;gap:.7rem;background:transparent}#bug-report-dialog h2{margin:0;font-size:1.2rem}#bug-report-dialog button{border:0;border-radius:.8rem;min-height:2.75rem;padding:.7rem 1rem;font:inherit;font-weight:800;background:#7360c6;color:#fff;cursor:pointer}#bug-report-dialog button.icon{flex:0 0 2.75rem;width:2.75rem;padding:.4rem;background:#eee6f5;color:#5a4a74}#bug-report-dialog button:focus-visible{outline:3px solid #32bdce;outline-offset:3px}#device-test,#device-test-status,#device-test-past,#device-test-comparison,#device-test-copy{grid-column:1 / -1}#device-test{min-height:3rem}#device-test-status{white-space:pre-line;max-height:16rem;overflow:auto;margin:.3rem 0;font-size:.8rem}
#bug-report-dialog .mobile-menu-head{position:sticky;top:-1.2rem;z-index:1;background:#fff9ef;padding:.4rem 0}

/* Local practice and optional results replay keep the live playfield clear. */
#ghost-racing{position:fixed;left:50%;top:4.6rem;transform:translateX(-50%);z-index:12;color:#294e60;background:#dbf6f2dc;border-radius:2rem;padding:.3rem .7rem;font-size:.75rem;pointer-events:none}
.photo-finish{background:#fff0b9;border:2px solid #e4bf60;border-radius:1rem;padding:.6rem;font-weight:800;color:#62452c}
#show-highlight{background:#e1d8f6;color:#493468;margin:.4rem auto;min-height:2.7rem}
#replay-dialog{width:min(40rem,94vw);padding:1rem;border:0;border-radius:1.4rem;color:#433852;background:#f7f3fb;max-height:92dvh;overflow:auto}
#replay-dialog::backdrop{background:#241c3dd9}#replay-dialog .replay-heading{display:flex;align-items:center;justify-content:space-between;gap:.5rem}#replay-dialog h2{font-size:clamp(1rem,3vw,1.4rem);margin:.2rem 0 .7rem}#close-replay{min-width:2.7rem;min-height:2.7rem;padding:.3rem}#replay-canvas{display:block;width:100%;height:auto;aspect-ratio:16/9;border-radius:.8rem;touch-action:none}#replay-time{width:100%;min-height:2.8rem;accent-color:#9272c9}.replay-controls{display:flex;gap:.7rem}.replay-controls button{flex:1;min-height:2.7rem}#replay-dialog p{font-size:.75rem;text-align:center;margin:.6rem 0 0}
@media(max-width:768px){#ghost-racing{top:3.6rem;font-size:.65rem;padding:.2rem .5rem}#replay-dialog{padding:.7rem}}
@media(max-height:500px) and (orientation:landscape){#replay-dialog{width:min(35rem,94vw);padding:.5rem}#replay-canvas{max-height:52dvh;object-fit:contain}#replay-dialog p{display:none}}

body.show-mode-intro #countdown{z-index:64;top:auto;bottom:calc(.6rem + env(safe-area-inset-bottom,0px));font-size:2.5rem;line-height:1;transform:translateX(-50%);animation:none}#rally-highlight{min-height:2.7rem;background:#e1d8f6;color:#493468}
/* Optional custom layout: screen coordinates are fitted inside safe thumb zones. */
body.custom-touch-layout #mobile{pointer-events:none}body.custom-touch-layout #mobile .touch-actions{position:static;display:block;width:0;height:0;transform:none;pointer-events:none}body.custom-touch-layout #mobile .touch-actions>button,body.custom-touch-layout #touch-more{position:fixed;left:var(--touch-x);top:var(--touch-y);right:auto;bottom:auto;width:var(--touch-size);height:var(--touch-size);min-width:0;min-height:0;margin:0;transform:translate(-50%,-50%);pointer-events:auto;grid-area:auto;z-index:34}body.custom-touch-layout #move-zone{position:fixed;left:var(--touch-x);top:var(--touch-y);right:auto;bottom:auto;width:calc(var(--touch-size) + 28px);height:calc(var(--touch-size) + 28px);transform:translate(-50%,-50%);pointer-events:auto}body.custom-touch-layout #move-stick{width:var(--stick-size);height:var(--stick-size);left:14px;top:14px;bottom:auto}body.custom-touch-layout #stick-knob{width:var(--knob-size);height:var(--knob-size)}body.custom-touch-layout #move-zone>small{display:none}body.custom-touch-layout #mobile button small{font-size:clamp(.48rem,1.8vw,.65rem)}
#touch-editor{width:min(46rem,94vw);max-height:94dvh;overflow:auto;padding:1rem;border:0;border-radius:1.25rem;background:#f6f1fb;color:#453852}#touch-editor::backdrop{background:#21172bd9}#touch-editor .editor-heading{display:flex;align-items:center;justify-content:space-between;gap:.5rem}#touch-editor h2{font-size:1.2rem;margin:.2rem 0}#touch-editor p{font-size:.8rem;margin:.5rem 0}#close-touch-editor{min-width:2.75rem;min-height:2.75rem}#touch-editor-stage{position:relative;overflow:hidden;border:2px dashed #a695c7;border-radius:1rem;background:linear-gradient(#dbeef1,#ded4ef);touch-action:none;user-select:none;margin:.5rem 0}#touch-editor-stage button{position:absolute;transform:translate(-50%,-50%);padding:.1rem;border-radius:50%;font-size:.55rem;font-weight:900;border:2px solid #fff;background:#c8b1e6;color:#36264e;touch-action:none;user-select:none;min-width:0;min-height:0;box-shadow:0 .15rem .3rem #35234944}#touch-editor-stage [data-control=stick]{background:#a6d9d2;font-size:1.7rem}#touch-editor-stage [data-control=jump]{background:#f1a6c7}#touch-editor-stage button:focus-visible{outline:3px solid #7051a9;outline-offset:2px}.touch-editor-sliders{display:grid;grid-template-columns:1fr 1fr;gap:.6rem}.touch-editor-sliders label{font-size:.75rem}.touch-editor-sliders input{width:100%;min-height:2.75rem}.touch-editor-tools,.touch-editor-footer{display:flex;gap:.5rem;margin-top:.5rem}.touch-editor-tools button,.touch-editor-footer button{flex:1;min-height:2.75rem;font-size:.8rem}.touch-editor-footer{position:sticky;bottom:-1rem;background:#f6f1fb;padding:.5rem 0}.practice-section-controls{display:grid;gap:.5rem;margin:.65rem 0}.practice-section-controls label{font-size:.8rem}.practice-section-controls select{width:100%;min-height:2.75rem}.practice-section-controls button{min-height:2.75rem}

body.custom-touch-layout #mobile button.pressed{transform:translate(-50%,-50%) scale(.94)}
@media (min-width:600px) and (max-height:500px){#touch-editor[open]{display:grid;grid-template-columns:1.15fr 1fr;column-gap:.7rem;row-gap:.25rem;padding:.65rem}#touch-editor .editor-heading,#touch-editor>p{grid-column:1/-1}#touch-editor h2{font-size:1rem}#touch-editor>p{margin:.15rem 0;font-size:.7rem}#touch-editor-stage{grid-column:1;grid-row:3/span 3;align-self:center;margin:0}#touch-editor .touch-editor-sliders,#touch-editor .touch-editor-tools,#touch-editor .touch-editor-footer{grid-column:2;margin:0}#touch-editor .touch-editor-footer{position:static;padding:.25rem 0}#touch-editor .touch-editor-tools button,#touch-editor .touch-editor-footer button{font-size:.7rem}}

#course-sync{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;background:#251b35d9;padding:1rem}#course-sync>div{max-width:27rem;padding:1.5rem;border-radius:1.3rem;background:#faf5fc;color:#342943;text-align:center}#course-sync h2{font-size:1.35rem}#course-sync button{display:block;width:100%;min-height:2.75rem;margin-top:.7rem}#course-sync.hidden{display:none}

/* A single aspect ratio keeps course miniatures whole on every lobby layout. */
#world-illustration{height:auto;aspect-ratio:16/9;min-height:0}#hub-world-preview{object-fit:contain}#world-picker .course-mini{height:auto;aspect-ratio:16/9;background-size:contain;background-repeat:no-repeat}.cup-event img{height:auto;aspect-ratio:16/9;object-fit:contain;flex-shrink:0}
