/* Shared game controls override legacy global button colors, without changing other modules. */
#game-pack-host {
  color-scheme: light;
  --ink: #24233a;
  border-radius: 24px;
  overflow: hidden;
}
#game-pack-host button {
  font-family: inherit;
  font-weight: 750;
  min-height: 48px;
  letter-spacing: normal;
}
#game-pack-host button:focus-visible {
  outline: 3px solid #6044ac;
  outline-offset: 3px;
}
#game-pack-host input { color-scheme: light; color: #24233a; background: #fffdf6; }
#game-pack-host button:disabled { opacity: .55; }
#game-pack-host .pb-btn.pb-primary { background: #24233a; color: #fff; }
#game-pack-host .pa2-btn.pa2-primary {color:#fff8e8;background:#24233a;}
#game-pack-host .pa2-btn.pa2-primary:active {color:#fff8e8;background:#3a3857;}
.room-code {padding:18px;background:#fff8e8;color:#24233a;border:2px solid #24233a;border-radius:16px;margin:16px 0}
.room-code strong {display:block;font:800 36px/1.5 monospace;letter-spacing:.16em}
#room-enter input {display:block;box-sizing:border-box;width:100%;min-height:56px;font-size:22px;margin:10px 0 20px}
.game-confirm { color:#24233a; background:#fff8e8; border:3px solid #24233a; border-radius:20px; padding:24px; width:min(420px,calc(100vw - 32px)); box-sizing:border-box; }
.game-confirm::backdrop { background:rgba(9,25,22,.7); }
.game-confirm button { display:block; width:100%; min-height:48px; margin-top:16px; padding:12px; border:2px solid #24233a; border-radius:12px; color:#24233a; background:#ffe26f; font:inherit; font-weight:700; }
.game-confirm [data-end] { margin-top:24px; background:#fff; }
.game-confirm p { line-height:1.7; }
.table-games .pack-c { color-scheme: light; }
.table-games .pack-c button { font-family: inherit; letter-spacing: normal; }
.game-room-return { display:grid; gap:10px; padding:18px; margin:0 auto 18px; max-width:720px; background:#aee8df; color:#24233a; border:2px solid #24233a; border-radius:18px; }
.game-room-return a { color:#24233a; font-weight:750; min-height:44px; display:flex; align-items:center; }
.game-room-return small { line-height:1.5; }
.table-games button[data-game="end-bomb"],.table-games button[data-game="end-seven"]{display:block;margin-top:36px;background:transparent;box-shadow:none;font-size:18px}
.pack-b button[data-action="g25-end"],.pack-b button[data-action="g26-end"]{margin-top:24px}

/* Bar readability: scope to game screens; never resize dice/card board cells. */
.game-quick-guide{margin:20px 0;padding:20px;background:#fffdf6;color:#24233a;border:2px solid #24233a;border-radius:18px}
.game-quick-guide h2{margin:0 0 12px;font-size:22px}
.game-quick-guide ol{padding-left:24px;margin:0;display:grid;gap:12px;font-size:18px;line-height:1.65}
.table-games :is(.pb-desc,.pb-meta,.pb-notice,.pb-error,.pa2-hint,.pa2-notice,
 .pack-b2-hint,.pack-b2-tip,.pack-b2-notice,.pack-b2-players,.pack-b2-rules,
 .pack-b2-dialog-body,.pack-c-hint,.pack-c-foot,.pack-c-notice,
 .g35-hint,.g36-hint,.g37-hint,.g45-hint,.g46-hint),
.table-games :is(.pack-b2,.pack-c,.pack-b,.pa2-root) p,
.table-games > p,.table-games #room-content > p,
.table-games :is(#room-status,#room-error),.game-confirm p {
 font-size:18px; line-height:1.65; overflow-wrap:anywhere;
}
.table-games :is(.pb-actions,.pa2-actions,.pack-b2-actions,.pack-c-actions,
 .g35-actions,.g36-actions,.g37-actions,.g45-actions,.g46-actions) {
 gap:16px; flex-wrap:wrap;
}
.table-games :is(.pb-btn,.pa2-btn,.pack-b2-primary,.pack-b2-ghost,.pack-b2-link,.pack-b2-danger,.pack-b2-exit,
 .pack-c-primary,.pack-c-quiet,.pack-c-exit,.pack-c-link,.pack-c-option,
 .g35-btn,.g36-btn,.g37-btn,.g45-btn,.g46-btn,.game-button),
#game-pack-host :is(.pb-btn,.pa2-btn,.pack-b2-primary,.pack-b2-ghost,.pack-b2-link,.pack-b2-danger,.pack-b2-exit,
 .pack-c-primary,.pack-c-quiet,.pack-c-exit,.pack-c-link,.pack-c-option,
 .g35-btn,.g36-btn,.g37-btn,.g45-btn,.g46-btn),.game-confirm button {
 min-height:56px; font-size:20px; line-height:1.4;
 padding:12px 16px; max-width:100%; white-space:normal;
 overflow-wrap:anywhere; touch-action:manipulation; box-sizing:border-box;
}
.table-games :is(.pb-actions,.pa2-actions,.pack-b2-actions,.pack-c-actions,
 .g35-actions,.g36-actions,.g37-actions,.g45-actions,.g46-actions) > button {
 flex:1 1 140px; min-width:0;
}
.table-games :is(.pack-b2-hint,.pack-b2-tip,.pack-c-hint,.pack-c-foot) {color:#514b62}
.table-games :is(.pb-notice,.pa2-notice,.pack-b2-notice,.pack-c-notice) {
 padding:14px 16px; border-left:5px solid currentColor;
}
.table-games :is([data-room-action="end"],#room-leave) {
 display:block; margin-top:28px; width:100%;
}
.game-confirm {max-height:calc(100dvh - 32px);overflow-y:auto}
.game-confirm h2 {font-size:24px;line-height:1.4}
.game-confirm [data-end] {margin-top:28px}
@media (max-width:380px) {
 .table-games :is(.pb-actions,.pa2-actions,.pack-b2-actions,.pack-c-actions,
 .g35-actions,.g36-actions,.g37-actions,.g45-actions,.g46-actions) > button {
  flex-basis:100%; width:100%;
 }
}
