.table-game { max-width: 52rem; margin-top: 1.4rem; }
.game-detail:has(> .table-game) { max-width: 57rem; }
.table-game .gt-repeated-heading {
  position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%);
}
.table-game .gt-stack { display: grid; gap: .85rem; min-width:0; }
.table-game > .gt-stack { border:1px solid var(--line); border-radius:18px; background:var(--paper); padding:clamp(1rem,3vw,2rem); }
.table-game h2 { margin:0; font-size:1.3rem; line-height:1.25; }
.table-game p { margin:0; line-height:1.55; }
.table-game p:empty { display:none; }
.table-game button,.table-game input,.table-game select,.table-game textarea { background:var(--paper); color:var(--ink); font:inherit; border:1px solid var(--control-line); border-radius:8px; padding:.6rem .8rem; min-height:44px; min-width:0; max-width:100%; }
.table-game button { cursor:pointer; font-weight:650; }
.table-game button:hover:enabled { background:var(--tint); border-color:var(--accent); }
.table-game button:disabled { opacity:.6; cursor:default; }
.table-game .gt-primary { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.table-game .gt-primary:hover:enabled { background:var(--accent); filter:brightness(.95); }
.gt-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }
.gt-actions input { flex:1 1 6rem; }
.gt-roster-head { display:flex; align-items:baseline; gap:1rem; justify-content:space-between; }
.gt-roster-head span { font-size:.86rem; color:var(--muted); font-variant-numeric:tabular-nums; }
.table-game .gt-roster { gap:.4rem; }
.gt-roster .gt-actions { display:grid; grid-template-columns:2rem minmax(0,1fr) auto; }
.gt-roster-number { display:grid; place-content:center; height:2rem; border-radius:50%; font-weight:700; font-variant-numeric:tabular-nums; background:hsl(var(--roster-hue) 42% 86%); color:#213333; }
.table-game .gt-handoff, .table-game .gt-secret-card { position:relative; isolation:isolate; overflow:hidden; min-height:9rem; gap:.55rem; padding:1.6rem; overflow-wrap:anywhere; }
.table-game .gt-handoff { border:1px solid var(--line); background:var(--home-tile); color:var(--ink); }
.gt-handoff::before, .gt-handoff::after { content:""; position:absolute; z-index:-1; width:3.7rem; height:6rem; border:2px solid var(--control-line); border-radius:10px; opacity:.28; transform:rotate(-18deg); }
.gt-handoff::before { left:-.8rem; bottom:-1.8rem; }
.gt-handoff::after { right:-.4rem; top:-2.4rem; }
.table-game .gt-secret-card { border:1px solid var(--line); background:var(--tint); color:var(--tint-ink); }
.gt-secret-card::before { content:""; position:absolute; inset:.38rem; border:1px dashed currentColor; opacity:.25; border-radius:.5rem; pointer-events:none; }
@media (pointer: coarse), (max-width: 36rem) {
  .table-game .gt-actions button { min-width: 44px; }
}
.gt-field { display:grid; gap:.35rem; font-weight:650; }
.gt-feature {
  display:grid; gap:.45rem; min-height:clamp(6rem,12vw,9rem); padding:1rem;
  place-content:center; text-align:center; border-radius:12px;
  background:var(--tint); color:var(--tint-accent); word-break:keep-all; overflow-wrap:anywhere;
}
.gt-feature strong { font-size:clamp(1.5rem,3.25vw,2.6rem); line-height:1.25; }
.gt-feature small { font-weight:650; }
.table-game .gt-stack > :is(.gt-board,.gt-canvas,.gt-diagram) { justify-self:center; }
.table-game .gt-stack > .gt-actions { align-items:center; }
.table-game .gt-stack > button:only-of-type { justify-self:start; min-width:6.5rem; }
.table-game .gt-dpad {
  display:grid; grid-template-columns:repeat(3,2.85rem); grid-template-rows:repeat(2,2.85rem);
  gap:.25rem; justify-self:center;
}
.gt-dpad > :first-child { grid-column:2; }
.gt-dpad > :nth-child(2) { grid-column:1; }
.table-game .gt-dpad button { padding:0; height:100%; font-size:1.15rem; }
.gt-list { padding-left:1.65rem; margin:0; line-height:1.7; overflow-wrap:anywhere; }
.gt-grid { display:grid; grid-template-columns:repeat(var(--cols),minmax(0,1fr)); gap:.25rem; }
.gt-grid button { padding:.2rem; touch-action:manipulation; min-height: 2.75rem; }
.gt-diagram { display:block; width:100%; height:auto; max-height:22rem; }
.table-game .gt-board { width:min(100%,30rem); aspect-ratio:1; grid-auto-rows:minmax(0,1fr); gap:2px; padding:2px; background:var(--line); }
.table-game .gt-board > button,.table-game .gt-board > span { display:grid; place-items:center; min-height:0; border:0; border-radius:3px; text-align:center; padding:0; font-weight:750; font-size:clamp(.7rem,2.6vw,1.45rem); }
.table-game .gt-board .gt-mark,.table-game button[aria-pressed="true"] { color:var(--on-accent); background:var(--accent); }
.table-game .gt-board .gt-tint { background:var(--tint); color:var(--tint-accent); }
.table-game .gt-board .gt-solid { background:var(--ink); color:var(--paper); }
.table-game .gt-board .gt-faint { color:var(--muted); background:var(--bg); }
.gt-scroll { overflow:auto; }
.gt-canvas { max-width:100%; width:36rem; aspect-ratio: 4/3; background:#182438; border-radius:12px; display:block; touch-action:none; }
.gt-tally { display:flex; flex-wrap:wrap; gap:.75rem; font-variant-numeric:tabular-nums; }
.gt-arena-screen { width:min(100%,41rem); min-width:0; justify-self:center; overflow:hidden; border:1px solid var(--line); border-radius:14px; background:var(--home-tile); }
.gt-arena-screen .gt-canvas { width:100%; height:auto; border-radius:0; }
.gt-arena-screen .gt-canvas:focus-visible { outline-offset:-4px; }
.gt-arena-toolbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.5rem 1rem; padding:.55rem .8rem; }
.gt-arena-toolbar .gt-tally { flex:1 1 11rem; font-weight:650; }
.table-game .gt-arena-status:not(:empty) { padding:.6rem .8rem; color:var(--ink); border-top:1px solid var(--line); }
.gt-arena-screen[data-phase="result"] .gt-arena-status { background:var(--tint); font-weight:750; }
[data-game="blockfit"] .gt-piece-tray { justify-content:center; }
[data-game="blockfit"] .gt-piece-tray button { display:grid; place-content:center; min-width:3.4rem; min-height:3.4rem; }
.gt-piece { display:grid; grid-auto-rows:.8rem; gap:2px; }
.gt-piece .filled { background:currentColor; border-radius:2px; }
[data-game="blockfit"] .gt-board > .gt-solid { background:#278276; box-shadow:inset 0 2px #ffffff4f; }
[data-game="blockfit"] .gt-board .gt-footprint { background:var(--tint); outline:2px dashed var(--accent); outline-offset:-3px; }
@media(max-width:36rem) { .table-game .gt-feature { min-height:8rem; } .table-game .gt-stack { gap:.65rem; } }
.games-subnav { margin-top:.5rem; gap:.4rem; }
.games-subnav a { font-size:.8rem; padding:.35rem .7rem; }
.game-collection { margin:1.15rem 0 1.7rem; scroll-margin-block-start:1.1rem; }
.game-collection h3 { margin:0 0 .6rem; color:var(--muted); font-size:1rem; }
.games-hub [hidden] { display:none !important; }
.game-finder { display:grid; gap:.4rem; max-width:40rem; margin-top:1.25rem; }
.game-finder label { font-size:.85rem; font-weight:650; color:var(--muted); }
.game-finder > div { display:flex; gap:.35rem; }
.game-finder input, .game-finder button { min-height:42px; border:1px solid var(--control-line); border-radius:8px; color:var(--ink); background:var(--paper); padding:.45rem .8rem; font:inherit; }
.game-finder input { min-width:0; flex:1; }
.game-finder button { cursor:pointer; }
.game-finder p { margin:0; font-size:.85rem; color:var(--muted); }
.game-finder p:empty { display:none; }

.gt-ready-board { border-radius:12px; padding:clamp(.75rem,3vw,1.5rem); background:var(--home-tile); color:var(--ink); }
.gt-ready-board > .gt-diagram { max-height:13rem; }
.gt-seats { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,8rem),1fr)); gap:.6rem; margin:0; padding:0; list-style:none; }
.gt-seats li { display:flex; gap:.5rem; align-items:center; min-width:0; padding:.65rem; border:1px solid var(--line); background:var(--paper); border-radius:.7rem; }
.table-game .gt-seats button { min-height:44px; padding:.25rem; border:0; background:transparent; text-align:start; font-size:.95rem; overflow-wrap:anywhere; }
.gt-seats .gt-roster-number { flex:none; width:2rem; }
.gt-roster-settings { border-top:1px solid var(--line); }
.gt-roster-settings summary { cursor:pointer; padding:.85rem 0; font-weight:650; }
.gt-roster-settings .gt-roster { margin:.5rem 0; }
.gt-dealt-hand { display:flex; flex-wrap:wrap; justify-content:center; gap:.3rem; padding:1rem .4rem; background:var(--home-tile); border-radius:.7rem; }
.gt-dealt-hand span { display:grid; place-items:center; flex:1; max-width:3rem; min-height:3rem; border:1px solid var(--control-line); border-radius:.3rem; background:var(--paper); color:var(--ink); font-weight:700; }

.gt-room-entry { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr)); gap:.7rem; }
.gt-room-entry > div { align-content:start; padding:.85rem; border-radius:.7rem; background:var(--home-tile); }
