:root{color-scheme:light;--green:#0f3d24;--grass:#2f7d47;--sign:#f2c418;--cream:#fbf6e6;--ink:#13261a;--muted:#b9c9bc;--panel:rgba(12,40,25,.95);--line:rgba(255,255,255,.12);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0;overflow:hidden;background:#9fd0ea;color:var(--cream)}button{font:inherit;cursor:pointer}.sr-only{position:absolute!important;width:1px!important;height:1px!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}[hidden]{display:none!important}
.game{--x:0px;--walker-x:22%;--gate-x:120%;position:relative;width:100%;height:100%;min-height:480px;overflow:hidden;isolation:isolate;background:linear-gradient(180deg,#7fc0e6 0%,#bfe2f1 46%,#e8f3e4 62%)}
.world{position:absolute;inset:0;z-index:0}
.sun{position:absolute;right:12%;top:9%;width:86px;height:86px;border-radius:50%;background:radial-gradient(circle,#fff6c7 0 45%,#ffe58a 60%,rgba(255,229,138,0) 72%)}
.cloud{position:absolute;width:180px;height:46px;border-radius:50%;background:#fff;opacity:.85;box-shadow:46px 8px 0 6px #fff,-38px 10px 0 2px #fff;transform:translateX(calc(var(--x) * .04))}.cloud-1{left:8%;top:12%}.cloud-2{left:46%;top:7%;scale:.7}.cloud-3{left:74%;top:22%;scale:.9}
.layer{position:absolute;left:0;right:0;background-repeat:repeat-x;background-position-y:bottom}
.hills-far{bottom:46%;height:30%;background-image:url(hills-far.svg);background-size:auto 100%;background-position-x:calc(var(--x) * .12)}
.hills-near{bottom:36%;height:24%;background-image:url(hills-near.svg);background-size:auto 100%;background-position-x:calc(var(--x) * .28)}
.roadside{bottom:30%;height:26%;background-image:url(roadside.svg);background-size:auto 100%;background-position-x:calc(var(--x) * .62)}
.road{position:absolute;left:0;right:0;bottom:7%;height:24%;background:linear-gradient(180deg,#5f9b4c 0 7%,#b9ad8d 7% 93%,#5f9b4c 93%);}
.road:before{content:"";position:absolute;inset:7% 0;background:repeating-linear-gradient(90deg,rgba(120,105,78,.18) 0 14px,transparent 14px 46px);background-position-x:var(--x)}
.road-median{position:absolute;left:0;right:0;top:46%;height:9%;background:repeating-linear-gradient(90deg,#6ea957 0 70px,transparent 70px 110px);background-position-x:var(--x);border-radius:6px}
.wall{bottom:0;height:12%;background-image:url(wall.svg);background-size:auto 100%;background-position-x:calc(var(--x) * 1.35);z-index:6}
.walker{position:absolute;z-index:4;left:var(--walker-x);bottom:14%;height:27%;aspect-ratio:120/220;transform:translateX(-50%)}
.walker svg{display:block;width:100%;height:100%;overflow:visible}
.leg,.arm{transform-box:view-box}.leg-back,.leg-front{transform-origin:62px 128px}.arm-back,.arm-front{transform-origin:64px 74px}
.walker.is-walking .leg-front,.walker.is-running .leg-front{animation:swing var(--stride,1s) ease-in-out infinite}
.walker.is-walking .leg-back,.walker.is-running .leg-back{animation:swing var(--stride,1s) ease-in-out infinite reverse}
.walker.is-walking .arm-front,.walker.is-running .arm-front{animation:arm var(--stride,1s) ease-in-out infinite reverse}
.walker.is-walking .arm-back,.walker.is-running .arm-back{animation:arm var(--stride,1s) ease-in-out infinite}
.walker.is-walking svg,.walker.is-running svg{animation:bob calc(var(--stride,1s) / 2) ease-in-out infinite}
.walker.is-running{--stride:.42s}.walker.is-running svg{rotate:6deg}
.walker.is-walking{--stride:1.05s}
.walker.is-cheering .arm-front{transform:rotate(-150deg)}.walker.is-cheering .arm-back{transform:rotate(-140deg)}.walker.is-cheering svg{animation:hop .5s ease-in-out 2}
.walker.is-stopped .arm-front{transform:rotate(-40deg)}.walker.is-stopped .arm-back{transform:rotate(30deg)}
.gate{position:absolute;left:var(--gate-x);bottom:13%;height:52%;aspect-ratio:260/330}
.gate.is-grand{height:60%}
.gate-front{position:absolute;inset:0;width:100%;height:100%;overflow:visible;z-index:5}
.gate-flags{display:none}.gate.is-grand .gate-flags{display:block}
.gate-back{position:absolute;left:30%;width:40%;top:43.6%;bottom:0;overflow:hidden;background:linear-gradient(180deg,#3b3a33,#58564b);border-radius:50% 50% 0 0/26% 26% 0 0;z-index:2}
.portcullis{position:absolute;inset:0;background:repeating-linear-gradient(90deg,transparent 0 9px,#2c2a25 9px 14px),repeating-linear-gradient(180deg,transparent 0 16px,#2c2a25 16px 21px);transition:transform .7s ease}
.gate.is-open .portcullis{transform:translateY(-102%)}
.gate.is-open .gate-back{background:linear-gradient(180deg,#e9e2c8,#f6efda)}
.gate-name{position:absolute;z-index:6;left:50%;top:-14%;margin:0;padding:5px 11px;border-radius:999px;color:var(--ink);background:var(--sign);font-size:clamp(.62rem,1.4vw,.78rem);font-weight:850;white-space:nowrap;transform:translateX(-50%);box-shadow:0 6px 14px rgba(0,0,0,.18)}
.gate-front{z-index:5}.gate .gate-back{z-index:1}
.speed-lines{position:absolute;inset:30% 0 10%;z-index:7;opacity:0;pointer-events:none;background:repeating-linear-gradient(180deg,transparent 0 38px,rgba(255,255,255,.55) 38px 40px,transparent 40px 90px);background-size:160px 100%;transition:opacity .25s}
.game.is-running .speed-lines{opacity:.45;animation:lines .3s linear infinite}
.km-popup{position:absolute;z-index:8;left:var(--walker-x);bottom:46%;padding:8px 16px;border-radius:999px;color:var(--ink);background:var(--sign);font-size:clamp(1.3rem,3.2vw,2.2rem);font-weight:900;font-variant-numeric:tabular-nums;transform:translateX(-30%);box-shadow:0 12px 30px rgba(0,0,0,.2);animation:pop .3s ease both}
.game.is-shut .km-popup{color:#fff;background:#8a3b2b}
.confetti{position:absolute;inset:0;z-index:9;pointer-events:none}.confetti i{position:absolute;top:-4%;width:10px;height:16px;border-radius:2px;background:var(--sign);animation:fall 2.4s linear infinite}.confetti i:nth-child(3n){background:#2f7d47}.confetti i:nth-child(3n+1){background:#fff}
.confetti i:nth-child(1){left:8%;animation-delay:.1s}.confetti i:nth-child(2){left:18%;animation-delay:.7s}.confetti i:nth-child(3){left:29%;animation-delay:.3s}.confetti i:nth-child(4){left:38%;animation-delay:1.1s}.confetti i:nth-child(5){left:49%;animation-delay:.5s}.confetti i:nth-child(6){left:58%;animation-delay:.9s}.confetti i:nth-child(7){left:67%;animation-delay:.2s}.confetti i:nth-child(8){left:76%;animation-delay:1.3s}.confetti i:nth-child(9){left:86%;animation-delay:.6s}.confetti i:nth-child(10){left:94%;animation-delay:1s}
.journey-bar{position:absolute;z-index:15;top:clamp(10px,2.3vh,20px);left:50%;transform:translateX(-50%);width:min(760px,calc(100% - 28px));height:48px;padding:0 18px;display:grid;grid-template-columns:auto minmax(120px,1fr) auto;align-items:center;gap:15px;border-radius:999px;background:rgba(12,40,25,.9);box-shadow:0 12px 30px rgba(0,0,0,.18)}
.journey-brand{font-size:.8rem;font-weight:900;color:var(--sign)}.journey-brand span{margin-left:6px;color:var(--muted);font-weight:700}
.journey-bar ol{display:grid;grid-template-columns:repeat(7,1fr);gap:5px;margin:0;padding:0;list-style:none}.journey-bar li{height:6px;border-radius:999px;background:rgba(255,255,255,.18)}.journey-bar li.active{background:#fff}.journey-bar li.open{background:var(--sign)}.journey-bar li.shut{background:#c4553f}
.distance{display:flex;align-items:center;gap:6px;min-width:86px;justify-content:flex-end}.distance svg{width:14px;height:14px;fill:var(--sign)}.distance b{font-size:.86rem;font-variant-numeric:tabular-nums}
.panel{position:absolute;z-index:12;border:1px solid var(--line);border-radius:22px;background:var(--panel);box-shadow:0 26px 70px rgba(0,0,0,.28);backdrop-filter:blur(12px)}
.kicker{margin:0 0 10px;color:var(--sign);font-size:.72rem;font-weight:850;letter-spacing:.12em;text-transform:uppercase}
.start-card{left:50%;bottom:6%;width:min(880px,calc(100% - 36px));padding:clamp(24px,4vw,44px);transform:translateX(-50%)}
.start-card h1{margin:0;font-family:Georgia,"Times New Roman",serif;font-size:clamp(2.6rem,6vw,5.2rem);line-height:.92;letter-spacing:-.03em}.start-card h1 span{color:var(--sign)}
.start-card>p:not(.kicker){max-width:min(560px,calc(100% - 280px));margin:18px 0 0;color:#d6e2d8;line-height:1.55}
.start-card button,.finish-card button{position:absolute;right:40px;bottom:42px;width:250px;min-height:64px;border:0;border-radius:14px;color:var(--ink);background:var(--sign);font-weight:900}
.start-card button strong,.start-card button small{display:block}.start-card button strong{font-size:1.08rem}.start-card button small{margin-top:2px;font-size:.68rem;font-weight:650}
.question-card{right:4%;top:50%;width:min(540px,calc(100% - 32px));padding:24px 26px 26px;transform:translateY(-46%)}
.question-meta{display:flex;align-items:center;gap:10px;font-size:.72rem;font-weight:800}.chip{padding:4px 10px;border-radius:999px;color:var(--ink);background:var(--sign);text-transform:uppercase;letter-spacing:.06em}.question-meta em{color:var(--muted);font-style:normal}.question-meta time{margin-left:auto;color:var(--muted);font-variant-numeric:tabular-nums}
.question{margin:16px 0 16px;font-family:Georgia,"Times New Roman",serif;font-size:clamp(1.3rem,2.6vw,1.85rem);font-weight:700;line-height:1.18}
.options{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.option{display:flex;align-items:center;gap:10px;min-height:54px;padding:10px 12px;border:2px solid rgba(255,255,255,.16);border-radius:12px;color:var(--cream);background:rgba(255,255,255,.04);text-align:left;font-weight:700;line-height:1.2}
.option b{flex:none;display:grid;place-items:center;width:26px;height:26px;border-radius:8px;color:var(--ink);background:rgba(242,196,24,.9);font-size:.78rem}
.option:hover,.option:focus-visible{border-color:var(--sign);outline:none;background:rgba(242,196,24,.1)}
.option.is-correct{border-color:#7fd28f;background:rgba(127,210,143,.18)}.option.is-wrong{border-color:#e37d66;background:rgba(227,125,102,.18)}
.hint{margin:12px 0 0;color:var(--muted);font-size:.72rem}
.timer-track{position:absolute;left:24px;right:24px;bottom:-1px;height:4px;overflow:hidden}.timer-track span{display:block;height:100%;background:var(--sign);transform-origin:left;transform:scaleX(var(--time,1))}
.reveal-card{right:4%;top:50%;width:min(500px,calc(100% - 32px));padding:24px 26px;transform:translateY(-46%);animation:card .4s cubic-bezier(.2,.9,.2,1) both}
.reveal-kicker{margin:0;color:var(--sign);font-size:.72rem;font-weight:850;letter-spacing:.1em;text-transform:uppercase}
.reveal-line{display:flex;align-items:center;justify-content:space-between;margin:12px 0}.verdict{padding:6px 12px;border-radius:999px;color:var(--ink);background:#9fe0a8;font-weight:900}.verdict.is-shut{color:#fff;background:#b44a35}.reveal-line strong{font-size:1.6rem;font-variant-numeric:tabular-nums}
.reveal-answers{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:0}.reveal-answers div{padding:10px 12px;border-radius:12px;background:rgba(255,255,255,.05)}.reveal-answers dt{color:var(--muted);font-size:.66rem;text-transform:uppercase;letter-spacing:.06em}.reveal-answers dd{margin:4px 0 0;font-weight:800}
.fact{margin:14px 0 16px;color:#d6e2d8;font-size:.86rem;line-height:1.5}
.next-button{width:100%;min-height:48px;border:0;border-radius:12px;color:var(--ink);background:var(--sign);font-weight:900}
.finish-card{left:50%;top:52%;width:min(620px,calc(100% - 32px));padding:30px;transform:translate(-50%,-50%);text-align:center}.finish-card h2{margin:0;font-family:Georgia,serif;font-size:1.6rem}.final-distance{display:block;margin:10px 0;color:var(--sign);font-size:clamp(3.2rem,9vw,5.6rem);letter-spacing:-.04em}.finish-card>p:not(.kicker){color:#d6e2d8}
.journey-summary{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin:18px 0 0;padding:0;list-style:none}.journey-summary li{padding:8px 2px;border-radius:9px;background:rgba(255,255,255,.06);font-size:.64rem;line-height:1.4}.journey-summary li.open{box-shadow:inset 0 -3px 0 var(--sign)}.journey-summary li.shut{box-shadow:inset 0 -3px 0 #c4553f}
.finish-card button{position:static;width:100%;margin-top:20px}
@keyframes swing{0%,100%{transform:rotate(-24deg)}50%{transform:rotate(24deg)}}
@keyframes arm{0%,100%{transform:rotate(-30deg)}50%{transform:rotate(30deg)}}
@keyframes bob{0%,100%{translate:0 0}50%{translate:0 -3%}}
@keyframes hop{0%,100%{translate:0 0}50%{translate:0 -10%}}
@keyframes lines{to{background-position:-160px 0}}
@keyframes pop{from{opacity:0;scale:.6}to{opacity:1;scale:1}}
@keyframes fall{from{transform:translateY(0) rotate(0)}to{transform:translateY(110vh) rotate(540deg)}}
@keyframes card{from{opacity:0;transform:translateY(-42%) scale(.97)}to{opacity:1;transform:translateY(-46%) scale(1)}}
@media(max-width:720px){
  .game{min-height:460px;background:linear-gradient(180deg,#7fc0e6 0,#c4e4f2 30%,#e4f1df 42%,#5f9b4c 42%,#3f7d36 100%)}
  .journey-bar{height:42px;gap:8px;padding:0 12px}.journey-brand span{display:none}.distance{min-width:66px}
  .sun{width:60px;height:60px;top:10%}
  .hills-far{bottom:62%;height:16%}.hills-near{bottom:54%;height:14%}.roadside{bottom:46%;height:17%}
  .road{bottom:34%;height:13%}.wall{bottom:27%;height:8%}.speed-lines{inset:30% 0 30%}
  .walker{bottom:39%;height:21%}.gate{bottom:38%;height:36%}.gate.is-grand{height:40%}.gate-name{top:auto;bottom:-10%}
  .km-popup{bottom:72%;font-size:1.3rem;padding:6px 12px}
  .panel{border-radius:18px}
  .start-card{left:10px;right:10px;bottom:10px;width:auto;padding:14px 16px 16px;transform:none}
  .start-card .kicker{margin-bottom:4px;font-size:.66rem}.start-card h1{font-size:2rem;white-space:nowrap}
  .start-card>p:not(.kicker){max-width:none;margin:6px 0 12px;font-size:.84rem;line-height:1.42}
  .start-card button{position:static;width:100%;min-height:50px}.start-card button small{opacity:.8}
  .question-card,.reveal-card{left:10px;right:10px;top:auto;bottom:10px;width:auto;transform:none;padding:14px 14px 16px;animation:none}
  .question{margin:10px 0;font-size:1.12rem;line-height:1.2}.options{grid-template-columns:1fr 1fr;gap:7px}.option{min-height:46px;padding:7px 9px;gap:8px;font-size:.86rem}.option b{width:22px;height:22px}.hint{display:none}
  .timer-track{left:14px;right:14px}
  .reveal-line{margin:8px 0}.reveal-line strong{font-size:1.35rem}.reveal-answers{gap:7px}.reveal-answers div{padding:8px 10px}.reveal-answers dd{font-size:.86rem}.fact{margin:10px 0 12px;font-size:.8rem;line-height:1.42}.next-button{min-height:44px}
  .finish-card{padding:18px 14px}.finish-card h2{font-size:1.3rem}.final-distance{margin:4px 0;font-size:3rem}.journey-summary{gap:3px;margin-top:12px}.journey-summary li{font-size:.56rem}.finish-card button{margin-top:14px;min-height:48px}
}
@media(max-width:720px) and (max-height:620px){
  .start-card{padding:12px 14px 14px}.start-card h1{font-size:1.75rem}.start-card>p:not(.kicker){font-size:.8rem;line-height:1.36;margin:4px 0 10px}.start-card button{min-height:44px}
  .question-card,.reveal-card{padding:11px 12px 13px}.question{margin:7px 0;font-size:1.02rem}.option{min-height:40px;padding:6px 8px;font-size:.82rem}
  .fact{font-size:.76rem;margin:7px 0 9px}.reveal-line{margin:5px 0}.next-button{min-height:42px}
  .walker{bottom:44%;height:20%}.gate{bottom:43%;height:33%}.gate.is-grand{height:36%}.road{bottom:39%;height:12%}.wall{bottom:32%;height:8%}.roadside{bottom:50%;height:16%}.hills-near{bottom:57%}.hills-far{bottom:64%}.km-popup{bottom:76%;font-size:1.15rem}
}
@media(max-height:560px) and (min-width:721px){.question-card,.reveal-card{padding:16px 20px}.question{margin:10px 0;font-size:1.25rem}.option{min-height:44px}.hint{display:none}.start-card{bottom:3%;padding:22px 30px}.start-card h1{font-size:3.4rem}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
