html,body{touch-action:none;overscroll-behavior:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;background:#8fd3ff;height:100%;margin:0;overflow:hidden}#app{position:fixed;inset:0}#app canvas{width:100%;height:100%;display:block}#debug-overlay{top:max(6px, env(safe-area-inset-top));color:#fff;pointer-events:none;z-index:40;background:#0000008c;border-radius:6px;margin:0;padding:4px 7px;font:10px/1.3 ui-monospace,Menlo,Consolas,monospace;position:fixed;left:50%;transform:translate(-50%)}.fatal{text-align:center;color:#023047;place-items:center;padding:24px;font:600 20px/1.4 system-ui,sans-serif;display:grid;position:fixed;inset:0}.loading{color:#023047;z-index:5;place-items:center;font:700 22px/1.4 system-ui,sans-serif;display:grid;position:fixed;inset:0}#touch-controls{z-index:8;display:none;position:fixed;inset:0}#touch-controls.visible{display:block}.tc-zone{touch-action:none;position:absolute;top:0;bottom:0}.tc-left{width:45%;left:0}.tc-right{width:55%;right:0}.tc-stick{left:max(28px, env(safe-area-inset-left));bottom:max(28px, env(safe-area-inset-bottom));pointer-events:none;background:#ffffff38;border:3px solid #ffffffa6;border-radius:50%;width:136px;height:136px;position:absolute;box-shadow:0 2px 10px #0000002e}.tc-stick.active{background:#ffffff52}.tc-knob{background:#fff;border-radius:50%;width:66px;height:66px;margin:-33px 0 0 -33px;position:absolute;top:50%;left:50%;box-shadow:0 3px 8px #00000040}.tc-jump{right:max(32px, env(safe-area-inset-right));bottom:max(36px, env(safe-area-inset-bottom));touch-action:none;background:#ff9f1c;border:4px solid #ffffffe6;border-radius:50%;place-items:center;width:96px;height:96px;padding:0;display:grid;position:absolute;box-shadow:0 4px 12px #00000040}.tc-jump.pressed{background:#f08a00;transform:scale(.92)}#rotate-prompt{display:none}@media (orientation:portrait) and (pointer:coarse){#rotate-prompt{z-index:50;color:#fff;text-align:center;background:#1f80bd;flex-direction:column;justify-content:center;align-items:center;gap:18px;padding:24px;font:800 24px/1.35 system-ui,sans-serif;display:flex;position:fixed;inset:0}#rotate-prompt .rp-phone{transform-origin:60px 54px;animation:2.4s ease-in-out infinite rp-turn}}@keyframes rp-turn{0%,30%{transform:rotate(0)}60%,to{transform:rotate(-90deg)}}.tc-gas,.tc-brake,#vehicle-button{touch-action:none;border:4px solid #ffffffe6;border-radius:50%;place-items:center;padding:0;display:grid;position:absolute;box-shadow:0 4px 12px #00000040}.tc-gas{right:max(28px, env(safe-area-inset-right));bottom:max(30px, env(safe-area-inset-bottom));background:#2a9d5c;width:104px;height:104px}.tc-gas.pressed{background:#21844c;transform:scale(.92)}.tc-brake{right:calc(max(28px, env(safe-area-inset-right)) + 120px);bottom:max(24px, env(safe-area-inset-bottom));background:#e63946;width:84px;height:84px}.tc-brake.pressed{background:#c92a37;transform:scale(.92)}#vehicle-button{z-index:9;right:max(40px, env(safe-area-inset-right));bottom:calc(max(36px, env(safe-area-inset-bottom)) + 118px);background:#2f7fd8;width:84px;height:84px;animation:.25s ease-out vb-pop;position:fixed}#vehicle-button.exit{background:#f28c28}#vehicle-button.pressed{transform:scale(.92)}#vehicle-button[hidden],.tc-gas[hidden],.tc-brake[hidden],.tc-jump[hidden]{display:none}#vehicle-button .key{color:#1d3557;text-align:center;background:#fff;border-radius:6px;min-width:24px;height:24px;font:800 14px/24px system-ui,sans-serif;position:absolute;top:-6px;right:-6px;box-shadow:0 2px 4px #00000040}@media (pointer:coarse){#vehicle-button .key{display:none}}@keyframes vb-pop{0%{opacity:0;transform:scale(.6)}to{opacity:1;transform:scale(1)}}:root{--ink:#1d3557;--gold:#ffc93c;--gold-dark:#f29e1f;--blue:#2f7fd8;--green:#2a9d5c;--orange:#f28c28;--red:#e76f51;--gutter-l:max(10px, env(safe-area-inset-left));--gutter-r:max(10px, env(safe-area-inset-right));--gutter-t:max(10px, env(safe-area-inset-top));--gutter-b:max(12px, env(safe-area-inset-bottom));--card-w:min(280px, 34vw);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}#hud[hidden],#job-card[hidden],#leave-job[hidden],#action-button[hidden],#caption[hidden],#map-screen[hidden]{display:none}#hud button,#center-stack button,#reward button,#title-screen button{font:inherit;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}.hud-top-left{z-index:26;top:var(--gutter-t);left:var(--gutter-l);flex-direction:column;align-items:flex-start;gap:10px;display:flex;position:fixed}.hud-top-right{z-index:26;top:var(--gutter-t);right:var(--gutter-r);align-items:center;gap:10px;display:flex;position:fixed}#job-card{width:var(--card-w);border:4px solid var(--gold);min-height:76px;color:var(--ink);text-align:left;background:#fffdf5;border-radius:20px;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;padding:8px 10px 16px 8px;display:grid;position:relative;box-shadow:0 5px 14px #00000038}#job-card.new{animation:.5s cubic-bezier(.3,1.6,.5,1) jc-new}#job-card.pressed{transform:scale(.97)}.jc-parcel{place-items:center;display:grid}.jc-body{flex-direction:column;gap:1px;min-width:0;display:flex}.jc-street{font-family:inherit;font-size:18px;font-weight:800}.jc-number{color:#c2410c;font-family:inherit;font-size:28px;font-weight:900;line-height:1.05}.jc-clue-icons{align-items:center;gap:4px;display:flex}.jc-clue{font-family:inherit;font-size:14px;font-weight:700;line-height:1.2}.jc-replay{color:#fff;background:var(--blue);border-radius:50%;place-items:center;width:46px;height:46px;display:grid;box-shadow:0 2px 5px #0003}.jc-dots{gap:6px;display:flex;position:absolute;bottom:5px;left:50%;transform:translate(-50%)}.jc-dots span{background:#e2dccb;border-radius:4px;width:18px;height:7px}.jc-dots span.done{background:var(--green)}.jc-dots span.now{background:var(--orange)}@keyframes jc-new{0%{opacity:0;transform:scale(.7)rotate(-3deg)}to{opacity:1;transform:scale(1)rotate(0)}}#leave-job{background:var(--red);border:4px solid #fff;border-radius:50%;place-items:center;width:64px;height:64px;padding:0;display:grid;box-shadow:0 4px 10px #00000038}#leave-job.pressed,#map-button.pressed{transform:scale(.92)}body.map-open #leave-job,body.map-open #star-count{display:none}#map-button{background:var(--blue);border:5px solid #fff;border-radius:50%;place-items:center;width:78px;height:78px;padding:0;display:grid;box-shadow:0 4px 12px #00000040}#map-button.close{background:var(--red)}#star-count{border:4px solid var(--gold);height:58px;color:var(--ink);background:#fffdf5;border-radius:29px;align-items:center;gap:6px;padding:0 16px 0 10px;font-size:26px;font-weight:900;display:flex;box-shadow:0 4px 10px #0003}#star-count.bump{animation:.6s cubic-bezier(.3,1.8,.5,1) bump}@keyframes bump{0%{transform:scale(1)}40%{transform:scale(1.35)}to{transform:scale(1)}}.attention{animation:.9s ease-in-out infinite attention}@keyframes attention{0%,to{transform:scale(1);box-shadow:0 0 #ffc93cf2,0 4px 12px #00000040}50%{transform:scale(1.1);box-shadow:0 0 0 14px #ffc93c00,0 4px 12px #00000040}}.tc-stick.attention{animation:.9s ease-in-out infinite stick-attention}@keyframes stick-attention{0%,to{box-shadow:0 0 #ffc93cf2}50%{box-shadow:0 0 0 18px #ffc93c00}}#center-stack{z-index:36;left:50%;bottom:var(--gutter-b);pointer-events:none;flex-direction:column;align-items:center;gap:10px;width:min(46vw,440px);display:none;position:fixed;transform:translate(-50%)}#center-stack.live{display:flex}#caption{color:#fff;background:#1d3557e6;border-radius:20px;align-items:center;gap:8px;max-width:100%;padding:6px 14px 6px 6px;font-size:17px;font-weight:700;line-height:1.25;display:flex;box-shadow:0 4px 12px #00000040}#caption[data-speaker=resident]{background:#1f6f63ed}#caption.pop{animation:.25s ease-out cap-pop}.cap-icon{background:#fff;border-radius:50%;flex:none;place-items:center;width:40px;height:40px;display:grid}@keyframes cap-pop{0%{opacity:.2;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}#action-button{pointer-events:auto;border:6px solid #fff;border-radius:50%;place-items:center;width:118px;height:118px;padding:0;animation:.35s cubic-bezier(.3,1.7,.5,1) action-in,1.4s ease-in-out .4s infinite action-pulse;display:grid;box-shadow:0 6px 16px #0000004d}#action-button[data-kind=deliver]{background:var(--orange)}#action-button[data-kind=startCourier]{background:var(--green)}#action-button.pressed{transform:scale(.9)}body.map-open #action-button{display:none}body.map-open #center-stack{left:var(--gutter-l);top:var(--gutter-t);width:var(--card-w);align-items:flex-start;bottom:auto;transform:none}body.map-open.job-on #center-stack{top:calc(var(--gutter-t) + 108px)}body.map-open #caption{font-size:16px}body.on-title #touch-controls,body.on-title #vehicle-button,body.on-title #center-stack{display:none}@keyframes action-in{0%{opacity:0;transform:scale(.3)}to{opacity:1;transform:scale(1)}}@keyframes action-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.07)}}#reward{z-index:35;padding-top:max(14px, env(safe-area-inset-top));background:#142d5073;justify-content:center;align-items:flex-start;animation:.3s ease-out fade-in;display:flex;position:fixed;inset:0}.rw-card{border:5px solid var(--gold);background:#fffdf5;border-radius:30px;flex-direction:column;align-items:center;gap:8px;padding:12px 30px 14px;animation:.45s cubic-bezier(.3,1.5,.5,1) rw-in;display:flex;box-shadow:0 10px 30px #0000004d}.rw-stars{gap:8px;display:flex}.rw-star{opacity:0;animation:.55s cubic-bezier(.3,1.9,.5,1) forwards rw-star}.rw-star:nth-child(2) svg{transform:translateY(-14px)}.rw-parcels{gap:14px;display:flex}.rw-parcel{position:relative}.rw-parcel svg:last-child{background:var(--green);border:2px solid #fff;border-radius:50%;position:absolute;bottom:-4px;right:-8px}#reward-continue{background:var(--green);border:6px solid #fff;border-radius:50%;place-items:center;width:92px;height:92px;padding:0;animation:1.4s ease-in-out 2s infinite action-pulse;display:grid;box-shadow:0 5px 14px #00000047}@keyframes rw-in{0%{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}@keyframes rw-star{0%{opacity:0;transform:scale(0)rotate(-60deg)}to{opacity:1;transform:scale(1)rotate(0)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}#title-screen{z-index:45;background:linear-gradient(#8fd3ffd1 0%,#fff4cdc7 100%);flex-direction:column;justify-content:center;align-items:center;gap:6px;transition:opacity .4s,transform .4s;display:flex;position:fixed;inset:0}#title-screen.leaving{opacity:0;pointer-events:none;transform:scale(1.06)}.ts-logo{letter-spacing:.02em;gap:.35em;margin:0;font-size:clamp(44px,12vh,76px);font-weight:900;line-height:1;display:flex}.ts-word span{color:#fff;-webkit-text-stroke:3px var(--ink);paint-order:stroke fill;text-shadow:0 5px 0 var(--ink);animation:2.4s ease-in-out infinite ts-bob;display:inline-block}.ts-word span:nth-child(5n+1){color:#ff5d8f;animation-delay:0s}.ts-word span:nth-child(5n+2){color:var(--gold);animation-delay:.15s}.ts-word span:nth-child(5n+3){color:#4cc35a;animation-delay:.3s}.ts-word span:nth-child(5n+4){color:#38a8f5;animation-delay:.45s}.ts-word span:nth-child(5n+5){color:#ff9f1c;animation-delay:.6s}@keyframes ts-bob{0%,to{transform:translateY(0)}50%{transform:translateY(-6px)}}.ts-art{align-items:flex-end;gap:14px;margin:4px 0 8px;display:flex}#play-button{background:var(--green);border:7px solid #fff;border-radius:50%;place-items:center;width:clamp(110px,30vh,140px);height:clamp(110px,30vh,140px);padding:0 0 0 8px;animation:1.3s ease-in-out infinite action-pulse;display:grid;box-shadow:0 7px #1d7a44,0 12px 24px #00000040}#play-button:active{transform:translateY(4px)scale(.96)}.ts-play-label{color:var(--ink);margin-top:6px;font-size:26px;font-weight:900}.ts-corner{left:var(--gutter-l);bottom:var(--gutter-b);position:absolute}#map-screen{z-index:22;background:#7ccaf2;animation:.2s ease-out fade-in;position:fixed;inset:0}.map-svg{width:calc(100% - 156px);height:calc(100% - 12px);position:absolute;inset:6px 140px 6px 16px}body.job-on .map-svg{left:calc(var(--card-w) + 22px);width:calc(100% - var(--card-w) - 162px)}.map-compass{right:calc(var(--gutter-r) + 8px);bottom:var(--gutter-b);filter:drop-shadow(0 3px 6px #00000040);position:absolute}.map-compass text{text-anchor:middle;dominant-baseline:middle;fill:var(--ink);font-size:17px;font-weight:900}.map-compass .rose-n{fill:#e63946;font-size:19px}.map-label{fill:var(--ink);paint-order:stroke;stroke:#fff;stroke-width:3.5px;stroke-linejoin:round;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-weight:800}.map-sign{fill:#fff;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-weight:800}.minor-label{fill:#3c5266;font-weight:700}.map-num{fill:#fff;font-family:system-ui,sans-serif;font-weight:900}.map-child-pulse{transform-box:fill-box;transform-origin:50%;animation:1.2s ease-out infinite map-pulse}@keyframes map-pulse{0%{opacity:.5;transform:scale(.6)}to{opacity:0;transform:scale(1.6)}}@media (prefers-reduced-motion:reduce){#play-button,#action-button,#reward-continue,.attention,.tc-stick.attention,.ts-word span{animation:none}}
