/* C99 · V1.152. Adjacent grid cells are a continuous operation canvas. */
.chess-board{--cell:56px;display:grid;grid-template-columns:repeat(6,var(--cell));grid-template-rows:repeat(6,var(--cell));width:calc(var(--cell)*6);height:calc(var(--cell)*6);outline:1px solid #66615a;outline-offset:4px;background:#11151a;box-shadow:0 16px 48px #0006;touch-action:none}
.chess-cell{position:relative;display:grid;place-items:center;width:var(--cell);height:var(--cell);min-width:0;padding:0;border:0;border-radius:0;background:#1a2027;color:#e6c888;cursor:pointer;transition:background .15s,opacity .15s;touch-action:none}
.chess-cell:nth-child(12n+2),.chess-cell:nth-child(12n+4),.chess-cell:nth-child(12n+6),.chess-cell:nth-child(12n+7),.chess-cell:nth-child(12n+9),.chess-cell:nth-child(12n+11){background:#222b34}
.chess-cell svg{width:36px;height:36px;pointer-events:none;filter:drop-shadow(0 2px 2px #0008)}
.chess-cell[data-type="1"]{color:#aacbe9}.chess-cell[data-type="2"]{color:#92d3bb}.chess-cell[data-type="3"]{color:#e4a8b3}.chess-cell[data-type="4"]{color:#e5e0d7}
.chess-cell[data-special]:not([data-special=""]){color:#ffe3a0;background:#3b3024}
.chess-cell::after{content:'';position:absolute;inset:3px;pointer-events:none;border:1px solid transparent}
.chess-cell.is-sealed::after{border:1px solid #c7b7db;background:repeating-linear-gradient(135deg,#c9b7e812 0 2px,transparent 2px 8px)}
.chess-cell[aria-pressed="true"]::after{border:2px solid #ffd479;inset:1px}.chess-cell.is-hint::after{border:2px solid #5eead4;inset:1px}
.chess-cell.is-preview{background:#59503a}.chess-cell:focus-visible{outline:2px solid #fff;outline-offset:-3px;z-index:1}.chess-cell.is-clearing svg{transform:scale(1.2);opacity:0;transition:transform .18s,opacity .18s}.chess-cell.is-clearing{background:#786b48}
.chess-board[aria-busy="true"]{pointer-events:none}
@media(max-width:1000px),(max-height:560px){.chess-board{--cell:44px}.chess-cell svg{width:28px;height:28px}}
@media(prefers-reduced-motion:reduce){.chess-cell,.chess-cell svg{transition:none!important}}

/* C99 stage variant: use the available play area instead of fixed small cells. */
.chess-board.is-stage{--cell:clamp(56px,min(calc((100dvh - 144px)/6),calc((100vw - 480px)/6)),90px)}
.chess-board.is-stage .chess-cell svg{width:calc(var(--cell)*.66);height:calc(var(--cell)*.66)}
@media(max-width:1000px),(max-height:560px){.chess-board.is-stage{--cell:clamp(44px,min(calc((100dvh - 80px)/6),calc((100vw - 440px)/6)),90px)}}
