:root {
  color-scheme: dark;
  --night: #06101b;
  --navy: #0a1d30;
  --blue: #123d65;
  --blue-bright: #1b5d92;
  --gold: #d5a431;
  --gold-light: #f4d66e;
  --white: #f6f8fb;
  --muted: #afc1d1;
  --line: rgba(108, 169, 213, .42);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--white);
  background:
    radial-gradient(ellipse at 50% -20%, rgba(40, 105, 156, .32), transparent 42rem),
    linear-gradient(180deg, #071522, var(--night) 70%);
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 3px; }
[hidden] { display: none !important; }

.topline {
  min-height: 34px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 6px clamp(16px, 4vw, 64px);
  color: #b6c3cf;
  background: #03090f;
  border-bottom: 1px solid rgba(213, 164, 49, .48);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}
.topline span:first-child { color: var(--gold-light); }
.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  min-height: 82px;
  padding: 12px clamp(16px, 4vw, 64px);
  background: rgba(5, 14, 23, .96);
  border-bottom: 1px solid rgba(213, 164, 49, .32);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .25);
  backdrop-filter: blur(12px);
}
.brand-lockup { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-light);
  font-size: 22px;
  text-shadow: 0 0 12px rgba(244, 214, 110, .45);
}
.brand-lockup strong { display: block; color: var(--gold-light); font-family: Georgia, "Times New Roman", serif; font-size: clamp(15px, 2vw, 21px); letter-spacing: .06em; }
.brand-lockup small { display: block; margin-top: 4px; color: #a9b8c6; font-size: 10px; font-weight: 750; letter-spacing: .12em; }
.site-header nav { display: flex; gap: 28px; align-items: center; }
.site-header nav a { color: #cad5df; font-size: 15px; font-weight: 800; }
.site-header nav a:hover, .site-header nav .active { color: var(--gold-light); }

main { width: min(1360px, calc(100% - 40px)); margin: 0 auto; }
.lobby-view { padding: 42px 0 54px; }
.arena-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 8px; color: var(--gold-light); font-size: 12px; font-weight: 900; letter-spacing: .16em; }
.arena-heading h1 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; letter-spacing: -.025em; }
.intro-copy { margin: 10px 0 0; color: var(--muted); font-size: 17px; line-height: 1.5; }
.arena-badge { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border: 1px solid rgba(213, 164, 49, .6); border-radius: 12px; background: linear-gradient(135deg, rgba(16, 48, 76, .95), rgba(5, 17, 29, .95)); box-shadow: 0 8px 22px rgba(0, 0, 0, .25); }
.arena-badge span { color: var(--gold-light); font: 900 30px Georgia, serif; }
.arena-badge small { color: #d7e1e9; font-size: 10px; font-weight: 900; letter-spacing: .15em; line-height: 1.35; }
.game-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.game-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: linear-gradient(160deg, rgba(18, 58, 94, .96), rgba(6, 25, 43, .98) 72%);
  box-shadow: 0 15px 35px rgba(0, 0, 0, .25);
  transform-style: preserve-3d;
  transition: transform .22s ease, border-color .18s ease, box-shadow .18s ease;
}
.game-card:hover { transform: perspective(900px) translateY(-5px) rotateX(.6deg); border-color: var(--gold); box-shadow: 0 18px 38px rgba(0, 0, 0, .37), 0 0 0 1px rgba(213, 164, 49, .15); }
.card-topline { display: flex; justify-content: space-between; align-items: center; min-height: 41px; padding: 0 14px; border-bottom: 1px solid rgba(109, 175, 224, .34); color: #bfd3e2; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.card-icon { color: var(--gold-light); font-size: 21px; }
.character-frame { display: grid; flex: 0 0 250px; min-height: 0; overflow: hidden; place-items: end center; padding: 8px 14px 0; background: radial-gradient(ellipse at 50% 74%, rgba(80, 147, 193, .22), transparent 62%); }
.character-frame img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .35)); }
.card-copy { display: flex; flex: 1; flex-direction: column; padding: 14px 16px 17px; }
.card-copy h2 { margin: 0; color: #fff; font: 700 22px Georgia, "Times New Roman", serif; line-height: 1.12; }
.card-copy p { min-height: 63px; margin: 8px 0 15px; color: #c3d0db; font-size: 14px; line-height: 1.48; }
.play-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding: 10px 12px; border: 1px solid rgba(244, 214, 110, .65); border-radius: 7px; color: #1a170c; background: linear-gradient(180deg, #f3d571, #d5a431); font-size: 14px; font-weight: 900; }
.game-card:hover .play-link { background: #ffe891; }
.play-link b { font-size: 20px; }

.how-panel { display: grid; grid-template-columns: minmax(230px, .75fr) 1.6fr; gap: 26px; margin-top: 30px; padding: 22px 24px; border: 1px solid rgba(108, 169, 213, .33); border-radius: 11px; background: rgba(7, 24, 40, .78); }
.how-panel h2 { margin: 0; font: 700 23px Georgia, serif; }
.how-panel ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; color: #c7d3dd; font-size: 14px; line-height: 1.5; }
.how-panel li b { display: block; margin-bottom: 3px; color: var(--gold-light); }

.game-view { padding: 24px 0 56px; }
.game-nav-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.back-link { color: #dce6ee; font-size: 14px; font-weight: 800; }
.back-link:hover { color: var(--gold-light); }
.round-label { color: var(--gold-light); font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.game-header { display: grid; grid-template-columns: 174px minmax(0, 1fr) 150px; align-items: center; min-height: 190px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: linear-gradient(110deg, rgba(19, 61, 97, .98), rgba(7, 25, 42, .98)); box-shadow: 0 14px 34px rgba(0, 0, 0, .26); }
.host-portrait { display: flex; height: 190px; justify-content: center; align-items: end; overflow: hidden; padding: 8px 12px 0; background: radial-gradient(ellipse at 50% 78%, rgba(200, 153, 45, .24), transparent 67%); }
.host-portrait img { max-width: 100%; height: 100%; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 7px 10px rgba(0, 0, 0, .3)); }
.game-heading-copy { padding: 22px 26px; }
.game-heading-copy h1 { margin: 0; font: 700 clamp(27px, 3vw, 38px) Georgia, serif; }
.game-heading-copy p:last-child { max-width: 760px; margin: 9px 0 0; color: #c4d1dc; font-size: 15px; line-height: 1.5; }
.score-box { display: flex; min-height: 112px; flex-direction: column; align-items: center; justify-content: center; margin: 0 18px; padding: 10px; border: 1px solid rgba(244, 214, 110, .62); border-radius: 9px; background: rgba(3, 13, 22, .44); text-align: center; }
.score-box span { color: #c5d2de; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.score-box strong { margin: 4px 0 0; color: var(--gold-light); font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.score-box small { color: #aebfcd; font-size: 12px; }
.game-stage { margin-top: 18px; }
.stage-panel { padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7, 25, 42, .94); box-shadow: 0 12px 28px rgba(0, 0, 0, .2); }
.stage-title { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 10px; margin-bottom: 15px; }
.stage-title h2 { margin: 0; color: #fff; font: 700 24px Georgia, serif; }
.stage-title p { margin: 0; color: var(--muted); font-size: 14px; }
.board-scroll { overflow-x: auto; border-radius: 8px; }
.jeopardy-board { display: grid; min-width: 760px; grid-template-columns: repeat(5, minmax(120px, 1fr)); gap: 5px; padding: 7px; border: 1px solid rgba(79, 142, 190, .5); border-radius: 8px; background: linear-gradient(150deg, #0b1e31, #030a12); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 9px 18px rgba(0, 0, 0, .38); }
.board-category { display: grid; min-height: 62px; place-items: center; padding: 8px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 5px; color: #fff; background: linear-gradient(180deg, #174f83, #10345e); text-align: center; font-size: 13px; font-weight: 950; line-height: 1.2; text-transform: uppercase; }
.clue-tile { min-height: 59px; border: 1px solid rgba(83, 151, 204, .5); border-radius: 5px; color: var(--gold-light); background: linear-gradient(180deg, #12508b, #082b55 78%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 3px 0 #04101d, 0 5px 8px rgba(0, 0, 0, .35); font-size: clamp(18px, 2.5vw, 26px); font-weight: 950; text-shadow: 0 1px 4px #001429; cursor: pointer; transition: transform .14s ease, box-shadow .14s ease, background .14s ease; }
.clue-tile:hover:not(:disabled) { transform: translateY(-2px); color: #fff; background: #155894; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 5px 0 #04101d, 0 8px 13px rgba(0, 0, 0, .42); }
.clue-tile:disabled { color: #546a7d; background: #101e2a; border-color: #263847; cursor: default; }
.daily-mark { display: block; margin-top: -2px; color: #f6e293; font-size: 9px; letter-spacing: .08em; }
.clue-panel, .quiz-card, .result-panel { max-width: 900px; margin: 17px auto 0; padding: clamp(18px, 3vw, 28px); border: 1px solid rgba(213, 164, 49, .58); border-radius: 10px; background: linear-gradient(135deg, rgba(19, 47, 72, .98), rgba(7, 20, 34, .98)); }
.clue-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--gold-light); font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.clue-text, .quiz-question { margin: 18px 0; color: #fff; font: 700 clamp(22px, 3vw, 32px) Georgia, serif; line-height: 1.28; }
.answer-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.answer-form label { grid-column: 1 / -1; color: #c3d0da; font-size: 14px; font-weight: 800; }
.answer-form input, .wager-row input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #527b9d; border-radius: 6px; color: #fff; background: #071625; font-size: 16px; }
.primary-button, .secondary-button, .option-button { min-height: 45px; padding: 10px 16px; border: 1px solid rgba(244, 214, 110, .7); border-radius: 6px; color: #1a170c; background: linear-gradient(180deg, #f3d571, #d5a431); font-size: 14px; font-weight: 900; cursor: pointer; }
.primary-button:hover, .secondary-button:hover { background: #ffe895; }
.secondary-button { color: #e8edf1; border-color: #456b89; background: #143b5d; }
.secondary-button:hover { color: white; background: #1a527f; }
.feedback { margin-top: 14px; padding: 12px 14px; border-left: 4px solid var(--gold); border-radius: 5px; color: #eef4f8; background: rgba(3, 12, 20, .7); font-size: 15px; line-height: 1.55; }
.feedback.correct { border-left-color: #4fd19b; }
.feedback.incorrect { border-left-color: #ff867e; }
.source-link { display: inline-block; margin-top: 8px; color: var(--gold-light); font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.wager-row { display: grid; grid-template-columns: 1fr minmax(140px, 220px) auto; align-items: end; gap: 10px; margin-top: 15px; }
.wager-row label { color: #d0dce6; font-size: 14px; font-weight: 800; }
.wager-row label span { display: block; margin-bottom: 6px; }
.quiz-progress { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--gold-light); font-size: 13px; font-weight: 900; }
.progress-track { height: 8px; margin-top: 10px; overflow: hidden; border-radius: 99px; background: #1c3448; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #bc8520, #f4d66e); transition: width .25s ease; }
.quiz-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option-button { min-height: 60px; display: flex; align-items: center; gap: 12px; color: #eaf0f5; border-color: rgba(101, 156, 197, .55); background: linear-gradient(135deg, #12385b, #0b2944); text-align: left; line-height: 1.35; }
.option-button span:first-child { display: grid; width: 29px; height: 29px; flex: 0 0 29px; place-items: center; border-radius: 50%; color: #142033; background: var(--gold-light); font-size: 13px; }
.option-button:hover:not(:disabled) { border-color: var(--gold-light); background: #17466e; }
.option-button.correct { border-color: #4fd19b; background: rgba(22, 91, 68, .72); }
.option-button.incorrect { border-color: #ff867e; background: rgba(112, 42, 42, .65); }
.option-button:disabled { cursor: default; }
.quiz-next { display: flex; justify-content: flex-end; margin-top: 16px; }
.result-panel { text-align: center; }
.result-panel h2 { margin: 0; color: var(--gold-light); font: 700 30px Georgia, serif; }
.result-score { margin: 9px 0; color: #fff; font-size: 38px; font-weight: 950; }
.result-panel p { color: #cad7e2; line-height: 1.5; }
.review-list { display: grid; gap: 9px; margin: 18px auto; max-width: 760px; text-align: left; }
.review-item { padding: 11px 13px; border: 1px solid rgba(105, 154, 189, .33); border-radius: 6px; color: #cbd7e0; background: rgba(4, 14, 23, .42); font-size: 14px; line-height: 1.45; }
.review-item b { color: #fff; }
.review-item a { display: inline-block; margin-left: 6px; color: var(--gold-light); font-weight: 800; text-decoration: underline; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 22px; padding: 18px clamp(18px, 4vw, 64px); border-top: 1px solid rgba(213, 164, 49, .34); color: #aebdca; background: #03090f; font-size: 12px; }
footer strong { color: var(--gold-light); letter-spacing: .06em; }

@media (max-width: 1080px) {
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .character-frame { flex-basis: 300px; }
}
@media (max-width: 680px) {
  .topline { font-size: 9px; letter-spacing: .07em; }
  .topline span:last-child { text-align: right; }
  .site-header { min-height: 72px; }
  .brand-mark { width: 38px; height: 38px; flex-basis: 38px; font-size: 18px; }
  .brand-lockup strong { font-size: 14px; }
  .brand-lockup small { font-size: 8px; }
  .site-header nav { gap: 13px; }
  .site-header nav a { font-size: 12px; }
  main { width: min(100% - 26px, 560px); }
  .lobby-view { padding-top: 28px; }
  .arena-heading { align-items: flex-start; }
  .arena-heading h1 { font-size: 32px; }
  .intro-copy { font-size: 15px; }
  .arena-badge { display: none; }
  .game-grid { grid-template-columns: 1fr; gap: 13px; }
  .game-card { display: grid; grid-template-columns: 38% minmax(0, 1fr); grid-template-rows: 40px minmax(0, 1fr); min-height: 220px; }
  .card-topline { grid-column: 1 / -1; grid-row: 1; min-height: 39px; }
  .character-frame { grid-column: 1; grid-row: 2; height: 100%; min-height: 0; min-width: 0; flex: initial; padding: 8px 4px 0; }
  .card-copy { grid-column: 2; grid-row: 2; padding: 13px 12px; }
  .card-copy h2 { font-size: 20px; }
  .card-copy p { min-height: 0; margin: 7px 0 12px; font-size: 13px; }
  .play-link { padding: 8px 9px; font-size: 12px; }
  .how-panel { grid-template-columns: 1fr; gap: 13px; padding: 18px; }
  .how-panel ol { grid-template-columns: 1fr; gap: 10px; }
  .game-header { grid-template-columns: 100px minmax(0, 1fr) 78px; min-height: 145px; }
  .host-portrait { height: 145px; padding-inline: 3px; }
  .game-heading-copy { padding: 14px 8px; }
  .game-heading-copy .eyebrow { font-size: 9px; }
  .game-heading-copy h1 { font-size: 21px; }
  .game-heading-copy p:last-child { font-size: 12px; line-height: 1.4; }
  .score-box { min-height: 88px; margin: 0 7px 0 0; padding: 5px; }
  .score-box span { font-size: 8px; }
  .score-box strong { font-size: 26px; }
  .score-box small { font-size: 10px; }
  .stage-panel { padding: 13px; }
  .stage-title { align-items: flex-start; flex-direction: column; }
  .clue-panel, .quiz-card, .result-panel { padding: 16px; }
  .answer-form { grid-template-columns: 1fr; }
  .answer-form label { grid-column: auto; }
  .wager-row { grid-template-columns: 1fr; }
  .wager-row .primary-button { width: 100%; }
  .quiz-options { grid-template-columns: 1fr; }
  .option-button { min-height: 52px; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
