:root {
  color-scheme: light;
  --bg: #fbf8f1;
  --ink: #17211d;
  --muted: #64706a;
  --line: #d7d0c2;
  --field: #176947;
  --field-dark: #104f38;
  --accent: #c2392f;
  --gold: #f1b84b;
  --white: #fffdf8;
  --shadow: 0 18px 45px rgba(44, 33, 24, 0.13);
  --masthead: #fffdf8;
  --masthead-panel: #ffffff;
  --brand-red: #ef3f32;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(245, 242, 234, 0.88), rgba(245, 242, 234, 0.96)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='%23d8d1c3' stroke-width='2' opacity='.55'%3E%3Cpath d='M0 45h180M0 135h180M45 0v180M135 0v180'/%3E%3Cpath d='M90 18c22 0 40 18 40 40s-18 40-40 40-40-18-40-40 18-40 40-40Z'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--masthead);
  border-bottom: 1px solid #e7ded0;
  box-shadow: 0 8px 28px rgba(71, 56, 38, 0.12);
}

.masthead-bar {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(260px, 550px) minmax(124px, 1fr);
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 10px 14px;
}

.site-logo {
  display: inline-flex;
  align-items: flex-start;
  width: fit-content;
  color: var(--brand-red);
  font-size: clamp(1.65rem, 3vw, 2.4rem);
  font-weight: 1000;
  line-height: 0.9;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.9);
}

.site-logo span + span {
  margin-left: 7px;
}

.site-logo sup {
  margin-left: 2px;
  color: #493e34;
  font-size: 0.48rem;
  line-height: 1;
}

.site-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 50px;
  align-items: center;
  min-width: 0;
  min-height: 48px;
  overflow: hidden;
  border: 1px solid #ded5c9;
  border-radius: 999px;
  background: var(--masthead-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 8px 18px rgba(71, 56, 38, 0.08);
}

.site-search:focus-within {
  border-color: #f09186;
  box-shadow: 0 0 0 3px rgba(255, 65, 52, 0.14);
}

.site-search input {
  min-width: 0;
  height: 46px;
  border: 0;
  padding: 0 2px 0 18px;
  background: transparent;
  color: var(--ink);
  outline: none;
}

.site-search input::placeholder {
  color: #867b70;
}

.site-search button {
  display: grid;
  width: 50px;
  height: 46px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #7f756c;
  cursor: pointer;
  font-size: 2rem;
  font-weight: 900;
  line-height: 1;
}

.site-search button:hover,
.site-search button:focus-visible {
  color: var(--brand-red);
  outline: none;
}

.signin-button {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  min-height: 48px;
  gap: 8px;
  border: 1px solid #d9362a;
  border-radius: 5px;
  padding: 0 16px;
  background: var(--brand-red);
  color: #fff;
  cursor: pointer;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.signin-button:hover,
.signin-button:focus-visible {
  border-color: #bd2e25;
  background: #d9362a;
  outline: none;
}

.signin-button span:first-child {
  font-size: 1.45rem;
  line-height: 1;
}

.masthead-pattern {
  height: 28px;
  border-top: 1px solid #ebe2d7;
  background-color: #f6efe5;
  background-image:
    linear-gradient(90deg, rgba(188, 168, 143, 0.22) 1px, transparent 1px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='116' height='28' viewBox='0 0 116 28'%3E%3Cg fill='%23e9dfd0'%3E%3Cpath d='M18 8h10c5 0 9 4 9 9s-4 9-9 9H18c-5 0-9-4-9-9s4-9 9-9Zm2 5v3h-3v3h3v3h3v-3h3v-3h-3v-3h-3Zm13 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm-6 5a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z'/%3E%3Cpath d='M80 8h10c5 0 9 4 9 9s-4 9-9 9H80c-5 0-9-4-9-9s4-9 9-9Zm2 5v3h-3v3h3v3h3v-3h3v-3h-3v-3h-3Zm13 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm-6 5a2 2 0 1 0 0 4 2 2 0 0 0 0-4Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 68px 28px, 116px 28px;
  background-position: left top, 42px center;
}

.app-shell {
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

body.hub-mode .topbar,
body.hub-mode .controls,
body.hub-mode .ad-slot,
body.hub-mode .game-grid,
body.hub-mode .leaderboard {
  display: none;
}

body.hub-mode .app-shell {
  width: min(1220px, calc(100vw - 32px));
}

body.game-mode .game-hub {
  display: none;
}

body.game-mode .app-shell {
  width: min(1400px, calc(100vw - 32px));
}

.name-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 33, 29, 0.58);
  backdrop-filter: blur(10px);
}

.name-gate.hidden {
  display: none;
}

.name-card {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.name-card h2 {
  margin-top: 4px;
  font-size: 1.75rem;
}

.name-card p:not(.eyebrow):not(.name-error) {
  margin: 8px 0 0;
  color: var(--muted);
}

.name-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 16px;
}

.name-row input {
  min-width: 0;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
}

.name-row button,
.player-chip button,
.board-header button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  background: var(--accent);
  color: var(--white);
  cursor: pointer;
  font-weight: 850;
}

.name-error {
  min-height: 20px;
  margin: 10px 0 0;
  color: var(--accent);
  font-weight: 750;
}

.game-hub {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  min-height: calc(100vh - 150px);
  align-content: start;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.hub-header h2 {
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 0.95;
}

.source-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 74px;
  border: 1px solid #eadfce;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fffaf1;
}

.source-panel strong,
.source-panel small {
  display: block;
}

.source-panel strong {
  margin-top: 3px;
  font-size: 1rem;
}

.source-panel small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.35;
}

.source-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.source-tags span {
  border: 1px solid #dfd3c3;
  border-radius: 999px;
  padding: 5px 8px;
  background: #ffffff;
  color: #5b544a;
  font-size: 0.74rem;
  font-weight: 850;
}

.sport-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.sport-pill {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: #fffaf1;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.sport-pill.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
}

.game-picker {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.game-card {
  display: grid;
  min-height: 150px;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fffaf1;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.game-card:hover,
.game-card:focus-visible {
  border-color: #dfa099;
  outline: none;
  transform: translateY(-1px);
}

.game-card.active {
  border-color: var(--accent);
  background: #fff3ef;
  box-shadow: inset 0 0 0 2px rgba(194, 57, 47, 0.12);
}

.game-card strong {
  font-size: 1.18rem;
}

.game-card span {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.28;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: rgba(255, 253, 248, 0.96);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.brand > div {
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: #6b311f;
  font-size: 28px;
}

.eyebrow,
.position,
.prompt,
.stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar .eyebrow {
  color: var(--muted);
}

.player-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff7eb;
}

.player-chip span {
  min-width: 0;
  max-width: 160px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-chip button {
  min-height: 34px;
  background: var(--accent);
  color: var(--white);
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(1.35rem, 3vw, 2.3rem);
  overflow-wrap: anywhere;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 10px;
  width: min(360px, 100%);
}

.stat {
  min-width: 0;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf1;
}

.stat-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}

.stat-value {
  display: block;
  font-variant-numeric: tabular-nums;
  font-size: 1.55rem;
  font-weight: 900;
}

.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.field-panel {
  position: relative;
  min-height: 520px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, transparent 0 10.75%, rgba(255, 255, 255, 0.11) 10.75% 11.1%),
    linear-gradient(120deg, rgba(0, 0, 0, 0.08), transparent 48%),
    linear-gradient(var(--field), var(--field-dark));
  color: var(--white);
  box-shadow: var(--shadow);
}

.field-panel::before,
.field-panel::after {
  content: "";
  position: absolute;
  top: 0;
  width: 8%;
  height: 100%;
  background: rgba(194, 57, 47, 0.55);
  border-inline: 2px solid rgba(255, 255, 255, 0.4);
}

.field-panel::before {
  left: 0;
}

.field-panel::after {
  right: 0;
}

.field-lines {
  position: absolute;
  inset: 18px 9%;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  align-items: start;
  color: rgba(255, 255, 255, 0.58);
  font-weight: 900;
  pointer-events: none;
}

.field-lines span {
  text-align: center;
}

.question-area {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  width: min(720px, calc(100% - 32px));
  min-height: 520px;
  margin: 0 auto;
  padding: 72px 0 44px;
}

.position {
  color: #d9e5db;
}

#playerName {
  margin-top: 8px;
  font-size: clamp(2.2rem, 8vw, 5rem);
  line-height: 0.94;
  text-wrap: balance;
}

.prompt {
  margin-top: 14px;
  color: #eaf1ed;
  font-size: 1rem;
  line-height: 1.35;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.choices.expert {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choices.grid-mode {
  display: block;
}

.criteria-grid {
  display: grid;
  grid-template-columns: 110px repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.criteria-grid > strong,
.criteria-grid > span {
  display: grid;
  min-height: 46px;
  place-items: center;
  border-radius: 8px;
  background: rgba(17, 27, 24, 0.72);
  color: var(--white);
  font-size: 0.9rem;
  text-align: center;
}

.grid-cell {
  display: grid;
  min-height: 116px;
  gap: 8px;
  align-content: start;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  padding: 10px;
  background: rgba(17, 27, 24, 0.58);
}

.grid-cell small {
  color: #d9e5db;
  font-weight: 850;
}

.grid-cell.correct {
  border-color: #b6f1c7;
  background: rgba(26, 117, 61, 0.92);
}

.grid-cell.wrong {
  border-color: #ffb4ad;
}

.guess-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.guess-form input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
}

.guess-form button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 12px;
  background: var(--gold);
  color: #1b1712;
  cursor: pointer;
  font-weight: 900;
}

.choices.mystery-mode {
  display: grid;
  grid-template-columns: 1fr;
}

.guess-table {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.guess-table > div,
.guess-row div {
  min-width: 0;
  min-height: 42px;
  border-radius: 8px;
  padding: 10px;
  background: rgba(17, 27, 24, 0.72);
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.guess-row {
  display: contents;
}

.guess-table .match {
  background: rgba(26, 117, 61, 0.94);
}

.guess-table .partial {
  background: rgba(190, 129, 28, 0.94);
}

.guess-table .miss {
  background: rgba(85, 93, 88, 0.94);
}

.choice {
  min-height: 64px;
  padding: 16px;
  border: 2px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(17, 27, 24, 0.62);
  color: var(--white);
  cursor: pointer;
  font-weight: 850;
  text-align: left;
  overflow-wrap: anywhere;
  transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
}

.choice:hover:not(:disabled),
.choice:focus-visible:not(:disabled) {
  border-color: var(--gold);
  background: rgba(17, 27, 24, 0.82);
  transform: translateY(-1px);
}

.choice:disabled {
  cursor: default;
}

.choice.correct {
  border-color: #b6f1c7;
  background: rgba(26, 117, 61, 0.92);
}

.choice.wrong {
  border-color: #ffb4ad;
  background: rgba(143, 34, 31, 0.92);
}

.feedback {
  min-height: 36px;
  margin-top: 18px;
  font-weight: 850;
}

.board-panel {
  position: sticky;
  top: 16px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.board-header h2 {
  font-size: 1.3rem;
}

.board-header button {
  background: var(--ink);
}

.board-header button:disabled {
  opacity: 0.5;
}

.daily-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.daily-metrics div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #faf7ef;
}

.daily-metrics .stat-label {
  color: var(--muted);
}

.daily-metrics strong {
  display: block;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.leaderboard-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style-position: inside;
}

.leaderboard-list li {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffaf1;
}

.leaderboard-list li:not(.empty-board) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
}

.leaderboard-list span {
  min-width: 0;
  overflow: hidden;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.leaderboard-list strong {
  font-variant-numeric: tabular-nums;
}

.leaderboard-list small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.empty-board {
  color: var(--muted);
  font-weight: 750;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.controls button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
  font-weight: 850;
}

.controls button:disabled {
  opacity: 0.46;
  cursor: default;
}

.controls button:first-child {
  background: #fffaf1;
  color: var(--ink);
  border: 1px solid var(--line);
}

.controls button:nth-child(2) {
  background: var(--accent);
  color: var(--white);
  border: 0;
}

.timer-control {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.82);
  color: var(--ink);
  font-weight: 850;
}

.timer-control span {
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

.timer-control select {
  min-height: 32px;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-weight: 850;
}

.timer-value {
  min-height: 24px;
  margin-top: 12px;
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.segmented {
  display: flex;
  min-height: 44px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
}

.segmented .difficulty {
  min-height: 44px;
  border-radius: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.segmented .difficulty:first-child {
  border-left: 0;
}

.segmented .difficulty.active {
  background: var(--ink);
  color: var(--white);
}

.ad-slot {
  display: grid;
  place-items: center;
  min-width: 0;
  border: 1px dashed #b9ad98;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.92), rgba(241, 184, 75, 0.16)),
    var(--white);
  color: var(--muted);
  text-align: center;
}

.ad-slot span {
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ad-slot strong {
  max-width: 100%;
  color: var(--ink);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.ad-slot-wide {
  min-height: 92px;
  margin-top: 16px;
  padding: 14px;
}

.ad-slot-sidebar {
  min-height: 250px;
  margin-top: 16px;
  padding: 18px;
}

.ad-slot-footer {
  min-height: 96px;
  margin-top: 18px;
  padding: 14px;
}

.site-footer {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  color: inherit;
  font-weight: 800;
}

.toggle {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.72);
  font-weight: 750;
}

.toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.leaderboard {
  margin-top: 18px;
  padding: 18px 0 0;
}

.leaderboard h2 {
  font-size: 1.1rem;
}

.recap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.recap li {
  min-height: 56px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--muted);
  border-radius: 8px;
  background: var(--white);
  font-size: 0.92rem;
}

.recap li.hit {
  border-left-color: #247a44;
}

.recap li.miss {
  border-left-color: var(--accent);
}

@media (max-width: 980px) {
  .masthead-bar {
    grid-template-columns: 1fr auto;
  }

  .site-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .signin-button {
    grid-column: 2;
    grid-row: 1;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .game-picker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .board-panel {
    position: static;
  }

  .ad-slot-sidebar {
    min-height: 120px;
  }

  .choices.expert {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .criteria-grid {
    grid-template-columns: 88px repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .masthead-bar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 64px;
    padding: 8px 10px;
  }

  .site-logo {
    flex: 1 1 auto;
    max-width: calc(100% - 62px);
    font-size: clamp(1rem, 6vw, 1.55rem);
  }

  .site-logo span + span {
    margin-left: 5px;
  }

  .signin-button {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 1;
    flex: 0 0 46px;
    min-width: 46px;
    width: 46px;
    min-height: 40px;
    border-color: #681d18;
    background: var(--brand-red);
    padding: 0;
  }

  .signin-button::before {
    content: "↪";
    color: #fff;
    font-size: 1.4rem;
    font-weight: 900;
    line-height: 1;
  }

  .signin-button span:first-child,
  .signin-button span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .site-search {
    flex: 1 0 100%;
    order: 3;
    min-height: 42px;
  }

  .site-search input,
  .site-search button {
    height: 40px;
  }

  .masthead-pattern {
    height: 22px;
    background-size: 56px 22px, 96px 22px;
  }

  .app-shell {
    width: min(100% - 20px, 1120px);
    padding: 10px 0 20px;
  }

  .hub-header {
    align-items: stretch;
    flex-direction: column;
  }

  .sport-picker {
    justify-content: flex-start;
  }

  .game-picker {
    grid-template-columns: 1fr;
  }

  .game-hub {
    min-height: auto;
    padding: 16px;
  }

  .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .stat {
    padding: 10px 8px;
  }

  .stat-value {
    font-size: 1.35rem;
  }

  .field-panel,
  .question-area {
    min-height: 560px;
  }

  .choices {
    grid-template-columns: 1fr;
  }

  .choices.grid-mode,
  .choices.expert {
    grid-template-columns: 1fr;
  }

  .criteria-grid,
  .guess-table {
    grid-template-columns: 1fr;
  }

  .prompt {
    font-size: 0.88rem;
  }

  .choice {
    min-height: 58px;
  }

  .name-row {
    grid-template-columns: 1fr;
  }

  .ad-slot-wide,
  .ad-slot-footer {
    min-height: 78px;
  }
}
