:root {
  --bg: #2046c7;
  --bg-deep: #18349a;
  --ink: #ffffff;
  --navy: #172554;
  --gold: #ffe08a;
  --good: #0a5c34;
  --bad: #9d2c2c;
  --idle: #d5def8;
  --shadow: #132e86;
  --card: #ffffff;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.45;
}

body.modal-open { overflow: hidden; }

.wrap {
  max-width: 40rem;
  margin: 0 auto;
  padding:
    calc(1rem + env(safe-area-inset-top))
    calc(1.1rem + env(safe-area-inset-right))
    calc(1.5rem + env(safe-area-inset-bottom))
    calc(1.1rem + env(safe-area-inset-left));
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 5;
  background: var(--card);
  color: var(--navy);
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  font-weight: 800;
}

.skip:focus { top: 1rem; }

:focus { outline: none; }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

button, a { touch-action: manipulation; }

button {
  font: inherit;
  cursor: pointer;
}

h1 {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 0.95;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}

.logo img {
  width: 2.15rem;
  height: 2.15rem;
  display: block;
  flex: none;
}

.logo span {
  font-size: 1.35rem;
  letter-spacing: -0.04em;
}

a.logo { color: inherit; text-decoration: none; }

body.is-start .logo {
  flex: 1 0 100%;
  order: 2;
  margin-top: 0.15rem;
}

body.is-start .logo img { width: 4.4rem; height: 4.4rem; }

body.is-start .logo span {
  font-size: clamp(2.7rem, 13vw, 4.8rem);
}

body.is-play .logo img,
body.is-end .logo img { width: 2rem; height: 2rem; }

body.is-play .logo span,
body.is-end .logo span { font-size: 1.2rem; }

.share-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.2rem 0 0.8rem;
}

.share-card img { width: 2.75rem; height: 2.75rem; display: block; }

.share-card-title,
.share-card-url { margin: 0; font-weight: 800; }

.share-card-url { color: var(--gold); font-size: 0.95rem; }

.foot-logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.foot-logo img { width: 2.1rem; height: auto; display: block; }

.top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
}

body.is-start .top-row { align-items: flex-start; }

body.is-start h1 {
  flex: 1 0 100%;
  order: 2;
}

body.is-start .tools { order: 1; }

.tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

body.is-play .wrap { max-width: 56rem; }

.play-layout {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.timer {
  margin: 0;
  font-size: clamp(3rem, 14vw, 4.6rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 0.9;
}

body.is-play .timer {
  min-width: 4.2ch;
  text-align: right;
}

.timer.is-low {
  color: var(--gold);
  animation: wick-urgent 0.7s ease-in-out infinite;
}

body.is-play {
  --glow: 1;
  background:
    radial-gradient(120% 70% at 50% -8%, rgba(255, 196, 90, calc(var(--glow) * 0.62)), transparent 48%),
    var(--bg);
}

body.is-play[data-heat="2"] { --glow: 0.85; }
body.is-play[data-heat="4"] { --glow: 1; }
body.is-play[data-heat="6"] { --glow: 1; }

body.is-urgent { background: #1736b0; }

.time-pop {
  position: absolute;
  right: 0;
  top: 100%;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--gold);
  opacity: 0;
  pointer-events: none;
}

.timer { position: relative; }

.time-pop.is-show { animation: time-rise 0.7s ease; }

@keyframes time-rise {
  0% { opacity: 0; transform: translateY(6px); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-10px); }
}

.combo {
  min-height: 1.2rem;
  margin: 0.15rem 0 0;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.8rem;
  padding: 0;
  list-style: none;
}

.badges li {
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  opacity: 0.45;
}

.badges li.is-on {
  opacity: 1;
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

.streak-hero { font-size: 2.6rem; }

body.is-urgent .wick span { animation: wick-burn 0.7s ease-in-out infinite; }

@keyframes wick-urgent {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

@keyframes wick-burn {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.45); }
}

#sound-toggle,
.brand-link,
.secondary,
.ghost {
  min-height: 48px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-weight: 800;
  padding: 0.4rem 0.9rem;
}

.brand {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.brand a,
footer a,
.prose a {
  color: var(--ink);
}

.wick {
  height: 0.7rem;
  margin-top: 0.7rem;
  background: var(--bg-deep);
  border-radius: 999px;
  overflow: hidden;
}

.wick span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--gold);
  border-radius: inherit;
}

.lede {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 800;
  margin: 1rem 0 0.4rem;
}

.rules {
  margin: 0.4rem 0 1rem;
  padding-left: 1.2rem;
}

.rules li { margin: 0.3rem 0; }

.best-label {
  margin: 0.4rem 0 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.best-num {
  margin: 0 0 1rem;
  font-size: 2rem;
  font-weight: 800;
}

.primary,
.choice,
.modal-card button {
  border: 0;
  border-radius: 16px;
  background: var(--card);
  color: var(--navy);
  font-weight: 800;
  box-shadow: 0 6px 0 var(--shadow);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.primary:active,
.choice:active:not(:disabled),
.modal-card button:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 var(--shadow);
}

.primary {
  width: 100%;
  min-height: 64px;
  font-size: 1.25rem;
  padding: 0.8rem 1rem;
}

.choice {
  width: 100%;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  padding: 1rem 1.05rem;
  font-size: 1.25rem;
  border-radius: 18px;
  user-select: none;
}

.choice:disabled { cursor: default; opacity: 1; }

.key {
  flex: none;
  width: 1.8rem;
  height: 1.8rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  font-weight: 800;
}

.choice-text {
  flex: 1;
  min-width: 0;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.meta,
.stats {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stats { margin-top: 0.25rem; }

#question {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.9rem 0 0.3rem;
}

.cat {
  margin: 0;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
}

#question-text {
  font-size: clamp(1.45rem, 4.4vw, 2.05rem);
  font-weight: 800;
  line-height: 1.22;
}

.pop {
  min-height: 1.6rem;
  margin: 0.35rem 0 0.7rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--gold);
}

.pop.is-bad { color: #ffe1dc; }

.pop.is-show { animation: rise 0.45s ease; }

@keyframes rise {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.choice.is-correct,
.choice.is-correct:hover {
  background: var(--good);
  color: var(--ink);
  box-shadow: 0 6px 0 #064026;
}

.choice.is-correct .key { background: var(--ink); color: var(--good); }

.choice.is-wrong,
.choice.is-wrong:hover {
  background: var(--bad);
  color: var(--ink);
  box-shadow: 0 6px 0 #6d1d1d;
}

.choice.is-wrong .key { background: var(--ink); color: var(--bad); }

.choice.is-idle,
.choice.is-idle:hover {
  background: var(--idle);
  color: var(--navy);
  box-shadow: none;
}

.play-actions, .end-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.ghost, .secondary {
  width: 100%;
  border-radius: 16px;
  box-shadow: none;
}

.eyebrow {
  margin: 1rem 0 0.2rem;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#verdict {
  margin: 0.2rem 0;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  line-height: 1.15;
}

.final-score {
  margin: 0.2rem 0 0.6rem;
  font-size: clamp(3rem, 12vw, 4.5rem);
  font-weight: 800;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}

.results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin: 0.4rem 0 0.8rem;
}

.results div {
  background: var(--bg-deep);
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
}

.results dt {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.results dd {
  margin: 0.15rem 0 0;
  font-size: 1.25rem;
  font-weight: 800;
}

.new-best {
  margin: 0 0 0.6rem;
  font-weight: 800;
  color: var(--gold);
}

.grid {
  display: grid;
  gap: 0.15rem;
  margin: 0.2rem 0 0.8rem;
  font-size: 1.25rem;
  letter-spacing: 0.14em;
  line-height: 1.4;
}

#share-status { min-height: 1.4rem; font-weight: 800; margin: 0.3rem 0; }

textarea {
  width: 100%;
  min-height: 9rem;
  border: 0;
  border-radius: 12px;
  padding: 0.75rem;
  font: inherit;
  color: var(--navy);
  background: var(--card);
}

.error {
  background: var(--card);
  color: var(--bad);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-weight: 800;
}

footer {
  margin-top: 1.6rem;
  font-size: 0.92rem;
}

footer p { margin: 0 0 0.4rem; }

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
}

footer a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-weight: 800;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(8, 16, 48, 0.72);
  display: grid;
  place-items: start center;
  padding: 0.6rem;
  overflow: auto;
}

.modal-card {
  width: min(24rem, 100%);
  max-height: min(88dvh, 40rem);
  overflow: auto;
  background: var(--card);
  color: var(--navy);
  border-radius: 18px;
  padding: 1.15rem;
}

.streak-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 48px;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 2px solid #fff;
  background: rgba(8, 20, 70, 0.28);
  color: #fff;
  font-weight: 800;
}

.week-dots { display: inline-flex; gap: 3px; }
.week-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.75);
  background: transparent;
}
.week-dots i.is-on { background: #ffe08a; border-color: #ffe08a; }
.week-dots i.is-today { box-shadow: 0 0 0 1px #fff; }
.week-dots i.is-future, .week-dots i.is-miss { opacity: 0.45; }

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.22rem;
  margin: 0 0 0.7rem;
}
.cal-head, .cal-day { text-align: center; font-size: 0.72rem; font-weight: 800; }
.cal-day { border-radius: 7px; padding: 0.28rem 0; background: #e7ecfb; }
.cal-day.is-on { background: #2046c7; color: #fff; }
.cal-day.is-today { outline: 2px solid #ffb703; }
.cal-day.is-future { opacity: 0.4; }

.mini-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin: 0 0 0.7rem;
}
.mini-stats div { background: #eef2ff; border-radius: 10px; padding: 0.35rem 0.5rem; }
.mini-stats dt { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.mini-stats dd { margin: 0; font-size: 1.1rem; font-weight: 800; }

.hist, .rank-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  min-height: 4.5rem;
  margin: 0 0 0.7rem;
}
.hist i, .rank-col i {
  display: block;
  width: 100%;
  background: #2046c7;
  border-radius: 4px 4px 0 0;
}
.rank-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 0.15rem; font-size: 0.62rem; font-weight: 800; }
.rank-col.is-you i { background: #e0a020; }
.rank-col em { font-style: normal; color: #8a5a00; }
.modal-card h3 { margin: 0.2rem 0 0.35rem; font-size: 1rem; }
.come-back { font-weight: 800; margin: 0.3rem 0 0; }

body.is-play .week-dots { display: none; }

.modal-card h2 { margin: 0 0 0.4rem; font-size: 1.45rem; }

.modal-card p { margin: 0 0 1rem; }

.modal-actions { display: flex; flex-direction: column; gap: 0.6rem; }

.modal-card button { width: 100%; min-height: 52px; font-size: 1.05rem; }

.modal-card .secondary {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
  box-shadow: none;
}

.prose h1 {
  font-size: clamp(2rem, 7vw, 3rem);
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.1;
  margin: 0.6rem 0 0.8rem;
}

.prose h2 { font-size: 1.25rem; margin: 1.4rem 0 0.4rem; }

.prose ul { padding-left: 1.2rem; }

.prose li { margin: 0.3rem 0; }

.prose a { font-weight: 800; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (hover: hover) {
  .primary:hover,
  .choice:hover:not(:disabled) { background: #f4f7ff; }
  #sound-toggle:hover,
  .ghost:hover,
  .secondary:hover { background: rgba(255, 255, 255, 0.12); }
}

.day-label {
  margin: 0.8rem 0 0;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.countdown {
  margin: 0.8rem 0 0;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.note, .compare {
  margin: 0.45rem 0 0;
  font-size: 0.95rem;
}

.compare { font-weight: 800; }

.cooldown {
  margin: 0.7rem 0 0;
  font-weight: 800;
}

.cooldown-track {
  display: block;
  height: 0.6rem;
  margin-top: 0.35rem;
  background: #18349a;
  border-radius: 999px;
  overflow: hidden;
}

#cooldown-label {
  display: block;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
}

#cooldown-bar {
  display: block;
  height: 100%;
  width: 100%;
  background: #ffe08a;
}

.candle-panel {
  height: 4.6rem;
}

.candle {
  --burn: 100%;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
}

.wax-track {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-end;
}

.holder {
  order: 1;
  width: 1.1rem;
  height: 0.7rem;
  flex: none;
  background: #c9a24a;
  border-radius: 0 0 4px 4px;
}

.wax {
  order: 1;
  position: relative;
  width: var(--burn);
  height: 1.15rem;
  background: linear-gradient(#fff4d2, #f0c14b 70%, #e0a832);
  border-radius: 3px 8px 3px 3px;
  box-shadow: inset 0 -4px 0 rgba(160, 100, 20, 0.18);
  transition: width 0.35s linear;
}

.flame {
  order: 2;
  position: relative;
  width: 1.4rem;
  height: 2.1rem;
  flex: none;
  margin-bottom: 0.35rem;
}

.flame-glow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 2.4rem;
  height: 2.4rem;
  margin-left: -1.2rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 210, 120, 0.85), rgba(255, 120, 20, 0.15) 60%, transparent 72%);
  transform: translateZ(0);
  animation: glow-pulse 0.7s ease-in-out infinite alternate;
}

.flame-svg {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1.35rem;
  height: 2rem;
  overflow: visible;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 0 6px rgba(255, 150, 40, 0.9));
  animation: flicker 0.18s ease-in-out infinite alternate, sway 0.9s ease-in-out infinite;
}

.flame-outer { fill: #ff8a1e; }
.flame-inner { fill: #fff6c8; }

.candle[data-heat="1"] .flame { transform: scale(1.06); }
.candle[data-heat="2"] .flame { transform: scale(1.12); }
.candle[data-heat="3"] .flame { transform: scale(1.18); }
.candle[data-heat="4"] .flame { transform: scale(1.24); }
.candle[data-heat="5"] .flame { transform: scale(1.3); }
.candle[data-heat="6"] .flame { transform: scale(1.38); }

.sparks { position: absolute; left: 50%; bottom: 0.4rem; width: 0; height: 0; }
.sparks i {
  position: absolute;
  width: 5px;
  height: 5px;
  margin: -2px;
  border-radius: 50%;
  background: #ffe08a;
  animation: spark 0.55s ease-out forwards;
}
@keyframes spark {
  to { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.4); }
}
@keyframes glow-pulse {
  from { opacity: 0.75; transform: translateZ(0) scale(0.92); }
  to { opacity: 1; transform: translateZ(0) scale(1.08); }
}

.drip {
  display: block;
  position: absolute;
  top: 70%;
  width: 0.35rem;
  height: 0;
  background: linear-gradient(#fff1c4, #e7b34a);
  border-radius: 0 0 0.35rem 0.35rem;
  animation: drip-fall 2.8s ease-in infinite;
}
.drip-a { left: 18%; }
.drip-b { left: 62%; animation-delay: 1s; }
.drip-c { left: 40%; animation-delay: 1.7s; }

.smoke {
  position: absolute;
  left: 50%;
  bottom: 0.2rem;
  width: 0.7rem;
  height: 0.7rem;
  margin-left: -0.35rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  opacity: 0;
  pointer-events: none;
}

.candle.is-out .flame-svg,
.candle.is-out .flame-glow { opacity: 0; animation: none; }

.choice.is-correct { animation: good-pop 0.28s ease; }
.choice.is-wrong { animation: no-shake 0.32s ease; }

@keyframes good-pop {
  0% { transform: scale(0.98); }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes no-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.candle.is-out .smoke { animation: puff 0.9s ease-out forwards; }

@keyframes flicker {
  from { transform: translateX(-50%) scale(0.94, 0.9); }
  to { transform: translateX(-50%) scale(1.06, 1.12); }
}

@keyframes sway {
  from { margin-left: -1px; }
  to { margin-left: 1px; }
}

@keyframes drip-fall {
  0% { height: 0; opacity: 0; }
  15% { opacity: 1; }
  75% { height: 1.6rem; opacity: 1; }
  100% { height: 2.1rem; opacity: 0; }
}

@keyframes puff {
  0% { opacity: 0; transform: translateY(0) scale(0.4); }
  25% { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-2.4rem) scale(1.8); }
}

@media (max-width: 859px) {
  body.is-start .wrap { padding-top: 0.45rem; padding-bottom: 0.6rem; }
  body.is-start .logo { margin-top: 0; }
  body.is-start .logo img { width: 2.75rem; height: 2.75rem; }
  body.is-start .logo span { font-size: 2.15rem; }
  body.is-start .best-num { margin-bottom: 0.2rem; }
  body.is-start .badges { margin-bottom: 0.25rem; }
  body.is-play .logo img { width: 1.7rem; height: 1.7rem; }
  body.is-play .logo span { font-size: 1.05rem; }
  body.is-start .lede { margin: 0.25rem 0 0.15rem; font-size: 1.15rem; }
  body.is-start #daily-open > p { margin-top: 0.3rem; margin-bottom: 0.3rem; }
  body.is-start .rules { margin: 0.15rem 0 0.25rem; }
  body.is-start .rules li { margin: 0.15rem 0; }
  body.is-start .best-num { margin-bottom: 0.45rem; }
  .streak-hero { font-size: 2.1rem; }
  body.is-play footer { display: none; }
  body.is-play .wrap {
    padding-top: calc(0.35rem + env(safe-area-inset-top));
    padding-bottom: calc(0.45rem + env(safe-area-inset-bottom));
  }
  body.is-play h1 { font-size: 1rem; letter-spacing: 0.12em; }
  body.is-play .timer { font-size: 1.7rem; min-width: 3.2ch; }
  body.is-play #sound-toggle { min-height: 40px; padding: 0.2rem 0.7rem; }
  .play-layout { gap: 0.35rem; }
  .candle-panel { order: -1; height: 3.1rem; }
  .meta, .stats { margin: 0.2rem 0 0; font-size: 0.75rem; }
  #question { margin: 0.2rem 0 0; gap: 0.2rem; }
  #question-text { font-size: 1.12rem; line-height: 1.2; }
  .pop { min-height: 1.1rem; margin: 0.1rem 0 0.25rem; font-size: 1rem; }
  .choices { gap: 0.4rem; }
  .choice {
    min-height: 48px;
    padding: 0.35rem 0.75rem;
    font-size: 1rem;
    border-radius: 14px;
    box-shadow: 0 4px 0 var(--shadow);
  }
  .play-actions { margin-top: 0.35rem; }
  .play-actions .ghost { min-height: 48px; }
}

@media (max-width: 859px) and (max-height: 700px) {
  body.is-play .timer { font-size: 1.45rem; }
  #question-text { font-size: 1.02rem; }
  .choice { padding: 0.2rem 0.65rem; }
  .cat { padding: 0.1rem 0.45rem; }
}

@media (min-width: 860px) {
  .play-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 8.5rem;
    gap: 1.25rem;
    align-items: stretch;
  }

  .candle-panel {
    height: 28rem;
  }

  .candle {
    height: 100%;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
  }

  .wax-track {
    order: 1;
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
  }

  .holder {
    order: 2;
    width: 4.2rem;
    height: 0.7rem;
    border-radius: 3px;
  }

  .wax {
    order: 2;
    width: 2.15rem;
    height: var(--burn);
    border-radius: 6px 6px 2px 2px;
    transition: height 0.35s linear;
  }

  .flame {
    order: 1;
    width: 2rem;
    height: 2.6rem;
    margin: 0 0 -2px;
  }

  .drip {
    display: block;
    position: absolute;
    top: 22%;
    width: 0.45rem;
    height: 0;
    background: linear-gradient(#fff1c4, #e7b34a);
    border-radius: 0 0 0.45rem 0.45rem;
    animation: drip-fall 2.6s ease-in infinite;
  }

  .drip-a { left: -0.15rem; }
  .drip-b { right: -0.2rem; animation-delay: 0.9s; }
  .drip-c { left: 0.7rem; animation-delay: 1.6s; top: 48%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .primary:active,
  .choice:active,
  .choice:active:not(:disabled),
  .modal-card button:active,
  .timer.is-low { transform: none !important; }
  .drip { display: none !important; }
  .wax { transition: none !important; }
  .candle.is-out .smoke {
    animation: none !important;
    opacity: 0.8;
    transform: none;
  }
}

@media (min-width: 720px) {
  .wrap { padding-top: 1.4rem; }
  .results { grid-template-columns: 1fr 1fr 1fr 1fr; }
}
