/* Responsive sizing is based on each player's viewport, not the entire screen. */
.hud{container-type:inline-size}.mobileHudNav,.mobileDriveDock{display:none}
.hud.mobileHud{--mobile-dock:128px;background:linear-gradient(to bottom,#102c32 0 79px,transparent 79px calc(100% - var(--mobile-dock)),#102c32 calc(100% - var(--mobile-dock)));}
.hud.mobileHud .mobileHudNav{position:absolute;left:8px;right:8px;top:30px;height:44px;display:flex;gap:6px;pointer-events:auto;z-index:7}
.hud.mobileHud .mobileHudNav>button{position:static!important;display:block!important;flex:1;min-width:44px;width:auto;min-height:44px;height:44px;margin:0;padding:4px 8px;border:1px solid #829e98;border-radius:9px;background:#193e43;color:#fff1d4;font-size:12px;transform:none!important}
.hud.mobileHud .pilotTag{display:block;left:8px;top:5px;max-width:30%;overflow:hidden;white-space:nowrap;font-size:11px}
.hud.mobileHud .score{display:flex;top:4px;right:8px;left:auto;transform:none;font-size:10px;padding:2px 7px;gap:5px;max-width:65%;height:22px}
.hud.mobileHud .score b{font-size:12px}.hud.mobileHud .radar,.hud.mobileHud .pips,.hud.mobileHud>.physicsbtn,.hud.mobileHud>.aaCrewStatus,.hud.mobileHud>.calibrationStatus{display:none!important}
.hud.mobileHud .read{top:84px;left:8px;right:8px;max-width:none;display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline;background:#102c32b8;border-radius:5px;width:fit-content;max-width:calc(100% - 16px);padding:3px 6px}
.hud.mobileHud .speed{font-size:18px}.hud.mobileHud .speed small,.hud.mobileHud .alt{font-size:11px;margin:0}.hud.mobileHud .warn{top:120px;left:8px;max-width:calc(100% - 16px);transform:none;white-space:normal;font:600 12px system-ui}
.hud.mobileHud .banner{font-size:18px;white-space:normal;max-width:90%;width:max-content}
.hud.mobileHud .mobileDriveDock{position:absolute;left:0;right:0;bottom:0;height:var(--mobile-dock);display:block;background:#102c32f5;border-top:1px solid #5a807a;z-index:5;pointer-events:none}
.hud.mobileHud:not(.helmHud) .mobileDriveDock>.ctl{top:auto;min-width:44px;min-height:44px;position:absolute}
.hud.mobileHud .mobileDriveDock>.stick,.hud.mobileHud .mobileDriveDock>.carWheel{left:10px;right:auto;bottom:12px;width:104px;height:104px}
.hud.mobileHud .mobileDriveDock>.aimStick{left:auto;right:10px;bottom:12px;width:104px;height:104px}
.hud.mobileHud .mobileDriveDock>.throttle{left:auto;right:86px;bottom:12px;width:48px;height:104px;overflow:hidden}
.hud.mobileHud .mobileDriveDock>.fire{right:12px;left:auto;bottom:28px;width:64px;height:64px;font-size:12px;padding:3px}
.hud.mobileHud.landHud .mobileDriveDock>.landBrake{left:calc(50% - 28px);right:auto;bottom:72px;width:56px;height:44px;border-radius:8px;font-size:12px}
.hud.mobileHud.landHud .mobileDriveDock>.fire{left:calc(50% - 28px);right:auto;bottom:20px;width:56px;height:44px;border-radius:8px}
.hud.mobileHud .aimStick .stickLabel{font-size:10px;line-height:1.1;bottom:3px;padding:0 7px}
.hud.mobileHud.shipTouch .mobileDriveDock>.stick{width:88px;height:88px;bottom:12px;left:8px}
.hud.mobileHud.shipTouch .mobileDriveDock>.aimStick{width:88px;height:88px;bottom:12px;right:8px}
.hud.mobileHud.shipTouch .mobileDriveDock>.throttle{left:104px;right:auto;width:44px;height:104px;bottom:12px}
.hud.mobileHud.shipTouch .mobileDriveDock>.fire{left:auto;right:104px;width:56px;height:56px;bottom:12px}
.hud.mobileHud.carTouch .mobileDriveDock>.carForward,.hud.mobileHud.carTouch .mobileDriveDock>.carReverse{right:8px;left:auto;width:72px;height:48px;padding:4px;font-size:12px}
.hud.mobileHud.carTouch .mobileDriveDock>.carForward{bottom:68px}.hud.mobileHud.carTouch .mobileDriveDock>.carReverse{bottom:12px}
.hud.mobileHud.carTouch .mobileDriveDock>.fire{right:88px;bottom:12px;width:56px;height:48px;border-radius:9px}
.hud.mobileHud.carTouch .mobileDriveDock>.carLeft{left:8px;bottom:24px;width:48px;height:64px}.hud.mobileHud.carTouch .mobileDriveDock>.carRight{left:64px;bottom:24px;width:48px;height:64px}
.hud.mobileHud .mobileDriveDock>.raceExtras{top:8px;bottom:auto;left:8px;right:8px;display:flex;justify-content:flex-end;gap:8px}.hud.mobileHud .raceExtras button{height:44px;min-height:44px;min-width:52px;font-size:12px}
.hud.mobileHud.helmHud .mobileDriveDock{display:none}.hud.mobileHud.helmHud>.fire{bottom:192px;width:56px;height:48px;font-size:12px;border-radius:9px}.hud.mobileHud.helmHud .read{top:84px}.hud.mobileHud.helmHud>.stick{bottom:24px;left:8px;width:104px;height:104px}.hud.mobileHud.helmDual>.stick{left:auto;right:8px}
.hud.mobileHud .mobileHudPanel{position:absolute;inset:var(--mobile-panel-top,25%) 0 0;z-index:20;pointer-events:auto;background:#102c32;overflow:auto;overscroll-behavior:contain;padding:10px;touch-action:pan-y;font-size:14px}
.mobileHudPanel header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.mobileHudPanel header small{display:block;font-size:11px;color:#bad1cb;font-weight:400}.mobileHudPanel button,.mobileHudPanel select{min-height:44px;min-width:44px;border:1px solid #73958e;border-radius:8px;background:#1c454a;color:#fff1d4;padding:8px;font-size:14px}
.mobileToolGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.hud.mobileHud .mobileToolGrid>*{position:static!important;inset:auto!important;transform:none!important;width:auto!important;max-width:none!important;margin:0!important;min-height:44px;display:block;pointer-events:auto}
.hud.mobileHud .mobileToolGrid>label,.hud.mobileHud .mobileToolGrid>details{grid-column:1/-1}.hud.mobileHud .mobileToolGrid select{width:100%;font-size:16px}.hud.mobileHud .mobileToolGrid .weaponSettings{max-height:none;padding:8px}.mobileToolGrid .weaponSettings summary{min-height:44px}
.mobileTelemetry{margin-top:12px;padding-top:8px}.mobileTelemetry summary{min-height:44px;padding:10px 0}.hud.mobileHud .mobileTelemetry .gun,.hud.mobileHud .mobileTelemetry .hint,.hud.mobileHud .mobileTelemetry .forces,.hud.mobileHud .mobileTelemetry .arcNote,.hud.mobileHud .mobileTelemetry .railPhysics{position:static!important;display:block!important;transform:none!important;max-width:none;font-size:13px;margin:8px 0;opacity:1}.hud.mobileHud .mobileTelemetry .forces{display:flex!important;flex-wrap:wrap}.hud.mobileHud .mobileTelemetry .force{flex:1;min-width:75px}
.hudToolsOpen>.mobileHudNav,.hudToolsOpen>.mobileDriveDock,.hudToolsOpen>.helmTray{pointer-events:none}
.hud.mobileHud.mobileNarrow{--mobile-dock:180px}.hud.mobileNarrow.carTouch{--mobile-dock:224px}.hud.mobileNarrow.shipTouch{--mobile-dock:204px}
.hud.mobileNarrow .mobileDriveDock>.stick,.hud.mobileNarrow .mobileDriveDock>.aimStick,.hud.mobileNarrow .mobileDriveDock>.carWheel{width:80px;height:80px;bottom:78px;left:8px}.hud.mobileNarrow .mobileDriveDock>.aimStick{left:auto;right:8px}.hud.mobileNarrow.landHud .mobileDriveDock>.landBrake{left:8px;bottom:14px}.hud.mobileNarrow.landHud .mobileDriveDock>.fire{left:auto;right:8px;bottom:14px}.hud.mobileNarrow.shipTouch .mobileDriveDock>.throttle{left:8px;bottom:8px;height:72px}.hud.mobileNarrow.shipTouch .mobileDriveDock>.fire{left:auto;right:8px;bottom:8px}.hud.mobileNarrow.shipTouch .mobileDriveDock>.stick,.hud.mobileNarrow.shipTouch .mobileDriveDock>.aimStick{bottom:100px}.hud.mobileNarrow .score .brass,.hud.mobileNarrow .score .teal{font-size:0}.hud.mobileNarrow .score b{font-size:11px}.hud.mobileNarrow .mobileHudNav{gap:3px;left:4px;right:4px}.hud.mobileNarrow .mobileHudNav>button{font-size:11px;padding:3px}
/* Keep the shared bar readable and touchable without hiding the objective. */
@media(max-width:700px){#sessionBar{height:80px;display:grid;grid-template-columns:1fr auto auto auto;gap:4px 6px;padding:4px 8px}#sessionBar #objective{display:block;grid-column:1/-1;grid-row:2;font-size:11px;line-height:1.2;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#rateLabel{font-size:10px;white-space:normal}#sessionBar #pauseBtn,#sessionBar #fullBtn,#sessionBar #briefBtn{font-size:12px;min-width:44px;padding:4px 8px}.rallyMenu input,.rallyMenu select{min-width:0;max-width:100%}}
@media(max-height:500px) and (min-width:701px){#objective{max-width:36%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}

.hud.mobileHud.calOpen .mobileHudNav,.hud.mobileHud.calOpen .mobileDriveDock{display:none!important}
@media(max-height:500px){.menuHeader{min-height:60px;padding-block:6px}.menuFooter{min-height:64px;padding-block:6px}.menuHero{display:none}.menuScroll{padding-block:12px}}

/* Remove inherited details spacing: it placed the map drawer over its own close target. */
.cmd .mapTools{margin-top:0;padding-top:0;border-top:0}
.cmd:has(.checkpointStatus) .ctoast{top:auto;bottom:78px}

/* Short landscape phones and split-tablet seats preserve more of the view. */
.hud.mobileShort .mobileHudNav{top:4px}.hud.mobileShort .pilotTag,.hud.mobileShort .score{display:none!important}.hud.mobileShort .read{top:54px}.hud.mobileShort .warn{top:82px}.hud.mobileShort.helmHud .read{max-width:calc(100% - 84px)}
.hud.mobileShort.helmHud .helmTray{height:160px;grid-template-rows:44px 88px 12px}.hud.mobileShort .helmTop select,.hud.mobileShort .helmSpeed input{height:44px;min-height:44px}.hud.mobileShort .helmActions{top:0;left:104px}.hud.mobileShort .helmActions button,.hud.mobileShort .helmTrimControls button{height:44px;min-height:44px}.hud.mobileShort.helmHud>.stick{width:88px;height:88px;bottom:20px}.hud.mobileShort .helmMove{width:88px;height:88px}.hud.mobileShort.helmDual .helmActions{left:96px;right:96px}.hud.mobileShort .helmTrimControls{padding-top:0}.hud.mobileShort.helmHud>.fire{bottom:168px;height:44px}.hud.mobileShort .helmStatus{font-size:9px}
@media(max-width:700px) and (max-height:500px){#sessionBar{height:52px;display:flex;gap:6px}#sessionBar #objective{max-width:34%;font-size:10px}#sessionBar #rateLabel{max-width:60px}}
/* Keep short-seat navigation and live speed in one row; label clutter yields to the view. */
.hud.mobileShort{background:linear-gradient(to bottom,#102c32 0 52px,transparent 52px calc(100% - var(--mobile-dock)),#102c32 calc(100% - var(--mobile-dock)))}
.hud.mobileShort .mobileHudNav{left:auto;width:min(62%,320px)}
.hud.mobileShort .read,.hud.mobileShort.helmHud .read{top:8px;max-width:calc(38% - 16px);height:40px;overflow:hidden;display:block;padding:0;background:transparent}
.hud.mobileShort .read .speed{font-size:15px}.hud.mobileShort .read .alt{display:block;font-size:10px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
.hud.mobileShort .warn{top:58px}.hud.mobileShort .mark span{display:none}

/* Options occupies a reserved console below the view, never an input overlay. */
.hud.mobileHud.hudToolsOpen{background:transparent}.hudToolsOpen>:not(.mobileHudPanel){visibility:hidden}.hud.mobileHud .mobileHudPanel{border-top:1px solid #829e98}

/* The exit does not scroll away when settings expand. Only the body scrolls. */
.hud.mobileHud .mobileHudPanel{display:flex;flex-direction:column;overflow:hidden;padding:0}
.mobileHudPanel>header{flex:none;margin:0;padding:10px;border-bottom:1px solid #73958e}
.mobileToolsBody{min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding:10px;scroll-padding-block:10px}
.mobileToolsBody input,.mobileToolsBody select,.mobileToolsBody summary{scroll-margin-block:10px}
.hud.mobileHud .mobileToolGrid>.sightSettings{max-height:none;overflow:visible}
