*{box-sizing:border-box}.chess-page{max-width:1160px;margin:24px auto;padding:16px;font-family:Arial,sans-serif;color:#182b40}.chess-hero{text-align:center;padding:22px;border-radius:22px;background:linear-gradient(125deg,#092c50,#236b9b);color:white;margin-bottom:22px}.chess-hero h1{margin:4px;font-size:clamp(26px,4vw,43px)}.chess-hero p{margin:9px}.chess-layout{display:grid;grid-template-columns:minmax(0,660px) minmax(250px,1fr);gap:24px;align-items:start}.chess-stage{padding:15px;background:linear-gradient(145deg,#fff,#cfd9e2);border:2px solid #8398ad;border-radius:20px;box-shadow:0 12px 32px #1a31472e}.chess-frame{padding:8px;background:linear-gradient(130deg,#171b22,#454e5a,#10141b);border:5px ridge #a8b5c4;border-radius:12px;box-shadow:0 15px 18px #0005}.chess-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));aspect-ratio:1/1;box-shadow:inset 0 0 18px #0007}.ch-square{position:relative;border:0;padding:0;display:flex;align-items:center;justify-content:center;min-width:0;cursor:pointer;aspect-ratio:1/1;touch-action:manipulation}.ch-square.light{background:linear-gradient(145deg,#fff,#d8dce1)}.ch-square.dark{background:linear-gradient(145deg,#6e7784,#252d39)}.ch-square.selected{outline:4px solid #ffca28;outline-offset:-4px;z-index:1}.ch-square.in-check{box-shadow:inset 0 0 0 5px #ed4646}.piece{font-family:'DejaVu Sans','Segoe UI Symbol',serif;font-size:clamp(25px,5vw,61px);line-height:1;display:block;filter:drop-shadow(2px 5px 2px #0008);transform:translateY(-3%) scaleY(1.07);user-select:none}.white-piece{color:#fffdf1;-webkit-text-stroke:2px #121820;text-shadow:0 1px 0 #fff,0 3px 2px #101010;filter:drop-shadow(1px 3px 1px #0009)}.black-piece{color:#090c12;-webkit-text-stroke:1.6px #f5f6fa;text-shadow:0 1px 1px #000,0 3px 2px #000;filter:drop-shadow(1px 3px 1px #0009)}.move-dot{position:absolute;width:22%;height:22%;border-radius:50%;background:#0bbd73a8;box-shadow:0 0 0 3px #fff8;pointer-events:none}.coord-files{display:grid;grid-template-columns:repeat(8,1fr);text-align:center;font-size:clamp(11px,1.6vw,17px);font-weight:900;letter-spacing:.02em;color:#fff;padding:3px 19px}.coord-middle{display:grid;grid-template-columns:18px 1fr 18px}.coord-ranks{display:grid;grid-template-rows:repeat(8,1fr);align-items:center;text-align:center;color:#fff;font-size:clamp(11px,1.5vw,16px);font-weight:900}.chess-controls{padding:20px;background:#f4f7fb;border:1px solid #b9c7d6;border-radius:20px;box-shadow:0 7px 22px #142c431a}.chess-controls h2{margin-top:0}.chess-controls label{display:block;font-weight:700;margin:14px 0 5px}.chess-controls select{width:100%;padding:11px;border:1px solid #8a9caf;border-radius:9px;font-size:16px;background:white}.chess-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin:18px 0}.chess-actions button,.promotion button,#claim{background:#0869b4;color:white;border:0;border-radius:10px;padding:12px 8px;font-weight:800;cursor:pointer;font-size:15px}.chess-actions button:hover,.promotion button:hover{background:#034d8b}.chess-actions button:disabled{opacity:.4;cursor:default}#game-status{background:white;padding:14px;border-left:5px solid #12a86d;border-radius:8px;font-weight:800;min-height:50px}#move-list{height:95px;overflow:auto;background:white;padding:12px;border-radius:8px;line-height:1.8}.promotion{background:#fff3ce;border:2px solid #e8b341;padding:12px;border-radius:12px}.promotion button{margin:4px}.chess-notes{font-size:14px;line-height:1.5;color:#485a6c}.chess-notes strong{color:#24384e}@media(max-width:800px){.chess-layout{grid-template-columns:1fr}.chess-stage{padding:7px}.chess-frame{padding:3px;border-width:3px}.coord-middle{grid-template-columns:15px 1fr 15px}.coord-files{padding:3px 15px}.piece{font-size:clamp(24px,8vw,58px)}.chess-page{padding:8px}}
/* Consistent high-contrast Staunton silhouettes: ivory fill/dark rim vs jet-black fill/light rim. */
.ch-square .piece{font-family:"DejaVu Sans","Segoe UI Symbol","Noto Sans Symbols 2",serif;font-weight:normal;isolation:isolate}.ch-square.light{background:linear-gradient(145deg,#fffefa,#d9dce0)}.ch-square.dark{background:linear-gradient(145deg,#8e98a5,#526071)}.ch-square:focus-visible{outline:4px solid #ffca28;outline-offset:-4px;z-index:2}

.ch-square img.piece{width:88%;height:95%;object-fit:contain;transform:none;pointer-events:none;filter:drop-shadow(0 2px 2px #0009)}
.ch-square img.black-piece{filter:drop-shadow(0 0 2px #fff) drop-shadow(0 2px 2px #0009)}
.ch-square img.white-piece{filter:drop-shadow(0 0 2px #29221c) drop-shadow(0 2px 2px #0008)}
