:root{font-family:Arial,"Noto Sans JP","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;color:#f4f8e9;background:#cbded7;font-synthesis:none;--lime:#d8ff82;--dark:#162d27;--panel:rgb(22 45 39 / 30%)}*{box-sizing:border-box}body{margin:0;overflow:hidden}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:default}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--lime);outline-offset:4px}button{color:inherit}a{color:inherit}#game{height:100svh;min-height:0;position:relative;overflow:hidden}#scene{position:absolute;inset:0}canvas{display:block;width:100%;height:100%}.vignette{position:absolute;inset:0;background:linear-gradient(#17332d4d,transparent 32%,transparent 65%,#142b2a66);pointer-events:none}header{position:absolute;left:0;right:0;top:0;display:flex;align-items:center;justify-content:space-between;padding:22px 28px;z-index:2}.brand{text-decoration:none;font-size:23px;font-weight:900;letter-spacing:-.06em;line-height:1.1;text-shadow:0 2px 8px #24393466}.brand span{display:block;font-size:8px;font-weight:500;letter-spacing:.13em;margin-top:5px}.top-actions{display:flex;gap:7px}.top-actions button{background:#1c372dc9;border:1px solid #ebf3dc3b;border-radius:20px;padding:9px 13px;font-size:10px;backdrop-filter:blur(12px)}.top-actions #pause{width:34px;padding:0;font-size:14px}.hud{position:absolute;top:99px;left:28px;display:flex;gap:22px;align-items:center;background:var(--panel);border:1px solid #fff3;border-radius:16px;padding:17px 22px;backdrop-filter:blur(16px);box-shadow:0 6px 25px #233e2026}.speed{min-width:64px}.speed strong{font-size:38px;display:block;font-weight:700;font-variant-numeric:tabular-nums;line-height:1}.speed>span{font-size:10px;opacity:.6;letter-spacing:.1em}.gap{width:138px}.gap>div:first-child{display:flex;justify-content:space-between;align-items:center;font-size:10px}.gap strong{font-size:14px;color:var(--lime);font-variant-numeric:tabular-nums}.meter{height:5px;background:#ffffff25;border-radius:8px;margin-top:10px;overflow:hidden}.meter i{display:block;width:100%;height:100%;background:var(--lime);transition:background .3s}.gap p{font-size:9px;margin:7px 0 0;opacity:.7}.score{border-left:1px solid #e0edce33;padding-left:19px}.score span{display:block;font-size:8px;letter-spacing:.12em;opacity:.6}.score strong{display:block;font-size:24px;font-variant-numeric:tabular-nums;margin-top:4px}.route{position:absolute;top:210px;left:30px;width:323px;height:3px;background:#f0f8e736}.route i{position:absolute;top:0;left:0;height:100%;background:var(--lime);width:0}.route>span{position:absolute;top:9px;font-size:9px;text-shadow:0 1px 4px #162d27}.route>span:last-child{right:0}.flow{position:absolute;top:100px;right:28px;width:260px;background:var(--panel);border:1px solid #d8ff8244;backdrop-filter:blur(16px);border-radius:16px;padding:17px 19px;box-shadow:0 0 0 0 #d8ff8200;transition:box-shadow .35s}.flow-top{display:flex;align-items:center;gap:8px}.flow-dot{width:6px;height:6px;border-radius:50%;background:var(--lime);box-shadow:0 0 10px #d8ff8277}.flow-top>span:nth-child(2){font-size:10px}.flow strong{margin-left:auto;color:var(--lime);font-size:23px;font-weight:800;white-space:nowrap}.flow small{display:block;font-size:7px;letter-spacing:.04em;margin-top:1px}.flow-track{height:3px;background:#ffffff26;border-radius:4px;overflow:hidden;margin-top:12px}.flow-track i{display:block;height:100%;width:0;background:var(--lime)}.flow p{font-size:9px;opacity:.65;margin:9px 0 0}.flow.active{box-shadow:0 0 30px #d8ff8236}.cue{position:absolute;top:265px;left:50%;transform:translateX(-50%);max-width:90vw;padding:13px 23px;border-radius:11px;background:#1c362ceb;box-shadow:0 4px 20px #1c362c33;color:#f4f8e9;font-size:13px;font-weight:700;opacity:0;transition:opacity .18s;pointer-events:none;text-align:center;white-space:nowrap}.cue.show{opacity:1}.cue.warning{background:#af5f25ee}.celebrate{position:absolute;top:39%;left:50%;transform:translateX(-50%) scale(.85);font-weight:900;font-size:clamp(27px,4.5vw,54px);letter-spacing:-.04em;text-shadow:0 3px 0 #29462d,0 0 26px #d8ff8277;color:var(--lime);opacity:0;pointer-events:none;white-space:nowrap;transition:opacity .15s,transform .22s}.celebrate.show{opacity:1;transform:translateX(-50%) scale(1)}#flash{position:absolute;inset:0;border:0 solid #d8ff82;box-shadow:inset 0 0 0 transparent;pointer-events:none;transition:box-shadow .2s}#flash.good{box-shadow:inset 0 0 75px #d8ff8244}#flash.bad{box-shadow:inset 0 0 80px #f2985b44}.driving-controls{position:absolute;bottom:22px;left:50%;transform:translateX(-50%);width:min(500px,calc(100% - 44px));background:var(--panel);border:1px solid #f0f8e733;backdrop-filter:blur(16px);border-radius:24px;padding:12px 22px 14px;box-shadow:0 9px 40px #1b382433}.condition{display:flex;align-items:center;gap:20px;font-size:9px;letter-spacing:.02em;padding-bottom:10px;margin-bottom:10px;border-bottom:1px solid #ffffff1a}.condition b{color:var(--lime);margin-left:4px;font-size:12px;font-variant-numeric:tabular-nums}.condition button{margin-left:auto;font-size:9px;padding:6px 8px;border:1px solid #ffffff30;border-radius:7px;background:none}fieldset{border:0;padding:0;margin:0;display:grid;grid-template-columns:80px minmax(0,1fr) 80px;gap:10px;align-items:start}.pedal{display:flex;flex-direction:column;align-items:center;gap:3px}.pedal label{font-size:11px;font-weight:700}.pedal output{font-size:17px;font-weight:700;color:var(--lime);font-variant-numeric:tabular-nums}.brake output{color:#ffcb9d}.pedal p{font-size:8px;opacity:.6;margin:2px 0 0}.pedal-slot{height:109px;width:60px;border:1px solid #f1ffe21a;background:#0d201c80;border-radius:16px;display:grid;place-items:center;padding:7px 0}.pedal input[type=range]{appearance:none;-webkit-appearance:none;writing-mode:vertical-lr;direction:rtl;width:46px;height:100%;min-height:0;cursor:ns-resize;margin:0;touch-action:none;background:transparent}.pedal input::-webkit-slider-runnable-track{width:12px;height:100%;border-radius:8px;background:linear-gradient(to top,#749565 0%,#d8ff82 68%,#dd987b 100%)}.pedal input::-webkit-slider-thumb{-webkit-appearance:none;width:42px;height:24px;margin-left:-15px;border-radius:7px;background:repeating-linear-gradient(to bottom,#e6edd9 0 5px,#aabc9c 5px 7px);border:3px solid #b9d491;box-shadow:0 3px 6px #0006}.pedal input::-moz-range-track{width:12px;height:100%;border-radius:8px;background:linear-gradient(to top,#749565,#d8ff82 68%,#dd987b)}.pedal input::-moz-range-thumb{width:36px;height:18px;border-radius:7px;background:#e6edd9;border:3px solid #b9d491;box-shadow:0 3px 6px #0006}.brake input::-webkit-slider-runnable-track{background:linear-gradient(to top,#809b93,#e1c498 70%,#e77b5f)}.brake input::-webkit-slider-thumb{border-color:#d7a173}.brake input::-moz-range-track{background:linear-gradient(to top,#809b93,#e1c498 70%,#e77b5f)}.brake input::-moz-range-thumb{border-color:#d7a173}.steering-control{text-align:center;min-width:0}.steering-title{display:block;font-size:9px;opacity:.7;letter-spacing:.13em}.wheel-track{height:130px;position:relative;margin:0 auto;touch-action:none;user-select:none;border-radius:18px}.wheel-track:focus-within{outline:2px solid var(--lime);outline-offset:1px}.wheel-guide{position:absolute;left:0;right:0;top:calc(50% - 1px);border:0;display:flex;justify-content:space-between;color:#d8e4ce66;font-size:15px;line-height:0}.wheel{position:absolute;left:50%;top:50%;width:128px;height:128px;transform:translate(-50%,-50%) rotate(var(--wheel-turn,0deg));transform-origin:50% 50%;filter:drop-shadow(0 5px 6px #07140c88);pointer-events:none}.wheel-track input{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:ew-resize;touch-action:none}.steering-control p{font-size:8px;white-space:nowrap;margin:0;color:#d0dfc4}.steering-control button{border:0;border-bottom:1px solid #80947b;background:none;color:#d0dfc4;font-size:8px;padding:5px 8px 2px;margin-top:2px}.speed{position:relative;padding-right:25px}.speed-limit{position:absolute;right:-5px;top:5px;border:3px solid #e97267;border-radius:50%;background:#faf5e8;color:#2f3936;font-size:11px;font-style:normal;font-weight:800;width:27px;height:27px;display:grid;place-items:center}.pudding-result{font-size:10px;color:#eaddad;margin:0 0 12px}.pudding-result b{font-size:20px;margin-left:10px}.pudding-result span{font-size:9px}#delivery-label{position:absolute;top:21%;left:25%;transform:translateX(-50%);text-align:center;text-shadow:0 2px 6px #17332c88;pointer-events:none}#delivery-label span{font-size:10px;display:block;margin-bottom:6px}#delivery-label strong{font-size:26px;letter-spacing:.06em;color:#ffedb0}#delivery-label[hidden]{display:none}[data-delivered=true] .hud,[data-delivered=true] .flow,[data-delivered=true] .route{display:none}[data-delivered=true] .cue{top:auto;bottom:25px}[data-delivered=true] .result-overlay{pointer-events:none;background:none}[data-delivered=true] .result-card{pointer-events:auto}
.overlay{position:absolute;inset:0;display:grid;place-items:center;z-index:5;background:linear-gradient(90deg,#19372a70,#19372a15);backdrop-filter:blur(2px);padding:20px}.overlay[hidden]{display:none}.start-card,.pause-card,.result-card{background:#17332cf2;border:1px solid #eaf4da44;border-radius:24px;padding:35px;width:min(420px,100%);box-shadow:0 20px 100px #18372755}.eyebrow{font-size:8px;letter-spacing:.15em;opacity:.65;margin:0 0 18px}h1{font-size:36px;letter-spacing:-.05em;line-height:1.35;margin:0 0 16px;color:#f4f9df}.intro{font-size:12px;line-height:1.9;margin:0 0 24px;color:#d4e3c7}.rules{border-top:1px solid #fff2;border-bottom:1px solid #fff2;padding:10px 0;margin-bottom:14px}.rules p{font-size:11px;line-height:1.8;margin:8px 0}.rules b{color:var(--lime);font-size:9px;margin-right:10px}.subtle{font-size:9px;line-height:1.8;opacity:.6;margin:0 0 20px}.primary{background:var(--lime);color:#1a3529;border:0;border-radius:12px;padding:16px 20px;font-size:13px;font-weight:700;width:100%;box-shadow:0 3px 0 #8ba75a}.primary span{float:right}.start-bottom{display:flex;justify-content:space-between;font-size:8px;margin-top:17px;opacity:.65}.start-bottom a{text-decoration:none}.pause-card h2{font-size:29px;margin:0 0 20px}.pause-card p:not(.eyebrow){font-size:12px;opacity:.7}.secondary{border:1px solid #fff3;border-radius:10px;background:none;width:100%;padding:12px;margin-top:12px;font-size:12px}.result-overlay{background:#19372a24;backdrop-filter:none;place-items:center end;padding-right:7vw}.result-card{position:relative;width:min(370px,100%);padding:28px;max-height:90svh;overflow:auto}.result-card h2{font-size:29px;letter-spacing:-.04em;margin:0}.result-score{display:flex;gap:20px;align-items:center;margin:19px 0 11px}.result-score>span{font-size:86px;color:var(--lime);font-weight:900;line-height:1}.result-score strong{font-size:37px;line-height:1;display:block;letter-spacing:-.03em}.result-score small{font-size:8px;letter-spacing:.13em;opacity:.5;margin-top:7px;display:block}#result-message{font-size:12px;line-height:1.8;color:#dde9cb}.result-metrics{display:grid;grid-template-columns:1fr 1fr 1fr;border-top:1px solid #fff2;border-bottom:1px solid #fff2;padding:16px 0;margin:20px 0}.result-metrics span{display:block;font-size:8px;opacity:.65}.result-metrics b{display:block;font-size:21px;margin-top:5px;color:#e7f1d6}.result-actions{display:flex;gap:12px;justify-content:center;margin-top:17px}.result-actions button{font-size:9px;border:0;background:none;text-decoration:underline;text-underline-offset:4px;padding:5px}.result-card .eyebrow{margin-bottom:10px}.result-card .primary{font-size:11px}.driving-controls.hidden{display:none}#replay-bar{position:absolute;bottom:25px;left:50%;transform:translateX(-50%);padding:15px 20px;border-radius:12px;background:#19372af2;font-size:10px;white-space:nowrap;z-index:3}#replay-bar button{border:0;background:var(--lime);color:#19372a;padding:7px 10px;border-radius:7px;margin-left:15px;font-size:9px}#loading,#error{position:absolute;inset:0;background:#1b382a;z-index:10;display:grid;place-content:center;text-align:center;font-size:13px;line-height:2}#error[hidden]{display:none}#error button{margin:20px auto 0;background:var(--lime);color:#18322a;border:0;border-radius:10px;padding:10px 20px;width:160px}[data-phase=ready] .hud,[data-phase=ready] .route,[data-phase=ready] .flow,[data-phase=ready] .driving-controls{opacity:.2}
@media(max-width:700px){#game{min-height:0}header{padding:17px 17px}.brand{font-size:20px}.brand span{font-size:7px}.top-actions button{font-size:8px;padding:8px 9px}.hud{top:80px;left:14px;right:14px;padding:12px 16px;gap:15px}.speed{min-width:53px}.speed strong{font-size:30px}.speed>span{font-size:8px}.gap{flex:1;width:auto;max-width:180px}.gap>div:first-child{font-size:8px}.gap strong{font-size:12px}.gap p{font-size:8px}.meter{margin-top:6px;height:4px}.score{padding-left:13px;margin-left:auto}.score strong{font-size:22px}.score span{font-size:7px}.route{top:169px;left:20px;width:calc(100% - 40px)}.flow{top:201px;right:14px;padding:10px 13px;width:190px;border-radius:12px}.flow-top{gap:5px}.flow-top>span:nth-child(2){font-size:8px}.flow strong{font-size:20px}.flow small{font-size:6px}.flow-track{margin-top:8px}.flow p{font-size:7px;margin:6px 0 0}.flow-dot{width:5px;height:5px}.cue{top:297px;padding:9px 13px;font-size:10px;white-space:normal;width:max-content;max-width:90vw}.celebrate{top:43%;font-size:29px}.driving-controls{bottom:max(12px,env(safe-area-inset-bottom));width:calc(100% - 24px);padding:10px 12px 11px;border-radius:19px}.condition{gap:10px;font-size:8px;padding-bottom:8px;margin-bottom:8px}.condition b{font-size:10px}.condition button{font-size:8px;padding:5px 6px}fieldset{grid-template-columns:62px minmax(0,1fr) 62px;gap:6px}.pedal label{font-size:10px}.pedal output{font-size:15px}.pedal-slot{height:103px;width:54px}.pedal p{font-size:7px}.wheel-track{height:119px}.wheel{width:114px;height:114px}.steering-control p{font-size:7px}.steering-control button{font-size:8px}.speed{padding-right:24px}.speed-limit{top:2px;right:-1px;width:24px;height:24px;font-size:10px}.flow{top:185px;left:14px;right:14px;width:auto;padding:9px 13px}.flow-top{gap:7px}.flow strong{font-size:16px}.flow small{display:inline;font-size:6px;margin-left:3px}.flow p{display:none}.flow-track{margin-top:6px}.cue{top:244px}.celebrate{top:34%;font-size:26px}.overlay{padding:16px}.start-card{padding:28px 25px;max-height:87svh;overflow:auto}.eyebrow{font-size:7px}h1{font-size:31px}.intro{font-size:11px;margin-bottom:18px}.rules p{font-size:10px}.subtle{font-size:8px}.primary{font-size:12px;padding:15px 16px}.start-bottom{font-size:7px}.result-overlay{place-items:center;padding:16px;background:#19372a3b}.result-card{padding:24px;width:min(340px,100%)}.result-score>span{font-size:70px}.result-score strong{font-size:33px}.result-card h2{font-size:25px}#replay-bar{font-size:8px;padding:12px 13px}#replay-bar button{font-size:8px;margin-left:8px}}
@media(max-height:670px){.start-card{padding:20px}h1{font-size:27px}.intro{margin-bottom:12px}.rules{padding:5px 0}.rules p{margin:6px 0}.subtle{margin-bottom:12px}.flow{top:195px}.cue{top:275px}.driving-controls{padding-top:8px}.steering-row{margin-top:4px}.result-metrics{margin:12px 0;padding:12px 0}.result-score{margin:12px 0}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}#flash{display:none}.celebrate.show{transform:translateX(-50%)}}

/* Keep the delivery on screen while the compact result card is readable. */
@media(min-width:701px){[data-delivered=true] .result-overlay{padding-right:4vw}[data-delivered=true] .result-card{width:330px}}
@media(max-width:700px){[data-delivered=true] .result-overlay{place-items:end center;padding:0 12px max(12px,env(safe-area-inset-bottom));background:none}[data-delivered=true] .result-card{width:min(440px,100%);padding:16px 19px;border-radius:20px;max-height:43svh}[data-delivered=true] .result-card .eyebrow{font-size:6px;margin-bottom:5px}[data-delivered=true] .result-card h2{font-size:22px}[data-delivered=true] .result-score{position:absolute;right:32px;margin-top:-32px;gap:8px}[data-delivered=true] .result-score>span{font-size:35px}[data-delivered=true] .result-score strong{font-size:23px}[data-delivered=true] .result-score small{font-size:6px;margin-top:3px}[data-delivered=true] #result-message{font-size:10px;margin:9px 0}[data-delivered=true] .pudding-result{font-size:9px;margin:7px 0 0}[data-delivered=true] .pudding-result b{font-size:15px}[data-delivered=true] .result-metrics{margin:9px 0;padding:8px 0}[data-delivered=true] .result-metrics b{font-size:18px;margin-top:2px}[data-delivered=true] .result-card .primary{padding:11px;font-size:10px}[data-delivered=true] .result-actions{margin-top:8px}[data-delivered=true] .result-actions button{font-size:8px;padding:4px}#delivery-label{left:50%;top:10%}#delivery-label strong{font-size:23px}[data-delivered=true] .cue{bottom:46svh;top:auto;font-size:9px}}
@media(max-height:700px) and (max-width:700px){.flow{top:179px}.cue{top:231px}.driving-controls{padding-top:7px;padding-bottom:7px}.condition{margin-bottom:5px;padding-bottom:5px}.pedal-slot{height:83px}.wheel-track{height:100px}.wheel{width:99px;height:99px}.steering-control p{font-size:6px}[data-delivered=true] .result-card{max-height:46svh}#delivery-label{top:11%}#delivery-label span{display:none}#delivery-label strong{font-size:19px}}
@media(max-height:520px) and (min-width:701px){.driving-controls{left:auto;right:14px;transform:none;bottom:12px;width:370px;padding:8px 12px}.pedal-slot{height:85px}.wheel-track{height:105px}.wheel{width:100px;height:100px}.hud{top:75px}.flow{top:75px}.route{top:180px}.cue{top:215px}.condition{padding-bottom:5px;margin-bottom:5px}}

@media(max-width:700px){.flow{left:14px;right:auto;width:165px}.flow-top>span:nth-child(2){font-size:7px}.flow strong{font-size:16px}.cue{top:auto;bottom:231px}.celebrate{top:30%}}
@media(max-width:700px) and (max-height:700px){.cue{bottom:207px}.flow{padding:7px 10px}.celebrate{top:30%;font-size:23px}}

/* Destination guidance: a persistent objective, countdown and stop confirmation. */
.goal-nav{position:absolute;top:213px;left:28px;width:365px;padding:13px 16px;border:1px solid #d8ff8255;border-radius:14px;background:#17332cf2;box-shadow:0 8px 28px #19372a22;pointer-events:none}.goal-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}.goal-heading strong{font-size:17px;color:var(--lime);line-height:1.25}.goal-heading #timer{font-size:10px;white-space:nowrap;color:#d6e2cd;font-variant-numeric:tabular-nums}.goal-heading #timer.time-low{color:#ffd1a1;font-weight:800}.goal-nav p{font-size:10px;line-height:1.5;color:#e5efd9;margin:7px 0 8px}.route-track{height:3px;background:#f1f9e32a;border-radius:4px;overflow:hidden}.route-track i{display:block;height:100%;width:0;background:var(--lime)}.goal-nav[data-stage=approach]{border-color:#d8ff82;box-shadow:0 0 24px #d8ff822e}.goal-nav[data-stage=stop],.goal-nav[data-stage=holding]{background:#d8ff82;border-color:#f5ffd9}.goal-nav[data-stage=stop] .goal-heading strong,.goal-nav[data-stage=holding] .goal-heading strong,.goal-nav[data-stage=stop] p,.goal-nav[data-stage=holding] p{color:#173b2a}.goal-nav[data-stage=stop] #timer,.goal-nav[data-stage=holding] #timer{color:#3b573d}.goal-nav[data-stage=stop] .route-track,.goal-nav[data-stage=holding] .route-track{display:none}#stop-confirm{display:flex;align-items:center;gap:9px;font-size:10px;color:#1a3a2a;margin-top:8px}#stop-confirm>div{flex:1;height:5px;background:#244c3233;border-radius:4px;overflow:hidden}#stop-fill{display:block;height:100%;width:0;background:#23513a}#stop-value{font-size:10px;min-width:31px;text-align:right}#stop-confirm[hidden]{display:none}[data-phase=ready] .goal-nav{opacity:.2}[data-phase=finished] .goal-nav,[data-phase=finished] .hud,[data-phase=finished] .flow{display:none}[data-goal=holding] .flow{visibility:hidden}
/* Reasons come first on unsuccessful runs, with one concrete next action. */
.result-overlay.is-failure{place-items:center;background:#10271f77;backdrop-filter:blur(3px);padding:18px}.is-failure .result-card{width:min(480px,100%);padding:28px;border-color:#ffba7d88;max-height:90svh}.is-failure .result-card .eyebrow{font-size:12px;color:#ffcc9b;opacity:1;letter-spacing:.05em;margin-bottom:13px}.is-failure .result-card h2{font-size:27px;line-height:1.4;color:#fff2db}.is-failure #result-message{font-size:14px;line-height:1.8;margin:14px 0 18px;color:#f4ebdb}.is-failure .result-score,.is-failure .result-metrics{display:none}#end-info[hidden]{display:none}.end-facts{padding:13px 15px;border:1px solid #ffffff24;border-radius:10px;background:#0b231c77}.end-facts strong{display:block;font-size:13px;color:#ffe1b8;line-height:1.6}.end-facts span{display:block;font-size:11px;line-height:1.5;color:#cddbc9;margin-top:5px}.end-advice{margin:18px 0 21px}.end-advice>span{font-size:11px;color:var(--lime);font-weight:800}.end-advice p{font-size:14px;line-height:1.85;margin:6px 0 0;color:#f0f5e3}.is-failure .result-card .primary{font-size:13px}.is-failure .result-actions{gap:10px;flex-wrap:wrap}.is-failure .result-actions button{font-size:11px;line-height:1.5}.is-failure .result-actions #replay{color:#e2ffa4;font-weight:700}.is-failure #share-card{font-size:10px;opacity:.7}#replay-bar{white-space:normal;width:max-content;max-width:calc(100% - 24px);display:flex;align-items:center;gap:9px}#replay-bar[hidden]{display:none}#replay-bar button{flex-shrink:0;margin-left:0}
@media(max-width:700px){.goal-nav{top:154px;left:14px;right:14px;width:auto;padding:9px 12px;border-radius:12px}.goal-heading strong{font-size:14px}.goal-heading #timer{font-size:10px}.goal-nav p{font-size:10px;margin:5px 0 7px;line-height:1.4}.flow{top:236px}.is-failure .result-card{padding:23px 22px;width:min(400px,100%)}.is-failure .result-card h2{font-size:25px}.is-failure #result-message{font-size:13px}.end-advice p{font-size:13px}.is-failure .result-card .eyebrow{font-size:11px}.end-facts strong{font-size:12px}[data-delivered=true] .result-score{top:32px;margin:0}#replay-bar{font-size:9px;bottom:20px}}
@media(max-height:700px) and (max-width:700px){.flow{top:234px}.goal-nav{padding-top:8px;padding-bottom:8px}.goal-heading strong{font-size:13px}.goal-nav p{font-size:9px}.is-failure .result-card{padding:20px}.is-failure .result-card h2{font-size:23px}.is-failure #result-message{margin:10px 0 13px}.end-facts{padding:10px 12px}.end-advice{margin:13px 0 16px}.end-advice p{font-size:12px;line-height:1.75}}
@media(max-height:520px) and (min-width:701px){.goal-nav{top:183px;width:305px}.goal-heading strong{font-size:14px}.goal-nav p{font-size:9px}.is-failure .result-card{padding:22px}}

@media(max-width:700px){[data-delivered=true] .result-card h2{padding-right:108px;line-height:1.35}}

.pudding-result .condition-chip{display:inline-block;margin-left:10px;padding:3px 6px;border:1px solid #eaddad40;border-radius:5px;font-size:9px;vertical-align:middle;white-space:nowrap}

/* Symmetric controls keep the road and vehicle clear. */
.driving-controls{width:min(440px,calc(100% - 32px));padding:10px 16px 12px;border-radius:20px;background:#142f29ee}
.condition{padding-bottom:7px;margin-bottom:8px;gap:14px}
#pedals{grid-template-columns:78px minmax(0,1fr) 78px;gap:12px;align-items:end}
.pedal-stack{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:0}
.pedal-slot{height:94px;width:60px}
.pedal p{font-size:8px;white-space:nowrap}
#pedals .steering-control{align-self:center}
.steering-control .flow{position:static;width:auto;max-width:100%;padding:0 0 6px;border:0;border-radius:0;background:none;box-shadow:none;backdrop-filter:none;text-align:center}
.steering-control .flow.active{box-shadow:none}
.steering-control .flow-top{justify-content:center;gap:5px}
.steering-control .flow-top>span:nth-child(2){font-size:8px;white-space:nowrap}
.steering-control .flow strong{font-size:18px}
.steering-control .flow small{display:inline;font-size:6px;letter-spacing:0;margin-left:2px}
.steering-control .flow-track{margin-top:5px;height:3px}
.steering-control .flow p{display:none}
.steering-title{font-size:9px;letter-spacing:.04em}
.wheel-track{height:115px}
.wheel{width:112px;height:112px}
.pedal-stack .signal-button{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;min-width:44px;height:44px;padding:4px 6px;border:1px solid #c5bc8e99;border-radius:10px;background:#304538;color:#fff0c8;font-size:10px;font-weight:700;touch-action:manipulation;margin:0;box-shadow:0 2px 0 #061d12}
.signal-button i{color:#ffdc88;font-style:normal;font-size:26px;line-height:1}
.signal-button span{white-space:nowrap}
.signal-button kbd{font:inherit;color:#dce5ce;padding-left:2px}
.pedal-stack .signal-button.active{border-color:#ffe4a3;background:#78561c;color:#fff5d5;box-shadow:0 0 12px #ffc04a55}
.signal-button.active i{color:#fff2bd;animation:signal-flash .8s steps(1,end) infinite}
@keyframes signal-flash{50%{opacity:.25}}
#speed.overspeed{color:#ff987e}.gap p.speeding{color:#ff987e;font-weight:800}
#game[data-phase=driving] .cue{top:var(--driving-cue-top,200px);bottom:auto}
@media(max-width:700px){
 header{padding:12px 14px}.brand{font-size:19px}
 .hud{top:62px;padding:9px 12px;gap:12px}.speed strong{font-size:27px}.score strong{font-size:21px}
 .goal-nav{top:131px;padding:8px 11px}.goal-nav p{font-size:9px;margin:4px 0 6px}
 .driving-controls{width:calc(100% - 24px);padding:8px 10px 10px;border-radius:18px}
 .condition{font-size:8px;gap:9px;margin-bottom:7px;padding-bottom:6px}
 #pedals{grid-template-columns:66px minmax(0,1fr) 66px;gap:7px}
 .pedal-stack{gap:6px}.pedal-slot{height:84px;width:54px}.pedal p{font-size:7px}
 .pedal-stack .signal-button{gap:3px;font-size:9px;padding:4px}.signal-button i{font-size:23px}
 .wheel-track{height:105px}.wheel{width:min(103px,100%);height:auto;aspect-ratio:1}
 .steering-control .flow{padding-bottom:5px}.steering-control .flow-top{gap:3px}
 .steering-control .flow-top>span:nth-child(2){font-size:7px}.steering-control .flow strong{font-size:14px}.steering-control .flow small{font-size:5px}
}
@media(max-height:700px) and (max-width:700px){
 header{padding-top:10px}.hud{top:57px;padding-top:7px;padding-bottom:7px}.goal-nav{top:119px;padding-top:7px;padding-bottom:7px}
 .driving-controls{padding-top:7px;padding-bottom:8px}.condition{margin-bottom:6px;padding-bottom:5px}
 .pedal-slot{height:74px}.wheel-track{height:96px}.wheel{width:min(94px,100%)}
}
@media(max-height:600px) and (max-width:700px){
 .hud{top:51px;padding-top:6px;padding-bottom:6px}.speed strong{font-size:25px}
 .goal-nav{top:109px;padding-top:5px;padding-bottom:5px}.goal-nav p{line-height:1.3}
 .condition{margin-bottom:5px;padding-bottom:4px}.pedal-slot{height:62px}
 .wheel-track{height:84px}.wheel{width:min(82px,100%)}
 .steering-control .flow{padding-bottom:3px}.driving-controls{padding-top:6px;padding-bottom:7px}
}
@media(max-height:520px) and (min-aspect-ratio:4/3){
 header{padding:10px 14px}.brand{font-size:18px}.brand span{font-size:6px}
 .hud{top:55px;left:14px;right:auto;width:min(330px,calc(54vw - 42px));padding:8px 10px;gap:8px}.speed strong{font-size:27px}.score strong{font-size:21px}
 .goal-nav{top:123px;left:14px;right:auto;width:min(330px,calc(54vw - 42px));padding:7px 10px}.goal-heading strong{font-size:13px}.goal-nav p{font-size:9px;margin:4px 0 5px}
 .driving-controls{left:auto;right:14px;transform:none;bottom:12px;width:min(370px,46vw);padding:8px 12px}
 #pedals{grid-template-columns:60px minmax(0,1fr) 60px;gap:7px}
 .pedal-slot{height:78px}.wheel-track{height:96px}.wheel{width:94px;height:94px}
 #game[data-phase=driving] .cue{left:26%;max-width:calc(54vw - 32px);font-size:9px;padding:6px 9px;white-space:normal}
}
@media(prefers-reduced-motion:reduce){.signal-button.active i{animation:none}}

/* Keep the full Japanese game title clear of the sound controls. */
header{gap:8px}.top-actions{flex-shrink:0}.brand{white-space:nowrap}
@media(max-width:700px){header .brand{font-size:clamp(12px,3.8vw,19px)}}

/* A single compact instrument row keeps the road visible on phones as well. */
.dashboard{position:absolute;z-index:2;top:65px;left:14px;right:14px;max-width:960px;margin:auto;display:grid;grid-template-columns:72px 1fr 1.65fr .85fr .85fr;align-items:center;gap:12px;height:62px;padding:8px 14px;background:var(--panel);border:1px solid #ffffff30;border-radius:12px;backdrop-filter:blur(12px)}
.dashboard .hud,.dashboard .goal-nav,.dashboard .goal-heading{display:contents}
.dashboard .speed{grid-column:1;grid-row:1;min-width:0;padding-right:19px;position:relative}
.dashboard .speed strong{font-size:27px}.dashboard .speed>span{font-size:8px}.dashboard .speed-limit{width:21px;height:21px;font-size:10px;right:0;top:0}
.dashboard .gap{grid-column:2;grid-row:1;width:auto;min-width:0;max-width:none}.dashboard .gap>div:first-child{display:block;font-size:9px}.dashboard .gap strong{display:block;font-size:17px}.dashboard .meter{margin-top:3px;height:3px}
.dashboard .gap p,.dashboard #goal-action,.dashboard .route-track{display:none}
.dashboard #goal-title{grid-column:3;grid-row:1;min-width:0;font-size:16px;line-height:1.3}
.dashboard #timer{grid-column:4;grid-row:1;font-size:11px;white-space:normal;line-height:1.3}
.dashboard .score{grid-column:5;grid-row:1;min-width:0;border:0;margin:0;padding:0}.dashboard .score strong{font-size:20px}.dashboard .score span{font-size:8px}
.dashboard #stop-confirm:not([hidden]){position:absolute;top:100%;left:35%;right:18%;padding:5px 8px;margin-top:3px;background:#15382bee;border-radius:8px;font-size:9px}
#game[data-delivered=true] .dashboard{display:none}
#rear-notice{position:absolute;z-index:4;left:50%;bottom:285px;transform:translateX(-50%);display:flex;align-items:center;gap:10px;padding:9px 13px;border-radius:12px;background:#213a48ed;border:1px solid #e6f4ff70;font-size:11px;white-space:nowrap;pointer-events:none}
#rear-notice[hidden]{display:none}#rear-notice small{font-size:9px;color:#dce8e8}.rear-lights{color:white;text-shadow:0 0 8px #fff,0 0 18px #cee7ff;font-size:19px;animation:rear-passing .35s steps(1,end) 4}
@keyframes rear-passing{50%{opacity:.15}}
@media(max-width:700px){.dashboard{top:49px;left:8px;right:8px;height:51px;padding:6px 8px;gap:6px;grid-template-columns:44px .85fr 1.5fr .85fr .7fr}.dashboard .speed strong{font-size:22px}.dashboard .speed-limit{width:16px;height:16px;font-size:8px;right:-2px;top:2px}.dashboard .speed{padding-right:13px}.dashboard .gap>div:first-child{font-size:8px}.dashboard .gap strong{font-size:14px}.dashboard #goal-title{font-size:11px}.dashboard #timer{font-size:9px}.dashboard .score strong{font-size:15px}.dashboard .score span{font-size:7px}#rear-notice{bottom:260px;font-size:9px;max-width:94vw;padding:7px 9px}#rear-notice small{font-size:8px}}
@media(max-height:520px) and (min-aspect-ratio:4/3){.dashboard{top:45px;height:49px}#rear-notice{bottom:18px;left:26%;font-size:9px}}
@media(prefers-reduced-motion:reduce){.rear-lights{animation:none}}

.top-actions{position:relative}.version-badge{position:absolute;right:0;bottom:calc(100% + 1px);font-size:8px;line-height:1;letter-spacing:.04em;color:#ecf6e0;text-shadow:0 1px 3px #16352b;white-space:nowrap;pointer-events:none}
.completion-time{margin:0 0 12px;color:#dce7d4;font-size:12px}.completion-time b{margin-left:8px;font-size:17px;font-variant-numeric:tabular-nums;color:#d8ff82}.completion-time[hidden]{display:none}
@media(max-width:700px){[data-delivered=true] .completion-time{font-size:10px;margin:7px 0}[data-delivered=true] .completion-time b{font-size:14px}}

.version-badge{display:flex;align-items:center;gap:5px;height:14px}.company-mark{display:block;width:24.111px;height:14px;flex-shrink:0;background:url('./assets/shigeta-ex-logo-source.png') left top / 98.519px 14px no-repeat}
@media(max-width:700px),(max-height:520px) and (min-aspect-ratio:4/3){header{padding-top:16px}}

/* 70% transparent backgrounds let the road show through without fading text. */
.dashboard,.driving-controls{background:rgb(22 45 39 / 30%);backdrop-filter:blur(4px)}
.cue:not(.warning),#replay-bar,.start-card,.pause-card,.result-card{background:rgb(22 45 39 / 30%)}
.top-actions button,.pedal-stack .signal-button:not(.active){background:rgb(22 45 39 / 30%);backdrop-filter:blur(4px)}
.dashboard #stop-confirm:not([hidden]){background:rgb(22 45 39 / 30%)}
.pedal-slot{background:transparent}
.dashboard,.driving-controls,.cue,.start-card,.pause-card,.result-card{text-shadow:0 1px 3px #10271fe6}
/* Result sharing: accessible touch targets, with the delivery scene still visible. */
.share-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.share-actions button,#close-image{min-height:44px;padding:9px 6px;font-size:11px;font-weight:700;border:1px solid #eaf4da66;border-radius:10px;background:rgb(22 45 39 / 30%)}
.share-actions #share-x{color:var(--lime);border-color:#d8ff8299}
.share-hint,#share-status,#image-preview p{font-size:10px;line-height:1.65;margin:9px 0 0}
#share-status{color:#d8ff82}#share-status:empty{display:none}
#copy-fallback{margin-top:10px;font-size:11px}#share-link{width:100%;margin-top:6px;padding:9px;color:#17332c}
#result-image{display:block;width:100%;height:auto;border-radius:10px;margin-top:12px}
#close-image{width:100%;margin-top:8px}
.result-card{overscroll-behavior:contain}

/* Quiet run identifier: visible only inside the results overlay. */
.play-number{display:block;text-align:right;margin-top:5px;font-size:9px;font-weight:400;line-height:1;color:#b8c6b1;opacity:.65;font-variant-numeric:tabular-nums;pointer-events:none}

/* Result sharing: keep long labels readable on narrow screens. */
.share-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
.share-actions button{white-space:normal;overflow-wrap:anywhere;line-height:1.5;min-width:0}
.share-actions button:disabled{opacity:.45;cursor:not-allowed}
