:root{color-scheme:light;--blue:#007fae;--deep:#005c87;--ink:#153e51;--ivory:#fff6df;--white:#fff;--red:#bc4a43;font-family:"Trebuchet MS",Arial,sans-serif;background:#e7f2f5;color:var(--ink)}
*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #e99734;outline-offset:3px}button:disabled{cursor:default}button:active:not(:disabled){transform:translateY(2px)}[hidden]{display:none!important}.game{position:relative;isolation:isolate;display:flex;flex-direction:column;width:100%;max-width:1100px;height:100vh;height:100dvh;max-height:940px;margin:auto;overflow:hidden;padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);background:#e9e8dd url('../assets/play/spoolcrawler/workshop.webp') center/cover;box-shadow:0 10px 50px #11486033;touch-action:none;overscroll-behavior:contain}.masthead{height:83px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 12px 5px}.wordmark{display:block;object-fit:contain;width:calc(100% - 112px);max-width:480px;height:auto;max-height:75px;filter:drop-shadow(0 3px 2px #00324d22);pointer-events:none}.icon-button{width:48px;height:48px;border:0;background-color:transparent;background-position:center;background-size:contain;background-repeat:no-repeat;flex:none}.pause{background-image:url('../assets/play/spoolcrawler/pause.webp')}.restart{background-image:url('../assets/play/spoolcrawler/restart.webp')}.icon-button:disabled{filter:saturate(.6);opacity:.75}.dashboard{height:52px;display:flex;gap:14px;align-items:center;padding:0 16px;flex:none}.course-switch{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;flex:1;min-width:0;min-height:48px;padding:0;background:none;border:0;text-align:left;font-size:12px;font-weight:900;letter-spacing:.8px}.small{font-size:9px;font-weight:800;letter-spacing:1px;white-space:nowrap}.course-switch .small{font-size:9px;letter-spacing:.3px;font-weight:600}.stat{text-align:center;display:flex;flex-direction:column;gap:3px}.stat-value{font-variant-numeric:tabular-nums;font-size:23px;font-weight:900;color:var(--deep);line-height:1}.time-stat{min-width:50px}.route{height:32px;flex:none;padding:1px 18px 0;text-align:center}.route-track{position:relative;height:10px;border:2px solid #fff9e9;border-radius:10px;background:#ede0c4;box-shadow:0 1px 2px #57442255;overflow:hidden}#route-fill{width:0;height:100%;background:linear-gradient(#21b5e9,#0079ac);border-radius:8px}.route-dot{position:absolute;top:1px;left:calc(var(--i)*18%);width:4px;height:4px;border-radius:50%;background:#977e51;opacity:.6}#route-cart{position:absolute;left:0;top:0;width:9px;height:6px;border-radius:3px;background:#fff9e9;box-shadow:0 0 0 1px #007fae}#route-text{display:block;margin-top:5px;font-size:9px;letter-spacing:1.6px;font-weight:900}.scene{position:relative;flex:1;min-height:0;overflow:hidden}.scene canvas{display:block;width:100%;height:100%;touch-action:none;overscroll-behavior:contain;outline-offset:-4px}.scene-note{position:absolute;top:8px;left:12px;right:12px;text-align:center;font-size:12px;font-weight:800;color:var(--deep);pointer-events:none;text-shadow:0 1px white}.panel{position:absolute;left:14px;right:14px;bottom:10px;max-width:440px;margin:0 auto;border-radius:18px;padding:13px;background:linear-gradient(155deg,#fffaf0f5,#fff5dff5);border:2px solid #fffdf2;box-shadow:0 4px 0 #b6c2bd,0 8px 20px #003c5c20;text-align:center}.eyebrow{font-size:9px;letter-spacing:1.3px;font-weight:900;margin:0 0 6px;color:var(--deep)}.goal{font-size:12px;font-weight:700;margin:0 0 10px}.course-list{display:flex;flex-direction:column;gap:6px}.course-card{display:flex;align-items:center;gap:9px;text-align:left;min-height:48px;width:100%;padding:5px 10px;border:1px solid #00688e;border-radius:10px;background:linear-gradient(#139dcd,#007aa9);color:white;box-shadow:inset 0 1px 0 #77d9ff,0 2px 0 #00537a}.course-number{font-size:20px;font-weight:900;color:#fff3d4;min-width:28px}.course-card strong{display:block;font-size:14px}.course-card small{display:block;font-size:10px;opacity:.85;margin-top:2px}.course-best{font-size:11px;font-weight:900;margin-left:auto;white-space:nowrap;color:#fff1cf}.result-panel{bottom:12px;padding:18px}.result-panel h2{font-size:29px;margin:3px 0 8px;letter-spacing:-1px}.result-panel p:not(.eyebrow){font-size:13px;line-height:1.4;margin:7px 0 12px}.result-actions{display:flex;gap:8px}.primary,.secondary{min-height:48px;padding:10px 15px;border-radius:11px;font-weight:900;border:1px solid var(--deep);flex:1}.primary{color:white;background:linear-gradient(#159ed1,#0075a6);box-shadow:inset 0 1px #8be6ff,0 2px 0 #00527b}.secondary{background:#fff8e8;color:var(--deep);box-shadow:0 2px 0 #b7bcaf}.result-panel>.primary,.result-panel>.secondary{width:100%;margin-top:7px}.result-medal{font-weight:900;color:var(--deep)}.text-button{border:0;background:none;min-height:44px;text-decoration:underline;font-size:12px;font-weight:700}.grip-row{height:28px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:6px;padding:0 15px;background:#f7f0e1e8;font-size:10px;font-weight:800}.grip-label{display:flex;align-items:center;gap:5px;font-size:8px;letter-spacing:.6px}.red-mark{color:var(--red);font-size:9px}.grip-gauge{position:relative;width:48px;height:7px;border-radius:5px;background:#c7e3eb;border:1px solid #9db9ba}.grip-gauge b{position:absolute;left:63%;top:-3px;height:11px;border-left:2px solid var(--red)}.grip-gauge i{position:absolute;top:-2px;left:0;width:4px;height:9px;border-radius:2px;background:var(--deep)}.control-deck{height:113px;flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 17px 20px;background:#007fae url('../assets/play/spoolcrawler/deck.webp') center/100% 100%;border-radius:22px 22px 0 0;border:2px solid #31c0ef;border-bottom:0;box-shadow:inset 0 2px 1px #b0efff,0 -3px 9px #1c688b20}.lean-controls,.pedal-controls{display:flex;gap:10px;align-items:center}.drive-button{position:relative;flex:none;border:0;padding:0;background:transparent center/100% 100% no-repeat;touch-action:none;user-select:none;-webkit-user-select:none}.drive-button span{position:absolute;bottom:-15px;left:-6px;right:-6px;text-align:center;white-space:nowrap;font-size:9px;font-weight:900;letter-spacing:.5px;color:#fff8df;text-shadow:0 1px #004a6a}.lean-back,.lean-forward{width:56px;height:50px}.brake,.pedal{width:76px;height:70px}.lean-back{background-image:url('../assets/play/spoolcrawler/lean-back.webp')}.lean-forward{background-image:url('../assets/play/spoolcrawler/lean-forward.webp')}.brake{background-image:url('../assets/play/spoolcrawler/brake.webp')}.pedal{background-image:url('../assets/play/spoolcrawler/pedal.webp')}.drive-button.held{transform:translateY(3px);filter:brightness(1.15);box-shadow:0 0 12px #a5efff88;border-radius:20px}.game-footer{display:flex;align-items:center;justify-content:space-around;flex:none;height:44px;padding-bottom:env(safe-area-inset-bottom);background:#006e9a;color:#f4f9f9;font-size:10px;font-weight:700}.game-footer a,.game-footer button{color:inherit;min-height:44px;display:flex;align-items:center;justify-content:center;padding:0 12px;background:none;border:0;text-decoration:none}.game-footer a:hover,.game-footer button:hover{text-decoration:underline}.help{max-width:780px;margin:0 auto;padding:42px 22px 70px;font-size:16px;line-height:1.7}.help h1{font-size:32px;line-height:1.2;letter-spacing:-.7px}.help h2{font-size:23px;margin-top:30px}.help h3{font-size:18px}.help a{color:#006894;font-weight:700}.help p{margin:12px 0}dialog{width:calc(100% - 28px);max-width:390px;border:3px solid white;border-radius:20px;padding:22px;color:var(--ink);background:#fff7e6;box-shadow:0 16px 80px #00324a80}dialog::backdrop{background:#003b5790}dialog h2{margin:4px 0 16px;font-size:28px}dialog p{font-size:13px;line-height:1.5}dialog>.primary,dialog>.secondary{width:100%}.setting-row{width:100%;display:flex;justify-content:space-between;align-items:center;min-height:52px;padding:10px 0;border:0;border-bottom:1px solid #d4dacc;background:none;font-size:14px}.setting-row strong{border-radius:6px;background:#dcebf0;color:var(--deep);padding:5px 10px;font-size:12px}#storage-message{min-height:18px;font-size:11px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.reduced-motion button{transition:none!important}.reduced-motion .drive-button.held{filter:none;transform:none}button{transition:filter .1s,transform .1s}
@media(min-width:700px){.masthead{padding:10px 28px;height:92px}.dashboard{padding:0 32px;gap:35px}.course-switch{font-size:15px}.small{font-size:10px}.course-switch .small{font-size:11px}.stat-value{font-size:28px}.route{padding-left:32px;padding-right:32px}.panel{bottom:15px}.setup{max-width:680px}.course-list{flex-direction:row}.course-card{padding:9px;min-height:65px;flex:1}.course-card small{font-size:10px}.course-card .course-best{display:none}.goal{font-size:14px}.eyebrow{font-size:10px}.control-deck{justify-content:center;gap:100px;height:113px}.lean-controls,.pedal-controls{gap:22px}.grip-row{padding:0 30px;font-size:11px}.lean-back,.lean-forward{width:66px;height:58px}.brake,.pedal{width:86px;height:78px}.game-footer{font-size:11px}.result-panel{max-width:420px}.scene-note{font-size:13px}}
@media(max-width:359px){.masthead{height:70px;padding:8px;gap:5px}.wordmark{width:calc(100% - 106px)}.dashboard{height:48px;padding:0 12px;gap:9px}.stat-value{font-size:21px}.route{height:29px}.control-deck{padding-left:12px;padding-right:12px;gap:8px;height:108px}.lean-controls,.pedal-controls{gap:7px}.lean-back,.lean-forward{width:49px;height:48px}.brake,.pedal{width:68px;height:64px}.panel{left:10px;right:10px;padding:10px}.goal{font-size:11px}.eyebrow{font-size:8px}.course-card{min-height:46px}.game-footer{height:44px}.grip-row{font-size:9px;padding:0 11px}.grip-label{font-size:7px}}
@media(max-height:740px){.masthead{height:65px;padding-top:6px}.wordmark{max-height:55px}.dashboard{height:45px}.route{height:27px}.setup{padding:9px}.goal{margin-bottom:7px}.course-list{gap:5px}.course-card{min-height:44px}.course-card strong{font-size:13px}.course-card small{display:none}.control-deck{height:101px}.grip-row{height:25px}.result-panel{padding:12px}.result-panel h2{font-size:25px}.result-panel p:not(.eyebrow){font-size:12px;margin:5px 0 8px}}
@media(prefers-reduced-motion:reduce){button{transition:none}}
