.chess-appearance{padding:14px;border:1px solid #c8d5df;border-radius:12px;background:#fffdf7;color:#23415a;display:grid;gap:9px}
.chess-appearance>label{font-size:.82rem;font-weight:700}
html:not(.km-playing) #board[data-chess-style=living] .chess-grid{width:100%;box-sizing:border-box}
.chess-art-actions{display:flex;flex-wrap:wrap;gap:7px}.chess-art-actions .btn{min-height:44px;font-size:.77rem;padding:8px 11px}
#chess-style,#chess-human-side,#chess-facing,#chess-art-retry,#chess-set-retry,#chess-set-close{min-height:44px;min-width:0;max-width:100%}
.chess-appearance [hidden]{display:none!important}
#chess-art-status{font-size:.78rem;line-height:1.5;margin:0}#chess-art-retry{justify-self:start}
.chess-living-piece{position:relative;display:block;width:94%;height:94%;max-width:none;max-height:none;overflow:hidden;isolation:isolate}
.chess-living-photo{position:absolute;display:block;height:100%;width:auto;aspect-ratio:var(--chess-living-frame-ratio,2/3);left:50%;top:50%;transform:translate(-50%,-50%);background-image:var(--chess-living-atlas);background-size:400% 300%;background-repeat:no-repeat;pointer-events:none}
.chess-living-base{position:absolute;z-index:2;bottom:1%;height:9%;left:16%;width:68%;border-radius:50%;box-shadow:0 1px 2px #142d4560}
.chess-living-piece.white .chess-living-base{background:#fff5ce;border:1px solid #425169}.chess-living-piece.black .chess-living-base{background:#21354c;border:1px solid #fff4dc}
.chess-living-badge{position:absolute;z-index:3;right:0;bottom:5%;width:32%;height:37%;border:1px solid #3b4b60;background:#fff8e9;border-radius:4px;padding:1px;display:grid;place-items:center;box-sizing:border-box}
.chess-living-piece.black .chess-living-badge{background:#dfe7ed;border-color:#102333}
.chess-living-badge .chess-piece{width:100%;height:100%;max-width:none;max-height:none;overflow:visible}
.chess-grid .coordinate{z-index:4;background:#fff7dfdd;border-radius:2px;padding:0 1px;color:#23374a}
.chess-living-ghost{position:fixed!important;z-index:100;pointer-events:none!important;margin:0;max-width:none!important;max-height:none!important}
.chess-set-dialog{max-width:1040px;padding:24px}.chess-set-dialog>p{font-size:.9rem;line-height:1.5;margin:10px 0}
.chess-set-side h3{font-size:1.05rem;margin:20px 0 10px}.chess-set-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;direction:ltr}
.chess-set-piece{min-width:0;border:1px solid #c6d1df;border-radius:12px;padding:9px;background:#f7f4eb}.chess-set-piece h4{font-size:.84rem;font-weight:650;margin:8px 0 0;text-align:center;overflow-wrap:anywhere}
.chess-set-image{height:180px;display:grid;place-items:center;background:linear-gradient(#fffdf5,#e9e3d5);border-radius:7px;overflow:hidden}.chess-set-image>.chess-piece{width:90%;height:94%;max-width:none;max-height:none}
.chess-set-piece h4 .chess-living-badge{position:static;display:inline-grid;vertical-align:middle;width:24px;height:28px;margin-inline-end:5px}
.chess-set-piece h4.black .chess-living-badge{background:#dfe7ed;border-color:#102333}
.chess-set-dialog .dialog-actions{position:sticky;z-index:5;bottom:-24px;background:#fff;padding:12px 0;margin:14px 0 0;border-top:1px solid #d4dee8}
html[data-km-contrast=high] .chess-appearance,html[data-km-contrast=high] .chess-set-piece{border:2px solid #162e45}
@media(max-width:700px){.chess-set-dialog{padding:18px}.chess-set-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.chess-set-image{height:155px}.chess-set-dialog .dialog-actions{bottom:-18px}.chess-art-actions .btn{font-size:.82rem}}
@media(max-width:400px){.chess-set-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.chess-set-image{height:170px}.chess-set-piece h4{font-size:.9rem}.chess-set-dialog{padding:15px}.chess-set-dialog .dialog-actions{bottom:-15px}}
@media(prefers-reduced-motion:reduce){.chess-living-ghost{animation:none!important;transition:none!important}}
