 .chess-intro{margin-bottom:18px}.chess-intro h1{margin:8px 0}.chess-layout{display:grid;grid-template-columns:minmax(0,650px) minmax(220px,1fr);gap:24px}.chess-stage,.chess-panel{background:linear-gradient(140deg,#1a283a,#272438);border:1px solid #586680;border-radius:18px;padding:18px;min-width:0}.chess-toolbar,.chess-options{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin-bottom:14px}.chess-options label{display:grid;gap:4px;font-size:.88rem}.chess-options select{max-width:100%;background:#19253a;color:#f5f4ee;border:1px solid #768398;padding:8px;border-radius:7px}.chess-layout button{font:inherit;border-radius:7px;border:1px solid #8296ad;background:#dce6f6;color:#142a43;padding:8px 12px;cursor:pointer}.chess-layout button:disabled{opacity:.5;cursor:default}.chess-layout button:focus-visible,.chess-options select:focus-visible{outline:3px solid #6fdfff;outline-offset:2px}.chess-status{min-height:2.8em;color:#ffdc92;font-weight:700;margin:8px 0}.chess-clocks{display:flex;justify-content:space-between;gap:8px;margin-bottom:12px}.chess-clock{background:#101c2a;border:1px solid #667080;padding:9px;border-radius:9px;flex:1}.chess-clock.active{border-color:#f9cc78;box-shadow:inset 0 0 12px #ffd17119}.chess-clock span{display:block;font:700 1.5rem ui-monospace,monospace;color:#f6d88d}.chess-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));aspect-ratio:1;box-sizing:border-box;border:8px solid #64462d;border-radius:7px;box-shadow:0 8px 25px #0005;overflow:hidden;background:#a2784f}.chess-board .square{position:relative;min-width:0;min-height:0;border:0;border-radius:0;padding:0;display:flex;align-items:center;justify-content:center;aspect-ratio:1;background:#ecd7ad;touch-action:manipulation}.chess-board .square.dark{background:#997044}.chess-board .square.selected{box-shadow:inset 0 0 0 4px #198bdc}.chess-board .square.last{background:#e3c062}.chess-board .square.dark.last{background:#b09536}.chess-board .square.check{background:#e56d68}.square .piece{width:90%;height:90%;pointer-events:none;filter:drop-shadow(0 2px 1px #0004)}.square .coord{position:absolute;left:3px;top:1px;font-size:clamp(9px,1.1vw,12px);color:#302218;font-weight:700;pointer-events:none}.square.legal:after{content:'';position:absolute;border-radius:50%;width:22%;height:22%;background:#15567880;pointer-events:none}.square.legal:has(.piece):after{width:82%;height:82%;background:none;border:4px solid #238cc8;box-sizing:border-box}.square.hint-square{box-shadow:inset 0 0 0 4px #5bdeaa}.chess-moves{max-height:200px;overflow:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding-left:28px;gap:5px 15px;font-family:ui-monospace,monospace}.chess-captured{display:flex;gap:2px;flex-wrap:wrap;min-height:25px}.chess-captured svg{width:25px;height:25px}.chess-panel h2{font-size:1.2rem}.chess-results{width:100%;border-collapse:collapse;font-size:.83rem}.chess-results th,.chess-results td{padding:6px 3px;text-align:center;border-bottom:1px solid #526075}.chess-results th:first-child{text-align:left}.chess-panel p{font-size:.9rem}.chess-promotion{background:#14263c;color:#fff;border:2px solid #f6cf77;border-radius:15px;max-width:90vw}.chess-promotion::backdrop{background:#000a}.chess-promotion div{display:flex;gap:8px}.chess-promotion button{background:#ead7b2;border-radius:8px;border:1px solid #ad845c;padding:6px;cursor:pointer}.chess-promotion svg{width:44px;height:44px}.chess-help{margin-top:20px}.chess-page.theater{max-width:1500px;width:calc(100% - 28px)}.chess-page.theater .chess-layout{grid-template-columns:minmax(0,850px) minmax(220px,1fr)}.chess-page:fullscreen{overflow:auto;background:#080e19;padding:20px;width:100%;max-width:none;box-sizing:border-box}.chess-page:fullscreen .chess-layout{grid-template-columns:minmax(0,min(78vh,850px)) minmax(220px,1fr)}.chess-board.paused{filter:grayscale(.6);opacity:.6}.chess-layout .primary{background:#f8d17e;border-color:#e6aa4f;font-weight:bold}.chess-controls-note{font-size:.83rem;color:#bdd0e5}@media(max-width:800px){.chess-layout,.chess-page.theater .chess-layout,.chess-page:fullscreen .chess-layout{grid-template-columns:minmax(0,1fr)}.chess-stage,.chess-panel{padding:12px}.chess-board{border-width:5px}.chess-moves{max-height:130px}}@media(max-width:390px){.chess-stage{padding:8px}.chess-toolbar{gap:6px}.chess-layout button{font-size:.85rem;padding:7px 8px}.chess-options{gap:6px}.chess-options select{padding:6px;font-size:.84rem}.chess-options label{font-size:.8rem}}@media(prefers-reduced-motion:no-preference){.piece{animation:arrive .16s ease-out}@keyframes arrive{from{opacity:.6;transform:translateY(-3px)}to{opacity:1;transform:none}}}.square .coord.file-coordinate{top:auto;bottom:0;left:auto;right:3px} .chess-page{width:calc(100% - 32px);max-width:1200px;margin:22px auto 30px;box-sizing:border-box}.chess-intro h1{font-size:2.1rem;line-height:1.1;margin:6px 0}.chess-intro p{margin:7px 0}.chess-layout{grid-template-columns:minmax(0,590px) minmax(240px,1fr);align-items:start}.chess-status{min-height:1.6em}.chess-stage .chess-toolbar{margin:10px 0}.chess-recent{padding-left:18px;font-size:.84rem}.chess-recent li{margin:6px 0;overflow-wrap:anywhere}@media(max-width:800px){.chess-page{width:calc(100% - 20px);margin-top:14px}.chess-layout{grid-template-columns:minmax(0,1fr)}.chess-intro h1{font-size:1.7rem}}.chess-results{table-layout:fixed}.chess-results th,.chess-results td{overflow-wrap:anywhere}.chess-results th:first-child{width:30%}
.chess-promotion div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}.chess-promotion button{min-width:0}.chess-promotion button span{display:block;overflow-wrap:anywhere}@media(max-width:400px){.chess-promotion div{grid-template-columns:repeat(2,minmax(0,1fr))}.chess-promotion h2{font-size:1.3rem}}
