:root {
  color-scheme: dark;
  --bg: #0f1020;
  --panel: #1a1b28;
  --panel-2: #212233;
  --accent: #6842ff;
  --accent-2: #8b6bff;
  --text: #fff;
  --muted: #aaadbe;
  --secondary: #2a2b3d;
  --good: #22c55e;
  --bad: #ff4d6d;
  --gold: #ffd23f;
  font-family:
    "Nunito",
    ui-rounded,
    "SF Pro Rounded",
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
body {
  padding: 10px;
}
button {
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.qb-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
[hidden] {
  display: none !important;
}

.qb-app {
  width: min(900px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* HUD */
.qb-hud {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.qb-brand {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #ffe066, #ff9f1c 55%, #ff4d6d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.qb-chips {
  display: flex;
  gap: 6px;
  margin-left: auto;
  min-width: 0;
}
.qb-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--panel-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 2px 0 rgba(0, 0, 0, 0.35);
  white-space: nowrap;
}
.qb-chip span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.qb-chip strong {
  font-size: 17px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.qb-chip-score strong {
  min-width: 3ch;
  text-align: right;
}
.qb-chip-streak svg {
  width: 16px;
  height: 16px;
  fill: #6d6f86;
  transition: fill 0.2s;
}
.qb-chip-streak.is-hot {
  background: linear-gradient(180deg, #ff9f1c, #ff5e3a);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 0 #b3361c,
    0 0 16px rgba(255, 120, 40, 0.45);
}
.qb-chip-streak.is-hot svg {
  fill: #fff6c2;
}
.qb-chip.bump {
  animation: qb-bump 0.35s ease;
}
.qb-icon-btn {
  flex: none;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--secondary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 3px 0 rgba(0, 0, 0, 0.4);
  cursor: pointer;
}
.qb-icon-btn svg {
  width: 20px;
  height: 20px;
}
.qb-icon-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Stage */
.qb-stage {
  position: relative;
  min-height: 486px;
  border-radius: 24px;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(104, 66, 255, 0.35), transparent 60%),
    radial-gradient(60% 50% at 100% 100%, rgba(255, 77, 109, 0.12), transparent 70%),
    var(--panel);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 10px 30px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  isolation: isolate;
}
.qb-play {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  min-height: 486px;
}
.qb-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.qb-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--cat, var(--accent));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    0 2px 0 rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 55%;
}
.qb-progress {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.qb-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #34364c;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}
.qb-dot.is-current {
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}
.qb-dot.is-good {
  background: linear-gradient(180deg, #5ef08d, #16a34a);
}
.qb-dot.is-bad {
  background: linear-gradient(180deg, #ff8196, #e11d48);
}

/* Timer */
.qb-timer {
  display: flex;
  align-items: center;
  gap: 10px;
}
.qb-timer-track {
  flex: 1;
  height: 16px;
  border-radius: 999px;
  background: #0d0e1a;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  padding: 3px;
}
.qb-timer-fill {
  height: 100%;
  width: 100%;
  border-radius: 999px;
  transform-origin: left center;
  background: linear-gradient(180deg, #7dffb0, #22c55e 55%, #14924a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}
.qb-timer.is-mid .qb-timer-fill {
  background: linear-gradient(180deg, #ffe98a, #ffc21a 55%, #d99400);
}
.qb-timer.is-low .qb-timer-fill {
  background: linear-gradient(180deg, #ff9aa9, #ff3d5e 55%, #c81e3e);
}
.qb-timer-num {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #7b5cff, #5530f0);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    0 3px 0 #3a1fb3;
}
.qb-timer.is-low .qb-timer-num {
  background: linear-gradient(180deg, #ff6b83, #e11d48);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    0 3px 0 #9f1239;
  animation: qb-pulse 0.5s ease-in-out infinite alternate;
}
.qb-timer.is-bonus .qb-timer-num {
  animation: qb-bump 0.45s ease;
}

/* Question */
.qb-question-card {
  position: relative;
  flex: 1;
  min-height: 108px;
  display: grid;
  place-items: center;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #eceaff);
  color: #1b1440;
  box-shadow:
    inset 0 -4px 0 rgba(104, 66, 255, 0.18),
    0 6px 0 rgba(0, 0, 0, 0.3);
  text-align: center;
}
.qb-question {
  margin: 0;
  font-size: clamp(18px, 2.6vw, 25px);
  font-weight: 900;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.qb-question.enter {
  animation: qb-enter 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.qb-pop {
  position: absolute;
  top: -16px;
  right: 14px;
  pointer-events: none;
}
.qb-pop span {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(180deg, #5ef08d, #16a34a);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    0 4px 0 #0f6e33;
  animation: qb-float 1.4s ease forwards;
}
.qb-pop span.miss {
  background: linear-gradient(180deg, #ff8196, #e11d48);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    0 4px 0 #9f1239;
}
.qb-pop small {
  font-size: 13px;
  margin-left: 6px;
  opacity: 0.9;
}

/* Answers */
.qb-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.qb-answer {
  --c1: #ff6b83;
  --c2: #e8304f;
  --edge: #a3172f;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 12px 16px 14px 12px;
  border: 0;
  border-radius: 18px;
  text-align: left;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0) 48%),
    linear-gradient(180deg, var(--c1), var(--c2));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    inset 0 -3px 0 rgba(0, 0, 0, 0.12),
    0 6px 0 var(--edge),
    0 10px 18px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease,
    opacity 0.25s ease,
    filter 0.25s ease;
  min-width: 0;
}
.qb-a1 {
  --c1: #5cb4ff;
  --c2: #2672e8;
  --edge: #16489e;
}
.qb-a2 {
  --c1: #ffe066;
  --c2: #f5a60a;
  --edge: #a86a00;
  color: #3a2300;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}
.qb-a3 {
  --c1: #4fe08d;
  --c2: #13a152;
  --edge: #0b6b36;
}
@media (hover: hover) {
  .qb-answer:not(:disabled):hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
  }
}
.qb-answer:not(:disabled):active {
  transform: translateY(4px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 2px 0 var(--edge),
    0 4px 8px rgba(0, 0, 0, 0.3);
}
.qb-answer:disabled {
  cursor: default;
}
.qb-letter {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
  font-weight: 900;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.2);
}
.qb-a2 .qb-letter {
  background: rgba(90, 50, 0, 0.15);
}
.qb-answer-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.qb-mark {
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: none;
  place-items: center;
  background: #fff;
}
.qb-mark svg {
  width: 20px;
  height: 20px;
}
.qb-answer.is-removed {
  opacity: 0.18;
  filter: grayscale(1);
  transform: scale(0.96);
  box-shadow: none;
}
.qb-answer.is-removed .qb-answer-text {
  text-decoration: line-through;
}
.qb-answers.is-revealed .qb-answer {
  opacity: 0.35;
  filter: saturate(0.5);
}
.qb-answers.is-revealed .qb-answer.is-correct {
  opacity: 1;
  filter: none;
  --c1: #5ef08d;
  --c2: #16a34a;
  --edge: #0f6e33;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.45),
    0 6px 0 var(--edge),
    0 0 0 4px #fff,
    0 0 28px rgba(94, 240, 141, 0.7);
  animation: qb-pop-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.5);
}
.qb-answers.is-revealed .qb-answer.is-wrong {
  opacity: 1;
  filter: none;
  --c1: #ff8196;
  --c2: #e11d48;
  --edge: #9f1239;
  color: #fff;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  animation: qb-shake 0.45s ease;
}
.qb-answer.is-correct .qb-mark,
.qb-answer.is-wrong .qb-mark {
  display: grid;
}
.qb-answer.is-correct .qb-mark {
  color: #16a34a;
}
.qb-answer.is-wrong .qb-mark {
  color: #e11d48;
}
.qb-answers.is-revealed .qb-a2.is-correct .qb-letter,
.qb-answers.is-revealed .qb-a2.is-wrong .qb-letter {
  background: rgba(0, 0, 0, 0.18);
}

/* Lifelines + next */
.qb-bottom {
  display: flex;
  justify-content: center;
  min-height: 52px;
}
.qb-lifelines {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.qb-life {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 16px 6px 6px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
  font-size: 14px;
  background: var(--secondary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 0 rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition:
    transform 0.12s,
    opacity 0.2s;
}
.qb-life-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(180deg, #8b6bff, #5a34f5);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 2px 0 #3a1fb3;
  white-space: nowrap;
}
.qb-life-icon small {
  font-size: 8px;
  opacity: 0.85;
}
.qb-life-icon svg {
  width: 18px;
  height: 18px;
}
#qb-time .qb-life-icon {
  background: linear-gradient(180deg, #5cd2ff, #1b8fe0);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 2px 0 #0f5d99;
}
#qb-skip .qb-life-icon {
  background: linear-gradient(180deg, #ffb35c, #f07a14);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.35),
    0 2px 0 #a3500a;
}
.qb-life:not(:disabled):active {
  transform: translateY(3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.qb-life:disabled {
  opacity: 0.35;
  cursor: default;
}
.qb-life.is-used .qb-life-icon {
  filter: grayscale(1);
}

.qb-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 22px;
  border: 0;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 900;
  background: var(--secondary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 4px 0 rgba(0, 0, 0, 0.45);
  cursor: pointer;
  overflow: hidden;
}
.qb-btn svg {
  width: 20px;
  height: 20px;
}
.qb-btn-primary {
  background: linear-gradient(180deg, #8b6bff, var(--accent));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.3),
    0 4px 0 #3a1fb3,
    0 8px 18px rgba(104, 66, 255, 0.4);
}
.qb-btn:active {
  transform: translateY(3px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.qb-btn-big {
  min-height: 56px;
  padding: 12px 34px;
  font-size: 19px;
}
.qb-next {
  min-width: 180px;
  animation: qb-enter 0.3s ease;
}
.qb-next-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 100%;
  background: rgba(255, 255, 255, 0.55);
  transform-origin: left center;
  transform: scaleX(0);
}
.qb-next-bar.run {
  animation: qb-fill var(--dur, 2s) linear forwards;
}

/* FX */
.qb-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}
.qb-particle {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  animation: qb-burst 0.9s cubic-bezier(0.1, 0.7, 0.3, 1) forwards;
}
.qb-flash {
  position: absolute;
  inset: 0;
  animation: qb-flash 0.5s ease forwards;
}
.qb-combo {
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 900;
  white-space: nowrap;
  background: linear-gradient(180deg, #ffb35c, #ff5e3a);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    0 5px 0 #a3321a,
    0 0 30px rgba(255, 120, 40, 0.6);
  animation: qb-combo 1.2s ease forwards;
}

/* Overlays */
.qb-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  padding: 12px;
  background: rgba(12, 12, 28, 0.82);
  backdrop-filter: blur(6px);
  overflow-y: auto;
}
.qb-card {
  width: min(640px, 100%);
  margin: auto;
  padding: 18px 20px 20px;
  border-radius: 26px;
  text-align: center;
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(104, 66, 255, 0.35), transparent 70%),
    var(--panel-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 40px rgba(0, 0, 0, 0.5);
  animation: qb-pop-in 0.4s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
.qb-logo-row {
  display: flex;
  justify-content: center;
  margin-bottom: 2px;
}
.qb-logo-bolt {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffe066, #ff9f1c);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, 0.55),
    0 5px 0 #b35b00,
    0 10px 24px rgba(255, 159, 28, 0.45);
  transform: rotate(-8deg);
}
.qb-logo-bolt svg {
  width: 32px;
  height: 32px;
  fill: #fff;
  filter: drop-shadow(0 2px 0 rgba(160, 70, 0, 0.6));
}
.qb-logo {
  margin: 6px 0 4px;
  font-size: clamp(30px, 6vw, 42px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  background: linear-gradient(180deg, #fff 20%, #ffd76a 60%, #ff9f1c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 #3a1fb3);
}
.qb-sub {
  margin: 0 auto 12px;
  max-width: 440px;
  color: var(--muted);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
}
.qb-pick {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cfc6ff;
}
.qb-cats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.qb-cat {
  --c1: #8b6bff;
  --c2: #5a34f5;
  --edge: #3a1fb3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 96px;
  padding: 10px 6px 12px;
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0) 50%),
    linear-gradient(180deg, var(--c1), var(--c2));
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    0 5px 0 var(--edge),
    0 8px 16px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: transform 0.12s;
  min-width: 0;
}
@media (hover: hover) {
  .qb-cat:hover {
    transform: translateY(-3px);
  }
}
.qb-cat:active {
  transform: translateY(4px);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.4),
    0 1px 0 var(--edge);
}
.qb-cat svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.2));
}
.qb-cat-name {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}
.qb-cat-best {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  white-space: nowrap;
}

.qb-kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #cfc6ff;
}
.qb-end-title {
  font-size: clamp(26px, 5vw, 36px);
}
.qb-stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  font-size: 34px;
  line-height: 1;
}
.qb-stars span {
  color: #3a3c55;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.35);
}
.qb-stars span.on {
  color: var(--gold);
  text-shadow:
    0 3px 0 #b37d00,
    0 0 18px rgba(255, 210, 63, 0.6);
  animation: qb-pop-in 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.6) backwards;
}
.qb-stars span.on:nth-child(2) {
  animation-delay: 0.15s;
}
.qb-stars span.on:nth-child(3) {
  animation-delay: 0.3s;
}
.qb-final {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 4px 0 8px;
}
.qb-final strong {
  font-size: 40px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.qb-newbest {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  color: #3a2300;
  background: linear-gradient(180deg, #ffe066, #f5a60a);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.5),
    0 3px 0 #a86a00;
  animation: qb-bump 0.6s ease 0.3s backwards;
}
.qb-endstats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.qb-endstats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
}
.qb-endstats strong {
  font-size: 20px;
  font-weight: 900;
}
.qb-endstats span {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.qb-review {
  list-style: none;
  margin: 0 0 14px;
  padding: 4px;
  max-height: 150px;
  overflow-y: auto;
  text-align: left;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}
.qb-review li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 8px;
  border-radius: 10px;
}
.qb-review li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.qb-review-icon {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 900;
  background: linear-gradient(180deg, #5ef08d, #16a34a);
}
.qb-review li.bad .qb-review-icon {
  background: linear-gradient(180deg, #ff8196, #e11d48);
}
.qb-review-body {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.35;
}
.qb-review-q {
  display: block;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.qb-review-a {
  display: block;
  color: var(--muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}
.qb-review-a b {
  color: #7dffb0;
}
.qb-review-a s {
  color: #ff9aa9;
}
.qb-review-pts {
  flex: none;
  font-size: 13px;
  font-weight: 900;
  color: #7dffb0;
  font-variant-numeric: tabular-nums;
}
.qb-review li.bad .qb-review-pts {
  color: var(--muted);
}
.qb-card-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.qb-help {
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
kbd {
  display: inline-block;
  min-width: 20px;
  padding: 1px 5px;
  border-radius: 6px;
  font: inherit;
  font-weight: 900;
  font-size: 11px;
  color: #fff;
  background: var(--secondary);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.45);
}

.qb-answers.shake {
  animation: qb-shake 0.4s ease;
}

@keyframes qb-bump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes qb-pulse {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.1);
  }
}
@keyframes qb-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes qb-pop-in {
  0% {
    transform: scale(0.8);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes qb-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-8px);
  }
  40% {
    transform: translateX(7px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(3px);
  }
}
@keyframes qb-float {
  0% {
    transform: translateY(10px) scale(0.6);
    opacity: 0;
  }
  15% {
    transform: translateY(0) scale(1.1);
    opacity: 1;
  }
  30% {
    transform: scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translateY(-18px);
    opacity: 0;
  }
}
@keyframes qb-burst {
  from {
    transform: translate(0, 0) rotate(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.4);
    opacity: 0;
  }
}
@keyframes qb-flash {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
@keyframes qb-combo {
  0% {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0;
  }
  20% {
    transform: translate(-50%, -50%) scale(1.15);
    opacity: 1;
  }
  35% {
    transform: translate(-50%, -50%) scale(1);
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -80%) scale(1);
    opacity: 0;
  }
}
@keyframes qb-fill {
  to {
    transform: scaleX(1);
  }
}

@media (max-width: 640px) {
  body {
    padding: 8px;
  }
  .qb-brand {
    display: none;
  }
  .qb-chips {
    margin-left: 0;
    flex: 1;
  }
  .qb-chip {
    padding: 5px 6px;
    gap: 0;
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    border-radius: 14px;
    line-height: 1.1;
  }
  .qb-chip span {
    font-size: 9px;
  }
  .qb-chip strong {
    font-size: 15px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .qb-chip-streak {
    flex-direction: row;
    gap: 3px;
  }
  .qb-chip-score strong {
    min-width: 0;
  }
  .qb-play {
    padding: 12px;
    gap: 10px;
  }
  .qb-answers {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .qb-answer {
    min-height: 56px;
    font-size: 17px;
    padding: 8px 12px 10px 8px;
  }
  .qb-letter {
    width: 34px;
    height: 34px;
  }
  .qb-question-card {
    min-height: 96px;
    padding: 14px;
  }
  .qb-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .qb-cat {
    min-height: 80px;
    gap: 3px;
    padding: 8px 4px 10px;
  }
  .qb-cat svg {
    width: 24px;
    height: 24px;
  }
  .qb-cat-name {
    font-size: 13px;
  }
  .qb-sub {
    font-size: 14px;
    margin-bottom: 10px;
  }
  .qb-logo-bolt {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }
  .qb-logo-bolt svg {
    width: 26px;
    height: 26px;
  }
  .qb-card {
    padding: 16px 12px 18px;
  }
  .qb-life {
    padding-right: 12px;
    gap: 6px;
  }
  .qb-life-label {
    font-size: 13px;
  }
  .qb-dot {
    width: 9px;
    height: 9px;
  }
}
@media (max-width: 370px) {
  .qb-chip-best {
    display: none;
  }
  .qb-life-label {
    display: none;
  }
  .qb-life {
    padding-right: 6px;
  }
  .qb-cat-name {
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .qb-fx {
    display: none;
  }
  .qb-pop span {
    animation: none !important;
  }
}
