/* Shared game palette and controls. */
:root {
  color-scheme: light;
  --broadcast-navy: #f7f8fa;
  --midnight: #ffffff;
  --board-blue: #17367d;
  --board-blue-dark: #132a60;
  --electric-blue: #8eb3ef;
  --action-blue: #2655a6;
  --action-blue-hover: #1b438b;
  --marquee-gold: #e7bd62;
  --marquee-gold-soft: #f2ce81;
  --cue-red: #cb3f35;
  --signal-green: #427459;
  --paper: #f7f8fa;
  --white: #20252c;
  --ink-muted: #68717e;
  --panel: #ffffff;
  --panel-light: #f0f2f5;
  --line: #e0e4e9;
  --line-strong: #cbd1d9;
  --display: var(--body);
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
  --shadow-hard: none;
  --shadow-deep: none;
}
html,
body {
  background: var(--paper);
}
body {
  color: var(--white);
  background: var(--paper);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--action-blue);
  outline-offset: 3px;
}
input,
select,
textarea {
  min-height: 44px;
  color: var(--white);
  background: var(--midnight);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: none;
}
input::placeholder,
textarea::placeholder {
  color: #77818f;
}
label > span {
  color: var(--ink-muted);
  font-family: var(--body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.button {
  min-height: 44px;
  gap: 16px;
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: none;
  transition:
    background-color 120ms ease,
    border-color 120ms ease;
}
.button:not(:disabled):hover,
.button:not(:disabled):active {
  transform: none;
  filter: none;
  box-shadow: none;
}
.button-primary {
  color: #fff;
  background: #252b35;
  border-color: #252b35;
}
.button-primary:not(:disabled):hover {
  color: #fff;
  background: #414b5b;
  border-color: #414b5b;
}
.button-secondary {
  color: var(--white);
  background: #fff;
  border-color: var(--line-strong);
}
.button-secondary:not(:disabled):hover {
  background: var(--panel-light);
  border-color: #aeb7c4;
}
.button-gold {
  color: #fff;
  background: #252b35;
  border-color: #252b35;
}
.button-gold:not(:disabled):hover {
  background: #414b5b;
  border-color: #414b5b;
}
.button:disabled {
  opacity: 0.4;
}
.text-button {
  min-height: 44px;
  padding: 8px;
  color: var(--ink-muted);
  font-family: var(--body);
  font-size: 0.8rem;
  letter-spacing: 0;
  text-transform: none;
}
.text-button:hover {
  color: var(--white);
}
.icon-button {
  min-width: 44px;
  min-height: 44px;
  color: var(--ink-muted);
  background: transparent;
  border-color: var(--line);
  border-radius: 3px;
}
.panel-label,
.eyebrow,
.card-kicker {
  color: var(--ink-muted);
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}
.signal-mark {
  box-shadow: none;
}
.signal-bar {
  color: #fff;
  background: #843931;
}
h1,
h2,
h3 {
  font-family: var(--body);
}
.hub-brand,
.hub-brand span,
.mini-logo {
  text-shadow: none;
}

/* Public lobby */
.landing {
  width: 100%;
  min-height: 100vh;
  padding: 0 0 28px;
}
.hub-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 68px;
  margin: 0;
  padding: 0 max(24px, calc((100vw - 1120px) / 2));
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.hub-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--white);
  font-family: var(--body);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  text-decoration: none;
}
.hub-brand::before { content: none; }
.brand-mark { width: 24px; height: 24px; flex-shrink: 0; color: var(--action-blue); }
.brand-party { color: var(--action-blue); }
.hub-actions { display: flex; gap: 8px; }
.hub-actions a.button { text-decoration: none; }
.hub-actions .button {
  padding: 8px 13px;
  font-size: 0.8rem;
}
.landing-shell {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding-top: 36px;
}
.landing-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.landing-heading h1 {
  margin: 0;
  color: var(--white);
  font: 600 1.85rem/1.2 var(--body);
  letter-spacing: -0.025em;
}
.landing-heading p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}
.landing-heading .button { flex-shrink: 0; }
.landing.is-invite .landing-shell { max-width: 440px; padding-top: 56px; }
.landing.is-invite .landing-heading { margin-bottom: 28px; }
.landing.is-invite .landing-heading p { max-width: none; margin-top: 10px; }
.landing.is-invite .landing-workspace { grid-template-columns: 1fr; grid-template-areas: "join"; }
.landing.is-invite .join-form { grid-template-columns: 1fr; gap: 20px; }
.landing.is-invite :is(.hub-actions, #create-room-button, #join-title, .public-game-browser, .landing-address, .site-footnote) { display: none; }
.landing.is-invite .join-form input { height: 48px; font-size: 1rem; }
.landing-workspace {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  grid-template-areas: "join archive";
  align-items: start;
  gap: 32px;
  margin: 0;
  padding: 0;
  border: 0;
}
.landing-join-rail {
  grid-area: join;
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
}
.join-panel {
  padding: 0;
  color: var(--white);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.join-panel h2 {
  margin: 0 0 20px;
  color: var(--white);
  font: 600 1rem/1.3 var(--body);
}
.form-error {
  grid-column: 1/-1;
  margin: 0;
  color: #a5322b;
  font-size: 0.8rem;
  line-height: 1.5;
}
.form-error[hidden] { display: none; }
.join-form input[aria-invalid="true"] { border-color: #b63f36; }
.join-panel .join-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.join-form label { min-width: 0; }
.join-form input {
  height: 44px;
  color: var(--white);
  background: #fff;
  font-size: 0.875rem;
}
#join-code {
  font-family: var(--mono);
  letter-spacing: 0.12em;
}
.join-panel .join-form .button {
  grid-column: 1/-1;
  width: 100%;
  margin-top: 2px;
}
.landing-address,
.lobby-rules {
  margin: 12px 0 0;
  padding: 0 6px;
  color: var(--ink-muted);
  background: none;
  border: 0;
  font-size: 0.75rem;
}
.landing-address summary,
.lobby-rules summary {
  min-height: 44px;
  padding: 14px 0;
  cursor: pointer;
}
.landing-address p { margin: 4px 0 8px; line-height: 1.6; }
.landing-address code { color: var(--white); overflow-wrap: anywhere; }
.lobby-rules { margin-top: 0; }
.lobby-rules ol { padding-left: 18px; margin: 0; line-height: 1.8; }
.lobby-rules p { line-height: 1.6; }
.public-game-browser {
  grid-area: archive;
  min-width: 0;
  overflow: visible;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.public-game-browser::before { content: none; }
.public-browser-toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  padding: 0 0 18px;
  background: none;
  border: 0;
}
.archive-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}
.archive-title h2 {
  margin: 0;
  color: var(--white);
  font: 600 1rem/1.3 var(--body);
}
.archive-title > span { color: var(--ink-muted); font-size: 0.75rem; }
.public-browser-tools,
.library-tools {
  display: flex;
  flex-direction: row;
  align-items: center;
  min-width: 0;
  gap: 10px;
}
.compact-search,
.search-field { flex: 1; width: auto; min-width: 0; }
.compact-search input,
.search-field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: var(--white);
  background: #fff;
  border: 1px solid var(--line-strong);
  font-size: 0.875rem;
}
.year-select { flex: 0 0 124px; }
.year-select select {
  width: 100%;
  min-height: 44px;
  padding: 8px 28px 8px 12px;
  background: #fff;
  font-size: 0.8rem;
}
.year-select > span:not(.sr-only) { display: none; }
.public-game-table {
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.archive-instruction {
  margin: -4px 0 14px;
  color: var(--ink-muted);
  font-size: 0.8rem;
}
.public-game-head {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr) 24px;
  gap: 20px;
  padding: 11px 20px;
  color: var(--ink-muted);
  background: #fafbfc;
  border-bottom: 1px solid var(--line);
  font: 500 0.75rem/1.4 var(--body);
  letter-spacing: 0;
  text-transform: none;
}
.public-game-head span:first-child { grid-column: auto; }
#public-game-list {
  max-height: 420px;
  min-height: 240px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c4c8ce transparent;
}
.public-game-row {
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr) 24px;
  grid-template-areas: "title topics arrow";
  align-items: center;
  gap: 20px;
  width: 100%;
  min-height: 84px;
  padding: 16px 20px;
  color: var(--white);
  background: #fff;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  transition: background-color 120ms;
}
.public-game-row:last-child { border-bottom: 0; }
.public-game-row:nth-child(even) { background: #fff; }
.public-game-row:not(:disabled):hover { background: #f4f6f9; }
.public-game-row:focus-visible { outline-offset: -3px; }
.public-game-row:disabled { opacity: 0.5; }
.public-game-title { display: block; grid-area: title; min-width: 0; }
.public-game-title > span {
  display: grid;
  gap: 6px;
}
.public-game-title strong {
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
}
.public-game-title small {
  display: block;
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 400;
}
.public-game-topics {
  grid-area: topics;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  padding: 0;
  overflow: hidden;
  color: #5d6673;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.7;
  text-overflow: ellipsis;
  white-space: normal;
}
.public-game-level { grid-area: arrow; justify-content: flex-end; font-size: 0; text-align: right; }
.public-game-level b { color: #6b7280; font-size: 1.1rem; font-weight: 400; }
.public-game-row:hover .public-game-level b { color: var(--action-blue); }
.archive-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  color: var(--ink-muted);
  background: none;
  border: 0;
  font-size: 0.7rem;
}
.match-count { color: var(--ink-muted); font: 400 0.7rem var(--body); }
.site-footnote {
  margin: 36px 0 0;
  padding: 20px 0 0;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
  font-size: 0.68rem;
}
.lobby-loading,
.public-game-empty,
.no-results,
.empty-roster {
  color: var(--ink-muted);
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.public-game-empty { padding: 32px 20px; }

/* Room setup */
.room-shell {
  background: var(--paper);
}
.room-header {
  min-height: 68px;
  padding: 7px max(24px, calc((100vw - 1120px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: none;
}
.mini-logo {
  color: var(--white);
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.room-code {
  color: var(--white);
  background: var(--panel-light);
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-size: 0.95rem;
}
.room-label,
.copy-hint {
  color: var(--ink-muted);
  font-family: var(--body);
  font-size: 0.7rem;
  letter-spacing: 0;
  text-transform: none;
}
#room-content {
  padding-top: 0;
}
.lobby-layout {
  display: grid;
  width: min(1120px, calc(100% - 48px));
  grid-template-columns: minmax(0, 1fr) 255px;
  grid-template-areas: "preview room" "library room";
  align-items: start;
  gap: 24px 28px;
  margin: 0 auto;
  padding: 32px 0;
}
.lobby-preview {
  grid-area: preview;
  min-width: 0;
  padding: 0;
}
.lobby-preview-header {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.lobby-preview-heading {
  min-width: 0;
}
.lobby-preview-heading h2 {
  margin: 0;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.lobby-preview-heading p {
  margin: 4px 0 0;
  color: var(--ink-muted);
  font-size: 0.75rem;
}
.lobby-start-button {
  flex-shrink: 0;
  min-width: 136px;
  color: #fff;
  background: #252b35;
  border-color: #252b35;
}
.lobby-start-button:not(:disabled):hover {
  color: #fff;
  background: #414b5b;
  border-color: #414b5b;
}
.lobby-board-preview {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  padding: 0;
  color: #fff;
  background: #3a4d70;
  border: 1px solid #24395b;
  border-radius: 6px;
  overflow: hidden;
}
.lobby-preview-category {
  display: flex;
  min-width: 0;
  min-height: 86px;
  align-items: center;
  justify-content: center;
  padding: 8px 6px;
  color: #e4ebf6;
  background: #122950;
  font-family: var(--display);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  text-align: center;
  overflow-wrap: anywhere;
}
.lobby-preview-value {
  display: grid;
  min-height: 35px;
  place-items: center;
  color: #e7bd62;
  background: #18376d;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.lobby-preview.is-unselected .lobby-preview-category {
  color: #b9c3d3;
  background: #252f3d;
}
.lobby-preview.is-unselected .lobby-board-preview {
  display: none;
}
.lobby-preview.is-unselected .lobby-preview-value {
  color: #bdc5d1;
  background: #2b3748;
}
.lobby-preview-status {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-top: 9px;
  color: var(--ink-muted);
  font-size: 0.7rem;
  line-height: 1.5;
}
.lobby-room {
  grid-area: room;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  padding-left: 24px;
  border-left: 1px solid var(--line);
}
.broadcast-card,
.roster-card,
.lobby-room .host-play-station {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.broadcast-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.broadcast-heading .panel-label {
  margin: 0;
}
.giant-code {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 13px 0;
  margin: 9px 0 0;
  color: var(--white);
  background: transparent;
  border: 0;
  border-radius: 0;
  font-family: var(--mono);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: center;
}
.giant-code:hover {
  background: var(--panel-light);
}
.giant-code small {
  color: var(--ink-muted);
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0;
}
.network-addresses {
  gap: 4px;
  margin-top: 12px;
  padding-top: 0;
  border: 0;
}
.network-addresses span {
  color: var(--ink-muted);
  font-size: 0.7rem;
}
.network-addresses code {
  color: var(--white);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
  user-select: all;
}
.lobby-room .panel-heading {
  margin-bottom: 8px;
}
.lobby-room .panel-heading h2 {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
}
.lobby-room .panel-heading h2 > span {
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 400;
}
.roster-item,
.roster-item.is-you {
  grid-template-columns: minmax(0, 1fr) auto auto;
  padding: 9px 0;
  color: var(--white);
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
}
.roster-name em,
.roster-name em.host-badge,
.host-badge {
  color: var(--ink-muted);
  background: none;
  border: 0;
  font-size: 0.6rem;
  font-weight: 400;
}
.empty-roster {
  min-height: 0;
  padding: 12px 0;
}
.empty-roster strong {
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 400;
}
.empty-roster span {
  color: var(--ink-muted);
  font-size: 0.72rem;
}
.lobby-room .host-play-station {
  width: 100%;
  margin: 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.host-play-station h2 {
  margin: 0 0 12px;
  color: var(--white);
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
}
.host-play-station p {
  margin: 9px 0 0;
  color: var(--ink-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}
.host-play-station .panel-label {
  margin: 0 0 6px;
}
.host-contestant-form {
  display: grid;
  gap: 10px;
}
.host-contestant-form input {
  width: 100%;
}
.host-contestant-form .button {
  width: 100%;
}
.game-library {
  grid-area: library;
  min-width: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 0;
  background: none;
  border: 0;
}
.library-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}
.library-title h2 {
  margin: 0;
  color: var(--white);
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 600;
}
.library-title > span {
  color: var(--ink-muted);
  font-size: 0.7rem;
}
.library-tools {
  flex-wrap: nowrap;
}
.library-tools .button {
  min-height: 40px;
  padding: 8px 11px;
  font-size: 0.75rem;
}
.library-tools .search-field {
  width: auto;
}
.library-tools .search-field input {
  width: 190px;
}
.host-game-table {
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
}
.host-game-head,
.host-game-row {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr) 20px;
  gap: 20px;
}
.host-game-head span:first-child {
  grid-column: auto;
}
.host-game-head {
  min-height: 38px;
  padding: 10px 16px;
  color: var(--ink-muted);
  background: var(--panel-light);
  border-bottom: 1px solid var(--line);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}
.host-game-list {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #50555c transparent;
}
.host-game-row {
  min-height: 76px;
  padding-block: 14px;
  color: var(--white);
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.host-game-row:nth-child(even) {
  background: #fff;
}
.host-game-row:not(:disabled):hover {
  background: var(--panel-light);
}
.host-game-row:focus-visible {
  outline-offset: -3px;
}
.host-game-copy strong {
  color: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
}
.host-game-copy small {
  color: var(--ink-muted);
  font-size: 0.7rem;
}
.host-game-row.is-preferred,
.host-game-row.is-preferred:nth-child(even) {
  background: #edf2fa;
  box-shadow: none;
}
.host-game-row.is-preferred .row-select-mark {
  color: var(--action-blue);
}
.host-game-topics {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  min-width: 0;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 0.75rem;
  line-height: 1.7;
  text-overflow: ellipsis;
  white-space: normal;
}
.host-game-head span:nth-child(2) {
  display: block;
}

/* Board */
.game-shell {
  width: min(1120px, calc(100% - 48px));
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0 32px;
}
.game-main,
.final-main {
  min-width: 0;
}
.game-titlebar {
  flex-direction: row;
  align-items: center;
  text-align: left;
  min-height: 0;
  gap: 16px;
  padding: 0;
  margin-bottom: 14px;
}
.game-titlebar h2 {
  color: var(--white);
  font-family: var(--body);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.2;
}
.host-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.host-toolbar .button {
  min-height: 44px;
  padding: 10px 13px;
  font-size: 0.75rem;
}
.board-turn-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 10px 0;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}
.board-turn-strip strong {
  color: var(--white);
  font-weight: 500;
}
.board-turn-strip.is-your-turn strong {
  color: var(--action-blue);
}
.board-wrap {
  overflow: hidden;
  padding: 2px;
  background: #10244d;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.board-grid {
  min-width: 0;
  grid-template-columns: repeat(var(--board-columns), minmax(0, 1fr));
  gap: 2px;
  padding: 0;
  background: #10244d;
}
.category-tile,
.clue-tile {
  min-width: 0;
  min-height: clamp(48px, calc((100dvh - 410px) / 6), 80px);
  color: #fff;
  background: var(--board-blue);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-shadow: none;
}
.category-tile {
  background: var(--board-blue-dark);
  font-family: var(--body);
  font-size: clamp(0.7rem, 1.05vw, 0.95rem);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.clue-tile {
  color: var(--marquee-gold);
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.3vw, 2.1rem);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  padding: 4px;
  line-height: 1;
}
.clue-tile:disabled:not(.answered) {
  opacity: 1;
  cursor: default;
}
.clue-tile:not(:disabled):hover {
  background: #2148a3;
  box-shadow: inset 0 0 0 2px var(--marquee-gold);
  filter: none;
  transform: none;
}
.clue-tile.answered {
  opacity: 1;
  background: #112653;
  box-shadow: none;
}
.mobile-board {
  display: none;
}
.score-rail {
  position: static;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.score-heading {
  min-height: 0;
  align-items: baseline;
  padding: 0 0 9px;
  margin: 0;
  border: 0;
}
.score-heading .panel-label {
  color: var(--ink-muted);
}
.score-heading > span {
  color: var(--ink-muted);
  font-size: 0.65rem;
}
.score-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0 24px;
  border-top: 1px solid var(--line);
}
.score-list:has(> :only-child) { grid-template-columns: minmax(0, 360px); }
.score-card,
.score-card.is-you {
  container-type: inline-size;
  align-items: start;
  align-content: start;
  min-height: 86px;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 16px 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.place-number {
  color: var(--ink-muted);
  padding-top: 3px;
  font-size: 0.72rem;
}
.score-name {
  flex-wrap: wrap;
  gap: 6px;
  color: var(--white);
  font-family: var(--body);
  font-size: 0.88rem;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  overflow-wrap: anywhere;
}
.score-name b {
  font-weight: 500;
}
.score-name em {
  color: var(--ink-muted);
  background: none;
  font-size: 0.6rem;
  font-style: normal;
}
.score-copy > strong {
  display: block;
  margin-top: 2px;
  color: var(--white);
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.score-copy > strong.negative {
  color: #b33c35;
}
.score-adjusters {
  grid-column: 3;
  grid-row: 1;
  flex-direction: row;
  justify-content: flex-start;
  gap: 7px;
  margin-top: 3px;
}
.score-adjusters button {
  min-width: 44px;
  min-height: 44px;
  color: var(--ink-muted);
  background: transparent;
  border: 0;
  border-radius: 0;
}
.score-adjusters button:hover {
  color: var(--white);
  background: var(--panel-light);
}
.score-turn-label {
  color: var(--action-blue);
  font-size: 0.68rem;
}
.score-card.has-control .place-number {
  color: var(--action-blue);
}
.score-card.has-control {
  border-top-color: var(--action-blue);
}
.score-card.has-control .score-copy > strong:not(.negative) {
  color: var(--action-blue);
}
.player-score-chip {
  padding: 5px 0 5px 16px;
  background: none;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.player-score-chip strong {
  color: var(--action-blue);
  font-family: var(--display);
  font-weight: 600;
}
.board-finished {
  margin-top: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  text-align: center;
}

/* An active clue occupies the play screen. */
.clue-overlay {
  inset: 68px 0 0;
  align-items: flex-start;
  padding: 48px 24px 24px;
  background: var(--paper);
  backdrop-filter: none;
  animation: none;
}
.clue-stage,
.final-panel {
  color: var(--white);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}
.clue-stage {
  width: min(960px, 100%);
  max-height: calc(100dvh - 140px);
  margin: 0;
  padding: 0;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.clue-stage:focus { outline: none; }
.clue-topline {
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 0;
  color: var(--ink-muted);
  border: 0;
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.025em;
}
.clue-topline strong {
  flex-shrink: 0;
  color: var(--white);
  font-family: var(--body);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
}
.clue-question,
.player-clue-stage .clue-question {
  display: block;
  max-width: 42ch;
  min-height: 0;
  margin: 40px 0;
  padding: 0;
  color: var(--white);
  font-family: var(--body);
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.025em;
  text-align: left;
  text-shadow: none;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.player-clue-card { padding: 0; }
.player-clue-controls { padding: 0; }
.player-clue-action {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
}
.player-clue-action.has-buzzer { border-top: 0; padding-top: 0; }
.player-clue-stage .buzzer {
  flex: 0 0 auto;
  flex-direction: row;
  gap: 24px;
  width: auto;
  min-width: 164px;
  height: 48px;
  margin: 0;
  padding: 0 18px;
  color: #fff;
  background: var(--action-blue);
  border: 1px solid var(--action-blue);
  border-radius: 5px;
  box-shadow: none;
}
.player-clue-stage .buzzer:not(:disabled):hover {
  background: var(--action-blue-hover);
  border-color: var(--action-blue-hover);
  filter: none;
  transform: none;
}
.player-clue-stage .buzzer:not(:disabled):active {
  background: #17396e;
  transform: none;
  box-shadow: none;
}
.player-clue-stage .buzzer-face {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-shadow: none;
}
.player-clue-stage .buzzer kbd {
  padding: 3px 5px;
  color: #fff;
  border: 1px solid #8da8d3;
  border-radius: 3px;
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 400;
}
@media (pointer: coarse) {
  .player-clue-stage .buzzer kbd { display: none; }
}
.host-turn-status,
.player-turn-state,
.self-judge-panel {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 6px;
  margin: 0;
  padding: 0;
  color: var(--white);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}
.host-turn-status > strong,
.player-turn-state > strong,
.self-judge-panel.is-ready > strong {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}
.host-turn-status > span,
.player-turn-state > span,
.self-judge-panel > span,
.self-judge-panel > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}
.self-judge-panel {
  justify-items: start;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px 24px;
}
.self-judge-panel > span,
.self-judge-panel > strong { grid-column: 1; }
.self-judge-panel.is-open,
.self-judge-panel.is-public {
  color: var(--white);
  background: none;
  border: 0;
}
.self-judge-panel.is-public { grid-template-columns: 1fr; }
.self-judge-panel.is-ready > button,
.self-judge-panel .self-judge-actions {
  grid-column: 1;
  grid-row: auto;
  align-self: center;
  margin-top: 12px;
}
.self-judge-panel.is-ready > button {
  min-height: 44px;
  font-size: 0.875rem;
}
.private-answer {
  color: var(--white);
  font-family: var(--body);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.self-judge-actions {
  display: grid;
  width: max-content;
  max-width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.judge-correct,
.judge-wrong {
  min-width: 108px;
  min-height: 44px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font-family: var(--body);
  font-size: 0.875rem;
  font-weight: 600;
}
.judge-correct { color: #28603f; border-color: #b7d0c0; }
.judge-wrong { color: #843e39; border-color: #d8bfbc; }
.judge-correct:hover { background: #edf5f0; border-color: #719c81; }
.judge-wrong:hover { background: #faf0ef; border-color: #bd8a85; }
.buzz-queue {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0 0 20px;
}
.buzz-queue li,
.buzz-queue li.first-buzz {
  padding: 0;
  color: var(--ink-muted);
  background: none;
  border: 0;
  border-radius: 0;
  font-family: var(--body);
  font-size: 0.8rem;
}
.buzz-queue li > span,
.buzz-queue li.first-buzz > span {
  width: auto;
  height: auto;
  margin-right: 6px;
  color: var(--ink-muted);
  background: none;
  border-radius: 0;
}
.buzz-queue.empty { display: none; }
.host-clue-workspace { display: grid; gap: 16px; }
.host-clue-actions,
.daily-stage .dialog-actions { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
.host-clue-actions { margin-top: 20px; }
.host-clue-actions > .button,
.daily-stage .dialog-actions > .button { width: auto; }
.player-clue-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
  gap: 0 24px;
  margin-top: 12px;
  border: 0;
}
.player-clue-footer:empty { display: none; }
.creator-controls,
.player-clue-footer .creator-controls {
  flex: 0 1 auto;
  width: auto;
  margin: 0;
  border: 0;
  text-align: left;
}
.player-skip-controls { max-width: 100%; margin-left: 0; }
.player-clue-footer summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 48px;
  padding: 10px 0;
  color: var(--ink-muted);
  font-size: 0.8rem;
  list-style: none;
  cursor: pointer;
}
.player-clue-footer summary::-webkit-details-marker { display: none; }
.player-clue-footer summary::after { content: '+'; font-family: var(--mono); }
.player-clue-footer details[open] > summary::after { content: '−'; }
.player-clue-footer summary:hover { color: var(--white); }
.player-skip-controls[open] { flex-basis: 100%; }
.player-clue-footer details[open] { padding-bottom: 20px; }
.player-skip-confirm p,
.creator-controls p {
  margin: 0 0 16px;
  color: var(--ink-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}
.player-skip-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.player-skip-button { color: #843e39; background: #fff; border-color: #d8bfbc; }
.player-skip-button:hover { background: #faf0ef; }
.creator-controls .host-clue-actions { margin: 0; background: none; }
.clue-stage :is(button, summary, input, select):focus-visible,
.final-panel :is(button, summary, input, select):focus-visible {
  outline: 2px solid var(--action-blue);
  outline-offset: 3px;
}
.clue-stage input,
.clue-stage select,
.final-panel input {
  color: var(--white);
  background: #fff;
  border-color: var(--line-strong);
  font-size: 1rem;
}
.clue-stage input::placeholder,
.final-panel input::placeholder { color: #77818f; }
.clue-stage label > span,
.final-panel label > span,
.clue-stage .panel-label,
.final-panel .panel-label { color: var(--ink-muted); }
.daily-stage { width: min(620px, 100%); text-align: left; }
.daily-banner,
.final-wordmark {
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-family: var(--body);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.04em;
  text-shadow: none;
  text-align: left;
  text-transform: uppercase;
  transform: none;
}
.daily-stage h2 {
  margin: 0 0 12px;
  font-family: var(--body);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
}
.daily-stage .clue-category,
.daily-stage .waiting-copy { font-size: 0.875rem; line-height: 1.6; }
.daily-form-grid { gap: 16px; margin: 24px 0; }
.daily-stage .dialog-actions { justify-content: flex-start; }
.daily-player-callout {
  align-items: flex-start;
  margin: 0;
  padding: 0;
  color: var(--white);
  background: none;
  border: 0;
}
.daily-player-callout span { color: var(--ink-muted); font: 0.875rem var(--body); text-transform: none; }
.daily-player-callout strong { font-size: 1rem; }

/* Waiting and Final */
.waiting-stage {
  display: block;
  width: min(640px, calc(100% - 48px));
  margin: 40px auto;
  padding: 30px 0;
  color: var(--white);
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: left;
}
.waiting-pulse { display: none; }
.waiting-stage h2 {
  color: var(--white);
  font-family: var(--body);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.025em;
  text-transform: none;
}
.waiting-stage > p { color: var(--ink-muted); }
.player-ticket {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: flex-start;
  min-width: 0;
  gap: 8px;
  max-width: 100%;
  margin: 24px 0;
  padding: 0;
  color: var(--white);
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}
.player-ticket span { color: var(--ink-muted); font: 0.875rem var(--body); text-transform: none; }
.player-ticket strong { min-width: 0; color: var(--white); font-size: 1rem; overflow-wrap: anywhere; }
.waiting-roster { width: 100%; margin-top: 0; padding: 20px 0; background: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.final-stage {
  width: min(1120px, calc(100% - 48px));
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: start;
  gap: 28px;
  padding-top: 32px;
}
.final-main { min-width: 0; }
.final-stage:has(.standings-panel) { max-width: 800px; grid-template-columns: minmax(0, 1fr); }
.final-panel { min-height: 0; padding: 0; }
.final-wordmark { margin-bottom: 10px; }
.final-category {
  display: block;
  margin: 0 0 24px;
  padding: 0;
  color: var(--white);
  background: none;
  border: 0;
  font-family: var(--body);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
}
.final-panel > h2 {
  max-width: 42ch;
  margin: 24px 0;
  font-family: var(--body);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: -0.02em;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}
.final-entry-form { width: min(420px, 100%); max-width: none; gap: 16px; margin: 24px 0 0; }
.final-entry-form .button { align-self: flex-start; }
.final-panel .button-large { min-height: 44px; font-size: 0.875rem; }
.submission-list {
  max-width: none;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 20px 0;
}
.submission-list li,
.submission-list li.is-you {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px 0;
  color: var(--white);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.submission-list strong { font-size: 0.875rem; font-weight: 500; }
.submission-list em { color: var(--ink-muted); font-size: 0.8rem; }
.submission-list strong i { color: var(--ink-muted); font: 0.7rem var(--body); text-transform: none; }
.submission-confirmed {
  max-width: none;
  margin: 24px 0 0;
  padding: 20px 0 0;
  color: var(--white);
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.submission-confirmed span { color: var(--ink-muted); font: 0.875rem var(--body); text-transform: none; }
.submission-confirmed strong { margin: 8px 0; color: var(--white); font: 600 1.375rem var(--body); }
.submission-confirmed p { color: var(--ink-muted); font-size: 0.875rem; line-height: 1.6; }
.final-answer {
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 20px 0;
  color: var(--white);
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-family: var(--body);
  text-align: left;
  box-shadow: none;
}
.final-answer span { color: var(--ink-muted); font: 0.875rem var(--body); letter-spacing: 0; text-transform: none; }
.final-answer strong { color: var(--white); font-size: 1.375rem; font-weight: 600; overflow-wrap: anywhere; }
.final-self-judge { display: grid; gap: 10px; padding: 20px 0 0; color: var(--white); background: none; border: 0; }
.final-self-judge > span,
.final-self-judge > p { margin: 0; color: var(--ink-muted); font-size: 0.875rem; }
.final-self-judge blockquote { margin: 0 0 8px; font: 500 1.125rem/1.5 var(--body); overflow-wrap: anywhere; }
.final-self-judge .submission-confirmed { margin-top: 0; }
.final-response-grid { grid-template-columns: 1fr; gap: 0; margin: 20px 0; }
.final-response-card,
.final-response-card.scored { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; color: var(--white); background: none; border: 0; border-bottom: 1px solid var(--line); }
.final-response-card > div:first-child { min-width: 0; }
.final-response-card > div:first-child span { font-weight: 500; overflow-wrap: anywhere; }
.final-response-card > div:first-child strong { display: none; }
.result-stamp { flex-shrink: 0; margin: 0; padding: 0; color: var(--ink-muted); border: 0; font: 0.875rem var(--body); text-transform: none; letter-spacing: 0; transform: none; }
.final-panel .result-stamp.correct { color: #28603f; }
.final-panel .result-stamp.incorrect { color: #843e39; }
.final-score-strip { order: 0; }
.final-score-strip .score-rail { position: static; }
.final-score-strip .score-list { grid-template-columns: minmax(0, 1fr); }
.final-score-strip .score-card { min-height: 86px; }
.final-room-controls { margin-top: 20px; padding: 0; border: 0; }
.final-room-controls .submission-list { margin: 8px 0 16px; }
.final-room-controls .waiting-copy { font-size: 0.8rem; }
.podium-list { max-width: none; gap: 0; margin: 24px 0; }
.podium-row,
.podium-row.place-1 { grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; padding: 18px 0; color: var(--white); background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; transform: none; }
.podium-row > span { color: var(--ink-muted); font-size: 0.875rem; font-weight: 400; }
.podium-row > strong { font-size: 1rem; font-weight: 500; }
.podium-row > em { font-size: 1.25rem; font-weight: 500; }
.podium-row.place-1 > strong,
.podium-row.place-1 > em { font-weight: 700; }

/* Editor */
.custom-builder-overlay {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(12, 14, 18, 0.82);
}
.custom-builder-dialog {
  width: min(1000px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  color: var(--white);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}
.custom-builder-header,
.custom-builder-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.custom-builder-header h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 600;
}
.custom-board-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 20px 24px;
}
.custom-board-meta em {
  font-size: 0.7rem;
  font-weight: 400;
  font-style: normal;
}
.custom-builder-tabs {
  display: flex;
  gap: 5px;
  padding: 0 24px 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}
.custom-builder-tabs button {
  min-height: 44px;
  flex: 1 0 90px;
  padding: 9px;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: 0.75rem;
}
.custom-builder-tabs button > span {
  display: none;
}
.custom-builder-tabs button.is-complete {
  border-bottom: 3px solid var(--signal-green);
}
.custom-builder-tabs button.is-active {
  color: var(--white);
  background: var(--panel-light);
  border-color: var(--line-strong);
  border-bottom-color: var(--action-blue);
}
.custom-editor-page {
  padding: 24px;
}
.custom-page-heading {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}
.custom-page-heading > span {
  color: var(--ink-muted);
  font-size: 0.8rem;
}
.custom-page-heading h3 {
  margin: 0;
}
.custom-clue-list {
  display: grid;
  gap: 14px;
}
.custom-clue-row {
  display: grid;
  grid-template-columns: 115px minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 18px;
  padding: 17px;
  background: var(--panel);
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}
.custom-clue-value > strong {
  display: block;
  margin: 2px 0 10px;
  color: var(--action-blue);
  font-family: var(--display);
  font-size: 1.65rem;
  font-weight: 600;
}
.custom-clue-value label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-muted);
  font-size: 0.65rem;
}
.custom-clue-value input[type="radio"] {
  width: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: var(--action-blue);
}
.custom-clue-row textarea,
.custom-final-fields textarea {
  width: 100%;
  padding: 12px;
  resize: vertical;
}
.custom-final-fields {
  display: grid;
  gap: 18px;
}
.custom-builder-footer {
  position: sticky;
  bottom: 0;
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 0;
}
.custom-builder-footer > div {
  display: flex;
  gap: 10px;
}
.toast {
  color: #fff;
  background: #292b2e;
  border: 1px solid #565c65;
  border-left: 3px solid var(--marquee-gold);
  border-radius: 2px;
  box-shadow: none;
}

@media (max-width: 1100px) {
  .selected-board-card {
    display: block;
  }
  .selected-board-card > strong,
  .selected-board-card > small {
    display: block;
  }
  .selected-board-card .button {
    width: 100%;
    margin-top: 18px;
  }
  .game-shell,
  .final-stage {
    grid-template-columns: 1fr;
  }
  .score-rail {
    padding: 0;
    border: 0;
  }
  .score-heading {
    min-height: 0;
    padding-bottom: 8px;
  }
  .score-list {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0 24px;
  }
  .score-card {
    border-top: 0;
  }
  .final-score-strip {
    order: 0;
  }
}
@media (max-width: 760px) {
  .desktop-break {
    display: none;
  }
  .game-shell {
    width: calc(100% - 28px);
    gap: 18px;
    padding-top: 16px;
  }
  .game-titlebar {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 12px;
  }
  .game-titlebar h2 {
    font-size: 1.35rem;
  }
  .game-titlebar:has(.player-score-chip) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }
  .player-score-chip { display: grid; justify-items: end; gap: 2px; min-width: 0; padding-left: 12px; }
  .player-score-chip span { font-size: 0.65rem; }
  .player-score-chip strong { font-size: 1.5rem; }
  .player-clue-action.has-buzzer { flex-direction: column; align-items: stretch; }
  .player-clue-stage .buzzer { width: 100%; min-height: 60px; }
  .player-clue-stage .buzzer kbd { display: none; }
  .host-toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .host-toolbar .button:last-child {
    grid-column: auto;
  }
  .board-turn-strip {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 0.75rem;
  }
  .board-wrap:has(+ .mobile-board) {
    display: none;
  }
  .mobile-board {
    display: grid;
    gap: 12px;
  }
  .board-category-group {
    min-width: 0;
    padding: 2px;
    background: #10244d;
    border-radius: 0;
    overflow: hidden;
  }
  .board-category-group h3 {
    min-height: 39px;
    display: flex;
    align-items: center;
    margin: 0 0 4px;
    padding: 8px 10px;
    color: #fff;
    background: var(--board-blue-dark);
    font-family: var(--display);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.025em;
    overflow-wrap: anywhere;
  }
  .mobile-clue-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
  .mobile-clue-row .clue-tile {
    min-height: 57px;
    padding: 2px;
    font-size: clamp(0.8rem, 4vw, 1.15rem);
  }
  .score-list {
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
  }
  .score-card,
  .score-card.is-you {
    grid-template-columns: 16px minmax(0, 1fr);
    padding-inline: 0;
  }
  .score-copy > strong {
    font-size: 1.8rem;
  }
  .score-adjusters button {
    min-width: 44px;
    min-height: 44px;
  }
  .score-adjusters {
    grid-column: 2;
    grid-row: auto;
    flex-direction: row;
  }
  .clue-overlay { inset: 62px 0 0; padding: 28px 20px 20px; }
  .clue-stage { max-height: calc(100dvh - 110px); padding: 0; }
  .player-clue-card { padding: 0; }
  .clue-topline { gap: 16px; padding-bottom: 0; font-size: 0.7rem; }
  .clue-question,
  .player-clue-stage .clue-question {
    margin: 32px 0;
    font-size: clamp(1.25rem, 3.8vw, 1.625rem);
    line-height: 1.5;
  }
  .player-clue-action { gap: 16px; }
  .self-judge-panel { grid-template-columns: 1fr; gap: 6px; }
  .self-judge-panel.is-ready > button,
  .self-judge-panel .self-judge-actions {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
    width: auto;
    margin-top: 12px;
  }
  .self-judge-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .daily-form-grid { grid-template-columns: 1fr; }
  .waiting-stage,
  .final-stage { width: calc(100% - 28px); }
  .waiting-stage { margin-top: 24px; padding: 20px 0; }
  .waiting-stage h2 { font-size: 1.5rem; }
  .final-stage { grid-template-columns: 1fr; gap: 24px; padding-top: 20px; }
  .final-panel { padding: 0; }
  .final-panel > h2 { font-size: 1.25rem; }
  .final-wordmark { font-size: 0.75rem; }
  .final-score-strip .score-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .final-score-strip .score-list:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
  .custom-builder-overlay {
    padding: 8px;
  }
  .custom-builder-dialog {
    max-height: calc(100dvh - 16px);
  }
  .custom-builder-header,
  .custom-builder-footer {
    padding: 16px;
    gap: 12px;
  }
  .custom-builder-header h2 {
    font-size: 1.45rem;
  }
  .custom-board-meta {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .custom-builder-tabs {
    padding: 0 16px 16px;
  }
  .custom-editor-page {
    padding: 16px;
  }
  .custom-page-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .custom-clue-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .custom-clue-value {
    display: flex;
    justify-content: space-between;
  }
  .custom-clue-value > strong {
    margin: 0;
  }
  .custom-builder-footer {
    flex-wrap: wrap;
  }
  .custom-builder-footer > div {
    flex: 1;
    justify-content: flex-end;
  }
  .custom-builder-footer .button {
    padding-inline: 12px;
    font-size: 0.75rem;
  }
  .join-form input,
  .host-contestant-form input,
  .year-select select,
  .compact-search input,
  .search-field input,
  .daily-form-grid input,
  .daily-form-grid select,
  .final-entry-form input,
  .custom-board-meta input,
  .custom-page-heading input,
  .custom-clue-row input,
  .custom-clue-row textarea,
  .custom-final-fields input,
  .custom-final-fields textarea {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1100px) {
  .landing-workspace {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
  }
  .lobby-layout {
    width: calc(100% - 40px);
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 22px;
  }
  .lobby-room { padding-left: 20px; }
  .lobby-preview-category { font-size: 0.75rem; }
  .library-heading { flex-direction: column; align-items: stretch; gap: 12px; }
  .library-tools { display: grid; grid-template-columns: auto 124px minmax(0, 1fr); }
  .library-tools .search-field input { width: 100%; }
  .host-game-head,
  .host-game-row { grid-template-columns: 145px minmax(0, 1fr) 20px; gap: 12px; }
}
@media (max-width: 760px) {
  .hub-nav { min-height: 64px; padding-inline: 20px; gap: 12px; }
  .hub-brand { font-size: 1.2rem; }
  .hub-actions .button { font-size: 0.75rem; padding-inline: 12px; }
  .landing-shell { width: calc(100% - 40px); padding-top: 28px; }
  .landing-heading { align-items: flex-start; gap: 18px; margin-bottom: 24px; }
  .landing-heading h1 { font-size: 1.5rem; }
  .landing-heading p { max-width: 24ch; font-size: 0.8rem; }
  .landing-heading .button { padding: 10px 13px; font-size: 0.8rem; }
  .landing-workspace { grid-template-columns: 1fr; grid-template-areas: "join" "archive"; gap: 28px; }
  .join-panel { padding: 0; }
  .join-panel h2 { margin-bottom: 16px; }
  .join-panel .join-form { grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
  .join-panel .join-form .button { grid-column: 1/-1; margin: 0; }
  .join-form input { min-width: 0; width: 100%; padding: 10px; font-size: 16px; }
  .landing-address,
  .lobby-rules { display: inline-block; vertical-align: top; margin: 8px 12px 0 0; padding: 0; }
  .landing-address[open],
  .lobby-rules[open] { display: block; }
  .public-game-browser { width: 100%; }
  .public-browser-tools { display: flex; width: 100%; }
  .compact-search input,
  .year-select select { font-size: 16px; min-height: 44px; }
  .public-game-head { display: none; }
  .public-game-row {
    grid-template-columns: minmax(0, 1fr) 24px;
    grid-template-areas: "title arrow" "topics arrow";
    gap: 8px 12px;
    padding: 16px;
    min-height: 102px;
  }
  .public-game-title > span { display: flex; align-items: baseline; flex-wrap: wrap; }
  .public-game-title > span { gap: 4px 10px; }
  .public-game-title small { font-size: 0.75rem; }
  #public-game-list { min-height: 0; max-height: 440px; }
  .archive-footer > span:last-child { display: none; }
  .site-footnote { margin-top: 24px; line-height: 1.6; }
  .room-header {
    min-height: 60px;
    padding: 6px 14px;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .room-brand,
  .room-label {
    display: none;
  }
  .copy-hint {
    display: inline;
    font-size: 0.65rem;
  }
  .lobby-layout {
    width: calc(100% - 28px);
    grid-template-columns: 1fr;
    grid-template-areas: "preview" "room" "library";
    gap: 22px;
    padding-top: 20px;
  }
  .lobby-room {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 0 18px;
    border-left: 0;
    border-bottom: 1px solid var(--line);
  }
  .lobby-room .broadcast-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
  }
  .lobby-room .broadcast-heading { grid-column: 1; }
  .lobby-room .giant-code { grid-column: 2; grid-row: 1 / 3; width: auto; margin: 0; padding: 6px 0 6px 12px; font-size: 1.35rem; }
  .lobby-room .network-addresses { grid-column: 1; margin-top: 4px; }
  .lobby-room .host-play-station {
    grid-row: 1;
    margin: 0;
    padding: 0;
    border: 0;
  }
  .lobby-room .host-play-station:has([data-action="leave-contestants"]) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
  }
  .lobby-room .host-play-station:has([data-action="leave-contestants"]) :is(p, h2) {
    grid-column: 1;
    margin: 0;
  }
  .lobby-room .host-play-station [data-action="leave-contestants"] {
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
  }
  .lobby-room .empty-roster {
    padding: 8px 0;
  }
  .lobby-room .empty-roster span {
    display: none;
  }
  .lobby-room .host-play-station h2 {
    margin-bottom: 9px;
  }
  .host-contestant-form {
    gap: 8px;
  }
  .host-contestant-form input {
    min-width: 0;
    padding: 9px;
    font-size: 16px;
  }
  .host-contestant-form .button {
    padding: 9px;
    font-size: 0.75rem;
  }
  .lobby-preview-header {
    min-height: 0;
    margin-bottom: 12px;
  }
  .lobby-preview-heading h2 {
    font-size: 1rem;
  }
  .lobby-preview-heading p {
    font-size: 0.7rem;
  }
  .lobby-start-button {
    min-width: 110px;
    padding: 10px 12px;
    font-size: 0.8rem;
  }
  .lobby-preview.is-unselected .lobby-board-preview {
    display: none;
  }
  .lobby-board-preview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .lobby-preview-category {
    min-height: 60px;
    padding: 9px 7px;
    font-size: 0.8rem;
    line-height: 1.3;
  }
  .lobby-preview-value {
    display: none;
  }
  .lobby-preview-status {
    flex-direction: column;
    gap: 4px;
    font-size: 0.7rem;
  }
  .lobby-preview.is-unselected .lobby-preview-heading p {
    display: none;
  }
  .lobby-preview.is-unselected .lobby-preview-status > span:first-child {
    display: none;
  }
  .library-heading {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .library-title {
    justify-content: space-between;
  }
  .library-tools {
    grid-template-columns: auto 120px;
  }
  .library-tools .search-field {
    width: 100%;
    grid-column: 1/-1;
  }
  .library-tools .search-field input {
    width: 100%;
    font-size: 16px;
    min-height: 44px;
  }
  .library-tools .year-select select {
    width: 100%;
  }
  .host-game-head {
    display: none;
  }
  .host-game-row {
    grid-template-columns: minmax(0, 1fr) 20px;
    grid-template-areas: "title mark" "topics mark";
    gap: 4px 8px;
    min-height: 76px;
    padding: 11px 13px;
  }
  .host-game-copy {
    grid-area: title;
  }
  .host-game-copy small {
    display: none;
  }
  .host-game-topics {
    display: -webkit-box;
    grid-area: topics;
    font-size: 0.7rem;
  }
  .row-select-mark {
    grid-area: mark;
  }
  .host-game-list {
    max-height: 400px;
  }
}
@media (max-width: 380px) {
  .join-panel .join-form {
    grid-template-columns: 105px minmax(0, 1fr);
  }
  .join-panel .join-form .button {
    grid-column: 1/-1;
  }
  .hub-nav {
    padding-inline: 12px;
  }
  .hub-actions .button {
    padding-inline: 9px;
    font-size: 0.7rem;
  }
  .lobby-preview-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .lobby-start-button {
    width: 100%;
  }
}
@container (max-width: 280px) {
  .score-adjusters {
    grid-column: 2 / -1;
    grid-row: 2;
  }
  .score-copy > strong {
    font-size: clamp(1.125rem, 12cqi, 1.5rem);
  }
}

@media (min-width: 761px) and (max-width: 1100px) {
  .final-stage { grid-template-columns: 1fr; }
  .final-score-strip .score-list { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
}
