/* The web Rewind (/play). Layered on landing.css: its era pigments, fonts, .era ground and
   texture, .cta and footer. The governing rule holds here too — the era lives on the ground,
   the chrome and the badges; the question and its answers are the system face on a flat panel.
   Type is in rem so a browser's own text-size setting scales it (landing.css's px would not). */

/* The app's correctness pair per era (App/Decadia/Design/EraTheme.swift), never the era accents:
   in the 1970s those are two browns. */
[data-era="1960s"] { --correct:#2F5E1E; --wrong:#9A2408; --correct-fill:#E7F0DF; --wrong-fill:#FAE5DA; }
[data-era="1970s"] { --correct:#3D5A12; --wrong:#8C2A08; --correct-fill:#EDE7C6; --wrong-fill:#F6DFCE; }
[data-era="1980s"] { --correct:#7CE7F4; --wrong:#FF5FD2; --correct-fill:#123A46; --wrong-fill:#3E1235; }
[data-era="1990s"] { --correct:#3FE6CA; --wrong:#FF74B8; --correct-fill:#073A33; --wrong-fill:#3A1030; }
[data-era="2000s"] { --correct:#74E8CC; --wrong:#FF9BAF; --correct-fill:#0A3A47; --wrong-fill:#38182E; }

/* ---- The stage: the era ground, anchored at the top so nothing jumps between questions ---- */
.era.play {
  min-height: 100svh; align-content: start;
  padding: 0 20px clamp(40px, 8vh, 96px);
  font-size: 1.125rem;
}
.era.play::after { content: none; }

.bar { max-width: 40rem; width: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding: 18px 0 clamp(18px, 4vh, 40px); }
.bar__mark { font-family: var(--display); font-size: 1.125rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--primary); text-decoration: none;
  text-shadow: 0 0 calc(var(--glow) * 12px) color-mix(in srgb, var(--primary) 55%, transparent); }
.bar nav { display: flex; gap: 20px; }
.bar nav a { color: var(--muted); text-decoration: none; font-size: .9375rem; }
.bar nav a:hover { color: var(--ink); text-decoration: underline; }

/* ---- The capsule: flat, solid, no texture behind anything a player reads --------------- */
.capsule {
  max-width: 40rem; width: 100%; margin: 0 auto;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--border); border-radius: 28px;
  padding: clamp(20px, 5vw, 40px);
  box-shadow: 0 30px 60px -34px rgba(0,0,0,.55), 0 0 0 calc(var(--glow) * 1px) color-mix(in srgb, var(--primary) 30%, transparent);
}
.capsule:focus { outline: none; }
.capsule p { margin: 0 0 14px; max-width: none; color: var(--ink); }

.challenge { font-weight: 600; }
.capsule .day { font-family: var(--display); font-weight: 400; font-size: clamp(1.375rem, 4.4vw, 2rem); line-height: 1.15;
  letter-spacing: .03em; text-transform: uppercase; color: var(--primary); margin: 0 0 16px; text-wrap: balance; }
.day__num, .day__date { display: block; }
.day__date { font-family: var(--body); text-transform: none; letter-spacing: normal; font-size: .62em; font-weight: 600;
  color: var(--ink); margin-top: 6px; }
/* Once the game is underway the day line steps back to a label: the question is the headline. */
.capsule:not([data-state="start"]) .day { font-size: .9375rem; letter-spacing: .12em; color: var(--muted); margin-bottom: 18px; }
/* A wrapping row, not inline text with a separator: it can never end a line on a dangling "·". */
.capsule:not([data-state="start"]) .day { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .6em; row-gap: 2px; }
.capsule:not([data-state="start"]) .day__date { font-size: 1em; color: var(--muted); font-weight: 400; }
.capsule p.eyebrow { font-family: var(--display); font-size: .8125rem; letter-spacing: .22em; text-transform: uppercase;
  color: var(--secondary); margin: 0 0 6px; }

.capsule h2, .capsule h1 { text-shadow: none; }
.capsule h2 { font-family: var(--body); text-transform: none; letter-spacing: normal; color: var(--ink); }
.capsule .pitch { font-size: clamp(1.25rem, 3.4vw, 1.5rem); line-height: 1.4; font-weight: 400; margin: 0 0 24px; }
.capsule p.quiet { color: var(--muted); font-size: 1rem; }
.capsule p.quiet:last-child { margin-bottom: 0; }

/* ---- Buttons ----------------------------------------------------------------------------- */
.capsule button { font: inherit; cursor: pointer; }
.capsule .cta { border: 0; min-height: 52px; justify-content: center; margin: 0; }
.capsule .cta--go { font-size: 1.25rem; min-width: 12rem; padding: 18px 40px; margin: 0 0 22px; }
.cta:disabled { opacity: .5; cursor: default; }
.cta--quiet, .cta--ghost { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); }
[data-era="1970s"] .cta--quiet, [data-era="1970s"] .cta--ghost { color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.capsule button:focus-visible, .capsule a:focus-visible, .bar a:focus-visible, .foot a:focus-visible {
  outline: 3px solid var(--secondary); outline-offset: 3px; }

/* ---- The question ------------------------------------------------------------------------ */
.qhead { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 14px; }
.capsule p.progress { margin: 0; font-size: 1rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
/* The decade badge: the one era face on this screen, in chrome, never on the question. */
.capsule p.chip { margin: 0; font-family: var(--display); font-size: .875rem; letter-spacing: .14em; text-transform: none;
  color: var(--secondary); padding: 6px 14px; border-radius: 999px; border: 1.5px solid currentColor; line-height: 1.2; }

.capsule h2.stem { font-family: var(--body); font-weight: 600; font-size: clamp(1.3125rem, 1.2vw + 1rem, 1.875rem); line-height: 1.32;
  letter-spacing: -.005em; color: var(--ink); margin: 0 0 24px; text-wrap: pretty; }

.options { display: grid; gap: 12px; }
.capsule .option {
  display: flex; align-items: baseline; gap: 14px; width: 100%; min-height: 56px;
  padding: 16px 18px; text-align: left; color: var(--ink);
  background: var(--panel); border: 1.5px solid var(--border); border-radius: 18px;
  font-family: var(--body); font-size: clamp(1.125rem, .5vw + 1rem, 1.3125rem); line-height: 1.35;
}
/* Transitions only INTO a marked state: clearing the marks for the next question must be instant,
   or the last reveal's colours fade across into a new question (and a new era). */
.capsule .option[data-state] { transition: border-color .2s ease, background-color .2s ease, opacity .2s ease; }
.option__letter { flex: none; min-width: 1.25em; font-weight: 700; font-size: .875em; color: var(--faint); }
.option__text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.option__mark { flex: none; align-self: center; display: inline-flex; }
.option__mark svg { width: 1.5rem; height: 1.5rem; display: block; }
.option:not(:disabled):hover { border-color: var(--primary); }
.option:disabled { cursor: default; }
.option[data-state="chosen"] { border-color: var(--primary); border-width: 2px; }
.option[data-state="correct"] { background: var(--correct-fill); border: 2px solid var(--correct); }
.option[data-state="wrong"] { background: var(--wrong-fill); border: 2px solid var(--wrong); }
.option[data-state="correct"] .option__letter, .option[data-state="correct"] .option__mark { color: var(--correct); }
.option[data-state="wrong"] .option__letter, .option[data-state="wrong"] .option__mark { color: var(--wrong); }
.option[data-state="dimmed"] { opacity: .5; }

.after { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-top: 18px; min-height: 52px; }
.capsule p.feedback { margin: 0; flex: 1 1 14rem; font-size: 1.125rem; font-weight: 600; }
.after .cta { flex: 0 0 auto; }

/* ---- The result -------------------------------------------------------------------------- */
.capsule h2.score { font-family: var(--figures); font-size: clamp(3.25rem, 11vw, 5rem); line-height: 1; margin: 0 0 22px; color: var(--primary);
  text-shadow: 0 0 calc(var(--glow) * 18px) color-mix(in srgb, var(--primary) 50%, transparent); }
.capsule h2.score:focus { outline: none; }
.rows { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 14px; }
.row__label { font-family: var(--display); font-size: .9375rem; letter-spacing: .1em; color: var(--muted); min-width: 3.2em; }
.row__marks { display: flex; gap: 6px; flex-wrap: wrap; }
/* Right is a filled square with a tick, wrong a hollow one: shape first, colour second. */
.mark { width: 1.75rem; height: 1.75rem; border-radius: 6px; display: inline-grid; place-items: center; }
.mark--hit { background: var(--primary); color: var(--on-accent); }
.mark--miss { border: 2px solid var(--faint); }
.mark svg { width: 1.1rem; height: 1.1rem; }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 18px; }
.capsule p.share__status { margin: 0; font-weight: 600; }
.share__text { white-space: pre-wrap; font: .9375rem/1.5 var(--body); background: transparent; border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 14px; margin: 0 0 18px; user-select: all; }
.get { border-top: 1px solid var(--border); padding-top: 22px; margin: 8px 0 22px; }
.get .cta { margin-top: 4px; }

/* ---- Motion: a small settle on each new card, and nothing at all under reduced motion ---- */
.settle { animation: settle .32s ease-out both; }
@keyframes settle { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .settle { animation: none; }
  .capsule .option[data-state] { transition: none; }
}

/* ---- Narrow screens: 320px keeps the full-width answers ---------------------------------- */
@media (max-width: 380px) {
  .era.play { padding-left: 12px; padding-right: 12px; }
  .capsule { padding: 18px 16px; border-radius: 22px; }
  .option { padding: 14px 14px; gap: 10px; }
  .after .cta, .share .cta { flex: 1 1 100%; }
}

/* Read by a screen reader, not shown: the outcome spoken on each revealed answer. */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* The footer lines up with the capsule rather than the landing page's wider column. */
.foot__inner { max-width: 40rem; }
