.chess-page{padding-bottom:80px;overflow-x:clip}.chess-game{padding-top:32px}.chess-game [hidden]{display:none!important}.chess-heading{border-bottom:1px solid var(--line);justify-content:space-between;align-items:end;gap:24px;padding-bottom:32px;display:flex}.chess-heading .eyebrow{margin-bottom:14px}.chess-heading h1{letter-spacing:-1.5px;font-size:clamp(36px,5vw,56px);font-weight:600}.chess-intro{max-width:560px;color:var(--muted);margin-top:16px;font-size:17px}.chess-back{min-height:44px;text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:6px;white-space:nowrap;align-items:center;gap:10px;font-size:14px;font-weight:600;display:inline-flex}.chess-layout{grid-template-columns:minmax(0,1fr) 280px;align-items:start;gap:32px;margin-top:32px;display:grid}.chess-play-area{min-width:0}.chess-controls{border:1px solid var(--line);background:var(--surface);border-radius:4px;flex-wrap:wrap;align-items:end;gap:16px 20px;padding:20px;display:flex}.chess-controls label{min-width:min(164px,100%);color:var(--muted);gap:6px;font-size:12px;display:grid}.chess-controls select{border:1px solid var(--ink);background:var(--paper);width:100%;min-height:44px;color:var(--ink);font:inherit;border-radius:4px;padding:8px 32px 8px 10px;font-size:14px}.chess-actions{flex-wrap:wrap;gap:8px;display:flex}.chess-button{border:1px solid var(--ink);background:var(--paper);min-height:44px;color:var(--ink);font:inherit;cursor:pointer;transition:background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);border-radius:4px;justify-content:center;align-items:center;padding:10px 14px;font-size:14px;font-weight:600;line-height:1.4;display:inline-flex}.chess-button.primary{border-color:var(--ink);background:var(--ink);color:var(--paper)}.chess-button[disabled]{cursor:not-allowed;opacity:.55}.chess-board-wrap{width:min(100%,680px);margin:28px auto 0}.chess-board{aspect-ratio:1;contain:layout paint;isolation:isolate;background:#edf0df;border:1px solid #465342;border-radius:5px;grid-template-rows:repeat(8,minmax(0,1fr));grid-template-columns:repeat(8,minmax(0,1fr));width:100%;display:grid;position:relative;overflow:hidden;box-shadow:0 14px 30px #26312229}.chess-cell{width:100%;min-width:0;height:100%;min-height:0;color:var(--ink);cursor:pointer;touch-action:manipulation;border:0;place-items:center;padding:0;display:grid;position:relative;overflow:hidden}.chess-cell.light{background:#ede9d4}.chess-cell.dark{background:#7f936f}.chess-cell:before{z-index:1;content:"";opacity:0;width:34%;height:34%;transition:opacity .15s var(--ease), transform .15s var(--ease), background-color .15s var(--ease), box-shadow .15s var(--ease);border:2px solid #0000;border-radius:50%;position:absolute;transform:scale(.7)}.chess-piece{z-index:3;opacity:0;width:78%;height:78%;transition:opacity .17s var(--ease), transform .17s var(--ease), filter .17s var(--ease);place-items:center;font-family:Segoe UI Symbol,Arial Unicode MS,serif;font-size:clamp(28px,7.4vw,62px);line-height:1;display:grid;position:relative;transform:translateY(0)scale(.88)}.chess-cell[data-side=white] .chess-piece,.chess-cell[data-side=black] .chess-piece{opacity:1;transform:translateY(0)scale(1)}.chess-cell[data-side=white] .chess-piece{color:#fbf8eb;filter:drop-shadow(0 1px #2e342c)drop-shadow(0 0 1px #2e342c)}.chess-cell[data-side=black] .chess-piece{color:#20251f;filter:drop-shadow(0 1px #ffffff40)}.chess-cell[data-selected=true] .chess-piece{filter:drop-shadow(0 7px 4px #22271f40);transform:translateY(-6%)scale(1.08)}.chess-cell[data-selected=true]:after{z-index:2;content:"";border:3px solid #294c91;border-radius:4px;position:absolute;inset:6px;box-shadow:inset 0 0 0 2px #ffffff8c}.chess-cell[data-legal=true]:before{opacity:1;background:#1c543875;transform:scale(1)}.chess-cell[data-capture=true]:before{background:0 0;border-color:#873d2d;width:76%;height:76%;box-shadow:inset 0 0 0 3px #fff4e373}.chess-cell[data-last-from=true],.chess-cell[data-last-to=true]{box-shadow:inset 0 0 0 999px #f4d64c47}.chess-cell[data-check=true]{box-shadow:inset 0 0 0 999px #9d312a80}.chess-cell[data-animating-to=true] .chess-piece{opacity:0}.chess-cell[data-disabled=true]{cursor:default}.chess-cell:focus-visible{z-index:8;outline-offset:-4px;outline:3px solid #1f4e9a}.chess-coordinate{z-index:5;color:#1f261db3;font-family:var(--mono);pointer-events:none;font-size:clamp(8px,1.5vw,11px);font-weight:700;position:absolute;top:3px;left:4px}.chess-cell.dark .chess-coordinate{color:#faf7e8d1}.chess-motion-piece{z-index:12;pointer-events:none;transition:var(--chess-motion-transition,none);will-change:transform, opacity;place-items:center;font-family:Segoe UI Symbol,Arial Unicode MS,serif;font-size:clamp(28px,7.4vw,62px);line-height:1;display:grid;position:absolute}.chess-motion-piece[data-side=white]{color:#fbf8eb;filter:drop-shadow(0 5px 3px #1f231d66)drop-shadow(0 0 1px #2e342c)}.chess-motion-piece[data-side=black]{color:#20251f;filter:drop-shadow(0 5px 3px #1f231d52)}.chess-board-help{color:var(--muted);margin:12px 0 0;font-size:12px}.chess-status{background:var(--surface);border-top:3px solid #687f5d;padding:20px;position:sticky;top:20px}.chess-status-kicker{color:var(--muted);font-family:var(--mono);letter-spacing:.7px;text-transform:uppercase;font-size:11px}.chess-turn{margin-top:8px;font-size:20px;font-weight:600;line-height:1.35}.chess-stats{border-top:1px solid var(--line);gap:0;margin:20px 0 0;display:grid}.chess-stats>div{border-bottom:1px solid var(--line);justify-content:space-between;gap:12px;padding:9px 0;font-size:13px;display:flex}.chess-stats dt{color:var(--muted)}.chess-stats dd{text-align:right;overflow-wrap:anywhere;max-width:64%;margin:0;font-weight:600}.chess-stats .chess-moves-row{display:block}.chess-stats .chess-moves-row dd{text-align:left;max-width:none}.chess-moves{overflow-anchor:none;overscroll-behavior:contain;scrollbar-gutter:stable;max-height:176px;font-family:var(--mono);background:#ffffff73;grid-template-columns:repeat(2,minmax(0,1fr));margin:8px 0 0;padding:8px 8px 8px 30px;font-size:11px;font-weight:500;line-height:1.55;display:grid;overflow:auto}.chess-rules{border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-top:20px}.chess-rules summary{cursor:pointer;min-height:44px;padding:12px 20px 12px 0;font-size:14px;font-weight:600}.chess-rules div{color:var(--muted);padding:0 0 16px;font-size:13px;line-height:1.7}.chess-rules p+p{margin-top:10px}.chess-live{min-height:1.65em;color:var(--muted);margin-top:18px;font-size:14px}.chess-dialog{border:1px solid var(--line);background:var(--paper);width:min(430px,100% - 32px);color:var(--ink);border-radius:4px;box-shadow:0 16px 56px #26292338}.chess-dialog::backdrop{background:#26292361}.chess-dialog h2{margin-top:8px;font-size:25px;font-weight:500}.chess-dialog p:not(.chess-status-kicker){color:var(--muted);margin-top:12px}.chess-dialog-actions,.chess-promotion-options{flex-wrap:wrap;gap:10px;margin-top:24px;display:flex}.chess-promotion{flex:86px;gap:8px}.chess-promotion span{font-family:Segoe UI Symbol,serif;font-size:25px}@media (hover:hover) and (pointer:fine){.chess-back:hover{color:var(--accent);text-decoration-color:var(--accent)}.chess-button:not([disabled]):hover{border-color:var(--accent);background:var(--surface)}.chess-button.primary:not([disabled]):hover{background:var(--accent);color:var(--paper)}.chess-cell:not([data-disabled=true]):hover .chess-piece{transform:translateY(-3%)scale(1.04)}}@media (width<=1023px){.chess-layout{grid-template-columns:1fr}.chess-status{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 24px;display:grid;position:static}.chess-status-kicker,.chess-turn{grid-column:1/-1}.chess-stats{grid-column:1}.chess-rules{grid-column:2;align-self:start;margin-top:20px}}@media (width<=767px){.chess-page{padding-bottom:48px}.chess-game{padding-top:20px}.chess-heading{padding-bottom:24px;display:block}.chess-heading h1{letter-spacing:-1px;font-size:36px}.chess-intro{font-size:16px}.chess-back{margin-top:14px}.chess-layout{gap:24px;margin-top:24px}.chess-controls{gap:12px;padding:16px}.chess-controls label{flex:136px;min-width:0}.chess-actions{width:100%}.chess-actions .chess-button{flex:auto}.chess-board-wrap{margin-top:20px}.chess-piece,.chess-motion-piece{font-size:clamp(27px,11.2vw,49px)}.chess-status{padding:16px;display:block}.chess-rules{margin-top:20px}}@media (width<=359px){.chess-heading h1{font-size:32px}.chess-controls{padding:12px}.chess-cell[data-selected=true]:after{border-width:2px;inset:3px}}@media (prefers-reduced-motion:reduce){.chess-game *,.chess-game :before,.chess-game :after{transition:none!important;animation:none!important}}
