/* Guess the real page: the landing's room, one round at a time. */
.guess-view {
  position: relative;
  min-height: 100vh;
  isolation: isolate;
}
.guess-view::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 760px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(50% 40% at 50% 100%, color-mix(in srgb, var(--sunrise) 45%, transparent), transparent 70%),
    linear-gradient(180deg, var(--sky-0) 0%, var(--sky-1) 26%, var(--sky-2) 46%, var(--sky-3) 62%, var(--horizon) 80%, var(--air) 100%);
}
.guess-view .nav {
  position: relative;
  top: 12px;
  left: auto;
  margin: 0 auto;
  transform: none;
}
.guess-view .guess-hero {
  color: var(--on-sky);
  text-shadow: 0 2px 24px rgba(10, 40, 120, 0.22);
}
.guess-view .guess-hero .guess-kicker,
.guess-view .guess-hero p {
  color: var(--on-sky-2);
}
.guess-shell {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 110px;
}
.guess-hero {
  max-width: 820px;
  margin: 34px auto 72px;
  text-align: center;
  color: var(--ink);
}
.guess-kicker {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 560;
  letter-spacing: 0.01em;
  color: var(--ink-3);
}
.guess-hero h1 {
  font: 340 clamp(50px, 7.4vw, 104px) / 0.98 var(--font-display);
  letter-spacing: -0.024em;
}
.guess-hero p {
  max-width: 640px;
  margin: 22px auto 0;
  font-size: clamp(17px, 1.6vw, 19.5px);
  line-height: 1.6;
  color: var(--ink-2);
}
.guess-setup,
.guess-compare {
  padding: clamp(22px, 4vw, 52px);
  border-radius: var(--r-xl);
  background: linear-gradient(170deg, var(--surface), var(--surface-2));
  box-shadow: inset 0 0 0 1px var(--line), var(--sh-3);
}
.guess-setup-heading,
.guess-compare-head {
  max-width: 700px;
  margin-bottom: 30px;
}
.guess-setup h2,
.guess-compare h2,
.guess-end h2 {
  font: 360 clamp(34px, 4.4vw, 56px) / 1.04 var(--font-display);
  letter-spacing: -0.018em;
}
.guess-setup-heading p,
.guess-compare-head p {
  margin-top: 12px;
  color: var(--ink-2);
}
.guess-form {
  display: grid;
  gap: 22px;
}
.guess-field {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}
.guess-field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.guess-field input,
.guess-field textarea,
.guess-field select {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--r-s);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--ink);
}
.guess-field input:focus,
.guess-field textarea:focus,
.guess-field select:focus {
  outline: none;
  box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 0 4px var(--accent-wash);
}
.guess-field textarea {
  resize: vertical;
  line-height: 1.55;
}
.guess-field input[type="file"] {
  padding: 8px;
  font-size: 14px;
}
.guess-field input::file-selector-button {
  min-height: 34px;
  margin-right: 14px;
  padding: 6px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 560;
  cursor: pointer;
}
.guess-field small,
.guess-hand-hint {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-3);
}
.guess-hand-hint a {
  color: var(--accent);
  font-weight: 600;
}
.guess-photo-preview {
  display: block;
  width: min(240px, 100%);
  max-height: 300px;
  object-fit: contain;
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: var(--sh-paper);
}
.guess-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.guess-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.guess-form-actions .btn:disabled {
  opacity: 0.5;
  cursor: default;
}
.guess-status {
  font-size: 14px;
  color: var(--ink-2);
}
.guess-page-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 30px);
}
.guess-page-card {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.guess-page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 32px;
  padding: 0 4px 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 420;
}
.guess-reveal {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}
.guess-page-card.is-real {
  box-shadow: inset 0 0 0 2px var(--ink);
}
.guess-page-art {
  overflow: hidden;
  border-radius: 10px;
  background: #fefdfa;
  box-shadow: var(--sh-paper);
}
.guess-page-art img,
.guess-page-art canvas {
  display: block;
  width: 100%;
  height: auto;
}
.guess-votes,
.guess-round-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}
.guess-vote {
  min-width: 170px;
  min-height: 48px;
  padding: 10px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--t-2) var(--ease), background var(--t-1);
}
.guess-vote:hover:not(:disabled) {
  background: var(--primary-hi);
  transform: translateY(-1px);
}
.guess-vote:disabled {
  opacity: 0.5;
  cursor: default;
}
.guess-feedback {
  min-height: 30px;
  margin-top: 20px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 20px;
}
.guess-text-button {
  min-height: 48px;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}
.guess-end {
  margin-top: 72px;
  padding: clamp(28px, 5vw, 58px);
  border-radius: var(--r-xl);
  background: var(--primary);
  color: var(--on-primary);
  text-align: center;
}
.guess-end p {
  max-width: 650px;
  margin: 14px auto 0;
  opacity: 0.82;
}
.guess-end .btn {
  margin-top: 25px;
}
.guess-end .btn-paper,
.guess-end .btn-brand {
  background: var(--on-primary);
  color: var(--primary);
}
.guess-end .guess-privacy {
  margin-top: 30px;
  font-size: 13px;
  opacity: 0.75;
}
.guess-view :is(input, select, textarea, button, a):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
@media (max-width: 700px) {
  .guess-shell {
    width: min(100% - 24px, 500px);
    padding-top: 12px;
  }
  .guess-hero {
    margin: 20px auto 45px;
  }
  .guess-options,
  .guess-page-pair {
    grid-template-columns: minmax(0, 1fr);
  }
  .guess-page-card {
    max-width: 540px;
  }
  .guess-vote {
    flex: 1 1 140px;
    min-width: 0;
  }
}

/* photo drop zone (replaces the bare file input) */
.guess-field .guess-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.guess-field label.guess-drop {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  align-items: center;
  padding: 22px 24px;
  border: 1.5px dashed color-mix(in oklab, var(--accent) 45%, transparent);
  border-radius: 16px;
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent-wash) 70%, transparent), transparent 70%), var(--surface);
  font-weight: 400;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, transform .2s;
}
.guess-field label.guess-drop:hover,
.guess-field label.guess-drop.over { border-color: var(--accent); transform: translateY(-1px); }
.guess-field label.guess-drop:focus-within { box-shadow: 0 0 0 4px var(--accent-wash); }
.guess-drop.has-file { border-style: solid; }
.guess-field input.guess-file { padding: 0; border: 0; position: absolute; inset: 0; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.guess-drop-icon {
  grid-row: span 2;
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--primary); color: var(--on-primary);
}
.guess-drop-icon .ico { width: 22px; height: 22px; }
.guess-drop-text { color: var(--ink-2); font-size: 15px; }
.guess-drop-text b { color: var(--ink); font-weight: 620; }
.guess-drop-name { color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* the transcript's label, with the reader beside it */
.guess-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.guess-read[hidden] { display: none; }
.guess-read .ico { width: 15px; height: 15px; }
.guess-save { margin: 12px auto 4px; display: flex; animation: rw-fade 0.4s var(--ease) both; }
.guess-vote:focus-visible, .guess-text-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* one scale step from the hero to the card heading, and the read button inside the field's own corner so every edge lines up with the dropzone */
.guess-hero h1 { font-size: clamp(50px, 6.2vw, 88px); }
.guess-setup h2, .guess-compare h2, .guess-end h2 { font-size: clamp(34px, 4.4vw, 60px); }
.guess-text-wrap { position: relative; display: grid; }
.guess-text-wrap .guess-read { position: absolute; top: 10px; right: 10px; }
.guess-text-wrap:has(.guess-read:not([hidden])) textarea { padding-top: 58px; }

/* ================================================================== pass 2 (2026-10-10): the landing's own room */

/* the sky at the top fades into the page's sky; it no longer stops in a hard edge behind the form */
.guess-view::before {
  height: 900px;
  background:
    radial-gradient(50% 40% at 50% 100%, color-mix(in srgb, var(--sunrise) 45%, transparent), transparent 70%),
    linear-gradient(180deg, var(--sky-0) 0%, var(--sky-1) 24%, var(--sky-2) 42%, var(--sky-3) 58%, color-mix(in srgb, var(--horizon) 70%, transparent) 76%, transparent 100%);
  -webkit-mask-image: linear-gradient(#000 62%, transparent);
  mask-image: linear-gradient(#000 62%, transparent);
}

/* the small labels over headings: the landing's gold sun, in the landing's accent */
.guess-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  color: var(--accent);
}
.guess-kicker::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8e6, var(--gold-hi) 45%, var(--gold) 100%);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 20%, transparent), 0 0 12px color-mix(in srgb, var(--gold-hi) 70%, transparent);
}

/* dropdowns with the site's own chevron, not the browser's */
.guess-field select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23807f9a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
}

/* what is missing, said beside the button in the scene's coral, its field lit once */
.guess-status[data-tone="warn"] {
  color: #b4502c;
}
:root[data-theme="dark"] .guess-status[data-tone="warn"] {
  color: #f2a27c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .guess-status[data-tone="warn"] {
    color: #f2a27c;
  }
}
.guess-drop.need,
.guess-field textarea.need {
  animation: guess-need 900ms var(--ease) 1;
}
@keyframes guess-need {
  30% {
    box-shadow: 0 0 0 3px color-mix(in srgb, #e07a4f 55%, transparent);
  }
}

/* making the round: the button stays lit, a sheen running along it, not a grey slab */
.guess-form-actions .btn.busy:disabled {
  position: relative;
  overflow: hidden;
  opacity: 1;
  cursor: progress;
}
.guess-form-actions .btn.busy::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 246, 220, 0.4) 50%, transparent 70%);
  background-size: 220% 100%;
  animation: guess-sheen 1.3s linear infinite;
}
@keyframes guess-sheen {
  from {
    background-position: 120% 0;
  }
  to {
    background-position: -120% 0;
  }
}

/* the page they picked stays marked: a gold ring when right, coral when Ditto fooled them */
.guess-vote:disabled {
  opacity: 0.45;
}
.guess-vote.chosen:disabled {
  opacity: 1;
  box-shadow: 0 0 0 3px var(--gold-hi), 0 8px 24px -10px var(--primary-glow);
}
.guess-vote.chosen.wrong:disabled {
  box-shadow: 0 0 0 3px #e9926b;
}
.guess-vote.chosen::after {
  content: " · your pick";
  font-weight: 450;
  opacity: 0.8;
}

/* the end card: the golden-hour sky the landing ends on (the flat navy panel, and the cream slab at night, are gone) */
.guess-end {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(42% 70% at 78% 108%, color-mix(in srgb, var(--sun) 80%, transparent), transparent 70%),
    linear-gradient(172deg, var(--sky-1) 0%, var(--sky-2) 34%, var(--sky-3) 62%, var(--horizon) 100%);
  color: var(--on-sky);
  box-shadow: inset 0 0 0 1px var(--veil-edge), var(--sh-3);
}
.guess-end p {
  color: var(--on-sky-2);
  opacity: 1;
}
.guess-end .btn-paper,
.guess-end .btn-brand {
  background: var(--primary);
  color: var(--on-primary);
}
.guess-end .guess-privacy {
  color: var(--on-sky-2);
  opacity: 0.85;
}

/* ================================================================== polish pass (2026-10-16) */

/* the privacy line under the end card's button: on its own quiet pill of the page's air, so it reads at AA wherever
   the card's sun (or moon) glow falls behind it, by day and at night */
.guess-end .guess-privacy {
  display: block;
  width: fit-content;
  max-width: min(650px, 100%);
  margin: 26px auto 0;
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--air) 80%, transparent);
  box-shadow: inset 0 0 0 1px var(--veil-edge);
  opacity: 1;
}
@media (max-width: 700px) {
  .guess-end .guess-privacy {
    border-radius: 16px;
  }
}
.guess-shell:focus {
  outline: none;
}
:root[data-transparency="reduced"] .guess-end .guess-privacy {
  background: var(--air-hi, var(--surface));
}

/* a field that is missing stays marked in the scene's coral until it is filled (aria-invalid, guess.js) */
.guess-field textarea[aria-invalid="true"] {
  box-shadow: inset 0 0 0 1.5px #c4603c, 0 0 0 4px rgba(224, 122, 79, 0.16);
}
.guess-field label.guess-drop:has(input[aria-invalid="true"]) {
  border-color: #c4603c;
}
:root[data-theme="dark"] .guess-field textarea[aria-invalid="true"] {
  box-shadow: inset 0 0 0 1.5px #f2a27c, 0 0 0 4px rgba(242, 162, 124, 0.16);
}
:root[data-theme="dark"] .guess-field label.guess-drop:has(input[aria-invalid="true"]) {
  border-color: #f2a27c;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .guess-field textarea[aria-invalid="true"] {
    box-shadow: inset 0 0 0 1.5px #f2a27c, 0 0 0 4px rgba(242, 162, 124, 0.16);
  }
  :root:not([data-theme="light"]) .guess-field label.guess-drop:has(input[aria-invalid="true"]) {
    border-color: #f2a27c;
  }
}
/* the photo input's own focus, shown on its drop zone: the ink ring a keyboard user follows */
.guess-field label.guess-drop:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
/* the round's question takes focus as a round opens; it isn't a control */
.guess-compare h2:focus {
  outline: none;
}
/* the reveal over each page: readable on its card in both themes */
.guess-reveal {
  font-size: 13px;
}
@media (prefers-reduced-motion: reduce) {
  .guess-form-actions .btn.busy::after,
  .guess-drop.need,
  .guess-field textarea.need {
    animation: none;
  }
}
:root[data-motion="reduced"] .guess-form-actions .btn.busy::after {
  animation: none;
}
