/* quiz-play.css — Round 171. A friendlier, game-style look for the whole test: mascot, big answer buttons, animated progress path,
   a calm color theme per topic. Loaded after style.css. Everything respects reduced-motion and works from 320px up. */
.quiz-shell { max-width: 720px; position: relative; overflow: hidden; }
.quiz-shell::before, .quiz-shell::after { content: ""; position: absolute; z-index: 0; border-radius: 50%; filter: blur(60px); opacity: .35; pointer-events: none; }
.quiz-shell::before { width: 320px; height: 320px; background: hsl(var(--qh, 20) 85% 70%); top: -80px; left: -120px; animation: qzDrift 16s ease-in-out infinite alternate; }
.quiz-shell::after { width: 280px; height: 280px; background: hsl(calc(var(--qh, 20) + 60) 80% 72%); bottom: -60px; right: -100px; animation: qzDrift 20s ease-in-out infinite alternate-reverse; }
.quiz-shell .container { position: relative; z-index: 1; }
@keyframes qzDrift { from { transform: translate(0, 0); } to { transform: translate(40px, 30px); } }

/* ---- mascot ---- */
.qz-mascot { display: flex; align-items: flex-end; gap: 10px; margin: 6px 0 10px; text-align: left; }
.qz-sprout { flex: none; animation: qzBob 3.2s ease-in-out infinite; transform-origin: 50% 100%; }
.qz-sprout__leaves { transform-origin: 40px 26px; animation: qzSway 3.6s ease-in-out infinite; }
.qz-sprout__eyes { animation: qzBlink 5s infinite; transform-origin: 40px 54px; }
@keyframes qzBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes qzSway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(5deg); } }
@keyframes qzBlink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.qz-bubble { position: relative; background: #fff; border: 2px solid hsl(var(--qh, 20) 55% 80%); border-radius: 16px 16px 16px 4px; padding: 10px 14px; font-size: 15px; line-height: 1.4; color: #2e2a24; box-shadow: 0 4px 14px rgba(0, 0, 0, .06); max-width: 440px; }
.qz-bubble.is-pop { animation: qzPop .35s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes qzPop { from { transform: scale(.9); opacity: .4; } to { transform: scale(1); opacity: 1; } }

/* ---- top bar and progress path ---- */
.qz { --qh: 20; animation: qzIn .35s ease both; }
@keyframes qzIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.qz-top { display: flex; align-items: center; gap: 12px; }
.qz-back { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--color-border, #ddd); background: #fff; font-size: 20px; cursor: pointer; transition: transform .15s; }
.qz-back:hover { transform: translateX(-2px); border-color: hsl(var(--qh) 60% 55%); }
.qz-track { position: relative; flex: 1; height: 16px; background: #ece7df; border-radius: 999px; }
.qz-track__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, hsl(var(--qh) 80% 60%), hsl(calc(var(--qh) + 40) 80% 58%)); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.qz-track__pip { position: absolute; top: -12px; transform: translateX(-50%); font-size: 22px; transition: left .5s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }
.qz-flag { position: absolute; top: -9px; transform: translateX(-50%); font-size: 13px; color: #b9ae9d; }
.qz-count { flex: none; font-size: 14px; color: var(--color-text-muted, #6b6258); min-width: 44px; text-align: right; }
.qz-count b { font-size: 18px; color: #2e2a24; }
.qz-sub { font-size: 13px; color: var(--color-text-muted, #6b6258); margin: 8px 0 2px 56px; }
.qz-streak { color: #d9531e; font-weight: 700; }

/* ---- the question card ---- */
.qz-card { background: #fff; border: 2px solid hsl(var(--qh) 45% 88%); border-radius: 22px; padding: 22px 20px 18px; box-shadow: 0 10px 30px hsl(var(--qh) 40% 50% / .12); }
.qz-chip { display: inline-flex; align-items: center; gap: 6px; background: hsl(var(--qh) 75% 94%); color: hsl(var(--qh) 55% 28%); border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.qz-q { font-family: var(--font-display, inherit); font-size: clamp(20px, 4.6vw, 26px); line-height: 1.3; margin: 4px 0 16px; color: #2e2a24; }
.qz-note { color: var(--color-text-muted, #6b6258); font-size: 14px; margin: -6px 0 10px; }
.qz-note--small { font-size: 12px; line-height: 1.5; }
.qz-opts { display: grid; gap: 10px; }
.qz-opt { position: relative; display: grid; grid-template-columns: 44px 1fr 24px; align-items: center; gap: 12px; width: 100%; min-height: 60px; text-align: left; padding: 10px 14px; border-radius: 16px; border: 2px solid #eadfce; background: #fffdf9; color: #2e2a24; font: inherit; font-size: 16px; line-height: 1.35; cursor: pointer; transition: transform .15s, border-color .15s, background .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.qz-opt:hover { transform: translateY(-2px); border-color: hsl(var(--qh) 60% 62%); box-shadow: 0 6px 16px hsl(var(--qh) 50% 50% / .15); }
.qz-opt:active { transform: scale(.985); }
.qz-opt:focus-visible { outline: 3px solid hsl(var(--qh) 70% 50%); outline-offset: 2px; }
.qz-opt__face { font-size: 30px; line-height: 1; text-align: center; transition: transform .25s; }
.qz-opt:hover .qz-opt__face { transform: scale(1.15) rotate(-6deg); }
.qz-opt__tick { width: 24px; height: 24px; border-radius: 50%; background: hsl(var(--qh) 70% 48%); color: #fff; font-size: 14px; display: grid; place-items: center; transform: scale(0); transition: transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.qz-opt.selected { border-color: hsl(var(--qh) 70% 48%); background: hsl(var(--qh) 90% 96%); box-shadow: 0 0 0 3px hsl(var(--qh) 70% 48% / .2); animation: qzSel .35s ease; }
.qz-opt.selected .qz-opt__tick { transform: scale(1); }
.qz-opt.selected .qz-opt__face { transform: scale(1.2); }
@keyframes qzSel { 0% { transform: scale(1); } 40% { transform: scale(1.025); } 100% { transform: scale(1); } }
.qz-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.qz-hint { font-size: 12.5px; color: var(--color-text-muted, #6b6258); }
.qz-next { min-height: 48px; padding: 0 22px; border-radius: 14px; }
.qz-next:disabled { opacity: .45; }
.qz textarea { width: 100%; border: 2px solid #eadfce; border-radius: 14px; padding: 12px; font: inherit; font-size: 16px; background: #fffdf9; }
.qz textarea:focus { outline: none; border-color: hsl(var(--qh) 65% 55%); box-shadow: 0 0 0 3px hsl(var(--qh) 70% 55% / .2); }

/* ---- start screens: depth, age, context ---- */
.qz-start { padding: 30px 0 20px; }
.qz-start .qz-mascot { justify-content: center; }
.qz-title { font-family: var(--font-display, inherit); font-size: clamp(24px, 5.4vw, 34px); margin: 12px 0 14px; }
.tier-grid.tier-grid, .qz-start .tier-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); margin-top: 16px; }
@media (min-width: 640px) { .qz-start .tier-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.qz-tier { position: relative; text-align: center; padding: 22px 16px 18px; border-radius: 22px; border: 2px solid #eadfce; background: #fff; box-shadow: 0 8px 22px rgba(0, 0, 0, .06); cursor: pointer; transition: transform .2s, box-shadow .2s, border-color .2s; }
.qz-tier:hover { transform: translateY(-4px) rotate(-.5deg); box-shadow: 0 14px 30px rgba(0, 0, 0, .12); }
.qz-tier--fast:hover { border-color: #f0b429; } .qz-tier--normal:hover { border-color: #3a9d5d; } .qz-tier--deep:hover { border-color: #7a5af8; }
.qz-tier__emoji { display: block; font-size: 44px; margin-bottom: 4px; animation: qzBob 3.4s ease-in-out infinite; }
.qz-tier h4 { margin: 4px 0; font-size: 19px; }
.qz-tier .tier-count { font-size: 13px; font-weight: 700; color: var(--color-text-muted, #6b6258); }
.qz-tier p { font-size: 14px; margin: 8px 0; }
.qz-tier .tier-price { font-weight: 800; }
.qz-tier .tier-card__badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); white-space: nowrap; background: #7a5af8; color: #fff; border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 700; }
.qz-tier .tier-card__badge--popular { background: #3a9d5d; }
.quiz-age { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 16px 0; }
.qz-age span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 92px; height: 92px; border-radius: 24px; border: 2px solid #eadfce; background: #fff; font-weight: 700; transition: transform .2s, border-color .2s, box-shadow .2s; cursor: pointer; }
.qz-age span i { font-style: normal; font-size: 30px; }
.qz-age:hover span { transform: translateY(-3px) scale(1.04); border-color: #f0a04b; }
.qz-age input:checked + span { border-color: #d9531e; background: #fff4ea; box-shadow: 0 0 0 3px rgba(217, 83, 30, .2); transform: scale(1.06); }
.qz-age input:focus-visible + span { outline: 3px solid #d9531e; outline-offset: 2px; }

/* ---- finishing ---- */
.qz--center { text-align: center; padding-top: 24px; }
.qz--center .qz-mascot { justify-content: center; }
.qz-card--center { text-align: center; }
.qz-steps { list-style: none; padding: 0; margin: 12px auto; max-width: 320px; text-align: left; }
.qz-steps li { opacity: 0; padding: 6px 0 6px 28px; position: relative; animation: qzStep .5s ease forwards; }
.qz-steps li::before { content: "\2713"; position: absolute; left: 0; color: #3a9d5d; font-weight: 800; }
@keyframes qzStep { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 480px) {
  .qz-sub { margin-left: 0; }
  .qz-card { padding: 18px 14px 14px; border-radius: 18px; }
  .qz-opt { grid-template-columns: 38px 1fr 22px; gap: 10px; min-height: 58px; font-size: 15.5px; }
  .qz-hint { display: none; }
  .qz-nav { justify-content: flex-end; }
  .qz-age span { width: 82px; height: 82px; }
  .qz-sprout { width: 52px; height: 59px; }
}
@media (prefers-reduced-motion: reduce) {
  .qz, .qz-sprout, .qz-sprout__leaves, .qz-sprout__eyes, .qz-tier__emoji, .quiz-shell::before, .quiz-shell::after, .qz-opt.selected, .qz-bubble.is-pop, .qz-steps li { animation: none !important; }
  .qz-steps li { opacity: 1; }
  .qz-track__fill, .qz-track__pip, .qz-opt, .qz-opt__tick { transition: none; }
}
.qz h2:focus, .qz-title:focus, .qz-q:focus, .quiz-start h2:focus { outline: none; }
