/* Launch-only palette and layout. In-match HUD/controls retain their existing styles. */
#menu.rallyMenu{padding:0;background:#0b111a;overflow:hidden;touch-action:pan-y;color:#edf0ef;--menu-line:#354150;--menu-muted:#aab7c6;--menu-gold:#d8b06b;--menu-teal:#62cfc6}
.rallyMenu *{box-sizing:border-box}.rallyMenu button,.rallyMenu a,.rallyMenu input{font:inherit}.rallyMenu button,.rallyMenu a{touch-action:manipulation}.rallyMenu button:focus-visible,.rallyMenu a:focus-visible,.rallyMenu input:focus-visible{outline:3px solid #88e6dd;outline-offset:4px}.rallyMenu button{min-height:48px;border:1px solid var(--menu-line);border-radius:7px;background:#18222e;color:#edf0ef;padding:10px 17px}.rallyMenu button:hover{border-color:#a1b4c4;background:#23303f}.rallyMenu button:disabled{opacity:.5;cursor:default}.rallyMenu a{color:inherit;text-decoration:none}.rallyMenu p{line-height:1.55}.rallyMenu h1,.rallyMenu h2,.rallyMenu h3{font-family:var(--body);margin:0}.rallyMenu h2{font-size:23px;line-height:1.25}.rallyMenu h3{font-size:18px;line-height:1.3}.rallyMenu .menuMuted{color:var(--menu-muted);font-size:14px;margin:10px 0}.rallyMenu .menuEyebrow{color:var(--menu-gold);font-size:11px;letter-spacing:.16em;line-height:1.5;font-weight:700;margin:0 0 8px}
.menuShell{position:relative;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:100%;max-width:1480px;height:100%;margin:auto;background:linear-gradient(135deg,#17212d,#101720 70%);border-inline:1px solid #25303e;font:16px/1.45 var(--body)}
.menuHeader{display:flex;align-items:center;gap:30px;min-height:88px;padding:16px 30px;border-bottom:1px solid var(--menu-line);background:#0e151f}.menuBrand{display:flex;align-items:center;gap:12px;font-size:13px;line-height:1.2;letter-spacing:.12em;flex-shrink:0}.menuBrand b{display:block;font-size:17px;letter-spacing:.07em}.brandMark{display:grid;place-items:center;width:45px;height:45px;border:1px solid #b89255;color:#e8c788;font-size:25px;font-weight:800;transform:skew(-8deg)}
.menuTabs{display:flex;gap:6px;flex:1}.rallyMenu .menuTabs button{border:0;background:transparent;border-radius:0;font-weight:650;color:#aebbc9;border-bottom:2px solid transparent;white-space:nowrap}.rallyMenu .menuTabs button[aria-selected=true]{border-bottom-color:var(--menu-gold);color:#f1d49d}.headerActions{display:flex;gap:8px}.rallyMenu .headerActions button{font-size:13px;background:transparent;min-height:44px;padding:8px 12px}
.menuScroll{overflow:auto;overscroll-behavior:contain;min-height:0;padding:28px 36px 36px;scroll-padding:24px;-webkit-overflow-scrolling:touch}.menuHero{min-height:190px;position:relative;padding:22px 26px;margin-bottom:24px;border:1px solid #394451;border-radius:9px;background:linear-gradient(90deg,#111a27 14%,#101925ed 40%,#10192522),url('menu-coast.webp') center 58%/cover;overflow:hidden}.menuHero h1{font-size:clamp(34px,4vw,52px);font-weight:750;line-height:1.03;letter-spacing:-.035em}.menuHero h1 span{display:block;font-size:.56em;font-weight:450;letter-spacing:-.015em;color:#aebcc9;margin-top:8px}.menuHero>p:last-child{font-size:11px;letter-spacing:.11em;color:#c1ccd7;margin:18px 0 0}
.rallyMenu #mode.modeCards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;border:0;overflow:visible}.rallyMenu .modeCard{position:relative;min-height:180px;text-align:left;padding:24px 22px 20px;display:flex;flex-direction:column;justify-content:flex-end;align-items:flex-start;overflow:hidden;background:linear-gradient(120deg,#202b38,#17202b);border:1px solid #465363;box-shadow:0 6px 18px #0003}.rallyMenu .modeCard[aria-pressed=true]{border-color:var(--menu-gold);background:linear-gradient(120deg,#3b3327,#1d2531);box-shadow:inset 0 3px #d8b06b,0 7px 20px #0003;color:#f5eee1}.modeCard strong{font-size:32px;line-height:1.25;letter-spacing:.015em;text-transform:uppercase}.modeCard .menuEyebrow{font-size:9px;margin-bottom:4px;position:relative}.modeDescription{position:relative;font-size:13px;color:#b8c4d0;max-width:80%;margin-top:5px}.modeArt{position:absolute;right:14px;top:6px;width:140px;height:86px;color:#9baebf;opacity:.18;transform:rotate(-8deg)}.modeArt svg{width:100%;height:100%}.modeCard[aria-pressed=true] .modeArt{color:#f2ce8c;opacity:.28}.modeArrow{position:absolute;bottom:22px;right:20px;font-size:22px;color:#d4ba8d}.practiceChoices{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px;padding:15px;background:#111b27;border:1px solid var(--menu-line);border-radius:8px}.rallyMenu .practiceChip{font-size:14px}.rallyMenu .practiceChip[aria-pressed=true]{background:#28413f;border-color:#73cec2;color:#c7fff5}
.setupHeading{display:flex;align-items:end;justify-content:space-between;gap:18px;margin-top:28px}.setupHeading .menuEyebrow{margin-bottom:5px}#pilotsHost label{display:flex;align-items:center;gap:10px;color:#b8c4d0;font-size:14px}.rallyMenu .seg{border-color:#435264;border-radius:6px}.rallyMenu .seg button{border:0;border-radius:0;min-height:44px;background:#182431;padding:8px 14px;font-size:14px}.rallyMenu .seg button[aria-pressed=true]{background:#d3af73;color:#15202b}.menuTeams{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:14px}.teamOverview{padding:17px 20px;background:#17202c;border:1px solid #394656;border-left:3px solid #d8b06b;border-radius:7px}.teamOverview[data-team="1"]{border-left-color:#62cfc6}.teamOverviewHead{display:flex;align-items:center;justify-content:space-between;gap:10px}.teamOverviewHead h3{color:#e1bb79;text-transform:uppercase;letter-spacing:.1em;font-size:15px}.teamOverview[data-team="1"] h3{color:#76d9cf}.rallyMenu .menuQuiet{background:transparent;font-size:13px;padding:8px 13px;min-height:44px}.pilotSummary{display:flex;align-items:center;gap:12px;margin-top:10px;font-size:14px;min-width:0}.pilotSummary .vehicleArt{flex:0 0 70px;height:43px}.pilotSummary>span:last-child{overflow-wrap:anywhere}.teamOverview .menuMuted{font-size:12px;margin:8px 0 0}
.menuOptions{border:1px solid #3b495a;border-radius:8px;margin-top:14px;padding:20px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;background:#0f1824}.menuOptions #capNote{grid-column:1/-1;font-size:13px;color:#d4be94;margin:0}.menuOptions label{display:flex;flex-direction:column;align-items:start;gap:8px;color:#c1cbd6;font-size:14px;min-width:0}.menuOptions .seg{display:flex;max-width:100%;flex-wrap:wrap}.menuOptions .seg button{flex:1}.rallyMenu #crewChoice{margin:16px 0;padding:14px 18px;background:#1b2d38;border-radius:8px}.rallyMenu input[type=checkbox]{width:22px;height:22px;vertical-align:middle}
.pageHeading{margin:6px 0 28px}.pageHeading h1{font-size:clamp(34px,4vw,50px);letter-spacing:-.04em;line-height:1.1}.pageHeading p:last-child{color:#aebdcd;margin:10px 0}.garageBar,.rosterHeading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:20px 0}.menuSegments{display:flex;gap:10px}.rallyMenu .teamTab{min-width:150px;font-weight:650}.rallyMenu .teamTab[aria-pressed=true]{border-color:#d8b06b;color:#e8c78f;background:#332f27}.rallyMenu .teamTab:last-child[aria-pressed=true]{border-color:#62cfc6;color:#95e4db;background:#1a3539}.menuRoster{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-top:20px}.rosterCard{min-width:0;padding:17px;border:1px solid #3d4959;border-top:2px solid #b8955c;border-radius:8px;background:linear-gradient(135deg,#202a37,#151e29)}.rosterCard[data-team="1"]{border-top-color:#56a9a5}.vehicleRole{display:block;color:#beccda;font-size:11px;text-transform:uppercase;letter-spacing:.08em;margin-bottom:12px}.vehicleArt{display:grid;place-items:center;width:100%;height:125px;overflow:hidden;background:radial-gradient(ellipse,#c4c9c133,#c4c9c105 65%);border-radius:5px;color:#c3b494}.vehicleArt img{width:100%;height:100%;object-fit:contain}.vehicleArt svg{width:75%;height:70%;max-width:210px}.rosterCard h3{margin-top:14px}.rosterCard p{min-height:22px}.vehicleActions{display:flex;gap:9px;flex-wrap:wrap;margin-top:15px}.vehicleActions button{flex:1}.rallyMenu .addVehicle{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;min-height:260px;border:1px dashed #6b798a;background:#131d29;color:#bbc8d7}.addVehicle>span{font-size:38px;font-weight:300;line-height:1}.addVehicle small{font-size:13px}
.resourceGrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0 32px}.menuResource{display:flex;flex-direction:column;gap:12px;padding:23px;min-height:145px;border:1px solid #3c4a5d;border-radius:8px;background:#172330}.menuResource:hover{border-color:#d8b06b;background:#202e3e}.menuResource strong{font-size:18px;color:#e8d4ae}.menuResource span{color:#afbfce;font-size:14px}.rallyMenu .menuHelp{max-width:1000px}.rallyMenu .menuHelp details{border-color:#465568;color:#bdcbd8;font-size:16px;padding:18px 0}.rallyMenu .menuHelp summary{min-height:48px;color:#f0d5a5;display:flex;align-items:center}.rallyMenu .menuHelp p{max-width:80ch}.rallyMenu .crewBrief{background:#192a37;border-color:#3d5767;padding:20px;margin-top:24px}.rallyMenu .crewBrief p{font-size:15px}
.menuFooter{display:flex;align-items:center;justify-content:space-between;gap:22px;min-height:90px;background:#101923;border-top:1px solid #465264;padding:14px 36px max(14px,env(safe-area-inset-bottom));box-shadow:0 -8px 20px #060a1029}.menuFooter p{margin:2px 0}.menuFooter #launchSummary{font-size:14px;color:#e2dccf}.menuFooter #menuNotice,.menuFooter .modelStatus{font-size:13px;color:#a6d8d0;min-height:0;max-width:75ch}.rallyMenu #startBtn{min-width:220px;min-height:57px;background:linear-gradient(#e5c58c,#bb9456);border:1px solid #f2dba9;border-radius:6px;color:#14202a;box-shadow:0 4px 14px #0005;font:750 21px var(--body);letter-spacing:.07em;text-transform:uppercase;white-space:nowrap}.rallyMenu #startBtn:hover{background:#edcf99}
.vehiclePicker{position:absolute;inset:0;z-index:20;background:#070b12dd;backdrop-filter:blur(8px);padding:32px;display:flex;align-items:center;justify-content:center}.pickerShell{width:min(1040px,100%);max-height:100%;display:flex;flex-direction:column;background:#141f2c;border:1px solid #596572;border-radius:12px;padding:24px;box-shadow:0 24px 80px #000a;min-height:0}.pickerShell>header{display:flex;align-items:center;justify-content:space-between;gap:16px}.pickerShell h2{font-size:25px}.pickerShell>p{font-size:13px;color:#b6c6d6;margin:12px 0}.searchLabel{display:flex;flex-direction:column;gap:7px;font-size:13px;color:#bcc9d6}.rallyMenu #vehicleSearch{width:100%;min-height:48px;border:1px solid #607188;background:#0b1522;color:#f0f1ef;border-radius:6px;padding:10px 14px;font-size:16px;-webkit-user-select:text;user-select:text}.pickerFilters{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}.pickerResults{overflow:auto;overscroll-behavior:contain;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-rows:max-content;gap:14px;padding:4px 5px 12px;min-height:0}.rallyMenu .pickerVehicle{display:block;text-align:left;padding:12px;background:#1d2a39;border:1px solid #4a5c70;min-width:0}.pickerVehicle .vehicleArt{position:relative;height:125px}.pickerVehicle>strong,.pickerVehicle>span:last-child{display:block;margin-top:8px}.pickerVehicle strong{font-size:16px;overflow-wrap:anywhere}.pickerVehicle>span:last-child{font-size:12px;color:#bac8d6;line-height:1.45}.rallyMenu .pickerVehicle:hover{border-color:#e3bd7f;background:#2d3945}.emptyPicker{grid-column:1/-1;padding:24px;color:#c6d2de}
@media(min-width:1300px){.menuRoster,.pickerResults{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1100px){.menuHeader{gap:15px;padding:12px 22px}.menuTabs{gap:2px}.rallyMenu .menuTabs button{padding:10px 13px}.menuScroll{padding:22px 26px 30px}.menuHero{min-height:160px;padding:18px 22px}.modeCard strong{font-size:27px}.rallyMenu .modeCard{padding:20px 18px;min-height:163px}.menuFooter{padding-inline:26px}.menuBrand{font-size:11px}.menuBrand b{font-size:14px}.brandMark{width:38px;height:38px;font-size:22px}.headerActions{gap:5px}.rallyMenu .headerActions button{padding:8px}.setupHeading{align-items:start;flex-wrap:wrap}.menuRoster{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.menuHeader{flex-wrap:wrap;gap:8px 16px;padding:10px 16px}.menuTabs{order:3;flex-basis:100%;justify-content:center}.headerActions{margin-left:auto}.menuScroll{padding:16px}.menuHero{min-height:150px;margin-bottom:17px}.rallyMenu #mode.modeCards{gap:10px}.rallyMenu .modeCard{min-height:143px;padding:16px 12px}.modeCard strong{font-size:22px}.modeCard .menuEyebrow{font-size:8px}.modeDescription{font-size:12px;max-width:100%}.modeArrow{display:none}.modeArt{width:105px;right:1px;top:4px}.menuTeams{gap:10px}.teamOverview{padding:12px}.teamOverviewHead{align-items:start;flex-wrap:wrap}.pilotSummary{gap:7px;align-items:start}.pilotSummary .vehicleArt{flex-basis:48px;height:35px}.menuRoster,.resourceGrid{grid-template-columns:repeat(2,minmax(0,1fr))}.menuFooter{padding:12px 16px max(12px,env(safe-area-inset-bottom));gap:12px;min-height:80px}.rallyMenu #startBtn{min-width:150px;min-height:52px;font-size:17px}.menuFooter #launchSummary{font-size:12px}.menuFooter #menuNotice{font-size:12px}.vehiclePicker{padding:16px}.pickerShell{padding:18px}.pickerResults{grid-template-columns:repeat(2,minmax(0,1fr))}.pickerShell h2{font-size:21px}}
@media(max-width:480px){.menuHero{min-height:140px;padding:16px}.menuHero h1{font-size:35px}.rallyMenu #mode.modeCards{grid-template-columns:1fr}.rallyMenu .modeCard{min-height:105px;padding:13px 17px}.modeCard strong{font-size:25px}.modeArt{height:80px;width:125px;right:18px;top:8px}.modeDescription{max-width:75%}.menuTeams,.menuOptions,.menuRoster,.resourceGrid{grid-template-columns:1fr}.setupHeading{margin-top:21px}.garageBar{flex-wrap:wrap}.rallyMenu .teamTab{min-width:130px}.menuFooter{align-items:stretch;flex-direction:column;gap:8px}.rallyMenu #startBtn{width:100%;min-height:49px}.menuFooter #menuNotice:empty{display:none}.vehiclePicker{padding:8px}.pickerShell{padding:13px}.pickerResults{gap:9px}.pickerFilters{gap:5px}.rallyMenu .pickerFilters button{font-size:12px;padding:8px 10px}.menuFooter .modelStatus{max-height:45px;overflow:auto}}
@media(prefers-reduced-motion:reduce){.rallyMenu *{scroll-behavior:auto!important;transition:none!important}}

/* Bound both nested scrollers; inherited grid centering otherwise expands to content height. */
#menu.rallyMenu{display:block;width:100%;height:100%;height:100dvh;min-height:0}
.menuShell{min-height:0;max-height:100%;overflow:hidden}
.menuScroll{height:100%;min-width:0;touch-action:pan-y}
.vehiclePicker{min-height:0;min-width:0}.pickerShell{height:min(800px,100%);min-width:0}.pickerShell>header,.pickerShell>.searchLabel,.pickerFilters,.pickerShell>p{flex-shrink:0}
.pickerResults{flex:1;align-content:start;touch-action:pan-y;-webkit-overflow-scrolling:touch}
.vehicleArt{display:flex;align-items:center;justify-content:center;min-width:0;min-height:0;flex-shrink:0;padding:4px}
.vehicleArt img{display:block;min-width:0;min-height:0;max-width:100%;max-height:100%;object-fit:contain}
/* The picker scrolls whole cards rather than compressing their rows. Its image
   is fitted into a definite inset box, independent of button/flex intrinsic sizes.
   Keep Garage art and its sizing unchanged. */
.pickerVehicle .vehicleArt img{position:absolute;left:4px;top:4px;width:calc(100% - 8px);height:calc(100% - 8px);object-fit:contain;object-position:center}

#app:has(#menu.rallyMenu:not([hidden])){touch-action:pan-y}


/* Approved Battle / Race / Practice panels and option 4 insignia (November 5).
   Keep the complete square compositions; no vehicle or title is clipped. */
.menuBrand .brandMark{width:64px;height:42px;border:0;transform:none;overflow:hidden;border-radius:3px;flex-shrink:0}
.brandMark img{display:block;width:100%;height:100%;object-fit:contain}
.rallyMenu .modeCard{padding:0;justify-content:flex-start;min-height:0}
.modeCard .modeArt{position:relative;inset:auto;display:block;width:100%;height:auto;aspect-ratio:1;opacity:1;transform:none;flex-shrink:0;overflow:hidden;background:#112331}
.modeArt img{display:block;width:100%;height:100%;object-fit:contain}
.modeCard[aria-pressed=true] .modeArt{opacity:1}
.modeCard>strong{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.modeCard .menuEyebrow{margin:14px 18px 4px;font-size:10px}
.modeCard .modeDescription{margin:0 18px 18px;max-width:calc(100% - 48px);font-size:13px;line-height:1.5;flex:1}
.modeCard .modeArrow{bottom:16px;right:15px}
.rallyMenu .modeCard[aria-pressed=true]{outline:2px solid var(--menu-gold);outline-offset:2px}
@media(max-width:760px){.menuBrand .brandMark{width:56px;height:36px}.modeCard .menuEyebrow{margin:11px 12px 4px;font-size:8px;letter-spacing:.1em}.modeCard .modeDescription{margin:0 12px 14px;max-width:calc(100% - 24px);font-size:12px}}
@media(max-width:480px){.modeCard .menuEyebrow{font-size:10px;margin:14px 17px 4px}.modeCard .modeDescription{font-size:13px;margin:0 17px 17px}}
