/* Keep the existing vehicle choices, with touch targets that do not shrink. */
body.live-garage #garage-stage #car-dots{display:grid!important;grid-template-columns:repeat(5,44px)!important;gap:6px!important;justify-content:center;pointer-events:auto}
body.live-garage #garage-stage #car-dots button{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;transform:none;flex:none;touch-action:manipulation}
body.live-garage #garage-stage #car-dots button:focus-visible{outline:3px solid #43215f;outline-offset:4px}
body.live-garage #garage-stage .car-nav{min-width:44px!important;min-height:44px!important}
@media(min-width:601px) and (min-height:601px){
 body.live-garage #garage-stage #garage-caption{height:210px;padding:0}
 body.live-garage #garage-stage #garage-canvas{height:calc(100% - 215px);min-height:170px}
 body.live-garage #garage-stage{min-height:380px!important}
 body.live-garage #garage-stage #garage-partner{bottom:225px;max-height:calc(100% - 230px)!important}
}
@media(min-width:601px) and (max-height:600px) and (max-aspect-ratio:19/9){
 body.live-garage #garage-stage{min-height:365px!important}
 body.live-garage #garage-stage #garage-caption{height:190px;padding:0}
 body.live-garage #garage-stage #garage-canvas{height:calc(100% - 195px);min-height:170px}
 body.live-garage #garage-stage #garage-partner{bottom:205px}
}
@media(min-aspect-ratio:19/9) and (max-height:600px){
 body.live-garage #garage-stage{min-height:225px!important}
 body.live-garage #garage-stage #garage-caption{width:244px!important;bottom:5px}
 body.live-garage #garage-stage #car-dots{justify-content:start}
 body.live-garage #garage-stage #car-prev{left:260px}
 body.live-garage #garage-stage #garage-partner{bottom:3%;max-height:175px!important}
}

/* Let the scrollable menu allocate the real height of its contents. */
body.live-garage #menu{grid-template-rows:auto minmax(min-content,1fr) max-content max-content!important}

body.live-garage #garage-foot #age3-change{position:static;z-index:auto;flex:none;margin:0;min-height:44px}
body.live-garage #garage-foot{align-items:center;flex-wrap:wrap;min-height:44px}

@media(max-width:600px){body.live-garage #garage-stage{min-height:0!important;grid-template-rows:clamp(170px,calc(100dvh - 700px),260px) auto}}

@media(max-width:600px){body.live-garage #garage-foot span:nth-child(n+2){display:none}}

@media(max-width:600px){
 body.live-garage #garage-launch{display:grid;grid-template-rows:max-content max-content;grid-template-columns:minmax(0,1fr);min-height:0;height:auto;align-self:stretch;justify-content:stretch}
 body.live-garage #garage-launch #start{grid-row:2}
 body.live-garage #garage-launch .race-card{grid-row:1}
}

/* Phone garage: keep launch visible while retaining every car via the arrows. */
@media(max-width:600px){
 body.live-garage #garage-top{display:grid;grid-template-columns:1fr;gap:4px}
 body.live-garage #garage-top h1{font-size:23px;line-height:1.1}
 body.live-garage #garage-tools .menu-tools{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;margin:0}
 body.live-garage #garage-top .menu-tools button{min-height:44px;padding:4px;font-size:12px;line-height:1.1}
 body.live-garage #garage-top .motion-promo{min-width:0;width:auto;gap:4px}
 body.live-garage #garage-top .motion-promo svg{width:18px;height:24px;flex:none}
 body.live-garage #garage-top .motion-promo span{font-size:12px!important;line-height:1.1!important;white-space:normal}
 body.live-garage #garage-top .motion-promo b{font-size:12px;line-height:1.1}
 body.live-garage #garage-top #profile-label{display:none}
}
@media(max-width:600px) and (max-height:900px){
 body.live-garage.embedded #menu{padding:8px 12px!important;gap:4px!important;grid-template-rows:auto minmax(min-content,1fr) max-content!important;min-height:100%;height:100%}
 body.live-garage #garage-stage{display:grid!important;grid-template-rows:minmax(100px,1fr) auto!important;min-height:0!important}
 body.live-garage #garage-stage #garage-canvas{position:relative;width:82%;height:100%;min-height:0!important;grid-row:1}
 body.live-garage #garage-stage #garage-caption{position:static!important;grid-row:2;height:auto!important;margin:0!important;padding:0!important}
 body.live-garage #garage-caption h2{font-size:24px;margin:0 0 2px}
 body.live-garage #garage-stage #garage-specs{margin-top:3px;gap:10px}
 body.live-garage #garage-stage #car-dots{display:none!important}
 body.live-garage #garage-stage #garage-partner{bottom:76px!important;right:4%;height:85px!important;max-height:85px!important;width:23%}
 body.live-garage #garage-stage #garage-partner[data-kind=kumka]{height:55px!important}
 body.live-garage #garage-stage .car-nav{top:22%;height:44px}
 body.live-garage #garage-launch{gap:4px;margin:0;grid-template-rows:auto auto}
 body.live-garage #garage-launch #start{min-height:44px;font-size:22px!important}
 body.live-garage #garage-launch .race-card{min-height:44px;max-width:100%}
 body.live-garage #menu #menu-map{width:64px!important;height:44px!important}
 body.live-garage #menu .race-card h2{font-size:14px!important;margin-bottom:2px!important}
 body.live-garage #garage-foot{display:none}
}

@media(max-width:600px) and (max-height:900px){
 body.live-garage #garage-top .menu-tools{grid-auto-rows:44px!important}
 body.live-garage #garage-top .menu-tools button{height:44px!important;min-width:0!important;width:auto!important;max-width:100%!important}
 body.live-garage #garage-top #garage-motion{display:flex!important;align-items:center;justify-content:center;gap:3px;padding:4px!important}
 body.live-garage #garage-stage{grid-template-rows:minmax(80px,1fr) 78px!important;min-height:158px!important}
 body.live-garage #garage-stage #garage-caption{height:78px!important;min-height:78px;box-sizing:border-box}
 body.live-garage #garage-launch .race-card{padding:4px!important;min-height:56px!important}
 body.live-garage #garage-launch #start{min-height:48px!important;height:48px!important}
 body.live-garage #garage-launch .choose-track-label{font-size:11px!important;margin-bottom:2px!important}
}

@media(max-width:600px){body.live-garage #garage-tools,body.live-garage #garage-tools .menu-tools{width:100%!important;max-width:none!important;min-width:0!important}body.live-garage #garage-top .motion-promo span{min-width:0!important}}

@media(max-width:600px) and (max-height:900px){body.live-garage #garage-stage #garage-canvas{max-height:230px!important;align-self:center}}

/* In a short embedded garage, retain the scene's intrinsic height.
   The menu may scroll; its launch row must never overlap the vehicle. */
@media(min-width:520px) and (max-width:600px) and (max-height:420px){
 body.live-garage #garage-tools .menu-tools{grid-template-columns:repeat(5,minmax(0,1fr))!important}
 body.live-garage #garage-launch #start{width:100%!important}
 body.live-garage #garage-stage #car-prev{left:0!important}
 body.live-garage #garage-stage #car-next{right:0!important}
 body.live-garage #garage-stage #garage-caption{width:100%!important;text-align:center!important}
 body.live-garage #garage-stage #garage-specs{justify-content:center!important}
}
