.play-layout{display:grid;grid-template-columns:minmax(0,560px) minmax(0,340px);gap:clamp(1.7rem,5vw,4.25rem);align-items:start}
#board{container-type:inline-size;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));border:1px solid #78634d;aspect-ratio:1}
.square{position:relative;display:grid;place-items:center;min-width:0;aspect-ratio:1;padding:0;border:0;border-radius:0;background:#ecdbbe;cursor:pointer}
.square.dark{background:#aa805e}
.square:focus-visible{outline-offset:-4px;z-index:1;outline-color:#2b4051}
.square[aria-pressed=true]{box-shadow:inset 0 0 0 4px #435c5b}
.square.last{background:#d8c989}
.square.dark.last{background:#b09b61}
.square.legal::after{content:"";position:absolute;width:23%;aspect-ratio:1;border-radius:50%;background:#345453b8}
.square.legal:has(.piece)::after{width:86%;border:3px solid #345453b8;background:none}
.piece{font:clamp(1rem,9.5cqw,3.5rem)/1 "DejaVu Sans","Segoe UI Symbol",sans-serif;color:#261c17}
.piece.white{color:#fff8e8;text-shadow:-1px -1px #3f2c20,1px -1px #3f2c20,-1px 1px #3f2c20,1px 1px #3f2c20}
.coord{position:absolute;font:700 clamp(.58rem,2.4cqw,.8rem)/1 var(--sans);color:#4c3220}
.coord.rank{top:3px;left:3px}
.coord.file{bottom:3px;right:3px}
.board-heading{display:flex;gap:.1rem 1rem;align-items:baseline;justify-content:space-between;flex-wrap:wrap;margin-bottom:.28rem}
.player-label{font-weight:700;margin:0 0 .28rem}
.board-heading .player-label{margin:0}
#bottom-player{margin:.35rem 0 0}
#board-help,#engine-note,.engine-links{color:var(--muted);font-size:.92rem;margin-top:.62rem}
.game-controls,.game-record{padding:1rem 1.1rem;background:var(--surface);border:1px solid var(--line);border-radius:3px}
#game-settings{display:grid;gap:.35rem}
#game-settings label{font-weight:700;font-size:.92rem}
#game-settings select{width:100%;min-width:0;margin-bottom:.55rem;padding:.45rem .75rem;min-height:44px;font:inherit;background:var(--paper);color:var(--ink);border:1px solid #9a8877;border-radius:3px}
#game-settings button{justify-self:start}
#queen-odds-note{color:var(--muted);font-size:.92rem;margin:0 0 .55rem}
#game-status{color:var(--muted);font-size:.93rem;font-weight:600;margin:0}
#retry{margin-top:.55rem}
[hidden]{display:none!important}
.game-record{margin-top:.8rem}
.game-record h2{font-size:1.48rem}
#moves{padding-left:1.65rem;max-height:10rem;overflow:auto;margin-block:.5rem}
#moves:empty{display:none}
#moves li{padding-right:.2rem}
#moves li span{display:inline-block;min-width:4em}
#promotion{max-width:min(90vw,440px);padding:1.25rem;border:1px solid var(--line);background:var(--paper);color:var(--ink)}
#promotion::backdrop{background:#241a1599}
@media(max-width:730px){.play-layout{grid-template-columns:minmax(0,1fr);max-width:575px}}
