.chess-intro{display:flex;gap:18px;align-items:center;margin:16px 0}.chess-intro .game-art{width:74px;height:74px;flex:none}.chess-intro h2{font-size:22px;margin:6px 0}.chess-intro p{font-size:16px;color:var(--muted)}
.chess-preview{width:min(100%,250px);margin:8px auto 24px;pointer-events:none}.chess-preview .chess-board{border-radius:12px}.chess-preview .xq-piece{font-size:clamp(12px,3vw,20px)}
.chess-order{margin-top:22px}.chess-order h2{margin-bottom:12px}.chess-modes{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.chess-modes button{background:#f0f5fa;border:2px solid #c4d5e5;border-radius:16px;padding:14px 10px;color:#304a60;display:flex;flex-direction:column;gap:5px;align-items:center}.chess-modes button.active{background:#e1f1ff;border-color:#326fa6;color:#205581}.chess-modes strong{font-size:21px}.chess-modes span{font-size:15px}.chess-saved{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px;border:1px solid #adcab8;border-radius:18px;margin:20px 0;background:#eef8f0}.chess-saved p{font-size:15px;margin:6px 0 0}
.chess-rules{margin:18px 0;line-height:1.8;font-size:16px}.chess-rules summary{font-weight:700;cursor:pointer;padding:8px}.chess-rules p,.chess-rules ul{margin:12px 0}.chess-rules ul{padding-left:24px}
.chess-play{max-width:560px;margin:auto}.chess-play .game-head{margin-bottom:10px}.chess-play .game-head h2{font-size:23px;white-space:nowrap}.chess-meta{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px 4px 14px;font-size:16px;color:#536577}.chess-meta b{font-variant-numeric:tabular-nums;font-size:19px;color:#21394a}.chess-play #play-panel,.chess-replay .play-panel{padding:6px;min-height:0;border-radius:18px;background:#e8d4b4;border:1px solid #c7aa83;box-shadow:none;margin:0}.chess-scroll{overflow:auto;overscroll-behavior:contain;border-radius:12px}.chess-board{position:relative;display:grid;grid-template-columns:repeat(var(--cols),minmax(0,1fr));grid-template-rows:repeat(var(--rows),minmax(0,1fr));aspect-ratio:var(--cols)/var(--rows);width:100%;background:#eddbb9;border:0;border-radius:10px;isolation:isolate}.chess-zoom .chess-board{min-width:620px}.chess-lines{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:-1;stroke:#967e5b;stroke-width:2;fill:#836c48}.chess-lines text{font-size:36px;text-anchor:middle;stroke:none;fill:#7b6548;letter-spacing:12px}
.chess-board .chess-point{position:relative;display:grid;place-items:center;min-width:0;min-height:0;width:100%;height:100%;padding:0;margin:0;border:0;border-radius:0;background:transparent;box-shadow:none;touch-action:manipulation;color:inherit;opacity:1}.chess-point:focus-visible{outline:2px solid #246da8;outline-offset:-2px;z-index:2}.go-stone{width:80%;height:80%;border-radius:50%;box-shadow:0 2px 2px #0003;display:block;position:relative}.go-black{background:radial-gradient(circle at 32% 28%,#4b5057,#171c23 65%);border:1px solid #121821}.go-white{background:radial-gradient(circle at 32% 28%,#fff,#f0eee5 65%);border:1px solid #b5b3aa}.chess-last .go-stone:after{content:'';position:absolute;inset:35%;border:2px solid #ec7259;border-radius:50%}.chess-winning .go-stone{outline:3px solid #288763;outline-offset:1px}
.xq-piece{width:88%;height:88%;display:grid;place-items:center;border-radius:50%;background:#ffedc9;border:2px solid currentColor;box-shadow:0 2px 2px #613e342b;outline:1px solid #b3976c;outline-offset:1px;font-family:'Noto Serif CJK SC','SimSun',serif;font-weight:800;font-size:clamp(20px,6vw,35px);line-height:1;color:#98362b}.black-side .xq-piece{color:#293e49}.chess-selected .xq-piece{outline:3px solid #257d97;outline-offset:1px;background:#fff7e6}.chess-last .xq-piece{box-shadow:0 0 0 3px #d08926}.chess-legal:after{content:'';position:absolute;width:26%;height:26%;background:#236c88;border:2px solid #f4fbff;border-radius:50%;pointer-events:none}.chess-legal.occupied:after{width:94%;height:94%;border:3px dashed #236c88;background:transparent}.chess-origin:before{content:'';position:absolute;inset:33%;border:2px solid #c78629;border-radius:50%;pointer-events:none}
.chess-status{display:flex;flex-direction:column;gap:5px;padding:14px 4px;font-size:16px;min-height:76px}.chess-status strong{font-size:20px;color:#285d81}.chess-status span{color:#617184}.chess-status.is-check strong{color:#a64036}.chess-tools{display:flex;gap:10px;justify-content:space-between;margin:10px 0}.chess-tools button{flex:1;min-height:48px;font-size:16px;padding:10px 6px}.chess-secondary-tools button{font-size:15px}.chess-result{max-width:600px;margin:auto}.chess-result-hero{text-align:center;background:#e9f4f1;border:1px solid #b9d6cb;border-radius:24px;padding:28px 20px}.chess-result-hero h1{font-size:26px;margin:12px 0}.chess-result-hero p{font-size:17px;line-height:1.8;margin:8px 0}.chess-outcome{font-size:52px;line-height:1.4;font-weight:800;color:#25755c}.outcome-loss{background:#f4ede7;border-color:#decbb8}.outcome-loss .chess-outcome{color:#985f42}.outcome-draw{background:#edf2fb}.outcome-draw .chess-outcome{color:#426aa1}.chess-result-metrics{display:flex;justify-content:space-evenly;margin:24px 0;gap:12px}.chess-result-metrics div{display:flex;flex-direction:column;gap:6px;text-align:center}.chess-result-metrics b{font-size:27px}.chess-result-metrics span{font-size:15px;color:#657388}.chess-record{width:100%;display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;background:transparent;border:0;border-bottom:1px solid #d6e0e8;padding:18px 0;color:inherit;font-size:16px;text-align:left}.chess-replay-note{font-size:16px;line-height:1.7;min-height:52px}.chess-replay-range{width:100%;height:44px;accent-color:#326fa6}.chess-replay-controls{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.chess-replay-controls button{font-size:16px;padding:12px 4px}.chess-play .focus-in-play{margin-top:14px}.art-gomoku .piece{border-radius:50%!important;background:#273443!important;color:transparent!important;box-shadow:0 2px 2px #0002}.art-gomoku .piece:nth-child(2){background:#fff!important}.art-xiangqi .piece{border-radius:50%!important;color:#973d31!important;background:#ffedc4!important;border:1px solid #bc8b55}.art-xiangqi .piece:nth-child(2){color:#243e50!important}
html[data-theme=dark] .chess-play #play-panel,html[data-theme=dark] .chess-replay .play-panel{background:#39434b;border-color:#687176}html[data-theme=dark] .chess-board{background:#454d53}html[data-theme=dark] .chess-lines{stroke:#869294;fill:#a5adb0}html[data-theme=dark] .chess-lines text{fill:#bac4c7}html[data-theme=dark] .xq-piece{background:#d4c7ae;color:#802f27;outline-color:#a8a296}html[data-theme=dark] .black-side .xq-piece{color:#192f3a}html[data-theme=dark] .chess-selected .xq-piece{background:#ead8b3;outline-color:#85cfed}html[data-theme=dark] .chess-legal:after{background:#91d8ef;border-color:#223b48}html[data-theme=dark] .chess-legal.occupied:after{background:transparent;border-color:#91d8ef}html[data-theme=dark] .chess-meta,html[data-theme=dark] .chess-status span,html[data-theme=dark] .chess-result-metrics span{color:#b3c5d4}html[data-theme=dark] .chess-meta b{color:#e4edf5}html[data-theme=dark] .chess-status strong{color:#9bcdff}html[data-theme=dark] .chess-status.is-check strong{color:#ffb7a8}html[data-theme=dark] .chess-modes button{background:#243747;border-color:#41586c;color:#e4edf5}html[data-theme=dark] .chess-modes button.active{background:#254e6b;border-color:#9bcdff}html[data-theme=dark] .chess-saved,html[data-theme=dark] .chess-result-hero{background:#233d3b;border-color:#476763;color:#e4edf5}html[data-theme=dark] .chess-outcome{color:#9bdfbe}html[data-theme=dark] .outcome-loss{background:#3b3431;border-color:#75614e}html[data-theme=dark] .outcome-loss .chess-outcome{color:#eab58c}html[data-theme=dark] .outcome-draw{background:#253b51;border-color:#55728e}html[data-theme=dark] .outcome-draw .chess-outcome{color:#a8d1ff}html[data-theme=dark] .chess-record{border-color:#41586c}
.art-gomoku .game-art-pieces,.art-xiangqi .game-art-pieces{display:grid!important;grid-template-columns:1fr 1fr;gap:8%;align-items:center;width:82%;height:auto!important}.art-gomoku .piece,.art-xiangqi .piece{width:100%!important;height:auto!important;aspect-ratio:1;display:grid;place-items:center}.chess-history summary{font-weight:700;cursor:pointer;padding:8px 0}
@media(max-width:380px){.chess-play .game-head h2{font-size:20px}.chess-meta{font-size:14px}.chess-meta b{font-size:17px}.chess-tools{gap:6px}.chess-tools button{font-size:15px}.chess-intro h2{font-size:20px}.chess-play .xq-piece{font-size:21px}.chess-play .game-head .back{padding:8px 0}.chess-play .game-head [data-action=pause]{padding:8px}}
