/* Concept 02 pieces, plain cream/sage board and persistent opponent move highlights. */
#terrace-chess{width:min(1060px,97vw);padding:24px;background:#18221f;color:#f2ead8;border-color:#9b8d67}
#terrace-chess .terrace-chess-head h2{font-size:32px;margin:5px 0 7px}#terrace-chess .terrace-chess-head p{margin-bottom:15px;color:#bebfab}
#terrace-chess .terrace-chess-layout{grid-template-columns:minmax(260px,1fr) 225px;gap:25px;align-items:start}
#terrace-chess .terrace-board{background:#f1e3c5;border:8px solid #eee3ce;border-radius:9px;overflow:hidden;box-shadow:inset 0 0 0 2px #ba9d6b,0 8px 25px #0005;max-width:min(590px,calc(92dvh - 325px));margin-inline:auto}
#terrace-chess .chess-square{isolation:auto;touch-action:none;overflow:hidden;cursor:pointer}
#terrace-chess .chess-square.light{background:#f1e3c5}#terrace-chess .chess-square.dark{background:#879276}
#terrace-chess .chess-square:hover{filter:brightness(1.08)}
#terrace-chess .chess-square.last-move{box-shadow:inset 0 0 0 2px #f3dc6dbd}
#terrace-chess .chess-square.opponent-last-from{background:#afd6de;box-shadow:inset 0 0 0 3px #20576b}
#terrace-chess .chess-square.opponent-last-to{background:#77bfce;box-shadow:inset 0 0 0 4px #20576b}
#terrace-chess .chess-square.selected{background:#e2bc5894;box-shadow:inset 0 0 0 3px #fff2a5}
#terrace-chess .chess-square.in-check{background:#bf5141bd;box-shadow:inset 0 0 0 3px #ffe0bd}
#terrace-chess .chess-square.premove-square{box-shadow:inset 0 0 0 2px #f4a1a3;background-color:#ad55557a}
#terrace-chess .chess-piece{display:block;width:50%;height:98%;pointer-events:none;position:relative;z-index:2;filter:drop-shadow(0 1px 1px #2227)}
#terrace-chess .chess-piece svg{display:block;width:100%;height:100%;overflow:hidden}#terrace-chess .chess-piece.ghost{position:absolute;opacity:.45;z-index:3}
#terrace-chess .chess-square small{z-index:4;color:#1f352ec9;font:8px/1.2 system-ui;left:2px;bottom:1px}
#terrace-chess .chess-square.legal:after{z-index:5;background:#163e3f9e;pointer-events:none;width:21%;height:21%;box-shadow:0 0 0 2px #f7eed77a}
#terrace-chess .chess-square.legal[class*=piece-]:after{width:85%;height:85%;background:none;border:3px solid #274f4f}
.premove-number{position:absolute;right:2px;top:1px;z-index:6;font:9px/1.2 system-ui;color:#fff4e1;background:#793840;border-radius:3px;padding:1px 3px}
.chess-clock{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid #566057;background:#212d27;border-radius:6px;padding:7px 12px;max-width:min(590px,calc(92dvh - 325px));margin:7px auto;color:#c0c6b6;box-sizing:border-box;font:11px/1.3 system-ui}
.chess-clock time{font:26px/1.1 ui-monospace,monospace;font-variant-numeric:tabular-nums;color:#e2e5d7}.chess-clock.active{background:#ded8ba;color:#293c32;border-color:#e1ca7b}.chess-clock.active time{color:#23382f}.chess-clock.low time{color:#ed9a74}.chess-clock.active.low time{color:#943d2b}
#terrace-chess-status{font-size:13px!important;line-height:1.5;min-height:21px!important;margin:7px 0!important}
.chess-opponent-card{border-bottom:1px solid #566057;padding-bottom:12px;font:13px/1.5 system-ui}.chess-opponent-card strong{display:block;font:21px/1.3 Georgia,serif;color:#f0d796}.chess-opponent-card span{display:block;color:#c2cbb9;margin-top:8px}.chess-opponent-card p{font-size:12px;margin:8px 0 0}
.chess-premove-status{font:11px/1.5 system-ui;color:#c7c9b7;min-height:33px;margin-top:8px}.chess-premove-status button{min-height:32px!important;padding:5px 8px!important;font-size:11px!important;margin-left:8px}
.chess-promotion-option{margin-top:15px}.chess-help a{color:#ebce85}.chess-help summary{cursor:pointer}.chess-history{max-height:145px}
#terrace-chess .chess-actions button{background:#283b32;border-color:#626d58}
@media(max-width:650px){#terrace-chess{padding:14px;max-height:97dvh;width:98vw}#terrace-chess .terrace-chess-layout{grid-template-columns:1fr;gap:12px}#terrace-chess .terrace-board,.chess-clock{max-width:460px}#terrace-chess .terrace-board{border-width:6px}#terrace-chess .terrace-chess-head h2{font-size:26px}.chess-clock{padding:6px 10px}.chess-clock time{font-size:24px}.chess-opponent-card{display:flex;flex-wrap:wrap;gap:5px 12px}.chess-opponent-card strong{font-size:18px}.chess-opponent-card span,.chess-opponent-card p{margin:0}.chess-opponent-card p{width:100%}.chess-history{max-height:95px}.chess-promotion-option select{max-width:220px}}
@media(max-width:360px){#terrace-chess{padding:10px}#terrace-chess .terrace-chess-head h2{font-size:23px}#terrace-chess .terrace-chess-head p{font-size:11px}.chess-clock span{font-size:10px}.chess-clock time{font-size:22px}}
@media(orientation:landscape) and (max-height:520px){#terrace-chess{padding:10px 16px;max-height:98dvh}#terrace-chess .terrace-chess-layout{grid-template-columns:minmax(180px,1fr) 190px;gap:18px}#terrace-chess .terrace-chess-head h2{font-size:22px;margin:3px 0}#terrace-chess .terrace-chess-head p{display:none}#terrace-chess .terrace-board,.chess-clock{max-width:min(310px,calc(100dvh - 182px))}.chess-clock{padding:4px 7px;margin:4px auto}.chess-clock span{font-size:9px}.chess-clock time{font-size:18px}#terrace-chess-status{font-size:11px!important;min-height:17px!important;margin:4px 0!important}.chess-premove-status{font-size:10px;max-width:310px;margin:5px auto}.chess-opponent-card strong{font-size:17px}.chess-history{max-height:90px}#terrace-chess .terrace-chess-layout aside{padding:0;border:0}}
