:root{--bg:#161616;--fg:#f7f5f0;--muted:#ada9a2;--accent:#ff7043;--line:#373635;--card:#222222;--gutter:clamp(18px,4.25vw,82px);--mono:"SFMono-Regular",Consolas,monospace;color-scheme:dark;font-family:"Helvetica Neue",Arial,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--fg);background:var(--bg)}*{box-sizing:border-box}body{margin:0}button,select{font:inherit}button{cursor:pointer;color:inherit;border:none;background:none;touch-action:manipulation}button:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:2px solid #ffc1a8;outline-offset:3px}button:hover{filter:brightness(1.13)}button:disabled{cursor:wait}h1,h2,h3,p{margin:0}svg{width:20px;height:20px;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}button svg{pointer-events:none}[hidden]{display:none!important}.wrap,.bar,.hero-body{width:min(100%,1800px);margin-inline:auto;padding-inline:var(--gutter)}.top{background:#171717;border-bottom:1px solid #32312f}.bar{display:flex;align-items:center;height:67px;gap:clamp(30px,6vw,110px)}.brand{display:flex;gap:8px;align-items:center;padding:0}.brand>svg{width:36px;height:34px;stroke:none;color:var(--accent)}.brand b{letter-spacing:-1.6px;font:italic 900 28px/1 "Arial Black",Arial,sans-serif}.top nav,.right{display:flex;align-items:center}.top nav{align-self:stretch;gap:clamp(13px,2.4vw,40px)}.top nav button{height:100%;position:relative;padding:0 3px;font-size:14px;font-weight:630;color:var(--muted)}.top nav button.on{color:var(--fg)}.top nav button.on:after{content:'';position:absolute;bottom:0;left:2px;right:2px;background:var(--accent);height:3px}.right{margin-left:auto;gap:24px}.save-state{display:flex;align-items:center;gap:8px;color:#bcb9b2;font-size:12px}.save-state i{border-radius:50%;width:6px;height:6px;background:#b5c7a6}.icon-btn,.dialog-close{display:grid;place-items:center;width:40px;height:40px;border:1px solid var(--line);border-radius:7px;background:#242424}
.hero{position:relative;isolation:isolate;min-height:345px;height:clamp(345px,51.5vh,600px);overflow:hidden;background:#4a433b}.hero-art,.hero-shade{position:absolute;inset:0;width:100%;height:100%;z-index:-1}.hero-art{object-fit:cover;object-position:center 57%}.hero-shade{background:linear-gradient(90deg,rgba(12,14,15,.87),rgba(13,15,16,.59) 26%,transparent 64%),linear-gradient(0deg,#1012138a,transparent 18%)}.hero-body{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;padding-bottom:18px}.kicker{color:var(--accent);font:700 11px/1.4 var(--mono);letter-spacing:2.3px;display:flex;align-items:center;gap:10px}.kicker i{display:inline-block;width:22px;height:3px;transform:skewX(-25deg);background:var(--accent)}.hero h1{font-size:clamp(54px,6vw,105px);letter-spacing:-.055em;line-height:1.16;font-weight:900;margin:12px 0}.hero-sum{font-size:14px;line-height:1.8;letter-spacing:1px;color:#eee8e1}.hero-sum span{margin:0 8px;color:#c19b82}.hero-buttons{display:flex;gap:10px;margin-top:25px}.action,.glass,.secondary,.back{display:inline-flex;align-items:center;justify-content:center;gap:9px;border-radius:5px;font-weight:650}.action,.glass,.secondary{min-height:45px;padding:0 19px;font-size:14px}.action{background:var(--accent);color:#1d1713;border:1px solid #ff956d}.action svg{width:16px}.glass{border:1px solid #a29a8d9c;background:#201e1ba8;backdrop-filter:blur(5px)}.glass svg{width:17px}.hero-track{position:absolute;bottom:16px;left:var(--gutter);display:flex;align-items:center;gap:9px;color:#f2ede7;font-size:12px}.hero-track b{color:#ffa37d;font:700 12px var(--mono);background:#322820c9;border:1px solid #a6795e;border-radius:3px;padding:2px 6px}.hero-track i{height:1px;width:20px;background:#baab978c}.worlds{padding-top:clamp(22px,3.7vh,42px);padding-bottom:35px}.section-head{display:flex;justify-content:space-between;align-items:flex-end;gap:10px;margin-bottom:17px}.section-head h2{font-size:clamp(22px,2.1vw,35px);letter-spacing:-.035em;line-height:1.2;margin-top:4px}.section-head .kicker{font-size:10px;letter-spacing:1.8px}.section-head .kicker i{width:14px;height:2px}.section-head>span,.progress{color:var(--muted);font-size:13px}.progress{display:flex;align-items:center;gap:8px}.progress svg{width:15px;height:15px;color:var(--accent)}.progress strong{font:600 13px var(--mono);color:var(--fg)}.world-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:13px}.world-card{position:relative;border-radius:6px;overflow:hidden;display:flex;flex-direction:column;padding:0;text-align:left;border:1px solid var(--line);background:#242423}.world-card:hover,.world-card:focus-visible{border-color:var(--accent)}.world-photo{position:relative;height:clamp(95px,9vw,170px);width:100%;background:#333}.world-photo img,.map-banner>img{width:100%;height:100%;object-fit:cover}.world-photo:after{content:'';position:absolute;inset:0;background:linear-gradient(150deg,#0005,transparent 60%)}.chapter-no{position:absolute;z-index:1;top:9px;left:9px;border:1px solid #fff6;background:#1a1a19c9;color:white;border-radius:3px;padding:3px 6px;font:600 11px var(--mono);letter-spacing:1px}.world-copy{width:100%;padding:12px 14px 13px}.world-copy small,.showroom-info .kicker{color:#c6aea0;font:500 10px var(--mono);letter-spacing:1.5px}.world-copy h3{font-size:clamp(15px,1.42vw,24px);margin:4px 0 9px;line-height:1.2;letter-spacing:-.03em}.world-meter{display:flex;align-items:center;gap:8px;color:#b9b6b1;font:10px var(--mono)}.world-meter>i{display:block;flex:1;height:2px;background:#444340}.world-meter em{display:block;height:2px;background:var(--accent)}
.subpage{padding-top:27px;padding-bottom:40px}.subpage h1{font-size:clamp(32px,4vw,55px);letter-spacing:-.055em;line-height:1.16;margin:8px 0 0}.back{color:#d9d5ce;padding:6px 0 14px;font-size:13px}.back svg{width:15px}.map-banner{isolation:isolate;position:relative;overflow:hidden;border-radius:7px;border:1px solid var(--line);min-height:176px;display:flex;flex-direction:column;justify-content:center;padding:22px 32px;margin-bottom:25px}.map-banner:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,#151515e8,#15151588 52%,transparent);z-index:-1}.map-banner>img{position:absolute;inset:0;z-index:-2}.map-banner p,.showroom p,.setting-panel p{color:#c0bdb7;font-size:14px;line-height:1.65;margin:8px 0}.level-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}.level-card{min-height:95px;padding:12px;text-align:left;border:1px solid var(--line);border-radius:5px;background:#222}.level-card:hover,.level-card.current{border-color:var(--accent)}.level-card span{display:block;color:#beb8b0;font:11px var(--mono);letter-spacing:.6px}.level-card b{display:block;margin:6px 0;font-size:15px}.stars{font:600 13px Arial;letter-spacing:2px;color:#ffae64}.level-card small{font-size:11px;color:#aaa49e}.garage-layout{display:grid;grid-template-columns:minmax(0,1.04fr) minmax(0,1fr);gap:16px}.showroom,.setting-panel{background:#202121;border:1px solid var(--line);border-radius:8px;overflow:hidden}.showroom{position:sticky;align-self:start;top:10px}.showroom #carView{aspect-ratio:1.82;background:radial-gradient(ellipse at 50% 70%,#434441,#262728 75%);display:grid;place-items:center;overflow:hidden;touch-action:pan-y}.showroom img{width:100%;height:100%;object-fit:contain}.showroom-info{padding:20px 24px}.showroom-info h2{font-size:32px;margin:4px 0}.metrics{display:flex;gap:24px;margin:18px 0;font-size:12px;color:var(--muted)}.metrics strong{display:block;font:600 16px var(--mono);color:#ededed;margin-top:3px}.fleet-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;align-content:start}.fleet-card{background:#252627;border:1px solid #3c3d3d;border-radius:5px;padding:5px 8px 9px;text-align:left;min-width:0}.fleet-card img{width:100%;aspect-ratio:1.9;display:block;object-fit:contain}.fleet-card small{display:block;font-size:10px;color:#b5b1a9}.fleet-card b{display:block;font-size:14px}.fleet-card.selected{border-color:var(--accent);box-shadow:inset 0 -2px var(--accent)}.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.setting-panel{padding:22px 25px}.setting-panel h2{font-size:20px;margin-bottom:15px}.setting-panel h3,.setting-row{font-size:14px}.setting-panel h3{margin-bottom:8px}.segments{display:flex;gap:5px}.segments button,.secondary,select,.toggle{border:1px solid #494946;color:#eceae4;background:#323231;border-radius:5px}.segments button{flex:1;min-height:42px}.segments button.chosen,.toggle[aria-checked=true]{background:#4c3128;border-color:var(--accent);color:#ffab8f}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0}.setting-panel .secondary{min-height:38px}.toggle,select{padding:7px 12px;min-height:38px}.guide{grid-column:1/-1}.guide>div{display:flex;gap:20px;border-top:1px solid #363635;padding:10px 0;font-size:14px;line-height:1.6}.guide b{min-width:42px;color:#e8c5ae}.guide span{color:#c0bcb7}
#stage{position:fixed;inset:0;isolation:isolate;overflow:hidden;touch-action:none;background:#282c2b}#viewport,#viewport canvas{position:absolute;inset:0;width:100%;height:100%;display:block;touch-action:none}.orbit #viewport{cursor:grab}.dragging #viewport{cursor:grabbing}.drive-top{position:absolute;top:max(16px,env(safe-area-inset-top));left:max(18px,env(safe-area-inset-left));right:max(18px,env(safe-area-inset-right));display:flex;justify-content:space-between;align-items:flex-start;pointer-events:none}.objective,.round,.dashboard,#driveHint:not(:empty),#targetEdge,.touch button{background:#14191de0;border:1px solid #ffffff40;backdrop-filter:blur(5px);color:#f6f4f0}.objective{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:6px}.objective small{display:block;color:#cdcac4;font-size:10px;letter-spacing:.8px}.objective b{display:block;font-size:15px;margin-top:2px}.parking-sign{display:grid;place-items:center;color:#9af3d5;border:1px solid #9af3d5;border-radius:4px;font:600 17px var(--mono);width:25px;height:26px}.drive-actions,.pedals{display:flex;gap:8px}.round{width:44px;height:44px;display:grid;place-items:center;pointer-events:auto;border-radius:8px}.dashboard{position:absolute;left:20px;bottom:max(20px,env(safe-area-inset-bottom));display:flex;align-items:center;gap:12px;padding:8px 11px;border-radius:7px}.speed{white-space:nowrap;font-size:12px;min-width:55px}.speed b{font:italic 750 27px/1 Arial;margin-right:5px}.speed small{color:#c6c7c4}#gears{display:flex;gap:3px}#gears button{min-width:29px;min-height:29px;background:#313837;border:1px solid #ffffff30;border-radius:3px;font:650 13px var(--mono)}#gears button.active{background:var(--accent);color:#25180e;border-color:var(--accent)}#marker{position:absolute;transform:translate(-50%,-100%);pointer-events:none;color:#d4ffec;background:#113f33e3;border:1px solid #9df1cf;border-radius:4px;padding:4px 6px;font:600 12px var(--mono)}#marker:after{content:'';position:absolute;top:100%;left:50%;height:14px;border-left:1px solid #9df1cf}#targetEdge{position:absolute;right:18px;top:50%;padding:5px 8px;border-radius:4px;font-size:12px;pointer-events:none}#driveHint,#toast{position:absolute;pointer-events:none;left:50%;transform:translateX(-50%);font-size:13px;text-align:center;max-width:85%;width:max-content}#driveHint{bottom:23px;border-radius:4px}#driveHint:not(:empty){padding:8px 12px}#toast{top:20%;opacity:0;border-radius:4px;background:#181c1df2;padding:8px 12px}#toast.on{opacity:1}.touch{display:none}.touch-mode .touch{display:flex;align-items:flex-end;justify-content:space-between;position:absolute;inset:auto 18px max(15px,env(safe-area-inset-bottom));pointer-events:none}.touch button{pointer-events:auto;touch-action:none;user-select:none;-webkit-user-select:none}.touch #wheel{width:90px;height:90px;border:0;border-radius:50%;background:#171c1e95}.touch #wheel svg{width:76px;height:76px;stroke-width:1.45}.pedals{align-items:flex-end}.pedals button{border-radius:7px;width:52px;height:63px;font-size:14px}.pedals #gas{height:82px;color:#ffb49c}.pedals button.pressed{background:#986047}.touch-mode .dashboard{bottom:118px}.touch-mode #gears button{min-width:40px;min-height:40px}.touch-mode #driveHint{bottom:174px}dialog{border:1px solid #514a45;background:#232322;color:var(--fg);border-radius:9px;width:min(402px,calc(100% - 28px));padding:25px;max-height:88dvh;box-shadow:0 16px 60px #0008}dialog::backdrop{background:#0f1113a8;backdrop-filter:blur(4px)}.dialog-close{position:absolute;right:12px;top:12px;width:32px;height:32px}.dialog-close svg{width:16px}dialog h2{font-size:30px;margin:8px 0 14px}dialog p{font-size:14px;color:#ccc7bf;line-height:1.65;margin-bottom:14px}dialog .action,dialog .secondary{display:flex;width:100%;margin-top:8px}.results{display:grid;grid-template-columns:repeat(3,1fr);margin:16px 0;border-block:1px solid #484540;padding:13px 0}.results span{font-size:12px;color:var(--muted)}.results b{display:block;color:#fff;margin-top:4px;font:600 18px var(--mono)}#loading{position:fixed;inset:0;z-index:30;background:#121414df;display:flex;align-items:center;justify-content:center;gap:12px;font-size:16px}#loading i{width:20px;height:20px;border:2px solid #65615c;border-top-color:var(--accent);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
@media(max-width:840px){.world-grid{gap:8px}.world-copy{padding:9px}.world-copy small{font-size:9px;letter-spacing:.6px}.level-grid{grid-template-columns:repeat(4,1fr)}.fleet-grid{grid-template-columns:repeat(2,1fr)}.bar{gap:30px}.hero h1{font-size:58px}}
@media(max-width:630px){:root{--gutter:16px}.bar{height:55px;gap:15px}.brand svg{width:25px}.brand b{font-size:20px;letter-spacing:-.9px}.brand{gap:4px}.top nav{gap:11px}.top nav button{font-size:12px;padding:0}.save-state{display:none}.right{gap:0}.icon-btn{width:30px;height:34px}.hero{height:59svh;min-height:335px;max-height:480px}.hero-art{object-position:64% 46%}.hero-shade{background:linear-gradient(0deg,#111413e8,transparent 76%),linear-gradient(90deg,#14151655,transparent 65%)}.hero-body{justify-content:flex-end;padding-bottom:52px}.hero h1{font-size:49px;margin:7px 0}.hero-sum{font-size:12px;letter-spacing:.5px}.hero-sum span{margin:0 4px}.hero-buttons{margin-top:14px}.hero-track{bottom:14px}.world-grid{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding-bottom:8px}.world-card{flex:0 0 48%;scroll-snap-align:start}.world-photo{height:95px}.progress{font-size:11px}.worlds{padding-top:21px}.section-head{margin-bottom:12px}.world-copy h3{font-size:17px}.level-grid{grid-template-columns:repeat(3,1fr);gap:7px}.level-card{min-height:84px;padding:8px}.level-card b{font-size:13px}.map-banner{min-height:144px;padding:17px}.garage-layout{display:block}.showroom{position:relative;top:0;display:grid;grid-template-columns:1fr 1fr;margin-bottom:12px}.showroom #carView{height:100%;min-height:130px;aspect-ratio:auto}.showroom-info{padding:12px}.showroom-info h2{font-size:22px}.showroom-info p{font-size:12px;margin:4px 0}.metrics{gap:10px;margin:8px 0;font-size:10px}.metrics strong{font-size:12px}.showroom .action{padding:0 9px;min-height:36px}.fleet-grid{grid-template-columns:repeat(3,1fr)}.fleet-card b{font-size:13px}.settings-grid{grid-template-columns:1fr}.setting-panel{padding:18px}.subpage{padding-top:20px}.drive-top{left:12px;right:12px;top:12px}.dashboard{left:12px;bottom:12px}#driveHint{bottom:70px}.touch-mode #driveHint{bottom:177px}}
@media(max-height:480px) and (orientation:landscape){.hero{min-height:270px}.touch-mode .dashboard{bottom:15px;left:120px}.touch-mode #driveHint{bottom:70px}.touch-mode #wheel{width:78px;height:78px}.touch-mode #wheel svg{width:68px;height:68px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:2s!important}}
.home-account,.garage-account,.reward-line{display:flex;align-items:center;gap:16px}
.garage-account{flex-wrap:wrap;justify-content:flex-end;color:var(--muted);font-size:13px}
.coin-balance,.car-price,.reward-line b{color:#ffd490;font-variant-numeric:tabular-nums}
.coin-balance{font-size:14px;font-weight:700;white-space:nowrap}
.car-price{display:block;font-size:12px;margin-top:3px}
.reward-line{justify-content:space-between;gap:8px;margin-top:14px}
.reward-line span{color:var(--muted);font-size:13px}
.showroom .garage-hint:empty{display:none}
.showroom .action:disabled{background:#42403c;color:#d3cec4;cursor:default}
@media(max-width:620px){.home-account,.garage-account{flex-direction:column;align-items:flex-end;gap:2px}.coin-balance{font-size:13px}}
.valet-ticket{display:flex;align-items:center;gap:14px;border-block:1px solid var(--line);padding:12px 0;margin:15px 0}
.valet-ticket img{width:38%;max-width:160px;object-fit:contain}
.valet-ticket div{display:grid;gap:5px}.valet-ticket small{color:#e9bb86}.valet-ticket b{font-size:22px}.valet-ticket span{font-size:13px;color:var(--muted)}
#stage.receiving .dashboard,#stage.receiving .touch,#stage.receiving #marker,#stage.receiving #targetEdge,#stage.receiving #driveHint,#stage.receiving #camera{display:none}
#stage.receiving #viewport{cursor:default}
#handoff{position:absolute;left:50%;bottom:max(26px,env(safe-area-inset-bottom));transform:translateX(-50%);max-width:min(94vw,580px);text-align:center;z-index:4}
#guestSpeech:not(:empty){color:#fff7e7;background:#17201ee6;border:1px solid #ab9778;border-radius:7px;padding:10px 17px;line-height:1.5;margin-bottom:10px;min-width:min(74vw,350px)}

#driveHint.proximity{background:#4b2524f2;border-color:#e7a087;color:#fff1df}

#stage, #stage * {
  -webkit-user-select:none; user-select:none; -webkit-touch-callout:none;
}
#stage img { -webkit-user-drag:none; }
body.rotated-drive { overflow:hidden; }
.rotated-drive #stage, .rotated-drive #loading {
  inset:0 auto auto 100%;
  width:100vh; height:100vw; width:100dvh; height:100dvw;
  transform-origin:top left; transform:rotate(90deg);
}
.rotated-drive #dialog {
  position:fixed; inset:50% auto auto 50%; margin:0;
  transform:translate(-50%,-50%) rotate(90deg);
  width:min(402px,calc(100vh - 28px)); max-height:calc(100vw - 28px);
}
#stage {
  --drive-left:env(safe-area-inset-left,0px); --drive-right:env(safe-area-inset-right,0px);
  --drive-top:env(safe-area-inset-top,0px); --drive-bottom:env(safe-area-inset-bottom,0px);
}
.rotated-drive #stage {
  --drive-left:env(safe-area-inset-top,0px); --drive-right:env(safe-area-inset-bottom,0px);
  --drive-top:env(safe-area-inset-right,0px); --drive-bottom:env(safe-area-inset-left,0px);
}
.rotated-drive .drive-top {
  left:max(12px,var(--drive-left)); right:max(12px,var(--drive-right)); top:max(12px,var(--drive-top));
}
.rotated-drive #handoff { max-width:min(94vh,580px); bottom:max(26px,var(--drive-bottom)); }
.rotated-drive #guestSpeech:not(:empty) { min-width:min(74vh,350px); }
#gears img { display:none; }
.touch-mode #gears img { display:inline-block; width:18px; height:19px; vertical-align:middle; pointer-events:none; }
.touch-mode #gears button.active img { filter:brightness(.14); }
.touch-mode #gears button span { display:none; }
.touch-mode #gears button { min-width:44px; min-height:44px; touch-action:manipulation; }
.touch-mode #wheel { width:clamp(78px,20vmin,106px); height:clamp(78px,20vmin,106px); padding:0; }
.touch img { display:block; width:100%; height:100%; object-fit:contain; pointer-events:none; }
.touch .pedals { align-items:flex-end; gap:9px; }
.touch .pedals button { display:grid; place-items:center; padding:5px; border-radius:12px; }
.touch .pedals #brake { width:76px; height:58px; }
.touch .pedals #gas { width:52px; height:86px; }
.touch .pedals button.pressed { background:#4d342b; border-color:#ff976b; }
.touch .pedals button.pressed img { transform:translateY(2px) scale(.94); }
  .touch-mode .touch { left:max(12px,var(--drive-left)); right:max(12px,var(--drive-right)); bottom:max(10px,var(--drive-bottom)); }
  .touch-mode .dashboard { left:50%; transform:translateX(-50%); bottom:max(10px,var(--drive-bottom)); padding:4px 7px; gap:8px; }
  .touch-mode #driveHint { bottom:calc(max(10px,var(--drive-bottom)) + 60px); }
@media (orientation:landscape) and (max-width:660px), (orientation:portrait) and (max-height:660px) {
  .touch-mode .dashboard { left:46%; gap:4px; }
  .touch-mode .dashboard .speed { min-width:38px; }
  .touch-mode .speed b { font-size:20px; }
  .touch-mode .speed small { display:block; font-size:9px; }
}

.site-footer { padding: 16px 18px calc(20px + env(safe-area-inset-bottom)); text-align: center; font-size: 13px; }
.site-footer a { display: inline-block; padding: 8px 4px; color: var(--muted); text-underline-offset: 3px; }
.site-footer a:hover { color: var(--fg); }
.site-footer a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
