:root{color-scheme:dark;--bg:#101723;--panel:#192535;--ink:#eef3ff;--muted:#a2b2c9;--accent:#8ce4d0;--line:#71849a;--red:#ff6d82}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;background:radial-gradient(ellipse at 50% 0,#22394a 0,var(--bg) 60%);color:var(--ink);font-family:system-ui,-apple-system,sans-serif;min-height:100dvh}main{max-width:510px;margin:auto;padding:max(12px,env(safe-area-inset-top)) 12px max(18px,env(safe-area-inset-bottom))}button,a{touch-action:manipulation;-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer}button:disabled{opacity:.35;cursor:default}button:focus-visible,a:focus-visible{outline:2px solid var(--accent);outline-offset:2px}a{color:var(--accent)}#home{text-align:center;padding-top:clamp(25px,8vh,90px)}.eyebrow{font-size:12px;color:var(--muted);letter-spacing:.15em}h1{font-size:95px;line-height:1;margin:18px 0 36px;color:var(--accent);font-weight:300}.homegrid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.tile{border:1px solid #3b5367;background:linear-gradient(155deg,#273f4f,#172332);border-radius:22px;min-height:190px;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;font-size:25px}.tileArt{font-size:65px;color:var(--accent);line-height:1;display:flex;flex-direction:column;gap:10px}.tileArt small{font-size:23px}.tileArt.numbers{font-size:25px;line-height:1.18;letter-spacing:.15em}.tile>small{font-size:12px;color:var(--muted)}.homeTools,.tools,header,.hud{display:flex;align-items:center;justify-content:space-between;gap:8px}.homeTools{justify-content:center;margin-top:28px}.homeTools button,.homeTools a,.tool{display:grid;place-items:center;min-width:44px;min-height:44px;border:1px solid #3c5065;background:var(--panel);border-radius:12px;text-decoration:none;font-size:22px;padding:4px 8px}.homeTools a{color:var(--ink)}.stage{display:flex;align-items:center;gap:9px;font-size:26px;font-variant-numeric:tabular-nums}.stage span{color:var(--accent)}header{margin-bottom:12px}.chapters{display:grid;grid-template-columns:repeat(10,1fr);gap:3px;margin:8px 0 12px}.chapter{display:grid;place-items:center;font-size:17px;height:29px;background:#1c2838;border-radius:6px;color:#657890}.chapter.done{color:#9fe6d3}.chapter.current{background:#315c60;color:#fff;outline:1px solid var(--accent)}.hud{font-size:22px;font-variant-numeric:tabular-nums;margin-bottom:10px}.hud #hearts{color:var(--red);letter-spacing:2px}.hud #clock{color:var(--accent)}.hud #clock.urgent{color:var(--red)}.track{height:5px;background:#293b4e;border-radius:4px;overflow:hidden;margin:0 0 12px}.track i{display:block;height:100%;width:0;background:var(--accent);transition:width .15s}.memory{display:flex;align-items:center;gap:8px;color:var(--accent);height:24px}.memory .track{flex:1;margin:0}.board{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));border:2px solid var(--line);border-radius:5px;overflow:hidden;--glyph:clamp(14px,5vw,25px)}.cell{position:relative;aspect-ratio:1;display:grid;place-items:center;border:0;border-right:1px solid #35475a;border-bottom:1px solid #35475a;background:#1b2939;padding:0;min-width:0;border-radius:0}.cell.fixed{background:#293d4e}.cell.filled{color:var(--accent)}.cell.peer{background:#263a4b}.cell.selected{background:#345c62;box-shadow:inset 0 0 0 2px var(--accent)}.cell.scar:after{content:'×';color:var(--red);position:absolute;font-size:11px;font-weight:800;right:2px;top:0}.cell.heavyR{border-right:2px solid var(--line)}.cell.heavyB{border-bottom:2px solid var(--line)}.cell.lastR{border-right:0}.cell.lastB{border-bottom:0}.cell:focus-visible{outline-offset:-2px}.token{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:2px;width:100%;height:100%;pointer-events:none;line-height:1}.glyph,.combined{font-size:var(--glyph,25px);font-weight:650}.token svg{width:84%;height:75%;overflow:visible}.swatch{width:49%;aspect-ratio:1;border:1px solid #c8d4e5;border-radius:50%}.channels{display:flex;gap:2px;width:65%;height:5px}.channel{flex:1;background:#425063;display:flex;align-items:flex-end;border:1px solid #7a8a9e;border-radius:1px;overflow:hidden}.channel i{width:100%;display:block;background:#e8efff}.palette{display:grid;grid-template-columns:repeat(9,minmax(0,1fr));gap:3px;margin:14px 0;--glyph:clamp(14px,5vw,25px)}.choice{border:1px solid #40546a;background:#223346;border-radius:8px;aspect-ratio:1;min-width:0;padding:0;display:grid;place-items:center;min-height:34px}.choice.tried{opacity:.25;box-shadow:inset 0 0 0 1px var(--red)}.tools{justify-content:center;flex-wrap:wrap}.reward{color:var(--accent)}#attempts,#status,#storageStatus{min-height:22px;font-size:13px;text-align:center;color:var(--muted);margin:6px 0}#attempts{display:flex;justify-content:center;gap:5px;color:var(--red)}#attempts .token{width:24px;height:24px}#result{text-align:center;padding:10px;border:1px solid #425c72;border-radius:16px;background:var(--panel)}#resultIcon{font-size:32px;color:var(--accent);margin-bottom:8px}.primary{border:0;background:var(--accent);color:#102e32;border-radius:10px;min-height:44px;min-width:65px;font-size:23px;padding:6px 14px;margin:3px}dialog{background:#1c2b3d;color:var(--ink);border:1px solid #526d80;border-radius:20px;max-width:min(90vw,370px);padding:20px;text-align:center}dialog::backdrop{background:#000a}.ruleTitle{font-size:23px;margin:12px 0}.ruleBoard{display:grid;grid-template-columns:repeat(9,1fr);gap:1px;margin:12px auto;max-width:250px}.ruleBoard span{aspect-ratio:1;background:#304657;display:grid;place-items:center;font-size:15px}.ruleBoard span:nth-child(3n){border-right:2px solid var(--accent)}.ruleBoard span:nth-child(n+19):nth-child(-n+27),.ruleBoard span:nth-child(n+46):nth-child(-n+54){border-bottom:2px solid var(--accent)}.good{color:var(--accent)}.bad{color:var(--red)}#adText{font-size:13px}#adDialog a{font-size:13px}@media(max-width:360px){main{padding-left:7px;padding-right:7px}.palette{gap:2px}.choice{min-height:31px}.chapter{font-size:15px}}@media(prefers-reduced-motion:reduce){*{transition:none!important}}
