/* Safe areas, readable forms and thumb controls for portrait and landscape phones. */
.mobile-game{--safe-bottom:env(safe-area-inset-bottom,0px);--safe-top:env(safe-area-inset-top,0px);overscroll-behavior:none}.mobile-game #world canvas{touch-action:none}.mobile-game .touch,.mobile-game .keys,.mobile-game #flight-controls{display:none!important}.mobile-game button{touch-action:manipulation}.mobile-game dialog{width:calc(100vw - 24px)!important;max-width:620px!important;max-height:calc(100dvh - 24px - var(--safe-top) - var(--safe-bottom))!important;padding:22px 16px!important;margin:auto;overflow-y:auto;overscroll-behavior:contain;border-radius:12px!important}.mobile-game dialog h2{font-size:25px;line-height:1.2}.mobile-game dialog input,.mobile-game dialog select{font-size:16px;min-height:46px;max-width:100%}.mobile-game dialog button{min-height:44px}.mobile-game dialog .close,.mobile-game #leaderboard-close{min-height:36px;top:10px;right:10px}.mobile-game .directory-columns{display:grid;grid-template-columns:1fr!important;gap:16px}.mobile-game select[size]{height:150px}.mobile-game .vehicle-grid{gap:10px}.mobile-game .vehicle-tile{min-height:116px!important;padding:16px 8px!important;gap:10px!important}.mobile-game .vehicle-tile svg{width:48px!important;height:48px!important}.mobile-game .vehicle-tile span{font-size:18px}.mobile-game .vehicle-sponsor{padding:12px;margin-top:14px}.mobile-game .vehicle-sponsor strong{font-size:15px}.mobile-game .vehicle-sponsor .sponsor-heart{width:30px}.mobile-game .location-methods{flex-wrap:wrap}.mobile-game .location-methods button{flex:1;min-width:120px}.mobile-game #location-map{height:40dvh;min-height:180px}.mobile-game #graphics-cards .graphics-card{min-height:110px}.mobile-game #player-name{font-size:22px;min-height:66px}.mobile-game #direct-controls{top:calc(10px + var(--safe-top));right:52px;gap:4px}.mobile-game #direct-controls button,.mobile-game #game-menu-open{width:36px;height:36px}.mobile-game #game-menu-open{top:calc(10px + var(--safe-top));right:10px}.mobile-game #hud-shortcuts{display:none}.mobile-game #player-tools{left:10px;top:calc(10px + var(--safe-top));max-width:44px}.mobile-game #leaderboard-open{width:36px;height:36px;padding:6px}.mobile-game #leaderboard-open span{display:none}.mobile-game #travel-banner{top:calc(56px + var(--safe-top));left:50%;transform:translateX(-50%);width:75vw;min-width:0;max-width:380px;text-align:center}.mobile-game #moving-location{font-size:20px}.mobile-game #destination-distance{font-size:11px}.mobile-game .remaining-large{font-size:22px}.mobile-game #hud-status{display:none}.mobile-game .map-card{width:120px;height:88px;left:12px;bottom:calc(156px + var(--safe-bottom))}.mobile-game .map-card.expanded{width:92vw;height:auto;left:50%;bottom:auto;top:50%;transform:translate(-50%,-50%)}.mobile-game .telemetry{right:12px;bottom:calc(156px + var(--safe-bottom));width:110px;padding:0}.mobile-game #speed{font-size:44px}.mobile-game #car-damage-hud{left:12px;width:120px;bottom:calc(132px + var(--safe-bottom))}.mobile-game #car-damage-hud button{display:none}.mobile-game #train-controls,.mobile-game #walk-controls{bottom:calc(140px + var(--safe-bottom));max-width:94vw;max-height:100px;overflow:auto;padding:8px}.mobile-game #train-controls>button,.mobile-game #walk-controls>button{display:none}.mobile-game #train-controls small{display:none}.mobile-game #train-controls div{display:flex;gap:4px}.mobile-game #train-controls div button{min-width:60px;font-size:10px;padding:8px}.mobile-game #train-hud,.mobile-game #flight-hud,.mobile-game #journey-hud,.mobile-game #bus-hud{top:calc(127px + var(--safe-top));right:12px;width:180px;font-size:11px}.mobile-game #flight-takeoff-hint{top:auto;bottom:calc(142px + var(--safe-bottom));padding:9px 13px;width:max-content;max-width:92vw;font-size:12px}.mobile-game #hud-attribution{font-size:6px;bottom:2px}.mobile-game #leaderboard-dialog .leaderboard-scroll{max-height:38dvh}#mobile-controls{position:fixed;z-index:20;left:12px;right:12px;bottom:calc(15px + env(safe-area-inset-bottom,0px));display:flex;justify-content:space-between;align-items:flex-end;gap:12px;pointer-events:none}#mobile-controls[hidden]{display:none}#mobile-controls>div{display:flex;gap:7px;max-width:65%;flex-wrap:wrap;justify-content:flex-end}#mobile-controls button{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;border:1px solid #ffffff45;background:#17272fe8;color:#eff6e9;border-radius:14px;min-width:55px;min-height:58px;padding:12px;font:700 13px system-ui;box-shadow:0 4px 12px #0004}#mobile-controls button.held{background:#b7ed76;color:#132019;border-color:#d5ffaa}.mobile-game #mobile-controls button:active{transform:none}@media(orientation:landscape) and (max-height:500px){.mobile-game #travel-banner{top:calc(10px + var(--safe-top));width:35vw}.mobile-game #moving-location{font-size:17px}.mobile-game .remaining-large{font-size:18px}.mobile-game .map-card{left:12px;bottom:105px;width:104px;height:70px}.mobile-game .telemetry{bottom:100px}.mobile-game #car-damage-hud{bottom:83px;width:104px}.mobile-game #train-controls{bottom:90px;max-height:64px}.mobile-game #flight-takeoff-hint{bottom:94px}.mobile-game #train-hud,.mobile-game #flight-hud,.mobile-game #journey-hud,.mobile-game #bus-hud{top:56px}#mobile-controls button{min-height:52px;min-width:58px}.mobile-game .vehicle-grid{grid-template-columns:repeat(4,1fr)}.mobile-game dialog .directory-columns{grid-template-columns:1fr 1fr!important}.mobile-game .vehicle-sponsor{margin-top:12px}.mobile-game #leaderboard-dialog .leaderboard-scroll{max-height:34dvh}}

#mobile-controls .thumb-steering{position:relative;display:block;flex:0 0 132px;width:132px;height:132px;max-width:none;border:2px solid #ffffff30;border-radius:50%;background:radial-gradient(circle,#40576099,#13232bd9);box-shadow:inset 0 2px 12px #0004;pointer-events:auto;touch-action:none;user-select:none}#mobile-controls .thumb-knob{position:absolute;top:50%;left:50%;width:57px;height:57px;border-radius:50%;border:2px solid #c7dfb578;background:#a8c08dda;box-shadow:0 4px 14px #0005;transform:translate(-50%,-50%);pointer-events:none}#mobile-controls .thumb-caption{position:absolute;bottom:13px;left:0;right:0;text-align:center;font:700 8px system-ui;letter-spacing:2px;color:#d7e7d0;pointer-events:none}#mobile-controls .driving-pedals{width:190px;max-width:58%;display:grid;grid-template-columns:1fr 1fr;gap:9px}#mobile-controls .driving-pedals button{min-width:0;width:100%;min-height:76px;border-radius:17px;font-size:12px}#mobile-controls .driving-pedals button:first-child{grid-column:1/-1;min-height:35px;padding:8px;font-size:11px;background:#15242bad}#mobile-controls .driving-pedals button:last-child{background:#426337ec;border-color:#c0e1a980}.mobile-game #gear-controls{display:none!important}@media(max-width:370px){#mobile-controls .thumb-steering{width:112px;height:112px;flex-basis:112px}#mobile-controls .driving-pedals{width:170px}#mobile-controls{left:9px;right:9px;gap:9px}}@media(orientation:landscape) and (max-height:500px){#mobile-controls .thumb-steering{width:116px;height:116px;flex-basis:116px}#mobile-controls .driving-pedals{display:flex;width:auto;max-width:none;align-items:flex-end}#mobile-controls .driving-pedals button{width:76px;min-height:74px}#mobile-controls .driving-pedals button:first-child{width:62px;min-height:44px}}
