:root{font-family:'Segoe UI',Arial,sans-serif;color:#f4f2fa;background:#111828;font-synthesis:none;--lavender:#cab5f5;--muted:#b8c0d3;--line:#ffffff17;--side:clamp(280px,26vw,370px)}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;touch-action:manipulation}button:disabled{opacity:.48;cursor:default}button:focus-visible,a:focus-visible{outline:3px solid #efd39d;outline-offset:3px}[hidden]{display:none!important}a{color:inherit}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.game{height:100%;height:100dvh;display:grid;grid-template-columns:minmax(0,1fr) var(--side);grid-template-rows:72px minmax(0,1fr);gap:0 14px;padding:0 max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));background:radial-gradient(ellipse at 90% 30%,#282c45,#111828 70%)}
.hud{grid-column:1/-1;display:flex;align-items:center;gap:12px;min-width:0}.icon{display:grid;place-items:center;flex:none;width:44px;height:44px;border:1px solid #ffffff24;border-radius:12px;background:#ffffff05;color:#ebe7f6;text-decoration:none;font-size:22px}.icon:hover:not(:disabled){background:#ffffff12}.brand{min-width:0}.brand>span{display:block;font-size:8px;letter-spacing:2px;color:#a9b4c9}.brand strong{display:block;font-size:20px;font-weight:650;margin-top:3px;white-space:nowrap}.brand i{font-style:normal;color:#efd39d;margin-left:5px}.route{width:min(24vw,280px);min-width:32px;margin-left:auto;margin-right:10px}.route>div{display:flex;justify-content:space-between;gap:8px;font-size:10px;margin-bottom:6px;color:#bac4d8}.route>div span:last-child{white-space:nowrap;color:#919cb2}progress{display:block;width:100%;height:4px;appearance:none;border:0;border-radius:4px;overflow:hidden;background:#ffffff1a}progress::-webkit-progress-bar{background:#ffffff1a}progress::-webkit-progress-value{background:var(--lavender)}progress::-moz-progress-bar{background:var(--lavender)}
.scene-view{position:relative;display:grid;place-items:center;min-width:0;min-height:0;overflow:hidden;border-radius:22px;background:#0b101b;isolation:isolate;box-shadow:0 18px 60px #0002}.scene-frame{position:relative;width:var(--frame-width,100%);height:var(--frame-height,100%);overflow:hidden;isolation:isolate;background:#152232}.road-video,.still{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:contain}.still{pointer-events:none}.vignette{position:absolute;inset:0;pointer-events:none;background:linear-gradient(#1838450c,transparent 20%,transparent 75%,#14203420)}.scene-label{position:absolute;top:18px;left:18px;color:#334346;font-size:8px;letter-spacing:1.7px;font-weight:700;background:#f5f1e1bd;padding:8px 11px;border-radius:20px;pointer-events:none}.scene-label>span{display:inline-block;background:#6b8f5d;width:5px;height:5px;border-radius:50%;margin-right:7px}.loading{position:absolute;top:18px;right:18px;border-radius:20px;padding:8px 12px;background:#172033ed;color:#eee8fb;font-size:11px;box-shadow:0 2px 12px #0002}.cockpit{position:absolute;left:0;right:0;bottom:0;aspect-ratio:1672 / 941;pointer-events:none}.dashboard{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.wheel{position:absolute;width:38%;max-width:none;left:8.5%;bottom:-17.4%;transform-origin:50% 51.5%;pointer-events:none;will-change:transform}
.sidebar{min-width:0;min-height:0;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:22px;background:#172033;overflow:hidden}.side-scroll{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#6b6485 transparent;padding:28px 24px;display:flex;flex-direction:column;justify-content:safe center}.card,.question,.drive-info{width:100%;flex-shrink:0}.eyebrow{font-size:9px;line-height:1.5;font-weight:700;letter-spacing:1.6px;color:var(--lavender)}.card h1{font-size:clamp(27px,2.6vw,37px);font-weight:650;line-height:1.12;letter-spacing:-1px;margin:16px 0}.card p,.drive-info>p{color:var(--muted);font-size:14px;line-height:1.65;margin:0 0 20px}.facts{display:flex;flex-wrap:wrap;gap:7px;margin:18px 0}.facts span{font-size:10px;border:1px solid #ffffff1c;border-radius:20px;padding:6px 10px;color:#c7cedc}.primary{display:block;width:100%;min-height:46px;padding:12px 14px;border:1px solid transparent;border-radius:12px;background:var(--lavender);color:#211b32;font-size:14px;line-height:1.4;font-weight:700}.primary:hover:not(:disabled){background:#dfcef9}.card small{display:block;font-size:11px;color:#939eb6;line-height:1.65;margin-top:17px}.side-footer{flex:none;border-top:1px solid var(--line);padding:14px;text-align:center;font-size:8px;letter-spacing:1.5px;color:#8a96ad;text-transform:uppercase}.question-heading{display:flex;align-items:center;gap:12px;margin-bottom:17px}.sign-card{width:68px;flex:none;text-align:center}.sign-card img{display:block;width:100%;aspect-ratio:1}.sign-card>span{display:block;font-size:9px;letter-spacing:1px;color:#9da8bd;margin-top:3px}.question h2{font-size:23px;line-height:1.2;letter-spacing:-.4px;margin:7px 0 0;font-weight:650}.question>p{color:#cbd0de;font-size:14px;line-height:1.55;margin:0 0 16px}.answers{display:grid;gap:8px}.answers button{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:12px 11px;min-height:46px;border:1px solid #ffffff20;border-radius:11px;background:#ffffff04;color:#f0eef7;font-size:13px;line-height:1.4}.answers button>span{flex:none;font-size:10px;color:#c5b1ee}.answers button:hover:not(:disabled){background:#cab5f513;border-color:#cab5f5}.question .feedback{font-size:13px;margin:14px 0 0;line-height:1.55}.feedback:empty{display:none}.question .feedback.error{color:#ffc1ac}.question .feedback.correct{color:#d1e7c5}.question .primary{margin-top:16px}.question small{display:block;font-size:10px;color:#8e9cb5;line-height:1.6;margin-top:12px}.question small:empty{display:none}.drive-info h2{font-size:30px;line-height:1.17;letter-spacing:-.7px;margin:12px 0 20px}.drive-divider{height:1px;background:var(--line);margin:26px 0}.drive-info .quiet{font-size:12px;color:#94a3bc}.results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:20px 0}.results strong{display:block;font-size:29px;color:#e0d1fb}.results span{display:block;font-size:10px;line-height:1.45;color:#aab6cd;margin-top:5px}
.rotate{position:fixed;inset:0;z-index:100;display:none;align-items:center;justify-content:center;flex-direction:column;text-align:center;padding:28px;background:radial-gradient(ellipse at 50% 20%,#303452,#101628 65%)}.rotate h2{font-size:30px;letter-spacing:-1px;margin:16px 0}.rotate p{line-height:1.65;color:#c8c7db;font-size:15px;margin:0}.rotate small{font-size:12px;color:#929db8;max-width:285px;line-height:1.6;margin-top:20px}.rotate a{color:#d7c4ff;font-size:13px;text-decoration:none;margin-top:30px;min-height:44px;padding:12px}.phone-turn{font-size:88px;position:relative;color:#ccb6ff;width:130px;height:125px;margin-bottom:25px}.phone-turn span{position:absolute;left:46px;top:30px;width:38px;height:68px;border:3px solid #cbb6ff;border-radius:9px;transform:rotate(-90deg)}.game.portrait{visibility:hidden}.rotate.visible{display:flex}@media(orientation:portrait){.rotate{display:flex}.game{visibility:hidden}}
@media(max-height:560px) and (orientation:landscape){:root{--side:clamp(255px,32vw,330px)}.game{grid-template-rows:52px minmax(0,1fr);gap:0 9px;padding:0 max(9px,env(safe-area-inset-right)) max(9px,env(safe-area-inset-bottom)) max(9px,env(safe-area-inset-left))}.hud{gap:7px}.icon{border-radius:10px}.brand strong{font-size:16px}.brand>span{font-size:6px;letter-spacing:1.4px}.route{width:20vw;margin-right:4px}.route>div{font-size:8px;margin-bottom:4px}.scene-view,.sidebar{border-radius:15px}.scene-label{top:10px;left:10px;font-size:6px;padding:6px 9px;letter-spacing:1.2px}.loading{top:10px;right:10px;font-size:9px;padding:6px 9px}.side-scroll{padding:13px}.eyebrow{font-size:7px;letter-spacing:1.2px}.card h1{font-size:25px;margin:10px 0;line-height:1.1}.card p,.drive-info>p{font-size:11px;line-height:1.5;margin-bottom:12px}.facts{margin:10px 0;gap:6px}.facts span{font-size:8px;padding:5px 8px}.primary{min-height:44px;padding:10px 12px;font-size:12px}.card small{font-size:9px;margin-top:10px;line-height:1.5}.side-footer{display:none}.question-heading{gap:9px;margin-bottom:9px}.sign-card{width:46px}.sign-card>span{font-size:7px;margin-top:0}.question h2{font-size:16px;line-height:1.2;margin-top:4px;letter-spacing:-.2px}.question>p{font-size:11px;line-height:1.4;margin-bottom:9px}.answers{gap:5px}.answers button{font-size:11px;line-height:1.3;min-height:44px;padding:9px;gap:7px;border-radius:9px}.answers button>span{font-size:8px}.question .feedback{font-size:11px;line-height:1.4;margin-top:9px}.question .primary{margin-top:12px}.question small{font-size:8px;margin-top:9px}.drive-info h2{font-size:24px;margin:9px 0 12px}.drive-divider{margin:15px 0}.drive-info .quiet{font-size:10px;line-height:1.4}.results{gap:9px;margin:12px 0}.results strong{font-size:23px}.results span{font-size:8px}}
@media(max-width:740px) and (orientation:landscape){:root{--side:250px}.brand>span,.brand i{display:none}.brand strong{font-size:14px}.route{width:auto;flex:1}.route>div span:last-child{display:none}.hud{gap:6px}.side-scroll{padding:11px}.scene-label{display:none}.card h1{font-size:24px}.exit{display:none}}
@media(max-height:340px){.card h1{font-size:22px}.question-heading{gap:8px}.question h2{font-size:15px}.scene-label{display:none}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
.rotate .primary{max-width:260px;min-height:46px;margin-top:24px}.rotate #rotateStatus{margin-top:12px}

/* Chapter controls stay outside the complete road frame. */
:root{--side:clamp(320px,30vw,430px)}.question>h2{font-size:25px;margin:13px 0 18px}.question .question-hint{font-size:12px;color:#aab6cd}.answers button{min-height:52px}.replay-controls{display:flex;gap:8px;padding:12px 18px;border-top:1px solid var(--line);flex:none}.replay-controls button{min-height:44px;flex:1;padding:9px;border:1px solid #ffffff24;border-radius:10px;background:#ffffff04;color:#dcd8eb;font-size:12px}.replay-controls button:hover:not(:disabled){background:#cab5f515;border-color:#cab5f5}.hazard-status{display:flex;align-items:center;gap:10px;padding:10px 18px;background:#e7b36a0a;border-top:1px solid #e7b36a24;font-size:10px;line-height:1.45;color:#e6c38c;flex:none}.hazard-status>span:first-child{white-space:nowrap;font-size:15px;letter-spacing:3px}.rule-link{display:inline-block;color:#d7c4fb;font-size:12px;line-height:1.5;padding:9px 0;min-height:36px;text-underline-offset:4px}.card .history{font-size:11px;color:#99a8c0;margin:16px 0 0;line-height:1.5}.card .original-label{font-size:10px;text-transform:uppercase;letter-spacing:1.2px;color:var(--lavender);margin:16px 0 8px}.original-question{font-size:20px;line-height:1.35;font-weight:550;margin:0 0 12px}.card .correct-answer{font-size:14px;color:#d2e4c8;padding-left:12px;border-left:2px solid #96b58b;line-height:1.6}.card .save-status{font-size:11px;line-height:1.5;color:#aeb9cc;margin:0 0 16px}.question .feedback{margin:14px 0 6px}.wheel{transform:rotate(0deg)}
@media(max-height:560px) and (orientation:landscape){:root{--side:clamp(285px,36vw,350px)}.question>h2{font-size:19px;margin:8px 0 11px}.question .question-hint{font-size:10px;margin-bottom:10px}.answers button{font-size:11px;min-height:46px;padding:10px}.replay-controls{padding:7px 10px;gap:6px}.replay-controls button{font-size:10px;padding:7px;min-height:44px}.hazard-status{font-size:9px;padding:7px 11px;gap:7px}.rule-link{font-size:10px;padding:8px 0;min-height:32px}.card .history{font-size:9px;margin-top:10px}.original-question{font-size:17px}.card .correct-answer{font-size:11px}.card .save-status{font-size:9px;margin-bottom:10px}.card .original-label{font-size:8px}.results{grid-template-columns:repeat(2,minmax(0,1fr))}.card h1{font-size:25px}}
@media(max-width:740px) and (orientation:landscape){:root{--side:270px}.brand strong{font-size:12px}.route>div span:last-child{display:none}}

/* The completed desktop card presents its result and next action at once. */
.game[data-phase="finished"] .side-scroll{padding:20px 24px}
#finish h1{font-size:28px;line-height:1.12;margin:10px 0}
#finish .original-label{font-size:9px;margin:12px 0 7px}
#finish .original-question{font-size:18px;line-height:1.35;margin:0 0 10px}
#finish .correct-answer{font-size:13px;line-height:1.5;margin:0 0 10px}
#finish .results{grid-template-columns:repeat(2,minmax(0,1fr));margin:12px 0}
#finish .results strong{font-size:25px}
#finish .save-status{margin:0 0 12px}
@media(max-height:560px) and (orientation:landscape){.game[data-phase="finished"] .side-scroll{padding:13px}#finish h1{font-size:25px}#finish .original-question{font-size:17px}#finish .correct-answer{font-size:11px}}
.step-results{list-style:none;padding:0;margin:16px 0;display:grid;gap:12px;counter-reset:decision}
.step-results li{position:relative;padding:0 0 0 30px;color:#d7dfd3;font-size:14px;line-height:1.55;counter-increment:decision}
.step-results li:before{content:counter(decision);position:absolute;left:0;top:0;color:var(--lavender);font-size:12px;font-weight:700}
.step-results small{display:block;margin-top:4px;font-size:10px;color:#99a8c0}
#continueNote{margin-top:10px}
@media(max-height:560px) and (orientation:landscape){.step-results{margin:12px 0;gap:10px}.step-results li{font-size:11px;line-height:1.5;padding-left:24px}.step-results small{font-size:9px}.question>h2{font-size:17px;line-height:1.25}.question .question-hint{font-size:9px}}
@media(max-height:560px) and (orientation:landscape){#answers{grid-template-columns:repeat(2,minmax(0,1fr))}#answers button{justify-content:center;text-align:center;padding:9px 7px}}
