/* Reuse the solid, theme-aware tournament pieces from appearance.css. */
.chess-promotion{box-sizing:border-box;color:#f3eee1;font:14px/1.5 system-ui,sans-serif}
dialog.chess-promotion{position:fixed;inset:0;margin:auto;width:min(410px,calc(100% - 24px));max-width:none;max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;padding:20px;border:1px solid #afba9d70;border-radius:16px;background:#1c2520;box-shadow:0 24px 80px #0009}
dialog.chess-promotion::backdrop{background:#080c0980;backdrop-filter:blur(2px)}
.chess-promotion h2,.chess-promotion h3{margin:0 0 14px;color:#eee9dc;text-align:center;font:500 25px/1.2 Georgia,serif}
.chess-promotion .promotion-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.chess-promotion .chess-promotion-choice{box-sizing:border-box;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:104px;aspect-ratio:auto;margin:0;padding:9px 3px;border:1px solid #afba9d60;border-radius:10px;background:#b7a07c25;color:#eee9dc;cursor:pointer;text-shadow:none;font:650 12px/1.3 system-ui,sans-serif}
.chess-promotion .chess-promotion-choice[hidden]{display:none}
.chess-promotion .chess-promotion-choice:hover{border-color:#dec18c;background:#dec18c22}
.chess-promotion .chess-promotion-choice:disabled{opacity:.5;cursor:wait}
.chess-promotion .promotion-piece{position:static!important;display:block;flex:none;width:58px;max-width:90%;height:58px;font-size:0!important;opacity:1!important;transform:none!important;pointer-events:none}
.chess-promotion .promotion-piece-name{display:block;font:650 12px/1.2 system-ui,sans-serif;color:#eee9dc}
.chess-promotion .promotion-piece-key{position:absolute;top:4px;right:6px;color:#c4cebd;font:10px/1.2 system-ui,sans-serif}
.chess-promotion[data-promotion-color=b] .chess-promotion-choice{background:var(--board-light,#e9d5ae);border-color:#cbbd98}
.chess-promotion[data-promotion-color=b] .promotion-piece-name,.chess-promotion[data-promotion-color=b] .promotion-piece-key{color:#2c3328}
.chess-promotion .chess-promotion-cancel,.chess-promotion>#cancel-promotion{display:block;min-height:44px;margin:12px auto 0;padding:7px 18px;border:1px solid #afba9d50;border-radius:9px;background:#ffffff05;color:#d2dacc;font:600 12px/1.4 system-ui,sans-serif;cursor:pointer}
.chess-promotion button:focus-visible{outline:3px solid #dec18c;outline-offset:3px}
#promotionPanel.chess-promotion{width:min(390px,calc(100% - 24px));min-width:0;padding:16px;background:#1c2520}
@media(max-width:380px){dialog.chess-promotion{padding:15px}.chess-promotion .promotion-options{gap:5px}.chess-promotion .chess-promotion-choice{min-height:96px}.chess-promotion .promotion-piece{width:49px;height:49px}}
@media(prefers-reduced-motion:reduce){.chess-promotion{animation:none!important;transition:none!important}}
