:root {
  color-scheme: light;
  --bg: #fff6df;
  --ink: #1f2333;
  --muted: #687089;
  --card: rgba(255, 255, 255, .9);
  --line: rgba(31, 35, 51, .12);
  --purple: #7c4dff;
  --pink: #ff4fb8;
  --yellow: #ffd166;
  --green: #27d17f;
  --orange: #ff8a2a;
  --red: #ff4c61;
  --blue: #2fc6ff;
  --shadow: 0 18px 45px rgba(45, 35, 90, .16);
  --button-shadow: 0 9px 0 rgba(45, 35, 90, .10), 0 18px 34px rgba(45, 35, 90, .14);
  --radius: 20px;
  font-family: "Fredoka", ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #151520;
    --ink: #f8f5ff;
    --muted: #a9adc2;
    --card: rgba(32, 34, 49, .88);
    --line: rgba(255, 255, 255, .13);
    --shadow: 0 18px 45px rgba(0, 0, 0, .35);
  }
}

body.dark {
  color-scheme: dark;
  --bg: #151520;
  --ink: #f8f5ff;
  --muted: #a9adc2;
  --card: rgba(32, 34, 49, .88);
  --line: rgba(255, 255, 255, .13);
  --shadow: 0 18px 45px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 209, 102, .48), transparent 20rem),
    radial-gradient(circle at 87% 4%, rgba(47, 198, 255, .34), transparent 22rem),
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .48), transparent 17rem),
    linear-gradient(135deg, #fff2cf 0%, #e0f9ff 50%, #fff2fb 100%);
  overflow-x: hidden;
}

body.dark {
  background:
    radial-gradient(circle at 16% 9%, rgba(255, 209, 102, .15), transparent 22rem),
    radial-gradient(circle at 85% 0%, rgba(47, 198, 255, .13), transparent 20rem),
    linear-gradient(135deg, #151520 0%, #182438 52%, #281b34 100%);
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 209, 102, .48), transparent 22rem),
    radial-gradient(circle at 84% 8%, rgba(47, 198, 255, .36), transparent 23rem),
    linear-gradient(135deg, #fff2cf 0%, #e0f9ff 54%, #fff2fb 100%);
  transition: opacity .24s ease, visibility .24s ease;
}

.loading-screen.hidden {
  display: grid !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-logo {
  width: 78px;
  height: 78px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  font-family: "Luckiest Guy", "Fredoka", ui-rounded, system-ui, sans-serif;
  font-size: 2.2rem;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--pink) 50%, var(--blue));
  box-shadow: 0 14px 34px rgba(45, 35, 90, .22);
  animation: loadingPop 1.05s ease-in-out infinite;
}

.loading-dots {
  display: flex;
  gap: 7px;
}

.loading-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--purple);
  animation: loadingDot .8s ease-in-out infinite;
}

.loading-dots span:nth-child(2) { animation-delay: .12s; background: var(--pink); }
.loading-dots span:nth-child(3) { animation-delay: .24s; background: var(--blue); }

.loading-screen p {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.app-shell {
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 20px) 16px calc(env(safe-area-inset-bottom) + 16px);
  overflow-x: hidden;
}

.tg-notice {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 18px;
  color: #2d235a;
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(124, 77, 255, .16);
  box-shadow: 0 8px 18px rgba(45, 35, 90, .08);
  font-size: .82rem;
  font-weight: 900;
  text-align: center;
}

.topbar {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 3;
}

.iq-rank {
  width: fit-content;
  max-width: 100%;
  min-height: 40px;
  height: 40px;
  margin: 8px auto 0 0;
  padding: 5px 13px 5px 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(31, 35, 51, .1);
  box-shadow: 0 8px 18px rgba(45, 35, 90, .09);
}

.rank-progress {
  width: min(100%, 250px);
  height: 5px;
  margin: 8px auto 0 0;
  border-radius: 999px;
  background: rgba(31, 35, 51, .09);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(45, 35, 90, .08);
}

.rank-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), var(--pink), var(--purple), var(--blue));
  transition: width .35s ease;
}

.iq-icon {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fff2a8, #dff7ff);
  font-size: 1rem;
}

.iq-copy {
  display: grid;
  line-height: 1;
}

.iq-copy strong {
  font-size: .82rem;
  font-weight: 900;
}

.iq-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.brand-dot {
  order: 1;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: conic-gradient(from 20deg, var(--purple), var(--pink), var(--yellow), var(--green), var(--blue), var(--purple));
  box-shadow: 0 0 0 4px rgba(124, 77, 255, .13);
}

.screen-kicker {
  order: 2;
  margin-right: auto;
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font-weight: 800;
  font-size: .72rem;
  letter-spacing: 0;
  text-transform: uppercase;
  max-width: 7.7rem;
  line-height: 1.12;
}

body[data-screen="home"] .screen-kicker {
  max-width: 8rem;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 8px 20px rgba(45, 35, 90, .14);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  font-weight: 900;
}

#backBtn {
  order: 0;
  flex: 0 0 42px;
}

#themeBtn {
  order: 5;
  flex: 0 0 42px;
}

.hearts-bar {
  order: 3;
  flex: 0 0 auto;
  min-height: 40px;
  height: 40px;
  padding: 6px 10px;
  border-radius: 999px;
  display: inline-grid;
  align-content: center;
  justify-items: center;
  background: rgba(255, 255, 255, .66);
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(45, 35, 90, .08);
  color: var(--red);
  font-weight: 950;
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease;
}

.hearts-bar:active {
  transform: scale(.97);
  box-shadow: 0 5px 12px rgba(45, 35, 90, .1);
}

.heart-icons {
  display: flex;
  gap: 1px;
  line-height: 1;
  font-size: .86rem;
}

.heart {
  filter: drop-shadow(0 2px 2px rgba(255, 76, 97, .16));
}

.heart.empty {
  opacity: .22;
  filter: none;
}

.heart-timer {
  margin-top: 1px;
  color: var(--muted);
  font-size: .5rem;
  font-weight: 900;
  line-height: 1;
}

.stars-balance {
  order: 4;
  flex: 0 0 auto;
  min-width: 74px;
  height: 40px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #4a3100;
  font-size: .82rem;
  font-weight: 950;
  background:
    radial-gradient(circle at 20% 16%, rgba(255, 255, 255, .78), transparent 28%),
    linear-gradient(135deg, #fff6b8 0%, #ffd166 46%, #ffad2f 100%);
  border: 1px solid rgba(255, 188, 42, .9);
  box-shadow: 0 8px 18px rgba(255, 174, 46, .2), inset 0 1px 0 rgba(255, 255, 255, .8);
  cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

.stars-balance:active {
  transform: translateY(2px) scale(.97);
  box-shadow: 0 4px 12px rgba(255, 174, 46, .18), inset 0 1px 0 rgba(255, 255, 255, .75);
}

.stars-balance.balance-bump {
  animation: balanceBump .42s cubic-bezier(.2, 1.4, .3, 1);
}

.stars-icon {
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff8ce;
  font-size: .9rem;
  line-height: 1;
  text-shadow: 0 1px 0 #b87800, 0 0 9px rgba(255, 255, 255, .95);
  background: radial-gradient(circle, #fff5a8 0 18%, #ffd166 42%, #ff9f1c 78%);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .58), 0 0 14px rgba(255, 209, 102, .86);
}

.sound-btn {
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .96), rgba(255, 255, 255, .7)),
    linear-gradient(135deg, rgba(124, 77, 255, .16), rgba(47, 198, 255, .18));
}

.sound-btn svg {
  width: 24px;
  height: 24px;
  display: block;
  filter: drop-shadow(0 3px 4px rgba(45, 35, 90, .16));
}

.sound-btn .slash {
  transition: opacity .16s ease, transform .16s ease;
  transform-origin: center;
}

.sound-btn[data-muted="0"] .slash {
  opacity: 0;
  transform: scale(.8) rotate(-8deg);
}

.sound-btn[data-muted="1"] .slash {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.hidden { display: none !important; }

.app { position: relative; }

.screen {
  display: none;
  animation: popIn .26s ease both;
}

.screen.active { display: block; }

.hero {
  min-height: 184px;
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  text-align: center;
  padding-top: 0;
  margin: -6px 0 4px;
}

h1 {
  margin: 0;
  max-width: 100%;
  font-family: "Luckiest Guy", "Fredoka", ui-rounded, system-ui, sans-serif;
  font-size: clamp(1.88rem, 8.1vw, 2.98rem);
  line-height: .88;
  letter-spacing: 0;
  color: transparent;
  background: linear-gradient(90deg, var(--purple), var(--pink), var(--orange), var(--green), var(--blue));
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 8px 0 rgba(31, 35, 51, .08));
}

.tagline {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  max-width: 20rem;
  font-size: .78rem;
  opacity: 1;
}

.spark {
  position: absolute;
  width: 54px;
  height: 54px;
  transform: rotate(15deg);
  opacity: .62;
}

.spark::before,
.spark::after {
  content: "";
  position: absolute;
  inset: 22px 0;
  background: var(--yellow);
  border-radius: 8px;
}

.spark::after { transform: rotate(90deg); }
.spark-a { left: 18px; top: 38px; transform: scale(.68) rotate(15deg); animation: wobble 2.6s ease-in-out infinite; }
.spark-b { right: 24px; bottom: 20px; transform: rotate(42deg) scale(.58); animation: wobble 2.1s ease-in-out infinite reverse; }

.stickman-wrap {
  position: relative;
  width: 126px;
  height: 92px;
  margin-top: 0;
  display: grid;
  place-items: center;
  opacity: 1;
  animation: noodleBreath 2s ease-in-out infinite;
  transform-origin: center bottom;
}

.aura {
  position: absolute;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: conic-gradient(var(--yellow), var(--pink), var(--blue), var(--green), var(--yellow));
  opacity: .34;
  filter: blur(1px);
  animation: spin 5s linear infinite;
}

.stickman {
  --limb: 6px;
  --stickman-scale: .66;
  --stickman-rotate: 0deg;
  position: relative;
  width: 78px;
  height: 108px;
  z-index: 1;
  transition: transform .25s ease;
  transform: scale(var(--stickman-scale)) rotate(var(--stickman-rotate));
}

.stickman.power-1 { --stickman-scale: .72; --limb: 7px; }
.stickman.power-2 { --stickman-scale: .78; --limb: 8px; }
.stickman.power-3 { --stickman-scale: .86; --stickman-rotate: -2deg; --limb: 10px; }

.stickman span { position: absolute; display: block; background: var(--ink); }
.stickman .head {
  width: 34px;
  height: 34px;
  top: 0;
  left: 22px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 11px 13px, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 23px 13px, #fff 0 3px, transparent 4px),
    var(--ink);
}

.stickman .head::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 21px;
  width: 16px;
  height: 7px;
  border-bottom: 3px solid transparent;
  border-radius: 0 0 999px 999px;
  opacity: 0;
}

.stickman.mood-happy .head {
  background:
    radial-gradient(circle at 11px 12px, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 23px 12px, #fff 0 3px, transparent 4px),
    var(--green);
  box-shadow: 0 0 0 5px rgba(39, 209, 127, .16);
}

.stickman.mood-happy .head::after {
  border-bottom-color: #fff;
  opacity: 1;
}

.stickman.mood-facepalm .head {
  background:
    linear-gradient(135deg, transparent 0 43%, #fff 44% 57%, transparent 58%),
    radial-gradient(circle at 11px 13px, #fff 0 2px, transparent 3px),
    radial-gradient(circle at 23px 13px, #fff 0 2px, transparent 3px),
    var(--red);
  box-shadow: 0 0 0 5px rgba(255, 76, 97, .15);
}

.stickman.mood-facepalm .arm.left {
  top: 28px;
  left: 31px;
  transform: rotate(73deg);
}

.stickman.mood-facepalm .arm.right {
  top: 29px;
  right: 31px;
  transform: rotate(-73deg);
}

.stickman.mood-happy {
  animation: happyHop .38s ease both;
}

.stickman.mood-facepalm {
  animation: sadDip .38s ease both;
}

.stickman .body { width: var(--limb); height: 40px; top: 34px; left: 36px; border-radius: 8px; }
.stickman .arm, .stickman .leg { width: var(--limb); height: 39px; border-radius: 8px; transform-origin: top center; }
.stickman .arm.left { top: 40px; left: 34px; transform: rotate(45deg); }
.stickman .arm.right { top: 40px; right: 34px; transform: rotate(-45deg); }
.stickman .leg.left { top: 71px; left: 35px; transform: rotate(30deg); }
.stickman .leg.right { top: 71px; right: 35px; transform: rotate(-30deg); }

.power-label {
  position: absolute;
  bottom: 0;
  z-index: 2;
  background: var(--ink);
  color: var(--bg);
  padding: 4px 9px;
  border-radius: 999px;
  font-size: .66rem;
  font-weight: 900;
}

.teaser-stage {
  margin: 0 0 10px;
  position: relative;
  z-index: 2;
}

.hook-line {
  margin: 0 0 8px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f2333, #7c4dff);
  box-shadow: 0 8px 18px rgba(45, 35, 90, .14);
  font-size: .84rem;
  font-weight: 950;
}

body.dark .hook-line {
  background: linear-gradient(135deg, #f8f5ff, #7c4dff);
  color: #151520;
}

.teaser-card {
  width: 100%;
  padding: 15px;
  border-radius: var(--radius);
  background: #fff;
  border: 2px solid rgba(124, 77, 255, .12);
  box-shadow: 0 28px 68px rgba(45, 35, 90, .13), 0 10px 26px rgba(45, 35, 90, .08);
  position: relative;
  overflow: hidden;
}

body.dark .teaser-card {
  background: linear-gradient(180deg, rgba(36,38,55,.94), rgba(30,32,47,.84));
}

.teaser-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, var(--green), var(--yellow), var(--pink), var(--blue));
}

.teaser-meta {
  margin: 0 0 7px;
  color: var(--purple);
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
  opacity: .86;
}

.teaser-card h2 {
  max-width: 100%;
  font-size: clamp(1.56rem, 6.55vw, 2.22rem);
  line-height: 1.4;
  overflow-wrap: break-word;
}

.teaser-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  margin-top: 15px;
}

.teaser-option {
  min-width: 0;
  min-height: 60px;
  padding: 12px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .86));
  border: 2px solid rgba(124, 77, 255, .22);
  color: var(--ink);
  font-weight: 950;
  box-shadow: 0 7px 0 rgba(124, 77, 255, .14), 0 15px 22px rgba(45, 35, 90, .1);
  transition: transform .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
}

body.dark .teaser-option {
  background: linear-gradient(180deg, rgba(255, 255, 255, .11), rgba(255, 255, 255, .06));
}
.teaser-option:active {
  transform: translateY(4px) scale(.985);
  border-color: var(--purple);
  background: rgba(124, 77, 255, .12);
  box-shadow: 0 2px 0 rgba(124, 77, 255, .17), 0 7px 10px rgba(45, 35, 90, .08);
}

.mode-grid {
  display: grid;
  gap: 12px;
}

.promo-grid {
  gap: 8px;
  margin-top: 10px;
  opacity: .8;
}

.secondary-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mode-btn {
  min-height: 62px;
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  color: #fff;
  box-shadow: var(--button-shadow);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.mode-btn::after {
  content: "";
  position: absolute;
  inset: -60% -20% auto auto;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  z-index: -1;
}

.mode-btn span { font-size: 1.1rem; font-weight: 950; }
.mode-btn small { margin-top: 3px; font-weight: 800; opacity: .72; }
.hero-cta {
  min-height: 74px;
  align-items: center;
  text-align: center;
  transition: transform .14s ease, filter .14s ease;
}
.hero-cta span { font-size: 1.42rem; }
.secondary-modes .mode-btn {
  min-height: 58px;
  padding: 12px;
}
.secondary-modes .mode-btn span {
  font-size: 1rem;
  line-height: 1.05;
}
.secondary-modes .mode-btn small {
  font-size: .7rem;
  line-height: 1.15;
}
.mode-btn.primary { background: linear-gradient(135deg, var(--purple), var(--pink)); }
.mode-btn.orange { background: linear-gradient(135deg, #ff6b35, #ffb000); }
.mode-btn.green { background: linear-gradient(135deg, #11b870, #2fc6ff); }
.mode-btn.secondary {
  background: var(--card);
  color: var(--ink);
  border: .7px solid rgba(31, 35, 51, .1);
  box-shadow: 0 7px 0 rgba(45, 35, 90, .06), 0 12px 22px rgba(45, 35, 90, .08);
}
.mode-btn.tertiary {
  background: rgba(255, 255, 255, .44);
  color: var(--ink);
  border: .7px solid rgba(31, 35, 51, .1);
  box-shadow: 0 7px 0 rgba(45, 35, 90, .04), 0 12px 22px rgba(45, 35, 90, .06);
}
.mode-btn.secondary::after,
.mode-btn.tertiary::after { display: none; }
.mode-btn:active, .icon-btn:active, .pill-btn:active { transform: translateY(1px) scale(.98); }

.leaderboard {
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: none;
  opacity: .72;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-weight: 950;
  font-size: .94rem;
}

.text-btn {
  color: var(--purple);
  background: transparent;
  font-weight: 950;
  opacity: .84;
}

ol {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 6px;
}

ol li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 850;
  font-size: .9rem;
}

.score-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 18px 0 10px;
}

.quiz-hook {
  margin-top: 12px;
}

.mini-stats {
  margin: 0 0 8px;
}

.score-strip > div,
.duel-player {
  padding: 8px 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .58);
  border: 1px solid var(--line);
  box-shadow: none;
}

body.dark .score-strip > div,
body.dark .duel-player { background: rgba(255, 255, 255, .07); }

.score-strip span,
.duel-player span {
  display: block;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 900;
}

.score-strip strong,
.duel-player strong {
  display: block;
  margin-top: 1px;
  font-size: 1rem;
}

.duel-strip {
  display: grid;
  grid-template-columns: 1fr 62px 1fr;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}

.duel-player.rival { text-align: right; }
.duel-bars {
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
  display: grid;
  grid-template-rows: 1fr 1fr;
  padding: 5px;
  gap: 5px;
}
.duel-bars span {
  display: block;
  width: 10%;
  border-radius: 999px;
  transition: width .25s ease;
}
#meBar { background: var(--green); }
#rivalBar { background: var(--red); }

.question-card {
  min-height: 440px;
  padding: 18px 16px 16px;
  border-radius: var(--radius);
  background: #fff;
  border: 2px solid rgba(124, 77, 255, .12);
  box-shadow: 0 30px 72px rgba(45, 35, 90, .14), 0 12px 30px rgba(45, 35, 90, .08);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

body.dark .question-card {
  background: linear-gradient(180deg, rgba(33,35,52,.96), rgba(27,29,44,.86));
}

.question-card.correct { animation: correctPulse .55s ease; }
.question-card.wrong { animation: wrongShake .5s ease; }
.question-card.flip-next { animation: cardFlipNext .72s cubic-bezier(.2, .72, .25, 1) both; }
.question-card.locked {
  pointer-events: none;
}

.timer-line {
  height: 6px;
  border-radius: 999px;
  background: rgba(105, 112, 136, .18);
  overflow: hidden;
  margin-bottom: 12px;
}

.timer-line span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--yellow), var(--red));
  transition: width .2s linear;
}

.question-count {
  margin: 0 0 10px;
  color: var(--purple);
  font-size: .74rem;
  font-weight: 950;
  text-transform: uppercase;
  opacity: .78;
}

h2 {
  margin: 0;
  font-size: clamp(1.68rem, 7.8vw, 2.65rem);
  line-height: 1.4;
  letter-spacing: 0;
}

.question-card h2 {
  font-size: clamp(1.78rem, 8vw, 2.78rem);
}

.options {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 11px;
  margin-top: auto;
  padding-top: 22px;
}

.option-btn {
  width: 100%;
  min-width: 0;
  min-height: 66px;
  border-radius: var(--radius);
  padding: 12px;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: rgba(255, 255, 255, .72);
  color: var(--ink);
  border: 2px solid var(--line);
  font-weight: 900;
  box-shadow: 0 8px 0 rgba(124, 77, 255, .12), 0 16px 24px rgba(45, 35, 90, .1);
  transition: transform .14s ease, border-color .14s ease, background .14s ease, box-shadow .14s ease;
}

body.dark .option-btn { background: rgba(255, 255, 255, .08); }

.option-btn b {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--yellow), #fff1a8);
  color: #1f2333;
  font-size: .98rem;
}

.option-btn span {
  font-size: 1.03rem;
  line-height: 1.16;
}

.option-btn:not(:disabled):active {
  transform: translateY(-2px) scale(1.1);
  border-color: rgba(124, 77, 255, .45);
  box-shadow: 0 12px 0 rgba(124, 77, 255, .13), 0 22px 30px rgba(45, 35, 90, .12);
}

.option-btn.answer-pop {
  animation: answerPop .22s cubic-bezier(.18, 1.4, .28, 1) both;
}

.option-btn.correct {
  border-color: var(--green);
  background: rgba(39, 209, 127, .18);
  box-shadow: 0 0 0 6px rgba(39, 209, 127, .11);
}
.option-btn.correct b {
  background: var(--green);
  color: #fff;
}
.option-btn.correct b::before { content: "✓"; }
.option-btn.correct b { font-size: 0; }
.option-btn.correct b::before { font-size: 1.25rem; }
.option-btn.wrong {
  border-color: var(--red);
  background: rgba(255, 76, 97, .16);
}
.option-btn.wrong b {
  background: var(--red);
  color: #fff;
}
.option-btn.wrong b::before { content: "×"; font-size: 1.25rem; }
.option-btn.wrong b { font-size: 0; }
.option-btn.wrong-wiggle {
  animation: wrongBlinkShake .46s ease both;
}
.option-btn.eliminated {
  opacity: .25;
  filter: grayscale(.7) blur(.2px);
  transform: scale(.98);
}
.option-btn:disabled { cursor: default; }

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.pill-btn {
  min-height: 46px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(45, 35, 90, .16);
}

.pill-btn.soft {
  background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(224, 249, 255, .86));
  color: var(--ink);
  border: 1px solid rgba(124, 77, 255, .18);
  box-shadow: 0 6px 0 rgba(124, 77, 255, .1), 0 12px 20px rgba(45, 35, 90, .08);
}

.pill-btn.ghost {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}

.pill-btn.hint-buy {
  color: #3b2a00;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 255, 255, .78), transparent 32%),
    linear-gradient(135deg, #fff6b8, #ffd166 48%, #ffad2f);
  border: 1px solid rgba(255, 198, 55, .9);
  box-shadow: 0 8px 0 rgba(181, 113, 0, .16), 0 16px 28px rgba(255, 174, 46, .18);
}

.pill-btn.hint-buy:disabled {
  opacity: .62;
  filter: saturate(.75);
}

.result-screen {
  text-align: center;
  padding-top: 46px;
}

.result-burst {
  width: 132px;
  height: 132px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 4rem;
  background: conic-gradient(var(--yellow), var(--pink), var(--blue), var(--green), var(--yellow));
  box-shadow: var(--shadow);
  animation: bounceIn .55s ease both;
}

.result-screen h2 {
  font-size: 2.35rem;
}

.result-screen p {
  margin: 10px auto 18px;
  max-width: 21rem;
  color: var(--muted);
  font-weight: 850;
}

.battle-card {
  width: min(100%, 330px);
  height: auto;
  margin: 0 auto 14px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.upsell-panel {
  margin: 0 auto 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
  text-align: left;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.upsell-panel strong {
  display: block;
  font-size: .95rem;
  font-weight: 950;
}

.upsell-panel span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 850;
  line-height: 1.25;
}

.upsell-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.upsell-actions .pill-btn {
  min-height: 42px;
  font-size: .9rem;
}

.result-actions {
  display: grid;
  gap: 10px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: end center;
  padding: 18px;
  background: rgba(20, 20, 30, .54);
}

.modal-panel {
  width: min(100%, 490px);
  padding: 20px 18px 18px;
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
  animation: slideUp .22s ease both;
}

.modal-face { font-size: 3rem; }
.modal-panel h3 { margin: 6px 0; font-size: 1.5rem; }
.modal-panel p { margin: 0 0 14px; color: var(--muted); font-weight: 800; line-height: 1.4; }
.modal-actions { display: grid; gap: 9px; }
.modal-primary {
  min-height: 72px;
  align-items: center;
  text-align: center;
}
.modal-primary span { font-size: 1.28rem; }
.modal-panel .modal-note {
  margin: -3px 0 3px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
  line-height: 1.25;
}
.modal-secondary {
  min-height: 54px;
  align-items: center;
  text-align: center;
}
.modal-secondary span { font-size: 1.02rem; }
.modal-link {
  min-height: 42px;
  justify-self: center;
  padding: 0 12px;
  font-size: .92rem;
}

.shop-panel {
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 209, 102, .24), transparent 42%),
    radial-gradient(circle at 92% 8%, rgba(47, 198, 255, .22), transparent 44%),
    var(--card);
}

.shop-modal {
  place-items: center;
}

.shop-modal[data-mode="hearts"] .shop-card[data-shop-group="hint"],
.shop-modal[data-mode="hint"] .shop-card[data-shop-group="hearts"] {
  display: none;
}

.shop-options {
  display: grid;
  gap: 10px;
  margin: 12px 0 8px;
}

.shop-card {
  min-height: 86px;
  padding: 14px;
  border-radius: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 12px;
  align-items: center;
  text-align: left;
  background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(224, 249, 255, .84));
  border: 2px solid rgba(124, 77, 255, .16);
  box-shadow: 0 8px 0 rgba(124, 77, 255, .1), 0 16px 28px rgba(45, 35, 90, .1);
  transition: transform .14s ease, box-shadow .14s ease;
}

.shop-card:active {
  transform: translateY(5px) scale(.985);
  box-shadow: 0 3px 0 rgba(124, 77, 255, .13), 0 8px 16px rgba(45, 35, 90, .08);
}

.shop-card strong {
  font-size: 1.05rem;
  font-weight: 950;
}

.shop-card span {
  grid-column: 1;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 850;
}

.shop-card b {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 72px;
  padding: 9px 10px;
  border-radius: 999px;
  text-align: center;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(124, 77, 255, .22);
}

.shop-card.free-card b {
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.stars-modal {
  place-items: center;
  background: rgba(16, 18, 35, .42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.stars-panel {
  position: relative;
  overflow: hidden;
  padding-top: 22px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 209, 102, .36), transparent 42%),
    radial-gradient(circle at 92% 10%, rgba(47, 198, 255, .2), transparent 44%),
    rgba(255, 255, 255, .9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: rgba(255, 255, 255, .72);
}

.modal-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(45, 35, 90, .1);
  box-shadow: 0 8px 18px rgba(45, 35, 90, .12);
  font-size: 1.25rem;
  font-weight: 950;
  z-index: 2;
}

.modal-x:active {
  transform: scale(.94);
}

.stars-face {
  width: 76px;
  height: 76px;
  margin: 0 auto 4px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff9c8;
  font-size: 2.8rem;
  text-shadow: 0 3px 0 #ad7200, 0 0 16px rgba(255, 255, 255, .95);
  background: radial-gradient(circle at 35% 25%, #fff9be 0 18%, #ffd166 42%, #ff9f1c 80%);
  box-shadow: 0 0 0 6px rgba(255, 209, 102, .2), 0 16px 34px rgba(255, 174, 46, .24);
}

.stars-options {
  display: grid;
  gap: 11px;
  margin: 12px 0 8px;
}

.stars-pack {
  min-height: 76px;
  padding: 13px;
  border-radius: 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 12px;
  color: #fff;
  text-align: left;
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, .34), transparent 34%),
    linear-gradient(135deg, #7c4dff 0%, #4f7cff 54%, #2fc6ff 100%);
  border: 2px solid rgba(255, 255, 255, .5);
  box-shadow: 0 9px 0 rgba(45, 35, 90, .14), 0 18px 30px rgba(47, 198, 255, .18);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

.stars-pack.featured {
  border-color: rgba(255, 209, 102, .9);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, .42), transparent 36%),
    linear-gradient(135deg, #8f43ff 0%, #3f76ff 46%, #15d1ff 100%);
  box-shadow: 0 9px 0 rgba(45, 35, 90, .16), 0 20px 34px rgba(124, 77, 255, .2);
}

.stars-pack:active {
  transform: translateY(5px) scale(.985);
  box-shadow: 0 3px 0 rgba(45, 35, 90, .16), 0 9px 16px rgba(45, 35, 90, .08);
}

.stars-pack:disabled {
  cursor: wait;
  filter: saturate(.85);
}

.pack-copy {
  display: grid;
  gap: 3px;
}

.pack-copy strong,
.stars-pack b,
.stars-pack em {
  font-weight: 950;
}

.pack-copy strong {
  font-size: 1.08rem;
}

.pack-copy small {
  color: rgba(255, 255, 255, .78);
  font-size: .86rem;
  font-weight: 900;
}

.stars-pack em {
  grid-column: 1;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #4a3100;
  background: linear-gradient(135deg, #fff8b4, #ffd166);
  font-size: .68rem;
  font-style: normal;
  box-shadow: 0 4px 10px rgba(255, 209, 102, .22);
}

.stars-pack b {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 76px;
  padding: 10px 12px;
  border-radius: 999px;
  text-align: center;
  color: #362300;
  background: linear-gradient(135deg, #fff8b4, #ffd166 48%, #ffad2f);
  box-shadow: 0 6px 14px rgba(255, 209, 102, .26);
}

.stars-pack.loading b {
  font-size: 0;
}

.stars-pack.loading b::after {
  content: "Simulating...";
  font-size: .72rem;
}

.coin-pop {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  color: #ffd166;
  font-size: 1.08rem;
  line-height: 1;
  text-shadow: 0 1px 0 #9c6500, 0 0 12px rgba(255, 209, 102, .95);
  animation: coinPop .78s ease-out forwards;
}

.notice-modal {
  place-items: center;
}

.notice-panel {
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 209, 102, .28), transparent 42%),
    radial-gradient(circle at 86% 12%, rgba(124, 77, 255, .15), transparent 44%),
    #fff;
}

.energy-modal {
  place-items: center;
}

.energy-panel {
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 0%, rgba(47, 198, 255, .22), transparent 42%),
    radial-gradient(circle at 88% 10%, rgba(255, 209, 102, .28), transparent 42%),
    #fff;
}

.cry-stickman {
  width: 86px;
  height: 86px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e0f9ff, #fff2cf);
  box-shadow: inset 0 -8px 18px rgba(45, 35, 90, .08), 0 14px 28px rgba(45, 35, 90, .12);
}

.cry-head {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 16px 17px, #fff 0 4px, transparent 5px),
    radial-gradient(circle at 32px 17px, #fff 0 4px, transparent 5px),
    var(--ink);
}

.cry-head::before,
.cry-head::after {
  content: "";
  position: absolute;
  top: 25px;
  width: 7px;
  height: 15px;
  border-radius: 999px;
  background: linear-gradient(#8ee7ff, #2fc6ff);
  animation: tearDrop 1.3s ease-in-out infinite;
}

.cry-head::before { left: 11px; }
.cry-head::after { right: 11px; animation-delay: .24s; }

.energy-actions {
  display: grid;
  gap: 10px;
  margin: 14px 0 10px;
}

.energy-btn {
  min-height: 76px;
  padding: 14px 16px;
  border-radius: 20px;
  display: grid;
  gap: 3px;
  text-align: left;
  border: 2px solid rgba(124, 77, 255, .14);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

.energy-btn:active {
  transform: translateY(4px) scale(.985);
}

.energy-btn strong {
  font-size: 1.08rem;
  font-weight: 950;
}

.energy-btn span {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 850;
}

.energy-btn.ad {
  grid-template-columns: 64px 1fr;
  align-items: center;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(224,249,255,.9));
  color: var(--ink);
  box-shadow: 0 7px 0 rgba(47, 198, 255, .16), 0 14px 24px rgba(45, 35, 90, .09);
}

.video-reward-icon {
  position: relative;
  width: 54px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(135deg, #7c4dff, #2fc6ff);
  box-shadow: 0 8px 18px rgba(124, 77, 255, .22);
}

.video-reward-icon::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 13px;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 14px solid #fff;
  filter: drop-shadow(0 2px 0 rgba(45, 35, 90, .16));
}

.video-reward-icon::after {
  content: "";
  position: absolute;
  right: -13px;
  top: 10px;
  width: 18px;
  height: 24px;
  border-radius: 5px 13px 13px 5px;
  background: linear-gradient(135deg, #ff5aa8, #ffd166);
  clip-path: polygon(0 20%, 100% 0, 100% 100%, 0 80%);
}

.energy-copy {
  display: grid;
  gap: 3px;
}

.energy-copy > span {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 850;
}

.energy-btn.gold {
  position: relative;
  overflow: hidden;
  color: #332200;
  border-color: rgba(255, 198, 55, .85);
  background: linear-gradient(135deg, #fff8b4 0%, #ffd166 42%, #ffae2e 100%);
  box-shadow: 0 9px 0 rgba(181, 113, 0, .22), 0 18px 30px rgba(255, 174, 46, .24);
}

.energy-btn.gold::after {
  content: "";
  position: absolute;
  inset: -60% auto auto -40%;
  width: 80px;
  height: 220%;
  background: rgba(255, 255, 255, .52);
  transform: rotate(22deg);
  animation: goldShine 2.1s ease-in-out infinite;
}

.energy-btn.gold span {
  color: rgba(51, 34, 0, .68);
}

.energy-btn:disabled {
  cursor: wait;
  filter: saturate(.75);
  opacity: .82;
}

.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 24;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}

.confetti-canvas.active {
  opacity: 1;
}

.success-pop {
  position: fixed;
  inset: 0;
  z-index: 25;
  pointer-events: none;
  display: grid;
  place-items: center;
  padding: 24px;
}

.success-pop-card {
  min-width: min(84vw, 360px);
  padding: 20px 24px 18px;
  border-radius: 28px;
  display: grid;
  justify-items: center;
  gap: 6px;
  background:
    radial-gradient(circle at 30% 0%, rgba(255,255,255,.94), transparent 52%),
    linear-gradient(135deg, #7c4dff, #ff4fb8 48%, #ffd166);
  color: #fff;
  border: 3px solid rgba(255, 255, 255, .78);
  box-shadow: 0 16px 0 rgba(45, 35, 90, .13), 0 26px 56px rgba(45, 35, 90, .32);
  animation: successBounce .7s cubic-bezier(.18, 1.4, .28, 1) both;
}

.success-pop-card span {
  font-size: 2.5rem;
  line-height: 1;
  filter: drop-shadow(0 6px 0 rgba(31, 35, 51, .13));
}

.success-pop-card strong {
  font-family: "Luckiest Guy", "Fredoka", ui-rounded, system-ui, sans-serif;
  font-size: clamp(2.35rem, 13vw, 4rem);
  line-height: .9;
  letter-spacing: 0;
  text-shadow: 0 6px 0 rgba(31, 35, 51, .16);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 18px);
  transform: translate(-50%, 150%);
  z-index: 20;
  max-width: min(92vw, 430px);
  padding: 11px 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 900;
  box-shadow: var(--shadow);
  transition: transform .22s ease;
}

.toast.show { transform: translate(-50%, 0); }

@keyframes popIn {
  from { opacity: 0; transform: scale(.98) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes loadingPop {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.04); }
}

@keyframes loadingDot {
  0%, 100% { transform: translateY(0); opacity: .46; }
  50% { transform: translateY(-5px); opacity: 1; }
}

@keyframes noodleBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes spin { to { transform: rotate(1turn); } }
@keyframes wobble { 50% { transform: rotate(-12deg) scale(1.08); } }
@keyframes happyHop {
  0% { transform: translateY(0) scale(var(--stickman-scale)) rotate(var(--stickman-rotate)); }
  50% { transform: translateY(-7px) scale(calc(var(--stickman-scale) * 1.08)) rotate(var(--stickman-rotate)); }
  100% { transform: translateY(0) scale(var(--stickman-scale)) rotate(var(--stickman-rotate)); }
}
@keyframes sadDip {
  0% { transform: translateY(0) scale(var(--stickman-scale)) rotate(var(--stickman-rotate)); }
  50% { transform: translateY(5px) scale(calc(var(--stickman-scale) * .95)) rotate(-2deg); }
  100% { transform: translateY(0) scale(var(--stickman-scale)) rotate(var(--stickman-rotate)); }
}
@keyframes answerPop {
  0% { transform: scale(1); }
  55% { transform: scale(1.1); }
  100% { transform: scale(1); }
}
@keyframes balanceBump {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  45% { transform: scale(1.09); filter: brightness(1.16); }
}
@keyframes coinPop {
  0% {
    transform: translate(-50%, -50%) scale(.6);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.15) rotate(28deg);
    opacity: 0;
  }
}
@keyframes tearDrop {
  0%, 100% { transform: translateY(0); opacity: .3; }
  45% { transform: translateY(6px); opacity: 1; }
}
@keyframes goldShine {
  0% { transform: translateX(-70px) rotate(22deg); opacity: 0; }
  38% { opacity: .9; }
  62% { opacity: .2; }
  100% { transform: translateX(360px) rotate(22deg); opacity: 0; }
}
@keyframes correctPulse {
  0%, 100% { box-shadow: var(--shadow); }
  45% { box-shadow: 0 0 0 8px rgba(39, 209, 127, .24), 0 0 42px rgba(39, 209, 127, .58); }
}
@keyframes cardFlipNext {
  0% {
    transform: perspective(900px) rotateY(0) scale(1);
    filter: brightness(1);
  }
  45% {
    transform: perspective(900px) rotateY(86deg) scale(.98);
    filter: brightness(1.12);
  }
  100% {
    transform: perspective(900px) rotateY(0) scale(1);
    filter: brightness(1);
  }
}
@keyframes wrongShake {
  20%, 60% { transform: translateX(-8px); box-shadow: 0 0 0 8px rgba(255, 76, 97, .18), var(--shadow); }
  40%, 80% { transform: translateX(8px); }
}
@keyframes wrongBlinkShake {
  0%, 100% { transform: translateX(0) scale(1); filter: brightness(1); }
  12% { transform: translateX(-10px) scale(.99); filter: brightness(1.2); }
  24% { transform: translateX(9px) scale(1.01); filter: brightness(.9); }
  36% { transform: translateX(-8px) scale(.99); filter: brightness(1.18); }
  50% { transform: translateX(7px) scale(1.01); filter: brightness(.92); }
  66% { transform: translateX(-4px); filter: brightness(1.08); }
}
@keyframes successBounce {
  0% { transform: scale(.42) rotate(-8deg); opacity: 0; }
  58% { transform: scale(1.08) rotate(2deg); opacity: 1; }
  78% { transform: scale(.96) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); }
}
@keyframes bounceIn {
  0% { transform: scale(.5) rotate(-10deg); opacity: 0; }
  70% { transform: scale(1.08) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
@keyframes slideUp {
  from { transform: translateY(24px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@media (max-width: 360px) {
  .app-shell { padding-left: 12px; padding-right: 12px; }
  .hero { min-height: 174px; }
  .question-card { min-height: 390px; padding: 14px; }
  .option-btn { min-height: 58px; font-size: .94rem; }
  .teaser-option { min-height: 56px; font-size: .92rem; }
  .teaser-card h2 { font-size: 1.55rem; }
  .mode-btn span { font-size: 1.02rem; }
  .hero-cta span { font-size: 1.22rem; }
  .secondary-modes .mode-btn { min-height: 54px; }
  .secondary-modes .mode-btn span { font-size: .88rem; }
  .secondary-modes .mode-btn small { font-size: .68rem; }
}

@media (min-height: 760px) {
  .hero { min-height: 196px; }
  .question-card { min-height: 470px; }
}
