/* Miggi's own alpine game lobby: generous touch targets and illustrated navigation. */
.homeScreen #overlay{background:radial-gradient(ellipse at 30% 32%,#dcead8dc,#aac9adf0 80%);align-items:center;justify-content:center;overflow-y:auto;touch-action:pan-y}
.homeScreen .gameLobby.intro{display:flex;flex-direction:column;width:min(1120px,94%);max-width:1120px;padding:80px 0 30px;text-align:left;margin:auto;gap:18px}
.homeScreen .lobbyTitle{padding-left:14px}.homeScreen .lobbyTitle h1{font-size:clamp(35px,4vw,56px);line-height:1;margin:5px 0 7px}.homeScreen .lobbyTitle h1 span{color:#326b55}.lobbySubtitle{font-size:12px;color:#4f7660}.lobbyStage{display:grid;grid-template-columns:1.4fr 1fr;gap:25px;align-items:center;background:linear-gradient(135deg,#f7f1d6,#c5d7b6);border:2px solid #ffffff88;border-radius:25px;box-shadow:0 7px 0 #466d5426,inset 0 2px 0 #fff8;padding:10px 25px 18px;position:relative;overflow:hidden}.lobbyStage:before{content:'';position:absolute;left:5%;bottom:50px;width:48%;height:60px;border-radius:50%;background:#527c5b18}.homeScreen .homeShowcase{width:100%;max-width:none;gap:10px;margin:0;z-index:1}.homeScreen .homeShowcase svg{height:240px}.homeScreen .homeShowcase b{font-size:23px;margin-top:-12px}.homeScreen .homeShowcase small{font-size:9px;margin:7px 0;color:#608068;letter-spacing:1px}.homeScreen .homeShowcase>button{width:45px;height:52px;border-radius:13px;background:#345e4d;box-shadow:0 4px 0 #204b3e;color:#fff5d5;font-size:35px}.startPanel{padding:15px 5px 0;z-index:1}.homeScreen .startPanel .homeSummary{margin:0 0 20px;justify-content:flex-start;padding:0;gap:32px}.homeScreen .homeSummary span{font-size:9px;letter-spacing:1px}.homeScreen .homeSummary b{font-size:26px;color:#315f48}.homeScreen .homeSummary span:first-child b{color:#9d6a1f}.routeCaption{font-size:8px;font-weight:800;letter-spacing:1.5px;opacity:.6;display:block}.startPanel>#homeTag{display:block;font-size:19px;margin:7px 0 17px}.homeScreen .startPanel .primary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;width:100%;font-size:22px;letter-spacing:1px;padding:19px 23px;background:linear-gradient(#ffe695,#edbc4d);color:#2e5341;border:2px solid #bf8b2b;border-radius:15px;box-shadow:0 6px 0 #ac7c2d,inset 0 2px 0 #fff4c4}.playTriangle{font-size:19px}.homeScreen .intro .lobbyTiles{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;margin:0;width:100%}.homeScreen .intro .lobbyTile.garageLink{display:flex;align-items:center;flex-direction:column;justify-content:center;background:linear-gradient(#fff9e8,#e6e6cb);border:2px solid #faf5dd;border-radius:18px;padding:10px 7px 15px;margin:0;box-shadow:0 5px 0 #6a886256,inset 0 2px 0 #fff9;min-height:146px;letter-spacing:0;text-align:center;color:#294f40}.lobbyTile .tileArt{display:block;width:85px;height:85px;filter:drop-shadow(0 3px 1px #335b3c15)}.tileArt svg{width:100%;height:100%;display:block}.lobbyTile b{display:block;font-size:14px;margin-top:4px}.lobbyTile small{display:block;font-size:8px;margin-top:5px;color:#69806a}.lobbyTile em{display:inline-flex;align-items:center;justify-content:center;font-style:normal;background:#c7754d;color:#fff6da;min-width:20px;height:20px;border-radius:10px;font-size:10px;padding:0 5px}.homeScreen .intro .lobbyTile:hover{background:linear-gradient(#fff9d9,#f0dfa6);transform:translateY(-2px)}.homeScreen .intro .lobbyTile:active,.homeScreen .startPanel .primary:active{transform:translateY(4px);box-shadow:0 1px 0 #657f55}.homeScreen .gameLobby .instructions{margin:0;opacity:.55;font-size:9px;justify-content:center}.homeScreen .brandmark{background:url('assets/miggi-sport-icon.png') center/cover;color:transparent;border:2px solid #fff7d4;border-radius:12px;width:47px;height:47px}.homeScreen header{top:max(16px,env(safe-area-inset-top))}.homeScreen footer{display:none}
/* Upgrade cards share the same pictogram language as the main menu. */
.tuningIcon{width:78px;height:78px;margin:0 auto 9px}.tuningIcon svg{width:100%;height:100%}.tuningCard{border:2px solid #dce4ca;background:linear-gradient(#fff9e8,#edf0df);border-radius:16px;padding:15px 13px;box-shadow:0 4px 0 #92a78033}.tuningHeading b{font-size:17px}.tuningHeading span{font-weight:900;font-size:12px;background:#dce5cc;padding:5px 7px;border-radius:7px}.tuningCard p{font-size:10px;line-height:1.5;min-height:31px}.tuningCard button{min-height:44px;font-size:11px;border-radius:9px;background:linear-gradient(#f7d573,#dfb349);color:#31533e;box-shadow:0 3px 0 #b68e35}.tuningCard button:disabled{background:#d7dfcd;box-shadow:none;color:#70816d;opacity:.75}.fleetCard .miniCar{width:94px}.fleetCard{min-height:85px;border-radius:12px}.fleetCard b{font-size:13px}.workshopHeader>button,.settingsHeader>button,.routeHeading>button{min-width:44px;min-height:44px}.workshopTabs button{min-height:44px;font-size:11px}.workshopShell{border:2px solid #e1e8ce}.vehicleShowcase{border-radius:15px;background:linear-gradient(125deg,#f8f0d7,#e0e8cf);padding:13px}.vehicleShowcase #vehicleHero svg{max-height:220px}.workshopHeader h2{font-size:35px}.levelTrack{height:10px}.levelTrack i{border-radius:3px}
@media(max-height:620px) and (min-width:651px){.homeScreen .gameLobby.intro{padding:61px 0 15px;gap:10px;width:92%;max-width:1100px}.homeScreen .lobbyTitle{display:flex;align-items:baseline;gap:15px}.homeScreen .lobbyTitle h1{font-size:30px;margin:0}.homeScreen .lobbyTitle>.eyebrow{font-size:7px}.lobbySubtitle{display:none}.lobbyStage{padding:0 15px 10px;gap:25px;border-radius:18px}.homeScreen .homeShowcase svg{height:145px}.homeScreen .homeShowcase b{font-size:17px;margin-top:-16px}.homeScreen .homeShowcase small{font-size:7px;margin:4px}.homeScreen .homeShowcase>button{height:44px;width:38px;font-size:29px}.startPanel{padding-top:8px}.homeScreen .startPanel .homeSummary{margin:0 0 7px;gap:25px}.homeScreen .homeSummary b{font-size:19px;margin:3px 0}.homeScreen .homeSummary span{font-size:7px}.routeCaption{font-size:7px}.startPanel>#homeTag{font-size:14px;margin:4px 0 8px}.homeScreen .startPanel .primary{padding:11px 15px;font-size:17px;border-radius:11px;min-height:44px}.homeScreen .intro .lobbyTiles{gap:9px}.homeScreen .intro .lobbyTile.garageLink{min-height:99px;padding:5px 3px 8px;border-radius:13px}.lobbyTile .tileArt{width:55px;height:55px}.lobbyTile b{font-size:12px;margin-top:0}.lobbyTile small{font-size:7px;margin-top:3px}.homeScreen .gameLobby .instructions{display:none}.homeScreen .brand{font-size:17px}.homeScreen .brand small{font-size:6px}.homeScreen .brandmark{width:36px;height:36px}.homeScreen .topright button{height:36px;min-height:36px}.tuningIcon{width:63px;height:63px;margin-bottom:6px}.tuningHeading b{font-size:14px}.tuningCard{padding:10px}.tuningCard p{font-size:9px}.tuningCard button{font-size:9px;min-height:44px}.workshopHeader h2{font-size:25px}.workshopTabs button{font-size:10px}.workshopTabs{height:44px;flex-shrink:0}.fleetCard{min-height:75px}.fleetCard .miniCar{width:70px}.fleetCard b{font-size:10px}.vehicleShowcase{padding:8px}.workshopBody{grid-template-columns:190px 1fr}}
@media(max-width:650px){.homeScreen .gameLobby.intro{padding:80px 0 25px;gap:15px;width:92%}.homeScreen .lobbyTitle h1{font-size:35px}.lobbyStage{grid-template-columns:1fr;padding:0 15px 20px;gap:0}.homeScreen .homeShowcase svg{height:180px}.homeScreen .homeShowcase b{font-size:21px}.homeScreen .startPanel .homeSummary{justify-content:center;margin:0 0 15px}.startPanel{text-align:center;padding:15px 0 0}.homeScreen .intro .lobbyTiles{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.homeScreen .intro .lobbyTile.garageLink{min-height:130px;padding:8px 4px 12px}.lobbyTile .tileArt{height:67px;width:67px}.lobbyTile b{font-size:12px}.lobbyTile small{font-size:8px}.homeScreen .gameLobby .instructions{display:none}.homeScreen #best{display:none}.workshopBody{display:flex}.fleetCard .miniCar{width:70px}.fleetCard{min-height:76px}.workshopTabs button{font-size:9px}.tuningIcon{height:65px;width:65px}.tuningCard button{font-size:9px;min-height:44px}}
@media(max-height:400px) and (min-width:651px){.homeScreen .gameLobby.intro{padding-top:57px;gap:8px}.homeScreen .lobbyTitle>.eyebrow{display:none}.homeScreen .lobbyTitle h1{font-size:24px}.homeScreen .homeShowcase svg{height:115px}.homeScreen .homeShowcase b{font-size:15px;margin-top:-12px}.homeScreen .homeShowcase small{display:none}.lobbyStage{padding-bottom:9px}.homeScreen .intro .lobbyTile.garageLink{min-height:88px}.lobbyTile .tileArt{height:45px;width:45px}.lobbyTile small{display:none}.homeScreen .startPanel .homeSummary{margin-bottom:4px}.homeScreen .startPanel .primary{padding:8px 14px}}
.fleetCard>span:nth-child(2){flex:1;min-width:0}.fleetCard b{overflow-wrap:anywhere}.fleetStatus{flex-shrink:0}.fleetCard .miniCar{flex-shrink:0;width:76px}
@media(max-width:650px){.fleetCard .miniCar{width:65px}.fleetCard>span:nth-child(2){display:block}}
.homeScreen .lobbyStage .homeShowcase,.homeScreen .lobbyStage .startPanel{grid-column:auto;grid-row:auto}.homeScreen .lobbyStage .homeShowcase{text-align:center}
@media(max-height:620px) and (min-width:651px){.fleetCard{gap:5px}.fleetCard .miniCar{width:58px}.fleetCard b{overflow-wrap:normal;hyphens:auto}}
#garage.partsFocus .vehicleShowcase{display:none}#garage.partsFocus .vehicleStats{padding-top:5px;margin-bottom:16px}.fleetCard b{font-size:11px;overflow-wrap:normal;hyphens:auto}.fleetCard .miniCar{width:64px}

/* Nested menu scrolling must remain native, including drags beginning on a route card. */
#routes,#routes .routeShell,#routeChoices,#routeChoices button{touch-action:pan-y}
#routes .routeShell{height:min(780px,calc(100svh - 24px));max-height:calc(100svh - 24px);min-height:0;overflow-y:auto;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;align-self:center}
#routes .routeHeading{position:sticky;top:-25px;z-index:2;background:#fff9eb;padding-top:8px;padding-bottom:6px}
@media(max-height:520px){#routes .routeHeading{top:-15px}}
.homeScreen .intro .lobbyTiles{grid-template-columns:repeat(5,minmax(0,1fr))}.friendsButton{display:flex;align-items:center;gap:15px;width:100%;padding:14px 20px;background:#e7d28d;border:2px solid #f9ecc6;border-radius:13px;text-align:left;color:#305340;margin-bottom:18px;min-height:64px}.friendsButton svg{width:48px;height:48px;flex-shrink:0}.friendsButton span{flex:1}.friendsButton b{display:block;font-size:15px}.friendsButton small{display:block;font-size:10px;margin-top:5px}.friendsButton strong{font-size:24px}
@media(max-width:650px){.homeScreen .intro .lobbyTiles{grid-template-columns:repeat(3,minmax(0,1fr))}}

#demoTimer:empty,#demoBadge:empty{display:none}#demoTimer{display:none;position:absolute;top:25px;left:50%;transform:translateX(-50%);z-index:3;padding:10px 15px;border-radius:20px;background:#fff1c4;color:#345943;font-size:12px;font-weight:900}.playing #demoTimer:not(:empty){display:block}#demoBadge{display:inline-block;background:#e8bf59;color:#33563c;border-radius:7px;padding:5px 9px;font-size:9px;font-weight:900;letter-spacing:1px;margin-right:10px}@media(max-height:620px){#demoBadge{position:absolute;top:25px;left:45%;font-size:8px;padding:5px 8px}#demoTimer{top:23px;font-size:10px;padding:7px 12px}}

/* Shared branding in every game state, including the driving HUD. */
header .brandmark{object-fit:cover;display:block;border:2px solid #fff7d4;border-radius:11px;flex-shrink:0}
.legalSettings{border-top:1px solid #4c71552c;margin-top:24px;padding-top:18px;font-size:13px;line-height:1.65}.legalSettings h3{font-size:20px;margin:10px 0}.legalSettings h4{font-size:14px;margin:18px 0 4px}.legalSettings p{line-height:1.65}.legalSettings a{color:#285f4d;text-decoration:underline;overflow-wrap:anywhere}.legalSettings details{border:1px solid #bfceb5;border-radius:12px;margin:12px 0;padding:12px 15px}.legalSettings summary{cursor:pointer;min-height:28px;font-weight:800}.legalSettings button{background:#315f4e;color:#fff6dc;border-radius:10px;padding:13px 16px;min-height:44px;font-size:11px}.settingsContent{overscroll-behavior:contain}.legalSettings,.legalSettings *{touch-action:pan-y}

/* System headings keep predictable glyph metrics in the bundled iOS web view. */
h1,h2,.settingsHeader h2{font-family:system-ui,-apple-system,BlinkMacSystemFont,sans-serif;font-weight:900;letter-spacing:-.45px;line-height:1.1}.homeScreen .lobbyTitle h1{letter-spacing:-.45px;line-height:1.1}
