@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --bg: #080512;
  --bg-soft: #120a18;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-strong: rgba(255, 255, 255, 0.12);
  --text: #e7eeff;
  --muted: #aebadb;
  --primary: #00e5ff;
  --secondary: #7c4dff;
  --neon-ember: #ff8a3d;
  --neon-ember-soft: rgba(255, 138, 61, 0.35);
  --neon-ice: #38b6ff;
  --neon-ice-soft: rgba(56, 182, 255, 0.35);
  --neon-gold: #ffc74d;
  --neon-gold-soft: rgba(255, 199, 77, 0.4);
  --warning: #ffc857;
  --danger: #ff4d6d;
  --success: #47f2a0;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --glow-cyan: 0 0 28px rgba(0, 229, 255, 0.22);
  --glow-purple: 0 0 36px rgba(168, 85, 247, 0.35);
  --glow-magenta: 0 0 42px rgba(236, 72, 153, 0.22);
  --font-body: "Inter", system-ui, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;
  --radius: 16px;
  --radius-sm: 12px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --fs-sm: 0.85rem;
  --fs-md: 1rem;
  --fs-lg: 1.25rem;
  --fs-xl: 1.8rem;
  --line-tight: 1.25;
  --line-normal: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 110% 90% at 50% -15%, rgba(147, 51, 234, 0.28), transparent 52%),
    radial-gradient(ellipse 80% 60% at 100% 30%, rgba(219, 39, 119, 0.14), transparent 45%),
    radial-gradient(circle at 0% 70%, rgba(56, 182, 255, 0.1), transparent 42%),
    radial-gradient(circle at 90% 85%, rgba(255, 138, 61, 0.07), transparent 38%),
    radial-gradient(circle at top right, rgba(124, 77, 255, 0.2), transparent 35%),
    radial-gradient(circle at bottom left, rgba(0, 229, 255, 0.08), transparent 40%),
    linear-gradient(165deg, #14081c 0%, var(--bg) 38%, #0a0612 100%);
  color: var(--text);
  min-height: 100vh;
  line-height: var(--line-normal);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.app,
.auth-wrap {
  position: relative;
  z-index: 1;
}

a {
  color: var(--primary);
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  line-height: var(--line-tight);
  margin: 0 0 var(--space-3);
}

.app {
  display: grid;
  grid-template-columns: 1fr 260px;
  min-height: 100vh;
}

.app > .content {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.app > .sidebar {
  grid-column: 2;
  grid-row: 1;
}

.sidebar {
  background: rgba(18, 10, 32, 0.55);
  backdrop-filter: blur(18px);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-right: none;
  box-shadow: -4px 0 48px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(168, 85, 247, 0.06);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.nav-group--minor {
  margin-top: auto;
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 4px;
}

.nav-link--minor {
  font-size: 0.88rem;
  opacity: 0.88;
}

.nav-link--minor:hover,
.nav-link--minor.active {
  opacity: 1;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.4px;
  margin-bottom: var(--space-6);
}

.brand span {
  color: var(--primary);
}

.brand-logo {
  width: 170px;
  max-width: 100%;
  height: auto;
  display: block;
}

.auth-logo {
  width: 180px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 10px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group--core {
  flex: 1;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--text);
  transition: all 0.25s ease;
  position: relative;
}

.nav-link .nav-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.95;
}

.nav-icon-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  object-position: center;
  display: block;
  filter: drop-shadow(0 0 6px rgba(56, 182, 255, 0.25));
}

.nav-link.active .nav-icon-img {
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.45));
}

.nav-link:hover,
.nav-link.active {
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.18), rgba(124, 77, 255, 0.22));
  box-shadow: var(--glow-cyan);
  transform: translateX(-4px);
}

.nav-link.active::before {
  content: "";
  position: absolute;
  right: -8px;
  left: auto;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 99px;
  background: linear-gradient(var(--primary), var(--secondary));
}

.sidebar-user {
  margin-top: var(--space-6);
  padding: var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-code {
  margin-top: 6px;
  padding: 6px 10px;
  border: 1px dashed rgba(0, 229, 255, 0.45);
  border-radius: 999px;
  color: var(--primary);
  font-size: var(--fs-sm);
  display: inline-block;
}

.content {
  padding: var(--space-6);
}

.glass-card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: var(--space-4);
}

.glass-card.interactive {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.glass-card.interactive:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 229, 255, 0.35);
}

.glass-card canvas {
  width: 100% !important;
  height: 280px !important;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.page-header--store {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 20px;
  padding: 22px 22px 26px;
  margin-bottom: var(--space-5);
  border-radius: 20px;
  box-sizing: border-box;
  overflow: hidden;
  background: linear-gradient(125deg, rgba(124, 77, 255, 0.2), rgba(0, 229, 255, 0.1) 45%, rgba(255, 138, 61, 0.08));
  border: 1px solid rgba(168, 85, 247, 0.28);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

.page-header--store > div:first-child {
  flex: 1 1 220px;
  min-width: 0;
}

.page-header--store h2 {
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  margin: 0 0 12px;
  line-height: 1.25;
}

.page-header--store .muted {
  display: block;
  margin: 0;
  padding-bottom: 4px;
  max-width: 40rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
  word-wrap: break-word;
}

.page-header--store .page-actions {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--space-2);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: var(--fs-sm);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat {
  font-size: var(--fs-xl);
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.danger {
  color: var(--danger);
}

.success {
  color: var(--success);
}

.btn,
button {
  border: 0;
  color: #050914;
  font-weight: 700;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover,
button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(124, 77, 255, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 8px 0 14px;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

select option {
  background: #111827;
  color: var(--text);
}

select:focus,
select:focus-visible {
  border-color: rgba(0, 229, 255, 0.7);
}

label {
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
  position: relative;
}

.auth-card {
  width: 100%;
  max-width: 460px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
}

.btn-google {
  width: 100%;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: #1f1f1f;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-google:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.btn-google-icon {
  flex-shrink: 0;
}

.flash {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.flash.error {
  background: rgba(255, 77, 109, 0.15);
  border: 1px solid rgba(255, 77, 109, 0.45);
}

.flash.success {
  background: rgba(71, 242, 160, 0.15);
  border: 1px solid rgba(71, 242, 160, 0.45);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.product-card h4,
.product-card p {
  margin: 8px 0;
}

.mobile-menu-btn {
  display: none;
  margin-bottom: 12px;
}

.sidebar-close {
  display: none;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 998;
}

.mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.question-box {
  min-height: 140px;
}

.option-item {
  display: block;
  margin: 8px 0;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.option-item:hover {
  border-color: rgba(0, 229, 255, 0.55);
  transform: translateX(2px);
}

.option-item.selected {
  border-color: rgba(0, 229, 255, 0.85);
  background: rgba(0, 229, 255, 0.12);
}

.option-item input {
  width: auto;
  margin-right: 10px;
}

.option-item__img-wrap {
  display: block;
  margin: 0 0 10px 28px;
}

.option-item__img {
  max-width: min(100%, 420px);
  max-height: 160px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.kpi-trend {
  font-size: var(--fs-sm);
  margin-top: 8px;
}

.kpi-trend.up {
  color: var(--success);
}

.kpi-trend.down {
  color: var(--danger);
}

.goal-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.goal-ring {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--goal, 70%), rgba(255, 255, 255, 0.12) 0);
  display: grid;
  place-items: center;
}

.goal-ring-inner {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  font-weight: 700;
}

.weak-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.weak-badge {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 77, 109, 0.15);
  border: 1px solid rgba(255, 77, 109, 0.4);
  color: #ffc2ce;
  font-size: var(--fs-sm);
}

.test-progress {
  position: sticky;
  top: 10px;
  z-index: 5;
}

.progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 0.25s ease;
}

.timer.warning {
  color: var(--warning);
}

.timer.danger {
  color: var(--danger);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
}

.modal.open {
  display: flex;
}

.generate-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 2001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.generate-loading-overlay.open {
  display: flex;
}

.generate-loading-card {
  width: min(92vw, 400px);
  text-align: center;
}

.generate-loading-title {
  margin: 0;
  font-weight: 600;
  font-size: 1.05rem;
}

.generate-loading-bar {
  margin-top: 16px;
  height: 10px;
}

.generate-loading-pct {
  margin: 12px 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

.generate-loading-bar .progress-fill {
  transition: width 0.2s ease-out;
}

/* AI generate: real work happens during full page POST — no fake “stuck at 92%”. */
.generate-loading-bar.indeterminate .progress-fill {
  width: 36% !important;
  transition: none;
  animation: uelGenIndeterminate 1.1s ease-in-out infinite;
}

@keyframes uelGenIndeterminate {
  0% {
    transform: translateX(-140%);
  }
  100% {
    transform: translateX(380%);
  }
}

.modal-card {
  width: 100%;
  max-width: 440px;
}

.empty-state {
  text-align: center;
  padding: 28px 20px;
}

.empty-state-icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.product-cover {
  height: 110px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 229, 255, 0.2), rgba(124, 77, 255, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.product-cover--photo {
  height: auto;
  min-height: 156px;
  max-height: 280px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-cover--photo img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  object-position: center;
  display: block;
}

.product-cover--photo.product-cover--detail {
  min-height: 200px;
  max-height: none;
  padding: 12px;
}

.product-cover--photo.product-cover--detail img {
  max-height: min(52vh, 560px);
}

.checkout-product-thumb {
  margin-bottom: 14px;
}

.product-cover--checkout {
  width: fit-content;
  max-width: min(220px, 100%);
  min-height: 0;
  max-height: none;
  padding: 8px;
  align-self: flex-start;
}

.product-cover--checkout img {
  max-width: 200px;
  max-height: 300px;
  width: auto;
  height: auto;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-chip {
  font-size: var(--fs-sm);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 4px 10px;
}

.sticky-buy {
  position: sticky;
  top: 14px;
}

.wallet-card {
  background: linear-gradient(120deg, rgba(0, 229, 255, 0.18), rgba(124, 77, 255, 0.2));
}

/* —— Profile page (mobile-friendly) —— */
.content--profile {
  max-width: 920px;
}

.content--profile .page-header .muted {
  max-width: 42rem;
  line-height: 1.55;
}

.profile-section {
  margin-bottom: 16px;
}

.profile-section-title {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: clamp(1.05rem, 3vw, 1.15rem);
}

.profile-section-lead {
  margin-top: 0;
  margin-bottom: 14px;
  line-height: 1.5;
}

.profile-grid-split {
  gap: 14px;
  margin-bottom: 16px;
}

.profile-orders-scroll {
  margin: 0 -4px;
  padding: 0 4px;
}

.profile-order-dl {
  padding: 8px 14px;
  font-size: 0.85rem;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-wallet-kpis {
  gap: 12px;
}

.profile-kpi {
  min-width: 0;
}

.profile-stat-compact {
  font-size: clamp(1.05rem, 4vw, var(--fs-xl));
  word-break: break-word;
}

.profile-wallet-cta {
  margin-top: 14px;
}

.profile-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.profile-btn-row .btn {
  flex: 1 1 min(100%, 200px);
  justify-content: center;
  text-align: center;
}

.profile-section--language {
  max-width: 520px;
}

@media (max-width: 980px) {
  .profile-section--language {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .profile-orders-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .profile-orders-table tbody tr.profile-order-row {
    display: block;
    margin-bottom: 14px;
    padding: 14px 14px 10px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .profile-orders-table tbody tr.profile-order-row:last-child {
    margin-bottom: 0;
  }

  .profile-orders-table tbody tr.profile-order-row td {
    display: grid;
    grid-template-columns: minmax(92px, 34%) 1fr;
    align-items: start;
    gap: 6px 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.92rem;
    vertical-align: top;
  }

  .profile-orders-table tbody tr.profile-order-row td:last-child {
    border-bottom: 0;
    padding-bottom: 2px;
  }

  .profile-orders-table tbody tr.profile-order-row td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.35;
    padding-top: 2px;
  }

  .profile-orders-table tbody tr.profile-order-row--empty td {
    display: block;
    border: 0;
    padding: 18px 12px;
    text-align: center;
  }

  .profile-orders-table tbody tr.profile-order-row--empty td::before {
    content: none;
  }

  .profile-order-dl {
    width: 100%;
    justify-content: center;
  }

  .profile-wallet-kpis {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .profile-wallet-kpis .kpi-label {
    font-size: 0.8rem;
  }
}

@media (max-width: 520px) {
  .content--profile .page-header .muted {
    max-width: none;
  }

  .profile-btn-row .btn {
    flex: 1 1 100%;
  }

  .btn-block-sm {
    width: 100%;
    justify-content: center;
  }

  .profile-wallet-kpis {
    grid-template-columns: 1fr;
  }
}

.timeline {
  display: grid;
  gap: 10px;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
  padding-bottom: 8px;
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.skeleton::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120px;
  width: 120px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
  to {
    left: calc(100% + 120px);
  }
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

body.menu-open {
  overflow: hidden;
}

.kpi-label {
  font-size: 0.88rem;
  color: var(--muted);
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: 1fr;
  }

  .app > .content,
  .app > .sidebar {
    grid-column: 1;
    grid-row: auto;
  }

  .content {
    padding: 14px;
    padding-bottom: calc(94px + env(safe-area-inset-bottom));
  }

  .sidebar {
    height: 100vh;
    position: fixed;
    right: 0;
    left: auto;
    top: 0;
    width: min(84vw, 320px);
    transform: translateX(110%);
    z-index: 999;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-right: none;
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 12px;
    right: auto;
    top: 10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    font-size: 1.2rem;
  }

  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
  }

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .page-header {
    flex-direction: column;
  }

  .page-header--store {
    padding: 18px 16px 22px;
    gap: 14px;
  }

  .page-header--store .page-actions {
    margin-top: 0;
    width: 100%;
  }

  .page-header h2 {
    font-size: 1.35rem;
  }

  .glass-card {
    border-radius: 14px;
    padding: 14px;
  }

  .btn,
  button {
    min-height: 46px;
    border-radius: 12px;
  }

  .mobile-tabbar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 997;
    background: rgba(11, 15, 26, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 6px;
    gap: 6px;
  }

  .mobile-tabbar--student {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: rgba(20, 12, 32, 0.94);
    border-color: rgba(168, 85, 247, 0.22);
    padding: 5px 4px;
    gap: 2px;
  }

  .mobile-tabbar--student .tab-link {
    min-height: 52px;
    padding: 2px 1px;
  }

  .mobile-tabbar--student .tab-link small {
    font-size: 0.68rem;
    line-height: 1.15;
    text-align: center;
    max-width: 100%;
    padding: 0 1px;
  }

  .tab-link {
    min-height: 54px;
    border-radius: 12px;
    color: var(--muted);
    display: grid;
    place-items: center;
    font-size: 0.86rem;
    transition: all 0.2s ease;
  }

  .tab-link .tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
  }

  .tab-link .tab-icon img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 0 5px rgba(56, 182, 255, 0.2));
  }

  .tab-link.active .tab-icon img {
    filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.4));
  }

  .tab-link small {
    margin-top: 2px;
    font-size: 0.72rem;
  }

  .tab-link.active {
    color: var(--text);
    background: linear-gradient(130deg, rgba(0, 229, 255, 0.22), rgba(124, 77, 255, 0.24));
    border: 1px solid rgba(0, 229, 255, 0.24);
  }

  .nav-link {
    min-height: 46px;
  }
}

@media (min-width: 981px) {
  .mobile-tabbar {
    display: none;
  }
}

/* —— Gen Z: display type, top bar, hero, tiers, landing —— */
h1,
h2,
h3 {
  font-family: var(--font-display);
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.app-topbar-spacer {
  flex: 1;
}

.profile-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--glow-purple);
}

.profile-pill-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-ice), var(--secondary));
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 700;
  color: #050914;
}

.profile-pill-name {
  font-weight: 600;
  font-size: var(--fs-sm);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-pill--expanded {
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 8px;
  box-shadow: var(--glow-purple), var(--glow-magenta);
}

.profile-pill-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.profile-pill--expanded .profile-pill-name {
  max-width: 140px;
}

.profile-pill-id {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.profile-pill-chevron {
  color: var(--muted);
  font-size: 0.7rem;
  margin-left: 4px;
}

.profile-pill-avatar--glow {
  box-shadow: 0 0 20px rgba(56, 182, 255, 0.45);
}

.content--dashboard-min {
  max-width: 1100px;
  margin: 0 auto;
}

.dash-toprow {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.dash-toprow-spacer {
  flex: 1;
  min-width: 120px;
}

.dash-toprow-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--space-3);
}

.last-session-chip {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 220px;
  max-width: 380px;
  padding: var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.lsc-body {
  flex: 1;
  min-width: 0;
}

.lsc-art {
  flex-shrink: 0;
}

.lsc-art-img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  object-position: right center;
  display: block;
  border-radius: 14px;
  filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.45));
}

.lsc-title {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 700;
  margin-bottom: var(--space-3);
  color: var(--neon-ice);
}

.lsc-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: var(--fs-sm);
  color: var(--muted);
}

.lsc-stats li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lsc-ico {
  width: 1.5rem;
  text-align: center;
}

.dash-hero-center {
  text-align: center;
  padding: var(--space-6) 0 var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.dash-hero-art-wrap {
  position: relative;
  margin: 0 0 var(--space-2);
  padding: 8px;
}

.dash-hero-art-ring {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(56, 182, 255, 0.5), rgba(168, 85, 247, 0.45), rgba(255, 138, 61, 0.35));
  opacity: 0.85;
  filter: blur(14px);
  z-index: 0;
  animation: hero-ring-pulse 3s ease-in-out infinite;
}

.dash-hero-art {
  position: relative;
  z-index: 1;
  display: block;
  max-width: min(300px, 88vw);
  width: 100%;
  height: auto;
  border-radius: 20px;
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 40px rgba(56, 182, 255, 0.25);
}

.dash-hero-idea {
  margin: calc(var(--space-2) * -1) 0 0;
}

.dash-hero-idea img {
  width: 72px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 0 16px rgba(255, 199, 77, 0.55));
}

@keyframes hero-ring-pulse {
  0%,
  100% {
    opacity: 0.75;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes anime-btn-glow {
  0%,
  100% {
    box-shadow:
      0 0 36px rgba(56, 182, 255, 0.55),
      0 0 72px rgba(0, 229, 255, 0.28),
      0 4px 24px rgba(124, 77, 255, 0.2);
  }

  50% {
    box-shadow:
      0 0 52px rgba(56, 182, 255, 0.75),
      0 0 96px rgba(0, 229, 255, 0.4),
      0 8px 32px rgba(168, 85, 247, 0.35);
  }
}

.btn-anime-glow {
  animation: anime-btn-glow 2.4s ease-in-out infinite;
}

.dash-hero-line {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.6vw, 2rem);
  font-weight: 700;
  line-height: 1.28;
  max-width: 34rem;
  margin: 0;
  color: var(--text);
}

.btn-continue-solving {
  font-size: 1.05rem;
  padding: 16px 36px;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--neon-ice), var(--primary));
  color: #03060e;
  box-shadow: 0 0 40px rgba(56, 182, 255, 0.45), 0 0 60px rgba(0, 229, 255, 0.2);
  min-height: 52px;
}

.btn-continue-solving:hover {
  box-shadow: 0 0 48px rgba(56, 182, 255, 0.55), 0 12px 40px rgba(0, 229, 255, 0.25);
}

.dash-continue-link {
  font-size: var(--fs-sm);
  color: #c4b5fd;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.dash-continue-link:hover {
  color: var(--text);
  border-bottom-color: rgba(196, 181, 253, 0.5);
}

.dash-store-spotlight {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px 20px;
  padding: 18px 18px 20px;
  margin: 0 0 var(--space-6);
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(110deg, rgba(255, 138, 61, 0.14), rgba(168, 85, 255, 0.16), rgba(0, 229, 255, 0.12));
  border: 1px solid rgba(255, 199, 77, 0.22);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  box-sizing: border-box;
  overflow: hidden;
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dash-store-spotlight:hover {
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.26), 0 0 40px rgba(124, 77, 255, 0.12);
}

.dash-store-spotlight-text {
  flex: 1 1 200px;
  min-width: 0;
  padding-top: 2px;
}

.dash-store-spotlight-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fcd34d;
  margin: 0 0 8px;
  line-height: 1.3;
}

.dash-store-spotlight-title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.25;
}

.dash-store-spotlight-sub {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.5;
  max-width: 36rem;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.dash-store-spotlight-cta {
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: var(--fs-sm);
  background: linear-gradient(100deg, rgba(255, 199, 77, 0.95), rgba(255, 138, 61, 0.9));
  color: #1a0a02;
  box-shadow: 0 4px 20px rgba(255, 138, 61, 0.35);
  white-space: nowrap;
}

.dash-store-spotlight:hover .dash-store-spotlight-cta {
  box-shadow: 0 5px 24px rgba(255, 138, 61, 0.45);
}

@media (max-width: 560px) {
  .dash-store-spotlight {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-store-spotlight-cta {
    align-self: stretch;
    width: 100%;
    white-space: normal;
    text-align: center;
  }
}

.vibe-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.vibe-card {
  text-decoration: none;
  color: inherit;
  padding: var(--space-4);
  padding-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 0;
  position: relative;
  overflow: visible;
  border-radius: var(--radius);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vibe-card--static {
  cursor: default;
}

.vibe-card:not(.vibe-card--static):hover {
  transform: translateY(-3px);
}

.vibe-card-art-wrap {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
  margin: calc(var(--space-2) * -1) calc(var(--space-2) * -1) 0;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.vibe-card-art-wrap--ember {
  box-shadow:
    0 0 0 1px rgba(255, 138, 61, 0.35),
    0 0 32px rgba(255, 138, 61, 0.25),
    inset 0 0 40px rgba(255, 100, 50, 0.08);
}

.vibe-card-art-wrap--ice {
  box-shadow:
    0 0 0 1px rgba(56, 182, 255, 0.4),
    0 0 32px rgba(56, 182, 255, 0.22),
    inset 0 0 40px rgba(0, 229, 255, 0.06);
}

.vibe-card-art-wrap--purple {
  box-shadow:
    0 0 0 1px rgba(168, 85, 247, 0.4),
    0 0 36px rgba(168, 85, 247, 0.28),
    inset 0 0 40px rgba(147, 51, 234, 0.1);
}

.vibe-card-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.vibe-card-speed-deco {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 52px;
  height: auto;
  max-height: 40%;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(56, 182, 255, 0.9));
  pointer-events: none;
}

.vibe-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
}

.vibe-card-stat {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--muted);
  line-height: 1.45;
  flex: 1;
}

.vibe-card-btn {
  align-self: stretch;
  text-align: center;
  margin-top: var(--space-2);
  padding: 12px 16px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-decoration: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

.vibe-card-btn:focus-visible {
  outline: 2px solid #0e7490;
  outline-offset: 3px;
}

.vibe-card-btn--ember {
  color: #1a0a04;
  background: linear-gradient(180deg, #ffe0c2 0%, #ff9a4d 40%, #ff6b2b 100%);
  box-shadow:
    0 0 20px rgba(255, 138, 61, 0.75),
    0 0 40px rgba(255, 91, 40, 0.35);
  animation: vibe-btn-ember 2.1s ease-in-out infinite;
}

.vibe-card-btn--ice {
  color: #031018;
  background: linear-gradient(180deg, #b8ecff 0%, #38b6ff 45%, #00c8ff 100%);
  box-shadow:
    0 0 22px rgba(56, 182, 255, 0.8),
    0 0 44px rgba(0, 229, 255, 0.3);
  animation: vibe-btn-ice 2.3s ease-in-out infinite;
}

.vibe-card-btn--purple {
  color: #0f0518;
  background: linear-gradient(180deg, #e9d5ff 0%, #a855f7 40%, #7c3aed 100%);
  box-shadow:
    0 0 22px rgba(168, 85, 247, 0.85),
    0 0 48px rgba(124, 58, 237, 0.35);
  animation: vibe-btn-purple 2.2s ease-in-out infinite;
}

@keyframes vibe-btn-ember {
  0%,
  100% {
    box-shadow:
      0 0 18px rgba(255, 138, 61, 0.65),
      0 0 36px rgba(255, 91, 40, 0.28);
  }

  50% {
    box-shadow:
      0 0 28px rgba(255, 138, 61, 0.95),
      0 0 52px rgba(255, 120, 60, 0.45);
  }
}

@keyframes vibe-btn-ice {
  0%,
  100% {
    box-shadow:
      0 0 18px rgba(56, 182, 255, 0.7),
      0 0 40px rgba(0, 229, 255, 0.25);
  }

  50% {
    box-shadow:
      0 0 30px rgba(56, 182, 255, 0.95),
      0 0 56px rgba(0, 229, 255, 0.4);
  }
}

@keyframes vibe-btn-purple {
  0%,
  100% {
    box-shadow:
      0 0 18px rgba(168, 85, 247, 0.7),
      0 0 42px rgba(124, 58, 237, 0.3);
  }

  50% {
    box-shadow:
      0 0 32px rgba(192, 132, 252, 0.95),
      0 0 60px rgba(168, 85, 247, 0.45);
  }
}

.vibe-card--ember {
  border-color: rgba(255, 138, 61, 0.4);
  box-shadow: 0 0 0 1px rgba(255, 138, 61, 0.1), 0 16px 48px rgba(255, 138, 61, 0.15);
}

.vibe-card--ice {
  border-color: rgba(56, 182, 255, 0.4);
  box-shadow: 0 0 0 1px rgba(56, 182, 255, 0.1), 0 16px 48px var(--neon-ice-soft);
}

.vibe-card--purple {
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.12), 0 16px 48px rgba(168, 85, 247, 0.2);
}

.dash-footnote {
  text-align: center;
  font-size: 0.8rem;
  margin-bottom: calc(80px + env(safe-area-inset-bottom));
}

.dash-footnote a {
  color: #c4b5fd;
  font-weight: 600;
}

.dash-footnote a:hover {
  color: var(--primary);
}

@media (max-width: 980px) {
  .vibe-cards:not(.vibe-cards--dash-row) {
    grid-template-columns: 1fr;
  }

  .vibe-cards--dash-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .vibe-cards--dash-row .vibe-card-head {
    font-size: 0.92rem;
  }

  .vibe-cards--dash-row .vibe-card-stat {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .vibe-cards--dash-row .vibe-card-btn {
    font-size: 0.58rem;
    padding: 8px 8px;
    letter-spacing: 0.08em;
  }

  .vibe-cards--dash-row .vibe-card-art-wrap {
    aspect-ratio: 5 / 4;
  }

  .dash-toprow {
    flex-direction: column;
    align-items: stretch;
  }

  .dash-toprow-aside {
    align-items: stretch;
  }

  .last-session-chip {
    max-width: none;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .lsc-body {
    flex: 1 1 100%;
  }

  .lsc-art-img {
    width: 88px;
    height: 88px;
    margin: 0 auto;
  }

  .dash-footnote {
    margin-bottom: calc(100px + env(safe-area-inset-bottom));
  }
}

.hero-genz {
  margin-bottom: var(--space-4);
  padding: var(--space-6) var(--space-6);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: var(--shadow), var(--glow-cyan);
}

.hero-genz-eyebrow {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--neon-ice);
}

.hero-genz-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--space-3);
}

.text-gradient {
  background: linear-gradient(90deg, var(--primary), var(--neon-ember), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-genz-sub {
  margin: 0 0 var(--space-4);
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-genz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.last-session-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-4) var(--space-4);
  border: 1px dashed rgba(0, 229, 255, 0.28);
}

.last-session-strip h3 {
  margin: 0;
  font-size: var(--fs-md);
}

.last-session-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  color: var(--muted);
  font-size: var(--fs-sm);
}

.last-session-meta strong {
  color: var(--text);
}

.section-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  flex-wrap: wrap;
}

.section-title-row h2 {
  margin: 0;
  font-size: 1.35rem;
}

.tier-pick {
  margin-bottom: var(--space-4);
}

.tier-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  text-decoration: none;
  color: inherit;
  min-height: 100%;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tier-card::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  opacity: 0.12;
  pointer-events: none;
}

.tier-card:hover {
  transform: translateY(-3px);
}

.tier-card--ember {
  border-color: rgba(255, 138, 61, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 138, 61, 0.08), 0 12px 40px rgba(255, 138, 61, 0.12);
}

.tier-card--ember::after {
  background: var(--neon-ember);
}

.tier-card--ice {
  border-color: rgba(56, 182, 255, 0.35);
  box-shadow: 0 0 0 1px rgba(56, 182, 255, 0.08), 0 12px 40px var(--neon-ice-soft);
}

.tier-card--ice::after {
  background: var(--neon-ice);
}

.tier-card--gold {
  border-color: rgba(255, 199, 77, 0.35);
  box-shadow: 0 0 0 1px rgba(255, 199, 77, 0.08), 0 12px 40px var(--neon-gold-soft);
}

.tier-card--gold::after {
  background: var(--neon-gold);
}

.tier-label {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tier-card--ember .tier-label {
  color: var(--neon-ember);
}

.tier-card--ice .tier-label {
  color: var(--neon-ice);
}

.tier-card--gold .tier-label {
  color: var(--neon-gold);
}

.tier-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0;
}

.tier-blurb {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
  flex: 1;
}

.tier-cta-pill {
  align-self: flex-start;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 700;
  font-size: var(--fs-sm);
  border: 0;
  width: fit-content;
}

.tier-cta-pill--ember {
  background: linear-gradient(90deg, var(--neon-ember), #ff5c29);
  color: #120804;
  box-shadow: 0 0 20px var(--neon-ember-soft);
}

.tier-cta-pill--ice {
  background: linear-gradient(90deg, var(--neon-ice), var(--primary));
  color: #030a12;
  box-shadow: 0 0 20px var(--neon-ice-soft);
}

.tier-cta-pill--gold {
  background: linear-gradient(90deg, var(--neon-gold), #ff9f1c);
  color: #1a0f02;
  box-shadow: 0 0 20px var(--neon-gold-soft);
}

.btn-neon-ember {
  background: linear-gradient(90deg, var(--neon-ember), #ff5c29);
  color: #120804;
  box-shadow: 0 0 24px var(--neon-ember-soft);
}

.btn-neon-ember:hover {
  box-shadow: 0 8px 28px var(--neon-ember-soft);
}

.btn-neon-ice {
  background: linear-gradient(90deg, var(--neon-ice), var(--primary));
  color: #030a12;
  box-shadow: 0 0 24px var(--neon-ice-soft);
}

.btn-neon-ice:hover {
  box-shadow: 0 8px 28px var(--neon-ice-soft);
}

.btn-neon-gold {
  background: linear-gradient(90deg, var(--neon-gold), #ff9f1c);
  color: #1a0f02;
  box-shadow: 0 0 24px var(--neon-gold-soft);
}

.btn-neon-gold:hover {
  box-shadow: 0 8px 28px var(--neon-gold-soft);
}

/* Marketing landing (index) — default light; dark only when user enables */
body.theme-landing {
  color: #0a0a0a;
  /* Reset global body gradients (they would otherwise stay visible). */
  background: #f5f5f5;
}

body.theme-landing::before {
  display: none;
}

body.theme-landing .landing-nav .btn-secondary {
  color: #171717;
  border-color: rgba(23, 23, 23, 0.2);
  background: #fff;
}

body.theme-landing .landing-nav .btn-secondary:hover {
  background: #f4f4f5;
  color: #0a0a0a;
}

body.theme-landing .landing-nav .btn:not(.btn-secondary) {
  background: #171717;
  color: #fff;
  border-color: #171717;
}

body.theme-landing .landing-nav .btn:not(.btn-secondary):hover {
  background: #262626;
  color: #fff;
}

.landing-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  margin: max(12px, env(safe-area-inset-top)) auto 0;
  max-width: 1120px;
  width: calc(100% - 24px);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(23, 23, 23, 0.08);
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.landing-nav .brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1rem, 3.5vw, 1.15rem);
  color: #0a0a0a;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.landing-nav .brand-mark:hover {
  color: #404040;
}

.landing-nav-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.landing-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 5vw, 48px) clamp(16px, 4vw, 32px) clamp(32px, 6vw, 56px);
  gap: clamp(16px, 3vw, 24px);
}

.landing-flash {
  width: 100%;
  max-width: min(520px, 100%);
  margin: 0;
  color: #171717;
  text-align: center;
}

.landing-flash.flash.error {
  background: rgba(254, 226, 226, 0.95);
  border-color: rgba(185, 28, 28, 0.35);
  color: #7f1d1d;
}

.landing-flash.flash.success {
  background: rgba(220, 252, 231, 0.95);
  border-color: rgba(21, 128, 61, 0.35);
  color: #14532d;
}

.landing-hero-minimal {
  max-width: min(920px, 100%);
  width: 100%;
  padding: clamp(12px, 3vw, 28px) clamp(16px, 4vw, 24px);
  text-align: center;
}

.landing-kicker {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(0.65rem, 1.8vw, 0.75rem);
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: #525252;
  margin: 0 0 clamp(20px, 4vw, 32px);
}

.landing-headline {
  font-family: Inter, system-ui, sans-serif;
  font-weight: 900;
  font-size: clamp(1.85rem, 7.5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: #0a0a0a;
  margin: 0 0 clamp(18px, 3.5vw, 28px);
}

.landing-headline-line {
  display: inline-block;
}

.landing-tagline-serif {
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 3.2vw, 1.5rem);
  font-style: italic;
  font-weight: 400;
  color: #0a0a0a;
  margin: 0 0 clamp(36px, 7vw, 52px);
  line-height: 1.35;
}

.landing-hero-cta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 0;
}

.landing-hero-cta--minimal {
  margin-top: 0;
}

.landing-cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 40px;
  min-width: min(100%, 280px);
  min-height: 52px;
  border-radius: 9999px;
  font-family: Inter, system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.02rem, 2.6vw, 1.14rem);
  letter-spacing: 0.02em;
  text-decoration: none;
  color: #fff;
  background: #171717;
  border: 1px solid #171717;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.22);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.landing-cta-primary:hover {
  background: #262626;
  border-color: #262626;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
  transform: translateY(-1px);
  color: #fff;
}

.landing-cta-primary:focus-visible {
  outline: 2px solid #0a0a0a;
  outline-offset: 3px;
}

body.theme-landing .landing-hero-minimal a.landing-cta-primary {
  color: #fff;
}

body.theme-landing .landing-theme-toggle {
  border: 1px solid rgba(23, 23, 23, 0.22);
  background: rgba(255, 255, 255, 0.5);
  color: #404040;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

body.theme-landing .landing-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.95);
  color: #0a0a0a;
  transform: none;
  box-shadow: none;
}

/* Optional dark landing (saved in localStorage) */
html[data-uel-theme="dark"] body.theme-landing {
  color: #e8edf7;
  background-color: #05060d;
  background-image:
    linear-gradient(165deg, rgba(4, 6, 18, 0.88) 0%, rgba(8, 12, 32, 0.62) 38%, rgba(5, 8, 22, 0.85) 100%),
    radial-gradient(ellipse 100% 70% at 50% 0%, rgba(56, 182, 255, 0.18), transparent 52%),
    url("../img/hero-background-landingpage.png");
  background-size: cover, cover, cover;
  background-position: center, center, center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

html[data-uel-theme="dark"] body.theme-landing .landing-theme-toggle {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

html[data-uel-theme="dark"] body.theme-landing .landing-theme-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

html[data-uel-theme="dark"] body.theme-landing .landing-nav {
  background: rgba(6, 10, 28, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

html[data-uel-theme="dark"] body.theme-landing .landing-nav .brand-mark {
  color: #f8fafc;
}

html[data-uel-theme="dark"] body.theme-landing .landing-nav .brand-mark:hover {
  color: #7dd3fc;
}

html[data-uel-theme="dark"] body.theme-landing .landing-nav .btn-secondary {
  color: #f1f5f9;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

html[data-uel-theme="dark"] body.theme-landing .landing-nav .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

html[data-uel-theme="dark"] body.theme-landing .landing-nav .btn:not(.btn-secondary) {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  color: #050914;
  border: 0;
}

html[data-uel-theme="dark"] body.theme-landing .landing-nav .btn:not(.btn-secondary):hover {
  color: #050914;
}

html[data-uel-theme="dark"] body.theme-landing .landing-kicker {
  color: #94a3b8;
}

html[data-uel-theme="dark"] body.theme-landing .landing-headline,
html[data-uel-theme="dark"] body.theme-landing .landing-tagline-serif {
  color: #f8fafc;
}

html[data-uel-theme="dark"] body.theme-landing .landing-flash {
  color: #f1f5f9;
}

html[data-uel-theme="dark"] body.theme-landing .landing-flash.flash.error {
  background: rgba(127, 29, 29, 0.45);
  border-color: rgba(252, 165, 165, 0.5);
  color: #fecaca;
}

html[data-uel-theme="dark"] body.theme-landing .landing-flash.flash.success {
  background: rgba(20, 83, 45, 0.45);
  border-color: rgba(134, 239, 172, 0.45);
  color: #bbf7d0;
}

html[data-uel-theme="dark"] body.theme-landing .landing-hero-minimal a.landing-cta-primary {
  background: #f8fafc;
  color: #0a0a0a;
  border-color: #f8fafc;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

html[data-uel-theme="dark"] body.theme-landing .landing-hero-minimal a.landing-cta-primary:hover {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
}

html[data-uel-theme="dark"] body.theme-landing .landing-cta-primary:focus-visible {
  outline-color: #7dd3fc;
}

@media (max-width: 720px) {
  html[data-uel-theme="dark"] body.theme-landing {
    background-attachment: scroll;
  }
}

@media (max-width: 520px) {
  .landing-nav {
    width: calc(100% - 16px);
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 14px;
  }

  .landing-nav-actions {
    width: 100%;
    justify-content: center;
  }

  .landing-nav-actions .btn,
  .landing-nav-actions .landing-theme-toggle {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: center;
  }

  .landing-hero-cta--minimal {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-cta-primary {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* —— Test page: level gate (anime-style cards) —— */
.test-level-gate {
  padding: var(--space-6);
  margin-bottom: var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}

.test-level-gate-head {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto var(--space-6);
}

.test-level-gate-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin: 0 0 var(--space-3);
}

.test-level-gate-sub {
  margin: 0;
  line-height: 1.5;
}

.test-level-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  max-width: 900px;
  margin: 0 auto;
}

.test-level-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.test-level-card:hover {
  transform: translateY(-4px);
}

.test-level-card-art-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.test-level-card-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.test-level-card-art-wrap--ember {
  box-shadow: inset 0 0 48px rgba(255, 138, 61, 0.15);
}

.test-level-card-art-wrap--ice {
  box-shadow: inset 0 0 48px rgba(56, 182, 255, 0.12);
}

.test-level-card-art-wrap--purple {
  box-shadow: inset 0 0 48px rgba(168, 85, 247, 0.15);
}

.test-level-card-art-wrap--gold {
  box-shadow: inset 0 0 48px rgba(255, 199, 77, 0.12);
}

.test-level-card--ember {
  box-shadow: 0 0 0 1px rgba(255, 138, 61, 0.12), 0 16px 48px rgba(255, 138, 61, 0.12);
}

.test-level-card--ice {
  box-shadow: 0 0 0 1px rgba(56, 182, 255, 0.12), 0 16px 48px rgba(56, 182, 255, 0.12);
}

.test-level-card--purple {
  box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.14), 0 16px 48px rgba(168, 85, 247, 0.15);
}

.test-level-card--gold {
  box-shadow: 0 0 0 1px rgba(255, 199, 77, 0.14), 0 16px 48px rgba(255, 199, 77, 0.12);
}

.test-level-card-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.test-level-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0;
}

.test-level-card-sub {
  margin: 0;
  font-size: var(--fs-sm);
  flex: 1;
}

.test-level-card-btn {
  display: block;
  text-align: center;
  margin-top: var(--space-2);
  padding: 12px 16px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.test-level-card-btn--ember {
  color: #1a0a04;
  background: linear-gradient(180deg, #ffe0c2 0%, #ff9a4d 40%, #ff6b2b 100%);
  box-shadow: 0 0 22px rgba(255, 138, 61, 0.75);
  animation: test-level-btn-ember 2.1s ease-in-out infinite;
}

.test-level-card-btn--ice {
  color: #031018;
  background: linear-gradient(180deg, #b8ecff 0%, #38b6ff 45%, #00c8ff 100%);
  box-shadow: 0 0 22px rgba(56, 182, 255, 0.8);
  animation: test-level-btn-ice 2.3s ease-in-out infinite;
}

.test-level-card-btn--purple {
  color: #0f0518;
  background: linear-gradient(180deg, #e9d5ff 0%, #a855f7 40%, #7c3aed 100%);
  box-shadow: 0 0 22px rgba(168, 85, 247, 0.85);
  animation: test-level-btn-purple 2.2s ease-in-out infinite;
}

.test-level-card-btn--gold {
  color: #1a0f02;
  background: linear-gradient(180deg, #fff3c4 0%, #ffc74d 35%, #f59e0b 100%);
  box-shadow: 0 0 22px rgba(255, 199, 77, 0.85);
  animation: test-level-btn-gold 2.15s ease-in-out infinite;
}

@keyframes test-level-btn-ember {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(255, 138, 61, 0.65), 0 0 36px rgba(255, 91, 40, 0.28);
  }

  50% {
    box-shadow: 0 0 30px rgba(255, 138, 61, 0.95), 0 0 52px rgba(255, 120, 60, 0.45);
  }
}

@keyframes test-level-btn-ice {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(56, 182, 255, 0.7), 0 0 40px rgba(0, 229, 255, 0.25);
  }

  50% {
    box-shadow: 0 0 30px rgba(56, 182, 255, 0.95), 0 0 56px rgba(0, 229, 255, 0.4);
  }
}

@keyframes test-level-btn-purple {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.7), 0 0 42px rgba(124, 58, 237, 0.3);
  }

  50% {
    box-shadow: 0 0 32px rgba(192, 132, 252, 0.95), 0 0 60px rgba(168, 85, 247, 0.45);
  }
}

@keyframes test-level-btn-gold {
  0%,
  100% {
    box-shadow: 0 0 18px rgba(255, 199, 77, 0.65), 0 0 40px rgba(245, 158, 11, 0.28);
  }

  50% {
    box-shadow: 0 0 30px rgba(255, 199, 77, 0.95), 0 0 54px rgba(251, 191, 36, 0.42);
  }
}

@media (max-width: 720px) {
  .test-level-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .hero-genz {
    padding: var(--space-4);
  }

  .profile-pill-name {
    max-width: 120px;
  }

  .glass-card.interactive:hover,
  .tier-card:hover,
  .vibe-card:not(.vibe-card--static):hover,
  .test-level-card:hover,
  .btn:hover,
  button:hover {
    transform: none;
  }
}

/* —— Analysis (minimal Gen Z: 1 chart + AI coach) —— */
.content--analysis-min {
  max-width: 720px;
  margin: 0 auto;
}

.analysis-page-title {
  font-family: var(--font-display);
}

.analysis-page-actions {
  flex-wrap: wrap;
}

.analysis-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(168, 85, 247, 0.06));
  box-shadow: 0 0 40px rgba(56, 182, 255, 0.08);
}

.analysis-strip-pill {
  flex: 1;
  min-width: 100px;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.analysis-strip-pill--muted {
  opacity: 0.85;
}

.analysis-strip-k {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--neon-ice), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.analysis-strip-l {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 4px;
  display: block;
}

.analysis-chart-shell {
  margin-bottom: var(--space-4);
  padding: var(--space-5);
  border: 1px solid rgba(168, 85, 247, 0.25);
  box-shadow:
    0 0 0 1px rgba(56, 182, 255, 0.12),
    0 16px 48px rgba(124, 77, 255, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.07), rgba(12, 8, 22, 0.5));
}

.analysis-chart-title {
  font-family: var(--font-display);
  margin: 0 0 var(--space-2);
  font-size: 1.35rem;
}

.analysis-chart-caption {
  margin: 0 0 var(--space-4);
  font-size: var(--fs-sm);
}

.analysis-chart-skeleton {
  height: 16px;
  margin-bottom: 10px;
}

.analysis-chart-canvas-wrap {
  position: relative;
  height: 300px;
  margin-top: 4px;
}

.analysis-chart-canvas-wrap canvas {
  filter: drop-shadow(0 0 20px rgba(56, 182, 255, 0.15));
}

.analysis-ai-coach {
  margin-bottom: var(--space-4);
  padding: var(--space-5);
  border: 1px solid rgba(56, 182, 255, 0.28);
  box-shadow: 0 0 36px rgba(56, 182, 255, 0.12);
  background: linear-gradient(145deg, rgba(56, 182, 255, 0.08), rgba(124, 77, 255, 0.06));
}

.analysis-ai-layout {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

.analysis-ai-mascot {
  flex-shrink: 0;
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 20px;
  padding: 4px;
  background: linear-gradient(135deg, rgba(56, 182, 255, 0.35), rgba(168, 85, 247, 0.4), rgba(255, 138, 61, 0.25));
  box-shadow:
    0 0 24px rgba(56, 182, 255, 0.35),
    0 0 48px rgba(168, 85, 247, 0.15),
    inset 0 0 20px rgba(255, 255, 255, 0.06);
}

.analysis-ai-mascot-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  border-radius: 16px;
  background: rgba(8, 6, 18, 0.45);
}

.analysis-ai-speech {
  flex: 1;
  min-width: 0;
}

.analysis-ai-intro {
  margin: 0 0 var(--space-3);
}

.analysis-ai-title {
  font-family: var(--font-display);
  margin: 0 0 var(--space-3);
  font-size: 1.2rem;
}

.analysis-ai-line {
  margin: 0 0 var(--space-3);
  padding-left: var(--space-4);
  position: relative;
  line-height: 1.5;
}

.analysis-ai-dot {
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-ice), var(--secondary));
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.6);
}

.analysis-quick-take {
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.analysis-quick-title {
  font-family: var(--font-display);
  margin: 0 0 var(--space-3);
  font-size: 1rem;
}

.analysis-quick-list {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.55;
}

.analysis-quick-list li {
  margin-bottom: var(--space-2);
}

@media (max-width: 520px) {
  .analysis-ai-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .analysis-ai-speech {
    width: 100%;
  }

  .analysis-ai-line {
    text-align: left;
  }
}

/* —— Site footer (global) —— */
.visually-hidden,
.visually-hidden-focusable:not(:focus):not(:focus-within) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 8px 14px;
  background: var(--primary);
  color: #050508;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  left: 10px;
  top: 10px;
}

.site-footer {
  margin-top: auto;
  padding: var(--space-8) var(--space-4) var(--space-6);
  background: linear-gradient(180deg, rgba(10, 6, 18, 0.92), #050308);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

.site-footer-logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  display: block;
  margin-bottom: var(--space-2);
}

.site-footer-tagline {
  font-size: var(--fs-sm);
  line-height: 1.5;
  margin: 0;
}

.site-footer-store-line {
  margin: var(--space-3) 0 0;
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.site-footer-store-line a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.site-footer-store-line a:hover {
  text-decoration: underline;
}

.site-footer-heading {
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin: 0 0 var(--space-3);
  color: var(--text);
}

.site-footer-links,
.site-footer-social {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer-links li,
.site-footer-social li {
  margin-bottom: var(--space-2);
}

.site-footer-links a,
.site-footer-social a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer-links a:hover,
.site-footer-social a:hover {
  color: var(--primary);
}

.site-footer-subscribe-note {
  font-size: var(--fs-sm);
  margin: 0 0 var(--space-3);
}

.site-footer-subscribe {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.site-footer-email-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
}

.site-footer-sub-btn {
  align-self: flex-start;
}

.site-footer-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.site-footer-contact-line {
  margin-top: var(--space-4);
  font-size: var(--fs-sm);
}

.site-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer-copy {
  margin: 0;
  font-size: var(--fs-sm);
}

.site-footer-dev {
  font-size: var(--fs-sm);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.08);
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.site-footer-dev:hover {
  background: rgba(0, 229, 255, 0.15);
  color: var(--text);
}

/* Legal / static pages */
.legal-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.legal-brand {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.legal-brand:hover {
  color: var(--primary);
}

.legal-topbar-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.legal-topbar-cta {
  padding: 6px 14px;
  font-size: var(--fs-sm);
}

.legal-main {
  flex: 1;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-4);
  width: 100%;
}

.legal-article {
  padding: var(--space-8);
}

.legal-article h1 {
  font-family: var(--font-display);
  margin-top: 0;
  font-size: 1.75rem;
}

.legal-article h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.legal-article p,
.legal-article li {
  color: var(--muted);
  line-height: 1.6;
}

.legal-article ul {
  padding-left: 1.2rem;
}

.legal-meta {
  font-size: var(--fs-sm);
}

.legal-lead {
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.55;
}

body.theme-landing .site-footer,
body.theme-dash-home .site-footer {
  flex-shrink: 0;
}

/* Light footer on default landing + student home (matches white theme) */
html[data-uel-theme="light"] body.theme-landing .site-footer,
html[data-uel-theme="light"] body.theme-dash-home .site-footer {
  background: #e8e8ea;
  border-top-color: rgba(23, 23, 23, 0.08);
  color: #57534e;
}

html[data-uel-theme="light"] body.theme-landing .site-footer .site-footer-logo-text,
html[data-uel-theme="light"] body.theme-dash-home .site-footer .site-footer-logo-text,
html[data-uel-theme="light"] body.theme-landing .site-footer .site-footer-heading,
html[data-uel-theme="light"] body.theme-dash-home .site-footer .site-footer-heading {
  color: #0a0a0a;
}

html[data-uel-theme="light"] body.theme-landing .site-footer .muted,
html[data-uel-theme="light"] body.theme-dash-home .site-footer .muted {
  color: #57534e;
}

html[data-uel-theme="light"] body.theme-landing .site-footer .site-footer-links a,
html[data-uel-theme="light"] body.theme-dash-home .site-footer .site-footer-links a,
html[data-uel-theme="light"] body.theme-landing .site-footer .site-footer-social a,
html[data-uel-theme="light"] body.theme-dash-home .site-footer .site-footer-social a {
  color: #44403c;
}

html[data-uel-theme="light"] body.theme-landing .site-footer .site-footer-links a:hover,
html[data-uel-theme="light"] body.theme-dash-home .site-footer .site-footer-links a:hover,
html[data-uel-theme="light"] body.theme-landing .site-footer .site-footer-social a:hover,
html[data-uel-theme="light"] body.theme-dash-home .site-footer .site-footer-social a:hover {
  color: #0e7490;
}

html[data-uel-theme="light"] body.theme-landing .site-footer .site-footer-email-input,
html[data-uel-theme="light"] body.theme-dash-home .site-footer .site-footer-email-input {
  border-color: rgba(23, 23, 23, 0.12);
  background: #fff;
  color: #171717;
}

html[data-uel-theme="light"] body.theme-landing .site-footer .site-footer-bottom,
html[data-uel-theme="light"] body.theme-dash-home .site-footer .site-footer-bottom {
  border-top-color: rgba(23, 23, 23, 0.1);
}

html[data-uel-theme="light"] body.theme-landing .site-footer .site-footer-dev,
html[data-uel-theme="light"] body.theme-dash-home .site-footer .site-footer-dev {
  border-color: rgba(23, 23, 23, 0.18);
  background: #fff;
  color: #171717;
}

html[data-uel-theme="light"] body.theme-landing .site-footer .site-footer-dev:hover,
html[data-uel-theme="light"] body.theme-dash-home .site-footer .site-footer-dev:hover {
  background: #f4f4f5;
  color: #0a0a0a;
}

html[data-uel-theme="light"] body.theme-landing .site-footer .btn-secondary,
html[data-uel-theme="light"] body.theme-dash-home .site-footer .btn-secondary {
  background: #fff;
  color: #171717;
  border: 1px solid rgba(23, 23, 23, 0.16);
}

html[data-uel-theme="light"] body.theme-landing .site-footer .btn-secondary:hover,
html[data-uel-theme="light"] body.theme-dash-home .site-footer .btn-secondary:hover {
  background: #f4f4f5;
  color: #0a0a0a;
}

html[data-uel-theme="light"] body.theme-landing .site-footer code,
html[data-uel-theme="light"] body.theme-dash-home .site-footer code {
  color: #1c1917;
  background: rgba(0, 0, 0, 0.06);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

@media (max-width: 520px) {
  .site-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

}

/* —— Student home (dashboard): header layout, default light + optional dark —— */
body.theme-dash-home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: #f5f5f6;
  background-image: none;
  color: #171717;
  line-height: var(--line-normal);
}

body.theme-dash-home::before {
  display: none;
}

html[data-uel-theme="dark"] body.theme-dash-home {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 110% 90% at 50% -15%, rgba(147, 51, 234, 0.28), transparent 52%),
    radial-gradient(ellipse 80% 60% at 100% 30%, rgba(219, 39, 119, 0.14), transparent 45%),
    radial-gradient(circle at 0% 70%, rgba(56, 182, 255, 0.1), transparent 42%),
    radial-gradient(circle at 90% 85%, rgba(255, 138, 61, 0.07), transparent 38%),
    radial-gradient(circle at top right, rgba(124, 77, 255, 0.2), transparent 35%),
    radial-gradient(circle at bottom left, rgba(0, 229, 255, 0.08), transparent 40%),
    linear-gradient(165deg, #14081c 0%, var(--bg) 38%, #0a0612 100%);
  color: var(--text);
}

html[data-uel-theme="dark"] body.theme-dash-home::before {
  display: block;
  opacity: 0.04;
}

.dash-home-header {
  position: sticky;
  top: 0;
  z-index: 120;
  border-bottom: 1px solid rgba(23, 23, 23, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html[data-uel-theme="dark"] .dash-home-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
  background: rgba(10, 8, 22, 0.75);
}

.dash-home-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.dash-home-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.85rem, 2.5vw, 1rem);
  letter-spacing: -0.02em;
}

.dash-home-brand-mark {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: block;
  line-height: 0;
  filter: drop-shadow(0 2px 8px rgba(6, 182, 212, 0.35));
}

.dash-home-brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
  shape-rendering: geometricPrecision;
}

html[data-uel-theme="dark"] .dash-home-brand-mark {
  filter: drop-shadow(0 2px 12px rgba(0, 229, 255, 0.25));
}

html[data-uel-theme="dark"] .dash-home-brand-mark svg rect:first-of-type {
  stroke: rgba(255, 255, 255, 0.14);
}

.dash-home-header-end {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.dash-home-burger {
  display: none;
  min-width: 44px;
  padding: 8px 12px;
  font-size: 1.25rem;
  line-height: 1;
}

.dash-home-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.dash-home-nav-link {
  text-decoration: none;
}

.dash-home-nav-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px 14px;
  min-height: 42px;
  border-radius: 14px;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
  color: #292524;
  white-space: normal;
  max-width: 118px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  background: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 2px 10px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

html[data-uel-theme="dark"] .dash-home-nav-card {
  color: #e7e5e4;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 4px 18px rgba(0, 0, 0, 0.35);
}

.dash-home-nav-card:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 116, 144, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 8px 22px rgba(14, 116, 144, 0.12);
  color: #0c4a6e;
}

html[data-uel-theme="dark"] .dash-home-nav-card:hover {
  border-color: rgba(0, 229, 255, 0.25);
  color: var(--text);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 8px 28px rgba(0, 0, 0, 0.45);
}

.dash-home-nav-card.is-active {
  border-color: rgba(14, 116, 144, 0.45);
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.95), rgba(186, 230, 253, 0.55));
  color: #0e7490;
  box-shadow:
    0 0 0 2px rgba(14, 116, 144, 0.12),
    0 6px 20px rgba(14, 116, 144, 0.14);
}

html[data-uel-theme="dark"] .dash-home-nav-card.is-active {
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.1);
  color: var(--primary);
  box-shadow:
    0 0 0 2px rgba(0, 229, 255, 0.12),
    0 6px 24px rgba(0, 0, 0, 0.4);
}

.dash-home-nav-card--logout {
  flex-basis: 100%;
  max-width: none;
  margin-top: 2px;
  color: #991b1b;
  border-color: rgba(185, 28, 28, 0.22);
  background: linear-gradient(180deg, #fff5f5, #fee2e2);
}

html[data-uel-theme="dark"] .dash-home-nav-card--logout {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.35);
}

.dash-home-nav-card--logout:hover {
  color: #7f1d1d;
  border-color: rgba(185, 28, 28, 0.4);
}

html[data-uel-theme="dark"] .dash-home-nav-card--logout:hover {
  color: #fef2f2;
}

.dash-home-nav-card:focus-visible {
  outline: 2px solid #0e7490;
  outline-offset: 3px;
}

.dash-home-theme-btn {
  border: 1px solid rgba(23, 23, 23, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: #404040;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}

html[data-uel-theme="dark"] .dash-home-theme-btn {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.dash-home-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(23, 23, 23, 0.1);
  background: #fff;
}

html[data-uel-theme="dark"] .dash-home-profile {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.dash-home-profile-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  background: linear-gradient(135deg, rgba(56, 182, 255, 0.35), rgba(168, 85, 247, 0.45));
  color: #0a0a0a;
}

html[data-uel-theme="dark"] .dash-home-profile-avatar {
  color: #f8fafc;
}

.dash-home-profile-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  max-width: 120px;
}

.dash-home-profile-name {
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-home-profile-id {
  font-size: 0.68rem;
  color: #78716c;
}

html[data-uel-theme="dark"] .dash-home-profile-id {
  color: var(--muted);
}

.dash-home-profile-chevron {
  font-size: 0.65rem;
  color: #78716c;
}

.dash-home-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.dash-home-overlay.dash-home-overlay--open {
  display: block;
  opacity: 1;
}

.dash-home-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(300px, 88vw);
  height: 100vh;
  z-index: 150;
  padding: 72px 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.98);
  border-left: 1px solid rgba(23, 23, 23, 0.1);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-uel-theme="dark"] .dash-home-drawer {
  background: rgba(12, 10, 24, 0.96);
  border-left-color: rgba(255, 255, 255, 0.1);
}

.dash-home-drawer.dash-home-drawer--open {
  transform: translateX(0);
}

.dash-home-drawer-link {
  text-decoration: none;
}

.dash-home-drawer-card {
  display: block;
  padding: 14px 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.88rem;
  text-align: center;
  color: #292524;
  border: 1px solid rgba(23, 23, 23, 0.1);
  background: #fff;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

html[data-uel-theme="dark"] .dash-home-drawer-card {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.dash-home-drawer-card:hover {
  transform: translateY(-1px);
  border-color: rgba(14, 116, 144, 0.3);
  box-shadow: 0 6px 18px rgba(14, 116, 144, 0.12);
}

html[data-uel-theme="dark"] .dash-home-drawer-card:hover {
  border-color: rgba(0, 229, 255, 0.25);
}

.dash-home-drawer-card.is-active {
  border-color: rgba(14, 116, 144, 0.45);
  background: linear-gradient(180deg, rgba(224, 242, 254, 0.95), rgba(186, 230, 253, 0.55));
  color: #0e7490;
  box-shadow:
    0 0 0 2px rgba(14, 116, 144, 0.1),
    0 6px 18px rgba(14, 116, 144, 0.12);
}

html[data-uel-theme="dark"] .dash-home-drawer-card.is-active {
  border-color: rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.1);
  color: var(--primary);
}

.dash-home-drawer-card--logout {
  margin-top: 8px;
  color: #991b1b;
  border-color: rgba(185, 28, 28, 0.22);
  background: linear-gradient(180deg, #fff5f5, #fee2e2);
}

html[data-uel-theme="dark"] .dash-home-drawer-card--logout {
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(127, 29, 29, 0.35);
}

.dash-home-drawer-card--logout:hover {
  color: #7f1d1d;
}

html[data-uel-theme="dark"] .dash-home-drawer-card--logout:hover {
  color: #fef2f2;
}

.dash-home-drawer-card:focus-visible {
  outline: 2px solid #0e7490;
  outline-offset: 2px;
}

.dash-home-main {
  flex: 1;
  width: 100%;
  padding: 16px 18px 32px;
}

body.dash-home-menu-open {
  overflow: hidden;
}

.dash-home-announce {
  margin-bottom: 14px;
}

.dash-hero-center--home {
  padding-top: var(--space-6);
}

.dash-hero-line--split {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  text-align: center;
}

.dash-hero-line1 {
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  font-weight: 800;
  color: #0a0a0a;
}

html[data-uel-theme="dark"] .dash-hero-line1,
html[data-uel-theme="dark"] .dash-hero-line2 {
  color: var(--text);
}

.dash-hero-line2 {
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  font-weight: 600;
  color: #44403c;
  max-width: 28rem;
}

html[data-uel-theme="dark"] .dash-hero-line2 {
  color: var(--muted);
}

.dash-home-cta {
  margin-top: var(--space-2);
}

html[data-uel-theme="light"] body.theme-dash-home .dash-continue-link {
  color: #0e7490;
}

.dash-store-spotlight--home {
  border-color: rgba(23, 23, 23, 0.1);
  background: rgba(255, 255, 255, 0.85);
}

html[data-uel-theme="dark"] .dash-store-spotlight--home {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

html[data-uel-theme="light"] body.theme-dash-home .glass-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(23, 23, 23, 0.1);
}

html[data-uel-theme="light"] body.theme-dash-home .muted {
  color: var(--muted);
}

.dash-footnote--home {
  margin-bottom: calc(24px + env(safe-area-inset-bottom));
}

.dash-footnote--home a {
  color: #0e7490;
}

html[data-uel-theme="dark"] .dash-footnote--home a {
  color: #c4b5fd;
}

@media (max-width: 900px) {
  .dash-home-nav {
    display: none;
  }

  .dash-home-burger {
    display: inline-flex;
  }
}

@media (max-width: 520px) {
  .dash-home-profile-meta {
    display: none;
  }

  .dash-home-profile-chevron {
    display: none;
  }
}

/* —— Global theme: light default + one palette for every page (sidebar, test, store, legal, auth) —— */
html[data-uel-theme="light"] {
  /* :root --muted is for dark cosmic UI; on light surfaces it fails WCAG */
  --muted: #4b5563;
}

html[data-uel-theme="light"] body {
  background: #f5f5f6;
  background-image: none;
  color: #171717;
}

html[data-uel-theme="light"] body::before {
  display: none;
}

html[data-uel-theme="light"] .muted {
  color: var(--muted);
}

html[data-uel-theme="light"] .sidebar {
  background: rgba(255, 255, 255, 0.94);
  border-left-color: rgba(23, 23, 23, 0.1);
  box-shadow: -4px 0 36px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(23, 23, 23, 0.04);
}

html[data-uel-theme="light"] .nav-link {
  color: #292524;
}

html[data-uel-theme="light"] .nav-link .nav-icon-img {
  filter: none;
  opacity: 0.92;
}

html[data-uel-theme="light"] .nav-link:hover,
html[data-uel-theme="light"] .nav-link.active {
  background: rgba(14, 116, 144, 0.12);
  box-shadow: none;
  color: #0c4a6e;
  transform: translateX(-3px);
}

html[data-uel-theme="light"] .nav-link.active::before {
  background: linear-gradient(#0e7490, #06b6d4);
}

html[data-uel-theme="light"] .nav-group--minor {
  border-top-color: rgba(23, 23, 23, 0.08);
}

html[data-uel-theme="light"] .sidebar-close {
  border-color: rgba(23, 23, 23, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: #292524;
}

html[data-uel-theme="light"] .mobile-overlay {
  background: rgba(15, 23, 42, 0.35);
}

html[data-uel-theme="light"] .mobile-tabbar {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(23, 23, 23, 0.1);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

html[data-uel-theme="light"] .mobile-tabbar--student {
  background: rgba(255, 255, 255, 0.97);
  border-color: rgba(23, 23, 23, 0.1);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
}

html[data-uel-theme="light"] .tab-link {
  color: #44403c;
}

html[data-uel-theme="light"] .tab-link.active {
  color: #0e7490;
}

html[data-uel-theme="light"] .tab-link .tab-icon img {
  filter: none;
  opacity: 0.9;
}

html[data-uel-theme="light"] .glass-card {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(23, 23, 23, 0.1);
  color: #171717;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

html[data-uel-theme="light"] input,
html[data-uel-theme="light"] select,
html[data-uel-theme="light"] textarea {
  border-color: rgba(23, 23, 23, 0.15);
  background: #fff;
  color: #171717;
}

html[data-uel-theme="light"] .btn-secondary {
  background: #fff;
  color: #171717;
  border: 1px solid rgba(23, 23, 23, 0.16);
}

html[data-uel-theme="light"] .btn-secondary:hover {
  background: #f4f4f5;
  color: #0a0a0a;
}

html[data-uel-theme="light"] .mobile-menu-btn {
  border-color: rgba(23, 23, 23, 0.15);
  color: #171717;
  background: #fff;
}

html[data-uel-theme="light"] .breadcrumbs {
  color: #3f3f46;
  font-weight: 500;
}

html[data-uel-theme="light"] .badge {
  background: #f4f4f5;
  border-color: rgba(23, 23, 23, 0.12);
  color: #3f3f46;
}

html[data-uel-theme="light"] .text-gradient {
  background: linear-gradient(90deg, #0369a1, #b45309, #6d28d9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-uel-theme="light"] .hero-genz-eyebrow {
  color: #0369a1;
}

html[data-uel-theme="light"] .analysis-strip {
  border-color: rgba(23, 23, 23, 0.1);
  background: linear-gradient(135deg, #f8fafc, #eef2f7);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

html[data-uel-theme="light"] .analysis-strip-pill {
  background: #fff;
  border: 1px solid rgba(23, 23, 23, 0.12);
}

html[data-uel-theme="light"] .analysis-strip-pill--muted {
  opacity: 1;
}

html[data-uel-theme="light"] .analysis-strip-k {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: #0369a1;
}

html[data-uel-theme="light"] .analysis-strip-pill--muted .analysis-strip-k {
  color: #0f172a;
}

html[data-uel-theme="light"] .analysis-strip-l {
  color: #3f3f46;
  font-weight: 650;
}

html[data-uel-theme="light"] .analysis-chart-shell {
  border: 1px solid rgba(23, 23, 23, 0.1);
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

html[data-uel-theme="light"] .analysis-chart-title {
  color: #0a0a0a;
}

html[data-uel-theme="light"] .analysis-ai-coach {
  border: 1px solid rgba(23, 23, 23, 0.1);
  background: linear-gradient(160deg, #f8fafc, #faf5ff);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
}

html[data-uel-theme="light"] .analysis-ai-title {
  color: #0a0a0a;
}

html[data-uel-theme="light"] .analysis-ai-line {
  color: #292524;
}

html[data-uel-theme="light"] .analysis-quick-take {
  border-color: rgba(23, 23, 23, 0.14);
}

html[data-uel-theme="light"] .analysis-quick-title {
  color: #0a0a0a;
}

html[data-uel-theme="light"] .analysis-ai-mascot-img {
  background: #e5e7eb;
}

html[data-uel-theme="light"] .profile-orders-table tbody tr.profile-order-row {
  background: #f9fafb;
  border-color: rgba(23, 23, 23, 0.1);
}

html[data-uel-theme="light"] .profile-orders-table tbody tr.profile-order-row td {
  border-bottom-color: rgba(23, 23, 23, 0.08);
}

html[data-uel-theme="light"] .page-header h2,
html[data-uel-theme="light"] .content h1,
html[data-uel-theme="light"] .content h2 {
  color: #0a0a0a;
}

html[data-uel-theme="light"] .test-level-gate {
  border-color: rgba(23, 23, 23, 0.1);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(245, 245, 246, 0.95));
}

html[data-uel-theme="light"] .test-level-card {
  border-color: rgba(23, 23, 23, 0.12);
  background: rgba(255, 255, 255, 0.9);
}

html[data-uel-theme="light"] .test-level-card:hover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
}

html[data-uel-theme="light"] .option-item {
  border-color: rgba(23, 23, 23, 0.12);
  color: #171717;
}

html[data-uel-theme="light"] .option-item:hover {
  border-color: rgba(14, 116, 144, 0.45);
}

html[data-uel-theme="light"] .option-item.selected {
  border-color: #0e7490;
  background: rgba(14, 116, 144, 0.08);
}

html[data-uel-theme="light"] .legal-body {
  background: #f5f5f6;
  color: #171717;
}

html[data-uel-theme="light"] .legal-topbar {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: rgba(23, 23, 23, 0.1);
}

html[data-uel-theme="light"] .legal-brand {
  color: #0a0a0a;
}

html[data-uel-theme="light"] .legal-brand:hover {
  color: #0e7490;
}

html[data-uel-theme="light"] .legal-article {
  color: #292524;
}

html[data-uel-theme="light"] .legal-lead {
  color: #44403c;
}

html[data-uel-theme="light"] .flash.error {
  background: rgba(254, 226, 226, 0.95);
  border-color: rgba(185, 28, 28, 0.35);
  color: #7f1d1d;
}

html[data-uel-theme="light"] .flash.success {
  background: rgba(220, 252, 231, 0.95);
  border-color: rgba(21, 128, 61, 0.35);
  color: #14532d;
}

html[data-uel-theme="light"] .sidebar-user {
  border-color: rgba(23, 23, 23, 0.1);
  background: rgba(245, 245, 246, 0.95);
}

html[data-uel-theme="light"] .sidebar-code {
  border-color: rgba(14, 116, 144, 0.45);
  color: #0e7490;
}

html[data-uel-theme="light"] .auth-divider::before,
html[data-uel-theme="light"] .auth-divider::after {
  background: rgba(23, 23, 23, 0.12);
}

.sidebar-theme-row {
  margin-bottom: var(--space-4);
}

.uel-sidebar-theme-btn {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

html[data-uel-theme="light"] .uel-sidebar-theme-btn {
  border-color: rgba(23, 23, 23, 0.14);
  background: #fff;
  color: #404040;
}

.uel-auth-theme-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}

html[data-uel-theme="light"] .uel-auth-theme-btn {
  border-color: rgba(23, 23, 23, 0.16);
  background: #fff;
  color: #404040;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.legal-theme-toggle {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  margin-right: 8px;
}

html[data-uel-theme="light"] .legal-theme-toggle {
  border-color: rgba(23, 23, 23, 0.14);
  background: #fff;
  color: #404040;
}

@media (max-width: 980px) {
  html[data-uel-theme="light"] .sidebar {
    background: rgba(255, 255, 255, 0.98);
    border-left-color: rgba(23, 23, 23, 0.1);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  }
}

/* —— Test solve: notebook card + progress tube —— */
.content--test-solve .breadcrumbs {
  display: none;
}

.content--test-solve {
  padding-top: var(--space-4);
}

.test-solve-toolbar {
  margin-bottom: 14px;
  padding: 0;
  overflow: hidden;
}

.test-solve-toolbar-sum {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 16px;
  color: var(--text);
}

.test-solve-toolbar-sum::-webkit-details-marker {
  display: none;
}

.test-solve-toolbar[open] .test-solve-toolbar-sum {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

html[data-uel-theme="light"] .test-solve-toolbar[open] .test-solve-toolbar-sum {
  border-bottom-color: rgba(23, 23, 23, 0.1);
}

.test-solve-toolbar-body {
  padding: 12px 16px 16px;
}

.test-solve-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.test-solve-filter-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.test-solve-field {
  min-width: 200px;
  flex: 1 1 200px;
}

.test-solve-gen-btn {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #0e7490, #06b6d4);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.notebook-test-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.notebook-test-stack {
  position: relative;
  padding: 0 8px 14px 12px;
}

.notebook-test-sheet {
  position: absolute;
  border-radius: 14px;
  background: #e8e4dc;
  box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.06);
}

.notebook-test-sheet--back {
  inset: 10px 4px 4px 0;
  transform: rotate(-0.6deg);
  z-index: 0;
}

.notebook-test-sheet--mid {
  inset: 5px 2px 8px 4px;
  transform: rotate(0.35deg);
  background: #f0ebe3;
  z-index: 1;
}

html[data-uel-theme="dark"] .notebook-test-sheet--back {
  background: #252028;
}

html[data-uel-theme="dark"] .notebook-test-sheet--mid {
  background: #2a252e;
}

.notebook-test-card {
  position: relative;
  z-index: 2;
  border-radius: 16px;
  background: #fffef8;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.04),
    0 14px 40px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  max-width: 100%;
}

html[data-uel-theme="dark"] .notebook-test-card {
  background: #2f2d2a;
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.notebook-test-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px;
  gap: 8px 12px;
  align-items: stretch;
  min-height: 420px;
}

.notebook-test-paper {
  position: relative;
  padding: 20px 20px 20px 44px;
  background-color: #fffef8;
  background-image:
    linear-gradient(90deg, rgba(220, 38, 38, 0.35) 0, rgba(220, 38, 38, 0.35) 2px, transparent 2px, transparent 32px),
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(120, 113, 108, 0.14) 27px,
      rgba(120, 113, 108, 0.14) 28px
    );
  background-size: 100% 100%, 100% 28px;
  background-position: 0 0, 0 12px;
}

html[data-uel-theme="dark"] .notebook-test-paper {
  background-color: #2f2d2a;
  background-image:
    linear-gradient(90deg, rgba(248, 113, 113, 0.45) 0, rgba(248, 113, 113, 0.45) 2px, transparent 2px, transparent 32px),
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(255, 255, 255, 0.07) 27px,
      rgba(255, 255, 255, 0.07) 28px
    );
}

.notebook-test-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

.notebook-test-progress {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 800;
  color: #292524;
  letter-spacing: -0.02em;
}

html[data-uel-theme="dark"] .notebook-test-progress {
  color: #f5f5f4;
}

.notebook-timer {
  font-family: ui-monospace, monospace;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: #1c1917;
  font-variant-numeric: tabular-nums;
}

html[data-uel-theme="dark"] .notebook-timer {
  color: #e7e5e4;
}

.notebook-timer.timer.warning {
  color: #b45309;
}

.notebook-timer.timer.danger {
  color: #b91c1c;
}

.notebook-test-meta {
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.35;
}

.notebook-test-q {
  font-family: "Caveat", cursive;
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  font-weight: 600;
  line-height: 1.35;
  color: #1c1917;
  margin: 0 0 18px;
  min-height: 2.5rem;
}

html[data-uel-theme="dark"] .notebook-test-q {
  color: #fafaf9;
}

.notebook-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notebook-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid rgba(120, 113, 108, 0.25);
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.04);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

html[data-uel-theme="dark"] .notebook-option {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.15);
}

.notebook-option:hover {
  border-color: rgba(14, 116, 144, 0.45);
}

.notebook-option.selected {
  border-color: rgba(180, 83, 9, 0.55);
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.95), rgba(253, 230, 138, 0.75));
  box-shadow: 0 3px 12px rgba(180, 83, 9, 0.15);
}

html[data-uel-theme="dark"] .notebook-option.selected {
  background: linear-gradient(135deg, rgba(120, 53, 15, 0.5), rgba(146, 64, 14, 0.35));
  border-color: rgba(251, 191, 36, 0.45);
}

.notebook-option-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}

.notebook-option-box {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 2px solid rgba(87, 83, 78, 0.45);
  display: grid;
  place-items: center;
  background: #fff;
  margin-top: 2px;
}

.notebook-option.selected .notebook-option-box {
  border-color: #15803d;
  background: #dcfce7;
}

.notebook-option-check {
  opacity: 0;
  color: #15803d;
}

.notebook-option.selected .notebook-option-check {
  opacity: 1;
}

.notebook-option-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notebook-option-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.notebook-option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.85rem;
  background: rgba(14, 116, 144, 0.12);
  color: #0c4a6e;
  flex-shrink: 0;
}

.notebook-option-text {
  font-family: "Caveat", cursive;
  font-size: 1.25rem;
  font-weight: 600;
  color: #292524;
  flex: 1;
  min-width: 120px;
}

html[data-uel-theme="dark"] .notebook-option-text {
  color: #e7e5e4;
}

.notebook-option-img-wrap {
  margin: 0 0 4px 0 !important;
}

.notebook-step-controls {
  margin-top: 14px;
}

.notebook-step-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.notebook-test-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed rgba(120, 113, 108, 0.35);
}

@media (max-width: 640px) {
  .notebook-test-foot {
    grid-template-columns: 1fr;
  }
}

.notebook-confidence-inner label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #78716c;
  margin-bottom: 6px;
}

.notebook-confidence-select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(120, 113, 108, 0.35);
  padding: 8px 10px;
  font: inherit;
  background: rgba(255, 255, 255, 0.9);
  color: #1c1917;
}

html[data-uel-theme="dark"] .notebook-confidence-select {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f5f5f4;
}

.notebook-note-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #78716c;
  margin-bottom: 6px;
}

.notebook-note-input {
  width: 100%;
  border-radius: 10px;
  border: 1px dashed rgba(120, 113, 108, 0.4);
  padding: 10px 12px;
  font-family: "Caveat", cursive;
  font-size: 1.15rem;
  line-height: 1.4;
  resize: vertical;
  min-height: 52px;
  background: rgba(255, 255, 255, 0.5);
  color: #1c1917;
}

html[data-uel-theme="dark"] .notebook-note-input {
  background: rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fafaf9;
}

.notebook-micro-tip-mount {
  margin-top: 12px;
}

.notebook-micro-tip {
  border-radius: 12px;
}

.notebook-test-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.notebook-nav-btn {
  border-radius: 12px;
}

.notebook-submit-btn {
  border-radius: 12px;
  margin-left: auto;
  background: linear-gradient(135deg, #0e7490, #06b6d4);
  border: none;
  color: #fff;
  font-weight: 700;
}

.notebook-tube-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 4px 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(245, 245, 244, 0.9));
  border-left: 1px solid rgba(120, 113, 108, 0.15);
}

html[data-uel-theme="dark"] .notebook-tube-aside {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(28, 25, 23, 0.6));
  border-left-color: rgba(255, 255, 255, 0.08);
}

.notebook-tube-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: #78716c;
  letter-spacing: 0.02em;
}

.notebook-tube-outer {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 160px;
  padding: 8px 0;
}

.notebook-tube {
  position: relative;
  width: 44px;
  height: min(48vh, 280px);
  border-radius: 999px;
  border: 3px solid rgba(120, 113, 108, 0.35);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.4), rgba(231, 229, 228, 0.95), rgba(255, 255, 255, 0.35));
  box-shadow:
    inset 0 2px 8px rgba(255, 255, 255, 0.8),
    inset 0 -4px 12px rgba(0, 0, 0, 0.06),
    2px 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

html[data-uel-theme="dark"] .notebook-tube {
  border-color: rgba(255, 255, 255, 0.2);
  background: linear-gradient(90deg, rgba(40, 40, 40, 0.9), rgba(60, 58, 56, 0.95), rgba(40, 40, 40, 0.9));
}

.notebook-tube-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%);
  pointer-events: none;
  z-index: 2;
}

.notebook-tube-fill {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: 3px;
  height: 0%;
  max-height: calc(100% - 6px);
  border-radius: 0 0 999px 999px;
  background: linear-gradient(180deg, #38bdf8 0%, #0ea5e9 35%, #f97316 100%);
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.35);
  transition: height 0.45s cubic-bezier(0.33, 1, 0.68, 1);
  z-index: 1;
}

.notebook-tube-bubbles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.35) 0, transparent 40%),
    radial-gradient(circle at 70% 45%, rgba(255, 255, 255, 0.2) 0, transparent 35%),
    radial-gradient(circle at 45% 70%, rgba(255, 255, 255, 0.25) 0, transparent 30%);
  animation: notebook-bubbles 4s ease-in-out infinite;
  opacity: 0.7;
}

@keyframes notebook-bubbles {
  0%,
  100% {
    opacity: 0.55;
    transform: translateY(0);
  }
  50% {
    opacity: 0.85;
    transform: translateY(-3px);
  }
}

@media (max-width: 980px) {
  main.content.content--test-solve {
    padding-left: max(8px, env(safe-area-inset-left));
    padding-right: max(8px, env(safe-area-inset-right));
    padding-bottom: calc(116px + env(safe-area-inset-bottom));
  }

  .test-solve-toolbar-sum {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .test-solve-toolbar-body {
    padding: 10px 12px 14px;
  }

  .test-solve-field {
    min-width: 100%;
    flex: 1 1 100%;
  }

  .test-solve-filter-fields {
    flex-direction: column;
    align-items: stretch;
  }

  .test-solve-gen-btn {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .notebook-test-wrap {
    max-width: 100%;
    margin: 0;
    overflow-x: clip;
  }

  .notebook-test-stack {
    padding: 0 0 10px;
  }

  .notebook-test-sheet--back,
  .notebook-test-sheet--mid {
    display: none;
  }

  .notebook-test-card {
    border-radius: 14px;
  }

  .notebook-test-layout {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 0;
  }

  .notebook-test-paper {
    padding: 14px 12px 16px 28px;
    background-size: 100% 100%, 100% 26px;
    background-position: 0 0, 0 10px;
    background-image:
      linear-gradient(90deg, rgba(220, 38, 38, 0.35) 0, rgba(220, 38, 38, 0.35) 2px, transparent 2px, transparent 22px),
      repeating-linear-gradient(
        transparent,
        transparent 25px,
        rgba(120, 113, 108, 0.14) 25px,
        rgba(120, 113, 108, 0.14) 26px
      );
  }

  html[data-uel-theme="dark"] .notebook-test-paper {
    background-size: 100% 100%, 100% 26px;
    background-position: 0 0, 0 10px;
    background-image:
      linear-gradient(90deg, rgba(248, 113, 113, 0.45) 0, rgba(248, 113, 113, 0.45) 2px, transparent 2px, transparent 22px),
      repeating-linear-gradient(
        transparent,
        transparent 25px,
        rgba(255, 255, 255, 0.07) 25px,
        rgba(255, 255, 255, 0.07) 26px
      );
  }

  .notebook-test-head {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
  }

  .notebook-test-progress {
    font-size: clamp(0.82rem, 3.8vw, 1rem);
    flex: 1;
    min-width: 0;
    line-height: 1.3;
  }

  .notebook-timer {
    font-size: 1rem;
  }

  .notebook-test-meta {
    font-size: 0.68rem;
    line-height: 1.4;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .notebook-test-q {
    font-size: clamp(1.1rem, 5vw, 1.5rem);
    margin-bottom: 14px;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .notebook-options {
    gap: 8px;
  }

  .notebook-option {
    min-height: 48px;
    padding: 12px 12px;
    align-items: center;
    -webkit-tap-highlight-color: rgba(14, 116, 144, 0.18);
  }

  .notebook-option-box {
    width: 28px;
    height: 28px;
  }

  .notebook-option-text {
    font-size: 1.05rem;
    min-width: 0;
  }

  .notebook-option .option-item__img {
    max-height: 120px;
  }

  .notebook-confidence-select {
    min-height: 48px;
    padding: 10px 12px;
    font-size: 1rem;
  }

  .notebook-note-input {
    min-height: 56px;
    padding: 12px;
    font-size: 1rem;
  }

  .notebook-step-row {
    flex-direction: column;
    align-items: stretch;
  }

  .notebook-step-row .notebook-step-btn {
    width: 100%;
    min-height: 48px;
  }

  .notebook-test-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
  }

  .notebook-test-actions #prevBtn {
    grid-column: 1;
  }

  .notebook-test-actions #nextBtn {
    grid-column: 2;
  }

  .notebook-test-actions #submitBtn {
    grid-column: 1 / -1;
    margin-left: 0;
    width: 100%;
    min-height: 50px;
  }

  .notebook-tube-aside {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 16px;
    border-left: none;
    border-top: 1px solid rgba(120, 113, 108, 0.15);
    padding: 12px 12px 14px;
  }

  .notebook-tube-outer {
    min-height: auto;
    flex: 1 1 160px;
    max-width: 100%;
    justify-content: center;
  }

  .notebook-tube {
    width: min(88vw, 320px);
    height: 40px;
    border-radius: 999px;
  }

  .notebook-tube-fill {
    left: 3px;
    right: auto;
    top: 2px;
    bottom: 2px;
    width: 0%;
    height: calc(100% - 4px);
    max-width: calc(100% - 6px);
    border-radius: 999px;
    background: linear-gradient(90deg, #38bdf8 0%, #0ea5e9 40%, #f97316 100%);
  }

  .notebook-tube-label--top::after {
    content: " →";
  }

  .notebook-tube-label--mid,
  .notebook-tube-label--bot {
    display: none;
  }
}

@media (max-width: 380px) {
  .notebook-test-paper {
    padding-left: 24px;
  }

  .notebook-test-progress {
    font-size: 0.78rem;
  }

  .notebook-timer {
    font-size: 0.92rem;
  }
}
