/* Chrono-Shift Chess layout and game-specific surfaces. Sidebar/header remain shared. */
body.mcg-game-ChronoShiftChess{color:#e2e8f0;background:#0f172a}
.chess-app{background:#0f172a!important;color:#e2e8f0;min-width:0}
.chess-header-tools{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.chess-top-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:8px 12px;min-height:38px;border-radius:8px;border:1px solid #41536b;background:#26364c;color:#f1f5f9;white-space:nowrap;font-weight:600;font-size:13px;cursor:pointer}
.chess-top-btn:hover{background:#35465e}.chess-top-btn.chess-primary{background:#4f46e5;border-color:#4f46e5;color:#fff}
.chess-content{width:100%;padding:clamp(12px,2.3vw,26px);}
.chess-layout{max-width:1080px;margin:0 auto;display:grid;grid-template-columns:minmax(0,660px) minmax(245px,1fr);align-items:start;gap:16px}
.chess-stage,.chess-details{border:1px solid #334155;border-radius:14px;background:#1e293b;min-width:0}
.chess-stage{padding:clamp(12px,2vw,20px)}
.chess-stage-head{display:flex;justify-content:space-between;align-items:start;gap:8px;margin-bottom:14px}
.chess-stage-head h2,.chess-details-head h2{margin:0 0 4px;font-size:18px;line-height:1.3;font-weight:750;color:#f1f5f9}
.chess-stage-head p{margin:0;color:#94a3b8;font-size:12px;line-height:1.4}
.chess-mode-indicator{flex:0 0 auto;border:1px solid #475569;background:#28384c;border-radius:100px;padding:5px 9px;color:#cbd5e1;font-size:11px;font-weight:700;white-space:nowrap}
.chess-clock-row{width:min(100%,490px);margin:0 auto 12px;display:grid;grid-template-columns:1fr 1fr;gap:10px}
.chess-clock{display:flex;justify-content:space-between;align-items:center;gap:8px;border-radius:9px;border:1px solid #475569;background:#263447;padding:9px 11px;color:#e2e8f0;font-size:14px}
.chess-clock.is-active{border-color:#a78bfa;box-shadow:inset 0 0 0 1px #a78bfa}.chess-clock strong{font-size:17px;font-variant-numeric:tabular-nums}.clock-side{display:flex;align-items:center;gap:7px;font-weight:600}.clock-dot{height:12px;width:12px;display:inline-block;border:1.5px solid #94a3b8;border-radius:50%}.clock-black{background:#0f172a}.clock-white{background:#fff}
.chess-board-wrap{width:min(100%,490px);margin:0 auto}.chessboard{width:100%;aspect-ratio:1;display:grid;grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(8,minmax(0,1fr));border:3px solid #475569;border-radius:6px;overflow:hidden;touch-action:manipulation}
.chess-square{display:grid;place-items:center;width:100%;height:100%;min-width:0;min-height:0;position:relative;cursor:pointer;appearance:none;border:0!important;padding:0!important;margin:0!important;border-radius:0!important;box-shadow:none!important;font-family:'Segoe UI Symbol','DejaVu Sans',sans-serif!important;transition:background-color .12s}
.chess-square.light{background:#e4e7ea!important}.chess-square.dark{background:#8593a4!important}.chess-square.last-move.light{background:#c8d4af!important}.chess-square.last-move.dark{background:#a1b682!important}
.chess-square.selected{background:#70b5cc!important}.chess-square.legal-target::after{content:'';width:23%;aspect-ratio:1;border-radius:50%;position:absolute;inset:auto;background:#1b587a95;pointer-events:none}
.chess-square.legal-target.has-piece::after{width:84%;height:84%;border:4px solid #1b587a88;background:transparent}
.chess-square.king-check{background:#e78a88!important}.chess-square:focus-visible{outline:3px solid #7c3aed!important;outline-offset:-3px!important;z-index:2}
.chess-piece{line-height:1;user-select:none;pointer-events:none;font-size:clamp(25px,4.3vw,45px);text-align:center;display:block;transform:translateY(-1px);font-weight:400}
.chess-piece.white{color:#fff;text-shadow:-1px -1px #374151,1px -1px #374151,-1px 1px #374151,1px 1px #374151,0 2px 1px #374151}
.chess-piece.black{color:#111827;text-shadow:0 1px 1px #f8fafc,1px 0 #f8fafc,-1px 0 #f8fafc}
.chess-turn-row{display:flex;gap:8px;align-items:center;width:min(100%,490px);margin:12px auto 0;min-height:37px;padding:8px 11px;border-radius:8px;background:#283548;color:#e2e8f0;font-size:13px;line-height:1.3}
.turn-bullet{flex:0 0 8px;width:8px;height:8px;border-radius:50%;background:#a78bfa}
.chess-controls{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;width:min(100%,490px);margin:10px auto 0}
.chess-action{border:1px solid #475569!important;background:#344256!important;color:#f8fafc!important;border-radius:8px!important;padding:10px 6px!important;margin:0!important;min-height:41px;white-space:normal!important;font-size:12px!important;font-weight:650!important;line-height:1.25;cursor:pointer}
.chess-action:hover:not(:disabled){background:#41536a!important}.chess-action:disabled{opacity:.45;cursor:not-allowed}.chess-action.chess-danger{background:#493741!important;border-color:#785361!important}
.chess-details{padding:16px}.chess-details-head{display:flex;justify-content:space-between;align-items:center;gap:7px;padding-bottom:10px;border-bottom:1px solid #334155}.chess-live{font-size:11px;color:#c4b5fd;font-weight:700}
.chess-mini-section{padding:12px 0;border-bottom:1px solid #334155}.chess-mini-section h3{margin:0 0 5px;color:#94a3b8;font-size:11px;text-transform:uppercase;letter-spacing:.05em;font-weight:700}.chess-mini-section p{margin:0;color:#f1f5f9;font-size:14px}.chess-mini-section .mt-captured{margin-top:12px}
.chess-captured{display:flex;flex-wrap:wrap;gap:4px;min-height:24px;font-size:21px;line-height:1.2;color:#e2e8f0}
.chess-moves-heading{display:flex;justify-content:space-between;gap:8px;align-items:center}.chess-moves-heading span{font-size:10px;color:#94a3b8}.chess-moves{max-height:220px;overflow-y:auto;margin-top:8px;font-size:12px;color:#cbd5e1;line-height:1.65}.chess-move-row{display:grid;grid-template-columns:28px 1fr 1fr;gap:6px;padding:4px;border-bottom:1px solid #334155}.chess-move-row:nth-child(even){background:#26364a}.chess-empty{color:#94a3b8!important;font-size:12px!important}
.chess-history-clear{margin-top:12px;padding:8px;width:100%;border-radius:8px;background:#263448;color:#cbd5e1;border:1px solid #475569;font-size:12px;cursor:pointer}
.chess-modal[hidden]{display:none!important}.chess-modal{position:fixed;inset:0;z-index:2000;background:#020617bf;display:grid;place-items:center;padding:18px;overflow-y:auto}
.chess-dialog{background:#1e293b;border:1px solid #475569;border-radius:13px;padding:24px;width:min(100%,530px);max-height:90dvh;overflow:auto;color:#e2e8f0;box-shadow:0 20px 70px #02061788}
.chess-dialog h2{margin:0 0 14px;font-size:22px;color:#f8fafc}.chess-dialog p{color:#cbd5e1;font-size:14px;line-height:1.65;margin:8px 0 14px}.chess-modal-close{width:100%;margin-top:10px;min-height:43px;border:0;border-radius:8px;background:#5b57e8;color:#fff;font-weight:700;cursor:pointer}
.chess-promotion-options{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.chess-promotion-options button{min-height:70px;background:#334155;color:white;border:1px solid #475569;border-radius:9px;font-size:35px;cursor:pointer}
.chess-toast-container{position:fixed;bottom:18px;right:18px;z-index:2100;pointer-events:none;max-width:min(340px,90vw)}.chess-toast{margin-top:8px;border:1px solid #475569;border-radius:9px;background:#263448;color:#f8fafc;padding:12px 15px;font-size:13px;box-shadow:0 6px 18px #02061777}
@media(max-width:1050px){.chess-layout{grid-template-columns:minmax(0,1fr);max-width:650px}.chess-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:14px}.chess-details-head,.chess-move-box,.chess-history-clear{grid-column:1/-1}}
@media(max-width:767px){.chess-content{padding:10px}.chess-layout{gap:12px}.chess-stage{padding:10px}.chess-details{padding:12px}.chess-header-tools{gap:6px}.chess-top-btn{min-height:34px;padding:6px 8px;font-size:12px}.chess-top-btn span{display:none}.chess-stage-head h2{font-size:16px}.chess-stage-head p{font-size:11px}.chess-piece{font-size:clamp(24px,7.5vw,43px)}.chess-controls{grid-template-columns:repeat(2,minmax(0,1fr))}.chess-action{min-height:42px!important;font-size:13px!important}}
@media(max-width:380px){.chess-mode-indicator{font-size:10px}.chess-stage-head p{max-width:200px}.chess-details{grid-template-columns:1fr}.chess-mini-section,.chess-details-head,.chess-move-box,.chess-history-clear{grid-column:1/-1}.chess-clock{padding:7px 6px;font-size:12px}.chess-clock strong{font-size:14px}}
@media(prefers-reduced-motion:reduce){.chess-square{transition:none}}
