/* Board and trick-taking tables share the site's single-column game screen. */
.tg-shell{width:min(100%,680px);margin:auto;color:#f4edda}
.tg-status{font-size:14px;font-weight:750;line-height:1.5;margin-bottom:16px;text-align:center;min-height:22px}
.tg-setup,.tg-controls,.tg-promotion{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin:12px 0 18px}
.tg-button{border:1px solid #ffffff55;border-radius:8px;background:#314959;color:#fff5df;font:700 12px/1.4 var(--font);padding:10px 14px;min-height:44px;cursor:pointer}
.tg-button:hover:not(:disabled),.tg-button.active{background:#edcc6c;color:#253342}
.tg-button:disabled{opacity:.45;cursor:default}
.tg-button:focus-visible,.chess-square:focus-visible,.hearts-card:focus-visible{outline:3px solid #edcc6c;outline-offset:2px;z-index:2}
.chess-board{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));border:3px solid #131f2c;border-radius:5px;overflow:hidden;box-shadow:0 5px 0 #142130}
.chess-square{position:relative;aspect-ratio:1;min-width:0;display:grid;place-items:center;padding:0;border:0;touch-action:manipulation}
.chess-square.light{background:#e8dfc8;color:#314050}.chess-square.dark{background:#6b827d;color:#182c2b}
.chess-square:disabled{opacity:1;cursor:default}
.chess-square.chosen{box-shadow:inset 0 0 0 4px #e5ad36}
.chess-square.last-move{background-image:linear-gradient(#edcc6c4d,#edcc6c4d)}
.chess-square.destination::after{content:'';position:absolute;width:25%;height:25%;border-radius:50%;background:#182f44aa;pointer-events:none}
.chess-square.destination:has(.chess-piece)::after{width:84%;height:84%;border:4px solid #e5ad36;background:transparent}
.chess-square.in-check{background:#bc655b}
.chess-piece{font-family:Georgia,'DejaVu Sans',serif;font-size:clamp(28px,8vw,65px);line-height:1;pointer-events:none}
.chess-piece.white{color:#fff9eb;text-shadow:1px 1px 0 #233340,-1px -1px 0 #233340,1px -1px 0 #233340,-1px 1px 0 #233340}
.chess-piece.black{color:#182430;text-shadow:0 1px 0 #c5d6ce}
.chess-rank,.chess-file{position:absolute;font-size:10px;line-height:1;font-weight:800;pointer-events:none}
.chess-rank{top:3px;left:3px}.chess-file{bottom:3px;right:3px}
.chess-board.flipped .chess-rank,.chess-board.flipped .chess-file{display:none}
.tg-promotion{background:#1c2b3b;padding:14px;border:2px solid #edcc6c;border-radius:8px}
.tg-promotion b{width:100%;text-align:center}
.tg-history{margin-top:16px;border-top:1px solid #ffffff33;padding-top:12px;font-size:12px}
.tg-history summary{cursor:pointer;min-height:36px}
.tg-history ol{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin:6px 0;padding-left:20px;max-height:200px;overflow-y:auto}
.tg-history li span{opacity:.65}.tg-history table{width:100%;border-collapse:collapse;font-size:12px;text-align:center}
.tg-history td,.tg-history th{padding:8px 3px;border-bottom:1px solid #ffffff22}
.tg-result{padding:16px;background:#ffffff0d;border:1px solid #ffffff33;border-radius:10px;text-align:center;margin-top:16px}
.tg-result h2{font-size:19px;margin-bottom:12px}.tg-result .tg-button{margin-top:14px}
.hearts-scoreboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.hearts-scoreboard>div{display:flex;flex-direction:column;gap:6px;align-items:center;border:1px solid #ffffff33;border-radius:8px;padding:12px 4px;min-width:0;background:#ffffff08}
.hearts-scoreboard>div.current{border-color:#edcc6c;background:#edcc6c13}
.hearts-scoreboard b{font-size:12px;text-align:center;overflow-wrap:anywhere}.hearts-scoreboard strong{font-size:24px}.hearts-scoreboard small{font-size:11px;color:#bdcfc6}
.hearts-round{display:flex;justify-content:space-between;gap:12px;font-size:12px;color:#c0d6cc;margin:18px 0}
.hearts-trick{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:16px 8px;background:#071d1633;border-radius:12px;min-height:144px}
.hearts-trick>div{display:flex;align-items:center;flex-direction:column;gap:10px;min-width:0}
.hearts-trick small{font-size:11px;text-align:center;min-height:16px}.hearts-placeholder{display:grid;place-items:center;width:52px;height:78px;border:1px dashed #ffffff33;border-radius:7px}
.hearts-card{min-width:0;width:54px;height:80px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:#fff6e4;color:#203443;border:2px solid #e6dbc4;border-radius:7px;box-shadow:0 3px 0 #0b211c;font:700 20px/1.1 Georgia,serif;padding:6px 2px}
.hearts-card.red{color:#ad3546}.hearts-card span{font-size:26px}.hearts-card:disabled{opacity:.7;cursor:default}.hearts-card.chosen{outline:3px solid #edcc6c;outline-offset:2px;transform:translateY(-3px)}
.hearts-hand-title{font-size:13px;margin:22px 0 14px}.hearts-hand{display:grid;grid-template-columns:repeat(auto-fit,minmax(48px,1fr));gap:10px 7px;margin-bottom:18px}
.hearts-hand .hearts-card{width:100%;touch-action:manipulation}
.hearts-hand-points,.hearts-last{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;font-size:12px}
[data-game="chess"] .board-stage,[data-game="hearts"] .board-stage{padding:20px 16px}
@media(max-width:650px){
 [data-game="chess"] .board-stage,[data-game="hearts"] .board-stage{padding:16px 8px}
 .tg-status{font-size:12px}.tg-button{padding:9px 11px;font-size:11px}
 .chess-board{border-width:2px}.chess-piece{font-size:clamp(27px,8.8vw,54px)}.chess-rank,.chess-file{font-size:8px}
 .hearts-scoreboard{gap:5px}.hearts-scoreboard b{font-size:10px}.hearts-scoreboard small{font-size:10px}.hearts-scoreboard strong{font-size:22px}
 .hearts-trick{gap:5px;padding:12px 4px}.hearts-trick small{font-size:9px}.hearts-card{width:46px;height:70px;font-size:18px}.hearts-placeholder{width:46px;height:70px}
 .hearts-hand{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px 7px}.hearts-round{font-size:11px}.tg-history table{font-size:10px}
}

.chess-square.recommended{box-shadow:inset 0 0 0 4px #e5ad36}.chess-square.recommended::after{background:#edcc6c}
