/* Walnut frame, inlaid maple squares, and the original ivory/ebony chess set. */
.board-shell,.lesson-board-shell{position:relative;padding:clamp(11px,1.5vw,18px);border-radius:9px;background:linear-gradient(135deg,#846043 0%,#4b3023 16%,#735039 43%,#39271f 78%,#65442e 100%);border:1px solid #5d412d;box-shadow:0 3px 0 #281e17,0 6px 0 -1px #5b3e29,0 18px 35px -8px #30211345,inset 0 1px 1px #d4b08690,inset 0 0 0 4px #39271e80}
.board-shell::after{content:'CHESS STUDIO';position:absolute;bottom:3px;left:50%;transform:translateX(-50%);font-size:5px;letter-spacing:2.5px;color:#d3b486;line-height:1;pointer-events:none}
.board{isolation:isolate;border-radius:3px;overflow:hidden;box-shadow:0 0 0 1px #251d16,0 0 0 3px #b28e5d80,0 0 0 4px #38291f,inset 0 0 20px #35261920}
.board .square{background-color:#eddfc3;background-image:repeating-linear-gradient(8deg,#ffffff0b 0 1px,transparent 1px 7px),linear-gradient(145deg,#fff5dc60,#c7ab8130);box-shadow:inset 0 0 16px #6e48200a;transition:background-color .16s,box-shadow .16s;touch-action:manipulation}
.board .square.dark{background-color:#a27a55;background-image:repeating-linear-gradient(8deg,#35210b08 0 1px,transparent 1px 8px),linear-gradient(145deg,#c39d6a38,#5d3b2f25)}
.board .piece{display:block;width:87%;height:94%;max-width:none;font-size:inherit;line-height:0;-webkit-text-stroke:0;text-shadow:none;z-index:2;pointer-events:none;transition:transform .18s cubic-bezier(.2,.7,.3,1),filter .18s;filter:drop-shadow(0 2px 1px #1b130c45);will-change:auto}
.piece img{display:block;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none;pointer-events:none}
.board .square:hover:not(.selected) .piece{transform:translateY(-2px) scale(1.025);filter:drop-shadow(0 4px 2px #1b130c50)}
.board .square.selected{background-color:#ddbb71;box-shadow:inset 0 0 0 2px #92702e,inset 0 0 25px #fff2b640}
.board .square.selected .piece{transform:translateY(-4px) scale(1.055);filter:drop-shadow(0 6px 3px #2c1c1460)}
.board .square.last{box-shadow:inset 0 0 0 100px #f6d37440,inset 0 0 0 1px #e7c16b55}
.board .square.selected.last{background-color:#d9b367;box-shadow:inset 0 0 0 2px #9a7131,inset 0 0 25px #fff2b640}
.board .square.hint{box-shadow:inset 0 0 0 3px #c18b27,inset 0 0 17px #fce29c80}
.board .square.check{background-color:#bd6554;background-image:radial-gradient(ellipse at 50% 55%,#e9a087b0,#a8423828);box-shadow:inset 0 0 0 2px #a7483d,inset 0 0 22px #8c2e4c38}
.board .square.possible:after{width:20%;height:20%;background:#49352254;border:1px solid #fff3cb75;box-shadow:0 1px 3px #2d1e171f;z-index:3;pointer-events:none}
.board .square.possible:has(.piece):after{width:87%;height:87%;border:3px solid #b47f2cc9;background:transparent;box-shadow:0 0 0 1px #fff3cf90,inset 0 0 0 1px #fff3cf90}
.board .coord{font-size:clamp(8px,.8vw,10px);font-weight:700;letter-spacing:0;color:#86613c;text-shadow:none;z-index:4;pointer-events:none}.board .dark .coord{color:#f8e8c7}.board .rank{top:5px;left:5px}.board .file{bottom:4px;right:5px}
.board-footer{padding-top:4px}.player .avatar{border-radius:50%;width:42px;height:42px;border:1px solid #d1c3a5;box-shadow:0 2px 6px #3021100c}.player .avatar.dark{background:linear-gradient(145deg,#e0d3b8,#c8b78d)}.player .avatar.light{background:linear-gradient(145deg,#fffdf5,#eee4ce)}.avatar .piece{display:block;width:31px;height:34px;line-height:0;-webkit-text-stroke:0;text-shadow:none}
#promotion-options button{display:grid;place-items:center;min-width:0;flex:1;padding:10px;background:linear-gradient(145deg,#f6ead1,#e1cfad);border-color:#ccae82;transition:transform .15s,background .15s}#promotion-options button:hover{transform:translateY(-3px);background:#f5e2ad}#promotion-options .piece{display:block;width:48px;height:56px;line-height:0;-webkit-text-stroke:0;text-shadow:none;filter:drop-shadow(0 2px 1px #48301a40)}
.lesson-board-shell{padding:10px;border-radius:6px;box-shadow:0 3px 0 #39271f,0 8px 18px #35241720,inset 0 0 0 2px #39271e80}.lesson-board-shell .board .piece{width:87%;height:94%;font-size:inherit}.lesson-board-shell .square.lesson-target{box-shadow:inset 0 0 0 3px #c39537,inset 0 0 0 5px #fff1bb65}.lesson-board-shell .square.lesson-source:before{border-color:#8f682c}.lesson-board-shell .coord{font-size:8px}
#result-icon .piece{display:block;width:72px;height:80px;-webkit-text-stroke:0;text-shadow:none;line-height:0}
@media(max-width:660px){.board-shell{padding:11px;border-radius:7px}.board-shell::after{font-size:4px;letter-spacing:1.8px;bottom:3px}.board .coord{font-size:8px}.board .rank{top:3px;left:3px}.board .file{bottom:3px;right:4px}.board .square.selected .piece{transform:translateY(-2px) scale(1.04)}.board .square.possible:has(.piece):after{border-width:2px}.lesson-board-shell{padding:8px}.player .avatar{width:37px;height:37px}.avatar .piece{width:27px;height:30px}#promotion-options{gap:7px}#promotion-options .piece{width:42px;height:50px}}
@media(prefers-reduced-motion:reduce){.board .piece,.board .square,#promotion-options button{transition:none}.board .square:hover:not(.selected) .piece,.board .square.selected .piece{transform:none}}
