@font-face {
  font-family: RealityDisplay;
  src: url("/fonts/poppins-black-italic.ttf") format("truetype");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: Nunito;
  src: url("/fonts/nunito-variable.ttf") format("truetype");
  font-weight: 400 1000;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f8f7ef;
  --ink: #111110;
  --yellow: #ffdf49;
  --teal: #008b7c;
  --muted: #575950;
  --line: #deded2;
  --display: RealityDisplay, Arial, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 280px;
  background: var(--paper) url("/art/reality-check/pattern.jpg") center
    top/cover fixed;
  color: var(--ink);
  font:
    600 16px/1.5 Nunito,
    Arial,
    sans-serif;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button {
  font: inherit;
  cursor: pointer;
}
a {
  color: inherit;
}
button:disabled {
  cursor: default;
  opacity: 0.5;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #7a35a4;
  outline-offset: 4px;
}
button {
  transition:
    transform 0.15s,
    background-color 0.15s;
}
button:active:not(:disabled) {
  transform: scale(0.97);
}
button:hover:not(:disabled) {
  filter: brightness(0.95);
}
.topbar,
main,
footer {
  width: min(100% - 48px, 720px);
  margin-inline: auto;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  min-height: 66px;
}
.icon-button {
  display: grid;
  place-items: center;
  background: #fff;
  border: 0;
  border-radius: 50%;
  height: 44px;
  width: 44px;
  flex-shrink: 0;
}
.icon-button img {
  display: block;
}
.brand {
  font: italic 900 19px/0.84 var(--display);
  letter-spacing: -0.06em;
  text-decoration: none;
}
.game-heading {
  padding: 12px 0 18px;
}
.title-wrap {
  position: relative;
  width: fit-content;
}
h1 {
  font: italic 900 clamp(52px, 8.7vw, 86px) / 0.97 var(--display);
  letter-spacing: -0.055em;
  margin: 0;
}
.mascot {
  position: absolute;
  width: clamp(98px, 17vw, 155px);
  height: auto;
  left: 71%;
  top: -22%;
  pointer-events: none;
}
.scoreboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px auto 0;
  width: 90%;
}
.stat {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #fff;
  border-radius: 999px;
  white-space: nowrap;
  font: italic 900 clamp(15px, 2.4vw, 22px) / 1.2 var(--display);
}
.stat img {
  width: 24px;
  height: 24px;
}
.round-clock {
  font-variant-numeric: tabular-nums;
}
.round-clock.urgent {
  color: #a32a3d;
  background: #ffe4e9;
}
.game-panel {
  background: var(--yellow);
  border-radius: 30px;
  padding: 12px 20px 16px;
}
.progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font: italic 900 17px/1.2 var(--display);
}
.progress-row .icon-button {
  width: 38px;
  height: 38px;
}
.photo-shell {
  position: relative;
  background: #fff9df;
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(180px, 35svh, 440px);
}
#photo-mount {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
#photo-mount img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.loading {
  position: absolute;
  text-align: center;
  padding: 20px;
}
.image-countdown {
  width: 82%;
  margin: 12px auto 0;
}
.timer-track {
  height: 9px;
  background: #d5bf53;
  border-radius: 999px;
  overflow: hidden;
}
#image-bar {
  height: 100%;
  width: 100%;
  background: var(--teal);
  transform-origin: left;
}
.image-countdown p {
  font-size: 13px;
  font-style: italic;
  text-align: center;
  margin: 5px 0 8px;
  font-variant-numeric: tabular-nums;
}
.question {
  font: italic 900 clamp(23px, 5.6vw, 37px) / 1.2 var(--display);
  letter-spacing: -0.055em;
  text-align: center;
  margin: 4px 0 0;
}
.answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin: 10px 0;
}
.answer {
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  font: italic 900 clamp(14px, 3.5vw, 23px) / 1.2 var(--display);
  letter-spacing: -0.035em;
  color: #fff;
  padding: 14px 8px;
}
.real-button,
.primary {
  background: var(--ink);
}
.ai-button {
  background: var(--teal);
}
.answer-feedback {
  width: fit-content;
  max-width: 100%;
  margin: 12px auto 0;
  min-height: 32px;
  padding: 7px 15px;
  border-radius: 999px;
  background: #fff;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}
.answer-feedback.correct {
  color: #006b60;
}
.answer-feedback.wrong {
  color: #a32a3d;
  background: #fff0f3;
}
.answer-feedback strong {
  font-weight: 800;
}
.welcome,
.finish {
  background: var(--yellow);
  border-radius: 30px;
  text-align: center;
  padding: 32px 24px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin: 0 0 14px;
}
.welcome h2,
.finish h2 {
  font: italic 900 clamp(29px, 5.8vw, 44px) / 1.1 var(--display);
  letter-spacing: -0.04em;
  margin: 0 auto 16px;
  max-width: 480px;
}
.welcome > p {
  margin: 14px auto;
  max-width: 440px;
}
.welcome-rules {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 8px;
}
.welcome-rules span {
  background: #fff7c8;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
}
.primary {
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 17px 24px;
  min-height: 56px;
  font: italic 900 18px/1.2 var(--display);
  width: min(100%, 400px);
}
.collection {
  font-weight: 800;
  font-size: 13px;
}
.muted,
.fine {
  color: var(--muted);
}
.muted {
  font-size: 14px;
}
.fine {
  font-size: 12px;
}
.text-button {
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 10px 0;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.review-title {
  font: italic 900 28px/1.2 var(--display);
  letter-spacing: -0.035em;
  margin: 28px 0 10px;
}
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.review-card {
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  min-width: 0;
}
.review-card > img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  display: block;
  background: #ecebdf;
}
.review-content {
  padding: 16px;
}
.review-content h3 {
  font-size: 15px;
  overflow-wrap: anywhere;
  margin: 12px 0;
}
.review-content p {
  font-size: 13px;
  overflow-wrap: anywhere;
  margin: 8px 0;
}
.truth {
  font-weight: 1000;
}
.correct {
  color: #006b60;
}
.wrong {
  color: #a32a3d;
}
.source-link {
  font-size: 13px;
  color: #006b60;
  display: inline-block;
  margin: 4px 12px 4px 0;
  overflow-wrap: anywhere;
  text-underline-offset: 3px;
}
details {
  font-size: 13px;
  border-top: 1px solid var(--line);
  margin: 16px 0;
  padding-top: 12px;
}
summary {
  cursor: pointer;
  font-weight: 800;
}
details p {
  overflow-wrap: anywhere;
}
dialog {
  background: var(--paper);
  color: var(--ink);
  border: 0;
  border-radius: 24px;
  padding: 32px;
  max-width: 640px;
  width: calc(100% - 32px);
  max-height: 88dvh;
  overflow: auto;
}
dialog::backdrop {
  background: #15140dcc;
}
dialog h2 {
  font: italic 900 28px/1.2 var(--display);
  padding-right: 35px;
}
.close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}
dialog p {
  font-size: 15px;
}
kbd {
  font: inherit;
  font-size: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
}
.zoom-dialog {
  max-width: 1200px;
  padding: 12px;
}
.zoom-dialog #zoom-photo {
  display: block;
  max-width: 100%;
  max-height: 76dvh;
  object-fit: contain;
  margin: auto;
}
.zoom-dialog p {
  text-align: center;
}
#credits > div {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
#credits p {
  overflow-wrap: anywhere;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 18px 0 24px;
  font-size: 12px;
  color: var(--muted);
}
body[data-state="playing"] footer {
  display: none;
}
.footer-credit { display: grid; gap: 5px; text-align: right; }
.streak-hud { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin: 10px 0; font-size: 12px; }
.streak-hud strong { color: #006e60; font-size: 16px; }
.streak-hud.bonus-active { background: #d5f4e5; border-radius: 14px; padding: 8px; }
@media (min-width: 900px) { .streak-hud { justify-content: flex-start; margin: 0 0 18px; } }
.share-button { display: block; width: min(100%, 400px); margin: 12px auto 0; padding: 14px 22px; border: 2px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-weight: 800; cursor: pointer; }
.share-button:hover { background: rgba(255,255,255,.4); }
.share-button:disabled { opacity: .6; cursor: wait; }
#share-status:empty { display: none; }
.share-copy { display: block; width: min(100%, 400px); min-height: 110px; margin: 12px auto 0; padding: 12px; border-radius: 12px; font: inherit; resize: vertical; }
.footer-credit > span { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; }
.footer-credit small { font-size: 12px; }
.credit-heart { color: #bd315e; font-size: 16px; }
.codex-mark { width: 20px; height: 20px; flex: none; }
@media (max-width: 480px) {
  footer { flex-wrap: wrap; }
  .footer-credit { width: 100%; text-align: left; }
  .footer-credit > span { justify-content: flex-start; }
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.noscript {
  padding: 30px;
}
[hidden] {
  display: none !important;
}
@media (min-width: 900px) {
  body[data-state="playing"] .topbar,
  body[data-state="playing"] main {
    width: min(100% - 80px, 1060px);
  }
  body[data-state="playing"] .game-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0 24px;
  }
  body[data-state="playing"] h1 {
    font-size: 62px;
  }
  body[data-state="playing"] .mascot {
    width: 120px;
  }
  body[data-state="playing"] .scoreboard {
    width: 370px;
    margin: 0;
  }
  .photo-shell {
    height: min(46svh, 500px);
  }
  .game-panel {
    padding: 16px 30px 20px;
  }
  .progress-row {
    margin-bottom: 12px;
  }
  .question {
    font-size: 34px;
  }
  .answers {
    max-width: 680px;
    margin: 12px auto;
  }
  .answer-feedback {
    margin-bottom: 20px;
  }
}
@media (max-width: 420px) {
  .topbar,
  main,
  footer {
    width: calc(100% - 40px);
  }
  .topbar {
    padding-top: 12px;
    min-height: 54px;
  }
  .game-heading {
    padding: 12px 0 14px;
  }
  h1 {
    font-size: clamp(46px, 13vw, 55px);
  }
  .scoreboard {
    gap: 10px;
    margin-top: 14px;
    width: 92%;
  }
  .stat {
    font-size: 14px;
    min-height: 38px;
    gap: 5px;
  }
  .stat img {
    width: 20px;
    height: 20px;
  }
  .game-panel {
    padding: 10px 16px 14px;
    border-radius: 26px;
  }
  .progress-row {
    font-size: 14px;
    margin-bottom: 8px;
  }
  .progress-row .icon-button {
    height: 32px;
    width: 32px;
  }
  .photo-shell {
    height: clamp(150px, 32svh, 310px);
    border-radius: 14px;
  }
  .image-countdown {
    margin-top: 9px;
  }
  .image-countdown p {
    font-size: 11px;
  }
  .question {
    font-size: clamp(22px, 6vw, 26px);
  }
  .answer {
    min-height: 46px;
    font-size: clamp(12px, 3.65vw, 15px);
  }
  .answer-feedback {
    font-size: 11px;
    margin-top: 10px;
  }
  .welcome,
  .finish {
    padding: 26px 18px;
  }
  .review-grid {
    gap: 10px;
  }
  .review-content {
    padding: 12px;
  }
  .review-card > img {
    height: 140px;
  }
  footer > span {
    display: none;
  }
}
@media (max-height: 700px) and (max-width: 899px) {
  body[data-state="playing"] .topbar {
    padding-top: 8px;
    min-height: 44px;
  }
  body[data-state="playing"] .topbar .icon-button {
    height: 34px;
    width: 34px;
  }
  body[data-state="playing"] h1 {
    font-size: 44px;
  }
  body[data-state="playing"] .mascot {
    width: 94px;
  }
  body[data-state="playing"] .game-heading {
    padding: 8px 0 12px;
  }
  .scoreboard {
    margin-top: 10px;
  }
  .photo-shell {
    height: clamp(140px, 31svh, 215px);
  }
  .image-countdown {
    margin-top: 8px;
  }
  .answers {
    margin: 8px 0;
  }
  .answer-feedback {
    margin-top: 8px;
  }
}
@media (max-height: 650px) and (max-width: 899px) {
  body[data-state="playing"] h1 {
    font-size: 40px;
  }
  body[data-state="playing"] .game-heading {
    padding: 6px 0 10px;
  }
  .photo-shell {
    height: clamp(120px, 28svh, 180px);
  }
  .image-countdown p {
    margin-bottom: 4px;
  }
  .answer-feedback {
    padding: 5px 12px;
    min-height: 26px;
  }
}
.desktop-intro,
.desktop-eyebrow,
.desktop-question,
.keyboard-help,
.key-hint { display: none; }

/* Desktop is a wide working surface; the mobile layout stays stacked. */
@media (min-width: 900px) {
  .topbar, main, footer,
  body[data-state="playing"] .topbar,
  body[data-state="playing"] main {
    width: min(100% - 80px, 1280px);
  }
  .topbar { min-height: 72px; padding-top: 20px; }
  .brand { font-size: 24px; }
  body[data-state="welcome"] main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(40px, 6vw, 100px);
    min-height: calc(100svh - 160px);
    padding-block: 40px;
  }
  body[data-state="welcome"] h1 { font-size: clamp(76px, 8vw, 118px); }
  body[data-state="welcome"] .mascot { width: 190px; }
  body[data-state="welcome"] .desktop-intro {
    display: block;
    font-size: 21px;
    line-height: 1.6;
    margin: 32px 0 0;
    color: var(--muted);
  }
  .welcome { padding: 42px 32px; border-radius: 36px; }
  .welcome h2 { font-size: clamp(32px, 3.2vw, 44px); }
  .welcome .primary { margin-top: 6px; }
  body[data-state="playing"] .game-heading {
    padding: 14px 0 20px;
  }
  body[data-state="playing"] h1 { font-size: 44px; }
  body[data-state="playing"] .mascot { width: 100px; }
  body[data-state="playing"] .scoreboard { width: 360px; gap: 16px; }
  .stat { min-height: 54px; font-size: 20px; }
  #play {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 36px;
    align-items: center;
    padding-bottom: 24px;
  }
  .game-panel { padding: 18px 22px; border-radius: 30px; }
  .progress-row { margin-bottom: 12px; }
  .progress-row .icon-button { width: 44px; height: 44px; }
  .photo-shell { height: clamp(240px, calc(100svh - 360px), 640px); }
  .image-countdown { width: 86%; margin-top: 16px; }
  .image-countdown p { font-size: 14px; margin-bottom: 0; }
  .game-panel .question { display: none; }
  .play-controls { min-width: 0; }
  .desktop-eyebrow {
    display: block;
    color: var(--teal);
    font-size: 12px;
    font-weight: 1000;
    letter-spacing: .12em;
    margin: 0 0 16px;
  }
  .desktop-question {
    display: block;
    font: italic 900 44px/1.05 var(--display);
    letter-spacing: -.045em;
    margin: 0 0 28px;
  }
  .answers { grid-template-columns: 1fr; gap: 14px; margin: 0; }
  .answer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 66px;
    padding: 18px 24px;
    font-size: 21px;
  }
  .key-hint {
    display: inline-grid;
    place-items: center;
    min-width: 27px;
    min-height: 27px;
    color: inherit;
    background: transparent;
    border-color: currentColor;
    font: 800 14px/1 Nunito, Arial, sans-serif;
  }
  .answer-feedback { width: 100%; margin: 18px 0 0; font-size: 13px; padding: 12px 16px; }
  .keyboard-help { display: block; font-size: 13px; line-height: 1.8; color: var(--muted); margin: 20px 0 0; }
  body[data-state="results"] .game-heading { padding: 24px 0; }
  body[data-state="results"] h1 { font-size: 54px; }
  body[data-state="results"] .mascot { width: 110px; }
  .finish { padding: 36px; }
  .review-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
  .review-card > img { height: 240px; }
  .review-content { padding: 20px; }
}
@media (min-width: 1400px) {
  #play { grid-template-columns: minmax(0, 1fr) 330px; gap: 44px; }
  .desktop-question { font-size: 48px; }
  .review-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 900px) and (max-height: 720px) {
  body[data-state="playing"] h1 { font-size: 34px; }
  body[data-state="playing"] .game-heading { padding: 8px 0 14px; }
  .photo-shell { height: clamp(180px, calc(100svh - 290px), 430px); }
  .keyboard-help { margin-top: 12px; }
  .desktop-question { font-size: 36px; margin-bottom: 20px; }
}
.sr-only {
  margin: 0;
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
