/* Game Night shell and Games v3.0 overrides for the ported picture-board layout. */
:root {
  --bg: var(--gm-background);
  --panel: var(--gm-panel);
  --text: var(--gm-text);
  --muted: var(--gm-text-muted);
  --accent: var(--gm-focal);
  --coral: var(--gm-focus-ring);
  --line: var(--gm-line);
  color-scheme: inherit;
}
:root[data-theme="games-dark"] { color-scheme: dark; }
:root:not([data-theme]) { color-scheme: light dark; }
body { background: var(--bg); color: var(--text); font: 17px/1.48 var(--gm-font-body); }
main { padding-inline: var(--gm-page-pad-phone); max-width: 850px; }
.masthead { max-width: 850px; padding-inline: var(--gm-page-pad-phone); border-color: var(--line); }
.brand { color: var(--text); font: 750 27px/1.15 var(--gm-font-display); letter-spacing: -.025em; }
nav a { min-height: var(--gm-touch); font-size: 16px; }
h1, h2, h3, .room-code { font-family: var(--gm-font-display); }
h1 { font-size: clamp(34px, 7vw, 58px); }
h2 { font-size: clamp(25px, 4vw, 34px); }
.eyebrow { color: var(--muted); }
.panel, #game > section:has(form):not(.panel) { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: clamp(16px, 4vw, 26px); }
#game > section + section, #game > details + section { margin-top: 16px; }
#room form, #game form { margin-inline: 0; }
button, .button { background: var(--accent); color: var(--gm-on-focal); border: 1px solid var(--accent); min-height: var(--gm-touch); }
button.secondary, .button.secondary, button.danger, button[disabled]:not(.tile) { background: var(--panel); color: var(--text); border-color: var(--gm-line-strong); }
button[disabled]:not(.tile) { border-style: dashed; color: var(--muted); }
button[aria-pressed=true]:not(.tile) { outline: 3px solid var(--gm-focus-ring); outline-offset: 3px; }
:focus-visible { outline-color: var(--gm-focus-ring); }
input, select, textarea { background: var(--bg); color: var(--text); border-color: var(--gm-line-strong); }
input[type=radio], input[type=checkbox] { display: inline; width: auto; margin: 0 .5rem 0 0; min-height: 0; accent-color: var(--accent); }
fieldset { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
fieldset label { padding-block: 9px; }
[hidden] { display: none !important; }
.error, #connection, .saved.save-unconfirmed { color: var(--gm-status-wrong); }
#connection { margin: 0 0 12px; padding-inline: 0; }
#connection:empty, #toast:empty { display: none; }
#toast:not(:empty) { background: var(--text); color: var(--bg); z-index: 50; }
.sign { text-align: center; }
.sign h1 { margin-bottom: .1em; }
.room-code { display: block; margin: 0; color: var(--accent); font-size: clamp(36px, 10vw, 104px); letter-spacing: .04em; line-height: 1.2; }
.qr { width: min(100%, 230px); border: 8px solid white; }
.sign .actions { justify-content: center; }
.entry { max-width: 530px; margin: min(9vh, 62px) auto 0; }
.entry input { font-size: 18px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 12px; margin-bottom: 18px; }
.game-card { display: grid; justify-content: start; justify-items: start; gap: 2px; text-align: left; padding: 18px; min-height: 88px; }
.game-card strong { font: 750 26px/1.12 var(--gm-font-display); }
.game-card small { font-weight: 500; color: var(--muted); }
.score-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 8px 18px; }
.score-list li { display: flex; justify-content: space-between; gap: .5em; padding-block: 4px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.room-bar { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 16px; }
.room-bar strong { letter-spacing: .12em; }
.countdown { color: var(--gm-status-time); }
.tile, .tile[disabled], .tile[aria-pressed=true], .tile.chosen { background: var(--panel); color: var(--text); border-color: var(--gm-line-strong); box-shadow: none; }
.tile[aria-pressed=true], .tile.chosen { border-color: var(--text); }
.tile .tick { background: var(--text); color: var(--bg); border-color: var(--bg); }
.tile.match { border-color: var(--gm-status-right); }
.tile.miss { border-color: var(--gm-status-wrong); }
.tile.match .result-label { color: var(--gm-status-right); }
.tile.miss .result-label { color: var(--gm-status-wrong); }
.rank-up { color: var(--gm-status-right); }
.tray, .dock, .spotlight, .banner, .banner.landed, .banner.double, .error { background: var(--gm-wash); border-color: var(--gm-line-strong); color: var(--text); }
.bar .track { background: var(--gm-wash); }
.dock { background: var(--bg); }
.private { border-color: var(--gm-line-strong); }
.hands-options { display: grid; gap: 8px; font-size: 1.2rem; }
.host-cue { background: var(--gm-wash); padding: 12px; border-radius: 10px; }
.big-screen main { max-width: 1350px; padding: clamp(18px, 4vw, 54px) clamp(16px, 7vw, 96px); }
.big-screen .masthead { max-width: 1350px; padding-inline: clamp(16px, 7vw, 96px); }
.big-screen { font-size: clamp(18px, 2.4vw, 30px); }
.big-screen h2 { font-size: clamp(32px, 4.5vw, 60px); }
.big-screen .hint, .big-screen .label { font-size: clamp(16px, 2vw, 24px); }
.big-screen .qr { width: min(48vw, 280px); }
@media print {
  :root, :root[data-theme="games-dark"] { color-scheme: light; --bg: white; --panel: white; --text: #2a1830; --muted: #57465b; --accent: #2a1830; --line: #dccfda; }
  body, .panel { background: white; color: var(--text); }
  .masthead, .no-print, #toast, #connection { display: none !important; }
  main, .big-screen main { margin: 0; padding: 0; }
  .sign { border: 0; padding-top: 32px; }
  .sign .qr { width: 240px; }
}

#backups { white-space: pre-wrap; overflow-wrap: anywhere; }
