#chess{--ch-light:oklch(92.5% .035 105);--ch-dark:oklch(58% .075 150);--ch-last:oklch(85% .15 100/.55);--ch-sel:oklch(80% .11 215/.55);--ch-dot:oklch(25% .03 260/.28);--ch-check:oklch(62% .22 27);--ch-hint:oklch(70% .17 230);--ch-wf:oklch(98.5% .006 90);--ch-ws:oklch(24% .02 260);--ch-bf:oklch(30% .02 260);--ch-bs:oklch(14% .02 260);--ch-bd:oklch(88% .01 260)}#chess .ch-theme-brown{--ch-light:oklch(90% .04 75);--ch-dark:oklch(62% .08 55)}#chess .ch-theme-blue{--ch-light:oklch(93% .02 240);--ch-dark:oklch(62% .07 245)}#chess .ch-theme-grey{--ch-light:oklch(91% .005 260);--ch-dark:oklch(62% .01 260)}.dark #chess{--ch-dot:oklch(15% .02 260/.38)}.dark #chess .ch-caps .is-b{--ps:oklch(72% .01 260)}.dark #chess .ch-player[data-color=b] .ch-swatch{border-color:oklch(72% .01 260)}#chess .ch-defs{width:0;height:0;position:absolute;overflow:hidden}#chess [hidden]{display:none!important}#chess .ch-layout{gap:.75rem;display:grid}@media (width>=1024px){#chess .ch-layout{grid-template-columns:minmax(0,1fr) 19rem;align-items:start;gap:1.25rem}}#chess .ch-main{flex-direction:column;align-items:center;min-width:0;display:flex}#chess .ch-main>:not(.sr-only){width:min(100%,max(17rem,100svh - 290px),40rem)}@media (width>=1024px){#chess .ch-main>:not(.sr-only){width:min(100%,max(20rem,100svh - 250px),40rem)}}#chess .ch-player{min-height:2.4rem;color:var(--color-title);align-items:center;gap:.5rem;padding:.2rem 0;font-size:.875rem;display:flex}#chess .ch-swatch{border:1.5px solid var(--ch-ws);background:var(--ch-wf);border-radius:4px;flex-shrink:0;width:.9rem;height:.9rem}#chess .ch-player[data-color=b] .ch-swatch{background:var(--ch-bf);border-color:var(--ch-bs)}#chess .ch-name{white-space:nowrap;text-overflow:ellipsis;min-width:0;font-weight:600;overflow:hidden}#chess .ch-caps{min-width:0;color:var(--color-muted);flex:1;align-items:center;font-size:.75rem;font-weight:600;display:flex;overflow:hidden}#chess .ch-caps svg{flex-shrink:0;width:1.05rem;height:1.05rem;margin-right:-.32rem}#chess .ch-caps .ch-adv{margin-left:.5rem}#chess .ch-clock{border:1px solid var(--color-border);background:var(--color-surface);text-align:right;min-width:4.5rem;font:600 1.05rem/1.4 var(--font-mono);font-variant-numeric:tabular-nums;color:var(--color-muted);border-radius:7px;margin-left:auto;padding:.15rem .5rem}#chess .ch-clock.is-running{border-color:var(--color-accent);background:var(--color-accent);color:var(--color-on-primary)}#chess .ch-clock.is-low{border-color:var(--ch-check);background:var(--ch-check);color:#fff}#chess .ch-think{gap:3px;display:inline-flex}#chess .ch-think i{background:var(--color-muted);border-radius:999px;width:5px;height:5px;animation:1s ease-in-out infinite ch-blink}#chess .ch-think i:nth-child(2){animation-delay:.15s}#chess .ch-think i:nth-child(3){animation-delay:.3s}@keyframes ch-blink{0%,to{opacity:.25}50%{opacity:1}}#chess .ch-board-wrap{position:relative}#chess .ch-board{aspect-ratio:1;width:100%;box-shadow:0 0 0 1px color-mix(in oklab, var(--ch-dark) 70%, black), var(--shadow-card);touch-action:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;border-radius:6px;grid-template-rows:repeat(8,1fr);grid-template-columns:repeat(8,1fr);display:grid;overflow:hidden}#chess .ch-sq{background:var(--ch-light);cursor:default;border:0;border-radius:0;width:100%;min-width:0;height:100%;padding:0;display:block;position:relative}#chess .ch-sq.is-dark{background:var(--ch-dark)}#chess .ch-sq.is-last:before,#chess .ch-sq.is-sel:before,#chess .ch-sq.is-hint:before{content:"";background:var(--ch-last);pointer-events:none;position:absolute;inset:0}#chess .ch-sq.is-sel:before{background:var(--ch-sel)}#chess .ch-sq.is-hint:before{background:color-mix(in oklab, var(--ch-hint) 45%, transparent);animation:1s ease-in-out infinite ch-pulse}@keyframes ch-pulse{50%{opacity:.35}}#chess .ch-sq.is-check{background-image:radial-gradient(circle, var(--ch-check) 0%, color-mix(in oklab, var(--ch-check) 70%, transparent) 35%, transparent 72%)}#chess .ch-sq.is-target:after{content:"";background:var(--ch-dot);pointer-events:none;z-index:2;border-radius:999px;width:30%;height:30%;position:absolute;top:50%;left:50%;translate:-50% -50%}#chess .ch-sq.is-target.is-capture:after{border:max(3px, .45rem) solid var(--ch-dot);box-sizing:border-box;background:0 0;width:92%;height:92%}#chess .ch-sq.is-drop{box-shadow:inset 0 0 0 4px color-mix(in oklab, var(--color-title) 45%, transparent)}#chess .ch-sq:focus-visible{outline:3px solid var(--color-focus);outline-offset:-3px;z-index:3}#chess .ch-sq.has-own{cursor:grab}#chess .ch-coords{aspect-ratio:1;pointer-events:none;z-index:4;grid-template-rows:repeat(8,1fr);grid-template-columns:repeat(8,1fr);width:100%;display:grid;position:absolute;top:0;left:0}#chess .ch-coords>span{color:var(--ch-dark);position:relative}#chess .ch-coords>span.is-dark{color:var(--ch-light)}#chess .ch-rank,#chess .ch-file{font:700 clamp(8px, 2.2vw, 12px)/1 var(--font-sans);position:absolute}#chess .ch-rank{top:3px;left:3px}#chess .ch-file{bottom:2px;right:3px}#chess .ch-board.no-coords+.ch-coords{display:none}#chess .ch-pc{pointer-events:none;z-index:1;width:92%;height:92%;position:absolute;inset:4%;overflow:visible}#chess .ch-pc.is-w,#chess .ch-caps .is-w{--pf:var(--ch-wf);--ps:var(--ch-ws);--pd:var(--ch-ws)}#chess .ch-pc.is-b,#chess .ch-caps .is-b{--pf:var(--ch-bf);--ps:var(--ch-bs);--pd:var(--ch-bd)}#chess .ch-pc.is-lifted{opacity:.3}#chess .ch-ghost{z-index:30;pointer-events:none;filter:drop-shadow(0 6px 8px oklch(10% .02 260/.35));position:absolute;top:0;left:0}#chess .ch-ghost .ch-pc{width:100%;height:100%;inset:0}#chess .ch-float{z-index:40;border:1px solid var(--color-border);background:var(--color-surface);max-width:calc(100% - 20px);box-shadow:var(--shadow-panel);border-radius:12px;flex-wrap:wrap;justify-content:center;align-items:center;gap:6px;padding:10px;display:flex;position:absolute;top:50%;left:50%;translate:-50% -50%}#chess .ch-float[hidden]{display:none}#chess .ch-promo{width:min(18rem,100% - 20px)}#chess .ch-promo-btn{aspect-ratio:1;border:1px solid var(--color-border);background:var(--ch-light);border-radius:8px;justify-content:center;align-items:center;min-height:2.75rem;display:flex;position:relative}#chess .ch-promo-btn:hover,#chess .ch-promo-btn:focus-visible{border-color:var(--color-accent);background:color-mix(in oklab, var(--color-accent) 18%, var(--ch-light))}#chess .ch-promo-btn .ch-pc{width:84%;height:84%;inset:8%}#chess .ch-toast{z-index:45;background:var(--color-graphite);width:max-content;max-width:calc(100% - 24px);color:var(--color-graphite-ink);text-align:center;pointer-events:none;box-shadow:var(--shadow-panel);border-radius:10px;padding:8px 12px;font-size:.8125rem;line-height:1.4;position:absolute;top:-2px;left:50%;translate:-50% -100%}#chess .ch-noscript{text-align:center;color:var(--color-title);background:var(--color-surface);padding:6px;font-size:.875rem;position:absolute;inset:auto 0 45%}#chess .ch-side{flex-direction:column;gap:.6rem;width:min(100%,40rem);min-width:0;margin:0 auto;display:flex}@media (width>=1024px){#chess .ch-side{width:auto;margin:2.4rem 0 0}}#chess .ch-status{min-height:1.5rem;color:var(--color-title);text-align:center;font-size:.9rem;font-weight:600}@media (width>=1024px){#chess .ch-status{text-align:left}}#chess .ch-over{grid-template-columns:repeat(2,minmax(0,1fr));gap:.375rem;display:grid}#chess .ch-tools{grid-template-columns:repeat(5,minmax(0,1fr));gap:.375rem;display:grid}#chess .ch-tool{border:1px solid var(--color-border);background:var(--color-surface);min-height:3.25rem;color:var(--color-ink);transition:border-color .12s var(--ease-out), background-color .12s var(--ease-out);border-radius:10px;flex-direction:column;justify-content:center;align-items:center;gap:2px;font-size:.75rem;font-weight:500;display:flex}#chess .ch-tool:hover:not(:disabled){border-color:var(--color-accent)}#chess .ch-tool:active:not(:disabled){background:color-mix(in oklab, var(--color-accent) 8%, var(--color-surface))}#chess .ch-tool:disabled,#chess .ch-btn:disabled,#chess .ch-nav:disabled{opacity:.45;cursor:not-allowed}#chess .ch-icon-btn{border:1px solid var(--color-border);background:var(--color-surface);width:2.75rem;height:2.75rem;color:var(--color-muted);border-radius:10px;flex-shrink:0;justify-content:center;align-items:center;display:flex}#chess .ch-icon-btn:hover{color:var(--color-ink);border-color:var(--color-accent)}#chess .ch-moves-card{border:1px solid var(--color-border);background:var(--color-surface);border-radius:12px}#chess .ch-nav{width:2.75rem;height:2.25rem;color:var(--color-ink);border-radius:7px;justify-content:center;align-items:center;display:flex}@media (pointer:coarse){#chess .ch-nav{height:2.75rem}}#chess .ch-nav:hover:not(:disabled){background:color-mix(in oklab, var(--color-accent) 10%, transparent)}#chess .ch-moves{font-variant-numeric:tabular-nums;grid-template-columns:2.2rem 1fr 1fr;align-content:start;align-items:center;padding:.25rem .5rem;font-size:.875rem;display:grid;overflow-y:auto}#chess .ch-moves,#chess #ch-moves-empty{height:6.6rem}@media (width>=1024px){#chess .ch-moves,#chess #ch-moves-empty{height:min(22rem,max(8rem,100svh - 420px))}}#chess .ch-moves li{display:contents}#chess .ch-moves .ch-num{color:var(--color-muted);padding:.3rem 0;font-size:.8rem}#chess .ch-mv{text-align:left;color:var(--color-ink);border-radius:6px;min-height:2rem;padding:.3rem .45rem;font-weight:500}#chess .ch-mv:hover{background:color-mix(in oklab, var(--color-accent) 10%, transparent)}#chess .ch-mv[aria-current=true]{background:var(--color-accent);color:var(--color-on-primary)}#chess .ch-btn{border:1px solid var(--color-border);background:var(--color-surface);min-height:2.75rem;color:var(--color-ink);transition:border-color .12s var(--ease-out), background-color .12s var(--ease-out);border-radius:8px;justify-content:center;align-items:center;gap:6px;padding:0 .9rem;font-size:.875rem;font-weight:600;display:inline-flex}#chess .ch-btn[hidden]{display:none}#chess .ch-btn-sm{padding:0 .6rem;font-size:.8125rem}#chess .ch-btn:hover:not(:disabled){border-color:var(--color-accent)}#chess .ch-btn-primary{border-color:var(--color-accent);background:var(--color-accent);color:var(--color-on-primary)}#chess .ch-btn-primary:hover:not(:disabled){background:var(--color-accent-deep)}#chess .ch-btn-quiet{color:var(--color-muted);background:0 0;border-color:#0000;font-weight:500}#chess .ch-btn-quiet:hover{color:var(--color-ink);border-color:#0000}#chess .ch-x{width:2.75rem;height:2.75rem;color:var(--color-muted);border-radius:8px;justify-content:center;align-items:center;margin:-.5rem -.5rem 0 0;display:flex}#chess .ch-x:hover{color:var(--color-ink)}#chess .ch-legend{color:var(--color-muted);margin-bottom:.375rem;font-size:.75rem;font-weight:600}#chess .ch-seg-group{border:1px solid var(--color-border);background:var(--color-background);border-radius:10px;gap:4px;padding:4px;display:grid}#chess .ch-seg{min-height:2.75rem;color:var(--color-ink-2);transition:background-color .12s var(--ease-out), color .12s var(--ease-out);border-radius:7px;font-size:.875rem;font-weight:600}#chess .ch-seg:hover{background:color-mix(in oklab, var(--color-accent) 9%, transparent)}#chess .ch-seg[aria-pressed=true]{background:var(--color-accent);color:var(--color-on-primary)}#chess .ch-select{border:1px solid var(--color-border);background:var(--color-background);width:100%;min-height:2.75rem;color:var(--color-title);border-radius:8px;padding:0 .6rem;font-size:1rem}#chess .ch-opt{min-height:3.25rem;color:var(--color-ink);cursor:pointer;justify-content:space-between;align-items:center;gap:.75rem;padding:.5rem 0;font-size:.875rem;display:flex}#chess .ch-opt>span>span{color:var(--color-muted);font-size:.75rem;display:block}#chess .ch-switch{appearance:none;background:var(--color-rule-2);cursor:pointer;width:2.75rem;height:1.625rem;transition:background-color .15s var(--ease-out);border-radius:999px;flex-shrink:0;position:relative}#chess .ch-switch:after{content:"";background:var(--color-surface);width:1.25rem;height:1.25rem;transition:transform .15s var(--ease-out);border-radius:999px;position:absolute;top:3px;left:3px;box-shadow:0 1px 2px oklch(21% .028 262/.3)}#chess .ch-switch:checked{background:var(--color-accent)}#chess .ch-switch:checked:after{transform:translate(1.125rem)}#chess .ch-dialog{border:1px solid var(--color-border);background:var(--color-surface);width:min(92vw,28rem);max-height:90vh;color:var(--color-body);box-shadow:var(--shadow-panel);border-radius:14px;margin:auto;padding:0}#chess .ch-dialog::backdrop{background:oklch(21% .028 262/.5)}@media (orientation:landscape) and (height<=540px) and (width>=540px){#chess .ch-layout{grid-template:"board top""board side"1fr"board bottom"/auto minmax(0,1fr);align-items:start;gap:.25rem 1rem}#chess .ch-main{display:contents}#chess .ch-main>:not(.sr-only){width:auto}#chess #ch-wrap{grid-area:board;width:min(100svh - 92px,60vw)}#chess #ch-top{grid-area:top}#chess #ch-bottom{grid-area:bottom}#chess .ch-side{grid-area:side;width:auto;margin:0}#chess .ch-status{text-align:left}#chess .ch-moves,#chess #ch-moves-empty{height:4.4rem}}@media (prefers-reduced-motion:reduce){#chess .ch-sq.is-hint:before,#chess .ch-think i{animation:none}}
