/* The added truck keeps its floor lever and gearbox visible in the UI. */
.cab-note{position:absolute;left:12px;bottom:calc(var(--garage-dock,70px) + 14px);z-index:6;display:grid;gap:5px;max-width:calc(100% - 24px);padding:8px 10px;border:1px solid #e6c48c;border-radius:5px;background:#173334ec;color:#ffe9bd;font:600 12px/1.3 'Barlow Condensed',sans-serif}
.cab-note[hidden]{display:none}.cab-note>strong{letter-spacing:1px}.cab-note>div{display:flex;gap:5px}.cab-note button,.manual-shift-buttons button{min-height:44px;min-width:44px;padding:5px 10px;background:#29474a;color:#fff0cc;border:1px solid #a4b1a0;border-radius:4px;font:700 12px 'Barlow Condensed',sans-serif;cursor:pointer}.cab-note button[aria-pressed=true]{background:#efc17c;color:#173436}.cab-note button:focus-visible,.manual-shift-buttons button:focus-visible{outline:3px solid #fff2c8;outline-offset:2px}
.manual-hud{position:absolute;left:24px;bottom:118px;z-index:2;width:218px;padding:9px 10px;border:1px solid #e9c58b;border-radius:5px;background:#173334e8;color:#ffe9bd;font:700 12px 'Barlow Condensed',sans-serif}.manual-hud>span{letter-spacing:1px}.manual-hud>div:first-of-type{display:flex;align-items:baseline;gap:8px}.manual-hud strong{font-size:34px;line-height:1.1}.manual-hud b{margin-left:auto;font-size:14px}.manual-hud meter{display:block;width:100%;height:10px;margin:5px 0}.manual-hud small{display:block;min-height:15px;color:#f7cf85}.manual-shift-buttons{display:flex;gap:6px;margin-top:5px}.manual-shift-buttons button{flex:1}.manual-shift-buttons button:disabled{opacity:.45;cursor:default}.manual-instructions{border-left:3px solid #e4b967;padding-left:10px;text-align:left}
.manual-rev-meter{position:relative;height:14px;margin:5px 0}.manual-hud .manual-rev-meter meter{height:14px;margin:0}.manual-shift-band{position:absolute;z-index:1;left:76.851852%;width:15.740741%;top:0;bottom:0;box-sizing:border-box;border:2px solid #f6ba42;border-radius:2px;background:#f6ba4226;pointer-events:none}
.mobile-ui .manual-hud{left:var(--safe-left);bottom:calc(var(--safe-bottom) + 212px);width:158px;padding:6px 8px;font-size:10px}.mobile-ui .manual-hud strong{font-size:25px}.mobile-ui .manual-hud b{font-size:11px}.mobile-ui .manual-shift-buttons{display:none}.mobile-ui .manual-shell .condition-note{bottom:calc(var(--safe-bottom) + 182px);max-width:calc(100% - 28px)}
.mobile-ui .mobile-drive [data-manual-shift]{bottom:calc(var(--safe-bottom) + 124px);width:66px;height:48px;background:#5d5b35ec;color:#fff1bd}.mobile-ui .mobile-drive [data-manual-shift='-1']{left:var(--safe-left)}.mobile-ui .mobile-drive [data-manual-shift='1']{right:var(--safe-right)}.mobile-ui .mobile-drive [data-manual-shift]:disabled{opacity:.45}
@media(orientation:landscape) and (max-height:430px){.mobile-ui .manual-hud{left:155px;top:104px;bottom:auto;width:145px}.mobile-ui .manual-shell .condition-note{left:155px;bottom:var(--safe-bottom);max-width:calc(100% - 315px)}.mobile-ui .mobile-drive [data-manual-shift='-1']{left:155px;bottom:calc(var(--safe-bottom) + 45px)}.mobile-ui .mobile-drive [data-manual-shift='1']{right:155px;bottom:calc(var(--safe-bottom) + 45px)}.mobile-ui .cab-note{font-size:10px;gap:2px;padding:5px 8px}.mobile-ui .cab-note>span{display:none}.mobile-ui .cab-note button{padding:3px 8px}}

/* Mobile cab controls have their own row above the model, separate from the
   camera strip and destination dock. Closing restores the usual garage. */
.mobile-ui .studio-hero.cab-inspection-open{--studio-heading-height:164px;--cab-row-top:112px}
.mobile-ui .studio-hero.cab-inspection-open .cab-note{top:var(--cab-row-top);bottom:auto;left:12px;right:108px;height:44px;max-width:none;padding:0;border:0;background:none;display:block}
.mobile-ui .studio-hero.cab-inspection-open .cab-note>strong,.mobile-ui .studio-hero.cab-inspection-open .cab-note>span{display:none}
.mobile-ui .studio-hero.cab-inspection-open .cab-note>div{display:grid;grid-template-columns:repeat(4,minmax(44px,1fr));gap:4px}
.mobile-ui .studio-hero.cab-inspection-open .cab-note button{height:44px;min-height:44px;min-width:44px;padding:3px;font-size:12px;white-space:nowrap}
.mobile-ui .studio-hero.cab-inspection-open .engine-close{top:var(--cab-row-top);bottom:auto;right:12px;width:88px;height:44px;min-height:44px;padding:4px;justify-content:center;z-index:6}
.mobile-ui .studio-hero.cab-inspection-open .engine-close strong{font-size:12px;white-space:nowrap}
.mobile-ui .studio-hero.cab-inspection-open .engine-close svg,.mobile-ui .studio-hero.cab-inspection-open .engine-close small,.mobile-ui .studio-hero.cab-inspection-open .car-rev{display:none}
@media(orientation:portrait){
 .mobile-ui .studio.cab-inspection-open{grid-template-rows:minmax(330px,55%) minmax(0,1fr)}
 .mobile-ui .studio-hero.cab-inspection-open{--studio-heading-height:158px;--cab-row-top:106px}
}
@media(orientation:landscape) and (max-height:430px){
 .mobile-ui .studio-hero.cab-inspection-open{--studio-heading-height:150px;--cab-row-top:98px}
 .mobile-ui .studio-hero.cab-inspection-open .cab-note button{font-size:10px}
}
@media(orientation:landscape) and (max-height:350px){
 .mobile-ui .studio-hero.cab-inspection-open{--studio-heading-height:112px;--cab-row-top:60px}
 .mobile-ui .studio-hero.cab-inspection-open .studio-heading{display:none}
 .mobile-ui .studio-hero.cab-inspection-open .studio-views{top:6px}
}

/* Manual race touch controls: steering/pedals, drift/boost, then a gear row.
   Scope to the manual shell so other cars keep their existing controls. */
.mobile-ui .manual-shell ~ .mobile-drive{--manual-button-height:56px;--manual-pedal-row:54px;--manual-drift-row:118px;--manual-gear-row:182px}
.mobile-ui .manual-shell ~ .mobile-drive button{width:56px;height:var(--manual-button-height);min-width:44px;min-height:44px}
.mobile-ui .manual-shell ~ .mobile-drive [data-hold=arrowleft],.mobile-ui .manual-shell ~ .mobile-drive [data-hold=arrowright],.mobile-ui .manual-shell ~ .mobile-drive [data-hold=arrowup],.mobile-ui .manual-shell ~ .mobile-drive [data-hold=arrowdown]{bottom:calc(var(--safe-bottom) + var(--manual-pedal-row))}
.mobile-ui .manual-shell ~ .mobile-drive [data-hold=arrowright]{left:calc(var(--safe-left) + 64px)}
.mobile-ui .manual-shell ~ .mobile-drive [data-hold=arrowdown]{right:calc(var(--safe-right) + 64px)}
.mobile-ui .manual-shell ~ .mobile-drive [data-hold=' ']{left:calc(var(--safe-left) + 32px);bottom:calc(var(--safe-bottom) + var(--manual-drift-row))}
.mobile-ui .manual-shell ~ .mobile-drive [data-hold=shift]{right:calc(var(--safe-right) + 32px);bottom:calc(var(--safe-bottom) + var(--manual-drift-row))}
.mobile-ui .manual-shell ~ .mobile-drive [data-manual-shift]{bottom:calc(var(--safe-bottom) + var(--manual-gear-row));width:66px;height:48px}
.mobile-ui .manual-shell ~ .mobile-drive [data-manual-shift='-1']{left:calc(var(--safe-left) + 27px);right:auto}
.mobile-ui .manual-shell ~ .mobile-drive [data-manual-shift='1']{right:calc(var(--safe-right) + 27px);left:auto}
@media(orientation:portrait){
 .mobile-ui .manual-shell .manual-hud{bottom:calc(var(--safe-bottom) + 258px)}
 .mobile-ui .manual-shell .condition-note{bottom:calc(var(--safe-bottom) + 234px)}
 .mobile-ui .manual-shell .race-times{left:auto;right:var(--safe-right);transform:none;bottom:calc(var(--safe-bottom) + 258px);width:calc(100% - var(--safe-left) - var(--safe-right) - 174px);gap:10px;font-size:9px}
}
@media(orientation:landscape){
 .mobile-ui .manual-shell ~ .mobile-drive{--manual-pedal-row:0px;--manual-drift-row:64px;--manual-gear-row:128px}
}
@media(orientation:landscape) and (max-height:360px){
 .mobile-ui .manual-shell ~ .mobile-drive{--manual-button-height:48px;--manual-drift-row:56px;--manual-gear-row:112px}
 .mobile-ui .manual-shell .race-speed{top:auto;bottom:calc(var(--safe-bottom) + 168px);padding:3px 6px;font-size:10px;line-height:1}
 .mobile-ui .manual-shell .race-speed>strong{font-size:24px;line-height:1}
 .mobile-ui .manual-shell .race-speed>span{font-size:8px;margin-left:4px}
 .mobile-ui .manual-shell .boost-label{margin-top:2px;font-size:8px;line-height:1;letter-spacing:1px}
 .mobile-ui .manual-shell .boost-bar{width:84px;height:3px;margin-top:2px}
}

/* Character selection returns when cab inspection closes. */
.mobile-ui .studio-hero.cab-inspection-open .garage-player-badge{display:none}
