/* The chess canvas owns perspective, wood, illumination and piece depth. Draughts keeps its existing board. */
.bg-stage.bg-chess { padding:0; }
.bg-chess .bg-platform { width:100%; max-width:760px; aspect-ratio:1; border:0; border-radius:12px; box-shadow:none; transform:none; transition:none; }
.bg-layout .bg-stage.bg-chess.bg-stl-active { width:100%; height:100%; min-height:0; display:block; }
.bg-layout .bg-chess.bg-stl-active .bg-platform { width:100%; height:100%; max-width:none; min-height:0; aspect-ratio:auto; margin:0; }
.bg-chess .bg-board { border:8px solid #765139; box-sizing:border-box; border-radius:8px; }
.bg-chess .bg-piece-body { position:absolute; width:120%; height:160%; left:-10%; bottom:31%; border:0; border-radius:0; background:none; box-shadow:none; text-shadow:none; transform:none; transform-origin:center; }
.bc-avatar .bc-piece-icon { display:block; width:100%; height:100%; object-fit:contain; }
.bg-stl-active .bg-board { position:absolute; inset:0; opacity:0; pointer-events:none; }
.bg-stl-active .bg-pieces { visibility:hidden; pointer-events:none; }
.bg-stl-canvas { position:absolute; inset:0; width:100%; height:100%; border-radius:12px; touch-action:none; cursor:grab; }
.bg-stl-canvas:active { cursor:grabbing; }
.bg-stl-canvas:focus-visible { outline:2px solid #dfc18a; outline-offset:-3px; }
.bg-camera-help { display:none; position:absolute; left:10px; right:10px; bottom:10px; z-index:2; align-items:center; justify-content:space-between; gap:10px; color:#e0d2b8; font-size:.7rem; text-shadow:0 1px 4px #000; pointer-events:none; }
.bg-stl-active .bg-camera-help { display:flex; }
.bg-camera-touch { display:none; }
.bg-camera-reset { display:grid; place-items:center; width:34px; height:34px; flex-shrink:0; padding:7px; border:1px solid #8e806650; border-radius:8px; background:#202b32dd; color:#efdfc4; pointer-events:auto; cursor:pointer; }
.bg-camera-reset svg, #bg-undo svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.bg-chess-play .bg-actions .play-buttons, .bg-chess-play #bg-undo, #bg-play-copy-link { width:100%; }
#bg-undo { display:inline-flex; align-items:center; justify-content:flex-start; gap:10px; }
@media(pointer:coarse) { .bg-camera-desktop { display:none; } .bg-camera-touch { display:inline; } }
.bg-stl-loader { position:absolute; inset:0; z-index:3; display:grid; place-content:center; gap:16px; border-radius:12px; background:#202b32ee; color:#f0e2c8; font-size:.9rem; pointer-events:none; text-align:center; }
.bg-stl-loader::before { content:''; width:28px; height:28px; margin:auto; border:3px solid #8c77514d; border-top-color:#dfc18a; border-radius:50%; animation:chess-load .8s linear infinite; }
.bg-stl-loader[hidden], .bg-stl-canvas[hidden] { display:none; }
@keyframes chess-load { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { .bg-stl-loader::before { animation:none; } }
