/* Mobile is a separate layout, in both orientations. Desktop rules stay intact. */
.mobile-only{display:none}
body.mobile-layout{--nav-height:72px;--edge:max(16px,env(safe-area-inset-left));--touch-scale:1;overscroll-behavior:none}
.mobile-layout .mobile-only{display:block}
.mobile-layout button,.mobile-layout select,.mobile-layout a{touch-action:manipulation}
.mobile-layout input,.mobile-layout select{font-size:16px!important}
.mobile-layout header,.mobile-layout footer,.mobile-layout #scene-label{display:none!important}
.mobile-layout #main-nav{height:var(--nav-height)!important;padding:8px var(--edge)!important;display:flex!important;flex-wrap:nowrap!important;justify-content:flex-start!important;overflow-x:auto;overflow-y:hidden;gap:4px!important;scrollbar-width:none;overscroll-behavior:contain;max-width:100%;padding-top:max(8px,env(safe-area-inset-top))!important}
.mobile-layout #main-nav .nav-brand{min-width:110px;width:110px;flex:0 0 110px;margin:0 12px 0 0!important;order:0!important}
.mobile-layout #main-nav .nav-brand img{width:110px;height:auto}
.mobile-layout #main-nav .nav-item,.mobile-layout #main-nav .nav-profile{flex:0 0 auto;order:0!important;margin:0!important;min-height:44px;padding:10px 12px!important;font:800 italic 20px var(--display)!important}
.mobile-layout #main-nav .nav-profile{max-width:180px}
.mobile-layout #menu{inset:var(--nav-height) 0 0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:0 0 calc(94px + env(safe-area-inset-bottom))!important;pointer-events:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;scroll-padding-bottom:100px}
.mobile-layout #home-panel{padding:9vh var(--edge) 30px;max-width:none}
.mobile-layout #home-panel h1{max-width:90%;font-size:72px}
.mobile-layout #home-panel .ui-primary,.mobile-layout #home-panel .ui-outline{width:min(100%,320px);font-size:29px;min-height:56px}
.mobile-layout #drive-panel{padding:20px var(--edge) 28px!important;max-width:none!important;width:100%;height:auto;min-height:0;overflow:visible!important}
.mobile-layout #drive-panel h2{font-size:36px;margin:10px 0 20px}
.mobile-layout .mode-select{display:grid;grid-template-columns:1fr;gap:12px;margin:0}
.mobile-layout .mode-choice{width:100%;min-height:112px!important;max-height:none;flex:none;padding:20px!important;text-align:left}
.mobile-layout .mode-choice strong{font-size:32px!important;white-space:normal}
.mobile-layout .mode-choice small{font:500 15px var(--body)!important;margin-top:6px}
.mobile-layout #drift-map-picker{position:static;width:100%;max-width:none;padding:20px 0;overflow:visible}
.mobile-layout #drift-map-picker label{display:block;font:800 italic 22px var(--display);margin-bottom:10px}
.mobile-layout #drift-map-select{width:100%;min-height:48px}
.mobile-layout #solo-track-preview{height:150px;max-height:22vh;width:100%;display:block}
.mobile-layout #solo-map-stats{font:700 italic 20px var(--display)}
.mobile-layout #solo-map-description{display:none}
.mobile-layout .personal-best{font-size:13px}
body.mobile-layout[data-screen=drive] #start{position:fixed!important;z-index:35;inset:auto var(--edge) max(12px,env(safe-area-inset-bottom))!important;width:auto!important;margin:0!important;min-height:58px;font:800 italic 28px var(--display);padding:15px 24px}
.mobile-layout #settings-panel,.mobile-layout #account-panel,.mobile-layout #credits-modal{position:fixed!important;inset:var(--nav-height) 0 0!important;width:100%!important;max-width:none!important;max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;padding:20px var(--edge) calc(30px + env(safe-area-inset-bottom))!important;overscroll-behavior:contain;border-radius:0!important;-webkit-overflow-scrolling:touch}
.mobile-layout #settings-panel h2,.mobile-layout #account-panel .social-top h2,.mobile-layout #credits-modal h1{font-size:44px!important}
.mobile-layout .settings-tabs{position:sticky;top:-20px;z-index:2;background:#25172f;padding:12px 0;gap:10px}
.mobile-layout .settings-tabs button{font-size:22px;min-height:44px}
.mobile-layout #settings-panel input[type=range]{min-height:40px}
.mobile-layout #mobile-video-settings,.mobile-layout #mobile-control-settings{border-top:1px solid #ffffff30;padding-top:18px;margin-top:20px}
.mobile-layout #mobile-video-settings label,.mobile-layout #mobile-control-settings label{display:flex;justify-content:space-between;gap:14px;font:700 italic 21px var(--display);margin:12px 0}
.mobile-layout #mobile-control-settings select,.mobile-layout #mobile-video-settings select{width:100%;min-height:48px;color:var(--white);background:#302039;border:1px solid #85f0cc66;padding:10px}
.mobile-layout #binding-list{grid-template-columns:1fr}
.mobile-layout .keyboard-guide{display:none}
.mobile-layout #credits-modal .credits-card{width:100%;max-width:none;max-height:none;overflow:visible;padding:0;background:none;border:0}
.mobile-layout #credits-modal .credits-grid{grid-template-columns:1fr}
.mobile-layout #welcome{overflow-y:auto;overscroll-behavior:contain;padding:30px var(--edge) max(24px,env(safe-area-inset-bottom))}
.mobile-layout #welcome h1{font-size:52px}
body.mobile-layout.menu-active[data-screen=online] #online-panel:not(.hidden){position:fixed;inset:var(--nav-height) 0 0!important;width:100%!important;max-height:none!important;display:flex!important;flex-direction:column;overflow:auto!important;gap:18px;padding:18px var(--edge) 28px!important;overscroll-behavior:contain;background:#21172eef}
.mobile-layout #online-panel .online-heading,.mobile-layout #online-panel .online-masthead{position:static;align-self:auto;width:100%;padding:0;flex-shrink:0}
.mobile-layout #online-panel .online-masthead{order:1;display:flex;justify-content:flex-start}
.mobile-layout #online-panel .online-heading{order:0}
.mobile-layout #online-panel .online-heading h1{font-size:44px!important}
.mobile-layout #online-panel .online-layout{order:2;display:grid;grid-template-columns:1fr;flex:none;min-height:0;gap:16px;overflow:visible}
.mobile-layout #online-panel .online-footer{order:3;min-height:44px;flex:none;flex-wrap:wrap}
.mobile-layout #online-panel .rooms-browser,.mobile-layout #online-panel .room-sidebar{overflow:visible;min-height:0}
.mobile-layout #online-panel .rooms-toolbar{flex-wrap:wrap;gap:12px;padding:14px}
.mobile-layout #online-panel .room-list{max-height:none}
.mobile-layout #online-panel .room-sidebar{padding:18px}
.mobile-layout #online-panel .room-sidebar>section,.mobile-layout #online-panel .room-sidebar>form{min-height:0}
.mobile-layout #online-panel .room-sidebar .online-primary{margin-top:18px;min-height:50px}
.mobile-layout #online-panel .room-sidebar p{display:block!important}
.mobile-layout #online-panel .online-footer small{display:none}
.mobile-layout #online-panel #online-status{font-size:14px;max-width:100%}
.mobile-layout #account-panel .social-top,.mobile-layout #account-panel .profile-header{flex-wrap:wrap;gap:12px}
.mobile-layout #account-panel .friends-grid,.mobile-layout #account-panel .profile-grid,.mobile-layout #account-panel .auth-columns{grid-template-columns:1fr}
.mobile-layout #account-panel button{min-height:44px;font-size:20px}
.mobile-layout #account-panel .friend-row{flex-wrap:wrap}
/* The screen's middle stays clear for the road. */
.mobile-layout.racing #main-nav,.mobile-layout.racing #driving-hints{display:none!important}
.mobile-layout #mobile-pause{position:fixed;z-index:30;right:max(14px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));width:46px;height:46px;background:#21172e80;border:1px solid #85f0cc77;color:var(--mint);font:800 22px var(--display);display:none}
.mobile-layout.racing:not(.pause-open):not(.settings-open):not(.account-open) #mobile-pause{display:block}
.mobile-layout .circuit-score{top:max(16px,env(safe-area-inset-top));left:var(--edge)}
.mobile-layout .circuit-score>span{font-size:14px}.mobile-layout .circuit-score>strong{font-size:36px;margin:3px 0}.mobile-layout #circuit-laptime{font-size:15px}
.mobile-layout .circuit-progress{top:80px;left:var(--edge);right:auto;width:calc(100% - 2 * var(--edge))}
.mobile-layout #circuit-map-name{font-size:20px}.mobile-layout #circuit-lap{font-size:19px}
.mobile-layout.racing[data-mode=drift] .map-card{left:var(--edge);bottom:calc(190px + env(safe-area-inset-bottom));width:118px;padding:0!important}
.mobile-layout.racing[data-mode=drift] .map-card svg{width:100%;height:112px}
.mobile-layout .speed{width:145px;right:var(--edge);bottom:calc(196px + env(safe-area-inset-bottom))}
.mobile-layout .speed strong{font-size:66px}.mobile-layout .speed span{font-size:10px}.mobile-layout #gear{font-size:25px;width:31px;height:35px}
.mobile-layout .nitro-label{margin:9px 0 7px;font-size:14px}.mobile-layout #boosttext{font-size:10px}
.mobile-layout.racing[data-mode=sprint] .race-info{top:max(16px,env(safe-area-inset-top));left:var(--edge);width:calc(100% - 82px);background:none;border:0;padding:0}
.mobile-layout .race-info label #race-title{font-size:19px}.mobile-layout .race-numbers strong{font-size:26px}.mobile-layout .race-numbers small{font-size:11px}
.mobile-layout #message{font-size:52px;top:32%}.mobile-layout #message.lap-notice{top:150px;font-size:30px}
.mobile-layout .drift-readout{bottom:calc(192px + env(safe-area-inset-bottom));max-width:50vw;min-width:0}.mobile-layout .drift-readout strong{font-size:36px}.mobile-layout .drift-readout>span{font-size:17px}
.mobile-layout #banked-points{bottom:calc(270px + env(safe-area-inset-bottom));font-size:25px}
.mobile-layout #touch{position:fixed;z-index:24;left:max(14px,env(safe-area-inset-left));right:max(14px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));width:auto;height:auto;display:none;justify-content:space-between;align-items:flex-end;gap:12px;pointer-events:none;touch-action:none}
.mobile-layout.racing:not(.pause-open):not(.settings-open):not(.account-open):not(.chat-open) #touch{display:flex!important}
.mobile-layout #touch.touch-blocked{visibility:hidden}
.mobile-layout #touch .touch-steering{display:flex;gap:10px;pointer-events:none}
.mobile-layout #touch .touch-actions{display:flex;flex-direction:column;gap:12px;align-items:flex-end;pointer-events:none}
.mobile-layout #touch .touch-pedals,.mobile-layout #touch .touch-aux{display:flex;gap:10px;pointer-events:none}
.mobile-layout #touch button{display:block;pointer-events:auto;min-width:0;width:calc(64px * var(--touch-scale));height:calc(66px * var(--touch-scale));padding:4px!important;background:#21172e77;border:1px solid #85f0cc88;border-radius:12px;color:var(--white);font:800 italic 19px var(--display);box-shadow:none;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.mobile-layout #touch .touch-steering button{height:calc(80px * var(--touch-scale));font-size:27px}
.mobile-layout #touch button.is-pressed{background:#85f0ccbb;color:#191126;border-color:#fff}
.mobile-layout[data-touch-position=raised] #touch{bottom:calc(52px + env(safe-area-inset-bottom))}
.mobile-layout[data-touch-position=swapped] #touch{flex-direction:row-reverse}
.mobile-layout[data-mode=sprint] #touch .touch-actions{align-items:flex-end}
.mobile-layout[data-mode=sprint] #touch .touch-pedals{display:none}
.mobile-layout.racing #radio-panel{opacity:0;visibility:hidden;transition:opacity .4s}
.mobile-layout.racing.radio-announcement:not(.pause-open) #radio-panel{opacity:1;visibility:visible;top:132px!important;right:var(--edge);width:190px;padding:10px;background:#25172e88}
.mobile-layout #radio-title{font-size:21px!important}.mobile-layout #radio-artist{font-size:14px!important}.mobile-layout #radio-album{font-size:12px!important}
.mobile-layout.racing #room-chat{top:148px!important;left:var(--edge)!important;bottom:auto!important;width:calc(100% - 2 * var(--edge))!important;max-width:none!important;max-height:25vh}
.mobile-layout.racing #room-chat .chat-heading{font-size:14px}.mobile-layout.racing #chat-messages li{font-size:15px}
.mobile-layout.racing.chat-open #room-chat{top:max(12px,env(safe-area-inset-top))!important;bottom:max(12px,env(safe-area-inset-bottom))!important;height:auto;max-height:none;z-index:140;background:#21172ef2!important;padding:16px!important;pointer-events:auto}
.mobile-layout.racing.chat-open #chat-messages{flex:1}
.mobile-layout #social-notifications{top:calc(var(--nav-height) + 12px);width:calc(100% - 32px)}
.mobile-layout #modal{position:fixed;inset:0;overflow-y:auto;align-items:flex-start;padding:max(22px,env(safe-area-inset-top)) var(--edge) 28px!important;background:linear-gradient(110deg,#211328ee,#211328a0)!important}
.mobile-layout #modal .modal-card{position:static;inset:auto;width:100%!important;min-width:0;max-height:none;overflow:visible;padding:0 0 20px}
.mobile-layout .modal-card h2{font-size:52px!important;margin:18px 0}.mobile-layout .modal-card p{font-size:16px;max-width:none}.mobile-layout .modal-card .start,.mobile-layout .modal-card .secondary{font-size:24px;min-height:50px;padding:14px 20px}
body.mobile-layout.racing.pause-open.online-active #online-board:not(.hidden){position:fixed;inset:52vh var(--edge) max(14px,env(safe-area-inset-bottom))!important;padding:0!important;width:auto!important;max-height:none}
.mobile-layout.online-active.pause-open #modal .modal-card{max-height:45vh;overflow-y:auto;padding-right:8px}
.mobile-layout #online-board #room-panel-name{font-size:34px}.mobile-layout #online-board #online-scores li{padding:12px 0;gap:12px}.mobile-layout #online-board .room-driver-copy strong{font-size:24px}.mobile-layout #online-board .room-driver-actions button{font-size:17px;padding:8px 4px}
.mobile-layout #room-challenge-form{grid-template-columns:1fr 75px}
/* Portrait garage keeps a turntable above a scrollable paint sheet. */
.mobile-layout.garage-open #garage-heading{top:calc(var(--nav-height) + 12px);left:var(--edge);right:var(--edge)}
.mobile-layout #garage-heading strong{font-size:34px}.mobile-layout #garage-heading span{display:none}
.mobile-layout.garage-open #garage-panel{top:51vh;left:0;right:0;width:auto;bottom:calc(92px + env(safe-area-inset-bottom));padding:16px var(--edge);max-height:none;overflow-y:auto;border-radius:18px 18px 0 0;background:#25172eee}
.mobile-layout.garage-open #garage-panel h2,.mobile-layout.garage-open #garage-car{font-size:24px!important}
.mobile-layout.garage-open #garage-panel label{font-size:18px;margin:12px 0 8px}
.mobile-layout.garage-open #garage-orbit{left:0;right:0;top:calc(var(--nav-height) + 65px);bottom:49vh}
.mobile-layout.garage-open #garage-view-controls{left:var(--edge);right:var(--edge);bottom:50vh;gap:12px;font-size:13px}.mobile-layout #garage-view-controls>span{display:none}
.mobile-layout.garage-open #garage-selector{left:0;right:0;bottom:0;padding:12px var(--edge) max(12px,env(safe-area-inset-bottom));gap:16px;background:#25172ef5}
.mobile-layout #garage-selector>div{min-width:0;flex:1}.mobile-layout #garage-selected-name{font-size:25px}.mobile-layout #garage-selected-count{font-size:13px}
.mobile-layout #garage-selector>button{width:50px;height:48px;flex:0 0 50px}
@media(orientation:landscape){
 body.mobile-layout{--nav-height:58px}
 .mobile-layout #main-nav .nav-brand{width:100px;min-width:100px;flex-basis:100px}
 .mobile-layout #main-nav .nav-item,.mobile-layout #main-nav .nav-profile{font-size:19px!important;padding:8px 10px!important}
 .mobile-layout #home-panel{padding-top:7vh}.mobile-layout #home-panel h1{font-size:54px;margin-bottom:20px}
 .mobile-layout #home-panel .ui-primary,.mobile-layout #home-panel .ui-outline{display:inline-flex;width:210px;margin-right:12px;min-height:48px;font-size:26px}
 .mobile-layout[data-screen=drive] #drive-panel{display:grid!important;grid-template-columns:1fr 1fr;gap:12px 24px}
 .mobile-layout #drive-panel>.panel-back,.mobile-layout #drive-panel>h2{grid-column:1/-1;margin:0}
 .mobile-layout #drive-panel .mode-select{grid-column:1;grid-row:3 / span 2}
 .mobile-layout .mode-choice{min-height:100px!important;padding:14px!important}.mobile-layout .mode-choice strong{font-size:28px!important}
 .mobile-layout #drift-map-picker{grid-column:2;grid-row:3;padding:0}
 .mobile-layout #solo-track-preview{height:120px;max-height:32vh}
 .mobile-layout .personal-best{grid-column:2;align-self:end}
 .mobile-layout #menu{padding-bottom:90px!important}
 body.mobile-layout[data-screen=drive] #start{left:auto!important;width:calc(50% - 32px)!important;font-size:25px;min-height:50px}
 .mobile-layout #online-panel .online-layout{grid-template-columns:1fr 1fr}
 .mobile-layout .circuit-progress{top:max(16px,env(safe-area-inset-top));left:auto;right:80px;width:38vw}
 .mobile-layout .circuit-score>strong{font-size:32px}.mobile-layout #circuit-laptime{font-size:13px}
 .mobile-layout.racing[data-mode=drift] .map-card{left:calc(var(--edge) + 170px);bottom:20px;width:90px}.mobile-layout.racing[data-mode=drift] .map-card svg{height:80px}
 .mobile-layout .speed{right:calc(var(--edge) + 172px);bottom:22px;width:115px}.mobile-layout .speed strong{font-size:52px}.mobile-layout .nitro-label{font-size:12px}
 .mobile-layout #touch button{width:calc(62px * var(--touch-scale));height:calc(56px * var(--touch-scale));font-size:17px}.mobile-layout #touch .touch-steering button{height:calc(70px * var(--touch-scale))}
 .mobile-layout #touch .touch-actions{gap:8px}.mobile-layout .drift-readout{bottom:22px}.mobile-layout #banked-points{bottom:100px}
 .mobile-layout #message.lap-notice{top:90px;font-size:30px}
 .mobile-layout.racing #room-chat{top:100px!important;width:45vw!important;max-height:26vh}
 .mobile-layout.racing.chat-open #room-chat{inset:12px 15%!important;width:auto!important;max-height:none}
 .mobile-layout #modal .modal-card{width:37vw!important}.mobile-layout .modal-card h2{font-size:42px!important}
 body.mobile-layout.racing.pause-open.online-active #online-board:not(.hidden){inset:28px var(--edge) 24px 46%!important}
 .mobile-layout.online-active.pause-open #modal .modal-card{max-height:none;overflow:visible}
 .mobile-layout.garage-open #garage-panel{top:calc(var(--nav-height) + 65px);left:var(--edge);right:auto;width:235px;bottom:90px;border-radius:8px}
 .mobile-layout.garage-open #garage-orbit{left:275px;right:var(--edge);top:110px;bottom:140px}
 .mobile-layout.garage-open #garage-view-controls{left:275px;right:var(--edge);bottom:94px}
 .mobile-layout.garage-open #garage-selector{left:275px;right:var(--edge);bottom:10px;padding:10px;background:#25172e99}
}
@media(prefers-reduced-motion:reduce){.mobile-layout #radio-panel{transition:none}}
/* Explicit rows prevent the inherited desktop navigation grid clipping on phones. */
@media(orientation:portrait){
 body.mobile-layout{--nav-height:108px}
 body.mobile-layout.menu-active #main-nav{display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:40px 44px;align-content:center;gap:2px!important}
 body.mobile-layout #main-nav .nav-brand{grid-column:1/4;grid-row:1;min-width:0;width:130px;height:auto}
 body.mobile-layout #main-nav .nav-brand img{width:130px}
 body.mobile-layout #main-nav .nav-profile{grid-column:4/7;grid-row:1;min-width:0;width:100%;max-width:none;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:17px!important}
 body.mobile-layout #main-nav .nav-item{grid-row:2;min-width:0;width:100%;padding:10px 1px!important;font-size:18px!important}
}
@media(orientation:landscape){body.mobile-layout.menu-active #main-nav{display:flex!important;align-items:center}body.mobile-layout #main-nav .nav-item{width:auto!important}}
.mobile-layout:not(.racing) #radio-panel{display:none!important}
.mobile-layout #drift-map-picker{display:flex;flex-direction:column;gap:10px}
.mobile-layout #touch button{width:min(calc(64px * var(--touch-scale)),calc((100vw - 60px)/4))}
.mobile-layout #settings-panel,.mobile-layout #account-panel,.mobile-layout #modal,.mobile-layout #online-panel{backdrop-filter:none!important}
@media(orientation:portrait){body.mobile-layout #main-nav .nav-item{font-size:17px!important}}
@media(orientation:landscape){.mobile-layout #solo-track-preview{height:90px;max-height:26vh}}
.mobile-layout #touch{background:none!important;border:0;box-shadow:none}
.mobile-layout.racing #settings-panel,.mobile-layout.racing #account-panel{inset:0!important;padding-top:max(20px,env(safe-area-inset-top))!important}
@media(orientation:portrait){
 .mobile-layout .circuit-progress{top:104px}
 .mobile-layout.racing[data-mode=drift] .map-card{top:156px;bottom:auto!important;width:100px}
 .mobile-layout.racing[data-mode=drift] .map-card svg{height:96px}
 .mobile-layout .speed{top:160px;bottom:auto!important}
 .mobile-layout.racing #room-chat{top:266px!important}
 .mobile-layout.racing.chat-open #room-chat{top:max(12px,env(safe-area-inset-top))!important}
 .mobile-layout.racing.radio-announcement:not(.pause-open) #radio-panel{top:266px!important}
}
.mobile-layout #garage-heading .panel-back{font:800 italic 18px var(--display);min-height:44px;padding:8px 12px}
.mobile-layout #garage-panel .secondary{font:800 italic 20px var(--display);min-height:44px}

/* A scrollable customization body and persistent footer fit short mobile screens. */
.touch-combo{display:none}
.mobile-layout[data-touch-assist=true] #touch .touch-combo{display:block;font:700 italic 12px/1.1 var(--display);margin-top:2px;color:var(--mint)}
.mobile-layout #touch button.is-pressed .touch-combo{color:#21172e}
.mobile-layout .touch-assist-option{align-items:center;justify-content:flex-start!important;font-size:19px!important;line-height:1.25}
.mobile-layout #mobile-touch-assist{width:23px;height:23px;flex:0 0 23px;accent-color:var(--mint)}
.mobile-layout .touch-assist-hint{font:500 15px/1.4 var(--body);color:#fff0e7b0}
.mobile-layout.garage-open #garage-panel{display:flex;flex-direction:column;overflow:hidden!important;min-height:0}
.mobile-layout #garage-customization-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;padding:0 6px 12px 0}
.mobile-layout #garage-panel #garage-close{flex:0 0 auto;min-height:48px;margin:10px 0 0;padding:12px 18px;font-size:24px}
@media(orientation:landscape){
 body.mobile-layout.garage-open{--garage-side:clamp(250px,34vw,350px)}
 body.mobile-layout.garage-open #garage-panel{top:calc(var(--nav-height) + 8px)!important;bottom:max(8px,env(safe-area-inset-bottom));left:var(--edge);right:auto;width:var(--garage-side)!important;padding:12px}
 body.mobile-layout.garage-open #garage-panel h2{display:block;font-size:24px!important;margin:0 0 8px}
 body.mobile-layout.garage-open #garage-car{font-size:22px!important;margin:0 0 12px!important}
 body.mobile-layout.garage-open #garage-heading{left:calc(var(--edge) + var(--garage-side) + 18px);top:calc(var(--nav-height) + 8px);right:var(--edge);height:44px}
 body.mobile-layout.garage-open #garage-heading strong{font-size:29px}
 body.mobile-layout.garage-open #garage-heading .panel-back{font-size:18px;padding:8px}
 body.mobile-layout.garage-open #garage-orbit{left:calc(var(--edge) + var(--garage-side) + 18px);top:calc(var(--nav-height) + 62px);bottom:150px;right:var(--edge)}
 body.mobile-layout.garage-open #garage-view-controls{left:calc(var(--edge) + var(--garage-side) + 18px);right:var(--edge);bottom:94px;gap:10px}
 body.mobile-layout.garage-open #garage-selector{left:calc(var(--edge) + var(--garage-side) + 18px);right:var(--edge);bottom:max(8px,env(safe-area-inset-bottom));padding:8px;gap:10px}
 body.mobile-layout #garage-selected-name{font-size:23px}
 body.mobile-layout #garage-selector>button{width:44px;height:46px;flex-basis:44px}
 .mobile-layout #settings-panel .settings-tabs{padding:8px 0;margin-bottom:12px}
 .mobile-layout #settings-panel h2{font-size:36px!important;margin:10px 0}
}

.mobile-layout #message.sprint-notice{top:150px;font-size:30px}
@media(orientation:landscape){.mobile-layout #message.sprint-notice{top:90px;font-size:30px}}

body.touch-mode-disabled.mobile-layout.racing #touch{display:none!important;visibility:hidden!important;pointer-events:none!important;}

/* Shipping controls: user preference overrides every media query and mobile layout rule. */
html body.touch-mode-disabled #touch,html body.touch-mode-disabled.mobile-layout.racing #touch{display:none!important;visibility:hidden!important;pointer-events:none!important;}
html body.touch-mode-enabled.racing #touch{display:flex!important;visibility:visible!important;pointer-events:auto!important;}

/* Keep the same fixed arrow positions on touch/landscape layouts. */
body.mobile-layout.garage-open #garage-selector{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;align-items:center;justify-content:stretch;gap:8px;}
body.mobile-layout #garage-selector>div{min-width:0;width:100%;}
