/* Full-screen workshop. The canvas remains the game's single WebGL surface. */
#overlay.garage-open { padding: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; align-items: stretch; }
#card.garage-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(130px, 1fr) auto; width: 100%; max-width: none; height: 100%; max-height: none; padding: 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: hidden; text-align: left; }
#card.garage-card button { margin: 0; min-width: 0; font-family: inherit; cursor: pointer; touch-action: manipulation; }
#card.garage-card button:focus-visible, .garage-stage:focus-visible { outline: 3px solid #fff6b4; outline-offset: -5px; }
.garage-header { position: absolute; z-index: 2; inset: 0 0 auto; display: flex; gap: 14px; align-items: center; padding: calc(14px + var(--safe-t)) calc(15px + var(--safe-r)) 20px calc(15px + var(--safe-l)); background: linear-gradient(#17202880, transparent); pointer-events: none; }
#card .garage-header h2 { margin: 0; color: #fff8e8; font-size: clamp(23px, 5.8vw, 34px); font-weight: 950; letter-spacing: 1px; text-shadow: 0 3px 8px #18150f8a; }
#card .garage-back { pointer-events: auto; width: 48px; height: 48px; flex: 0 0 48px; padding: 0; border: 1px solid #69819b; border-radius: 14px; background: #0b2033eb; color: #fff5df; box-shadow: 0 4px 12px #070d1955; font-size: 34px; line-height: 1; }
.garage-stage { min-width: 0; min-height: 0; position: relative; touch-action: none; cursor: grab; outline: none; overflow: hidden; }
.garage-stage:active { cursor: grabbing; }
.garage-view-hint { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 6px 11px; border: 1px solid #fce0a830; border-radius: 20px; background: #162230a3; color: #fff3d8; font-size: 11px; font-weight: 600; pointer-events: none; }
.garage-console { position: relative; padding: 14px max(16px, var(--safe-r)) calc(14px + var(--safe-b)) max(16px, var(--safe-l)); border: 1px solid #637b99; border-bottom: 0; border-radius: 26px 26px 0 0; background: radial-gradient(ellipse at 50% 0%, #24364c 0%, #0d1e32 63%, #0a192b 100%); box-shadow: 0 -8px 35px #05132245, inset 0 1px 0 #b8c2cf25; color: #f5f5f1; }
.garage-selection { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.garage-eyebrow { display: block; color: #b5c3d8; font-size: 12px; font-weight: 800; letter-spacing: 1.4px; margin-bottom: 3px; }
#card .garage-selection h3 { font-size: clamp(21px, 5.2vw, 28px); line-height: 1.08; margin: 0; letter-spacing: -.35px; }
.garage-count { display: grid; justify-items: end; gap: 2px; white-space: nowrap; color: #a9bbd2; font-size: 12px; font-variant-numeric: tabular-nums; }
#card .garage-all { width: auto; min-height: 44px; padding: 4px 0 4px 12px; border: 0; color: #c5d2e1; background: none; box-shadow: none; font-size: 14px; font-weight: 650; }
.garage-horns { display: flex; overflow-x: auto; gap: 8px; padding: 2px 1px 8px; margin: 0 -1px 6px; scroll-snap-type: x mandatory; scroll-padding: 1px; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #596b84 transparent; -webkit-overflow-scrolling: touch; }
#card .garage-horn { position: relative; flex: 0 0 calc((100% - 16px) / 3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 93px; padding: 4px 3px 7px; border: 1.5px solid #4c6483; border-radius: 15px; background: linear-gradient(145deg,#25374e88,#0a182c80); color: #fff; font-size: 13px; font-weight: 750; scroll-snap-align: center; box-shadow: inset 0 1px 3px #ffffff0a; }
#card .garage-horn.is-selected { border: 2px solid #ffdc55; background: linear-gradient(145deg,#354a60,#152638); box-shadow: inset 0 0 0 1px #fff1a94d, 0 0 10px #ffc7320a; }
.garage-horn svg { display: block; width: min(100%, 100px); height: 59px; overflow: visible; filter: drop-shadow(0 3px 3px #0003); }
.garage-horn-name { display: block; line-height: 1.05; text-align: center; min-height: 12px; }
.garage-equipped { position: absolute; top: 5px; right: 5px; width: 16px; height: 16px; border-radius: 50%; background: #ffdb4e; color: #17304a; font-size: 12px; line-height: 16px; text-align: center; font-weight: 900; }
.garage-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
#card .garage-preview, #card .garage-equip { min-height: 46px; padding: 9px 6px; border-radius: 12px; font-size: 15px; font-weight: 850; line-height: 1.15; }
#card .garage-preview { border: 1.5px solid #8ba0bb; background: #091b2dad; color: #f6f9fc; }
.garage-preview span { margin-right: 4px; }
#card .garage-equip { border: 1px solid #fff197; background: linear-gradient(#ffe96e,#ffcf36); color: #10233c; box-shadow: inset 0 1px 0 #fff7b1, 0 3px 8px #0003; }
#card .garage-equip:disabled { opacity: 1; filter: saturate(.55); color: #263a4c; background: linear-gradient(#e9d884,#bbac64); cursor: default; }
#card .garage-mode { margin: 10px 0 0; font-size: 12px; color: #aebdd0; text-align: center; line-height: 1.2; }
#card .garage-alert, #card .garage-status { margin: 7px 0 0; font-size: 12px; color: #ffe9af; line-height: 1.25; text-align: center; }
#card .garage-status:empty { display: none; }
.garage-sr { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip-path: inset(50%); white-space: nowrap!important; border: 0!important; }
.garage-fallback { position: absolute; inset: 0; background: #6b604f; }
.garage-fallback svg { width: 100%; height: 100%; object-fit: cover; }
#card .garage-fallback p { position: absolute; bottom: 12px; left: 20px; right: 20px; color: white; text-shadow: 0 2px 5px #000; font-size: 12px; text-align: center; }
@media (min-width: 700px) and (min-height: 650px) and (orientation: portrait) { .garage-console { padding-left: max(32px, var(--safe-l)); padding-right: max(32px, var(--safe-r)); } #card .garage-horn { min-height: 130px; } .garage-horn svg { height: 85px; } }
@media (orientation: landscape) and (min-width: 480px) { #card.garage-card { grid-template-columns: minmax(0,1fr) clamp(270px,36vw,380px); grid-template-rows: 1fr; } .garage-console { display: flex; flex-direction: column; justify-content: center; padding: max(12px,var(--safe-t)) max(13px,var(--safe-r)) max(12px,var(--safe-b)) 13px; border-radius: 23px 0 0 23px; border-right: 0; border-bottom: 1px solid #637b99; overflow-y: auto; } .garage-header { right: clamp(270px,36vw,380px); } .garage-horns { flex-shrink: 0; } #card .garage-horn { min-height: 90px; font-size: 12px; } .garage-horn svg { height: 51px; } #card .garage-selection h3 { font-size: 22px; } .garage-view-hint { bottom: 18px; } #card .garage-preview, #card .garage-equip { font-size: 14px; min-height: 44px; } }
@media (max-height: 650px) and (orientation: portrait) { .garage-console { padding-top: 10px; padding-bottom: calc(9px + var(--safe-b)); } .garage-selection { margin-bottom: 7px; } #card .garage-selection h3 { font-size: 20px; } #card .garage-horn { min-height: 75px; } .garage-horn svg { height: 43px; } .garage-horns { margin-bottom: 3px; padding-bottom: 5px; } #card .garage-mode { margin-top: 7px; } .garage-view-hint { bottom: 10px; } }
@media (prefers-reduced-motion: reduce) { .garage-card *, .garage-card *::before, .garage-card *::after { scroll-behavior: auto!important; transition: none!important; animation: none!important; } }
/* Allow native horizontal horn swipes; the driving screen's pan-y guard is inactive here. */
html:has(#overlay.show.garage-open), body:has(#overlay.show.garage-open), #overlay.garage-open, #card.garage-card { touch-action: auto; }
.garage-horns { touch-action: pan-x; }
/* One category and one compact rail at a time keeps the cosmetic choices manageable. */
.garage-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; margin:0 0 10px; }
#card .garage-tab { padding:7px 2px; min-height:36px; border:1px solid #536c86; border-radius:9px; background:#102338; color:#bfcee1; font-size:12px; font-weight:750; }
#card .garage-tab.is-active { border-color:#ffe37a; color:#fff2bc; background:#334355; }
#card .garage-description { margin:0 0 9px; min-height:2.2em; color:#c6d2df; font-size:12px; line-height:1.2; }
#card .garage-signature { margin:0 0 9px; color:#ffe4a6; font-size:12px; line-height:1.25; }
.garage-console { max-height:calc(100vh - 145px); max-height:calc(100dvh - 145px); overflow-y:auto; overscroll-behavior-y:contain; }
@media (orientation:landscape) and (min-width:480px) { .garage-console { max-height:none; justify-content:flex-start; justify-content:safe center; } .garage-tabs { margin-bottom:8px; } #card .garage-description { margin-bottom:7px; } }
@media (max-height:650px) and (orientation:portrait) { .garage-tabs { margin-bottom:7px; } #card .garage-tab { min-height:33px; padding:5px 1px; } #card .garage-description { font-size:11px; margin-bottom:7px; } }
