@font-face{font-family:Russo;src:url('/assets/russo.ttf') format('truetype');font-display:swap;font-weight:400}
@font-face{font-family:Golos;src:url('/assets/golos.ttf') format('truetype');font-display:swap;font-weight:400 700}
:root{--paper:#f4f1e7;--ink:#183d32;--muted:#52665a;--lime:#d6f36b;--coral:#ff754f;--blue:#5ab8ff;--line:#d5d9cb;--display:Russo,Golos,sans-serif;--body:Golos,system-ui,sans-serif;--radius:14px;--ease:cubic-bezier(.16,1,.3,1)}
*{box-sizing:border-box}html{background:var(--paper);color:var(--ink);font-family:var(--body);scrollbar-color:#809481 var(--paper)}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:disabled{cursor:wait;opacity:.6}button:focus-visible,a:focus-visible{outline:3px solid #2779ab;outline-offset:4px}button{touch-action:manipulation}a{color:inherit}::selection{background:var(--lime);color:var(--ink)}[hidden]{display:none!important}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}h1,h2,p{margin:0}h1,h2{text-wrap:balance;font-family:var(--display);font-weight:400}h2{font-size:clamp(28px,4vw,42px);line-height:1.15;letter-spacing:-.02em}small{font-weight:400}button{border:0}button,a{outline-offset:4px}.topbar{height:100px;padding:0 4.5%;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);gap:24px}.brand{text-decoration:none;display:flex;align-items:center;font-family:var(--display);font-size:31px;letter-spacing:-.025em}.brand-dot{color:#de4a2a}.brand-mark{display:flex;gap:4px;margin-right:13px;transform:skew(-13deg)}.brand-mark i{display:block;width:6px;height:23px;background:var(--ink)}.brand-mark i:nth-child(2){height:30px;margin-top:-7px}.brand-mark i:nth-child(3){height:37px;margin-top:-14px;background:#de4a2a}.header-note{font-size:14px;color:var(--muted);margin-left:auto}.header-actions{display:flex;gap:14px;align-items:center}.icon-button{width:46px;height:46px;display:grid;place-items:center;border-radius:50%;background:transparent;border:1px solid var(--line);flex-shrink:0;transition:background .2s var(--ease)}.icon-button:hover{background:#e3e8d7}.icon-button[aria-pressed=false] svg{opacity:.5}.text-button{background:none;padding:12px 0;text-decoration:underline;text-underline-offset:5px;font-size:14px}.home{max-width:1700px;margin:auto;display:grid;grid-template-columns:47% 53%;padding:36px 4.5% 0}.intro{padding:36px 28px 30px 0;align-self:center}h1{font-size:clamp(44px,5.3vw,80px);line-height:1.04;letter-spacing:-.035em}.accent{color:#de4a2a}.intro-copy{margin-top:25px;color:var(--muted);font-size:clamp(16px,1.4vw,20px);line-height:1.65}.setup{max-width:360px;margin-top:34px}.player-picker{padding:0;margin:0 0 16px;border:0}.player-picker legend{font-size:13px;margin-bottom:10px;color:var(--muted)}.segments{display:flex;border:1px solid var(--line);padding:4px;border-radius:12px;gap:4px}.segments button{flex:1;border-radius:8px;padding:13px 9px;background:transparent;font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:9px;transition:background .2s var(--ease),color .2s var(--ease)}.segments button[aria-pressed=true]{background:var(--ink);color:var(--paper)}.two-dots{width:21px;height:13px;position:relative}.two-dots:before,.two-dots:after{content:'';width:12px;height:12px;border-radius:50%;background:var(--coral);position:absolute;left:0}.two-dots:after{background:var(--blue);left:9px}.start-button{background:var(--lime);color:var(--ink);border-radius:12px;min-height:60px;width:100%;padding:15px 20px;display:flex;align-items:center;justify-content:center;gap:12px;font-size:16px;font-weight:700;transition:background .2s var(--ease),transform .2s var(--ease)}.start-button:hover{background:#c4e74e;transform:translateY(-1px)}.start-button .end-icon{margin-left:auto}.practice-button{background:none;font-size:14px;width:100%;padding:17px 10px;color:var(--muted);text-decoration:underline;text-underline-offset:5px}.practice-button:hover{color:var(--ink)}.privacy-note{font-size:11px;line-height:1.6;color:var(--muted);margin-top:18px;max-width:350px;display:flex;gap:8px;align-items:flex-start}.status-dot{width:6px;height:6px;background:#3b774b;display:inline-block;border-radius:50%;flex-shrink:0;margin-top:6px}.course-preview{position:relative;min-height:570px;overflow:hidden;border-radius:20px;background:#98b9a5}.course-preview canvas{width:100%;height:100%;display:block;position:absolute;inset:0}.preview-caption{position:absolute;top:25px;left:25px;display:flex;align-items:center;gap:8px;font-size:12px;color:#173d32}.live-mark{height:6px;width:6px;border-radius:50%;background:var(--ink)}.preview-badge{position:absolute;right:25px;top:55px;display:flex;align-items:center;gap:10px;background:var(--lime);border-radius:50%;width:128px;height:128px;justify-content:center;transform:rotate(8deg)}.preview-badge strong{font-family:var(--display);font-size:42px;font-weight:400}.preview-badge span{font-size:11px;line-height:1.45}.preview-bottom{position:absolute;bottom:22px;left:24px;right:24px;display:flex;gap:10px;align-items:center}.player-label{background:var(--paper);color:var(--ink);border-radius:30px;padding:8px 12px;display:flex;align-items:center;gap:7px;font-size:12px;font-weight:600}.player-label b{width:8px;height:8px;background:var(--coral);border-radius:50%}.player-label.blue b{background:var(--blue)}.course-label{font-size:10px;letter-spacing:.12em;color:#e6f2d8;margin-left:auto}.rules-strip{grid-column:1/-1;display:grid;grid-template-columns:1fr 1.15fr 1fr 1.3fr;gap:20px;padding:30px 0;margin-top:32px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.rules-strip>div{display:flex;gap:14px;align-items:center}.rules-strip svg{width:32px;height:32px}.rules-strip span{font-size:16px;font-weight:600}.rules-strip small{display:block;font-size:12px;color:var(--muted);margin-top:5px}.points-rule{border-left:1px solid var(--line);justify-content:space-around;padding-left:12px}.points-rule strong{font-family:var(--display);font-size:28px;font-weight:400}.points-rule small{font-family:var(--body);font-size:11px}.home-footer{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 0;font-size:11px;color:var(--muted)}
.game{position:fixed;inset:0;background:var(--ink);z-index:10;overflow:hidden;height:100dvh;touch-action:none}.game>canvas{width:100%;height:100%;display:block}.game-top{position:absolute;top:0;left:0;right:0;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:max(18px,env(safe-area-inset-top)) max(22px,env(safe-area-inset-right)) 15px max(22px,env(safe-area-inset-left));background:linear-gradient(#163c32b3,transparent);color:#fff}.scores{display:flex;gap:12px;flex:1}.score{display:grid;grid-template-columns:12px auto;column-gap:9px;row-gap:2px;min-width:100px}.score .dot{width:10px;height:10px;background:var(--coral);border-radius:50%;grid-row:1/3;margin-top:7px}.score .name{font-size:11px;color:#eef4e7}.score strong{font-family:var(--display);font-size:33px;font-weight:400;font-variant-numeric:tabular-nums;line-height:1.1}.score strong small{font-family:var(--body);font-size:11px;margin-left:5px}.score.hit strong{color:#ffd1c4}.race-clock{display:flex;flex-direction:column;text-align:center;min-width:80px;flex:1}.race-clock span{font-family:var(--display);font-size:34px;font-variant-numeric:tabular-nums}.race-clock small{font-size:11px;margin-top:4px}.game-actions{display:flex;gap:8px;flex:1;justify-content:flex-end}.on-dark{color:var(--paper);border-color:#ffffff55;background:#183d3266}.on-dark:hover{background:#183d32}.tracking-state{position:absolute;bottom:max(15px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:7px;background:#173d32e6;color:#f4f1e7;padding:8px 12px;border-radius:30px;white-space:nowrap;font-size:11px}.tracking-state .status-dot{background:var(--lime);margin:0}.tracking-state.lost .status-dot{background:var(--coral)}.overlay{position:absolute;inset:0;display:grid;place-items:center;padding:20px;background:#11362cba;overflow:auto;touch-action:pan-y}.overlay-panel{position:relative;background:var(--paper);border-radius:20px;width:min(540px,100%);padding:36px;text-align:center;box-shadow:0 18px 80px #102c2a40}.close-overlay{position:absolute;right:12px;top:12px;width:36px;height:36px;border:0}.overlay-panel h2{padding:0 16px}.overlay-panel>p{margin-top:12px;color:var(--muted);font-size:14px;line-height:1.55}.camera-preview{margin:20px auto 0;position:relative;width:100%;aspect-ratio:4/3;background:#153d32;border-radius:12px;overflow:hidden}.camera-preview video{width:100%;height:100%;object-fit:contain;transform:scaleX(-1);display:block}.camera-preview canvas{position:absolute;inset:0;width:100%;height:100%}.camera-zones{position:absolute;inset:0;display:flex;pointer-events:none}.camera-zones>span{flex:1;display:flex;align-items:flex-end;justify-content:center;padding:12px;color:#fff;font-size:12px;font-weight:600;text-shadow:0 1px 5px #000}.camera-zones>span+span{border-left:1px dashed #fff9}.calibration-count{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);color:var(--lime);font-family:var(--display);font-size:50px;text-shadow:0 2px 8px #0005}.calibration-progress{margin-top:14px;height:5px;border-radius:5px;background:#dce0d0;overflow:hidden}.calibration-progress>div{height:100%;background:#3b774b;width:100%;transform:scaleX(0);transform-origin:left;transition:transform .15s linear}.panel-buttons{display:flex;flex-direction:column;gap:10px;margin-top:24px}.panel-buttons .secondary{background:#e4e8da;color:var(--ink);border-radius:12px;min-height:48px;padding:12px;font-weight:600}.panel-note{font-size:11px!important;margin-top:15px!important}.overlay-panel.countdown{background:none;box-shadow:none;color:var(--paper)}.countdown h2{font-size:100px;padding:0}.countdown>p{color:#fff;font-size:20px}.hit-feedback{position:absolute;inset:0;pointer-events:none;display:flex;align-items:center;justify-content:space-around}.penalty{font-family:var(--display);font-size:52px;color:#fff;background:#bd3d23;padding:14px;border-radius:12px;animation:penalty .7s var(--ease) forwards}@keyframes penalty{from{opacity:1;transform:translateY(10px)}to{opacity:0;transform:translateY(-40px)}}.results{margin-top:22px;display:flex;gap:12px}.result-player{flex:1;padding:20px 10px;background:#e5e9dc;border-radius:12px}.result-player .result-name{font-size:13px;display:flex;gap:7px;justify-content:center;align-items:center}.result-player .result-name:before{content:'';display:block;width:9px;height:9px;background:var(--player);border-radius:50%}.result-player strong{display:block;font-family:var(--display);font-weight:400;font-size:44px;margin-top:12px}.result-player small{display:block;color:var(--muted);font-size:12px;line-height:1.6;margin-top:8px}.touch-controls{position:absolute;bottom:max(50px,env(safe-area-inset-bottom));left:12px;right:12px;display:flex;justify-content:space-between;gap:20px}.touch-group{display:flex;gap:6px;flex-wrap:wrap;max-width:240px}.touch-group>span{font-size:11px;color:var(--paper);width:100%;text-shadow:0 1px 3px #000}.touch-group button{width:48px;height:48px;border-radius:12px;background:#f4f1e7e6;color:var(--ink);display:grid;place-items:center;touch-action:none;box-shadow:inset 0 -3px 0 var(--player)}.touch-group button:active,.touch-group button.pressed{background:var(--lime)}.keyboard-hint{position:absolute;bottom:15px;left:18px;color:#fff;font-size:11px;text-shadow:0 1px 3px #000}.keyboard-hint span{margin-left:20px}dialog{border:0;border-radius:20px;background:var(--paper);color:var(--ink);padding:36px;max-width:550px;width:calc(100% - 32px);max-height:90dvh;overflow:auto;box-shadow:0 16px 60px #153d3250}dialog::backdrop{background:#173d32b3}dialog h2{margin-bottom:24px}dialog li,dialog p{font-size:14px;line-height:1.65}dialog li+li{margin-top:12px}dialog ol{padding-left:20px}dialog p{margin:20px 0}dialog small{display:block;color:var(--muted);font-size:11px;line-height:1.6;margin-top:20px}.close-dialog{position:absolute;top:12px;right:12px;border:0;width:36px;height:36px}
@media(min-width:1600px){.course-preview{min-height:650px}.intro{padding-right:70px}}
@media(max-width:900px){.topbar{height:80px}.header-note{display:none}.home{padding-top:24px;grid-template-columns:48% 52%}.intro{padding:20px 22px 20px 0}h1{font-size:clamp(34px,5.3vw,50px)}.intro-copy{font-size:14px;margin-top:18px}.setup{margin-top:24px}.course-preview{min-height:500px}.preview-badge{width:105px;height:105px;right:15px;top:55px}.preview-badge strong{font-size:34px}.preview-badge span{font-size:10px}.preview-caption{font-size:10px;left:15px;top:20px}.rules-strip{gap:12px;padding:24px 0}.rules-strip>div{gap:8px}.rules-strip span{font-size:13px}.rules-strip small{font-size:10px}.rules-strip svg{width:26px;height:26px}.points-rule strong{font-size:23px}.course-label{display:none}}
@media(max-width:600px) and (orientation:portrait){.topbar{height:70px;padding:0 6%}.brand{font-size:26px}.header-actions .icon-button{width:40px;height:40px}.home{display:flex;flex-direction:column;padding:18px 6% 0}.intro{padding:0;display:contents}h1{font-size:42px;letter-spacing:-.03em}.intro-copy{margin:15px 0 22px;font-size:14px;line-height:1.6}.course-preview{min-height:260px;order:1;border-radius:16px}.preview-badge{width:87px;height:87px;top:36px}.preview-badge strong{font-size:30px}.preview-badge span{font-size:9px}.preview-bottom{left:15px;bottom:14px}.setup{order:2;width:100%;max-width:none;margin-top:23px}.player-picker legend{font-size:12px}.privacy-note{order:3;margin:0 0 24px;max-width:none;font-size:10px}.rules-strip{order:4;width:100%;grid-template-columns:1fr 1fr;gap:22px;margin-top:0}.points-rule{border-left:0;padding-left:0;justify-content:space-between;gap:20px!important}.home-footer{order:5;padding:12px 0 20px;align-items:flex-start;font-size:10px;line-height:1.6}.home-footer span{max-width:230px}.home-footer button{white-space:nowrap;padding-top:0;font-size:11px}.overlay-panel{padding:28px 20px}.game-top{padding:14px 12px;gap:5px}.score{min-width:67px;grid-template-columns:7px auto;column-gap:6px}.score .dot{width:7px;height:7px}.score strong{font-size:25px}.score .name{font-size:10px}.scores{gap:7px}.race-clock{flex:0;min-width:56px}.race-clock span{font-size:25px}.game-actions{gap:5px;flex:0}.game-actions .icon-button{width:36px;height:36px}.game-actions svg{width:19px}.score strong small{display:none}.touch-group{max-width:156px}.touch-group button{width:44px;height:44px}.touch-group>span{font-size:10px}.touch-controls{gap:10px}.keyboard-hint{display:none!important}.camera-preview{max-height:44dvh;width:auto;max-width:100%}.result-player strong{font-size:36px}}
@media(max-height:650px) and (orientation:landscape){.topbar{height:65px}.home{padding-top:20px}.intro{padding-top:0}h1{font-size:43px}.intro-copy{font-size:13px;margin-top:12px}.setup{margin-top:18px}.course-preview{min-height:420px}.overlay{padding:10px}.overlay-panel{padding:22px 30px;max-width:700px}.overlay-panel h2{font-size:28px}.overlay-panel>p{font-size:12px;margin-top:8px}.camera-preview{width:280px;max-height:42dvh;margin-top:12px}.calibration-progress{max-width:280px;margin:8px auto 0}.panel-buttons{margin-top:14px;flex-direction:row}.panel-buttons button{flex:1;min-height:46px;font-size:14px}.panel-note{margin-top:8px!important}.camera-zones>span{font-size:10px}.countdown h2{font-size:80px}.keyboard-hint{display:none!important}.game-top{padding:12px 18px}.score strong{font-size:26px}.race-clock span{font-size:28px}.tracking-state{bottom:10px;font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}.start-button:hover{transform:none}}
