@media screen {
  :root { --bg:#090c14; --panel:#121b2b; --panel-2:#1b2638; --gold:#d8b66c; --gold-deep:#a38443; --cyan:#8fa8c7; --white:#f5f1e7; --muted:#a4b3c9; --line:#ffffff20; font-family:Arial,Helvetica,sans-serif; }
  body { background:#090c14; color:var(--white); }
  body * { letter-spacing:0; }
  .app { max-width:1360px; min-height:0; margin:0 auto; overflow:visible; background:none; }
  .screen { width:100%; }
  .app::before,.app::after,.light-beam,.question-panel::before { display:none; }
  .site-header { max-width:1360px; min-height:88px; margin:0 auto; padding:20px 24px; display:flex; align-items:center; justify-content:space-between; gap:24px; border-bottom:1px solid var(--line); }
  .site-brand { display:flex; align-items:center; gap:10px; font-size:20px; font-weight:800; color:var(--white); text-decoration:none; white-space:nowrap; }
  .brand-mark { display:grid; place-items:center; width:32px; height:32px; color:var(--gold); border:1px solid #d8b66c66; border-radius:50%; font-size:18px; }
  .brand-dot { color:var(--gold); margin-left:-7px; }
  .site-navigation,#headerTools,.site-header .utility-actions { display:flex; align-items:center; gap:8px; }
  .site-navigation [hidden] { display:none!important; }
  .site-header .utility-actions { position:static; margin:0; padding:0; background:none; box-shadow:none; border:0; }
  .site-navigation button { min-height:42px; padding:10px 14px; font-size:13px; }
  .site-navigation #soundButton,.site-navigation #audioSettingsButton,.fullscreen-toggle { width:42px; padding:0; }
  .primary-button,.ghost-button,.lifeline { border-radius:6px; box-shadow:none; text-shadow:none; transition:background .2s,border-color .2s; }
  .primary-button { background:var(--gold); color:#111722; border:1px solid var(--gold); font-weight:700; }
  .primary-button:hover { background:#e7ca87; box-shadow:none; transform:none; }
  .ghost-button { background:#ffffff04; border-color:#ffffff29; color:#e5d1a3; }
  .ghost-button:hover { background:#ffffff0b; transform:none; box-shadow:none; }
  button:focus-visible,a:focus-visible { outline:2px solid var(--gold); outline-offset:3px; }
  .start-screen { max-width:none; margin:0; padding:42px 24px 16px; min-height:0; }
  .page-intro { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:36px; }
  .eyebrow { color:var(--gold); font-size:12px; font-weight:500; margin:0 0 14px; text-transform:uppercase; }
  .page-intro h1 { font-size:46px; line-height:1.1; margin:0 0 12px; text-shadow:none; }
  .page-intro p:last-child { color:var(--muted); font-size:16px; margin:0; }
  .intro-note { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:12px; }
  .intro-note i { color:var(--gold); }
  .journey-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:20px; }
  .journey-grid span { display:flex; gap:14px; padding:16px 12px; border-bottom:1px solid var(--line); color:var(--muted); font-size:13px; }
  .journey-grid b { font-weight:400; color:#8ca4c4; }
  .hero { display:block; position:relative; isolation:isolate; min-height:0; padding:40px; margin:0; gap:0; overflow:hidden; border:0; border-radius:0; background:#0e1421; }
  .stage-wrap { position:absolute; inset:0; min-height:0; border:0; border-radius:0; box-shadow:none; z-index:-2; }
  .stage-wrap::after { content:''; position:absolute; inset:0; background:linear-gradient(90deg,#0b101bdf,#0b101b77),linear-gradient(0deg,#090e18 0%,transparent 90%); z-index:3; }
  .hero-art { position:absolute; inset:0; width:100%; height:100%; min-height:0; object-fit:cover; object-position:center; animation:none; filter:none; }
  .stage-title { display:none; }
  .hero-copy { position:relative; max-width:none; padding:0; border:0; border-radius:0; background:none; box-shadow:none; }
  .hero-copy .eyebrow { font-size:12px; color:var(--gold); margin:0 0 14px; }
  .hero-copy h2 { color:var(--white); font-size:34px; margin:0 0 12px; line-height:1.15; }
  .hero-copy > p:not(.eyebrow) { max-width:620px; font-size:15px; color:#c4d0df; line-height:1.6; margin:0 0 26px; }
  .player-card { margin:28px 0 0; padding:0; border:0; border-radius:0; background:none; box-shadow:none; }
  .mode-choice { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; padding:0; margin:0 0 26px; border:0; }
  .mode-choice legend { font-size:12px; color:var(--gold); margin-bottom:16px; padding:0; }
  .mode-choice label,.mode-choice .duel-mode { display:flex; position:relative; flex-direction:column; align-items:flex-start; gap:14px; min-width:0; margin:0; padding:24px; text-align:left; border:1px solid #ffffff25; border-radius:6px; background:#111c2bee; color:var(--white); cursor:pointer; }
  .mode-choice input { position:absolute; top:22px; right:18px; width:18px; height:18px; accent-color:var(--gold); margin:0; }
  .mode-choice label:has(input:checked) { border-color:#d8b66caa; background:#162232f5; }
  .mode-choice label { text-transform:none; font-weight:400; }
  .mode-choice label:has(input:focus-visible) { outline:2px solid var(--gold); outline-offset:3px; }
  .mode-choice strong { font-size:24px; font-weight:700; }
  .mode-kicker { display:block; padding-right:20px; color:var(--gold); font-size:10px; text-transform:uppercase; line-height:1.5; }
  .mode-choice label > span:not(.mode-kicker):not(.mode-select),.mode-choice .duel-mode > span:not(.mode-kicker):not(.mode-select) { font-size:14px; line-height:1.6; color:#b5c4d9; flex:1; }
  .mode-choice .mode-select { align-self:stretch; display:flex; justify-content:center; gap:8px; align-items:center; min-height:40px; margin-top:6px; border-top:1px solid var(--line); padding-top:12px; font-size:12px; font-weight:700; color:#d7c18e; }
  .mode-select .fa-check { opacity:0; }
  .mode-choice label:has(input:checked) .fa-check { opacity:1; }
  .duel-mode:hover { border-color:#d8b66c99; background:#1b2739; }
  .setup-fields { display:grid; grid-template-columns:minmax(180px,1fr) minmax(0,2fr); gap:20px; align-items:start; }
  .setup-fields label { display:block; font-size:12px; font-weight:400; text-transform:none; color:#b5c4d9; margin:0 0 8px; }
  .setup-fields [hidden] { display:none!important; }
  .setup-fields:has(#startCategoryLabel[hidden]) { grid-template-columns:minmax(0,1fr); }
  .setup-fields #startCategory { margin-top:8px; width:100%; min-height:48px; border:1px solid #ffffff30; border-radius:6px; background:#121c2d; color:#f5f1e7; }
  .start-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; }
  .start-row input { min-width:0; min-height:48px; background:#121c2d; border-color:#ffffff30; box-shadow:none; color:var(--white); }
  .start-row button { min-height:48px; padding:12px 22px; }
  .form-note { min-height:0; margin:8px 0 0; }
  .start-actions { display:flex; flex-wrap:wrap; gap:8px; margin:20px 0 0; }
  .start-actions #rulesButton,.start-actions #scoresButton,.start-actions #historyButton { display:none; }
  .start-actions button { font-size:12px; min-height:40px; padding:9px 14px; }
  .start-actions .ghost-button { flex:0 1 auto; }
  .join-code-form { display:flex; align-items:center; gap:12px; max-width:390px; margin:20px 0 0; font-size:12px; color:var(--muted); }
  .join-code-form label { white-space:nowrap; }
  .join-code-form .link-row { flex:1; min-width:0; }
  .join-code-form .link-row input { background:#121c2d; border-color:#ffffff30; }
  .rules-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:32px; margin:0; padding:28px 0; border-bottom:1px solid var(--line); }
  .rules-grid article { min-width:0; padding:0; border:0; border-radius:0; background:none; box-shadow:none; }
  .rules-grid article::before { display:none; }
  .rule-heading { justify-content:flex-start; gap:10px; margin-bottom:12px; }
  .rule-heading strong { font-size:13px; color:var(--gold); font-weight:500; }
  .rule-icon { flex:0 0 20px; width:20px; height:24px; color:var(--gold); font-size:15px; background:none; border:0; box-shadow:none; }
  .rules-grid article > span { font-size:13px; line-height:1.7; color:var(--muted); }
  .site-footer { max-width:1360px; margin:0 auto; padding:24px; display:flex; justify-content:space-between; gap:20px; color:#8d9fb9; font-size:12px; }
  .site-footer a { color:#aabbd1; }
  .game-screen { max-width:none; padding:24px; min-height:0; }
  .game-layout { grid-template-columns:minmax(0,1fr) 268px; gap:28px; align-items:stretch; }
  .question-panel { padding:0; border:0; border-radius:0; background:none; box-shadow:none; }
  .lifelines { gap:10px; margin-bottom:16px; }
  .lifeline { display:flex; flex-direction:row; justify-content:center; min-height:48px; padding:10px; gap:10px; color:#dbc795; background:#141e2d; border-color:#ffffff25; animation:none!important; }
  .lifeline i { font-size:16px; }
  .lifeline:not(:disabled) { box-shadow:none; }
  .lifeline span { font-size:12px; }
  .lifeline:disabled { color:#677689; background:#101722; border-color:#ffffff12; opacity:.7; }
  .studio-panel { height:var(--studio-height,240px); border:1px solid #ffffff24; border-radius:6px; box-shadow:none; margin-bottom:18px; }
  .studio-panel img { animation:none; filter:none; }
  .studio-panel::after { display:none; }
  .question-card { display:flex; align-items:center; justify-content:center; min-height:92px; padding:20px; margin:0 0 14px; border:1px solid #d8b66c60; border-radius:6px; background:#141e2d; box-shadow:none; animation:none; }
  .question-card::before { display:none; }
  .question-card p { font-size:22px; line-height:1.4; font-weight:600; color:var(--white); text-shadow:none; }
  .answers { gap:10px; }
  .answer { min-height:56px; background:#141e2d; border-color:#ffffff2b; border-radius:6px; box-shadow:none; }
  .answer-letter { color:#dec488; background:#d8b66c14; border:1px solid #d8b66c40; border-radius:4px; font-size:14px; }
  .answer-text { font-weight:500; }
  .answer.selected { background:#544524; border-color:#d8b66c; box-shadow:none; }
  .answer.correct,.answer.correct:hover,.answer.correct:focus-visible { background:#11663e; border-color:#69f0ae; color:white; }
  .answer.wrong,.answer.wrong:hover { background:#862838; color:white; }
  .question-actions { margin-top:16px; gap:8px; }
  .question-actions button { min-height:42px; font-size:12px; }
  .ladder { padding:20px; border:1px solid #ffffff24; border-radius:6px; background:#101925; box-shadow:none; }
  .side-title { background:none; border:0; box-shadow:none; text-shadow:none; color:var(--white); font-size:24px; padding:4px 0; animation:none; }
  .ladder-actions .timer-pill { padding:16px 0; border:0; border-bottom:1px solid var(--line); border-radius:0; background:none; box-shadow:none; }
  .timer-pill strong { color:var(--gold); text-shadow:none; }
  .timer-pill span { color:var(--muted); }
  .ladder ol { gap:3px; margin:16px 0; }
  .ladder li { padding:8px 10px; font-size:13px; border-radius:4px; color:#a6b5ca; }
  .ladder li.safe { border-color:#d8b66c50; color:#f2dfac; }
  .ladder li.active,.ladder li.active.safe { background:var(--gold); color:#121b2b; box-shadow:none; border-color:var(--gold); }
  .ladder li.active.safe strong,.ladder li.active.safe span { color:#121b2b; }
  .end-game-button { min-height:42px; background:transparent; }
  .hint-box { background:#1b2738; color:#eee0bd; }
  .result-screen { padding:24px; }
  .check,.save-form { background:#121c2d; background-image:none; box-shadow:none; }
  body.is-playing .site-footer,body.is-result .site-footer { display:none; }
  @media (max-width:1024px), (max-width:1180px) and (max-height:600px) {
    body.is-playing .site-header { display:none; }
    .game-screen { padding:8px; }
    .game-layout { grid-template-columns:minmax(0,1fr); gap:0; }
    .question-panel { padding:0; }
    .mobile-game-bar { margin-bottom:10px; }
    .mobile-game-bar .side-title { border:1px solid var(--line); border-radius:6px; }
    .mobile-game-bar .timer-pill { background:#141e2d; border-color:var(--line); }
    .lifelines { gap:6px; margin-bottom:8px; }
    .lifeline { flex-direction:column; gap:3px; padding:5px 2px; min-height:44px; }
    .lifeline span { font-size:11px; }
    .studio-panel { height:var(--studio-height,220px); margin-bottom:8px; }
    .question-card { min-height:76px; padding:12px; margin-bottom:8px; }
    .question-card p { font-size:18px; }
    .answers { gap:6px; }
    .answer { min-height:52px; padding:8px; }
    .question-actions { margin-top:8px; gap:6px; }
    .ladder.is-open { background:#101925; }
    .ladder.is-open .side-title { font-size:22px; }
  }
  @media (max-width:800px) {
    .site-header { flex-wrap:wrap; gap:16px; padding:18px 20px; }
    .site-navigation { flex-wrap:wrap; }
    .site-navigation button { padding:10px; }
    .page-intro { align-items:flex-start; flex-direction:column; gap:16px; margin-bottom:22px; }
    .page-intro h1 { font-size:38px; }
    .start-screen { padding:28px 20px 0; }
    .hero { padding:26px 20px; }
    .mode-choice { gap:10px; }
    .mode-choice label,.mode-choice .duel-mode { padding:18px 14px; }
    .mode-choice strong { font-size:21px; }
    .setup-fields { grid-template-columns:minmax(0,1fr); gap:14px; }
    .rules-grid { gap:20px; }
  }
  @media (max-width:600px) {
    .site-header { gap:14px; padding:16px; }
    .site-brand { font-size:18px; }
    .site-navigation { gap:6px; width:100%; }
    .site-navigation button { font-size:12px; min-height:40px; padding:8px; }
    .site-navigation #soundButton,.site-navigation #audioSettingsButton,.fullscreen-toggle { width:36px; }
    .site-header .utility-actions { gap:4px; }
    .start-screen { padding:28px 16px 0; }
    .page-intro h1 { font-size:36px; }
    .journey-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .journey-grid span { font-size:11px; padding:12px 4px; gap:8px; }
    .hero { margin-inline:-16px; padding:28px 16px; }
    .hero-copy h2 { font-size:28px; }
    .mode-choice { grid-template-columns:minmax(0,1fr); }
    .mode-choice label,.mode-choice .duel-mode { padding:20px; gap:10px; }
    .mode-choice strong { font-size:23px; }
    .mode-select { justify-content:flex-start!important; }
    .start-row { grid-template-columns:minmax(0,1fr); }
    .start-actions button { flex:1; }
    .rules-grid { grid-template-columns:minmax(0,1fr); gap:22px; }
    .site-footer { flex-wrap:wrap; padding:24px 16px; font-size:11px; }
    .question-card p { font-size:16px; }
    .answer-text { font-size:14px; }
    body.is-result .site-header { display:none; }
  }
  @media (max-height:620px) and (max-width:1180px) {
    .question-card { min-height:50px; padding:8px; }
    .answer { min-height:44px; }
  }
}
@media print { .site-header,.site-footer { display:none!important; } }
/* The studio homepage and the televised gameplay intentionally have separate palettes. */
@media screen {
  body.is-playing { --gold:#f4cf4b; --cyan:#4dd8ff; --white:#fff; --muted:#aebcdd; --line:#ffffff26; background:#070f22; }
  body.is-playing .site-header { display:none; }
  body.is-playing .app { max-width:1600px; }
  body.is-playing .game-screen { padding:8px; }
  body.is-playing .game-layout { grid-template-columns:minmax(0,1fr) 280px; gap:20px; }
  body.is-playing .question-panel,body.is-playing .ladder { padding:15px; border:1px solid #7288b84d; border-radius:8px; background:linear-gradient(135deg,#163552,#0d163c 85%); box-shadow:0 12px 38px #0005; }
  body.is-playing .question-panel::before { display:block; }
  body.is-playing .lifelines { margin-bottom:12px; }
  body.is-playing .lifeline { flex-direction:column; gap:4px; min-height:58px; padding:6px; color:#fff; border-color:#d7bf6166; background:linear-gradient(#1b3678,#14265f); }
  body.is-playing .lifeline:not(:disabled) { animation:lifelineReady 3.4s ease-in-out infinite!important; box-shadow:inset 0 0 18px #4dd8ff20; }
  body.is-playing .lifeline:disabled { opacity:.45; }
  body.is-playing .lifeline i { color:var(--gold); font-size:21px; }
  body.is-playing .studio-panel { height:var(--studio-height,340px); border-color:#4dd8ff66; margin-bottom:12px; }
  body.is-playing .studio-panel img { animation:consoleFloat 4.8s ease-in-out infinite; }
  body.is-playing .studio-panel::after { display:block; }
  body.is-playing .question-card { min-height:112px; padding:20px; border:2px solid #e6c34c99; border-radius:8px; background:linear-gradient(#192f78,#101d4c); box-shadow:inset 0 0 22px #4dd8ff15; animation:questionEnter 420ms ease both; }
  body.is-playing .question-card::before { display:block; }
  body.is-playing .question-card p { font-size:24px; font-weight:800; line-height:1.35; }
  body.is-playing .answer { min-height:64px; background:#12235f; border-color:#4dd8ff66; border-radius:8px; }
  body.is-playing .answer-letter { width:36px; height:36px; flex-basis:36px; border:0; border-radius:50%; background:var(--gold); color:#07132c; font-size:18px; }
  body.is-playing .answer-text { font-weight:750; }
  body.is-playing .answer:hover:not(:disabled) { border-color:var(--gold); box-shadow:0 0 16px #4dd8ff25; }
  body.is-playing .answer.selected { background:#654916; border-color:#f4c95d; box-shadow:0 0 20px #f4c95d44; }
  body.is-playing .answer.correct,body.is-playing .answer.correct:hover { background:#11663e; border-color:#69f0ae; box-shadow:0 0 22px #69f0ae55; }
  body.is-playing .answer.correct .answer-letter { background:#69f0ae; }
  body.is-playing .answer.wrong,body.is-playing .answer.wrong:hover { background:#862838; border-color:#ff8791; }
  body.is-playing .answer.disabled,body.is-playing .answer.disabled:hover { color:#9da6b4; background:#303747; border-color:#566174; box-shadow:none; }
  body.is-playing .answer.disabled .answer-letter { color:#aab2c0; background:#495263; }
  body.is-playing .side-title { min-height:62px; padding:8px; border:1px solid #f4cf4b99; border-radius:8px; background:radial-gradient(ellipse at center,#18455b,#0b1435 75%); color:#fff; text-shadow:0 0 18px #4dd8ff; font-size:28px; font-weight:900; animation:titleGlow 2.4s ease-in-out infinite; }
  body.is-playing .ladder-actions .timer-pill { padding:10px; min-height:74px; border:1px solid #f4cf4b77; border-radius:8px; background:linear-gradient(#183052,#101a40); box-shadow:inset 0 0 22px #f4cf4b12; }
  body.is-playing .timer-pill strong { color:var(--gold); font-size:28px; }
  body.is-playing .ladder ol { gap:4px; margin:12px 0; }
  body.is-playing .ladder li { padding:9px 10px; font-size:16px; color:#afbedf; }
  body.is-playing .ladder li strong { white-space:nowrap; }
  body.is-playing .ladder li.safe { color:#fff; border-color:#f4cf4b66; }
  body.is-playing .ladder li.active,body.is-playing .ladder li.active.safe { background:#f4cf4b; color:#08132d; border-color:#ffe77b; box-shadow:0 0 20px #f4cf4b44; }
  body.is-playing .ladder li.active span,body.is-playing .ladder li.active strong { color:#08132d; }
  body.is-playing .question-actions { margin-top:12px; }
  body.is-playing .question-actions .ghost-button,body.is-playing .end-game-button { background:#ffffff12; border-color:#adbdde44; color:#fff; }
  @media (max-height:800px) and (min-width:1025px) { body.is-playing .ladder li { padding:6px 10px; } }
  @media (max-width:1024px), (max-width:1180px) and (max-height:600px) {
    body.is-playing .game-layout { grid-template-columns:minmax(0,1fr); gap:0; }
    body.is-playing .question-panel { padding:8px; }
    body.is-playing .mobile-game-bar .side-title { min-height:44px; font-size:20px; }
    body.is-playing .mobile-game-bar .timer-pill { background:#14254d; border-color:#f4cf4b66; }
    body.is-playing .mobile-game-bar .timer-pill strong { font-size:20px; }
    body.is-playing .lifelines { margin-bottom:8px; gap:6px; }
    body.is-playing .lifeline { min-height:44px; gap:3px; padding:5px 2px; }
    body.is-playing .lifeline i { font-size:17px; }
    body.is-playing .studio-panel { height:var(--studio-height,260px); margin-bottom:8px; }
    body.is-playing .question-card { min-height:76px; padding:12px; margin-bottom:8px; }
    body.is-playing .question-card p { font-size:18px; }
    body.is-playing .answer { min-height:52px; padding:8px; }
    body.is-playing .answer-letter { width:30px; height:30px; flex-basis:30px; font-size:16px; }
    body.is-playing .question-actions { margin-top:8px; }
    body.is-playing .ladder.is-open { background:#101b42; }
  }
  @media (max-width:600px) { body.is-playing .question-card p { font-size:16px; } }
  @media (max-width:380px) {
    body.is-playing .mobile-game-bar { grid-template-columns:minmax(110px,1fr) 82px 38px 38px; gap:4px; }
    body.is-playing .mobile-game-bar .side-title { min-width:0; padding:0 4px; font-size:16px; }
    body.is-playing .mobile-game-bar .mobile-end-button { width:38px; }
    body.is-playing .lifeline span { font-size:10px; }
  }
  @media (max-height:620px) and (max-width:1180px) {
    body.is-playing .question-card { min-height:50px; padding:8px; }
    body.is-playing .answer { min-height:44px; }
    body.is-playing .question-panel { padding:5px; }
  }
  @media (prefers-reduced-motion:reduce) {
    body.is-playing .lifeline:not(:disabled),body.is-playing .studio-panel img,body.is-playing .side-title,body.is-playing .question-card,body.is-playing .question-card::before,body.is-playing .question-panel::before,body.is-playing .studio-panel::after { animation:none!important; }
  }
}
.language-control { display: flex; align-items: center; gap: 6px; color: inherit; font-size: 12px; flex-shrink: 0; }
.language-control select { width: 60px; min-height: 36px; padding: 4px 6px; color: #f3d680; background: #161619; border: 1px solid #716134; border-radius: 4px; font: inherit; }
.language-control select:focus-visible { outline: 2px solid #f3d680; outline-offset: 3px; }
@media print { .language-control { display: none!important; } }
@media (max-width: 420px) { .language-control > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }
