:root{color-scheme:dark;font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans",sans-serif;background:#080c15;color:#f5f5fb;-webkit-text-size-adjust:100%}*{box-sizing:border-box}body{margin:0}button{font:inherit;color:inherit;border:1px solid #77879b;background:#1c293d;border-radius:8px;min-height:44px;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:disabled{opacity:.4}[hidden]{display:none!important}.shell{max-width:450px;margin:auto;padding:3px 4px max(4px,env(safe-area-inset-bottom));height:calc(100dvh - var(--nav-height,64px));min-height:510px}.stage{height:100%;position:relative;display:flex;flex-direction:column;min-width:0;padding:8px;border:1px solid #b6a079;border-radius:16px;background:radial-gradient(ellipse at top,#20374a,#0b1524 75%);overflow:hidden}.hud{display:flex;align-items:center;justify-content:space-between;gap:6px}.hud strong{color:#ffdf9c;font-size:18px}.hud span{font-size:12px}.hud button{padding:0 14px}.instruction{font-size:11px;color:#c7d3e1;text-align:center;margin:7px 0 2px}#board{width:100%;flex:1;min-height:260px;touch-action:none;user-select:none;overflow:visible}.controls{display:grid;grid-template-columns:1fr 1fr 1fr;gap:6px;align-items:center;text-align:center;font-size:13px}.buddy{display:flex;align-items:center;gap:7px;min-height:80px}.buddy img{object-fit:contain}.buddy p{margin:0;font-size:12px;line-height:1.5}.buddy b,.buddy span,.buddy small{display:block}.buddy b{color:#ffdf9c}.buddy small{color:#b7c5d6;font-size:10px;margin-top:3px}.overlay{position:absolute;inset:0;background:#050912eb;display:grid;place-items:center;padding:16px;z-index:2}.panel{width:min(100%,320px);max-height:100%;overflow:auto;padding:20px 16px;display:flex;flex-direction:column;align-items:center;gap:12px;background:#152337;border:1px solid #b6a079;border-radius:12px;text-align:center}.panel img{object-fit:contain;max-height:24dvh}.panel h2{font-size:20px;margin:0;color:#ffe1a0}.panel p{font-size:13px;margin:0;line-height:1.6;white-space:pre-line}.panel button{width:100%;min-height:48px}.primary{background:#f1d398;color:#1c2330;border:0;font-weight:800}.ring{touch-action:none}.ring .halo{fill:none;stroke:#ffe1a0;stroke-width:2;opacity:0}.ring.selected .halo{opacity:.8}.ring.freed{opacity:.12;pointer-events:none}.metal{fill:none;stroke-linecap:round;stroke-width:12}.shine{fill:none;stroke:#fff;stroke-opacity:.45;stroke-width:3;stroke-linecap:round}.link{fill:#f1d398;stroke:#172738;stroke-width:2}.ring text{fill:#e6edf8;font-size:18px;font-weight:700;text-anchor:middle;pointer-events:none}.ring .count{font-size:10px;fill:#b9c9db}.spark{fill:#ffe1a0;animation:pop .7s ease-out forwards;pointer-events:none}@keyframes pop{to{opacity:0;transform:translateY(-14px)}}@media(max-height:700px){.buddy{min-height:64px}.buddy img{width:64px;height:64px}.instruction{margin:4px 0}.stage{padding:6px}}@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
