/* =========================================================
   חידון הקסם הגדול
   Three screens (menu, play, results) on one stage. On phones the quiz is a full-screen app.
   Motion is transform/opacity only; everything calms down under prefers-reduced-motion.
   ========================================================= */
.qz { --jc: var(--violet-soft); position: relative; width: min(100% - 2 * var(--gutter), 980px); margin-inline: auto;
  padding: calc(var(--header-h) + 22px) 0 40px; min-height: 100svh; display: grid; align-content: safe center; }
.quiz-screen[hidden] { display: none !important; }
.qz-eyebrow { margin: 0; font-family: var(--font-hand); font-weight: 700; color: var(--accent-2, var(--violet-soft)); font-size: 1.15rem; }
.qz-link { background: none; border: 0; color: var(--text-mute); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 10px 6px; min-height: 44px; font: inherit; font-size: 0.9rem; }
.qz-link:hover { color: var(--text); }

/* the living backdrop: the journey's picture, blurred, drifting; two layers cross-fade */
.qz-ambient { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.qz-ambient i { position: absolute; inset: -8%; background: center / cover no-repeat; filter: blur(26px) saturate(1.4) brightness(0.55); opacity: 0;
  transition: opacity 1.2s ease; animation: qz-drift 44s ease-in-out infinite alternate; }
.qz-ambient i.on { opacity: 0.75; }
.qz-ambient::after { content: ''; position: absolute; inset: 0; background: radial-gradient(80% 60% at 50% 30%, transparent, rgba(7, 3, 26, 0.7)); }
@keyframes qz-drift { from { transform: translate(-2%, -1%) scale(1.04); } to { transform: translate(2%, 2%) scale(1.12); } }

/* ---------- menu ---------- */
.qz-menu { display: grid; gap: clamp(20px, 3vw, 34px); animation: qz-in 0.6s var(--ease-out) both; }
@keyframes qz-in { from { opacity: 0; transform: translateY(18px); } }
.qz-head { text-align: center; }
.qz-title { margin: 2px 0 8px; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; }
.qz-sub { margin: 0 auto; max-width: 560px; color: var(--text-soft); font-size: clamp(1rem, 1.6vw, 1.15rem); line-height: 1.6; }

/* player: ring + rank + ladder, no box */
.qz-player { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 28px; align-items: center; padding: 6px 4px; }
.qz-ring { --size: 112px; position: relative; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-content: center; text-align: center; flex: none;
  background: conic-gradient(var(--gold) calc(var(--p) * 360deg), rgba(255, 255, 255, 0.12) 0); transition: --p 1s; }
.qz-ring::before { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #2a1463, var(--night-900)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.qz-ring > * { position: relative; }
.qz-ring b { font-family: var(--font-hand); font-size: calc(var(--size) * 0.36); line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.qz-ring small { font-size: calc(var(--size) * 0.11); color: var(--text-soft); }
.qz-ring.big { --size: clamp(130px, 22vw, 170px); margin-inline: auto; box-shadow: 0 0 60px -10px rgba(255, 215, 0, 0.45); }
.qz-rank { display: grid; gap: 2px; min-width: 0; }
.qz-rank-label { font-size: 0.85rem; color: var(--text-mute); }
.qz-rank strong { font-family: var(--font-hand); font-size: clamp(1.5rem, 3vw, 2rem); color: var(--gold); line-height: 1.15; }
.qz-rank-next { font-size: 0.95rem; color: var(--text-soft); }
.qz-ladder { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); position: relative; }
.qz-ladder::before { content: ''; position: absolute; top: 6px; inset-inline: 12.5%; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.14); }
.qz-ladder::after { content: ''; position: absolute; top: 6px; inset-inline-start: 12.5%; height: 3px; border-radius: 3px; width: calc(75% * var(--ladder, 0)); background: linear-gradient(90deg, var(--gold), var(--pink)); transition: width 1s var(--ease-out); box-shadow: 0 0 10px rgba(255, 215, 0, 0.6); }
.qz-ladder li { position: relative; display: grid; justify-items: center; gap: 6px; font-size: 0.78rem; color: var(--text-mute); text-align: center; }
.qz-ladder li::before { content: ''; width: 15px; height: 15px; border-radius: 50%; background: var(--night-700); border: 2px solid rgba(255, 255, 255, 0.25); position: relative; z-index: 1; transition: background 0.4s, border-color 0.4s, box-shadow 0.4s, scale 0.4s var(--ease-spring); }
.qz-ladder li.on { color: var(--text); }
.qz-ladder li.on::before { background: var(--gold); border-color: #fff6d6; box-shadow: 0 0 12px rgba(255, 215, 0, 0.8); }
.qz-ladder li.now::before { scale: 1.35; }
.qz-points { margin: 0; font-family: var(--font-hand); font-weight: 700; font-size: 1.25rem; color: #fff; text-align: center; }
.qz-points b { display: block; font-size: 1.9rem; color: var(--gold); line-height: 1; }

/* journeys: three doors with a picture */
.qz-journeys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.qz-journey { position: relative; display: grid; grid-template-rows: auto 1fr; text-align: start; padding: 0; cursor: pointer; color: var(--text); font: inherit; overflow: hidden;
  border-radius: 28px 28px 28px 10px; border: 1px solid color-mix(in srgb, var(--jc) 45%, transparent);
  background: linear-gradient(170deg, color-mix(in srgb, var(--jc) 26%, var(--night-800)), var(--night-900));
  box-shadow: 0 26px 50px -30px rgba(0, 0, 0, 0.9); animation: qz-deal 0.8s var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 0.1s + 0.15s);
  transition: transform 0.45s var(--ease-spring), border-color 0.3s, box-shadow 0.3s; }
.qz-journey:nth-child(1) { --i: 0; } .qz-journey:nth-child(2) { --i: 1; } .qz-journey:nth-child(3) { --i: 2; }
@keyframes qz-deal { from { opacity: 0; transform: translateY(50px) rotate(4deg) scale(0.9); } }
.qz-journey:hover, .qz-journey:focus-visible { transform: translateY(-8px); border-color: var(--jc); box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.9), 0 0 40px -8px color-mix(in srgb, var(--jc) 70%, transparent); }
.qz-journey:active { transform: scale(0.98); }
.qz-j-art { position: relative; height: clamp(120px, 15vw, 170px); display: grid; place-items: center; overflow: hidden; background: var(--img) center / cover no-repeat; }
.qz-j-art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--jc) 22%, var(--night-900)) 100%); }
.qz-j-art i { position: relative; z-index: 1; font-style: normal; font-size: 3.2rem; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6)); transition: transform 0.5s var(--ease-spring); animation: qz-bob 3.6s ease-in-out infinite; }
.qz-journey:hover .qz-j-art i { transform: scale(1.18) rotate(-8deg); }
.qz-j-art.no-img { background: radial-gradient(120% 100% at 50% 0%, color-mix(in srgb, var(--jc) 60%, transparent), transparent 70%); display: flex; justify-content: center; align-items: center; gap: 4px; }
.qz-j-art.no-img i { font-size: 2.1rem; }
.qz-j-art.no-img i:nth-child(2n) { animation-delay: -1.2s; translate: 0 10px; }
.qz-j-art.no-img i:nth-child(3n) { animation-delay: -2.2s; translate: 0 -8px; }
@keyframes qz-bob { 50% { transform: translateY(-8px) rotate(4deg); } }
.qz-j-body { display: grid; gap: 2px; padding: 14px 20px 18px; }
.qz-j-body strong { font-size: 1.4rem; line-height: 1.2; }
.qz-j-body small { color: var(--text-soft); font-size: 0.95rem; }
.qz-j-progress { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.qz-j-bar { flex: 1; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.qz-j-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--jc), var(--gold)); transition: width 1s var(--ease-out) 0.4s; }
.qz-j-progress b { font-family: var(--font-hand); color: var(--gold); font-variant-numeric: tabular-nums; min-width: 3.2em; text-align: end; }
.qz-j-state { font-size: 0.88rem; color: var(--text-mute); min-height: 1.3em; }
.qz-j-go { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(7, 3, 26, 0.55); color: #fff; backdrop-filter: blur(6px); transition: transform 0.4s var(--ease-spring), background 0.3s; }
.qz-j-go svg { width: 18px; height: 18px; }
.qz-journey:hover .qz-j-go { background: var(--gold); color: #2a1400; transform: translateX(-4px); }
.qz-journey.done { border-color: var(--gold); }
.qz-journey.done .qz-j-go { background: var(--gold); color: #2a1400; }
.qz-menu-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }

/* ---------- play ---------- */
.qz-play { display: grid; gap: 14px; width: min(100%, 820px); margin-inline: auto; animation: qz-in 0.5s var(--ease-out) both; }
.qz-hud { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; }
.qz-x { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.06); color: var(--text-soft); cursor: pointer; display: grid; place-items: center; transition: background 0.3s, color 0.3s, transform 0.3s var(--ease-spring); }
.qz-x:hover { background: rgba(255, 255, 255, 0.14); color: #fff; transform: rotate(90deg); }
.qz-x svg { width: 18px; height: 18px; }
.qz-hud-mid { margin: 0; display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.qz-hud-mid strong { font-family: var(--font-hand); font-size: 1.2rem; color: var(--jc); white-space: nowrap; }
[data-streak] { font-weight: 700; color: #ffb454; font-size: 0.95rem; animation: qz-pop 0.5s var(--ease-spring); }
.qz-score { margin: 0; display: grid; justify-items: end; line-height: 1.1; }
.qz-score small { font-size: 0.75rem; color: var(--text-mute); }
.qz-score b { font-family: var(--font-hand); font-size: 1.5rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.qz-score b.bump { animation: qz-pop 0.5s var(--ease-spring); }
@keyframes qz-pop { 40% { transform: scale(1.3); } }

.qz-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.qz-steps li { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.13); transition: background 0.4s, box-shadow 0.4s, transform 0.4s var(--ease-spring); }
.qz-steps li.ok { background: #34d399; box-shadow: 0 0 10px rgba(52, 211, 153, 0.6); }
.qz-steps li.no { background: #f87171; }
.qz-steps li.now { background: var(--gold); box-shadow: 0 0 12px rgba(255, 215, 0, 0.8); transform: scaleY(1.5); animation: qz-now 1.6s ease-in-out infinite; }
@keyframes qz-now { 50% { opacity: 0.55; } }

.qz-stage { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 10px 0 4px; }
.qz-timer { --size: 76px; position: relative; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: conic-gradient(var(--tc, var(--gold)) calc(var(--p) * 360deg), rgba(255, 255, 255, 0.12) 0); }
.qz-timer::before { content: ''; position: absolute; inset: 6px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #2a1463, var(--night-900)); }
.qz-timer > * { position: relative; }
.qz-timer b { font-family: var(--font-hand); font-size: 1.25rem; line-height: 1; color: var(--tc, var(--gold)); font-variant-numeric: tabular-nums; }
.qz-timer small { font-size: 0.62rem; color: var(--text-soft); }
.qz-timer.low { --tc: #fb923c; animation: qz-shiver 0.6s ease-in-out infinite; }
.qz-timer.off { --tc: var(--text-mute); }
.qz-timer.won { --tc: #34d399; animation: qz-pop 0.5s var(--ease-spring); }
@keyframes qz-shiver { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
.qz-timer.demo { --p: 1; animation: qz-demo 4s linear infinite; }
@property --p { syntax: '<number>'; inherits: true; initial-value: 0; }
@keyframes qz-demo { from { --p: 1; } to { --p: 0; } }
.qz-qnum { margin: 0; display: flex; gap: 12px; align-items: baseline; font-size: 0.92rem; color: var(--text-soft); }
.qz-level { color: var(--jc); font-weight: 700; }
.qz-q { margin: 4px 0 8px; font-size: clamp(1.4rem, 3.2vw, 2.2rem); line-height: 1.3; min-height: 2.6em; display: grid; place-items: center; outline: none; text-wrap: balance; text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5); }
.qz-q.enter { animation: qz-q-in 0.55s var(--ease-spring) both; }
@keyframes qz-q-in { from { opacity: 0; transform: translateY(22px) scale(0.94); } }
.qz-q.emoji { font-size: clamp(3rem, 9vw, 5.2rem); min-height: 1.6em; }
.emo-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.18em; }
.emo { display: inline-block; line-height: 1.15; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.35));
  animation: emo-in 0.6s var(--ease-spring) both, emo-float calc(2.6s + var(--i) * 0.45s) ease-in-out infinite; animation-delay: calc(var(--i) * 0.12s), calc(0.6s + var(--i) * -0.7s); }
.emo:nth-child(even) { --rot: 5deg; --lift: -12px; } .emo:nth-child(odd) { --rot: -5deg; --lift: -16px; }
@keyframes emo-in { from { opacity: 0; transform: translateY(26px) scale(0.3) rotate(-20deg); } }
@keyframes emo-float { 50% { transform: translateY(var(--lift, -14px)) rotate(var(--rot, 4deg)); } }

.qz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; counter-reset: ans; }
.qz-options button { position: relative; display: flex; align-items: center; gap: 14px; text-align: start; padding: 12px 18px; min-height: 68px; cursor: pointer; font: inherit; font-size: 1.12rem; font-weight: 600; color: var(--text);
  border-radius: 20px; border: 2px solid rgba(255, 255, 255, 0.14); background: linear-gradient(135deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.04)); backdrop-filter: blur(8px);
  box-shadow: 0 12px 26px -16px rgba(0, 0, 0, 0.9); animation: qz-ans-in 0.5s var(--ease-spring) both; animation-delay: calc(var(--i, 0) * 70ms + 0.15s);
  transition: transform 0.25s var(--ease-out), border-color 0.25s, background 0.25s, opacity 0.35s, box-shadow 0.25s; -webkit-tap-highlight-color: transparent; }
@keyframes qz-ans-in { from { opacity: 0; transform: translateY(18px) scale(0.95); } }
.qz-options.settled button { animation: none; }
.qz-options button::before { counter-increment: ans; content: counter(ans, hebrew); flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 1rem; font-weight: 900; color: #fff; background: var(--c); box-shadow: 0 6px 14px -6px var(--c); transition: background 0.3s, transform 0.3s var(--ease-spring); }
.qz-options button:nth-child(1) { --c: #ff5fb8; } .qz-options button:nth-child(2) { --c: #3b8cff; } .qz-options button:nth-child(3) { --c: #e8a400; } .qz-options button:nth-child(4) { --c: #8b5cf6; }
.qz-options kbd { margin-inline-start: auto; font: inherit; font-size: 0.72rem; color: var(--text-mute); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 6px; padding: 1px 7px; opacity: 0.8; }
.qz-options button:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 16px 30px -16px rgba(0, 0, 0, 0.9), 0 0 24px -8px var(--c); }
.qz-options button:hover:not(:disabled)::before { transform: rotate(-8deg) scale(1.1); }
.qz-options button:active:not(:disabled) { transform: scale(0.97); }
.qz-options button:disabled { cursor: default; }
.qz-options button.correct { background: linear-gradient(135deg, rgba(52, 211, 153, 0.42), rgba(52, 211, 153, 0.16)); border-color: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18), 0 0 34px rgba(52, 211, 153, 0.35); animation: qz-pop 0.5s var(--ease-spring); }
.qz-options button.correct::before { content: "\2713"; background: #10b981; }
.qz-options button.wrong { background: linear-gradient(135deg, rgba(248, 113, 113, 0.38), rgba(248, 113, 113, 0.14)); border-color: #f87171; animation: qz-shake 0.45s; }
.qz-options button.wrong::before { content: "\2715"; background: #ef4444; }
@keyframes qz-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.qz-options button:disabled:not(.correct):not(.wrong) { opacity: 0.4; }
.qz-options button.faded { opacity: 0.1; transform: scale(0.96); }
.qz-options button.hint { border-color: #c4b5fd; box-shadow: 0 0 0 4px rgba(196, 181, 253, 0.2), 0 0 30px rgba(196, 181, 253, 0.45); animation: qz-hint 1.4s ease-in-out infinite; }
@keyframes qz-hint { 50% { box-shadow: 0 0 0 7px rgba(196, 181, 253, 0.12), 0 0 40px rgba(196, 181, 253, 0.6); } }

.qz-feedback { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 18px; border-radius: 22px; outline: none;
  background: linear-gradient(160deg, rgba(26, 11, 61, 0.86), rgba(14, 6, 41, 0.9)); border: 1px solid color-mix(in srgb, var(--fc, var(--violet-soft)) 55%, transparent); backdrop-filter: blur(10px);
  animation: qz-q-in 0.45s var(--ease-spring) both; }
.qz-feedback img { width: 190px; height: 107px; object-fit: cover; border-radius: 14px; box-shadow: 0 14px 26px -14px rgba(0, 0, 0, 0.9); animation: qz-pic 0.7s var(--ease-spring) both; }
.qz-feedback img[hidden] { display: none; }
.qz-feedback img[hidden] + div { grid-column: 1 / -1; }
@keyframes qz-pic { from { opacity: 0; transform: scale(0.8) rotate(-4deg); } }
.qz-feedback strong { font-family: var(--font-hand); font-size: 1.25rem; color: var(--fc, var(--violet-soft)); }
.qz-feedback p { margin: 4px 0 0; color: var(--text-soft); line-height: 1.55; }
.qz-feedback.ok { --fc: #34d399; } .qz-feedback.no { --fc: #f87171; } .qz-feedback.mirror { --fc: #c4b5fd; }

.qz-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.qz-lifelines { display: flex; gap: 10px; }
.qz-life { display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: center; text-align: start; padding: 8px 16px 8px 14px; min-height: 52px; cursor: pointer; font: inherit; color: var(--text);
  border-radius: 999px; border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.07); transition: transform 0.3s var(--ease-spring), border-color 0.3s, opacity 0.3s, background 0.3s; }
.qz-life span { grid-row: span 2; font-size: 1.5rem; }
.qz-life b { font-size: 0.95rem; line-height: 1.1; }
.qz-life small { font-size: 0.72rem; color: var(--text-mute); line-height: 1.1; }
.qz-life:hover:not(:disabled) { transform: translateY(-3px); border-color: var(--gold); background: rgba(255, 215, 0, 0.1); }
.qz-life:disabled { opacity: 0.3; cursor: default; }
.qz-life.used span { filter: grayscale(1); }
.qz-next { min-width: 150px; font-size: 1.1rem; animation: qz-pop 0.5s var(--ease-spring) both, qz-nudge 1.6s ease-in-out 0.6s infinite; }
@keyframes qz-nudge { 50% { transform: translateX(-5px); } }

/* ---------- results ---------- */
.qz-done { display: grid; justify-items: center; gap: 10px; text-align: center; width: min(100%, 720px); margin-inline: auto; animation: qz-in 0.6s var(--ease-out) both; }
.qz-done-journey { margin: 0; font-family: var(--font-hand); font-weight: 700; color: var(--jc); font-size: 1.15rem; }
.qz-done h2 { margin: 6px 0 0; font-family: var(--font-hand); font-size: clamp(1.8rem, 4vw, 2.6rem); outline: none; }
.qz-eval { margin: 0; font-size: 1.12rem; color: var(--text-soft); max-width: 520px; }
.qz-dots { list-style: none; margin: 8px 0 2px; padding: 0; display: flex; justify-content: center; gap: 8px; }
.qz-dots li { width: 18px; height: 18px; border-radius: 50%; background: #34d399; box-shadow: 0 0 10px rgba(52, 211, 153, 0.55); animation: qz-dot 0.5s var(--ease-spring) both; animation-delay: calc(var(--i) * 80ms + 0.5s); }
.qz-dots li.no { background: #f87171; box-shadow: 0 0 10px rgba(248, 113, 113, 0.4); }
@keyframes qz-dot { from { opacity: 0; transform: scale(0); } }
.qz-final-points { margin: 0; font-size: 1.2rem; font-weight: 700; color: #fff; display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: center; align-items: baseline; }
.qz-final-points b { font-family: var(--font-hand); font-size: 1.9rem; color: var(--gold); font-variant-numeric: tabular-nums; }
.qz-final-points small { flex-basis: 100%; font-weight: 400; font-size: 0.9rem; color: var(--text-mute); }
.qz-record { font-family: var(--font-hand); color: #2a1400; background: linear-gradient(135deg, #ffe680, var(--gold)); border-radius: 999px; padding: 2px 14px; font-size: 0.95rem; rotate: -3deg; animation: qz-pop 0.6s var(--ease-spring) 1.2s both; }
.qz-done-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 10px; }
.qz-share-msg { margin: 0; min-height: 1.4em; font-size: 0.92rem; color: var(--gold); }
.qz-review { width: 100%; text-align: start; margin-top: 6px; }
.qz-review summary { cursor: pointer; text-align: center; color: var(--text-soft); padding: 12px; min-height: 44px; list-style: none; text-decoration: underline; text-underline-offset: 3px; }
.qz-review summary::-webkit-details-marker { display: none; }
.qz-review ol { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 0; counter-reset: rv; }
.qz-review li { counter-increment: rv; display: grid; grid-template-columns: 34px 1fr; gap: 2px 12px; padding: 12px 4px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.qz-review li::before { content: counter(rv); grid-row: span 3; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; color: #052e1d; background: #34d399; }
.qz-review li.no::before { background: #f87171; color: #3b0a0a; }
.qz-review strong { font-size: 1.02rem; }
.qz-review span { font-size: 0.95rem; color: var(--text-soft); }
.qz-review .r-yours { color: #fca5a5; text-decoration: line-through; text-decoration-thickness: 1px; }
.qz-review .r-right { color: #6ee7b7; }
.qz-review small { color: var(--text-mute); font-size: 0.88rem; }

/* ---------- dialogs ---------- */
.qz-howto { text-align: center; width: min(480px, 92vw); padding: 26px 26px 22px; overflow: hidden; }
.qz-how-steps { list-style: none; margin: 8px 0 0; padding: 0; min-height: 320px; display: grid; }
.qz-how-step { grid-area: 1 / 1; display: grid; justify-items: center; align-content: start; gap: 6px; animation: qz-how 0.5s var(--ease-out) both; }
.qz-how-step[hidden] { display: none; }
@keyframes qz-how { from { opacity: 0; transform: translateX(-30px); } }
.qz-how-step h3 { margin: 6px 0 0; font-family: var(--font-hand); font-size: 1.7rem; color: var(--gold); }
.qz-how-step p { margin: 0; color: var(--text-soft); line-height: 1.65; max-width: 380px; }
.qz-how-art { height: 150px; width: 100%; display: flex; justify-content: center; align-items: center; gap: 16px; border-radius: 22px; background: radial-gradient(90% 100% at 50% 0%, rgba(124, 77, 255, 0.45), transparent 75%); }
.qz-how-art i { font-style: normal; font-size: 3.2rem; animation: qz-bob 3s ease-in-out infinite; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)); }
.qz-how-art i:nth-child(2) { animation-delay: -1s; font-size: 4rem; } .qz-how-art i:nth-child(3) { animation-delay: -2s; }
.qz-how-art .qz-timer { --size: 104px; } .qz-how-art .qz-timer b { font-size: 1.7rem; } .qz-how-art .qz-timer small { font-size: 0.8rem; }
.qz-token { display: grid; justify-items: center; font-size: 2.8rem; line-height: 1; width: 110px; padding: 14px 0 10px; border-radius: 24px; background: rgba(255, 255, 255, 0.08); border: 1px solid var(--glass-border); animation: qz-bob 3s ease-in-out infinite; }
.qz-token + .qz-token { animation-delay: -1.5s; }
.qz-token small { font-size: 0.85rem; font-weight: 700; color: var(--text); margin-top: 6px; }
.qz-how-art .crown { font-size: 4rem; }
.qz-mini-cert { font-family: var(--font-hand); font-weight: 700; color: #7a5a12; background: radial-gradient(circle at 50% 0%, #fffdf2, #f3e6c4); border: 4px double #c8a84b; border-radius: 8px; padding: 22px 18px; rotate: 4deg; box-shadow: 0 14px 28px -14px rgba(0, 0, 0, 0.8); }
.qz-how-dots { display: flex; justify-content: center; gap: 4px; margin: 10px 0 6px; }
.qz-how-dots button { width: 28px; height: 28px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.qz-how-dots button::before { content: ''; width: 9px; height: 9px; border-radius: 99px; background: rgba(255, 255, 255, 0.25); transition: width 0.4s var(--ease-spring), background 0.3s; }
.qz-how-dots button[aria-current="true"]::before { width: 26px; background: var(--gold); }
.qz-how-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.qz-how-actions .btn { min-width: 150px; }
.qz-confirm { text-align: center; width: min(420px, 92vw); }
.qz-confirm h3 { font-family: var(--font-hand); font-size: 1.5rem; margin: 0 0 6px; }
.qz-confirm p { color: var(--text-soft); margin: 0 0 18px; }

/* keyboard focus */
.qz button:focus-visible, .qz a:focus-visible, .quiz-dialog button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* ---------- desktop: the stage is generous ---------- */
@media (min-width: 901px) {
  .qz-play { gap: 18px; }
  .qz-timer { --size: 92px; } .qz-timer b { font-size: 1.5rem; } .qz-timer small { font-size: 0.7rem; }
  .qz-options { gap: 14px; }
  .qz-options button { min-height: 78px; font-size: 1.2rem; padding-inline: 22px; }
  .qz-options button::before { width: 42px; height: 42px; font-size: 1.1rem; }
  .qz-j-art { height: clamp(110px, 16vh, 170px); }
  .qz-menu { gap: clamp(16px, 2.6vh, 30px); }
}
/* ---------- tablet ---------- */
@media (max-width: 900px) {
  .qz-player { grid-template-columns: auto minmax(0, 1fr); }
  .qz-points { grid-column: 1 / -1; display: flex; gap: 8px; justify-content: center; align-items: baseline; }
  .qz-points b { display: inline; font-size: 1.5rem; }
}

/* ---------- phones: a full-screen app, the page behind is locked ---------- */
@media (max-width: 700px) {
  html.quiz-lock, html.quiz-lock body { overflow: hidden; height: 100%; overscroll-behavior: none; }
  html.quiz-lock body { position: fixed; inset: 0; width: 100%; }
  body.quiz-app .site-footer, body.quiz-app .fab, body.quiz-app .progress { display: none; }
  body.quiz-app .site-header { transform: none !important; }
  body.quiz-playing .site-header { display: none; }
  body.quiz-app .qz { position: fixed; inset: 0; z-index: 90; width: 100%; min-height: 0; margin: 0; display: flex; flex-direction: column;
    padding: calc(var(--header-h) + 18px) 16px max(14px, env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; touch-action: manipulation; }
  body.quiz-playing .qz { z-index: 300; padding-top: max(12px, env(safe-area-inset-top)); }
  .qz-ambient i { filter: blur(20px) saturate(1.4) brightness(0.5); }

  .qz-menu { gap: 14px; flex: 1; align-content: start; }
  .qz-eyebrow { font-size: 1rem; }
  .qz-title { font-size: clamp(1.8rem, 8.6vw, 2.4rem); margin: 0; }
  .qz-sub { display: none; }
  .qz-player { gap: 4px 16px; }
  .qz-ring { --size: 84px; }
  .qz-rank strong { font-size: 1.35rem; }
  .qz-rank-next { font-size: 0.85rem; }
  .qz-ladder { margin-top: 6px; }
  .qz-ladder li span { display: none; }
  .qz-journeys { grid-template-columns: 1fr; gap: 10px; }
  .qz-journey { grid-template-rows: none; grid-template-columns: 96px 1fr; border-radius: 22px 22px 22px 8px; animation-name: qz-ans-in; }
  .qz-journey:hover { transform: none; }
  .qz-j-art { height: 100%; min-height: 92px; }
  .qz-j-art::after { background: linear-gradient(270deg, transparent 40%, color-mix(in srgb, var(--jc) 22%, var(--night-900)) 100%); }
  .qz-j-art i { font-size: 2.4rem; }
  .qz-j-art.no-img { flex-wrap: wrap; gap: 0; padding: 6px; }
  .qz-j-art.no-img i { font-size: 1.35rem; translate: none !important; }
  .qz-j-body { padding: 10px 14px 12px 50px; }
  .qz-j-body strong { font-size: 1.2rem; }
  .qz-j-body small { font-size: 0.85rem; }
  .qz-j-progress { margin-top: 6px; }
  .qz-j-state { font-size: 0.8rem; }
  .qz-j-go { top: 50%; translate: 0 -50%; inset-inline-end: 10px; width: 34px; height: 34px; }
  .qz-menu-actions { gap: 8px; }
  .qz-menu-actions .btn { padding: 8px 14px; min-height: 44px; font-size: 0.9rem; }

  .qz-play { flex: 1; min-height: 0; gap: 10px; display: flex; flex-direction: column; }
  .qz-hud-mid strong { font-size: 1.05rem; }
  .qz-score b { font-size: 1.3rem; }
  .qz-stage { flex: 1 1 auto; min-height: 0; padding: 2px 0; align-content: center; }
  .qz-timer { --size: 64px; } .qz-timer b { font-size: 1.05rem; }
  .qz-q { font-size: clamp(1.2rem, 5.4vw, 1.6rem); min-height: 0; margin: 2px 0; }
  .qz-q.emoji { font-size: clamp(2.6rem, 13vw, 3.8rem); }
  .qz-options { grid-template-columns: 1fr; gap: 9px; flex: none; }
  .qz-options button { min-height: clamp(52px, 7.6svh, 66px); padding: 8px 14px; font-size: clamp(1rem, 4.4vw, 1.15rem); border-radius: 18px; }
  .qz-options button:hover:not(:disabled) { transform: none; }
  .qz-options kbd { display: none; }
  .qz-feedback { flex: none; padding: 10px 12px; gap: 12px; border-radius: 18px; }
  .qz-feedback img { width: 84px; height: 84px; border-radius: 12px; }
  .qz-feedback strong { font-size: 1.08rem; }
  .qz-feedback p { font-size: 0.9rem; margin-top: 2px; line-height: 1.45; }
  .qz-foot { flex: none; flex-wrap: nowrap; gap: 8px; }
  .qz-lifelines { gap: 6px; }
  .qz-life { padding: 6px 12px 6px 10px; min-height: 48px; }
  .qz-life span { font-size: 1.25rem; }
  .qz-life b { font-size: 0.82rem; } .qz-life small { font-size: 0.66rem; }
  .qz-next { min-width: 104px; padding-inline: 18px; }
  /* once answered, the helpers step aside so the explanation and "next" have room */
  .qz-play.answered .qz-lifelines { display: none; }
  .qz-play.answered .qz-next { flex: 1; }
  .qz-play.answered .qz-timer { --size: 48px; } .qz-play.answered .qz-timer small { display: none; }

  .qz-done { flex: 1; align-content: center; gap: 8px; }
  .qz-done-actions .btn { flex: 1 1 44%; padding-inline: 10px; font-size: 0.95rem; }
  .qz-done-actions .btn[data-nextj] { flex-basis: 100%; }
  .qz-how-steps { min-height: 330px; }
}
@media (max-width: 700px) and (max-height: 700px) {
  .qz-options { gap: 6px; } .qz-options button { min-height: 46px; } .qz-options button::before { width: 32px; height: 32px; }
  .qz-timer { --size: 52px; } .qz-timer small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .qz-ambient i, .qz-journey, .qz-j-art i, .emo, .qz-options button, .qz-next, .qz-steps li.now, .qz-timer.low, .qz-timer.demo, .qz-how-art i, .qz-token, .qz-options button.hint { animation: none !important; }
}
