:root {
  color-scheme: light;
  --brand-deep: #24105f;
  --brand-purple: #6423d1;
  --brand-violet: #8c36ee;
  --brand-soft: #efe8ff;
  --fact-700: #007f86;
  --fact-600: #00a8ae;
  --fact-500: #13c9cd;
  --fake-700: #cf1f35;
  --fake-600: #ef3047;
  --fake-500: #ff5968;
  --orange: #ff9824;
  --success: #23b85d;
  --ink: #1f1645;
  --muted: #68647a;
  --line: #e2ddec;
  --paper: #ffffff;
  --canvas: #faf9ff;
  --font-ui: Arial, sans-serif;
  --type-display-size: 2.25rem;
  --type-heading-size: 1.25rem;
  --type-body-size: .84rem;
  --type-display-weight: 900;
  --type-heading-weight: 800;
  --type-body-weight: 600;
  --type-display-line: 1;
  --type-heading-line: 1.12;
  --type-body-line: 1.42;
  --card-shadow: 0 16px 40px rgba(48, 23, 105, .12), 0 3px 9px rgba(35, 24, 63, .06);
  --soft-shadow: 0 8px 20px rgba(48, 23, 105, .1), 0 2px 6px rgba(35, 24, 63, .06);
  font-family: var(--font-ui);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: inherit;
  font-style: normal;
}

strong,
b { font-weight: inherit; }

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
  background:
    radial-gradient(circle at 10% 5%, rgba(19, 201, 205, .13), transparent 27rem),
    radial-gradient(circle at 92% 94%, rgba(140, 54, 238, .13), transparent 29rem),
    var(--canvas);
  -webkit-font-smoothing: antialiased;
}

button,
a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(19, 201, 205, .68);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.svg-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  min-height: 100svh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 104% 1%, rgba(118, 66, 229, .1), transparent 11rem),
    radial-gradient(circle at -7% 99%, rgba(19, 201, 205, .08), transparent 13rem),
    linear-gradient(180deg, #fff 0%, #fdfcff 58%, #faf9ff 100%);
  box-shadow: 0 0 60px rgba(35, 19, 70, .1);
}

.app-shell::before {
  position: absolute;
  z-index: 0;
  top: 18px;
  right: 12px;
  width: 76px;
  height: 52px;
  opacity: .16;
  background-image: radial-gradient(circle, var(--brand-violet) 1.4px, transparent 1.8px);
  background-size: 10px 10px;
  content: "";
  pointer-events: none;
}

.screen {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  animation: screen-in 240ms ease both;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen--loading {
  align-items: center;
  justify-content: center;
  gap: 18px;
  color: var(--brand-purple);
}

.loader-logo-wrap {
  width: 158px;
  height: 158px;
  overflow: hidden;
  border-radius: 36px;
  box-shadow: var(--soft-shadow);
}

.loader-logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

.loader {
  width: 34px;
  height: 34px;
  border: 4px solid #e6def7;
  border-top-color: var(--brand-purple);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.landing-screen {
  justify-content: space-between;
  overflow: hidden;
  text-align: center;
}

.brand-orbit {
  position: absolute;
  border-radius: 50%;
  opacity: .62;
  pointer-events: none;
}

.brand-orbit--one {
  top: -92px;
  right: -126px;
  width: 246px;
  height: 246px;
  background: radial-gradient(circle, rgba(19, 201, 205, .23), transparent 68%);
}

.brand-orbit--two {
  bottom: 104px;
  left: -158px;
  width: 270px;
  height: 270px;
  background: radial-gradient(circle, rgba(140, 54, 238, .18), transparent 68%);
}

.brand-confetti i {
  position: absolute;
  z-index: 2;
  width: 6px;
  height: 22px;
  border-radius: 999px;
  background: var(--fake-500);
  pointer-events: none;
}

.brand-confetti i:nth-child(1) { top: 72px; left: 43px; transform: rotate(-43deg); }
.brand-confetti i:nth-child(2) { top: 136px; left: 24px; height: 15px; background: var(--fact-500); transform: rotate(62deg); }
.brand-confetti i:nth-child(3) { top: 45px; right: 61px; height: 15px; background: var(--brand-violet); transform: rotate(-24deg); }
.brand-confetti i:nth-child(4) { top: 121px; right: 25px; background: var(--orange); transform: rotate(48deg); }
.brand-confetti i:nth-child(5) { top: 207px; left: 36px; height: 13px; background: var(--orange); transform: rotate(77deg); }
.brand-confetti i:nth-child(6) { top: 235px; right: 36px; height: 14px; background: var(--fact-500); transform: rotate(-60deg); }
.brand-confetti i:nth-child(7) { top: 287px; left: 52px; height: 11px; background: #9c68ff; transform: rotate(35deg); }
.brand-confetti i:nth-child(8) { top: 296px; right: 54px; height: 11px; background: var(--fake-500); transform: rotate(-38deg); }

.landing-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  padding: 5px 0 0;
}

.hero-logo {
  width: min(88%, 355px);
  max-height: 46svh;
  flex: 0 1 auto;
  border-radius: 42px;
  object-fit: contain;
  mix-blend-mode: multiply;
  filter: drop-shadow(0 13px 17px rgba(54, 15, 108, .13)) saturate(1.06);
}

.intro-copy {
  align-self: stretch;
  width: 100%;
  margin-block: auto;
  padding: 14px 0;
  text-align: center;
}

.intro-copy h1,
.screen-header h1,
.results-screen > h1 {
  margin: 0;
  color: var(--brand-deep);
  font-size: var(--type-heading-size);
  font-weight: var(--type-heading-weight);
  line-height: var(--type-heading-line);
}

.intro-copy p {
  width: 100%;
  max-width: 315px;
  margin: 7px auto 0;
  color: #514c66;
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

.screen-actions {
  display: grid;
  gap: 10px;
  width: 100%;
}

.landing-actions {
  position: relative;
  z-index: 3;
  padding-top: 5px;
}

.button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 13px 20px;
  font-size: var(--type-heading-size);
  font-weight: var(--type-heading-weight);
  line-height: var(--type-heading-line);
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.button:hover { filter: brightness(1.04) saturate(1.03); }
.button:active { transform: translateY(1px) scale(.995); }
.button:disabled { cursor: not-allowed; opacity: .42; filter: grayscale(.35); box-shadow: none; }

.button svg,
.text-button svg,
.icon-button svg,
.header-info svg,
.timeout-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button--primary {
  min-height: 57px;
  color: #fff;
  background: linear-gradient(180deg, #9639f0 0%, #7025d5 72%, #5a19bd 100%);
  box-shadow: 0 7px 0 #46109a, 0 14px 25px rgba(100, 32, 202, .26);
  text-shadow: 0 1px 1px rgba(39, 9, 84, .25);
}

.button--primary:active {
  box-shadow: 0 3px 0 #46109a, 0 8px 15px rgba(100, 32, 202, .22);
  transform: translateY(4px);
}

.button--secondary {
  min-height: 51px;
  color: var(--brand-deep);
  border: 1px solid #d9d4e7;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 3px 8px rgba(40, 31, 63, .07);
}

.button--secondary svg { color: var(--brand-purple); }

.button-icon--play {
  position: relative;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-radius: 50%;
  background: #fff;
}

.button-icon--play::after {
  position: absolute;
  top: 8px;
  left: 11px;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 10px solid var(--brand-purple);
  content: "";
}

.text-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  padding: 7px 12px;
  color: var(--brand-purple);
  background: transparent;
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
  cursor: pointer;
}

.text-button svg { width: 18px; height: 18px; }

.mindubi-link {
  justify-self: center;
  color: var(--brand-purple);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
  text-decoration: none;
}

.mindubi-link:hover { text-decoration: underline; }

.screen-header {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: start;
  margin: 2px 0 14px;
}

.screen-header--centered { text-align: center; }
.screen-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #5f5a73;
  background: transparent;
  cursor: pointer;
}

.icon-button:hover { background: #f1edf9; }

.header-info {
  display: inline-grid;
  width: 36px;
  height: 36px;
  place-items: center;
  justify-self: end;
  color: var(--brand-purple);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 2px 0 10px;
}

.category-button {
  --topic-color: #0aaeb2;
  --topic-light: #15c9ca;
  position: relative;
  display: grid;
  grid-template-columns: 31px minmax(0, 1fr) 21px;
  min-height: 57px;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 13px;
  padding: 9px 9px 9px 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--topic-light), var(--topic-color));
  box-shadow: 0 5px 11px color-mix(in srgb, var(--topic-color) 24%, transparent);
  cursor: pointer;
  transition: opacity 160ms ease, filter 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.category-button:hover { transform: translateY(-1px); }
.category-button:active { transform: translateY(1px); }
.category-button[data-category-id="animals"] { --topic-color: #029ca2; --topic-light: #15c8c5; }
.category-button[data-category-id="earth"] { --topic-color: #d86500; --topic-light: #ff9c24; }
.category-button[data-category-id="human"] { --topic-color: #6825c5; --topic-light: #9946e8; }
.category-button[data-category-id="science"] { --topic-color: #078d9a; --topic-light: #16bec0; }
.category-button[data-category-id="history"] { --topic-color: #5020a7; --topic-light: #7b38d5; }
.category-button[data-category-id="food"] { --topic-color: #b6309c; --topic-light: #df5ac2; }
.category-button[data-category-id="technology"] { --topic-color: #007f99; --topic-light: #12adbd; }
.category-button[data-category-id="popculture"] { --topic-color: #6f318f; --topic-light: #a34cbd; }
.category-button[data-category-id="sport"] { --topic-color: #3344ae; --topic-light: #5968d8; }
.category-button[data-category-id="language"] { --topic-color: #596174; --topic-light: #7f8aa0; }

.category-button.is-inactive {
  color: #9692a3;
  border: 1px solid #e2e0e8;
  background: #f4f3f7;
  box-shadow: none;
}

.category-button svg {
  width: 29px;
  height: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.category-button strong {
  min-width: 0;
  overflow: hidden;
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
  text-align: left;
  text-overflow: ellipsis;
}

.category-check {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  color: var(--topic-color);
  background: #fff;
  box-shadow: 0 2px 5px rgba(37, 20, 74, .14);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

.category-button.is-inactive .category-check {
  border-color: #c9c6d0;
  color: transparent;
  background: transparent;
  box-shadow: none;
}

.selection-warning {
  margin: 3px 0 7px;
  color: var(--fake-700);
  text-align: center;
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

.topics-actions { margin-top: auto; padding-top: 9px; }

.game-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

.game-meta span { width: 4px; height: 4px; border-radius: 50%; background: #aaa5b7; }

.game-screen,
.reveal-screen { padding-bottom: max(13px, env(safe-area-inset-bottom)); }

.game-header {
  display: grid;
  grid-template-columns: 50px 1fr 50px;
  min-height: 53px;
  align-items: center;
}

.question-counter {
  justify-self: center;
  color: var(--brand-deep);
  font-size: var(--type-heading-size);
  font-weight: var(--type-heading-weight);
  line-height: var(--type-heading-line);
}

.timer-ring {
  --time-progress: 1;
  --timer-color: var(--fact-500);
  position: relative;
  display: grid;
  width: 49px;
  height: 49px;
  place-items: center;
  justify-self: end;
  border-radius: 50%;
  background: conic-gradient(var(--timer-color) calc(var(--time-progress) * 1turn), #e7e5ef 0);
  box-shadow: 0 4px 9px rgba(53, 21, 108, .12);
}

.timer-ring::before { position: absolute; inset: 5px; border-radius: inherit; background: #fff; content: ""; }
.timer-ring span {
  position: relative;
  z-index: 1;
  color: var(--brand-deep);
  font-size: var(--type-heading-size);
  font-weight: var(--type-heading-weight);
  line-height: var(--type-heading-line);
}

.progress-track {
  width: calc(100% - 8px);
  height: 5px;
  margin: 3px auto 15px;
  overflow: hidden;
  border-radius: 99px;
  background: #e9e6f0;
}

.progress-track span {
  display: block;
  width: 5%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-violet), var(--fact-500));
  transition: width 300ms ease;
}

.card-stage {
  position: relative;
  flex: 1;
  min-height: 405px;
  max-height: 575px;
  margin: 0 3px;
}

.question-card {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid #ddd8e8;
  border-radius: 27px;
  padding: 59px 23px 25px;
  background:
    radial-gradient(circle at 2% 100%, rgba(255, 89, 104, .1), transparent 33%),
    radial-gradient(circle at 98% 2%, rgba(19, 201, 205, .12), transparent 34%),
    linear-gradient(160deg, #fff, #fefefe 65%, #fbf9ff);
  box-shadow: var(--card-shadow);
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
}

.question-card:active { cursor: grabbing; }
.question-card.is-snapping { transition: transform 420ms cubic-bezier(.2, 1.3, .35, 1); }
.question-card.is-committing { transition: transform 230ms cubic-bezier(.45, .05, .85, .45), opacity 230ms ease; }

.question-card--behind {
  z-index: 1;
  inset: 10px 8px -7px;
  opacity: .58;
  transform: scale(.974);
  box-shadow: 0 8px 18px rgba(47, 18, 101, .08);
  pointer-events: none;
}

.category-pill {
  position: absolute;
  top: 16px;
  left: 50%;
  max-width: calc(100% - 86px);
  overflow: hidden;
  transform: translateX(-50%);
  border-radius: 8px;
  padding: 6px 12px;
  color: #fff;
  background: linear-gradient(180deg, #18cdd0, #07969d);
  box-shadow: 0 4px 9px rgba(2, 137, 143, .22);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subtopic-icon {
  width: 248px;
  height: 248px;
  flex: 0 0 auto;
  align-self: center;
  margin-inline: auto;
  border: 4px solid #fff;
  border-radius: 50px;
  background-color: #eeedf1;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: contain;
  box-shadow: 0 11px 23px rgba(31, 23, 55, .19), 0 0 0 1px rgba(54, 42, 76, .12);
}

.subtopic-icon--small { width: 112px; height: 112px; border-radius: 28px; }

.subtopic-name {
  margin: 12px 0 7px;
  color: var(--fact-700);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

.question-card h1 {
  max-width: 360px;
  margin: 0;
  color: var(--brand-deep);
  font-size: var(--type-heading-size);
  font-weight: var(--type-heading-weight);
  line-height: var(--type-heading-line);
  hyphens: auto;
  overflow-wrap: break-word;
  text-align: center;
  text-wrap: balance;
}

.swipe-stamp {
  position: absolute;
  z-index: 5;
  top: 66px;
  border: 4px solid currentColor;
  border-radius: 10px;
  padding: 5px 10px;
  opacity: 0;
  font-size: var(--type-heading-size);
  font-weight: var(--type-heading-weight);
  line-height: var(--type-heading-line);
  pointer-events: none;
}

.swipe-stamp--fake { right: 20px; color: var(--fake-600); transform: rotate(10deg); }
.swipe-stamp--fact { left: 20px; color: var(--fact-600); transform: rotate(-10deg); }

.swipe-hint {
  margin: 18px 0 7px;
  color: var(--muted);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
  text-align: center;
}

.answer-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr);
  align-items: center;
  min-height: 57px;
  gap: 7px;
}

.answer-button {
  display: flex;
  min-width: 0;
  min-height: 55px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  font-size: var(--type-heading-size);
  font-weight: var(--type-heading-weight);
  line-height: var(--type-heading-line);
  box-shadow: 0 6px 13px rgba(33, 17, 62, .16);
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease;
}

.answer-button:hover { filter: brightness(1.04); }
.answer-button:active { transform: translateY(2px); }
.answer-button:disabled { opacity: .4; cursor: not-allowed; }
.answer-button--fake { background: linear-gradient(180deg, var(--fake-500), var(--fake-700)); }
.answer-button--fact { background: linear-gradient(180deg, var(--fact-500), var(--fact-700)); }
.answer-arrow {
  font-size: var(--type-heading-size);
  font-weight: var(--type-heading-weight);
  line-height: var(--type-heading-line);
}

.answer-divider {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #ddd8e8;
  border-radius: 50%;
  color: #797286;
  background: #fff;
  box-shadow: 0 3px 9px rgba(45, 28, 80, .08);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

.header-spacer { width: 42px; }
.reveal-screen { overflow-y: auto; }
.reveal-screen .progress-track { margin-bottom: 15px; }

.explanation-card {
  --state-color: var(--fact-500);
  position: relative;
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  gap: 14px;
  justify-content: space-between;
  min-height: 500px;
  border: 1px solid #ddd8e8;
  border-radius: 27px;
  padding: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--state-color) 11%, transparent), transparent 29%),
    linear-gradient(155deg, #fff, #fefcff);
  box-shadow: var(--card-shadow);
}

.explanation-card.is-correct { --state-color: var(--success); }
.explanation-card.is-wrong { --state-color: var(--fake-500); }
.explanation-card.is-timeout { --state-color: var(--orange); }

.explanation-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: var(--state-color);
  content: "";
}

.timeout-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 0;
  border: 1px solid #ffd09a;
  border-radius: 15px;
  padding: 10px 13px;
  color: #a94d00;
  background: linear-gradient(135deg, #fff9ef, #fff0db);
  box-shadow: 0 6px 14px rgba(255, 152, 36, .13);
  text-align: left;
}

.timeout-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
}

.timeout-banner > span:last-child { display: grid; gap: 1px; }
.timeout-banner strong,
.timeout-banner small {
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

.timeout-banner small { color: #a3662f; }

.reveal-subtopic {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin: 0;
  color: var(--fact-700);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
  text-align: center;
}

.reveal-icon-stage {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  isolation: isolate;
}

.reveal-icon-stage .subtopic-icon {
  position: relative;
  z-index: 1;
}

.answer-confetti {
  position: absolute;
  z-index: 2;
  inset: -30px;
  pointer-events: none;
}

.answer-confetti i {
  --confetti-x: 0px;
  --confetti-y: -60px;
  --confetti-turn: 180deg;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 14px;
  transform: translate(-50%, -50%) scale(.35);
  border-radius: 3px;
  background: var(--fact-500);
  opacity: 0;
  will-change: transform, opacity;
}

.reveal-icon-stage.is-celebrating .answer-confetti i {
  animation: answer-confetti-burst 720ms cubic-bezier(.16, .72, .25, 1) both;
}

.answer-confetti i:nth-child(1) { --confetti-x: -66px; --confetti-y: -58px; --confetti-turn: -220deg; background: var(--fake-500); }
.answer-confetti i:nth-child(2) { --confetti-x: -35px; --confetti-y: -76px; --confetti-turn: 190deg; background: var(--orange); animation-delay: 30ms; }
.answer-confetti i:nth-child(3) { --confetti-x: 4px; --confetti-y: -82px; --confetti-turn: -240deg; background: var(--brand-violet); animation-delay: 55ms; }
.answer-confetti i:nth-child(4) { --confetti-x: 43px; --confetti-y: -72px; --confetti-turn: 230deg; background: var(--fact-500); animation-delay: 20ms; }
.answer-confetti i:nth-child(5) { --confetti-x: 70px; --confetti-y: -43px; --confetti-turn: -190deg; background: var(--fake-500); animation-delay: 65ms; }
.answer-confetti i:nth-child(6) { --confetti-x: 79px; --confetti-y: -3px; --confetti-turn: 260deg; background: var(--orange); animation-delay: 35ms; }
.answer-confetti i:nth-child(7) { --confetti-x: 64px; --confetti-y: 45px; --confetti-turn: -250deg; background: var(--brand-violet); animation-delay: 70ms; }
.answer-confetti i:nth-child(8) { --confetti-x: 25px; --confetti-y: 69px; --confetti-turn: 210deg; background: var(--fact-500); animation-delay: 40ms; }
.answer-confetti i:nth-child(9) { --confetti-x: -24px; --confetti-y: 67px; --confetti-turn: -210deg; background: var(--fake-500); animation-delay: 75ms; }
.answer-confetti i:nth-child(10) { --confetti-x: -62px; --confetti-y: 43px; --confetti-turn: 240deg; background: var(--orange); animation-delay: 25ms; }
.answer-confetti i:nth-child(11) { --confetti-x: -78px; --confetti-y: 5px; --confetti-turn: -230deg; background: var(--brand-violet); animation-delay: 60ms; }
.answer-confetti i:nth-child(12) { --confetti-x: -77px; --confetti-y: -31px; --confetti-turn: 200deg; background: var(--fact-500); animation-delay: 45ms; }

@keyframes answer-confetti-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.35) rotate(0); }
  14%, 78% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--confetti-x)), calc(-50% + var(--confetti-y))) scale(.9) rotate(var(--confetti-turn));
  }
}

.reveal-statement {
  width: 100%;
  margin: 0;
  color: var(--brand-deep);
  font-size: var(--type-heading-size);
  font-weight: var(--type-heading-weight);
  line-height: var(--type-heading-line);
  hyphens: auto;
  overflow-wrap: break-word;
  text-align: center;
  text-wrap: balance;
}

.reveal-answer-controls {
  flex: 0 0 auto;
  width: 100%;
  margin: 0;
}

.reveal-answer-choice {
  position: relative;
  cursor: default;
  pointer-events: none;
  transition: none;
  user-select: none;
}

.reveal-answer-choice:hover { filter: none; }
.reveal-answer-choice:active { transform: none; }
.reveal-answer-choice.is-muted { opacity: .38; filter: saturate(.5); }

.reveal-answer-choice.is-correct-choice,
.reveal-answer-choice.is-user-wrong {
  opacity: 1;
}

.reveal-answer-choice.is-correct-choice {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--success), 0 7px 16px rgba(35, 184, 93, .22);
}

.reveal-answer-choice.is-user-wrong {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--fake-600), 0 7px 16px rgba(239, 48, 71, .2);
}

.reveal-answer-choice.is-correct-choice::after,
.reveal-answer-choice.is-user-wrong::after {
  position: absolute;
  top: -8px;
  right: -7px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
  box-shadow: 0 3px 8px rgba(31, 22, 69, .22);
  content: "✓";
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

.reveal-answer-choice.is-user-wrong::after {
  background: var(--fake-600);
  content: "×";
}

.reveal-detail-panel {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  min-height: 205px;
  border: 2px solid color-mix(in srgb, var(--state-color) 18%, #e4dff0);
  border-radius: 16px;
  padding: 12px 14px 13px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--state-color) 7%, #faf7ff), #fff 72%);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--state-color) 11%, transparent);
}

.your-answer {
  margin: 0 0 10px;
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--brand-deep);
  background: color-mix(in srgb, var(--state-color) 10%, white);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
  text-align: center;
}

.explanation-text {
  margin: 0;
  color: #302b43;
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

.source-row {
  margin-top: auto;
  padding-top: 13px;
  color: #676176;
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

.source-row a { color: var(--brand-purple); text-decoration: none; }
.source-row a:hover { text-decoration: underline; }
.source-row a::after { content: " ↗"; }
.reveal-actions { padding-top: 12px; }

.results-screen {
  align-items: center;
  overflow-y: auto;
  text-align: center;
}

.results-brand {
  display: grid;
  width: 128px;
  height: 112px;
  flex: 0 0 auto;
  place-items: center;
  margin: -2px auto 0;
  overflow: visible;
}

.results-brand img {
  display: block;
  width: 112px;
  height: 112px;
  border-radius: 24px;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: multiply;
  filter: saturate(1.05) drop-shadow(0 6px 8px rgba(51, 20, 107, .1));
}

.celebration i {
  position: absolute;
  width: 7px;
  height: 18px;
  border-radius: 3px;
  background: var(--fact-500);
  animation: confetti 1.4s ease-out both;
}

.celebration i:nth-child(1) { top: 48px; left: 42px; transform: rotate(23deg); }
.celebration i:nth-child(2) { top: 92px; left: 69px; background: var(--fake-500); transform: rotate(-20deg); }
.celebration i:nth-child(3) { top: 42px; right: 50px; background: var(--orange); transform: rotate(42deg); }
.celebration i:nth-child(4) { top: 113px; right: 28px; background: var(--brand-violet); transform: rotate(-25deg); }
.celebration i:nth-child(5) { top: 151px; left: 30px; background: #4dcc65; transform: rotate(70deg); }
.celebration i:nth-child(6) { top: 146px; right: 72px; background: #32a8ff; transform: rotate(15deg); }

@keyframes confetti {
  from { opacity: 0; translate: 0 -18px; }
  to { opacity: 1; translate: 0 0; }
}

.gauge-wrap {
  width: min(100%, 318px);
  height: 160px;
  margin: 1px auto -7px;
}

.gauge-wrap svg { width: 100%; height: 100%; overflow: visible; }
.gauge-segments path { fill: none; stroke-width: 27; stroke-linecap: round; }
.gauge-needle { stroke: var(--brand-deep); stroke-width: 7; stroke-linecap: round; filter: drop-shadow(0 2px 2px rgba(26, 9, 58, .27)); }
.gauge-hub { fill: var(--brand-purple); stroke: #fff; stroke-width: 3; }

.result-score {
  color: var(--brand-purple);
  font-size: var(--type-display-size);
  font-weight: var(--type-display-weight);
  line-height: var(--type-display-line);
}

.result-band {
  min-width: 230px;
  margin: 9px auto 4px;
  border-radius: 8px;
  padding: 6px 18px;
  color: #fff;
  background: linear-gradient(180deg, #18c3bd, #078f94);
  box-shadow: 0 4px 10px rgba(7, 143, 148, .16);
  font-size: var(--type-heading-size);
  font-weight: var(--type-heading-weight);
  line-height: var(--type-heading-line);
}

.result-message {
  margin: 3px 0 12px;
  color: #514c64;
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  border: 1px solid #e1dceb;
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 4px 11px rgba(48, 34, 74, .07);
}

.stats-row > div {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: center;
  gap: 2px 7px;
  padding: 9px 5px;
}

.stats-row > div + div { border-left: 1px solid #e6e2ed; }
.stats-row strong {
  font-size: var(--type-heading-size);
  font-weight: var(--type-heading-weight);
  line-height: var(--type-heading-line);
}

.stats-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

.stat-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  font-size: var(--type-heading-size);
  font-weight: var(--type-heading-weight);
  line-height: var(--type-heading-line);
}

.stat-icon--correct { background: var(--success); }
.stat-icon--wrong { background: var(--fake-600); }
.stat-icon--invalid { background: #858393; }
.results-actions {
  flex: 1;
  grid-template-rows: auto auto auto minmax(32px, 1fr);
  margin-top: 13px;
}

.button--share {
  min-height: 56px;
  color: #fff;
  background: linear-gradient(108deg, #ff8b22, #f42f73 49%, #7c2dde);
  box-shadow: 0 7px 18px rgba(211, 41, 116, .24);
}

.results-new-game { color: var(--brand-deep); border-color: rgba(100, 35, 209, .25); }

.share-status {
  min-height: 18px;
  margin: -2px 0 0;
  color: var(--fact-700);
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}

.results-mindubi-link {
  align-self: end;
  padding: 10px 14px 2px;
}

.help-dialog {
  width: min(calc(100% - 36px), 420px);
  border: 0;
  border-radius: 25px;
  padding: 28px 24px 24px;
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(34, 13, 75, .32);
}

.help-dialog::backdrop { background: rgba(26, 13, 53, .5); backdrop-filter: blur(3px); }
.help-dialog h2 {
  margin: 0 38px 18px 0;
  color: var(--brand-deep);
  font-size: var(--type-heading-size);
  font-weight: var(--type-heading-weight);
  line-height: var(--type-heading-line);
}

.help-dialog ol {
  margin: 0 0 24px;
  padding-left: 22px;
  color: #4d495d;
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
}
.help-dialog li + li { margin-top: 9px; }
.dialog-close { position: absolute; top: 14px; right: 14px; }

.toast {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  max-width: calc(100% - 36px);
  transform: translate(-50%, 20px);
  border-radius: 12px;
  padding: 10px 16px;
  color: #fff;
  background: var(--brand-deep);
  box-shadow: var(--card-shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  font-size: var(--type-body-size);
  font-weight: var(--type-body-weight);
  line-height: var(--type-body-line);
  text-align: center;
}

.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 640px) {
  body { display: grid; place-items: center; padding: 24px; }
  .app-shell { min-height: min(900px, calc(100vh - 48px)); border: 1px solid #e0daeb; border-radius: 31px; }
  .screen { min-height: min(900px, calc(100vh - 48px)); }
}

@media (max-height: 780px) {
  .screen { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .hero-logo { width: min(75%, 280px); max-height: 38svh; }
  .brand-confetti i:nth-child(n + 7) { display: none; }
  .intro-copy { padding: 8px 0; }
  .intro-copy p { margin-top: 4px; }
  .landing-actions { gap: 8px; }
  .landing-actions .button { min-height: 49px; padding-block: 10px; }
  .landing-actions .text-button { min-height: 34px; padding-block: 5px; }
  .screen-header { margin-bottom: 9px; }
  .category-grid { gap: 7px; padding-bottom: 7px; }
  .category-button { min-height: 50px; padding-block: 7px; }
  .topics-actions { padding-top: 5px; }
  .topics-actions .button { min-height: 50px; }
  .game-header { min-height: 49px; }
  .progress-track { margin-bottom: 11px; }
  .card-stage { min-height: 376px; }
  .question-card { padding-top: 55px; }
  .subtopic-icon { width: 208px; height: 208px; border-radius: 43px; }
  .subtopic-icon--small { width: 94px; height: 94px; border-radius: 24px; }
  .swipe-hint { margin-top: 13px; }
  .answer-button { min-height: 51px; }
  .answer-divider { width: 38px; height: 38px; }
  .reveal-screen .progress-track { margin-bottom: 10px; }
  .explanation-card { min-height: 438px; gap: 9px; padding: 16px; }
  .reveal-subtopic { margin: 0; }
  .timeout-banner { padding-block: 8px; }
  .timeout-icon { width: 37px; height: 37px; }
  .reveal-detail-panel { padding: 10px 12px; }
  .reveal-actions .button { min-height: 50px; }
  .results-brand { width: 105px; height: 85px; }
  .results-brand img { width: 88px; height: 88px; }
  .gauge-wrap { height: 130px; }
  .result-band { margin-top: 7px; padding-block: 5px; }
  .result-message { margin-bottom: 9px; }
  .stats-row > div { padding-block: 7px; }
  .results-actions { margin-top: 10px; gap: 8px; }
  .results-actions .button { min-height: 48px; padding-block: 10px; }
}

@media (max-width: 370px) {
  .screen { padding-left: 13px; padding-right: 13px; }
  .topics-screen .screen-header { grid-template-columns: 32px 1fr 32px; }
  .category-grid { gap: 7px; }
  .category-button { grid-template-columns: 27px minmax(0, 1fr) 19px; gap: 5px; padding-inline: 8px; }
  .category-button svg { width: 26px; height: 26px; }
  .category-check { width: 19px; height: 19px; }
  .question-card { padding-inline: 18px; }
  .answer-controls { grid-template-columns: minmax(0, 1fr) 39px minmax(0, 1fr); gap: 5px; }
  .answer-divider { width: 36px; height: 36px; }
  .explanation-card { padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
