:root{font-family:ui-rounded,'Avenir Next',system-ui,sans-serif;color:#163e38;background:#e7e9df;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button{font:inherit;cursor:pointer;border:0;color:inherit;background:#fffdf6;border-radius:16px;padding:14px 18px;min-height:48px;font-weight:700}button:focus-visible{outline:3px solid #ce6549;outline-offset:3px}button:disabled{opacity:.45;cursor:default}#app{max-width:460px;margin:auto;background:#f9f5e9;min-height:100vh;padding:25px 22px 28px;position:relative}header,.row{display:flex;align-items:center;justify-content:space-between;gap:10px}header{margin-bottom:24px}.eyebrow{font-size:11px;font-weight:800;letter-spacing:2px;text-transform:uppercase;color:#5b7469}h1{font-size:44px;letter-spacing:-2px;line-height:1.05;margin:10px 0}h2{font-size:25px;letter-spacing:-.7px;margin:6px 0 12px}p{line-height:1.55;color:#5a7066;font-size:14px}.pill{border:1px solid #d1d9c9;padding:8px 12px;border-radius:30px;font-size:12px;font-weight:700}.primary{background:#165e52;color:#fff;width:100%;box-shadow:0 5px 0 #10473e}.secondary{background:#e9b779}.card{background:#fffdf7;border:1px solid #e4e2d3;border-radius:24px;padding:20px;margin:16px 0}.hero{background:#e1ebd6;border-radius:28px;padding:24px;margin:20px 0;overflow:hidden;position:relative}.hero svg{width:100%;height:150px}.hero p{margin-bottom:0}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.two .card{margin:0;padding:18px}.two button{background:none;padding:0;text-align:left;width:100%}.symbol{font-size:26px;display:block;margin-bottom:10px}.muted{font-size:12px;color:#63796f}nav{display:flex;gap:8px;margin-top:24px;justify-content:center}nav button{font-size:12px;padding:12px}.bar{height:7px;background:#e5e8dc;border-radius:9px;overflow:hidden;margin:12px 0}.bar i{display:block;background:#2d8a73;height:100%}.budget{letter-spacing:6px;color:#ca684c;font-size:24px}.board{overflow:auto;max-height:490px;border-radius:24px;background:#fffdf7;border:1px solid #e4e2d3;margin:18px 0}.board svg{display:block;width:100%;min-width:100%;touch-action:pan-x pan-y}.path{cursor:pointer;outline:none}.path:focus-visible .line{stroke:#000;stroke-width:9}.line{fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:5}.hit{fill:none;stroke:transparent;stroke-width:19}.hint .line{stroke:#d27b1f;stroke-width:9}.tools{display:flex;gap:8px;flex-wrap:wrap}.tools button{font-size:12px;padding:10px 13px;background:#e7ebde}.notice{background:#f7dfb8;border-radius:16px;padding:14px;font-size:13px;line-height:1.5;margin:16px 0}.podium{display:flex;align-items:end;gap:8px;margin:30px 0 20px}.podium>div{flex:1;text-align:center;background:#e5e9d8;border-radius:22px 22px 10px 10px;padding:20px 5px;height:155px}.podium>div:nth-child(2){height:195px;background:#efd199}.podium b{display:block;font-size:34px;margin:12px}.podium small{display:block}.track{display:flex;justify-content:space-between;margin-top:18px}.track span{background:#edf0e4;padding:9px;border-radius:10px;font-size:12px}.track span:first-child{background:#165e52;color:white}.overlay{position:fixed;inset:0;background:#173f3888;display:grid;place-items:center;z-index:3;padding:20px}.dialog{width:min(400px,100%);background:#fffaf0;border-radius:28px;padding:26px;box-shadow:0 20px 70px #173f3855}.dialog button{margin-top:10px;width:100%}.toast{min-height:35px;font-size:13px;color:#8b4b32;padding-top:10px}label{display:block;margin:12px 0}footer{text-align:center;font-size:10px;color:#738174;margin-top:24px;letter-spacing:1px}@media(min-width:650px){#app{margin:24px auto;min-height:850px;border-radius:32px;box-shadow:0 24px 80px #1c40391a}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
/* Motion remains inside the board: paths feed along their own original route. */
.board svg{overflow:hidden}.path.exiting{pointer-events:none}.path.bumping{stroke:#ba4b32!important}.contact-ring{fill:none;stroke:#ba4b32;stroke-width:4;pointer-events:none}#app[aria-busy="true"] .path{pointer-events:none}

.motion-overlay{position:fixed;inset:0;width:100vw;height:100vh;overflow:hidden;pointer-events:none;z-index:2}.motion-overlay .exiting{stroke:#237e70!important}.motion-wake{fill:none;stroke:#8dbbb0;stroke-width:5;stroke-linecap:round;stroke-linejoin:round;opacity:.5}.contact-obstacle .line{stroke:#b65d44;stroke-width:6}.blocked-trail .line{stroke:#b65d44}.motion-overlay .line{stroke-width:5}.motion-overlay .path{outline:none}

/* Suppress native touch rectangles only on puzzle arrows, including SVG hit targets. */
.board .path,.board .path *{-webkit-tap-highlight-color:transparent}
/* Keep keyboard focus visible even on a previously blocked or hinted arrow. */
.board .path:focus-visible .line{stroke:#000;stroke-width:9}

.coach{border-left:4px solid #a47726;background:#fff5db;border-radius:12px;padding:12px 16px;margin-top:14px}.coach p{margin:7px 0}.coach button{padding:8px 12px;min-height:44px;font-size:12px}

/* Keep the board pannable and pinch-zoomable; custom hit testing does not cancel gestures. */
.board svg{touch-action:pan-x pan-y pinch-zoom;-webkit-tap-highlight-color:transparent}
