:root {
  color-scheme: light;
  --background: #f7f4ec;
  --paper: #fffdf7;
  --ink: #25211b;
  --muted: #605a4d;
  --line: #d8d1c1;
  --orange: #f59a61;
  --accent: #a53e15;
  --green: #20523a;
  --red: #8b3b30;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--background);
  background-image: radial-gradient(#50453413 0.6px, transparent 0.8px);
  background-size: 6px 6px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
p, h1, h2, ul, ol { margin: 0; }
button, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.shell {
  width: min(100% - 2rem, 65rem);
  min-height: 100svh;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
}

.masthead {
  min-height: 4.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.wordmark { display: flex; align-items: center; gap: 0.5rem; font-weight: 850; font-size: 1.45rem; letter-spacing: -0.065em; }
.brand-icon {
  display: grid;
  place-items: center;
  width: 1.8rem;
  aspect-ratio: 1;
  border: 1px solid var(--ink);
  border-radius: 0.45rem;
  background: var(--orange);
  font-size: 1.18rem;
  transform: rotate(-7deg);
}
.brand-dot { color: var(--accent); }
.help {
  min-height: 2.75rem;
  padding: 0.25rem 0.5rem;
  border: 0;
  border-radius: 0.4rem;
  background: transparent;
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 650;
}
.help:hover { background: #ebe5d8; }
.help span { display: inline-grid; place-items: center; margin-right: 0.25rem; width: 1.15rem; aspect-ratio: 1; border: 1px solid currentColor; border-radius: 50%; font-size: 0.7rem; }

main {
  width: min(100%, 46rem);
  margin-inline: auto;
  padding-block: clamp(2rem, 7vw, 4.5rem) 2.75rem;
}
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1rem;
  margin-block-start: auto;
  padding-block-end: 0.5rem;
}

.intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}
.intro > div { min-width: 0; }
.edition {
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 750;
  line-height: 1.5;
}
.edition-dot { display: inline-block; width: 0.5em; height: 0.5em; margin: 0 0.34em 0.12em 0; border-radius: 50%; background: currentColor; }
.edition-date { color: var(--muted); font-weight: 550; }
h1 {
  margin-top: 0.35rem;
  max-width: max-content;
  font-size: clamp(2.25rem, 7.1vw, 3.85rem);
  font-weight: 850;
  line-height: 0.99;
  letter-spacing: -0.076em;
}
.subtitle { margin-top: 0.65rem; color: var(--muted); line-height: 1.45; }
.intro-art { width: clamp(4.25rem, 15vw, 8.25rem); height: auto; flex: none; }

.paper {
  border: 1px solid var(--ink);
  border-radius: 1rem;
  background: var(--paper);
  box-shadow: 4px 4px 0 #282318;
}
.card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.9rem clamp(0.875rem, 4vw, 1.75rem);
  border-bottom: 1px solid var(--line);
}
.round-label { color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.round-label strong { margin-inline-start: 0.16em; color: var(--ink); font-variant-numeric: tabular-nums; }
.unlock-note { order: 1; flex: 1 0 100%; color: var(--muted); font-size: 0.875rem; line-height: 1.4; }
.progress { display: flex; align-items: center; gap: 0.25rem; }
.progress-bar { width: clamp(0.65rem, 3.4vw, 1.6rem); height: 0.34rem; border-radius: 1rem; background: #e8e2d4; }
.progress-bar.current { background: #d85e29; }
.progress-bar.past { background: var(--ink); }
.question-body { display: grid; grid-template-columns: minmax(0, 1fr); padding: clamp(1.1rem, 4vw, 2.4rem); }
#community-name {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: center;
  min-height: 7.6rem;
  margin: 0 0 clamp(0.75rem, 3vw, 1.5rem);
  padding: 0.5rem 0.12rem;
  font-weight: 850;
  letter-spacing: -0.065em;
  line-height: 1.05;
  text-align: center;
  overflow-wrap: anywhere;
  font-size: clamp(1.45rem, 5.45vw, 3.5rem);
}
#community-name span:last-child { max-width: 100%; }
#community-name .prefix { margin-bottom: 0.24em; color: var(--accent); font-size: 0.58em; letter-spacing: -0.065em; }
.choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(0.55rem, 2vw, 0.85rem); }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  min-height: 3.125rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--ink);
  border-radius: 0.55rem;
  background: var(--paper);
  color: var(--ink);
  font-weight: 750;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.button:not(:disabled):hover { background: #f1eadb; }
.button.primary { background: var(--orange); }
.button.primary:hover { background: #ffad79; }
.guess { min-height: 3.45rem; letter-spacing: 0.035em; box-shadow: 0 2px 0 var(--ink); }
.guess[data-guess="REAL"]:not(:disabled) { background: #e8f1e5; }
.guess[data-guess="FAKE"]:not(:disabled) { background: #faeae4; }
.guess[data-guess="REAL"]:not(:disabled):hover { background: #d9e9d4; }
.guess[data-guess="FAKE"]:not(:disabled):hover { background: #f4ddd4; }
.guess-icon { display: grid; place-items: center; width: 1.2rem; aspect-ratio: 1; border: 1px solid currentColor; border-radius: 50%; font-size: 0.82em; line-height: 1; flex: none; }
.guess:disabled { color: var(--muted); border-color: #a79f8c; box-shadow: none; cursor: default; }
.guess.selected { color: var(--ink); border-color: var(--ink); background: #eee7d8; }
:focus-visible { outline: 3px solid #205a83; outline-offset: 3px; }

.reveal {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.65rem;
  margin-top: 1rem;
  padding: 0.75rem;
  border: 1px solid;
  border-radius: 0.55rem;
  line-height: 1.4;
}
.correct { color: var(--green); background: #e8f1e5; border-color: #a7c1a5; }
.incorrect { color: var(--red); background: #faeae4; border-color: #dfb6aa; }
.verdict-icon { font-size: 1.15rem; font-weight: 850; line-height: 1.2; }
.reveal p { margin-top: 0.16rem; color: var(--ink); }
.next { margin-top: 0.65rem; width: 100%; }

.result { --result-padding: clamp(1rem, 4vw, 2rem); padding: var(--result-padding); }
.score-block { position: relative; text-align: center; }
.score-block h1 { margin-inline: auto; }
.score { font-size: clamp(3.5rem, 12vw, 6rem); font-weight: 850; line-height: 1.07; letter-spacing: -0.085em; }
.score span { color: var(--muted); }
.result-art { display: none; }
.score-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem; padding: 0; list-style: none; margin-top: 0.55rem; }
.score-grid li { display: grid; place-items: center; width: 1.85rem; aspect-ratio: 1; border: 1px solid; border-radius: 0.38rem; font-weight: 850; }
.result-section { border-top: 1px solid var(--line); margin-top: 1.45rem; padding-top: 1.25rem; }
.result-section h2, dialog h2 { font-size: clamp(1.35rem, 4vw, 1.8rem); letter-spacing: -0.05em; line-height: 1.12; }
.share { text-align: center; }
.share-actions, .share-secondary { display: flex; justify-content: center; }
.share-actions { flex-wrap: wrap; gap: clamp(4px, 1.6vw, 10px); margin: 0.75rem calc(6px - var(--result-padding)) 0; }
.share-actions .button { flex: 0 0 44px; min-height: 44px; padding: 0; }
.share-secondary .button { min-width: 2.75rem; min-height: 2.75rem; }
.share-actions a { background: #f5ecdd; }
.share-icon { width: 21px; height: 21px; flex: none; }
.share-actions button:disabled { background: #f4f0e6; border-color: #a79f8c; color: var(--muted); cursor: default; }
.share-note, .external-note, .comparison-date { color: var(--muted); font-size: 0.875rem; line-height: 1.45; margin-top: 0.45rem; }
.share-secondary { margin-top: 0.5rem; }
.button.copy { border-color: transparent; background: transparent; text-decoration: underline; text-underline-offset: 0.18em; }
.share-status:not(:empty) { margin-top: 0.6rem; color: var(--muted); }
#manual-copy { margin-top: 0.65rem; }
#share-text { display: block; width: 100%; margin-top: 0.35rem; padding: 0.5rem; border: 1px solid var(--line); border-radius: 0.35rem; background: white; color: var(--ink); }
.comparison-state { margin-top: 0.65rem; color: var(--muted); }
.comparison-metrics { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin-top: 0.65rem; }
.distribution { list-style: none; padding: 0; margin: 0.65rem 0 0; font-variant-numeric: tabular-nums; }
.distribution li {
  display: grid;
  grid-template-columns: 2rem minmax(1.5rem, 1fr) auto 2.25rem;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.35rem;
}
.distribution .your-score { background: #eee7d8; border-radius: 0.35rem; }
.distribution meter { width: 100%; height: 0.95rem; accent-color: var(--green); }
.distribution .you-label { color: var(--accent); }
.availability { padding: clamp(1rem, 4vw, 2.25rem); }
.availability p + p, .availability button { margin-top: 0.85rem; }
.request-error:not(:empty) { margin-top: 0.75rem; color: var(--red); }
.discover ul { padding: 0; margin-top: 0.7rem; list-style: none; border-top: 1px solid var(--line); }
.discover li { padding-top: 0.65rem; line-height: 1.4; }
.discover li + li { margin-top: 0.65rem; border-top: 1px solid var(--line); }
.discover li a { color: var(--accent); font-weight: 750; text-underline-offset: 0.18em; overflow-wrap: anywhere; }
.reddit-label { color: var(--muted); font-size: 0.875em; }
.discover li p { margin-top: 0.2rem; color: var(--muted); }
.daily-notice:not(:empty) { margin-top: 1.2rem; color: var(--muted); font-size: 0.875rem; line-height: 1.45; }
.daily-notice .button { margin-top: 0.45rem; font-size: 1rem; }
#countdown { font-variant-numeric: tabular-nums; }
.site-footer a, .legal-page a, .masthead > a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}
.site-footer a, .masthead > a {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 0.875rem;
}

.legal-page {
  width: min(100%, 44rem);
  margin: clamp(1.25rem, 5vw, 3rem) auto;
  padding: clamp(1rem, 5vw, 2.5rem);
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.legal-page h1 { line-height: 1.05; }
.legal-page h2 { margin-block: 1.45rem 0.5rem; font-size: 1.25rem; line-height: 1.25; }
.legal-page p { margin-block-start: 0.75rem; }
.legal-page .legal-date { color: var(--muted); }
.privacy-note { flex-basis: 100%; text-align: center; color: var(--muted); font-size: 0.875rem; }
#privacy-form label { display: block; margin-block: 0.5rem; }
#privacy-form a { color: var(--accent); }

dialog { width: min(100% - 2rem, 27rem); max-height: calc(100% - 2rem); padding: 1.25rem; border: 1px solid var(--ink); border-radius: 0.9rem; background: var(--paper); color: var(--ink); }
dialog::backdrop { background: #25211b70; }
dialog h3 { margin: 1rem 0 0; font-size: 1rem; }
dialog p { margin-block: 0.65rem; line-height: 1.45; }
dialog form { margin-top: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 350px) {
  .intro-art { display: none; }
}

@media (min-width: 36rem) {
  .masthead { min-height: 5.25rem; }
  #community-name { display: block; align-content: center; min-height: 9rem; }
  #community-name .prefix { margin: 0 0.14em 0 0; vertical-align: 0.09em; }
  .unlock-note { order: 0; flex: 1 1 13rem; text-align: center; }
  .result-art { position: absolute; display: block; inset-inline-end: 0.25rem; bottom: 0.35rem; width: min(21%, 8rem); height: auto; }
}
