.game-photo {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(rgba(var(--palette-black-rgb), .24), rgba(var(--palette-black-rgb), .24)),
    url("/img/photos/site/hero_1777882135266_YHL08771-Enhanced.jpg") center / cover,
    url("/game/site/home.jpg") center / cover;
}
.game-page .shell {
  position: relative;
  width: min(100%, 1120px);
  min-height: 85vh;
  margin: auto;
  padding: var(--page-panel-top, 110px) clamp(16px, 4vw, 52px) 64px;
}
.game-page #app, .game-tools:has(button:not([hidden])) {
  background: var(--glass-bg);
  border: var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  --text-secondary: color-mix(in srgb, var(--palette-gray) 45%, var(--palette-white));
}
/* Let the photograph carry through the whole sheet. Frost individual cards only once. */
.game-page #app {
  padding: clamp(18px, 4vw, 46px);
  background: rgba(var(--palette-black-rgb), .22);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.game-page :is(#app,dialog) {
  --text-primary: color-mix(in srgb, var(--palette-white) 76%, var(--palette-gray));
  --text-strong: color-mix(in srgb, var(--palette-white) 86%, var(--palette-gray));
  --text-secondary: color-mix(in srgb, var(--palette-gray) 65%, var(--palette-white));
  --muted: var(--text-secondary);
  color: var(--text-primary);
}
.game-page #app :is(.eyebrow,.quick-guide ol,.seat-tools p,.room-field label,.entry > label) { color: var(--text-secondary); }
.game-page .hero { padding-top: 0; min-height: auto; }
.game-page .game-card, .game-page .panel { background: rgba(var(--palette-black-rgb), .35); }
.game-page .game-card:hover { background: rgba(var(--palette-blue-rgb), .2); }
.game-tools { display: flex; justify-content: flex-end; }
.game-tools:has(button:not([hidden])) { width: fit-content; margin: 0 0 12px auto; padding: 4px 10px; }
.game-page #site-footer { position: relative; }
.quick-guide { margin-top: 20px; border-top: 1px solid var(--line-faint); padding-top: 16px; }
.quick-guide h2 { font-size: 1rem; }
.quick-guide ol { margin: 8px 0 0; padding-inline-start: 1.5em; }
.quick-guide li + li { margin-top: 5px; }
.card-mark svg { display: block; }
.game-page .game-card { text-align: start; color: inherit; }
.game-page .game-card:disabled { opacity: 1; cursor: default; }
.game-page .entry + .game-grid { margin-top: 24px; }
.game-tools { align-items: center; gap: 10px; }
.hall-link { display: inline-flex; align-items: center; padding-inline: 8px; min-height: 44px; color: var(--text-primary); font-size: .875rem; }

/* Keep the shared site navigation at its own type scale. */
.game-page #app, .game-page dialog { font-size: .9375rem; line-height: 1.65; line-break: strict; }
.game-page #app :is(h1,h2,.question,.card-title) { text-wrap: balance; overflow-wrap: anywhere; }
.game-page #app :is(p,li,.card-copy), .game-page dialog li { text-wrap: pretty; overflow-wrap: anywhere; }
.game-page #app h1 { font-size: clamp(1.6rem, 4vw, 2.45rem); line-height: 1.25; }
.game-page #app .question { font-size: clamp(1.125rem, 3vw, 1.6rem); line-height: 1.5; }
.game-page #app :is(input:not([type=radio]),select) { font-size: 1rem; }
.game-page #app .card-title { font-size: 1.125rem; }
.game-page .entry { gap: 8px; }
.entry-modes { display: grid; grid-template-columns: 1fr 1fr; border: 0; border-radius: 9px; background: var(--bg); margin: 0 0 12px; padding: 3px; min-inline-size: 0; }
.entry-modes label { position: relative; cursor: pointer; }
.entry-modes input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.entry-modes span { display: grid; place-items: center; min-height: 44px; color: var(--text-secondary); border: 1px solid transparent; border-radius: 7px; }
.entry-modes input:checked + span { background: var(--surface-raised); color: var(--text-strong); border-color: var(--line-faint); }
.entry-modes input:focus-visible + span { outline: 2px solid var(--accent-hover); }
.room-field:not([hidden]) { display: grid; gap: 8px; margin-top: 6px; }
.entry > .primary { margin-top: 8px; }
.game-tools:has(button:not([hidden])) { gap: 0; padding: 2px; border-radius: 999px; }
.game-tools .top-controls { gap: 0; }
.game-tools :is(a,button) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; font: inherit; font-size: .875rem; line-height: 1; color: var(--text-strong); white-space: nowrap; background: transparent; border: 0; border-radius: 999px; box-shadow: none; text-decoration: none; }
.game-tools :is(a,button):hover { background: var(--surface-hover); }
.game-tools .hall-link::before { content: "‹"; margin-right: 6px; color: var(--accent-hover); font-size: 1.3rem; }
.role-line { display: flex; flex-wrap: wrap; gap: 2px 16px; color: var(--text-secondary); }
.code-row > div, .word-scores span { white-space: nowrap; }
.seat-tools { max-width: 650px; margin: 14px auto 0; border-top: 1px solid var(--line-faint); }
.seat-tools summary { padding: 12px 0; cursor: pointer; font-size: .875rem; }
.seat-tools button { overflow-wrap: anywhere; max-width: 100%; margin: 4px 4px 0 0; }
.room-panel .game-grid { grid-template-columns: 1fr; margin-top: 14px; }
.room-panel .game-card { min-height: 0; padding: 16px; }
@media (max-width: 660px) {
  .game-page .shell { padding-inline: 10px; }
  .game-page #app { padding: 16px 12px; }
  .game-page .panel { padding: 16px 12px; }
  .game-page .hero { padding-bottom: 18px; }
  .game-page .game-card { grid-template: auto auto auto / 36px minmax(0,1fr); gap: 3px 12px; padding: 14px; }
  .game-card .card-mark { grid-row: 1 / span 3; align-self: start; }
  .game-card .card-mark svg { width: 36px; height: 36px; }
  .game-card .card-copy, .game-card .card-link { grid-column: 2; }
  .game-card .card-link { margin-top: 4px; }
  .room-panel:has(.word-grid) { padding-inline: 5px; }
  .word-grid { gap: 3px; }
  .word-grid .word { padding: 5px 1px; line-height: 1.3; font-size: .875rem; white-space: nowrap; }
  .reveal-pair { grid-template-columns: 1fr; }
  .game-page .intro { grid-template-columns: 1fr; min-height: 0; padding: 4px 0 18px; }
  .intro .card-stack { display: none; }
  .game-page .player-controls { grid-column: 1 / -1; }
  .game-page .stage { margin-top: 0; }
  .game-page .play-card { min-height: 112px; }
}
.game-tools [hidden] { display: none !important; }
@supports (word-break: auto-phrase) {
  .game-page #app :is(h1,h2,p,li,.card-copy), .game-page dialog li { word-break: auto-phrase; }
}

/* Shared frosted surfaces; the tinted cards retain their gameplay cues. */
.game-page :is(.panel, .game-card, .personal-card, .reveal-pair > div, .question-card,
  .revealed article, .play-card, .entry-modes, .player, .word, dialog) {
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.game-page :is(.panel, .game-card, .personal-card, .reveal-pair > div, .question-card,
  .revealed article, .entry-modes, .player) {
  background: linear-gradient(145deg, rgba(var(--palette-black-rgb), .32), rgba(var(--palette-black-rgb), .44));
  border: var(--glass-border);
  box-shadow: inset 0 1px rgba(var(--palette-white-rgb), .06);
}
.game-page .question-card, .game-page .question-card p { color: var(--text-strong); }
.game-page dialog { background: rgba(var(--palette-black-rgb), .76); border: var(--glass-border); box-shadow: var(--glass-shadow); }
.game-page .play-card.black, .game-page .word { background-color: rgba(var(--palette-black-rgb), .45); }
.game-page .play-card.red { background: color-mix(in srgb, #622936 68%, transparent); }
.game-page .word.role-0 { background-color: rgba(var(--accent-rgb), .22); }
.game-page .word.role-1 { background-color: rgba(var(--palette-gold-rgb), .15); }
.game-page .word.role-neutral { background-color: rgba(var(--palette-gray-rgb), .26); }
.game-page .word.role-assassin { background-color: #622936; color: #f9d6d9; border-color: #f9d6d9; }

.game-page #app :is(input:not([type=radio]), select, .entry-modes input:checked + span) {
  background-color: rgba(var(--palette-black-rgb), .44);
}
.game-page #app select option { background: var(--bg); color: var(--text-strong); }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .game-page #app, .game-page dialog { background: var(--surface-raised); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
#room-toggle { font-variant-numeric: tabular-nums; }
#room-toggle[aria-expanded=true] { background: var(--surface-hover); }
#room-controls {
  position: relative;
  width: min(100%, 28rem);
  margin: 0 0 12px auto;
  padding: clamp(14px, 3vw, 24px);
  background: rgba(var(--palette-black-rgb), .58);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  border: 1px solid var(--line-faint);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: .9375rem;
  overflow-wrap: anywhere;
}
#room-controls .entry { background: none; border: 0; padding: 0; box-shadow: none; backdrop-filter: none; }
#room-controls input:not([type=radio]) { font-size: 1rem; }

.after-hours-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 12px; }
.after-hours-label { display: inline-flex; align-items: center; gap: 10px; color: var(--text-primary); font-size: .875rem; letter-spacing: .06em; }
.after-hours-label::after { content: ""; width: 32px; border-top: 1px solid currentColor; }
.after-hours-heading .game-tools { margin: 0 0 0 auto; }

.game-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

#taboo-panel { margin-top: 14px; }
#taboo-panel summary { cursor: pointer; font-size: .92rem; }
#taboo-panel p { overflow-wrap: anywhere; }

#sketch-board { display: block; width: 100%; max-width: 640px; height: auto; margin: 1rem auto; background: #fbf6ed; border-radius: 12px; }
#sketch-board.drawing { touch-action: none; cursor: crosshair; }

.game-page #app:has(#golf-form), .game-page .room-panel:has(#golf-form) {
  background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
}
.game-page .room-panel:has(#golf-form) { max-width: none; padding: 0; margin-top: 0; }
.game-page #app:has(#golf-form) { padding: 0; }
.game-page #app:has(#golf-form) .room-header { max-width: none; margin: 0 0 8px; padding: 0; }
.scorecard-scroll { position: relative; max-width: 100%; overflow-x: auto; border: 1px solid #ffffff45; border-radius: 4px; background: linear-gradient(115deg, rgba(78,78,78,.20), rgba(36,36,36,.38)); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.golf-sheet { border-collapse: separate; border-spacing: 0; width: 100%; color: #f3f1ec; font: 400 16px/1.25 system-ui,sans-serif; font-variant-numeric: tabular-nums; text-align: center; }
.golf-sheet :is(td,th) { min-width: 56px; height: 36px; padding: 3px; border-right: 1px solid #ffffff17; border-bottom: 1px solid #ffffff24; background: transparent; }
.scorecard-scroll { --category-width: 42px; max-height: 68vh; max-height: 68svh; overflow: auto; }
.golf-sheet .golf-category, .golf-sheet .golf-row-label { position: sticky; z-index: 2; background: rgba(48,48,48,.66); backdrop-filter: blur(8px); }
.golf-sheet .golf-category { box-sizing: border-box; left: 0; width: var(--category-width); min-width: var(--category-width); max-width: var(--category-width); white-space: nowrap; }
.golf-sheet .golf-row-label { left: var(--category-width); min-width: 68px; white-space: nowrap; text-align: left; padding-left: 8px; }
.golf-sheet thead th { position: sticky; top: 0; z-index: 3; height: 33px; background: rgba(60,60,60,.62); backdrop-filter: blur(8px); }
.golf-sheet thead :is(.golf-category,.golf-row-label) { z-index: 4; }
.golf-sheet .golf-summary { background-color: #ffffff12; font-weight: 400; }
.golf-sheet thead .current-hole { background-color: #646464b3; }
.golf-sheet .current-hole { background: #ffffff12; }
.golf-sheet thead .current-hole { box-shadow: inset 0 2px #ddd9d2; }
.golf-sheet small { display: block; font-size: .65rem; line-height: 1.25; color: #ddd9d2; }
.golf-sheet td[data-team="blue"] { background-color: rgba(var(--palette-blue-rgb), .55); }
.golf-sheet td[data-team="gold"] { background-color: rgba(var(--palette-gold-rgb), .5); }
.golf-sheet td[data-team="tie"] { background-color: rgba(144, 151, 154, .25); }
.golf-sheet .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.golf-results tr:first-child > *, .golf-points tr:first-child > * { border-top: 1px solid #99999988; }
.golf-points td { font-weight: 400; height: 33px; }
.golf-sheet td:has(input) { padding: 0; text-align: center; vertical-align: middle; }
.golf-par-row .golf-row-label { padding-inline: 0; text-align: center; }
.stroke-mark { position: relative; display: grid; place-items: center; width: 100%; }
.stroke-mark:is(.under,.over)::before { content: ""; pointer-events: none; position: absolute; width: 27px; height: 27px; box-sizing: border-box; border: 1px solid currentColor; }
.stroke-mark.under::before { border-radius: 50%; }
.stroke-mark.double::before { border-width: 3px; border-style: double; }
.game-page #app #golf-form .golf-sheet input { position: relative; display: block; width: 100%; height: 36px; min-height: 36px; box-sizing: border-box; padding: 0; margin: 0; font: inherit; text-align: center; background: transparent; color: inherit; border: 0; border-radius: 0; appearance: textfield; }
.golf-sheet input::-webkit-inner-spin-button, .golf-sheet input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.golf-sheet input::placeholder { color: #dfdfdf; font: inherit; }
.rename-tools { margin: 12px 0; }
.rename-tools summary { cursor: pointer; }


.golf-sheet th { font-weight: 400; }
.game-page #app #golf-form input:focus { outline: none; box-shadow: none; }
.golf-sheet td:focus-within { background-image: linear-gradient(rgba(var(--palette-white-rgb), .2), rgba(var(--palette-white-rgb), .2)); box-shadow: inset 0 0 0 1px rgba(var(--palette-white-rgb), .72); }
.golf-sheet .golf-summary, .golf-sheet .golf-category { color: #ebe7e1; }
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .scorecard-scroll { background: #383838; }
}

#golf-pad:not([hidden]) { position: fixed; inset: auto 0 0; z-index: 100; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 0 0 env(safe-area-inset-bottom); background: linear-gradient(110deg, rgba(var(--palette-blue-rgb), .32), rgba(var(--palette-gold-rgb), .17)), rgba(var(--palette-black-rgb), .62); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid rgba(var(--palette-white-rgb), .3); }
.game-page #golf-pad button, #golf-pad span { height: 50px; margin: 0; padding: 0; border: 0; border-radius: 0; min-width: 0; background: rgba(var(--palette-white-rgb), .045); color: var(--palette-white); box-shadow: inset -1px -1px rgba(var(--palette-white-rgb), .16); font: 400 27px/1 system-ui,sans-serif; touch-action: manipulation; }
.game-page #golf-pad [data-digit="delete"], #golf-pad span { background: rgba(var(--palette-blue-rgb), .16); }
.game-page #golf-pad button:active { background: rgba(var(--palette-gold-rgb), .36); }
body:has(#golf-pad:not([hidden])) { padding-bottom: calc(204px + env(safe-area-inset-bottom)); }

.golf-carry { margin-bottom: 6px; color: var(--text-secondary); font-size: .875rem; }
