:root{font-family:Arial,Helvetica,sans-serif;background:#e9eeea;color:#193a39;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;border:0;cursor:pointer;font-weight:700}button:disabled{opacity:.45;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #e9b85d;outline-offset:3px}nav{height:62px;display:flex;align-items:center;justify-content:space-between;background:#123638;color:#f3f5e9;padding:0 4%;gap:12px}nav a{text-decoration:none;color:inherit}.back{font-size:12px;color:#bbd0c8}nav .brand{letter-spacing:2px;font-size:18px;font-weight:900}nav .brand i{display:inline-block;width:9px;height:9px;background:#c5e999;border-radius:50%;margin-right:12px;box-shadow:0 0 0 5px #c5e99910}nav small{font-size:8px;letter-spacing:1.5px;color:#91b2a8;margin-left:12px}nav>div{display:flex;gap:7px}nav button{background:#2a4b48;color:#e9f0e6;border-radius:8px;padding:10px 12px;font-size:11px}main{max-width:1520px;padding:22px 30px 28px;margin:auto}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:19px}header p{font-size:9px;font-weight:700;letter-spacing:2px;color:#68857a;margin:0 0 9px}h1{font-size:clamp(23px,2.8vw,35px);letter-spacing:-1px;margin:0;font-weight:800}h1 em{font-style:normal;font-weight:400;color:#4c7864}.route-meta{display:flex;align-items:center;gap:13px;font-size:11px;color:#6c8278}.route-meta b{font-size:24px;color:#2b4b40}.map-badge{border:1px solid #c1d1c5;border-radius:5px;padding:6px 8px;font-size:8px;font-weight:700;letter-spacing:1px}.game-shell{background:#dbe5dd;border-radius:18px;overflow:hidden;box-shadow:0 16px 50px #183b3114}.cockpit{height:clamp(530px,71vh,830px);position:relative;background:#b4cfd9;isolation:isolate}#world{display:block;width:100%;height:100%}.hud{position:absolute;top:18px;left:18px;display:flex;gap:6px}.hud>div{min-width:83px;padding:12px 16px;border-radius:11px;background:#153638ee;backdrop-filter:blur(8px);color:#eef3e5;border:1px solid #b3d6c31a}.hud small{display:block;font-size:8px;letter-spacing:1px;color:#a1bdb0}.hud b{display:block;font-size:31px;font-variant-numeric:tabular-nums;margin-top:2px}.route{position:absolute;top:18px;right:18px;width:290px;display:flex;gap:16px;padding:16px 18px 20px;border-radius:12px;background:#f9faf2f2;box-shadow:0 5px 20px #1b392e16;border:1px solid #fff8;overflow:hidden}.route #navArrow{font-size:53px;font-weight:bold;line-height:1;color:#19644f;align-self:center}.route>div>strong,.route>div>span{display:block}.route b{font-size:25px;font-variant-numeric:tabular-nums}.route strong{font-size:13px;margin:3px 0}.route #street{font-size:10px;color:#5b756c;line-height:1.4}.route .route-line{position:absolute;bottom:0;left:0;right:0;height:4px;background:#dce7dd}.route-line i{display:block;height:100%;background:#57b795}.route.soon{background:#e6f5da}.signal{position:absolute;top:117px;left:18px;padding:8px 11px;border-radius:7px;background:#153638de;color:#e5efe6;font-size:10px}.notice{position:absolute;top:154px;left:18px;max-width:340px;padding:12px 15px;border-radius:10px;background:#fbfaf1f0;border-left:3px solid #3d9973;box-shadow:0 5px 25px #21392b15;pointer-events:none}.notice[hidden]{display:none}.notice b,.notice span{display:block}.notice b{font-size:13px}.notice span{font-size:11px;line-height:1.6;margin-top:4px;color:#48625a}.notice.warning{border-left-color:#e27951}.notice.warning b{color:#a6432c}.map-box{position:absolute;right:18px;bottom:70px;width:200px;border-radius:12px;overflow:hidden;background:#15363bed;border:1px solid #e5f7e730;box-shadow:0 6px 25px #18302b20}.map-box>div{display:flex;justify-content:space-between;padding:9px 11px;color:#b0c8bc;font-size:8px;letter-spacing:1px}.map-box canvas{display:block;width:100%;height:auto}.map-box>a{display:block;font-size:8px;color:#a3c0b6;padding:4px 9px 7px;text-decoration:none}.view-tools{position:absolute;bottom:76px;left:18px;display:flex;gap:6px}.view-tools button{padding:10px 12px;border-radius:7px;background:#153638e6;color:#e7f0e4;font-size:10px}.dashboard{position:absolute;bottom:16px;left:18px;right:18px;display:flex;align-items:center;justify-content:space-between;background:#153638e8;color:#dbe9d9;border:1px solid #d2e8dc15;border-radius:10px;padding:7px 14px;font-size:9px;letter-spacing:.6px}.dashboard #indicator{width:140px;color:#aee9aa}.limit{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;border:3px solid #d05b49;background:#fcf8e8;color:#243c3b;font-size:18px;font-weight:bold;letter-spacing:0}.cover{position:absolute;inset:0;z-index:3;display:flex;align-items:center;justify-content:flex-start;padding:clamp(20px,4vw,64px);background:linear-gradient(90deg,#132e39c9,transparent 87%)}.cover[hidden]{display:none}.welcome{width:410px;max-width:100%;max-height:100%;overflow:auto;padding:28px;border:1px solid #e7eddf44;border-radius:16px;background:#f7f9f0f2;box-shadow:0 20px 80px #081d3433}.eyebrow{font-size:9px;color:#558373;letter-spacing:2px}.welcome h2{font-size:40px;line-height:1.1;letter-spacing:-1px;margin:18px 0}.welcome p{font-size:12px;line-height:1.75;color:#567066}.trip{display:flex;flex-wrap:wrap;gap:7px;align-items:center;padding:12px 0 18px;font-size:9px;color:#346353}.trip i{color:#90a495;font-style:normal}.welcome button{width:100%;border-radius:9px;padding:15px;margin-bottom:7px;font-size:12px}#start{background:#1c5945;color:#f0f7e7;display:flex;justify-content:space-between}#summary{font-size:11px;line-height:1.8}.welcome .keys{font-size:9px;color:#748579;text-align:center;margin-bottom:0}.controls{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 18px;background:#dfe8df}.controls>div{display:flex;gap:7px}.controls button{touch-action:none;user-select:none;min-height:50px;border-radius:9px;padding:12px 20px;background:#cadbcf;color:#214837;font-size:11px;box-shadow:inset 0 -3px #203d2610}.controls .steering button{font-size:23px;min-width:63px}.controls .gas{background:#b5dc84;min-width:96px}.controls .brake{background:#e5c5b5}.controls button.pressed,.controls button:active{background:#275d49;color:white;box-shadow:inset 0 3px #14362530}.controls .blinkers button{font-size:10px}footer{display:flex;justify-content:space-between;padding:14px 2px;font-size:10px;color:#648071}footer b{color:#244d3d;margin-left:7px}details{margin-top:8px;font-size:11px;line-height:1.8;color:#587264}summary{cursor:pointer;font-weight:700}.details-grid{display:grid;grid-template-columns:1fr 1fr;gap:30px}details h3{color:#254d3c}details a{color:#326e5b}.credits{border-top:1px solid #d0dcd2;padding-top:12px;font-size:10px}.game-shell:fullscreen{border-radius:0;height:100%;display:flex;flex-direction:column}.game-shell:fullscreen .cockpit{flex:1;height:auto}.game-shell:fullscreen .controls{flex:0 0 auto}
@media(max-width:700px){nav{height:53px;padding:0 12px}.back{font-size:0}.back:before{content:'←';font-size:20px}nav .brand{font-size:14px;letter-spacing:1px}nav small{display:none}nav>div{gap:4px}nav button{padding:9px 8px;font-size:9px}nav #sound{display:none}main{padding:13px 9px}header{margin-bottom:12px}header p{font-size:8px;letter-spacing:1px;margin-bottom:5px}h1{font-size:22px;letter-spacing:-.7px}h1 em{display:block}.route-meta{display:none}.game-shell{border-radius:13px}.cockpit{height:70svh;min-height:480px;max-height:700px}.hud{left:9px;top:10px;gap:4px}.hud>div{min-width:58px;padding:8px 10px}.hud b{font-size:24px}.hud small{font-size:7px}.route{top:10px;right:9px;width:calc(100% - 150px);min-width:169px;gap:9px;padding:10px 11px 14px}.route #navArrow{font-size:38px}.route b{font-size:20px}.route strong{font-size:10px}.route #street{font-size:9px}.signal{left:9px;top:88px;padding:7px 9px;font-size:9px}.notice{top:123px;left:9px;right:9px;max-width:none;padding:9px 12px}.notice b{font-size:11px}.notice span{font-size:10px}.map-box{width:128px;right:9px;bottom:67px;border-radius:9px}.map-box>div{padding:6px 8px;font-size:6px}.map-box>a{font-size:6px;padding:4px 5px}.view-tools{left:9px;bottom:71px;flex-direction:column;gap:5px}.view-tools button{font-size:8px;padding:9px}.dashboard{left:9px;right:9px;bottom:11px;padding:6px 10px;font-size:7px;letter-spacing:0}.dashboard #indicator{width:96px}.limit{height:30px;width:30px;font-size:15px}.cover{padding:16px;background:#14334470;justify-content:center}.welcome{padding:20px;background:#f7f9f0f5;border-radius:12px}.welcome h2{font-size:32px;margin:13px 0}.welcome p{font-size:11px}.trip{font-size:8px;gap:5px;padding:5px 0 14px}.welcome button{padding:13px}.welcome .keys{font-size:8px}.controls{flex-wrap:wrap;padding:10px;gap:9px}.controls .steering{order:1}.controls .pedals{order:2}.controls .blinkers{order:3;width:100%;justify-content:center}.controls button{min-height:46px;padding:10px 13px;font-size:9px}.controls .steering button{min-width:49px;font-size:21px}.controls .gas{min-width:73px}.controls .blinkers button{font-size:9px;min-height:35px}.details-grid{grid-template-columns:1fr;gap:3px}footer{font-size:9px}.game-shell:fullscreen .cockpit{min-height:0}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.dashboard #lessonOpen{background:#e4efcf;color:#234739;border-radius:6px;padding:8px;font-size:9px}.lesson-recap{display:flex;gap:20px;align-items:center;justify-content:space-between;background:#f9fbf4;border:1px solid #c8d8c9;border-radius:14px;margin-top:16px;padding:20px}.lesson-recap small{font-size:9px;letter-spacing:1px;color:#ab613c}.lesson-recap h2{font-size:17px;margin:8px 0}.lesson-recap p{font-size:12px;line-height:1.7;margin:0;color:#536d61}.lesson-recap button{flex-shrink:0;background:#215840;color:#fff;border-radius:8px;padding:12px}#lessonDialog{width:min(620px,92vw);max-height:80vh;border:0;border-radius:18px;padding:24px;color:#193a39;background:#f8faf4}#lessonDialog::backdrop{background:#102d38b8;backdrop-filter:blur(5px)}.lesson-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.lesson-dialog-heading h2{font-size:21px}.lesson-dialog-heading button{padding:10px;border-radius:50%;background:#dce8dd}.lesson-dialog-hint{font-size:12px;color:#607c6b}#lessonHistory article{border-top:1px solid #d5dfd1;padding:12px 0}#lessonHistory h3{font-size:15px}#lessonHistory p{font-size:13px;line-height:1.7}#lessonHistory p:last-child{background:#e5efdc;padding:12px;border-radius:8px}@media(max-width:700px){.lesson-recap{padding:15px;display:block}.lesson-recap button{margin-top:12px}.dashboard #mode{display:none}.dashboard #lessonOpen{font-size:8px;padding:7px}.lesson-recap h2{font-size:15px}}

/* Keep held driving controls from opening iOS text selection/callout. */
.controls,.controls button,.controls button *{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.controls button{touch-action:none}

/* Native fullscreen where supported, viewport-filling fallback for mobile Safari. */
.screen-tools,.rotate-hint{display:none}body.game-expanded{overflow:hidden;overscroll-behavior:none}.game-shell.expanded{position:fixed;inset:0;z-index:1000;width:100%;height:100dvh;border-radius:0;display:flex;flex-direction:column;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}.game-shell.expanded .cockpit{flex:1;min-height:0;max-height:none;height:auto}.game-shell.expanded .controls{flex:0 0 auto}.expanded .screen-tools{display:flex;position:absolute;top:calc(8px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);gap:5px;z-index:5;white-space:nowrap}.screen-tools button{background:#153638ed;color:#f3f6e8;border-radius:8px;padding:10px;font-size:10px;touch-action:manipulation}.expanded .cover{padding-top:55px}
@media(orientation:portrait){.expanded .rotate-hint{display:block;position:absolute;left:50%;top:calc(52px + env(safe-area-inset-top));transform:translateX(-50%);z-index:5;background:#fff4d7;color:#364c3e;padding:8px 12px;border-radius:8px;font-size:12px;white-space:nowrap}.expanded .hud,.expanded .route{top:95px}.expanded .signal{top:178px}.expanded .notice{top:214px}}
@media(orientation:landscape) and (max-height:600px){.expanded .hud{top:8px;left:10px}.expanded .hud>div{min-width:50px;padding:6px 9px}.expanded .hud b{font-size:22px}.expanded .route{top:8px;right:10px;width:210px;min-width:0;padding:8px 10px 12px;gap:10px}.expanded .route #navArrow{font-size:30px}.expanded .route b{font-size:19px}.expanded .route strong{font-size:10px}.expanded .route #street{font-size:9px}.expanded .signal{top:73px;left:10px;font-size:9px;padding:6px}.expanded .notice{top:105px;left:10px;right:auto;width:255px;padding:7px 10px}.expanded .notice b{font-size:11px}.expanded .notice span{font-size:10px}.expanded .map-box{width:100px;bottom:49px;right:10px}.expanded .map-box>div{display:none}.expanded .map-box>a{font-size:6px}.expanded .view-tools{bottom:51px;left:10px;flex-direction:row}.expanded .view-tools button{font-size:9px;padding:8px}.expanded .dashboard{left:10px;right:10px;bottom:5px;padding:4px 9px;font-size:8px}.expanded .dashboard #mode{display:none}.expanded .limit{height:26px;width:26px;font-size:14px}.expanded .controls{flex-wrap:nowrap;padding:6px 10px;gap:8px}.expanded .controls .steering{order:0}.expanded .controls .blinkers{order:1;width:auto}.expanded .controls .pedals{order:2}.expanded .controls button{min-height:44px;padding:8px 12px;font-size:10px}.expanded .controls .steering button{min-width:52px;font-size:23px}.expanded .controls .gas{min-width:82px}.expanded .welcome{width:440px;padding:12px 20px}.expanded .welcome h2{font-size:23px;margin:6px 0}.expanded .welcome p{font-size:10px;margin:6px 0}.expanded .welcome .trip,.expanded .welcome .keys,.expanded .welcome .eyebrow{display:none}.expanded .welcome button{padding:10px;margin:0}}

.route-choice{display:block;font-size:12px;font-weight:700;margin:12px 0 6px}.route-choice select{display:block;width:100%;margin-top:7px;border:1px solid #b4cabc;background:#fff;color:#193a39;border-radius:8px;padding:12px 8px;font:inherit}.welcome .route-description{font-size:11px;line-height:1.6}.welcome .route-data-note{font-size:9px;color:#6b796d;line-height:1.5}
