@import url('/fonts.css');
:root{--paper:#f6f5ef;--ink:#253c3a;--muted:#7b8580;--line:#e1e4da;--mint:#d7e8dc;--green:#376a59;--coral:#f47769;--shadow:0 18px 50px #2b4c3b09;font-family:ui-rounded,"SF Pro Rounded","Segoe UI",Arial,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);font-synthesis:none;line-height:1.5}*{box-sizing:border-box}html{background:var(--paper);height:100%;overscroll-behavior:none}body{margin:0;min-width:320px;overflow-x:hidden}button,input,select{font:inherit}button,a,input,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer;color:inherit}button:disabled{cursor:wait;opacity:.55}button:focus-visible,a:focus-visible,select:focus-visible{outline:3px solid #89ada0;outline-offset:4px}a{color:inherit;text-decoration:none}button{border:0}button:active{transform:translateY(1px)}[hidden]{display:none!important}.topbar{height:98px;max-width:1510px;padding:0 64px;margin:auto;display:flex;justify-content:space-between;align-items:center;gap:20px}.brand{display:flex;align-items:center;gap:14px;font-size:27px;font-weight:800;letter-spacing:-1px;white-space:nowrap}.brand-icon{position:relative;width:48px;height:34px;display:inline-block}.brand-icon i{width:25px;height:25px;background:#f47769;border:2px solid var(--paper);border-radius:50%;position:absolute;bottom:0;left:1px}.brand-icon i:nth-child(2){background:#58bca8;left:19px;bottom:8px}.brand-icon i:nth-child(3){width:15px;height:15px;background:#edbb59;left:33px;bottom:0}.top-actions{display:flex;align-items:center;gap:17px}.icon-btn{width:40px;height:40px;display:grid;place-items:center;border-radius:50%;background:transparent;font-size:23px}.icon-btn:hover{background:#e5eadd}.profile-btn{display:flex;align-items:center;gap:9px;background:white;border:1px solid var(--line);border-radius:30px;padding:7px 16px;font-size:13px;max-width:220px}.profile-btn span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tiny-ball{width:22px;height:22px;border-radius:50%;background:#f47769;box-shadow:inset -3px -3px 0 #00000010,inset 3px 3px 0 #ffffff35;display:inline-block;flex-shrink:0}.c0{background:#f47769!important}.c1{background:#58bca8!important}.c2{background:#edbb59!important}.c3{background:#7797e8!important}.language{display:flex;align-items:center;gap:6px;color:#596d63;font-size:13px}.language>span{font-size:20px}.language select{border:0;background:transparent;color:inherit;padding:8px 16px 8px 2px;max-width:116px;cursor:pointer}.lobby{max-width:1510px;margin:auto;padding:12px 64px 30px}.hero{display:grid;grid-template-columns:1.05fr 1fr;gap:20px;min-height:452px;border-bottom:1px solid var(--line);padding-bottom:32px}.hero-copy{padding:36px 0 20px;z-index:1}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2px;color:#7d9488;text-transform:uppercase}.hero h1{font-family:Georgia,"Times New Roman",serif;font-size:clamp(48px,4.6vw,76px);line-height:1.05;font-weight:500;letter-spacing:-3px;margin:25px 0 20px}.hero h1 em{font-style:normal;color:var(--green)}.hero p{font-size:15px;color:#7b8580;max-width:380px;line-height:1.8;margin:0 0 28px}.hero-actions{display:flex;gap:11px;flex-wrap:wrap}.button{border-radius:14px;padding:14px 21px;font-size:13px;line-height:1.4;font-weight:650;display:inline-flex;align-items:center;justify-content:center;gap:10px;transition:background .18s,box-shadow .18s,transform .12s;min-height:47px}.primary{background:var(--coral);color:#fff;box-shadow:0 7px 0 #db655b,0 10px 20px #e2776222}.primary:hover{background:#f88679;box-shadow:0 7px 0 #db655b,0 14px 25px #e2776233}.primary:active{transform:translateY(4px);box-shadow:0 3px 0 #db655b}.secondary{background:#fff;border:1px solid var(--line);color:#476157}.secondary:hover{background:#eef2e9}.small{min-height:38px;padding:10px 16px;font-size:12px;border-radius:11px}.wide{width:100%;margin-top:15px}.hero-notes{display:flex;align-items:center;gap:7px;margin-top:23px;font-size:10px;color:#94a18f;flex-wrap:wrap}.pill-dot{width:5px;height:5px;border-radius:100%;background:#83a997}.text-button{background:transparent;padding:4px;color:#577c67;font-size:12px;font-weight:600}.hero-notes .text-button{margin-left:12px}.hero-art{position:relative;min-width:0;min-height:400px}.hero-art canvas{width:100%;height:100%;display:block;position:absolute;inset:0}.art-note{position:absolute;bottom:26px;left:48%;transform:translateX(-50%);padding:8px 15px;border:1px solid #d6dfd0;background:#ffffffb8;color:#5d7a65;border-radius:30px;font-size:10px;white-space:nowrap;display:flex;align-items:center;gap:7px}.art-note i{width:6px;height:6px;border-radius:50%;background:#7cad91}.adventure-stamp{position:absolute;right:18px;top:20px;color:#8d9b8d;font:16px Georgia,serif;transform:rotate(5deg);text-align:center}.adventure-stamp small{font:8px Arial,sans-serif;letter-spacing:.4px}.lobby-bottom{display:grid;grid-template-columns:1.4fr 1fr;gap:70px;margin-top:34px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.section-heading h2{font:500 27px Georgia,"Times New Roman",serif;letter-spacing:-.6px;margin:6px 0 0}.section-heading .eyebrow{font-size:9px;letter-spacing:1.7px}.join-form{background:#edeee6;border-radius:13px;display:flex;align-items:center;justify-content:space-between;padding:10px 11px 10px 17px;gap:14px;margin-bottom:18px}.join-form>label{font-size:11px;color:#81907f}.join-form>div{display:flex;align-items:center;gap:8px}.join-form input{width:122px;font-size:12px;border:0;background:#fff9;border-radius:9px;padding:10px;text-transform:uppercase;outline-color:#8ca594}.join-form .button{background:#fff}.rooms-empty{text-align:center;border:1px dashed #cfd9cc;border-radius:17px;padding:28px 20px 24px;min-height:160px}.empty-balls{display:flex;justify-content:center;gap:5px;height:40px;align-items:center;opacity:.75}.empty-balls i{width:19px;height:19px;border-radius:100%;background:#a8c8b1;position:relative}.empty-balls i:nth-child(2){width:27px;height:27px;background:#edbb83}.empty-balls i:after{content:'••';font-size:10px;letter-spacing:2px;color:#58755f;position:absolute;top:0;left:4px}.rooms-empty h3{font-size:13px;margin:8px 0 5px}.rooms-empty p{font-size:11px;line-height:1.7;color:#93a08f;max-width:310px;margin:0 auto}.room-card{display:grid;grid-template-columns:58px 1fr auto;align-items:center;gap:14px;background:white;border:1px solid var(--line);padding:13px;border-radius:16px;margin-bottom:10px;box-shadow:var(--shadow)}.room-thumb{width:58px;height:58px;border-radius:12px;background:#d8e8d6;position:relative;overflow:hidden}.room-thumb:before,.room-thumb:after{content:'';position:absolute;width:80px;height:40px;border-radius:50%;background:#9dbb9d;bottom:-12px;left:-10px;transform:rotate(-12deg)}.room-thumb:after{background:var(--coral);width:19px;height:19px;bottom:19px;left:17px;box-shadow:4px 3px 0 #cf6a5e}.room-thumb[data-theme="cave"]{background:#aca6cc}.room-thumb[data-theme="cloud"]{background:#d2dded}.room-thumb[data-theme="lighthouse"]{background:#efd7bc}.room-card h3{font-size:13px;line-height:1.3;margin:0 0 5px;overflow-wrap:anywhere}.room-card p{font-size:10px;color:#8d9b8c;margin:0}.room-card small{font-size:9px;color:#6f897b;display:block;margin-top:4px}.room-card .button{background:#e5efe4;color:#49715b}.journey{border:1px solid #dce4d7;border-radius:20px;padding:24px 25px;background:#eef2e8;align-self:start}.journey h2{font-size:25px}.journey .section-heading{margin-bottom:6px}.journey p{color:#8d9b86;font-size:11px;margin:0 0 18px}.journey-star{color:#c5a365;font-size:31px}.level-row{display:grid;grid-template-columns:32px 1fr 18px;align-items:center;gap:12px;min-height:51px;border-bottom:1px solid #dce4d7}.level-row:last-child{border-bottom:0}.level-number{width:29px;height:29px;border:1px solid #d0dccc;background:#f7f8f1;border-radius:10px;display:grid;place-items:center;font-size:11px;color:#748e76}.level-row.current .level-number{background:#47795f;color:white;border-color:transparent}.level-row strong{font-size:11px;font-weight:600;display:block}.level-row small{font-size:9px;color:#96a38f;display:block}.level-row.locked{opacity:.47}.level-row>span:last-child{color:#8a9b83;font-size:12px}.journey-footer{display:flex;gap:8px;align-items:center;color:#8c9a86;font-size:10px;padding-top:18px}.journey-footer span{background:#d4e1cc;border-radius:50%;width:18px;height:18px;text-align:center}.lobby-footer{display:flex;justify-content:space-between;font-size:8px;letter-spacing:1.8px;color:#a5ad9e;margin-top:31px;padding-bottom:10px}.waiting-view{max-width:1450px;margin:auto;padding:20px 64px 45px}.waiting-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.code-pill{font-size:14px;letter-spacing:3px;padding:9px 16px;background:#e9eee2;border-radius:12px}.waiting-layout{display:grid;grid-template-columns:1.4fr 1fr;gap:45px}.waiting-scene{min-height:570px;position:relative;border-radius:30px;overflow:hidden;background:#e5ecdd}.waiting-scene canvas{width:100%;height:100%;position:absolute}.waiting-scene-label{position:absolute;left:35px;right:20px;top:35px}.waiting-scene-label h1{font:500 43px/1.1 Georgia,serif;max-width:400px;margin:15px 0}.waiting-panel{padding:18px 0}.waiting-panel h2{font:500 35px/1.15 Georgia,serif;margin:15px 0}.waiting-panel>p{font-size:13px;color:#87927e;line-height:1.8}.waiting-player{display:flex;gap:15px;align-items:center;background:white;border:1px solid var(--line);border-radius:15px;padding:13px 17px;margin:9px 0}.waiting-player .tiny-ball{width:35px;height:35px}.waiting-player strong{font-size:13px;display:block}.waiting-player small{font-size:10px;color:#8e9c88}.waiting-player.empty{background:transparent;border-style:dashed;opacity:.65;font-size:12px}.waiting-panel .shared-progress-note{font-size:11px;line-height:1.6;margin-top:20px}.invite-help{display:block;font-size:10px;color:#95a08f;margin-top:20px;line-height:1.7}.game-view{max-width:1440px;padding:10px 40px 15px;margin:0 auto;height:calc(100dvh - 98px);display:flex;flex-direction:column;gap:12px}.game-heading{display:flex;align-items:center;justify-content:space-between;flex-shrink:0}.game-heading h2{font:500 29px/1.2 Georgia,serif;margin:5px 0 0}.game-heading .eyebrow{font-size:9px}.game-actions{display:flex;gap:10px;align-items:center}.team-hud{display:flex;align-items:center;gap:20px;min-height:46px;flex-shrink:0}#team-balls{display:flex;gap:7px}.team-person{display:flex;align-items:center;gap:5px;font-size:10px;max-width:125px}.team-person span:last-child{max-width:78px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.team-person.self .tiny-ball{outline:2px solid #536f5f;outline-offset:2px}.team-person.disconnected{opacity:.4}.progress-wrap{flex:1;max-width:410px}.progress-label{display:flex;justify-content:space-between;font-size:9px;color:#869780;margin-bottom:5px}.progress-track{height:6px;border-radius:9px;background:#e2e7db;overflow:hidden}#progress-bar{height:100%;width:0;border-radius:8px;background:#799d79;transition:width .2s}#team-status{font-size:10px;color:#a4865c;margin-left:auto;max-width:180px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.stage-wrap{position:relative;flex:1;min-height:200px;border-radius:24px;overflow:hidden;box-shadow:0 2px 0 #bdc9b7;background:#dfeddc;touch-action:none;user-select:none;-webkit-user-select:none}#stage{width:100%;height:100%;display:block;touch-action:none;outline:none}.desktop-controls{font-size:10px;color:#899580;display:flex;justify-content:space-between;padding:2px 6px;flex-shrink:0}.touch-controls{display:none}.stage-notice{position:absolute;top:18px;left:50%;transform:translateX(-50%);background:#fffffff2;border:1px solid #d6e0d2;box-shadow:0 8px 20px #2242290a;max-width:90%;border-radius:16px;padding:12px 20px;text-align:center;pointer-events:none;font-size:12px;animation:notice .25s ease}.stage-notice strong{display:block;font:500 20px Georgia,serif}.stage-notice small{color:#7d9279;font-size:11px}.stage-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#eaf0df77;backdrop-filter:blur(4px);padding:20px}.win-card{max-width:460px;background:#fffffff7;border-radius:28px;padding:34px;text-align:center;box-shadow:0 12px 60px #33563822}.win-card .medal{font-size:48px;line-height:1;color:#d1aa55}.win-card h2{font:500 36px/1.15 Georgia,serif;margin:18px 0 12px}.win-card p{font-size:12px;color:#84937d}.win-card .button{margin-top:14px}.win-card .countdown{font-size:26px;color:#6c9777}.connection-banner{position:absolute;top:10px;left:10px;right:10px;text-align:center;border-radius:12px;padding:8px;background:#fff0d7;color:#85694b;font-size:12px}.boot{position:fixed;z-index:50;inset:0;background:var(--paper);display:flex;flex-direction:column;align-items:center;justify-content:center}.boot p{font-size:13px;color:#83927a}.loader-ball{display:block;width:50px;height:50px;background:var(--coral);border-radius:50%;animation:bounce .7s infinite alternate;box-shadow:inset -6px -7px 0 #dc695f}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:90%;z-index:120;background:#2e4c40;color:white;padding:13px 24px;border-radius:15px;font-size:12px;box-shadow:0 10px 30px #203d3020;animation:notice .2s}dialog{background:#fcfcf8;color:var(--ink);border:1px solid #e0e5db;border-radius:27px;width:min(490px,calc(100% - 28px));max-height:90dvh;padding:34px;box-shadow:0 35px 100px #1f493028}dialog::backdrop{background:#26463555;backdrop-filter:blur(4px)}.modal-close{position:absolute;right:17px;top:15px;background:transparent;font-size:18px;color:#809078;padding:8px}#modal-content>h2{font:500 33px/1.12 Georgia,serif;margin:15px 20px 13px 0}#modal-content>p{color:#8a9782;font-size:12px;line-height:1.8}.form-label{display:block;font-size:11px;font-weight:650;color:#697d60;margin:21px 0 8px}.form-input{width:100%;border:1px solid #d9e3d4;border-radius:12px;padding:13px 15px;background:white;color:#34513b;font-size:14px;outline-color:#9bb893}.color-options{display:flex;gap:15px;margin:14px 0 20px}.color-option{width:46px;height:46px;border:3px solid transparent;border-radius:50%;background:#eee;box-shadow:inset -4px -5px 0 #00000010;position:relative}.color-option[aria-pressed=true]{outline:2px solid #4d7257;outline-offset:4px}.color-option:after{content:'••';color:#35514a;position:absolute;top:6px;left:8px;font-size:15px;letter-spacing:5px}.capacity-options{display:flex;gap:10px}.capacity-options button{width:50px;height:45px;border-radius:12px;background:#e9eee3;font-size:15px}.capacity-options button[aria-pressed=true]{background:#51765e;color:white}.form-note{font-size:10px;line-height:1.7;color:#99a28f;margin:18px 0}.help-row{display:grid;grid-template-columns:35px 1fr;gap:12px;margin:20px 0}.help-row>span{border-radius:12px;width:33px;height:33px;background:#e5eddd;display:grid;place-items:center;color:#6b8d6a;font-size:13px}.help-row strong{font-size:13px;display:block}.help-row p{font-size:11px;line-height:1.8;color:#8c9984;margin:4px 0}.pause-note{background:#edf1e7;border-radius:15px;padding:14px}.game-mode .topbar{height:72px;padding:0 40px;max-width:1440px}.game-mode .brand{font-size:23px}.game-mode .game-view{height:calc(100dvh - 72px)}.game-mode{overflow:hidden;height:100dvh}.button>span{font-size:10px}html[lang=zh-CN] h1,html[lang=zh-CN] h2{font-family:"PingFang SC","Microsoft YaHei",sans-serif;letter-spacing:-1px}.join-form input::placeholder,.form-input::placeholder{color:#a9b29f}@keyframes bounce{to{transform:translateY(-20px) scale(.95,1.06)}}@keyframes notice{from{opacity:0;margin-top:5px}to{opacity:1;margin-top:0}}@media(min-width:1600px){.hero{min-height:510px}.hero-copy{padding-top:54px}.hero-art{min-height:460px}.lobby-bottom{gap:90px}.lobby{padding-top:30px}}@media(max-width:1100px){.topbar{padding:0 32px}.lobby{padding:0 32px 25px}.hero{min-height:420px}.hero h1{font-size:55px}.hero p{font-size:13px}.lobby-bottom{gap:28px}.button{padding:13px 16px}.hero-art{min-height:350px}.art-note{font-size:8px;bottom:35px}.waiting-view{padding:15px 32px}.waiting-layout{gap:25px}.waiting-scene{min-height:500px}.waiting-scene-label h1{font-size:35px}.team-hud{gap:12px}.team-person span:last-child{display:none}.game-view{padding:5px 25px 12px}}@media(max-width:760px){.topbar{height:77px;padding:0 20px}.brand{font-size:22px;gap:8px}.brand-icon{transform:scale(.82);transform-origin:left center;width:40px}.top-actions{gap:5px}.profile-btn{padding:5px 7px;border:0;background:none}.profile-btn span:last-child{display:none}.language{font-size:11px;gap:0}.language>span{display:none}.language select{max-width:92px;padding:7px}.lobby{padding:0 22px 22px}.hero{position:relative;grid-template-columns:1fr;gap:0;padding-bottom:25px}.hero-copy{padding-top:22px}.hero h1{font-size:55px;letter-spacing:-2px;margin:20px 0 15px}.hero p{max-width:410px;line-height:1.8}.hero-art{min-height:275px;margin-top:-12px;order:2}.hero-copy{order:1}.hero-notes{font-size:9px}.hero-actions .button{font-size:12px}.art-note{bottom:12px}.adventure-stamp{font-size:13px;top:0;right:15px}.lobby-bottom{grid-template-columns:1fr;gap:25px;margin-top:25px}.journey{order:2;padding:20px}.lobby-footer{font-size:7px;letter-spacing:.9px;gap:10px}.join-form{flex-wrap:wrap}.join-form>label{font-size:10px}.section-heading h2{font-size:26px}.waiting-view{padding:8px 20px 25px}.waiting-layout{grid-template-columns:1fr;gap:12px}.waiting-scene{min-height:280px}.waiting-scene-label{left:20px;top:20px}.waiting-scene-label h1{font-size:32px;max-width:240px}.waiting-panel{padding:0}.waiting-panel h2{font-size:28px}.waiting-player{padding:10px 14px}.waiting-top{margin-bottom:12px}.game-mode .topbar{height:56px;padding:0 13px}.game-mode .brand{font-size:19px;gap:0}.game-mode .brand-icon{transform:scale(.7);width:36px}.game-mode .game-view{height:calc(100dvh - 56px);padding:4px 10px max(5px,env(safe-area-inset-bottom));gap:6px}.game-heading h2{font-size:21px}.game-heading .eyebrow{font-size:8px;letter-spacing:1px}.game-actions{gap:4px}.game-actions .button{font-size:10px;padding:8px 10px;min-height:32px}.game-actions .icon-btn{width:30px;height:30px;font-size:18px}.team-hud{gap:9px;min-height:35px}.tiny-ball{width:18px;height:18px}.team-person{max-width:20px}.progress-label{font-size:8px}.progress-wrap{max-width:none}#team-status{font-size:8px;max-width:95px}.stage-wrap{border-radius:16px;min-height:170px}.touch-controls{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-shrink:0;min-height:100px;padding:10px 3px 5px;touch-action:none;user-select:none}.touch-move{display:flex;gap:10px}.touch-controls button{width:66px;height:66px;background:#e2e9db;border:1px solid #d0dccb;border-radius:22px;color:#53715a;font-size:23px;box-shadow:0 5px 0 #bdceb7;touch-action:none;user-select:none}.touch-controls button:active,.touch-controls button.pressed{transform:translateY(4px);box-shadow:0 1px 0 #bdceb7;background:#cedec5}.touch-controls .touch-jump{background:var(--coral);color:white;box-shadow:0 5px 0 #d86559;width:78px;height:78px;border-color:transparent;font-size:30px;line-height:1.1}.touch-jump small{display:block;font-size:9px;font-weight:700}.touch-controls>span{font-size:8px;color:#9aa38f;max-width:88px;text-align:center}.desktop-controls{display:none}.stage-notice{top:10px;padding:8px 13px;max-width:92%;font-size:9px;border-radius:12px}.stage-notice strong{font-size:16px}.stage-notice small{font-size:9px}.win-card{padding:22px;max-width:340px;border-radius:20px}.win-card h2{font-size:27px}.win-card .medal{font-size:35px}.win-card p{font-size:11px}dialog{padding:26px}#modal-content>h2{font-size:28px}.help-row p{font-size:11px}}@media(pointer:coarse) and (min-width:761px){.touch-controls{display:flex;justify-content:space-between;min-height:72px}.touch-move{display:flex;gap:12px}.touch-controls button{width:65px;height:60px;border-radius:18px;background:#dae5d3;font-size:23px;touch-action:none}.touch-jump{background:var(--coral)!important;color:#fff}.touch-jump small{display:block;font-size:9px}.touch-controls>span{font-size:10px;color:#8c9a83}.desktop-controls{display:none}}@media(max-height:520px) and (orientation:landscape){.game-mode .topbar{height:43px;padding:0 15px}.game-mode .game-view{height:calc(100dvh - 43px);padding:0 12px 4px;gap:3px}.game-heading h2{font-size:18px}.game-heading .eyebrow{font-size:7px}.team-hud{min-height:24px}.progress-label{display:none}.team-person .tiny-ball{width:15px;height:15px}.game-heading{height:38px}.stage-wrap{border-radius:12px;min-height:120px}.desktop-controls{font-size:8px;padding:0}.touch-controls{position:absolute;inset:auto 24px 15px;z-index:3;min-height:0;padding:0;pointer-events:none}.touch-controls button{pointer-events:auto;opacity:.72;width:51px;height:48px;border-radius:17px;font-size:19px;box-shadow:0 3px 0 #aec19f}.touch-controls .touch-jump{width:60px;height:57px;font-size:24px}.touch-controls>span{display:none}.stage-notice{padding:6px 14px}.stage-notice strong{font-size:14px}.stage-notice small{display:none}.win-card{padding:15px 25px}.win-card h2{font-size:22px;margin:8px 0}.win-card .medal{font-size:25px}.win-card .button{margin-top:5px;min-height:33px;padding:8px 14px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition:none!important}}

/* Keep the language and profile controls reachable even on a 320px screen. */
@media(max-width:760px){.topbar{padding-left:14px;padding-right:14px;gap:8px}.brand{min-width:0;font-size:20px;gap:3px}.brand #brand-name{min-width:0;overflow:hidden;text-overflow:ellipsis}.brand-icon{flex-shrink:0;width:32px;transform:scale(.7)}.top-actions{flex-shrink:0;gap:1px}.top-actions .icon-btn{width:32px;height:32px}.profile-btn{padding:4px}.language select{max-width:82px;padding-right:4px}.touch-controls>span{min-width:0;overflow-wrap:anywhere}.touch-move{flex-shrink:0}.touch-controls .touch-jump{flex-shrink:0}}
@media(hover:none),(pointer:coarse){.touch-controls{display:flex}.desktop-controls{display:none}}
.touch-device .touch-controls{display:flex}.touch-device .desktop-controls{display:none}.touch-device .touch-move{display:flex;gap:10px}.touch-device .touch-controls button{touch-action:none;background:#dae5d3;border:1px solid #d0dccb}.touch-device .touch-controls .touch-jump{background:var(--coral);color:#fff;border-color:transparent}
html:has(body.game-mode){height:100dvh;overflow:hidden}.game-mode{position:fixed;inset:0;width:100%;min-height:0}

.level-timer{display:flex;align-items:center;gap:7px;flex-shrink:0;min-width:86px;padding:5px 11px;background:#fffdf6;border:1px solid #e5dfce;border-radius:12px;color:#53745d}.level-timer>span{font-size:24px;color:#b29559}.level-timer small{display:block;font-size:8px;color:#8d967e}.level-timer strong{font:700 18px/1.1 ui-monospace,SFMono-Regular,Consolas,monospace;font-variant-numeric:tabular-nums}.level-timer.time-warning{color:#b26b37;background:#fff0d5;border-color:#e7c895}.level-timer.time-expired{color:#b9544d;background:#ffebe4;border-color:#ebc0b5}.team-person.catching-up .tiny-ball{outline:2px dashed #c39c5c;outline-offset:3px}.lost-card .medal{color:#cc8a67}.lost-card p{line-height:1.6}.lost-card .button{margin-top:10px}
@media(max-width:760px){.team-hud{display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:9px;row-gap:2px}#team-status{grid-column:1/-1;max-width:100%;margin-left:0;white-space:normal;line-height:1.25}#team-status:empty{display:none}.level-timer{min-width:64px;gap:4px;padding:4px 7px;border-radius:9px}.level-timer>span{font-size:18px}.level-timer small{font-size:7px}.level-timer strong{font-size:15px}}
@media(max-height:520px) and (orientation:landscape){.level-timer{min-width:74px;gap:5px;padding:1px 7px;border-radius:7px}.level-timer small{display:none}.level-timer>span{font-size:17px}.level-timer strong{font-size:15px}#team-status{font-size:8px}.lost-card{padding:10px 20px;max-width:430px}.lost-card .medal{display:none}.lost-card h2{font-size:23px;margin:0 0 5px}.lost-card p{font-size:10px;line-height:1.35;margin:5px 0}.lost-card .button{margin-top:6px;min-height:32px;padding:6px 12px}}
/* Result controls stay inside the field even on short portrait screens. */
.stage-overlay .win-card{max-height:100%;overflow:auto;overscroll-behavior:contain}
@media(max-width:760px){.lost-card{padding:12px;width:min(100%,340px)}.lost-card .medal{display:none}.lost-card h2{font-size:24px;line-height:1.1;margin:0 0 6px}.lost-card p{font-size:10px;line-height:1.35;margin:6px 0}.lost-card .button{min-height:34px;padding:7px 10px;font-size:11px;margin-top:8px}}

.language select:disabled{opacity:.5;cursor:not-allowed}
