*{box-sizing:border-box}body{margin:0;font-family:system-ui;background:#101b28;color:#e9f0fa}main{max-width:540px;margin:auto;padding:24px 18px}header{display:flex;justify-content:space-between;font-size:13px;color:#90a8b8}a{color:inherit;text-decoration:none}h1{font-size:44px;margin:22px 0 4px;letter-spacing:-2px}h1 span{color:#ffbc67}#name{color:#80dce5;margin:0}.intro{color:#9ab1bf;line-height:1.5;font-size:14px}#sequence{display:flex;align-items:center;gap:12px;justify-content:center;margin:20px 0}.resonator{display:grid;place-items:center;border:2px solid currentColor;border-radius:50%;width:42px;height:42px;color:#70dae8}.gold{color:#ffc473}.resonator.hit{background:currentColor}.resonator.hit span{color:#10202a}#board{display:grid;grid-template-columns:repeat(5,1fr);gap:3px;aspect-ratio:1;background:#0c1520;padding:8px;border-radius:18px;border:1px solid #344b5f}.cell{position:relative;border:0;border-radius:8px;min-width:0;aspect-ratio:1;background:#182738;color:#7a94aa;padding:0}.tile{cursor:pointer;background:#20364a}.cell svg{width:100%;height:100%;display:block}.cell line{stroke:currentColor;stroke-width:8;stroke-linecap:round}.cell text{font:22px system-ui;fill:currentColor;text-anchor:middle;dominant-baseline:central}.cell .label{position:absolute;inset:0;display:grid;place-items:center;color:#70dae8;font-weight:bold;font-size:18px}.cell .label.gold{color:#ffc473}.cell.active{color:#fff4ca;background:#385b65;box-shadow:0 0 16px #9de9ee88}.cell.active.gold{background:#665236}.endpoint{color:#b8d3d9;background:#233f47}.actions{display:flex;gap:8px;flex-wrap:wrap}button{font:inherit;touch-action:manipulation}button:focus-visible{outline:3px solid #ffe0a9;outline-offset:2px}.actions button{min-height:46px;border:1px solid #527389;border-radius:10px;padding:10px 16px;background:#274658;color:#fff}#run,#next{background:#80dce5;color:#12222d;font-weight:700}button:disabled{opacity:.5}#status{min-height:46px;color:#c6d6e1;font-size:14px;line-height:1.5}footer{font-size:12px;color:#9ab1bf;margin-top:20px}[hidden]{display:none!important}@media(prefers-reduced-motion:reduce){*{animation:none!important}}
.cell.tile:disabled,.cell.endpoint:disabled{opacity:1;cursor:default}.cell .label{font-size:20px;text-shadow:0 0 3px #101b28,0 0 3px #101b28}.cell.hit{box-shadow:inset 0 0 0 2px #70dae8}.cell.hit .label.gold{color:#ffc473}

/* The actual run remains readable until the next edit or run. */
.cell.visited{color:#b7ecf1;background:#294652;box-shadow:inset 0 0 0 2px #70dae8}
.cell.visited-gold{color:#ffe0a8;box-shadow:inset 0 0 0 2px #ffc473;background:#514735}
.cell.visited::after{content:'·';position:absolute;bottom:0;left:5px;font-size:24px;line-height:1;color:currentColor}
.cell.failed{outline:3px solid #ffb2a1;outline-offset:-3px;background:#5a3038;color:#ffd3c7}
.failure-marker{position:absolute;right:2px;top:1px;width:22px;height:22px;line-height:21px;border-radius:50%;background:#903c44;color:white;font-size:20px;font-weight:800;z-index:2}

.cell.visited.active{background:#385b65;color:#fff4ca;outline:2px solid #fff4ca;outline-offset:-4px}
.cell.visited.active.gold{background:#665236}
.cell.visited.active.failed{outline:3px solid #ffb2a1;outline-offset:-3px;background:#5a3038;color:#ffd3c7}

.cell .branch-open{stroke:#d6f8ec}.cell .branch-closed{stroke:#62778b;stroke-width:4;stroke-dasharray:4 8}.fork-pivot{fill:#122c35;stroke:#d6f8ec;stroke-width:4}.fork{box-shadow:inset 0 0 0 1px #809e9a}details{margin-top:20px;font-size:13px;color:#9ab1bf;line-height:1.5}summary{cursor:pointer}#status:empty{min-height:20px}

.cell.fork .label{inset:auto 4px 3px auto;background:#182738;border:1px solid currentColor;border-radius:50%;width:24px;height:24px;font-size:15px}
