@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:600 700;font-display:swap;src:url('./fonts/barlow-bold.ttf') format('truetype')}
@font-face{font-family:'Barlow Condensed';font-style:normal;font-weight:800 900;font-display:swap;src:url('./fonts/barlow-extrabold.ttf') format('truetype')}
@font-face{font-family:'DM Sans';font-style:normal;font-weight:400 600;font-display:swap;src:url('./fonts/dm-regular.ttf') format('truetype')}
@font-face{font-family:'DM Sans';font-style:normal;font-weight:700 900;font-display:swap;src:url('./fonts/dm-bold.ttf') format('truetype')}
:root{color-scheme:dark;--bg:#0a171d;--panel:#10232a;--ink:#f1f6f3;--muted:#9fb5b7;--mint:#c1ef83;--coral:#ff7664;--line:#294049;font-family:'DM Sans',sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);min-height:100svh}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid var(--mint);outline-offset:4px}button:disabled{opacity:.6;cursor:wait}[hidden]{display:none!important}.layout{max-width:1420px;margin:auto;display:grid;grid-template-columns:minmax(250px,1fr) minmax(330px,440px) minmax(180px,.65fr);gap:clamp(28px,4vw,76px);padding:44px 48px 28px;align-items:center}.intro{align-self:stretch;display:flex;flex-direction:column}.brand{color:var(--ink);text-decoration:none;display:flex;align-items:center;gap:12px;font-size:12px;font-weight:700;letter-spacing:1.4px}.flag{display:grid;place-items:center;width:29px;height:29px;background:linear-gradient(to bottom,#263f72 50%,#ef685c 50%);color:white;font-size:17px}.headline{margin-top:auto;padding-top:60px}.eyebrow{font-size:12px;letter-spacing:2px;font-weight:700;color:var(--muted);margin:0 0 15px}h1,h2,.record>strong,.score>strong{font-family:'Barlow Condensed','Arial Narrow',Impact,sans-serif;line-height:.91;letter-spacing:-1px}h1{font-size:clamp(66px,6.5vw,100px);margin:0;font-weight:800}h1 span{color:var(--mint)}.lede{font-size:19px;line-height:1.6;color:#c1d0d0;margin-top:28px}.instructions{display:flex;flex-wrap:wrap;gap:7px;align-items:center;margin-top:35px}.key{border:1px solid #39505a;border-bottom:3px solid #39505a;width:35px;height:34px;display:grid;place-items:center;border-radius:5px;color:var(--mint);font-size:20px}.instructions p{flex-basis:100%;font-size:14px;color:var(--muted);line-height:1.65;margin:12px 0 0}.aside{font-size:13px;color:#6f929b;line-height:1.65;margin-top:auto;padding-top:42px}.game-top,.game-bottom{display:flex;justify-content:space-between;align-items:center;font-size:11px;letter-spacing:1px;font-weight:700;color:var(--muted);gap:8px}.game-top{height:38px}.game-top>span{display:flex;align-items:center;gap:8px}.game-top i{width:6px;height:6px;border-radius:50%;background:var(--coral)}.icon-button{border:0;background:transparent;color:var(--muted);padding:9px 6px;font-size:11px;letter-spacing:1px;min-height:36px}.stage{height:min(70svh,680px);min-height:460px;position:relative;overflow:hidden;border:1px solid #375059;border-radius:12px;background:#142d34;box-shadow:0 20px 70px #0005;touch-action:none}canvas{display:block;width:100%;height:100%;touch-action:none}.hud{position:absolute;inset:23px 23px auto;display:flex;align-items:flex-start;justify-content:space-between;pointer-events:none}.hud>div{display:flex;flex-direction:column;gap:5px;text-shadow:0 2px 6px #000}.hud>div>span{font-size:10px;letter-spacing:2px;color:#d1e0df}.hud strong{font-family:'Barlow Condensed',Impact,sans-serif;font-size:44px;line-height:1;font-weight:700}.hud strong span{font:500 16px 'DM Sans',sans-serif;color:#bdd1d0}.hud button{pointer-events:auto;color:var(--ink);background:#10232ac9;border:1px solid #39505a;border-radius:6px;width:36px;font-size:17px}.road-label{position:absolute;bottom:21px;left:0;right:0;text-align:center;font-size:10px;font-weight:700;letter-spacing:1.6px;color:#dae7d4;pointer-events:none}.overlay{position:absolute;inset:0;display:grid;place-items:center;padding:26px;background:linear-gradient(180deg,#0a171d33,#0a171da8 30%,#0a171df2);text-align:center}.overlay>div{width:100%;max-width:310px}.badge{font-size:10px;letter-spacing:1.5px;color:var(--mint);background:#bfea7f12;border:1px solid #bfea7f40;padding:8px 10px;display:inline-block;border-radius:4px;font-weight:700}.crash-badge{color:var(--coral);border-color:#ff766440;background:#ff766412}h2{font-size:68px;font-weight:800;margin:27px 0 19px} .overlay p{font-size:15px;line-height:1.7;color:#c1d0d0;margin:0 0 27px}.primary{border:0;background:var(--mint);color:#172524;border-radius:6px;width:100%;padding:17px 18px;font-weight:800;font-size:14px;letter-spacing:.7px;display:flex;align-items:center;justify-content:center;gap:17px;min-height:50px}.primary:hover{background:#d4ffa1}.primary:active{transform:translateY(1px)}.primary span{font-size:18px}.start-screen small{display:block;font-size:12px;color:var(--muted);margin-top:16px}.result-screen h2{font-size:49px;margin:22px 0 16px}.score{display:flex;flex-direction:column;margin-bottom:18px;gap:10px}.score>strong{font-size:88px;color:var(--mint)}.score>span{font-size:11px;letter-spacing:2px;color:var(--muted)}.result-screen p{font-size:13px;margin-bottom:20px}.share-actions{display:grid;gap:9px;margin-top:10px}.secondary{background:#122a31;border:1px solid #3b5359;color:var(--ink);padding:12px 9px;border-radius:6px;font-size:11px;font-weight:700;letter-spacing:.5px;min-height:40px}.secondary:hover{border-color:var(--mint)}.game-bottom{padding-top:15px;font-size:9px}.sidebar{align-self:stretch;padding-top:89px;display:flex;flex-direction:column}.record>strong{font-size:84px;color:var(--mint);display:block;margin:0 0 12px}.record>span{font-size:10px;letter-spacing:1.4px;color:var(--muted)}.difficulty{margin-top:53px}.difficulty>div:nth-child(2){display:flex;justify-content:space-between;gap:8px;font-size:10px;font-weight:700;letter-spacing:.5px;margin-top:20px}.width-meter{height:4px;background:#2b4147;margin:12px 0}.width-meter i{display:block;height:100%;width:100%;background:var(--mint);transition:width .2s}.difficulty p,.challenge p{color:var(--muted);font-size:13px;line-height:1.7}.challenge{padding-top:28px}.challenge strong{font:700 35px 'Barlow Condensed',sans-serif;color:var(--coral)}.route{margin-top:auto;display:flex;align-items:center;gap:16px;padding-top:55px}.route-line{height:95px;width:3px;background:linear-gradient(var(--mint),#426463);position:relative;transform:rotate(7deg)}.route-line:after{content:'';position:absolute;top:42px;left:-4px;width:11px;height:11px;background:var(--coral);border:3px solid var(--bg);border-radius:50%}.route p{font-size:10px;line-height:3;color:#69929b;letter-spacing:1.2px}.route strong{color:var(--coral)}footer{max-width:1420px;margin:auto;border-top:1px solid #20383f;padding:18px 48px 24px;display:flex;justify-content:space-between;gap:16px;font-size:11px;color:#7e9aa0;line-height:1.6}footer button{color:var(--muted);border:0;background:none;font-size:12px}.toast{position:absolute;left:20px;right:20px;bottom:14px;text-align:center;color:#fff;background:#0a171de8;border:1px solid #577369;border-radius:6px;font-size:13px;padding:12px;opacity:0;pointer-events:none;transition:opacity .2s}.toast.visible{opacity:1}dialog{max-width:470px;border:1px solid #48606a;border-radius:12px;background:var(--panel);color:var(--ink);padding:30px}dialog::backdrop{background:#000b}dialog h2{font-size:40px;margin:0 0 22px}dialog p{font-size:16px;line-height:1.65;color:#c1d0d0}.game-column{min-width:0}
@media(min-width:1500px){.layout{padding-top:70px}.stage{height:700px}}
@media(max-width:1100px){.layout{grid-template-columns:minmax(240px,1fr) minmax(330px,440px);gap:40px}.sidebar{grid-column:1/-1;display:flex;flex-direction:row;gap:40px;align-items:center;padding:0}.record{display:flex;align-items:center;gap:15px}.record .eyebrow{max-width:100px;line-height:1.6;margin:0}.record>strong{font-size:48px;margin:0}.record>span{max-width:90px;line-height:1.6}.difficulty{margin:0;flex:1}.difficulty>.eyebrow,.difficulty p,.route{display:none}.difficulty>div:nth-child(2){margin-top:0}.challenge{padding:0}.challenge .eyebrow{font-size:10px}.challenge p{display:none}}
@media(max-width:700px){.layout{display:flex;flex-direction:column;gap:0;padding:0 14px 15px;max-width:450px}.intro{display:block;padding:16px 0 0}.brand{font-size:10px;letter-spacing:1px;gap:9px}.flag{width:20px;height:20px;font-size:12px}.headline{display:flex;align-items:center;gap:12px;padding:0;margin:13px 0 10px}.headline>.eyebrow{display:none}h1{font-size:35px;letter-spacing:-.5px;line-height:1}h1 br{display:none}h1 span{display:inline}.lede{font-size:11px;line-height:1.4;margin:0 0 0 auto;max-width:125px}.instructions,.aside{display:none}.game-column{width:100%}.game-top{height:32px;font-size:9px}.game-top .icon-button{font-size:9px}.stage{height:calc(100svh - 195px);min-height:400px;max-height:730px;border-radius:9px}.game-bottom{padding-top:10px;font-size:8px}.sidebar{display:block;width:100%;padding:15px 0 0}.record{gap:12px}.record .eyebrow{max-width:none;font-size:10px;letter-spacing:1px}.record>strong{font-size:30px}.record>span{font-size:9px;max-width:none}.difficulty,.route,.challenge{display:none}footer{max-width:450px;padding:12px 14px 18px;margin:auto;font-size:10px}.hud{inset:18px 18px auto}.hud strong{font-size:36px}.overlay{padding:25px 28px}h2{font-size:60px;margin:25px 0 18px}.result-screen h2{font-size:42px;margin:18px 0 13px}.score>strong{font-size:70px}.score{gap:6px;margin-bottom:12px}.result-screen p{margin-bottom:15px}.badge{font-size:9px}.primary{padding:14px}.share-actions{gap:7px}.secondary{padding:10px;font-size:10px}.road-label{font-size:9px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}.width-meter i,.toast{transition:none}}

/* Keep action text legible on small screens. */
.icon-button,.secondary,.start-screen small{font-size:14px}.overlay p{font-size:16px}.result-screen p{font-size:14px}
.eyebrow,.brand,.game-top,.game-bottom,.badge,.score>span,.record>span,.difficulty>div:nth-child(2),.road-label,.route p,footer{font-size:12px}
@media(max-width:700px){.headline .lede{display:none}.brand{font-size:12px}.game-top,.game-top .icon-button{font-size:12px}.game-bottom{font-size:12px}.game-bottom>span:last-child{display:none}.record .eyebrow,.record>span{font-size:12px}.badge{font-size:11px}.secondary{font-size:14px}.overlay p{font-size:16px}.result-screen p{font-size:14px}.start-screen small{font-size:14px}.road-label{font-size:11px}.stage{min-height:460px}}

/* Compact playfield for the game portals' landscape iframes. */
body.portal .intro,body.portal .sidebar,body.portal .game-bottom{display:none}
body.portal .layout{display:block;max-width:440px;padding:0 12px;margin:0 auto}
body.portal .stage{height:calc(100svh - 90px);min-height:260px;max-height:850px}
body.portal .game-top{height:38px;font-size:12px}
body.portal footer{max-width:440px;padding:5px 12px;justify-content:flex-end;border:0}
body.portal footer>span{display:none}
body.portal .overlay{padding:16px 24px;overflow-y:auto}
body.portal .overlay h2{font-size:38px;margin:15px 0 13px}
body.portal .overlay p{font-size:14px;margin-bottom:16px}
body.portal .primary{padding:12px;min-height:44px}
body.portal .start-screen small{margin-top:12px;font-size:12px}
body.portal .result-screen h2{font-size:30px;margin:8px 0}
body.portal .score{gap:4px;margin-bottom:8px}
body.portal .score>strong{font-size:48px}
body.portal .result-screen p{margin-bottom:8px;font-size:12px}
body.portal .share-actions{grid-template-columns:1fr 1fr;gap:7px;margin-top:8px}
body.portal .secondary{font-size:12px;padding:8px;min-height:40px}
body.portal .badge{font-size:10px;padding:6px 8px}
body.portal .road-label{font-size:10px;bottom:12px}
