/*
 * FESTIVUS WEEKEND TRIVIA (Phase 9A) -- the Home card, the Games tile, the
 * screens at #/weekend-trivia and the Admin Console area.
 *
 * Linked by index.html (the Home card and the Games tile need it on boot).
 * NOT a casino sheet: nothing here styles the casino lobby.
 *
 * ONLY TOKENS THAT ALREADY EXIST (app.css, game.css, phase6.css) -- no new
 * custom property is defined here. Difficulty tones: EASY --pine, MEDIUM
 * --gold, HARD --fire, CHAOS --holly; every one of them ALSO carries a glyph
 * (● ◆ ▲ ✸) and a word, so no state is colour alone. Correct is ✓ + a thick
 * edge, incorrect ✕ + a dashed edge, selected ● SELECTED + an inset ring.
 *
 * Phone first: 320 px and up with no horizontal page scroll (every row wraps,
 * every text breaks, nothing has a fixed pixel width); tap targets >= 44 px
 * (the choice buttons >= 48 px, full width). 768 px+ widens the page into two
 * columns for the board and the badges. Reduced motion: nothing moves.
 */

.wt {
  display: grid;
  gap: var(--sp-4);
  min-width: 0;
  overflow-wrap: anywhere;
}

.wt-head {
  display: grid;
  gap: var(--sp-1);
}

.wt-head__kicker {
  margin: 0;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

.wt-head__title {
  margin: 0;
  font-size: var(--fs-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--gold);
}

.wt-head__sub {
  margin: 0;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.wt-glyph {
  display: inline-block;
  min-inline-size: 1.2em;
  margin-inline-end: var(--sp-1);
  text-align: center;
}

/* ---- PILOT — REWARDS ARE NOT LIVE --------------------------------------------- */

.wt-pilot {
  padding: var(--sp-3) var(--sp-4);
  border: 2px dashed var(--warn);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
}

.wt-pilot__title {
  display: block;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--warn);
}

.wt-pilot__text {
  margin: var(--sp-1) 0 0;
  font-size: var(--fs-small);
  color: var(--text-dim);
}

/* ---- sections --------------------------------------------------------------------- */

.wt-section {
  display: grid;
  gap: var(--sp-2);
  min-width: 0;
  padding: var(--sp-4);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.wt-section__title {
  margin: 0;
  font-size: var(--fs-eyebrow);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-dim);
}

.wt-note {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--text-dim);
}

.wt-note--offline,
.wt-note--short {
  font-weight: 700;
  color: var(--warn);
}

.wt-error {
  margin: 0;
  padding: var(--sp-2) var(--sp-3);
  border-inline-start: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
  color: var(--text);
  font-weight: 600;
}

.wt-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-block-size: var(--tap);
  inline-size: 100%;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.wt-cta.is-disabled,
.wt-cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.wt-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-block-size: 44px;
  text-decoration: none;
}

/* ---- the state panels (not started / overnight / paused / settled / closed) ---- */

.wt-section--state {
  border-style: dashed;
}

.wt-state__headline {
  display: block;
  font-size: var(--fs-title);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--metal);
}

.wt-state__text {
  margin: 0;
  color: var(--text-dim);
}

/* ---- the current round ------------------------------------------------------- */

.wt-round__kicker {
  margin: 0;
  font-size: var(--fs-eyebrow);
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--text-faint);
}

.wt-round__topic {
  margin: 0;
  font-size: var(--fs-title);
  font-weight: 800;
  color: var(--text);
}

.wt-round__by {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--text-dim);
}

.wt-round__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-3);
  margin: 0;
  font-size: var(--fs-small);
  font-weight: 700;
}

.wt-round__fp {
  color: var(--gold);
}

.wt-round__done {
  display: block;
  font-weight: 800;
  color: var(--accent);
}

.wt-timer {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--metal);
}

.wt-timer[data-wt-timer="past"] {
  font-family: var(--font);
  color: var(--warn);
}

/* ---- the EASY / MEDIUM / HARD / CHAOS progression ----------------------------- */

.wt-pips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--sp-2);
}

.wt-pips__group {
  display: grid;
  gap: var(--sp-1);
  min-width: 0;
  padding: var(--sp-2);
  border: 1px solid var(--line-soft);
  border-inline-start-width: 4px;
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
}

.wt-pips__label {
  font-size: var(--fs-eyebrow);
  font-weight: 800;
  letter-spacing: 0.1em;
}

.wt-pips__list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}

.wt-pip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 1.6em;
  block-size: 1.6em;
  border: 2px solid var(--line);
  border-radius: 50%;
  font-size: var(--fs-small);
  font-weight: 800;
  color: var(--text-faint);
}

.wt-pip--correct {
  border-color: var(--accent);
  color: var(--accent);
}

.wt-pip--incorrect {
  border-style: dashed;
  border-color: var(--danger);
  color: var(--danger);
}

.wt-pips__count {
  font-family: var(--mono);
  font-size: var(--fs-small);
  color: var(--text-dim);
}

.wt-diff--easy { border-inline-start-color: var(--pine); }
.wt-diff--medium { border-inline-start-color: var(--gold); }
.wt-diff--hard { border-inline-start-color: var(--fire); }
.wt-diff--chaos { border-inline-start-color: var(--holly); }

.wt-diff--easy .wt-pips__label,
.wt-question.wt-diff--easy .wt-question__section,
.wt-review__diff.wt-diff--easy { color: var(--pine); }
.wt-diff--medium .wt-pips__label,
.wt-question.wt-diff--medium .wt-question__section,
.wt-review__diff.wt-diff--medium { color: var(--gold); }
.wt-diff--hard .wt-pips__label,
.wt-question.wt-diff--hard .wt-question__section,
.wt-review__diff.wt-diff--hard { color: var(--fire); }
.wt-diff--chaos .wt-pips__label,
.wt-question.wt-diff--chaos .wt-question__section,
.wt-review__diff.wt-diff--chaos { color: var(--holly); }

/* ---- NEXT TOPIC WANTED (prominent) and GENERATING ------------------------------- */

.wt-section--topic {
  border: 2px solid var(--gold);
  background: var(--bg-elev-2);
}

.wt-topic__headline {
  margin: 0;
  font-size: var(--fs-title);
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--gold);
}

.wt-topic__reward {
  margin: 0;
  font-size: var(--fs-display);
  font-weight: 900;
  color: var(--text);
}

.wt-topic__line {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--metal);
}

.wt-section--generating {
  border: 2px solid var(--accent-dim);
}

.wt-gen__headline {
  margin: 0;
  font-size: var(--fs-small);
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.wt-gen__topic {
  margin: 0;
  font-size: var(--fs-title);
  font-weight: 900;
  color: var(--accent);
}

.wt-gen__line {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.wt-shimmer {
  block-size: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bg-elev-2) 0%, var(--accent-dim) 50%, var(--bg-elev-2) 100%);
  background-size: 200% 100%;
  animation: wt-shimmer 1.6s ease-in-out 0s 270 both;
}

@keyframes wt-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

/* ---- the topic form ------------------------------------------------------------- */

.wt-form {
  display: grid;
  gap: var(--sp-3);
}

.wt-field {
  display: grid;
  gap: var(--sp-1);
  min-width: 0;
}

.wt-input {
  inline-size: 100%;
  min-block-size: var(--tap);
  box-sizing: border-box;
}

.wt-field__hint,
.wt-examples {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--text-faint);
}

/* ---- one question at a time ------------------------------------------------------ */

.wt-question,
.wt-result {
  border-inline-start-width: 6px;
}

.wt-question__section {
  margin: 0;
  font-size: var(--fs-eyebrow);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.wt-question__num {
  margin: 0;
  font-size: var(--fs-small);
  color: var(--text-faint);
}

.wt-question__prompt {
  margin: 0;
  font-size: var(--fs-lead);
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
}

.wt-choices {
  display: grid;
  gap: var(--sp-2);
}

.wt-choice {
  display: grid;
  grid-template-columns: 2em minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-1) var(--sp-2);
  inline-size: 100%;
  min-block-size: 3.25rem;
  padding: var(--sp-2) var(--sp-3);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-body);
  text-align: start;
  cursor: pointer;
}

.wt-choice:disabled {
  cursor: progress;
  opacity: 0.7;
}

.wt-choice.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 3px var(--accent);
}

.wt-choice__letter {
  font-family: var(--mono);
  font-weight: 800;
  color: var(--text-dim);
}

.wt-choice__mark {
  grid-column: 2;
  font-size: var(--fs-eyebrow);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.wt-choice__mark:empty {
  display: none;
}

.wt-choice:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- the result ------------------------------------------------------------------ */

.wt-result__verdict {
  display: block;
  font-size: var(--fs-display);
  font-weight: 900;
  letter-spacing: 0.04em;
}

.wt-result.is-correct .wt-result__verdict { color: var(--accent); }
.wt-result.is-incorrect .wt-result__verdict { color: var(--danger); }

.wt-result__fp {
  margin: 0;
  font-size: var(--fs-title);
  font-weight: 800;
  color: var(--gold);
}

.wt-result__explain {
  margin: 0;
  color: var(--text-dim);
  line-height: 1.45;
}

.wt-revealed {
  display: grid;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.wt-revealed__row {
  display: grid;
  grid-template-columns: 2em minmax(0, 1fr);
  gap: var(--sp-1) var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 2px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.wt-revealed__row.is-right {
  border-width: 3px;
  border-color: var(--accent);
}

.wt-revealed__row.is-wrong {
  border-style: dashed;
  border-color: var(--danger);
}

.wt-revealed__tag {
  grid-column: 2;
  font-size: var(--fs-eyebrow);
  font-weight: 900;
  letter-spacing: 0.08em;
}

.is-right .wt-revealed__tag { color: var(--accent); }
.is-wrong .wt-revealed__tag { color: var(--danger); }

.wt-notice {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--warn);
  border-radius: var(--radius);
  background: var(--bg-elev-2);
  font-weight: 700;
}

/* ---- review, board, badges, history, podium -------------------------------------- */

.wt-review,
.wt-board,
.wt-badges,
.wt-history,
.wt-podium {
  display: grid;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.wt-review__row {
  display: grid;
  gap: var(--sp-1);
  padding: var(--sp-2) 0;
  border-block-end: 1px solid var(--line-soft);
}

.wt-review__diff,
.wt-review__verdict {
  font-size: var(--fs-eyebrow);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.wt-review__prompt,
.wt-review__answer,
.wt-review__explain {
  margin: 0;
  font-size: var(--fs-small);
}

.wt-review__explain {
  color: var(--text-dim);
}

.wt-board__row {
  display: grid;
  grid-template-columns: 2.75em minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-1) var(--sp-2);
  min-block-size: 44px;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
}

.wt-board__row.is-me {
  box-shadow: inset 0 0 0 2px var(--accent);
  font-weight: 800;
}

.wt-board__rank {
  font-family: var(--mono);
  color: var(--text-dim);
}

.wt-board__fp,
.wt-board__total {
  font-family: var(--mono);
  font-weight: 800;
  color: var(--gold);
  text-align: end;
}

.wt-board--frozen .wt-board__podium,
.wt-board--frozen .wt-board__total {
  grid-column: 2 / -1;
  font-size: var(--fs-small);
  text-align: start;
}

/* A wrapping row, not a two-column grid: a long progress text ("5/10 correct in one round") once squeezed the
   name column until "PERFECT ROUND" broke letter by letter at 390 px. Now the progress drops to its own line. */
.wt-badge {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-1) var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
}

.wt-badge.is-earned {
  border-color: var(--accent-dim);
}

.wt-badge__name {
  flex: 1 1 12rem;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.wt-badge__count {
  flex: 0 1 auto;
  margin-left: auto;
  text-align: right;
  font-family: var(--mono);
  font-weight: 700;
  color: var(--metal);
}

.wt-badge__reward {
  flex-basis: 100%;
  font-size: var(--fs-small);
  color: var(--text-dim);
}

.wt-history__row {
  display: grid;
  gap: var(--sp-1);
  padding: var(--sp-2) 0;
  border-block-end: 1px solid var(--line-soft);
}

.wt-history__link {
  display: inline-flex;
  align-items: center;
  min-block-size: 44px;
  font-weight: 800;
  color: var(--accent);
}

.wt-history__by,
.wt-history__mine {
  font-size: var(--fs-small);
  color: var(--text-dim);
}

.wt-podium__place {
  display: grid;
  gap: var(--sp-1);
  padding: var(--sp-3);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev-2);
}

.wt-podium__place--1 { border-color: var(--gold); border-width: 3px; }
.wt-podium__place--2 { border-color: var(--metal); }
.wt-podium__place--3 { border-color: var(--fire); border-style: dashed; }

.wt-podium__label {
  font-size: var(--fs-title);
  font-weight: 900;
  color: var(--gold);
}

.wt-podium__name {
  font-size: var(--fs-lead);
  font-weight: 800;
}

.wt-podium__line {
  font-size: var(--fs-small);
  color: var(--text-dim);
}

.wt-podium__total {
  font-weight: 900;
  color: var(--text);
}

/* ---- the Home card and the Games tile: THE MARQUEE ENTRANCE (9A.2) ----------------- */
/*
 * As prominent as the Festivus Casino's card, with its OWN identity: a
 * midnight game-show stage, glowing question tiles, a gold star and an AI
 * sparkle -- never chips, cards or a wheel. The stage colours are literal
 * (the card is the same dark stage in either theme); every size is a token.
 * Motion: ONE shine sweep when the card appears (never looping); under
 * reduced motion nothing moves. Phone first: the art and the words share a
 * row, everything else spans the card; nothing has a fixed pixel width.
 */

.wt-card-host {
  margin-block: var(--sp-3);
  min-width: 0;
}

.wt-card {
  display: grid;
  gap: var(--sp-1);
  min-block-size: var(--tap);
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.wt-marquee {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-2) var(--sp-3);
  padding: var(--sp-4) var(--sp-3) var(--sp-3);
  border: 2px solid rgb(94 234 212);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 70% at 50% -10%, rgb(124 92 255 / 0.55), transparent 62%),
    radial-gradient(70% 60% at 100% 100%, rgb(219 39 119 / 0.38), transparent 70%),
    radial-gradient(60% 60% at 0% 100%, rgb(20 184 166 / 0.3), transparent 70%),
    rgb(17 12 48);
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.08), 0 8px 22px rgb(30 16 90 / 0.45), inset 0 0 28px rgb(94 234 212 / 0.16);
  color: rgb(244 243 255);
}

.wt-marquee__lights {
  position: absolute;
  inset: 0 0 auto;
  block-size: var(--sp-2);
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgb(250 204 21) 0 2px, transparent 2.5px) 0 50% / 18px 100% repeat-x,
    radial-gradient(circle at center, rgb(94 234 212) 0 2px, transparent 2.5px) 9px 50% / 18px 100% repeat-x;
  opacity: 0.9;
}

.wt-marquee__shine {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgb(255 255 255 / 0.16) 50%, transparent 60%) 160% 0 / 260% 100% no-repeat;
  animation: wt-marquee-shine 2400ms ease-out 400ms 1 both;
}

@keyframes wt-marquee-shine {
  from { background-position: 160% 0; }
  to { background-position: -60% 0; }
}

.wt-marquee__art {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-1);
  inline-size: clamp(4.25rem, 21vw, 6rem);
  aspect-ratio: 1;
  transform: rotate(-4deg);
}

.wt-marquee__tile {
  display: grid;
  place-items: center;
  border: 1px solid rgb(165 180 252);
  border-radius: var(--sp-1);
  background: linear-gradient(180deg, rgb(79 70 229), rgb(30 27 75));
  box-shadow: 0 0 8px rgb(129 140 248 / 0.65), inset 0 1px 0 rgb(255 255 255 / 0.25);
  color: rgb(255 255 255);
  font-size: var(--fs-small);
  font-weight: 900;
  line-height: 1;
}

.wt-marquee__tile--star {
  border-color: rgb(253 230 138);
  background: linear-gradient(180deg, rgb(253 224 71), rgb(202 138 4));
  box-shadow: 0 0 10px rgb(250 204 21 / 0.8);
  color: rgb(66 32 6);
}

.wt-marquee__tile--spark {
  border-color: rgb(153 246 228);
  background: linear-gradient(180deg, rgb(45 212 191), rgb(15 118 110));
  box-shadow: 0 0 10px rgb(94 234 212 / 0.85);
  color: rgb(240 253 250);
}

.wt-marquee__words {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.wt-marquee__kicker {
  font-size: var(--fs-eyebrow);
  font-weight: 800;
  letter-spacing: 0.38em;
  color: rgb(94 234 212);
}

.wt-marquee__title {
  font-size: clamp(1.45rem, 7.4vw, 2.2rem);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 1.02;
  color: rgb(255 255 255);
  background: linear-gradient(180deg, rgb(255 255 255), rgb(199 210 254) 55%, rgb(250 204 21));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 rgb(0 0 0 / 0.55)) drop-shadow(0 0 10px rgb(124 92 255 / 0.55));
  overflow-wrap: normal;
}

.wt-marquee__tag {
  font-size: var(--fs-small);
  font-weight: 800;
  letter-spacing: 0.12em;
  color: rgb(253 224 71);
}

.wt-marquee__board {
  grid-column: 1 / -1;
  display: grid;
  gap: 2px;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid rgb(94 234 212 / 0.55);
  border-radius: var(--radius-sm);
  background: rgb(0 0 0 / 0.38);
  min-width: 0;
}

.wt-marquee__status {
  font-size: var(--fs-lead);
  font-weight: 900;
  letter-spacing: 0.04em;
  color: rgb(255 255 255);
}

.wt-marquee__detail {
  font-size: var(--fs-small);
  font-weight: 700;
  color: rgb(199 210 254);
}

.wt-marquee__pilot {
  grid-column: 1 / -1;
  padding: var(--sp-2) var(--sp-3);
  border: 2px dashed rgb(120 53 15);
  border-radius: var(--radius-sm);
  background: rgb(251 191 36);
  color: rgb(28 20 0);
  font-size: var(--fs-small);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
}

.wt-marquee__teaser {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.wt-marquee__stat {
  flex: 1 1 8rem;
  padding: var(--sp-1) var(--sp-2);
  border: 1px solid rgb(253 224 71 / 0.6);
  border-radius: 999px;
  background: rgb(250 204 21 / 0.12);
  color: rgb(253 230 138);
  font-size: var(--fs-small);
  font-weight: 800;
  text-align: center;
}

.wt-marquee__cta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-block-size: var(--tap);
  padding: 0 var(--sp-4);
  border: 1px solid rgb(204 251 241);
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(153 246 228), rgb(45 212 191) 50%, rgb(13 148 136));
  box-shadow: 0 2px 0 rgb(0 0 0 / 0.5), 0 0 14px rgb(94 234 212 / 0.45);
  color: rgb(4 47 46);
  font-size: var(--fs-body);
  font-weight: 900;
  letter-spacing: 0.1em;
  text-align: center;
}

.wt-marquee:focus-visible {
  outline: 3px solid rgb(253 224 71);
  outline-offset: 2px;
}

.wt-marquee:active .wt-marquee__cta { transform: scale(0.98); }

/* 768 px and up: the art grows with the card; the words never stretch past a comfortable line. */
@media (min-width: 768px) {
  .wt-marquee {
    padding: var(--sp-5) var(--sp-5) var(--sp-4);
    column-gap: var(--sp-5);
  }
  .wt-marquee__art { inline-size: 6.5rem; }
}

/* ---- 9A.2: the first-entry notification prompt (a card, never a dialog; never inert) ---- */

.wt-notify {
  display: grid;
  gap: var(--sp-2);
  padding: var(--sp-4);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-elev-2);
  color: var(--text);
  min-width: 0;
}

.wt-notify__title {
  margin: 0;
  font-size: var(--fs-title);
  font-weight: 900;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.wt-notify__text {
  margin: 0;
  font-size: var(--fs-body);
  color: var(--text-dim);
}

.wt-notify__list {
  margin: 0;
  padding-inline-start: var(--sp-5);
  display: grid;
  gap: var(--sp-1);
  font-size: var(--fs-body);
  font-weight: 700;
}

.wt-notify__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.wt-notify__btn {
  flex: 1 1 10rem;
  min-block-size: var(--tap);
}

.wt-notify__result {
  margin: 0;
  font-size: var(--fs-lead);
  font-weight: 800;
}

.wt-notify__result--ok { color: var(--accent); }
.wt-notify__result--warn { color: var(--warn); }

/* ---- the badge celebration (a card, never a dialog; never inert) ------------------ */

.wt-celebrate {
  position: fixed;
  inset-inline: var(--gutter);
  inset-block-end: calc(var(--shell-nav-space) + var(--sp-3));
  z-index: 60;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--sp-3);
  max-inline-size: 28rem;
  margin-inline: auto;
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  background: var(--bg-elev-2);
  color: var(--text);
  cursor: pointer;
}

.wt-celebrate--gt { border-color: var(--gold); }
.wt-celebrate--arsenal { border-color: var(--accent); }

.wt-celebrate__glyph {
  font-size: var(--fs-display);
}

.wt-celebrate__eyebrow {
  margin: 0;
  font-size: var(--fs-eyebrow);
  font-weight: 900;
  letter-spacing: 0.12em;
  color: var(--gold);
}

.wt-celebrate__title {
  margin: 0;
  font-weight: 900;
}

.wt-celebrate__line {
  margin: 0;
  font-size: var(--fs-small);
  font-weight: 700;
  color: var(--accent);
}

.wt-celebrate--pop {
  animation: wt-pop var(--motion-base) var(--ease) both;
}

@keyframes wt-pop {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

/* ---- the Admin area ------------------------------------------------------------------ */

.wta__ai {
  display: block;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.wta__ai.is-ready { color: var(--accent); }
.wta__ai.is-down { color: var(--danger); }

.wta__event-head {
  margin: 0;
  font-weight: 800;
}

.wta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.wta__form,
.wta__confirm,
.wta__add {
  display: grid;
  gap: var(--sp-2);
  min-width: 0;
}

.wta__reason {
  inline-size: 100%;
  box-sizing: border-box;
}

.wta__warning {
  font-weight: 700;
  color: var(--warn);
}

.wta__row {
  flex-wrap: wrap;
}

/* 9A.1: the pilot roster -- long names wrap inside the row, every control stays a full-size tap target. */
.wta__pilot-name {
  flex: 1 1 10rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* 9A.2: the family-readiness line above the settings -- a word and a glyph, never colour alone. */
.wta__family-ready {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.wta__family-ready--warn {
  color: var(--warn);
}

.wta__row .btn,
.wta__add .btn,
.wta__add-open,
.wta__add select {
  min-block-size: 44px;
}

.wta__add select {
  inline-size: 100%;
  max-inline-size: 100%;
  box-sizing: border-box;
}

/* ---- wider screens ------------------------------------------------------------------- */

@media (min-width: 768px) {
  .wt-pips {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .wt-cta {
    inline-size: auto;
    justify-self: start;
    padding-inline: var(--sp-6);
  }

  .wt-podium {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wt-badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .wt *,
  .wt-celebrate,
  .wt-shimmer,
  .wt-marquee *,
  .wt-notify * {
    animation: none !important;
    transition: none !important;
  }
}

/* ---- 9A.5: FAMILY ANSWERS under each reviewed question (collapsed by default) ---- */

.wt-review__mine {
  margin: 0;
  font-size: var(--fs-small);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.wt-fam {
  display: grid;
  gap: var(--sp-1);
  margin-block-start: var(--sp-1);
  padding: var(--sp-2);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-elev-2);
  min-inline-size: 0;
}

.wt-fam__title,
.wt-fam__head {
  margin: 0;
  font-size: var(--fs-eyebrow);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.wt-fam__summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-3);
  margin: 0;
  font-size: var(--fs-small);
}

.wt-fam__toggle,
.wt-fam__all {
  justify-self: start;
  max-inline-size: 100%;
  min-block-size: 44px;
  white-space: normal;
}

.wt-fam__body {
  display: grid;
  gap: var(--sp-2);
  padding-block-start: var(--sp-1);
  border-block-start: 1px solid var(--line-soft);
}

.wt-fam__body[hidden],
.wt-fam__sub[hidden],
.wt-fam__name[hidden],
.wt-fam__more[hidden] {
  display: none;
}

.wt-fam__group {
  display: grid;
  gap: var(--sp-1);
  min-inline-size: 0;
}

/* Glyph + word carry the meaning; colour only echoes it, and INCORRECT stays neutral (discussion, not shame). */
.wt-fam__group--correct .wt-fam__head { color: var(--accent); }
.wt-fam__group--incorrect .wt-fam__head { color: var(--text); }
.wt-fam__group--unanswered .wt-fam__head { color: var(--text-dim); }

.wt-fam__answer,
.wt-fam__pick,
.wt-fam__none,
.wt-fam__more {
  margin: 0;
  font-size: var(--fs-small);
  overflow-wrap: anywhere;
}

.wt-fam__pick {
  font-weight: 700;
  margin-block-start: var(--sp-1);
}

.wt-fam__none,
.wt-fam__more {
  color: var(--text-dim);
}

.wt-fam__names {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0 0 0 var(--sp-3);
  list-style: none;
  font-size: var(--fs-small);
}

.wt-fam__name {
  overflow-wrap: anywhere;
}

.wt-fam__name.is-you {
  font-weight: 800;
}

/* ==========================================================================
   BADGE UI POLISH: Weekend Trivia badges as a COMPACT PREMIUM MODULE
   ==========================================================================
   The main Festivus Badges screen (.achievement in phase6.css) is the bar:
   an emblem circle, the name, a plain-language description, a rounded
   progress track, the reward as chips, and a stronger EARNED treatment.
   Compact here -- several cards fit a phone screen -- with Weekend Trivia's
   violet/teal accents. Every state is in WORDS (✓ EARNED / IN PROGRESS /
   NOT STARTED); colour only reinforces it. Presentation only.
   ========================================================================== */

.wt-bmod {
  border: 1px solid rgb(124 92 255 / 0.45);
  border-radius: var(--radius-lg);
  padding: var(--sp-3);
  background:
    radial-gradient(90% 60% at 100% 0%, rgb(124 92 255 / 0.16), transparent 70%),
    radial-gradient(70% 60% at 0% 100%, rgb(20 184 166 / 0.12), transparent 70%),
    var(--bg-elev);
}

.wt-bmod .wt-section__title {
  letter-spacing: 0.12em;
}

.wt-bmod__lead {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-small);
  color: var(--text-dim);
}

.wt-bmod__summary {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1) var(--sp-2);
  margin: 0 0 var(--sp-3);
}

.wt-bmod__stat {
  padding: 2px var(--sp-2);
  border: 1px solid rgb(94 234 212 / 0.45);
  border-radius: 999px;
  background: rgb(20 184 166 / 0.10);
  font-size: var(--fs-small);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text);
}

.wt-bcards {
  display: grid;
  gap: var(--sp-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* One mini-card: emblem | body. Overrides the old utility row. */
.wt-badge.wt-bcard {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elev-2);
  min-width: 0;
}

.wt-bcard__emblem {
  display: grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: 50%;
  border: 1px solid rgb(124 92 255 / 0.6);
  background: radial-gradient(circle at 35% 30%, rgb(124 92 255 / 0.45), rgb(30 27 75 / 0.9));
  font-size: 1.35rem;
  line-height: 1;
}

.wt-bcard__body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.wt-bcard__top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 2px var(--sp-2);
  min-width: 0;
}

.wt-badge.wt-bcard .wt-bcard__name {
  flex: 1 1 9rem;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.wt-badge.wt-bcard .wt-bcard__count {
  flex: 0 1 auto;
  margin-left: auto;
  font-family: var(--mono);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  overflow-wrap: anywhere;
  text-align: right;
}

.wt-bcard__desc {
  margin: 0;
  font-size: var(--fs-small);
  line-height: 1.4;
  color: var(--text-dim);
  overflow-wrap: anywhere;
}

/* The track: rounded, thicker than before, filled by a 5% class (CSP: no inline styles). */
.wt-bcard__bar {
  position: relative;
  block-size: 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  overflow: hidden;
}

.wt-bcard__bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgb(124 92 255), rgb(94 234 212));
}

.wt-bcard__bar.is-p0::after { width: 0%; }
.wt-bcard__bar.is-p5::after { width: 5%; }
.wt-bcard__bar.is-p10::after { width: 10%; }
.wt-bcard__bar.is-p15::after { width: 15%; }
.wt-bcard__bar.is-p20::after { width: 20%; }
.wt-bcard__bar.is-p25::after { width: 25%; }
.wt-bcard__bar.is-p30::after { width: 30%; }
.wt-bcard__bar.is-p35::after { width: 35%; }
.wt-bcard__bar.is-p40::after { width: 40%; }
.wt-bcard__bar.is-p45::after { width: 45%; }
.wt-bcard__bar.is-p50::after { width: 50%; }
.wt-bcard__bar.is-p55::after { width: 55%; }
.wt-bcard__bar.is-p60::after { width: 60%; }
.wt-bcard__bar.is-p65::after { width: 65%; }
.wt-bcard__bar.is-p70::after { width: 70%; }
.wt-bcard__bar.is-p75::after { width: 75%; }
.wt-bcard__bar.is-p80::after { width: 80%; }
.wt-bcard__bar.is-p85::after { width: 85%; }
.wt-bcard__bar.is-p90::after { width: 90%; }
.wt-bcard__bar.is-p95::after { width: 95%; }
.wt-bcard__bar.is-p100::after { width: 100%; }

.wt-bcard__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-1) var(--sp-2);
  min-width: 0;
}

.wt-badge.wt-bcard .wt-bcard__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px var(--sp-1);
  flex-basis: auto;
  min-width: 0;
  color: inherit;
}

.wt-bcard__label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.wt-bcard__chip {
  padding: 2px var(--sp-2);
  border: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  font-size: var(--fs-small);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  overflow-wrap: anywhere;
}

.wt-bcard__state {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: rgb(94 234 212);
}

/* IN PROGRESS: active. NOT STARTED: quieter, still readable (never "disabled"). EARNED: the main screen's gold. */
.wt-bcard.is-zero .wt-bcard__emblem {
  opacity: 0.75;
  filter: saturate(0.6);
}

.wt-bcard.is-zero .wt-bcard__state {
  color: var(--text-dim);
}

.wt-badge.wt-bcard.is-earned {
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 14%, var(--bg-elev-2)) 0%, var(--bg-elev-2) 70%);
  border-color: color-mix(in srgb, var(--gold) 50%, var(--line));
}

.wt-bcard.is-earned .wt-bcard__emblem {
  border-color: var(--gold);
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--gold) 55%, transparent), rgb(66 32 6 / 0.9));
  box-shadow: 0 0 10px color-mix(in srgb, var(--gold) 45%, transparent);
}

.wt-badge.wt-bcard.is-earned .wt-bcard__count {
  color: var(--gold);
}

.wt-bcard.is-earned .wt-bcard__bar::after {
  background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 70%, var(--accent)), var(--gold));
}

/* The footer CTA: a full-width pill, at least --tap tall. */
.wt-bmod__all {
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 100%;
  min-block-size: var(--tap);
  margin-top: var(--sp-3);
  border: 1px solid rgb(94 234 212 / 0.7);
  border-radius: 999px;
  background: rgb(20 184 166 / 0.12);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
  white-space: normal;
}

@media (min-width: 768px) {
  .wt-bmod .wt-bcards {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  }
}

/* 088: FESTIVUS SPIRIT + GIMME GIMME -- the card, the status pill, the reserved slot's clock. */
.wt-gimme__spirit { margin: 0; font-weight: 800; letter-spacing: 0.04em; overflow-wrap: anywhere; }
.wt-gimme__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0.75rem 0 0; }
.wt-gimme__name { font-weight: 800; letter-spacing: 0.06em; }
.wt-gimme__status { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; border: 1px solid var(--line); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; }
.wt-gimme__status--available { border-color: var(--accent); color: var(--accent); }
.wt-gimme__status--used, .wt-gimme__status--expired, .wt-gimme__status--none { opacity: 0.8; }
.wt-gimme__line { margin: 0.35rem 0 0; overflow-wrap: anywhere; }
.wt-gimme__why { margin-top: 0.5rem; }
.wt-reserve__tries { display: inline-block; margin: 0.5rem 0 0; padding: 0.15rem 0.6rem; border-radius: 999px; border: 1px solid var(--warn, var(--accent)); font-weight: 800; letter-spacing: 0.06em; font-size: 0.85rem; }
.wt-timer--reserve { font-variant-numeric: tabular-nums; }
