/* Full-viewport stages with controls floating over the shop. */
#header.in-game{height:56px;padding:6px max(20px,env(safe-area-inset-right)) 6px max(20px,env(safe-area-inset-left));border:0;background:linear-gradient(#101b24b8,transparent)}
#header.in-game .brand{font-size:8px;letter-spacing:1.3px}#header.in-game .brand-icon{font-size:27px}
#header.in-game .icon-button{min-height:40px;background:#14242dba}.stage{inset:0}.tv-hud{top:72px}.tv-bottom{bottom:16px}.tv-game{position:fixed;inset:0}
.trial-controller{position:fixed;inset:0;display:block;width:100%;height:100dvh;min-height:0;max-width:none;padding:0;margin:0;background:#101b24;overflow:hidden}
.trial-controller .map-wrap{position:absolute;inset:0;width:100%;height:100%;min-height:0!important;max-height:none;border:0;border-radius:0;background:#101b24}
#trial-stage{position:absolute;inset:0}#trial-stage canvas{display:block;width:100%;height:100%}
.trial-graphics-error{position:absolute;inset:35% 20%;font-size:14px;text-align:center}
@media(max-width:760px){.hero-buttons{flex-wrap:wrap}.trial-choice{padding:14px 12px}.trial-choice img{height:110px}.trial-choice strong{font-size:20px}.trial-choice span{font-size:11px}}
.trial-controller::after{content:'';position:absolute;inset:0;pointer-events:none;z-index:1;background:linear-gradient(#101b2470,transparent 22%,transparent 73%,#101b24db)}
.trial-controller .game-phone-head,.trial-controller .objective,.trial-controller .phone-bar,.trial-controller .controls,.trial-controller .stamina-track,.trial-controller .control-hint,.trial-toolbar{position:absolute;z-index:3;margin:0}
.trial-controller .game-phone-head{left:24px;top:73px;width:320px;align-items:center;text-shadow:0 2px 10px #000}
.trial-controller .game-phone-head h3{font-size:26px}.trial-controller .score{font-size:28px}
.trial-controller .objective{top:138px;left:24px;width:min(430px,calc(100% - 48px));min-height:0;font-size:12px;color:#e2e5d8;text-shadow:0 2px 6px #000}
.trial-controller .phone-bar{top:77px;left:50%;transform:translateX(-50%);width:max-content;max-width:40%;gap:18px;padding:10px 15px;min-height:36px;background:#14242dd9;border:1px solid #dccba32b;border-radius:10px}
#phone-timer{font-variant-numeric:tabular-nums;font-size:19px;font-weight:700;color:var(--paper)}
.trial-controller .controls{left:24px;right:24px;bottom:max(91px,calc(env(safe-area-inset-bottom) + 74px));width:auto;display:flex;justify-content:space-between;align-items:flex-end;gap:15px;min-height:0;pointer-events:none}
.trial-controller .controls>*{pointer-events:auto}.trial-controller .joystick{width:150px;height:150px;flex-shrink:0;background:radial-gradient(#628c7866,#14242d9e);border-color:#c4d5bd66;box-shadow:inset 0 0 0 20px #cfdac60a,0 5px 25px #0003}
.trial-controller .joystick-label{bottom:8px;font-size:8px;color:#d1e0cf}.trial-controller .action-buttons{width:240px;gap:8px}.trial-controller .action-buttons .secondary{background:#25443deb;backdrop-filter:blur(8px)}
.trial-controller .action-buttons button{min-height:67px;padding:9px 5px}.trial-controller .action-buttons .wide{min-height:64px}.trial-controller .action-buttons .wide b{display:inline;margin-right:8px}.trial-controller .action-buttons .inspect{min-height:100px}
.trial-controller .stamina-track{right:24px;bottom:max(79px,calc(env(safe-area-inset-bottom) + 62px));width:240px;height:4px;display:block;background:#f4ead530}
.trial-controller .control-hint{left:24px;right:24px;bottom:max(50px,calc(env(safe-area-inset-bottom) + 40px));text-align:center;font-size:11px;color:#c6d4c9;display:block}
.trial-controller .map-label{top:193px;bottom:auto;left:24px;font-size:9px;letter-spacing:1px;background:#14242dce;padding:6px 9px;color:#dbe9d9}
.trial-toolbar{bottom:max(9px,env(safe-area-inset-bottom));left:24px;right:24px;width:auto;border:0;padding:0;display:flex;justify-content:space-between;align-items:center;gap:8px}
.trial-toolbar>span{font-size:10px;color:#c0cebf}.trial-toolbar>div{display:flex;gap:4px}.trial-toolbar button{min-height:34px;padding:6px 12px;font-size:11px;background:#14242db5}
.action-buttons #dash{touch-action:none}.action-buttons #dash.dashing{background:#f3d693;box-shadow:0 0 20px #f3d69355}.action-buttons #dash[aria-pressed=true]{border:2px solid #fff2bc;padding-top:7px;padding-bottom:7px}
.score .match-score{display:block;font-size:9px;margin-top:5px;color:#c6d6c9;font-family:var(--sans)}
.leaderboard h3{margin:10px 0 20px}.leader-row{grid-template-columns:24px minmax(0,1fr) 60px 65px;gap:10px}.round-points{font-size:13px;color:var(--mint);text-align:right}.leader-row .points{text-align:right}.score-columns{display:grid;grid-template-columns:minmax(0,1fr) 60px 65px;gap:10px;font-size:9px;letter-spacing:1px;color:var(--muted);padding:0 0 10px 34px}.score-columns span:not(:first-child){text-align:right}.leader-row .name .score-breakdown{font-size:9px;line-height:1.5;max-width:330px;color:#b9c4b9}.results-page .result-intro h1{font-size:clamp(40px,5vw,75px);overflow-wrap:anywhere}
.action-buttons .inspect{min-height:76px}.trial-controller .action-buttons .inspect{min-height:76px}
@media(max-width:600px){.leader-row{grid-template-columns:17px minmax(0,1fr) 43px 45px;gap:6px}.leader-row .points{font-size:21px}.score-columns{grid-template-columns:minmax(0,1fr) 43px 45px;gap:6px;padding-left:23px}.leader-row .name{font-size:12px}.round-points{font-size:11px}.score .match-score{font-size:8px}.phone-results .leaderboard{padding:14px}.trial-controller .game-phone-head h3{max-width:235px}}
.team-markers{position:absolute;inset:0;pointer-events:none;z-index:1;overflow:hidden}.team-marker{position:absolute;transform:translate(-50%,-100%);padding:3px 7px;border:1px solid #9de5c6aa;border-radius:6px;background:#143930e8;color:#c2ffdd;font-size:10px;font-weight:700;white-space:nowrap;box-shadow:0 2px 8px #0006}.team-marker::after{content:'◆';position:absolute;left:calc(50% - 4px);top:100%;color:#9de5c6;font-size:9px}
@media(max-width:760px){
 #header.in-game{padding-left:14px;padding-right:14px}#header.in-game .icon-button span{display:none}#header.in-game .header-actions{gap:5px}#header.in-game .icon-button{min-width:36px;padding:7px 9px}
 .trial-controller .game-phone-head{top:65px;left:16px;right:16px;width:auto}.trial-controller .game-phone-head h3{font-size:23px}.trial-controller .score{font-size:25px}
 .trial-controller .objective{top:121px;left:16px;width:calc(100% - 32px);font-size:11px;margin:0;min-height:0}
 .trial-controller .phone-bar{top:171px;left:16px;right:16px;transform:none;max-width:none;width:auto;gap:6px;padding:7px 10px;font-size:10px}
 .trial-controller .map-label{top:218px;left:16px;font-size:8px;padding:5px 7px;letter-spacing:.5px}
 .trial-controller .controls{left:16px;right:16px;bottom:max(90px,calc(env(safe-area-inset-bottom) + 76px));min-height:0;height:auto;gap:12px}
 .trial-controller .joystick{width:128px;height:128px}.trial-controller .joystick .stick{width:54px;height:54px;top:calc(50% - 27px);left:calc(50% - 27px)}
 .trial-controller .action-buttons{width:174px}.trial-controller .action-buttons button{min-height:60px;padding:7px 3px}.trial-controller .action-buttons .wide{min-height:56px}.trial-controller .action-buttons .inspect{min-height:90px}
 .trial-controller .stamina-track{width:174px;right:16px;bottom:max(79px,calc(env(safe-area-inset-bottom) + 65px))}
 .trial-controller .control-hint{bottom:max(54px,calc(env(safe-area-inset-bottom) + 44px));left:12px;right:12px;font-size:9px;line-height:1.4}
 .trial-toolbar{left:12px;right:12px;bottom:max(10px,env(safe-area-inset-bottom));padding:0}.trial-toolbar>span{max-width:105px;font-size:9px;line-height:1.4}.trial-toolbar button{min-height:34px;padding:6px 8px;font-size:10px}
 .team-marker{font-size:9px;padding:2px 5px}
}
@media(max-width:360px){.trial-controller .joystick{width:108px;height:108px}.trial-controller .action-buttons,.trial-controller .stamina-track{width:160px}.trial-controller .controls{left:12px;right:12px}.trial-controller .game-phone-head h3{font-size:21px}}
@media(orientation:landscape) and (max-height:540px){
 .trial-controller{display:block;min-height:0;padding:0}.trial-controller .game-phone-head{left:18px;top:61px;width:245px}.trial-controller .game-phone-head h3{font-size:20px}.trial-controller .score{font-size:23px}.trial-controller .role-label{font-size:8px}
 .trial-controller .objective{display:block;top:111px;left:18px;width:260px;font-size:10px;min-height:0}.trial-controller .map-label{top:159px;left:18px;font-size:7px}
 .trial-controller .phone-bar{left:auto;right:18px;top:62px;transform:none;width:280px;max-width:none;font-size:10px;padding:6px 9px}
 .trial-controller .controls{left:18px;right:18px;bottom:66px;height:auto;min-height:0}.trial-controller .joystick{width:108px;height:108px}.trial-controller .action-buttons{width:220px;gap:6px}.trial-controller .action-buttons button{min-height:50px;padding:5px}.trial-controller .action-buttons .wide{min-height:47px}.trial-controller .action-buttons .inspect{min-height:75px}.trial-controller .action-buttons button b{font-size:16px;margin:0}
 .trial-controller .stamina-track{right:18px;width:220px;bottom:56px}.trial-controller .control-hint{bottom:36px;font-size:9px;left:18px;right:18px}.trial-toolbar{bottom:3px;left:18px;right:18px}.trial-toolbar>span{max-width:none}.trial-toolbar button{min-height:30px;padding:5px 10px}
}
