*{box-sizing:border-box}body{margin:0;background:#faf7ef;color:#243a42;font-family:system-ui,sans-serif}button{font:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible{outline:3px solid #bd6725;outline-offset:3px}main{max-width:980px;margin:auto;padding:20px 28px}header{display:flex;align-items:center;justify-content:space-between;padding:8px 0 18px;position:sticky;top:0;background:#faf7ef;z-index:5}.eyebrow{font-size:10px;font-weight:800;letter-spacing:1.6px;color:#57766d}h1{font-size:clamp(26px,5vw,40px);letter-spacing:-1.5px;margin:5px 0}h1 span{color:#df8a43}.clock{width:76px;height:76px;border:3px solid #a7d4ba;border-radius:50%;background:white;display:flex;align-items:center;justify-content:center;flex-direction:column;flex-shrink:0}.clock strong{font-size:29px;font-variant-numeric:tabular-nums}.clock span{font-size:10px}.clock.urgent{border-color:#e59060;background:#fff0e2;color:#964715}.game{background:white;border:1px solid #e4e5d9;border-radius:22px;padding:22px 26px;box-shadow:0 12px 35px #325b3910}.levelbar{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13px}.levelbar strong{background:#e4f1e7;color:#21644f;padding:7px 12px;border-radius:20px}.levelbar span{color:#687977}.instruction{font-size:15px;line-height:1.45;margin:14px 0 20px}.instruction b{background:#ffeb9d;padding:0 4px;border-radius:4px}.labels{display:flex;justify-content:space-between;font-size:10px;color:#71817d;letter-spacing:1px;font-weight:700;margin-bottom:8px}.board{position:relative;display:flex;justify-content:space-between;gap:45px}.questions{width:76%;display:flex;flex-direction:column;gap:10px}.answers{width:14%;display:flex;flex-direction:column;gap:10px}.question,.answer{height:100px;background:#fff;border:2px solid #dfe9e4;border-radius:13px;position:relative;z-index:1;touch-action:none}.question{display:flex;align-items:center;justify-content:space-evenly;padding:8px;gap:4px}.question.selected{border-color:#28786b;box-shadow:0 0 0 3px #bce4d6}.question.matched,.answer.matched{border-color:var(--match);background:color-mix(in srgb,var(--match) 8%,white)}.answer{font-size:27px;font-weight:800;color:#28786b}.term{display:flex;align-items:center;gap:8px}.digit{font-size:25px;font-weight:800}.block{width:42px;height:76px;overflow:visible;flex-shrink:0}.plus{font-size:22px;color:#83968e}#lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:0}.actions{display:flex;gap:12px;margin-top:18px}.actions button{min-height:44px;padding:11px 16px;border-radius:12px;font-weight:700}.primary{border:0;background:#28786b;color:white;border-radius:12px;padding:13px 22px;min-height:46px;font-weight:750}.secondary{border:1px solid #cbd8d0;background:white;color:#55716a}.actions .primary{flex:1}.actions .secondary{flex:1}button:disabled{opacity:.4;cursor:default}#feedback{font-size:12px;color:#647a73;line-height:1.4;min-height:32px;margin:12px 0 0}footer{text-align:center;color:#7c8b80;font-size:11px;padding:15px}.overlay{position:fixed;inset:0;background:#203d3955;backdrop-filter:blur(5px);display:grid;place-items:center;padding:20px;z-index:10}.overlay[hidden]{display:none}.welcome{width:min(100%,410px);max-height:90svh;overflow:auto;background:#fffef9;border-radius:24px;padding:30px;text-align:center;box-shadow:0 20px 100px #1f413640}.badge{display:inline-grid;place-items:center;width:68px;height:68px;border-radius:21px;background:#ffdf79;color:#665019;font-size:35px;font-weight:850;transform:rotate(-6deg)}.welcome h2{font-size:30px;line-height:1.1;letter-spacing:-.8px}.welcome>p:not(.eyebrow){font-size:15px;line-height:1.6;color:#657973}.welcome .primary{width:100%}.correct{border-color:#2e9570!important}.incorrect{border-color:#d8865f!important}
@media(max-width:650px){main{padding:6px 10px}header{padding:5px 2px 9px}.eyebrow{font-size:8px}h1{font-size:28px}.clock{width:59px;height:59px}.clock strong{font-size:24px}.game{padding:12px;border-radius:16px}.instruction{font-size:12px;margin:10px 0}.labels{font-size:8px;letter-spacing:.4px}.board{gap:14px}.questions{width:80%}.answers{width:15%}.questions,.answers{gap:7px}.question,.answer{height:clamp(66px,calc((100svh - 310px)/5),92px);border-radius:9px}.question{padding:4px 2px;gap:0}.term{gap:2px}.digit{font-size:17px}.block{width:23px;height:55px}.plus{font-size:15px}.answer{font-size:21px}.actions{margin-top:12px;gap:8px}.actions button{font-size:12px;padding:9px 7px}#feedback{font-size:10px;margin-top:8px}.levelbar{font-size:11px}footer{display:none}}
@media(max-width:360px){.digit{font-size:15px}.block{width:20px}.term{gap:1px}.plus{font-size:12px}.question{padding:2px}.game{padding:9px}}

.clock{position:relative}.clock.urgent::before{content:'💣';position:absolute;right:calc(100% + 8px);font-size:30px;animation:bomb-tick 1s ease-in-out infinite}
@keyframes bomb-tick{0%,100%{transform:rotate(-10deg) scale(1)}50%{transform:rotate(10deg) scale(1.15)}}
@media(prefers-reduced-motion:reduce){.clock.urgent::before{animation:none}}

/* Each number is a separate, keyboard-accessible first-step button. */
.question{touch-action:pan-y}
.term{border:2px solid transparent;border-radius:9px;background:transparent;color:inherit;padding:3px;justify-content:center;min-width:0;flex:1;height:100%;touch-action:manipulation}
.term:hover:not(:disabled){background:#f3f8f4}
.term.picked{border-color:#ba7824;background:#fff0bb}
.term.bond-number{border-color:#28786b;background:#e2f3e8}
.term.bond-number:hover:not(:disabled){background:#d1eadb}
.question.bond-ready{touch-action:none;cursor:pointer}
.question.bond-ready::after{content:'10 ✓';position:absolute;right:5px;bottom:-5px;background:#28786b;color:white;font-size:10px;font-weight:800;line-height:16px;padding:0 5px;border-radius:6px}
.question .term:disabled{opacity:.65}
.questions{min-width:0}.answers{flex-shrink:0}
@media(max-width:650px){.term{padding:1px;gap:2px;flex-direction:column}.term .block{height:36px;width:23px}.term .digit{font-size:16px;line-height:18px}.question .plus{font-size:13px}.question.bond-ready::after{font-size:8px;line-height:12px;bottom:-4px}}
@media(max-width:360px){.term .block{width:20px;height:32px}.term .digit{font-size:15px}}
