.workspace{grid-template-columns:minmax(0,1.2fr) minmax(0,.8fr)}.preview{background:#302e3a;align-self:start}#board{display:grid;grid-template-columns:repeat(var(--n),minmax(0,1fr));max-width:480px;margin:auto;border:3px solid #c7bda7;background:#d8ceb7}.cell{position:relative;display:grid;place-items:center;border:1px solid #c8bea9;border-radius:0;aspect-ratio:1;min-width:0;padding:0;background:#f1e8d4;color:#4e483e}.cell.top{border-top:3px solid #5b5660}.cell.left{border-left:3px solid #5b5660}.cell.black{background:repeating-linear-gradient(135deg,#56536b 0 5px,#605d73 5px 7px);color:#fff1d0}.cell b{position:absolute;top:1px;left:4px;font-size:clamp(.77rem,2.4vw,1.13rem)}.cell.white:after{content:'';width:13%;aspect-ratio:1;background:#a58464;border-radius:50%}.cell.bad{box-shadow:inset 0 0 0 2px #dc7756}.cell:focus-visible{z-index:1;outline-offset:-4px}.actions{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.8rem}#tools button[aria-pressed=true]{background:#807389;color:white}#status{color:#eed5b1}.controls a{color:#cebcdb}@media(max-width:680px){.workspace{grid-template-columns:minmax(0,1fr)}}

.rules{margin:.3rem 0 .8rem;padding-left:1.2rem;line-height:1.6}.rules li{margin:.25rem 0}
:root:not([data-theme="light"]) #board{background:#958b77;border-color:#a89e88}
:root:not([data-theme="light"]) .cell{background:#b0a690;border-color:#978d79;color:#2c2924}
:root:not([data-theme="light"]) .cell.top{border-top-color:#3b3843}:root:not([data-theme="light"]) .cell.left{border-left-color:#3b3843}
:root:not([data-theme="light"]) .cell.black{background:repeating-linear-gradient(135deg,#3f3d50 0 5px,#4a4760 5px 7px);color:#f2e6cc}
:root:not([data-theme="light"]) .cell.white:after{background:#6e543c}
:root[data-theme="light"] .preview{background:#efeaf3}:root[data-theme="light"] #status{color:#6d4a1d}:root[data-theme="light"] .controls a{color:#5c4a73}
