/* Apollo AI dashboard — static clone */
:root {
  --bg-deep: #0a0e1a;
  --bg-elevated: rgba(15, 23, 42, 0.85);
  --card: rgba(15, 23, 42, 0.72);
  --card-strong: rgba(15, 23, 42, 0.9);
  --border: rgba(148, 163, 184, 0.12);
  --border-soft: rgba(255, 255, 255, 0.08);
  --text: #f8fafc;
  --text-muted: rgba(248, 250, 252, 0.55);
  --text-dim: rgba(248, 250, 252, 0.4);
  --blue: #3b82f6;
  --blue-deep: #1e3a8a;
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.35);
  --radius-sm: 0.75rem;
  --radius-md: 1rem;
  --radius-lg: 1.25rem;
  --radius-xl: 1.5rem;
  --shadow-card: 0 18px 50px rgba(0, 0, 0, 0.35);
  --shadow-blue: 0 12px 40px rgba(59, 130, 246, 0.25);
  --font-sans: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Outfit", var(--font-sans);
  --container: 42rem;
  --vip-banner-h: 5.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  padding-bottom: var(--vip-banner-h);
}

.page.banner-dismissed {
  padding-bottom: 0;
}

.bg-gradient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: linear-gradient(
    135deg,
    rgba(30, 58, 138, 0.12) 0%,
    transparent 45%,
    rgba(59, 130, 246, 0.06) 100%
  );
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Header */
.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: var(--card-strong);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.site-header .container.header-inner {
  max-width: none;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.brand-sub {
  margin: 0.15rem 0 0;
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1;
}

.header-pills {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.btn-vip-header {
  border: none;
  cursor: pointer;
  padding: 0.35rem 0.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5625rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 9999px;
  color: #0a0a0a;
  background: linear-gradient(90deg, #fbbf24, #d97706);
  border: 1px solid rgba(252, 211, 77, 0.5);
  box-shadow: 0 0 10px var(--amber-glow);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-vip-header:hover {
  transform: scale(1.03);
  filter: brightness(1.05);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-shrink: 0;
}

.header-meta {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  padding-left: 0.75rem;
}

.header-meta-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
}

.header-meta-sub {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.45;
}

.hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: block;
  }
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.btn-icon:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.12);
}

.btn-icon-round {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.icon-sm {
  width: 0.875rem;
  height: 0.875rem;
}

.icon-lg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Main */
.main-content {
  position: relative;
  z-index: 10;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.main-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Quiz tab: page layout (not modal) */
.main-inner:has(#panel-quiz:not([hidden])) {
  flex: 1;
  min-height: 0;
}

.main-inner:has(#panel-quiz:not([hidden])) .tabs {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.main-inner:has(#panel-quiz:not([hidden])) .tab-panels {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0;
}

.main-inner:has(#panel-quiz:not([hidden])) .container {
  max-width: 100%;
}

/* Tabs */
.tabs-list {
  display: flex;
  width: 100%;
  max-width: 20rem;
  margin: 0 auto 2rem;
  padding: 0.25rem;
  gap: 0.25rem;
  background: var(--card-strong);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.tabs-trigger {
  flex: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0.5rem 0.5rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.tabs-trigger:hover {
  color: var(--text);
}

.tabs-trigger.is-active {
  color: #fff;
  background: var(--blue);
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.tab-panels {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tab-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tab-panel[hidden] {
  display: none !important;
}

.tab-panel-bonus {
  min-height: 12rem;
}

/* Level card */
.level-wrap {
  display: flex;
  justify-content: center;
}

.level-card {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.08));
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.08);
  cursor: pointer;
  color: inherit;
  text-align: left;
  transition: transform 0.15s;
}

.level-card:active {
  transform: scale(0.98);
}

.icon-award {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--amber);
}

.level-label {
  margin: 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.level-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.level-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--amber);
}

.icon-help {
  width: 1rem;
  height: 1rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Cards */
.card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.card-muted {
  background: var(--card);
  backdrop-filter: blur(12px);
  padding: 1.5rem;
}

.card-balance {
  padding: 2rem;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.65) 100%);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
}

.card-balance::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(59, 130, 246, 0.15), transparent 70%);
  pointer-events: none;
}

.balance-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.balance-label-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.icon-blue {
  color: var(--blue);
}

.balance-kicker {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.8);
}

.balance-amount {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 10vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, var(--blue), var(--blue-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.balance-glow-line {
  height: 0.25rem;
  width: 8rem;
  margin: 0 auto;
  border-radius: 9999px;
  background: linear-gradient(90deg, transparent, var(--blue), transparent);
}

.card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-row-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.card-heading {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
}

.text-amber-bold {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--amber);
}

.progress {
  height: 0.75rem;
  width: 100%;
  border-radius: 9999px;
  background: rgba(30, 41, 59, 0.9);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: var(--blue);
  transition: width 0.3s ease;
}

.progress-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
}

.text-muted-xs {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.text-progress-pct {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

/* Tasks */
.tasks-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
}

.tasks-label {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.tasks-count {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
}

.tasks-count-dim {
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
}

.tasks-available {
  text-align: right;
}

.tasks-available-label {
  margin: 0 0 0.4rem;
}

.tasks-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.2), rgba(30, 58, 138, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.tasks-badge-num {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
}

/* Buttons */
.btn {
  font-family: var(--font-display);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-outline-tutorial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1.25rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue);
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-outline-tutorial:hover {
  background: rgba(59, 130, 246, 0.1);
}

.btn-primary-wide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1.5rem 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  border: none;
  background: linear-gradient(90deg, var(--blue-deep), var(--blue));
  box-shadow: var(--shadow-blue);
}

.btn-primary-wide:hover {
  filter: brightness(1.08);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.card-stat {
  text-align: center;
  padding: 1.25rem;
}

.stat-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.stat-label-upper {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
}

.stat-value-amber {
  color: var(--amber);
}

/* Bonus placeholder */
.bonus-placeholder {
  text-align: center;
  padding: 3rem 1.5rem;
}

.bonus-placeholder-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.bonus-placeholder-text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Withdraw footer */
.withdraw-footer {
  margin-top: 0.5rem;
}

.btn-withdraw {
  width: 100%;
  padding: 1.25rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.5);
  color: rgba(255, 255, 255, 0.45);
  cursor: not-allowed;
}

.support-wrap {
  margin-top: 1rem;
  text-align: center;
}

.btn-link-support {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  border: none;
  background: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  font-family: inherit;
}

.btn-link-support:hover {
  color: #fff;
}

/* Legal */
.legal-footer {
  position: relative;
  z-index: 10;
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--card-strong);
  backdrop-filter: blur(12px);
  padding: 1.5rem 1rem;
}

.legal-inner {
  text-align: center;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 1.5rem;
}

.legal-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  text-decoration: none;
}

@media (min-width: 768px) {
  .legal-link {
    font-size: 0.875rem;
  }
}

.legal-link:hover {
  color: #fff;
}

.legal-copy {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  color: #64748b;
}

/* VIP banner */
.vip-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(245, 158, 11, 0.35);
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12), rgba(217, 119, 6, 0.22), rgba(245, 158, 11, 0.12));
  backdrop-filter: blur(12px);
}

.vip-banner.is-dismissed {
  display: none;
}

.vip-close {
  position: absolute;
  top: -0.75rem;
  right: 1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: var(--amber);
  color: #0a0a0a;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  z-index: 110;
  transition: background 0.15s;
}

.vip-close:hover {
  background: #fbbf24;
}

.vip-close .icon {
  width: 1rem;
  height: 1rem;
}

.vip-inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  max-width: 80rem;
}

@media (min-width: 768px) {
  .vip-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.vip-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.vip-crown-box {
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.2);
  flex-shrink: 0;
}

.icon-crown {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--amber);
}

.vip-text {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 251, 235, 0.92);
  line-height: 1.35;
}

@media (min-width: 640px) {
  .vip-text {
    font-size: 0.875rem;
  }
}

@media (min-width: 768px) {
  .vip-text {
    font-size: 1rem;
  }
}

.btn-vip-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 1.5rem;
  min-height: 2.75rem;
  border: none;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 900;
  color: #0a0a0a;
  background: var(--amber);
  box-shadow: 0 0 25px var(--amber-glow);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

@media (min-width: 768px) {
  .btn-vip-cta {
    width: auto;
    padding: 0.5rem 2rem;
  }
}

.btn-vip-cta:hover {
  transform: scale(1.03);
  background: #d97706;
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn-primary-wide:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.15);
}

.btn-primary-wide:disabled:hover {
  filter: grayscale(0.15);
}

/* Quiz tab — full-width page layout (not a modal card) */
.tab-panel-quiz {
  padding-top: 0.15rem;
}

.tab-panel-quiz:not([hidden]) {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  background:
    radial-gradient(circle at 8% 12%, rgba(59, 130, 246, 0.12), transparent 36%),
    radial-gradient(circle at 92% 100%, rgba(37, 99, 235, 0.14), transparent 44%),
    linear-gradient(180deg, rgba(8, 13, 28, 0.8), rgba(5, 8, 17, 0.92));
}

/* wrapper fills remaining height below tabs bar */
.quiz-page-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  padding: 0;
}

/* the panel spans full available width — no modal card */
.quiz-page-panel {
  --quiz-bg: #0d1428;
  --quiz-surface: rgba(20, 31, 58, 0.86);
  --quiz-border: rgba(148, 163, 184, 0.15);
  --quiz-border-soft: rgba(148, 163, 184, 0.10);
  --quiz-primary: #3b82f6;
  --quiz-primary-soft: rgba(59, 130, 246, 0.22);
  --quiz-muted: rgba(226, 232, 240, 0.64);
  --quiz-success: #22c55e;
  --quiz-success-soft: rgba(34, 197, 94, 0.15);
  --quiz-danger: #ef4444;
  --quiz-danger-soft: rgba(239, 68, 68, 0.16);

  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
  max-width: 60rem;
  margin-inline: auto;
  padding: 1.5rem 1.25rem 1.25rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: quiz-card-enter 280ms ease-out;
}

/* is-wide: image grid questions use full panel width */
.quiz-page-panel.is-wide {
  max-width: 100%;
}

.quiz-page-panel .task-modal-options {
  flex: 1 1 auto;
  min-height: 0;
}

.quiz-page-panel .quiz-actions {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 0.75rem;
}

.quiz-page-panel .quiz-legal,
.quiz-page-panel .task-modal-feedback,
.quiz-page-panel .quiz-brand-stack,
.quiz-page-panel .quiz-task-progress,
.quiz-page-panel .quiz-question-card {
  flex-shrink: 0;
}

.main-inner:has(#panel-quiz:not([hidden])) .tabs-list {
  max-width: none;
  width: 100%;
  margin-bottom: 1rem;
}

@media (max-width: 42rem) {
  .quiz-page-panel {
    padding: 1rem 0.85rem;
  }
}

@media (max-width: 30rem) {
  .quiz-page-panel .quiz-back-tasks {
    min-height: 2.75rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.8125rem;
  }

  .quiz-page-panel .task-modal-option--text {
    min-height: 3rem;
    padding: 1rem 1.125rem;
    font-size: 1rem;
  }

  .quiz-page-panel .btn-quiz-confirm,
  .quiz-page-panel .btn-quiz-skip {
    min-height: 3rem;
    font-size: 1rem;
  }

  .quiz-page-panel .task-modal-question {
    font-size: 1.05rem;
  }
}

.quiz-back-tasks {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0;
  border: none;
  background: transparent;
  color: rgba(191, 219, 254, 0.9);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  text-decoration-color: transparent;
}

.quiz-back-tasks:hover {
  color: #dbeafe;
  text-decoration-color: currentColor;
}

.quiz-back-tasks:focus-visible {
  outline: 2px solid var(--quiz-primary);
  outline-offset: 2px;
  border-radius: 0.4rem;
}

.quiz-header {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.quiz-brand-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.quiz-brand-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.95rem;
  margin-bottom: 0;
  padding: 1.1rem 1.15rem;
  border-radius: 0.9rem;
  border: 1px solid var(--quiz-border-soft);
  background: var(--quiz-surface);
}

.quiz-kicker {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: rgba(148, 163, 184, 0.95);
  text-transform: uppercase;
}

.quiz-brand-logo {
  flex-shrink: 0;
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Flex parents can shrink <img> to 0 width; lock intrinsic box for SVG marks */
.quiz-brand-logo .quiz-brand-logo-img {
  display: block;
  flex-shrink: 0;
  height: 2.5rem;
  width: auto;
  max-height: 2.5rem;
  max-width: min(12rem, 85vw);
  object-fit: contain;
}

.quiz-brand-name {
  flex-shrink: 0;
  margin: 0.1rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 3vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f8fafc;
}

.quiz-wordmark {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3.6vw, 1.5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f8fafc;
}

.quiz-brand-tagline {
  margin: 0;
  max-width: 28rem;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--quiz-muted);
}

.quiz-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.quiz-reward-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.4);
  background: var(--quiz-primary-soft);
  color: #bfdbfe;
  white-space: nowrap;
}

.quiz-reward-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  opacity: 0.95;
}

.quiz-reward-amount {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.quiz-task-progress {
  margin: 0;
  text-align: left;
  font-size: 0.775rem;
  font-weight: 500;
  color: var(--quiz-muted);
}

.quiz-content {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  flex: 1;
  min-height: 0;
}

.quiz-question-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid var(--quiz-border-soft);
  border-radius: 0.9rem;
  padding: 1rem 1rem;
  margin-bottom: 0;
}

.task-modal-question {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.98);
  line-height: 1.5;
  text-align: left;
}

.task-modal-options {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.task-modal-options--text {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.task-modal-options--images {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

@media (min-width: 40rem) {
  .task-modal-options--images {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
}

.task-modal-option {
  font-family: var(--font-sans);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.task-modal-option:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.task-modal-option--text {
  width: 100%;
  text-align: left;
  padding: 0.95rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(248, 250, 252, 0.92);
  border-radius: 0.85rem;
  border: 1px solid var(--quiz-border-soft);
  background: rgba(20, 30, 56, 0.74);
}

.task-modal-option--text:hover:not(:disabled) {
  border-color: rgba(96, 165, 250, 0.48);
  background: rgba(30, 44, 76, 0.88);
  transform: translateY(-1px);
}

.task-modal-option--text.is-selected {
  border-color: var(--quiz-primary);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.24), 0 10px 26px rgba(15, 23, 42, 0.48);
  background: rgba(37, 99, 235, 0.17);
}

.task-modal-option.is-correct {
  border-color: var(--quiz-success);
  background: var(--quiz-success-soft);
}

.task-modal-option.is-incorrect {
  border-color: var(--quiz-danger);
  background: var(--quiz-danger-soft);
}

.task-modal-option--image {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(26, 31, 46, 0.95);
  text-align: left;
}

.task-modal-option--image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.35);
}

.task-modal-option-caption {
  display: block;
  padding: 0.55rem 0.65rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(248, 250, 252, 0.88);
}

.task-modal-option--image:hover:not(:disabled) {
  border-color: rgba(96, 165, 250, 0.48);
  transform: translateY(-1px);
}

.task-modal-option--image.is-selected {
  border-color: var(--quiz-primary);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.3), 0 10px 32px rgba(0, 0, 0, 0.4);
}

.task-modal-option:focus-visible {
  outline: 2px solid var(--quiz-primary);
  outline-offset: 2px;
}

.task-modal-option:active:not(:disabled) {
  transform: scale(0.99);
}

.quiz-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0;
}

.quiz-footer {
  margin-top: 1rem;
  border-top: 1px solid var(--quiz-border-soft);
  padding-top: 0.95rem;
}

@media (min-width: 30rem) {
  .quiz-actions {
    flex-direction: row;
    gap: 0.75rem;
  }

  .btn-quiz-confirm,
  .btn-quiz-skip {
    flex: 1;
  }
}

.btn-quiz-confirm {
  padding: 0.85rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.55);
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.95), rgba(59, 130, 246, 0.94));
  color: #f8fafc;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px rgba(30, 64, 175, 0.35);
}

.btn-quiz-confirm:hover:not(:disabled) {
  background: linear-gradient(90deg, rgba(29, 78, 216, 1), rgba(37, 99, 235, 1));
  transform: translateY(-1px);
  box-shadow: 0 11px 24px rgba(30, 64, 175, 0.45);
}

.btn-quiz-confirm:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-quiz-confirm.is-disabled {
  opacity: 0.48;
}

.btn-quiz-confirm:focus-visible:not(:disabled) {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.btn-quiz-skip {
  padding: 0.85rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid var(--quiz-border-soft);
  background: rgba(15, 23, 42, 0.3);
  color: rgba(226, 232, 240, 0.9);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-quiz-skip:hover:not(:disabled) {
  background: rgba(30, 41, 59, 0.44);
  border-color: rgba(148, 163, 184, 0.45);
  color: #f8fafc;
}

.btn-quiz-skip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-quiz-skip:focus-visible:not(:disabled) {
  outline: 2px solid var(--quiz-primary);
  outline-offset: 2px;
}

.quiz-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--quiz-border-soft);
  font-size: 0.72rem;
}

.quiz-legal-link {
  color: rgba(148, 163, 184, 0.9);
  text-decoration: none;
  transition: color 0.2s ease;
}

.quiz-legal-link:hover {
  color: #dbeafe;
  text-decoration: underline;
}

.quiz-legal-sep {
  color: rgba(248, 250, 252, 0.28);
  user-select: none;
}

.task-modal-feedback {
  margin: 0.7rem 0 0;
  min-height: 1.25rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #bfdbfe;
  text-align: left;
}

@keyframes quiz-card-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 42rem) {
  .quiz-meta-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .quiz-brand-stack {
    align-items: flex-start;
    text-align: left;
  }

  .quiz-brand-main {
    align-items: flex-start;
  }
}
