:root {
  --bg: #f7fbfa;
  --panel: #f8fbf7;
  --card: rgba(255, 255, 255, 0.94);
  --card-strong: #ffffff;
  --secondary: #f1f5f9;
  --border: rgba(15, 23, 32, 0.08);
  --text: #0f1720;
  --muted: #64748b;
  --line: rgba(18, 55, 71, 0.12);
  --teal: #0d9488;
  --mint: #5dd4b5;
  --lime: #d6ef6a;
  --coral: #ff8e63;
  --gold: #f2c85a;
  --explore-primary: #07beb3;
  --explore-primary-foreground: #ffffff;
  --explore-secondary: #e6fbf9;
  --explore-secondary-foreground: #05403b;
  --explore-accent: #ffd166;
  --explore-accent-foreground: #3a2e00;
  --explore-muted: #f1f4f5;
  --explore-muted-foreground: #9aa6aa;
  --explore-sidebar-primary: #07beb3;
  --shadow: 0 20px 60px rgba(16, 46, 57, 0.14);
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --font-body: "Plus Jakarta Sans", sans-serif;
  --font-display: "Space Grotesk", sans-serif;
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(96, 219, 184, 0.38), transparent 28%),
    radial-gradient(circle at bottom right, rgba(242, 200, 90, 0.26), transparent 24%),
    linear-gradient(180deg, #edf5f1 0%, #edf0e9 100%);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.page-shell {
  width: min(1280px, calc(100vw - 40px));
  margin: 32px auto;
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(320px, 1fr);
  gap: 28px;
  align-items: start;
}

.spec-panel,
.prototype-panel {
  position: relative;
  padding: 28px;
  border-radius: 36px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(248, 251, 247, 0.68);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}

.brand-lockup,
.header-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup {
  margin-bottom: 8px;
}

.brand-mark,
.header-mark,
.login-wordmark {
  display: block;
  object-fit: contain;
}

.brand-mark {
  width: 54px;
  height: auto;
}

.header-mark {
  width: 22px;
  height: auto;
}

.brand-caption {
  color: var(--muted);
  font-size: 0.84rem;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
}

h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 0.98;
}

.lead {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.principles {
  margin-top: 28px;
  display: grid;
  gap: 14px;
}

.principle-card,
.section-list,
.prototype-header {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.64);
  border-radius: 24px;
}

.principle-card {
  padding: 18px;
}

.principle-card span {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(18, 183, 176, 0.12);
  color: var(--teal);
  font-weight: 800;
}

.principle-card h2 {
  margin-top: 12px;
  font-size: 1.05rem;
}

.principle-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.section-list {
  margin-top: 18px;
  padding: 18px;
}

.section-list-title {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.section-pills,
.screen-switcher {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section-pill,
.switcher-pill {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(17, 52, 64, 0.1);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.switcher-pill:hover,
.switcher-pill:focus-visible,
.section-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(14, 49, 61, 0.1);
}

.switcher-pill.active,
.section-pill.active {
  background: linear-gradient(135deg, var(--teal), var(--mint));
  color: #ffffff;
  box-shadow: 0 12px 26px rgba(19, 170, 160, 0.3);
}

.prototype-header {
  padding: 18px 20px;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
}

.prototype-header h2 {
  font-size: 1.15rem;
}

.phone-stage {
  position: relative;
  margin-top: 22px;
  display: flex;
  justify-content: center;
  padding: 12px;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(16px);
  opacity: 0.9;
}

.ambient-a {
  top: 24px;
  right: 10%;
  width: 180px;
  height: 180px;
  background: rgba(96, 219, 184, 0.34);
}

.ambient-b {
  bottom: 18px;
  left: 8%;
  width: 150px;
  height: 150px;
  background: rgba(242, 200, 90, 0.3);
}

.phone-shell {
  position: relative;
  width: min(375px, 100%);
  min-height: 812px;
  border-radius: 32px;
  background: var(--bg);
  border: 1px solid rgba(15, 23, 32, 0.08);
  box-shadow: 0 28px 60px rgba(16, 47, 57, 0.18);
  overflow: hidden;
}

.phone-notch {
  display: none;
}

.phone-screen {
  position: relative;
  min-height: 812px;
  height: 812px;
  background: var(--bg);
}

.phone-screen.login-screen {
  min-height: 812px;
  height: 812px;
  background: var(--bg);
}

.main-content {
  height: 100%;
  padding: 76px 16px 90px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.login-content {
  padding: 32px 16px 28px;
}

.login-stack {
  gap: 16px;
}

.screen-header {
  margin-bottom: -8px;
}

.screen-title {
  font-size: 1rem;
  font-weight: 700;
  color: rgba(15, 23, 32, 0.64);
}

.top-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  background: var(--bg);
  z-index: 10;
}

.top-bar-group {
  display: flex;
  gap: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card-strong);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-size: 14px;
  font-weight: 600;
  color: #ea580c;
}

.chip.heart {
  color: #e11d48;
}

.chip iconify-icon {
  font-size: 16px;
}

.avatar-chip {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(160deg, #f8d4bf, #a76642);
  border: 2px solid var(--teal);
}

.avatar-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.avatar-chip::after {
  content: attr(data-badge);
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border: 2px solid var(--bg);
}

.quick-circles-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.quick-circles-row::-webkit-scrollbar {
  display: none;
}
.quick-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 68px;
  flex-shrink: 0;
  gap: 4px;
}
.quick-circle-ring {
  position: relative;
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quick-circle-ring svg {
  position: absolute;
  inset: 0;
}
.quick-circle-icon {
  font-size: 24px;
  z-index: 1;
}
.quick-circle-check {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #34D399;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  z-index: 2;
}
.quick-circle-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 68px;
}

.hero-card,
.glass-card,
.category-card,
.mission-card,
.tool-card,
.leaderboard-card,
.badge-card,
.profile-banner {
  border-radius: var(--radius-lg);
  border: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hero-card {
  padding: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.hero-card .eyebrow,
.banner-card .eyebrow {
  margin-bottom: 4px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.9);
}

.hero-card h3,
.banner-card h3 {
  margin-top: 0;
  font-size: 22px;
  line-height: 1.15;
}

.hero-card p,
.banner-card p {
  margin-top: 4px;
  font-size: 14px;
  line-height: 1.5;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.15);
}

.hero-stat {
  padding: 0;
  text-align: center;
  background: transparent;
}

.hero-stat strong {
  display: block;
  font-size: 18px;
}

.hero-stat span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-heading {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
}

.subtle {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.glass-card {
  padding: 16px;
  background: var(--card-strong);
}

.glass-card h4,
.category-card h4,
.mission-card h4,
.tool-card h4,
.leaderboard-card h4,
.badge-card h4 {
  font-size: 16px;
}

.glass-card p,
.category-card p,
.mission-card p,
.tool-card p,
.leaderboard-card p,
.badge-card p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  flex: 1;
}

.primary-button {
  color: #fff;
  background: var(--teal);
  box-shadow: none;
}

.secondary-button {
  color: var(--teal);
  background: var(--secondary);
}

.ghost-button {
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
}

.panel-grid {
  display: grid;
  gap: 14px;
}

.category-card {
  padding: 16px;
  background: var(--card-strong);
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.category-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cat-info {
  flex: 1;
}

.cat-name-row h4 {
  font-size: 15px;
  font-weight: 600;
}

.cat-progress-text {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.category-card .card-head {
  align-items: center;
}

.category-card .card-title-wrap {
  align-items: center;
}

.category-card .icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-size: 24px;
  background: var(--secondary);
  box-shadow: none;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.card-title-wrap {
  display: flex;
  gap: 12px;
  min-width: 0;
  align-items: center;
}

.card-title-wrap > div:last-child {
  min-width: 0;
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  color: var(--teal);
  flex: 0 0 auto;
}

.feature-icon iconify-icon {
  font-size: 22px;
}

.icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  background: rgba(255, 255, 255, 0.64);
}

.theme-work .icon-badge {
  background: #e0f2fe;
}

.theme-money .icon-badge {
  background: #dcfce7;
}

.theme-tax .icon-badge {
  background: #ffedd5;
}

.theme-home .icon-badge {
  background: #f3e8ff;
}

.theme-health .icon-badge {
  background: #ffe4e6;
}

.theme-future .icon-badge {
  background: #e0e7ff;
}

.micro-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(22, 49, 61, 0.68);
}

.progress-row {
  margin-top: 12px;
}

.progress-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #f1f5f9;
}

.progress-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: var(--teal);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.progress-row.compact {
  margin-top: 8px;
}

.progress-row.compact .progress-bar {
  height: 4px;
}

.category-support {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.category-percent {
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
}

.banner-card {
  padding: 20px;
  color: #fff;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(135deg, #14b8b0 0%, #14c4a8 48%, #f0c75c 100%);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
}

.explore-screen {
  background: linear-gradient(180deg, var(--bg) 0%, #ffffff 100%);
}

.explore-screen .top-bar {
  height: auto;
  padding: 14px 18px 10px;
  background: #e9e9e9;
}

.explore-screen .top-bar-group {
  gap: 14px;
}

.explore-screen .chip {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
}

.explore-screen .chip iconify-icon {
  font-size: 20px;
}

.explore-screen .avatar-chip {
  width: 46px;
  height: 46px;
  border: 3px solid var(--explore-primary);
}

.explore-screen .avatar-chip::after {
  width: 20px;
  height: 20px;
  font-size: 11px;
  border: 2px solid var(--card-strong);
  background: var(--explore-primary);
}

.explore-content {
  padding: 82px 20px 76px;
  gap: 0;
}

.explore-hero-section {
  padding-top: 8px;
}

.explore-hero-card {
  background: linear-gradient(135deg, var(--explore-sidebar-primary) 0%, var(--explore-primary) 58%, var(--explore-accent) 100%);
  color: var(--explore-primary-foreground);
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.explore-hero-badge {
  align-self: flex-start;
  padding: 6px 10px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.explore-hero-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.explore-hero-subtitle {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.explore-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.explore-hero-stat {
  background: rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.explore-stat-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.explore-stat-icon iconify-icon {
  font-size: 20px;
  color: currentColor;
}

.explore-hero-stat-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.explore-hero-stat-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.explore-hero-stat-value {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.explore-section {
  padding-top: 24px;
}

.explore-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.explore-section-title {
  margin: 0;
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}

.explore-section-chip {
  background: var(--explore-accent);
  color: var(--explore-accent-foreground);
  border-radius: var(--radius-xl);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.explore-mission-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin-left: -20px;
  margin-right: -20px;
  padding: 0 20px 4px;
}

.explore-mission-card {
  min-width: 276px;
  background: var(--card-strong);
  color: var(--text);
  border-radius: var(--radius-xl);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.explore-mission-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.explore-mission-emoji {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--explore-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex: 0 0 auto;
}

.explore-mission-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--explore-secondary);
  color: var(--explore-secondary-foreground);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.explore-mission-arrow iconify-icon {
  font-size: 18px;
}

.explore-mission-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.explore-mission-copy {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--explore-muted-foreground);
}

.explore-mission-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.explore-meta-pill {
  padding: 6px 10px;
  border-radius: var(--radius-xl);
  background: var(--explore-muted);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.explore-bubble-card {
  background: var(--card-strong);
  border-radius: var(--radius-xl);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.explore-category-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.explore-bubble-copy {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--explore-muted-foreground);
}

.explore-bubble-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 8px;
}

.explore-bubble-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.explore-bubble-circle {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 30px;
  font-weight: 700;
}

.explore-bubble-circle.complete {
  background: var(--explore-secondary);
  color: var(--explore-secondary-foreground);
}

.explore-bubble-circle.current {
  background: linear-gradient(135deg, var(--explore-primary) 0%, var(--explore-accent) 100%);
  color: var(--explore-primary-foreground);
}

.explore-bubble-circle.todo {
  background: var(--explore-muted);
  color: var(--explore-muted-foreground);
}

.explore-bubble-progress {
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.42);
}

.explore-bubble-label {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
  color: var(--text);
  max-width: 96px;
}

.explore-category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.explore-category-card {
  border-radius: var(--radius-xl);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.explore-category-card.work {
  background: #ecfbf7;
}

.explore-category-card.money {
  background: #eff6ff;
}

.explore-category-card.taxes {
  background: #fff8e8;
}

.explore-category-card.home {
  background: #fceff3;
}

.explore-category-card.health {
  background: #eef8ff;
}

.explore-category-emoji {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex: 0 0 auto;
}

.explore-category-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.explore-category-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.explore-category-name,
.explore-category-percent {
  white-space: nowrap;
}

.explore-category-name {
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}

.explore-category-percent {
  font-size: 12px;
  font-weight: 700;
}

.explore-category-meta {
  font-size: 13px;
  font-weight: 500;
  color: var(--explore-muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.explore-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(16, 32, 39, 0.08);
  overflow: hidden;
}

.explore-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--explore-sidebar-primary) 0%, var(--explore-accent) 100%);
}

.banner-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.banner-stat {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
}

.banner-stat strong {
  display: block;
  font-size: 1.35rem;
}

.banner-stat span {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.84);
}

.inline-tag,
.status-tag,
.tiny-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.inline-tag {
  color: var(--text);
  background: rgba(255, 255, 255, 0.18);
}

.status-tag {
  color: #fff;
  background: rgba(17, 52, 64, 0.12);
}

.status-tag.new {
  color: #5c4200;
  background: rgba(242, 200, 90, 0.92);
}

.tiny-tag {
  color: var(--text);
  background: rgba(17, 52, 64, 0.08);
}

.horizontal-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 74%;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}

.horizontal-scroll > * {
  scroll-snap-align: start;
}

.mission-card,
.tool-card,
.leaderboard-card,
.badge-card {
  padding: 16px;
  background: var(--card-strong);
}

.mission-meta,
.tool-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.bubble-panel {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--card-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.bubble-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 12px;
}

.bubble {
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  color: var(--text);
}

.bubble-node {
  position: relative;
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.8rem;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.bubble-node.complete {
  background: linear-gradient(135deg, rgba(207, 245, 226, 0.96), rgba(222, 248, 244, 0.98));
}

.bubble-node.current {
  background: linear-gradient(135deg, #56d4bb, #d9ef6a);
}

.bubble-node.current::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.46);
}

.bubble-node.todo {
  background: rgba(17, 52, 64, 0.08);
  color: rgba(22, 49, 61, 0.55);
}

.bubble small {
  color: rgba(22, 49, 61, 0.72);
  font-weight: 700;
}

.lesson-progress {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lesson-progress .progress-bar {
  flex: 1;
}

.document-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--card-strong);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.doc-preview {
  margin-top: 14px;
  padding: 16px;
  border-radius: 22px;
  background: #f7f9f7;
  border: 1px solid rgba(17, 52, 64, 0.06);
}

.doc-lines {
  display: grid;
  gap: 8px;
}

.doc-line {
  height: 12px;
  border-radius: 999px;
  background: rgba(17, 52, 64, 0.08);
}

.doc-line.wide {
  width: 100%;
}

.doc-line.medium {
  width: 72%;
}

.doc-line.short {
  width: 42%;
}

.doc-hotspots {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.hotspot-button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(17, 52, 64, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-weight: 700;
}

.hotspot-button.correct {
  background: rgba(96, 219, 184, 0.18);
  border-color: rgba(96, 219, 184, 0.4);
}

.hotspot-button.wrong {
  background: rgba(255, 142, 99, 0.16);
  border-color: rgba(255, 142, 99, 0.4);
}

.feedback-box {
  margin-top: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(18, 183, 176, 0.09);
  color: var(--text);
  line-height: 1.5;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  padding: 14px;
  border-radius: var(--radius-md);
  text-align: center;
  background: var(--card-strong);
  border: 0;
}

.stat-card strong {
  display: block;
  font-size: 1.2rem;
}

.stat-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.level-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(18, 183, 176, 0.08), rgba(214, 239, 106, 0.16));
}

.level-steps {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.level-step {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(17, 52, 64, 0.07);
}

.level-step:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.leaderboard-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(17, 52, 64, 0.07);
}

.leaderboard-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.leaderboard-rank {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(18, 183, 176, 0.12);
  color: var(--teal);
  font-weight: 800;
}

.leaderboard-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mini-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(160deg, #f8d4bf, #a76642);
}

.mini-avatar.alt {
  background: linear-gradient(160deg, #cbb6ff, #4d69d7);
}

.mini-avatar.alt-two {
  background: linear-gradient(160deg, #ffd9c5, #d76f53);
}

.leaderboard-user strong {
  display: block;
}

.leaderboard-user span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.profile-banner {
  padding: 18px 18px 16px;
  color: #ffffff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 36%),
    linear-gradient(135deg, #0da8a1 0%, #3ed0bc 52%, #80d29f 100%);
}

.profile-top {
  display: flex;
  gap: 14px;
  align-items: flex-end;
}

.profile-avatar {
  position: relative;
  width: 60px;
  height: 104px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.32), transparent 38%),
    linear-gradient(180deg, #efc8b6 0%, #c98b6d 100%);
  border: 2px solid rgba(255, 255, 255, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.profile-avatar-head {
  position: absolute;
  left: 50%;
  top: 12px;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 236, 225, 0.88), transparent 42%),
    linear-gradient(180deg, #ffd8c4 0%, #e5b39a 100%);
  box-shadow: inset 0 -2px 0 rgba(165, 90, 53, 0.08);
}

.profile-avatar-body {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 52px;
  height: 62px;
  margin-left: -26px;
  border-radius: 26px 26px 18px 18px;
  background:
    linear-gradient(180deg, rgba(255, 224, 207, 0.88) 0%, rgba(222, 173, 146, 0.95) 100%);
}

.profile-avatar-level {
  position: absolute;
  left: 6px;
  bottom: 8px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(191, 146, 117, 0.92);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(107, 68, 46, 0.18);
}

.profile-copy {
  min-width: 0;
  flex: 1;
}

.profile-copy p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 1.35;
  max-width: 230px;
}

.profile-copy h3 {
  font-size: 17px;
  line-height: 1.12;
}

.profile-eyebrow {
  margin-bottom: 6px;
  color: rgba(12, 73, 69, 0.46);
  letter-spacing: 0.18em;
  font-size: 0.7rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(17, 52, 64, 0.08);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.pill.selected {
  background: rgba(18, 183, 176, 0.14);
}

.pill.source-active {
  background: linear-gradient(135deg, rgba(96, 219, 184, 0.24), rgba(214, 239, 106, 0.28));
}

.phone-screen.login-screen {
  min-height: 812px;
  height: 812px;
  background: var(--bg);
}

.login-hero {
  text-align: center;
  padding: 8px 0 4px;
}

.login-wordmark-frame {
  width: 220px;
  margin: 0 auto 6px;
}

.login-wordmark {
  margin: 0 auto;
  width: 100%;
  height: auto;
  display: block;
}

.login-tagline {
  margin-top: 4px;
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.welcome-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(96, 219, 184, 0.10), rgba(214, 239, 106, 0.12));
  border: 1px solid rgba(96, 219, 184, 0.18);
}

.welcome-banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--mint), var(--lime));
  color: #fff;
}

.welcome-banner strong {
  font-size: 14px;
  display: block;
  margin-bottom: 2px;
}

.welcome-banner p {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.35;
}

.login-btn {
  min-height: 52px;
  font-size: 1rem;
  font-weight: 700;
}

/* Social strip (circles) */
.login-social-strip {
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 8px 0 4px;
}

.social-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--card-strong);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.social-circle:hover {
  border-color: var(--mint);
  background: rgba(96, 219, 184, 0.06);
}

.login-or-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.login-or-divider::before,
.login-or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(17, 52, 64, 0.1);
}

.login-or-divider span {
  font-size: 0.8rem;
  color: rgba(22, 49, 61, 0.45);
  white-space: nowrap;
}

.field-optional {
  font-weight: 400;
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.7;
  margin-left: 4px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 4px;
  gap: 4px;
  border-radius: var(--radius-md);
  background: #edf2f1;
}

.auth-tab {
  min-height: 44px;
  border-radius: 10px;
  background: transparent;
  color: rgba(15, 23, 32, 0.58);
  font-weight: 700;
}

.auth-tab.active {
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  box-shadow: 0 8px 14px rgba(17, 52, 64, 0.08);
}

.form-grid {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.field-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.field-group input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card-strong);
  color: var(--text);
}

.field-help,
.field-link {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.field-link {
  text-align: right;
  color: var(--mint);
  font-weight: 700;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: rgba(22, 49, 61, 0.48);
  font-size: 0.84rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(17, 52, 64, 0.1);
}

.social-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.social-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card-strong);
  color: var(--text);
  font-weight: 600;
  font-size: 0.82rem;
}

.social-icon {
  display: inline-flex;
  width: 24px;
  justify-content: center;
  font-size: 1.05rem;
}

.phone-bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 0;
  height: 70px;
  padding: 0 0 env(safe-area-inset-bottom, 0);
  border-top: 1px solid var(--border);
  background: var(--card-strong);
}

.phone-bottom-nav.hidden {
  display: none;
}

.nav-button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0;
  background: transparent;
  color: var(--muted);
}

.nav-button span:first-child {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-button span:first-child iconify-icon {
  font-size: 24px;
}

.nav-button span:last-child {
  font-size: 11px;
  font-weight: 500;
}

.nav-button.active {
  color: var(--teal);
}

.action-links {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.action-link {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(17, 52, 64, 0.08);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 24, 31, 0.4);
  backdrop-filter: blur(8px);
}

.modal-backdrop.hidden {
  display: none;
}

.level-modal-card {
  width: min(360px, 100%);
  padding: 28px;
  border-radius: 30px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.2), transparent 30%),
    linear-gradient(135deg, #13b4ae 0%, #4fd4b7 50%, #d7ed69 100%);
  color: #fff;
  box-shadow: 0 24px 60px rgba(11, 40, 49, 0.26);
  text-align: center;
}

.level-spark {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 0.84rem;
  font-weight: 800;
}

.level-modal-card h3 {
  margin-top: 16px;
  font-size: 2rem;
}

.level-modal-card p {
  margin-top: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.level-modal-card .primary-button {
  width: 100%;
  margin-top: 22px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

/* ── Mission Strip ── */
.mission-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 18px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(27, 198, 216, 0.75), rgba(76, 227, 157, 0.65));
  color: #fff;
}
.mission-strip-greeting {
  font-size: 1.2rem;
  font-weight: 800;
}
.mission-strip-sub {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 4px;
}
.mission-strip-stats {
  display: flex;
  gap: 6px;
}
.mission-mini {
  text-align: center;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  min-width: 50px;
}
.mission-mini strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
}
.mission-mini span {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
}
.mission-mini.accent {
  background: rgba(255, 255, 255, 0.3);
}

/* ── Streak & Lives Popups ── */
.chip.clickable {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.chip.clickable:active {
  transform: scale(0.95);
}

.popup-card {
  width: min(340px, 92%);
  padding: 28px 24px;
  border-radius: 28px;
  background: #fff;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}
.popup-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 14px 0 0;
  color: var(--text);
}
.popup-icon-wrap {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.popup-icon-wrap.streak {
  background: linear-gradient(135deg, #FFF0DD, #FFE0C0);
  color: #FF7E39;
}
.popup-icon-wrap.lives {
  background: linear-gradient(135deg, #FFE8EE, #FFD0DC);
  color: #E9516F;
}

.popup-stat-row {
  display: flex;
  gap: 12px;
  margin: 18px 0;
}
.popup-stat {
  flex: 1;
  padding: 12px 8px;
  border-radius: 16px;
  background: #F8FAFC;
}
.popup-stat strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
}
.popup-stat span {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.popup-progress-section {
  margin-bottom: 18px;
}
.popup-progress-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.popup-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #F1F5F9;
  overflow: hidden;
}
.popup-progress-fill {
  height: 100%;
  border-radius: 999px;
}
.popup-progress-fill.streak {
  background: linear-gradient(90deg, #FFB84A, #FF7E39);
}
.popup-progress-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 600;
}

.popup-lives-display {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 12px;
}
.popup-heart {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.popup-heart.active {
  background: #FFF0F3;
  color: #E9516F;
}
.popup-heart.empty {
  background: #F1F5F9;
  color: #CBD5E1;
}
.popup-lives-info {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 18px;
}

.popup-lives-shop {
  background: #F8FAFC;
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 18px;
}
.popup-shop-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}
.popup-shop-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.popup-shop-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.15s;
}
.popup-shop-option:hover {
  border-color: var(--teal);
}
.popup-shop-option.featured {
  border-color: var(--teal);
  background: linear-gradient(135deg, #F0FDFA, #E6FCFF);
  position: relative;
}
.popup-shop-badge {
  position: absolute;
  top: -8px;
  right: 12px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--teal);
  color: #fff;
}
.popup-shop-amount {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}
.popup-shop-price {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
}
.popup-close {
  width: 100%;
  margin-top: 0;
}

/* ── Review / Discover Section ── */
.review-section {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 16px;
  border: 1px solid var(--border);
}
.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.review-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.review-header-left h3 {
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0;
}
.review-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #FFF0F0;
  color: #D14343;
}
.review-badge.discover {
  background: #EDF7FF;
  color: #1B7FBF;
}
.review-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.review-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--secondary);
}
.review-item-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.review-item-icon.wrong {
  background: #FFE0E0;
  color: #D14343;
}
.review-item-icon.discover {
  background: #E0F0FF;
  color: #1B7FBF;
}
.review-item-content {
  flex: 1;
  min-width: 0;
}
.review-item-topic {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.review-item-meta {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 1px;
}
.review-item-cta {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #1BC6D8, #47E39D);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

/* ── Social Footer ── */
.social-footer {
  text-align: center;
  padding: 20px 16px 8px;
}
.social-footer-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.social-footer-logo {
  width: 22px;
  height: 22px;
  opacity: 0.6;
}
.social-footer-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.social-footer-icons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}
.social-footer-link {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.social-footer-link:hover {
  background: var(--teal);
  color: #fff;
}
.social-footer-copy {
  font-size: 0.7rem;
  color: var(--muted);
  opacity: 0.7;
  margin: 0;
}

/* ── Daily Challenge ── */
.daily-challenge {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 16px;
  border: 1px solid var(--border);
}
.challenge-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--teal);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.challenge-question {
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 12px;
  color: var(--text);
}
.challenge-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.challenge-option {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--secondary);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.challenge-option:hover {
  border-color: var(--teal);
  background: #f0fdfa;
}
.challenge-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  color: var(--muted);
}

/* ── Achievements Near ── */
.achievements-near {
  background: var(--card);
  border-radius: var(--radius-xl);
  padding: 16px;
  border: 1px solid var(--border);
}
.achievements-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.achievements-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text);
}
.achievements-header-left iconify-icon {
  color: #F2C85A;
}
.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.achievement-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.achievement-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.achievement-info {
  flex: 1;
  min-width: 0;
}
.achievement-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}
.achievement-track {
  height: 6px;
  border-radius: 999px;
  background: #F1F5F9;
  overflow: hidden;
}
.achievement-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1BC6D8, #47E39D);
}
.achievement-fill.streak {
  background: linear-gradient(90deg, #FFB84A, #FF7E39);
}
.achievement-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}

/* ── Daily Pill ── */
.daily-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, #FFFBEB, #FFF8E1);
  border: 1px solid rgba(242, 200, 90, 0.3);
}
.pill-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(242, 200, 90, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.pill-content {
  flex: 1;
  min-width: 0;
}
.pill-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: #B8860B;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 2px;
}
.pill-text {
  font-size: 0.78rem;
  line-height: 1.4;
  color: #5D4E1A;
  margin: 0;
}
.pill-share {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: none;
  background: rgba(242, 200, 90, 0.2);
  color: #B8860B;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.pill-share:hover {
  background: rgba(242, 200, 90, 0.4);
}

/* ── Level Up Screen ── */
.levelup-screen .main-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.levelup-overlay {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  background: linear-gradient(160deg, #0f2027 0%, #203a43 40%, #2c5364 100%);
  overflow: hidden;
  padding: 24px 16px;
}
.levelup-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.levelup-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 2px solid rgba(255, 210, 80, 0.25);
  transform: translate(-50%, -50%);
  animation: levelup-pulse 2.4s ease-out infinite;
}
.levelup-ring-1 { width: 200px; height: 200px; animation-delay: 0s; }
.levelup-ring-2 { width: 320px; height: 320px; animation-delay: 0.5s; border-color: rgba(93, 212, 181, 0.2); }
.levelup-ring-3 { width: 450px; height: 450px; animation-delay: 1s; border-color: rgba(255, 255, 255, 0.08); }
@keyframes levelup-pulse {
  0% { transform: translate(-50%, -50%) scale(0.7); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}
.levelup-card {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 300px;
}
.levelup-spark-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #FFD166 0%, #FF8F47 100%);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  box-shadow: 0 4px 20px rgba(255, 143, 71, 0.4);
  animation: levelup-badge-glow 2s ease-in-out infinite alternate;
}
@keyframes levelup-badge-glow {
  0% { box-shadow: 0 4px 20px rgba(255, 143, 71, 0.4); }
  100% { box-shadow: 0 4px 36px rgba(255, 210, 102, 0.7); }
}
.levelup-avatar-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 24px;
  margin: 28px 0 20px;
}
.levelup-avatar-before,
.levelup-avatar-after {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* ── Stylised person figure (child → teen → adult) ── */
.levelup-person {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Head */
.levelup-person .person-head {
  border-radius: 50%;
  background: linear-gradient(135deg, #fdd8b5, #f5c19a);
  position: relative;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
/* Eyes — two small dots via pseudo-elements */
.levelup-person .person-head::before,
.levelup-person .person-head::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #3a3a3a;
}

/* Neck */
.levelup-person .person-neck {
  width: 8px;
  background: linear-gradient(180deg, #f5c19a, #f0b68a);
  margin-top: -2px;
  z-index: 1;
}

/* Torso */
.levelup-person .person-torso {
  border-radius: 10px 10px 8px 8px;
  margin-top: -2px;
  position: relative;
  z-index: 1;
}

/* Arms container */
.levelup-person .person-arms {
  position: absolute;
  z-index: 0;
  display: flex;
  justify-content: space-between;
}
.levelup-person .person-arm {
  border-radius: 6px;
}
.levelup-person .person-arm.left {
  transform: rotate(12deg);
}
.levelup-person .person-arm.right {
  transform: rotate(-12deg);
}

/* Legs container */
.levelup-person .person-legs {
  display: flex;
  justify-content: center;
  margin-top: -2px;
  z-index: 1;
}
.levelup-person .person-leg {
  border-radius: 0 0 6px 6px;
}

/* ─── CHILD (Lv 3): short, big head, stubby limbs ─── */
.levelup-person.child {
  opacity: 0.55;
  filter: saturate(0.8);
}
.levelup-person.child .person-head {
  width: 32px; height: 32px;
}
.levelup-person.child .person-head::before {
  width: 4px; height: 4px; top: 13px; left: 9px;
}
.levelup-person.child .person-head::after {
  width: 4px; height: 4px; top: 13px; right: 9px;
}
.levelup-person.child .person-neck {
  height: 3px; width: 7px;
}
.levelup-person.child .person-torso {
  width: 28px; height: 22px;
  background: linear-gradient(180deg, #5dd4b5, #3db99a);
}
.levelup-person.child .person-arms {
  top: 38px; width: 48px; left: 50%; transform: translateX(-50%);
}
.levelup-person.child .person-arm {
  width: 8px; height: 18px;
  background: linear-gradient(180deg, #5dd4b5, #3db99a);
}
.levelup-person.child .person-legs {
  gap: 4px;
}
.levelup-person.child .person-leg {
  width: 10px; height: 18px;
  background: linear-gradient(180deg, #2a9d82, #1e8a6f);
}

/* ─── TEEN (Lv 4): taller, slimmer head ratio, longer limbs ─── */
.levelup-person.teen {
  animation: levelup-avatar-bounce 1.2s ease-in-out infinite;
}
.levelup-person.teen .person-head {
  width: 34px; height: 34px;
}
.levelup-person.teen .person-head::before {
  width: 4px; height: 5px; top: 13px; left: 9px;
  border-radius: 50%;
}
.levelup-person.teen .person-head::after {
  width: 4px; height: 5px; top: 13px; right: 9px;
  border-radius: 50%;
}
.levelup-person.teen .person-neck {
  height: 5px; width: 9px;
}
.levelup-person.teen .person-torso {
  width: 34px; height: 34px;
  background: linear-gradient(180deg, #47c7a3, #2fb38d);
  border-radius: 10px 10px 8px 8px;
}
.levelup-person.teen .person-arms {
  top: 42px; width: 60px; left: 50%; transform: translateX(-50%);
}
.levelup-person.teen .person-arm {
  width: 9px; height: 28px;
  background: linear-gradient(180deg, #47c7a3, #2fb38d);
  border-radius: 6px;
}
.levelup-person.teen .person-legs {
  gap: 5px;
}
.levelup-person.teen .person-leg {
  width: 12px; height: 30px;
  background: linear-gradient(180deg, #2a9d82, #1e8a6f);
}

/* ─── ADULT (Lv 5+): full height, broader, confident ─── */
.levelup-person.adult {
  animation: levelup-avatar-bounce 1.2s ease-in-out infinite;
}
.levelup-person.adult .person-head {
  width: 36px; height: 36px;
}
.levelup-person.adult .person-head::before {
  width: 4px; height: 5px; top: 14px; left: 10px;
}
.levelup-person.adult .person-head::after {
  width: 4px; height: 5px; top: 14px; right: 10px;
}
.levelup-person.adult .person-neck {
  height: 6px; width: 10px;
}
.levelup-person.adult .person-torso {
  width: 40px; height: 42px;
  background: linear-gradient(180deg, #0d9488, #0a7b70);
}
.levelup-person.adult .person-arms {
  top: 46px; width: 68px; left: 50%; transform: translateX(-50%);
}
.levelup-person.adult .person-arm {
  width: 10px; height: 36px;
  background: linear-gradient(180deg, #0d9488, #0a7b70);
}
.levelup-person.adult .person-legs {
  gap: 6px;
}
.levelup-person.adult .person-leg {
  width: 13px; height: 38px;
  background: linear-gradient(180deg, #2a9d82, #1e8a6f);
}

@keyframes levelup-avatar-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.levelup-avatar-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
}
.levelup-avatar-after .levelup-avatar-label {
  color: #FFD166;
  font-size: 0.85rem;
}
.levelup-arrow {
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 30px;
}
.levelup-title {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 8px;
}
.levelup-copy {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0 0 20px;
}
.levelup-rewards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}
.levelup-reward {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.84rem;
  font-weight: 600;
}
.levelup-reward iconify-icon {
  color: #FFD166;
}
.levelup-cta {
  width: 100%;
  background: linear-gradient(135deg, #1BC6D8 0%, #47E39D 100%) !important;
  box-shadow: 0 6px 24px rgba(27, 198, 216, 0.35);
  font-weight: 800;
}

/* ── Bubble Map Screen ── */
.bubble-map-screen .main-content {
  padding-top: 8px;
}
.bmap-screen {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-bottom: 24px;
}

/* ── Hero section ── */
.bmap-hero {
  position: relative;
  background: linear-gradient(145deg, rgba(13,148,136,0.07) 0%, rgba(93,212,181,0.1) 100%);
  border: 1px solid rgba(13,148,136,0.1);
  border-radius: 20px;
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bmap-back {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.8);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s;
  margin-bottom: 4px;
}
.bmap-back:hover { background: #fff; }
.bmap-hero-emoji {
  font-size: 2rem;
  line-height: 1;
}
.bmap-hero-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  line-height: 1.25;
}
.bmap-hero-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 2px;
}

/* Objectives */
.bmap-objectives {
  margin-top: 6px;
  background: rgba(255,255,255,0.7);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}
.bmap-obj-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--teal);
  margin-bottom: 8px;
}
.bmap-obj-list {
  margin: 0;
  padding: 0 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bmap-obj-list li {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text);
}
.bmap-obj-list li::marker {
  color: var(--teal);
}

/* Stats */
.bmap-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.bmap-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.75);
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text);
}
.bmap-stat iconify-icon {
  color: var(--teal);
}
.bmap-stat.progress-stat {
  gap: 4px;
  padding: 4px 10px 4px 4px;
}
.bmap-stat.progress-stat .bmap-ring {
  display: block;
  flex-shrink: 0;
}

/* ── Section blocks ── */
.bmap-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bmap-section-header {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
}
.bmap-section-header iconify-icon {
  color: var(--teal);
}

/* ── Bubble Grid ── */
.bmap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 12px;
}
.bmap-bubble {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  transition: transform 0.15s;
}
.bmap-bubble:not(.locked):hover {
  transform: translateY(-2px);
}
.bmap-bubble.todo {
  opacity: 0.65;
}
.bmap-bubble-circle {
  position: relative;
  width: 88px; height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bmap-bubble.done .bmap-bubble-circle {
  background: linear-gradient(135deg, rgba(207,245,226,0.6), rgba(222,248,244,0.7));
}
.bmap-bubble.current .bmap-bubble-circle {
  background: linear-gradient(135deg, rgba(242,200,90,0.1), rgba(255,143,71,0.06));
}
.bmap-bubble.todo .bmap-bubble-circle {
  background: rgba(17,52,64,0.05);
  border: 1.5px dashed rgba(13,148,136,0.2);
}
.bmap-bubble-circle .bmap-ring {
  position: absolute;
  inset: 0;
}
.bmap-bubble-abbr {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  z-index: 1;
}
.bmap-bubble.done .bmap-bubble-abbr { color: #0d9488; }
.bmap-bubble.current .bmap-bubble-abbr { color: #b8860b; }
.bmap-bubble.todo .bmap-bubble-abbr { color: rgba(22,49,61,0.5); }
.bmap-check {
  position: absolute;
  top: 2px; right: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(13,148,136,0.3);
  z-index: 2;
}
.bmap-bubble-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
  max-width: 100px;
}
.bmap-bubble-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  text-align: center;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.bmap-bubble-pct {
  font-size: 0.65rem;
  font-weight: 800;
  color: #b8860b;
  background: rgba(242,200,90,0.15);
  padding: 1px 8px;
  border-radius: 999px;
}
.bmap-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.bmap-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}
.bmap-legend-dot { width: 10px; height: 10px; border-radius: 50%; }
.bmap-legend-dot.done { background: var(--teal); }
.bmap-legend-dot.current { background: #f2c85a; }
.bmap-legend-dot.todo { background: rgba(17,52,64,0.2); }

/* ── Resource cards ── */
.bmap-res-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bmap-res-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--card);
  border: 1px solid rgba(0,0,0,0.04);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.bmap-res-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.bmap-res-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(13,148,136,0.08);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bmap-res-icon.example {
  background: rgba(242,200,90,0.12);
  color: #b8860b;
}
.bmap-res-icon.video {
  background: rgba(255,99,71,0.08);
  color: #d64541;
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
}
.bmap-res-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bmap-res-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--teal);
}
.bmap-res-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.bmap-res-duration {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
}
.bmap-res-arrow {
  color: var(--muted);
  flex-shrink: 0;
  opacity: 0.5;
}
.bmap-res-card.video {
  background: linear-gradient(135deg, rgba(255,99,71,0.03), rgba(255,143,71,0.04));
}
.bmap-res-icon.reference {
  background: rgba(99,102,241,0.08);
  color: #6366f1;
}
.bmap-res-card.reference {
  background: linear-gradient(135deg, rgba(99,102,241,0.03), rgba(139,92,246,0.04));
}
.bmap-res-card.reference .bmap-res-tag {
  color: #6366f1;
}
.bmap-res-url {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #6366f1;
  opacity: 0.7;
}

/* ── Auth Flow Screens (Password Reset & Email Verify) ── */
.password-reset-screen,
.email-verify-screen {
  background: linear-gradient(170deg, #f7fbfa 0%, #e8f5f0 50%, #f0faf5 100%);
}
.password-reset-screen .main-content,
.email-verify-screen .main-content {
  padding: 0;
  gap: 0;
}
.password-reset-screen .main-content > .stack,
.email-verify-screen .main-content > .stack {
  flex: 1;
  gap: 0;
}
.auth-flow-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  padding: 24px 24px 40px;
}
.auth-flow-back {
  position: absolute;
  top: 16px; left: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.85);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: background 0.2s;
  z-index: 5;
}
.auth-flow-back:hover { background: #fff; }

/* Icon circle */
.auth-flow-icon-wrap {
  margin-bottom: 20px;
}
.auth-flow-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488 0%, #5dd4b5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 8px 28px rgba(13, 148, 136, 0.25);
}
.auth-flow-icon.verify {
  background: linear-gradient(135deg, #47c7a3 0%, #d6ef6a 100%);
  box-shadow: 0 8px 28px rgba(71, 199, 163, 0.25);
}

/* Typography */
.auth-flow-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  text-align: center;
}
.auth-flow-subtitle {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  text-align: center;
  margin: 0 0 28px;
  max-width: 280px;
}
.auth-flow-subtitle strong {
  color: var(--text);
  font-weight: 700;
}

/* Form */
.auth-flow-form {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-flow-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.auth-flow-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid rgba(13, 148, 136, 0.2);
  border-radius: 14px;
  padding: 0 14px;
  height: 50px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-flow-input-wrap:focus-within {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}
.auth-flow-input-wrap iconify-icon {
  color: var(--muted);
  flex-shrink: 0;
}
.auth-flow-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.92rem;
  color: var(--text);
  font-family: var(--font-body);
}
.auth-flow-input::placeholder {
  color: #b0bec5;
}
.auth-flow-cta {
  margin-top: 6px;
  width: 100%;
  height: 50px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.95rem;
}

/* Footer link */
.auth-flow-footer {
  margin-top: 24px;
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.auth-flow-link {
  background: none;
  border: none;
  color: var(--teal);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Timer */
.auth-flow-timer {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  background: rgba(13, 148, 136, 0.06);
  padding: 8px 16px;
  border-radius: 999px;
}
.auth-flow-timer strong {
  color: var(--teal);
  font-weight: 800;
}

/* ── OTP Input Group ── */
.otp-input-group {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.otp-digit {
  width: 46px; height: 56px;
  border-radius: 14px;
  border: 1.5px solid rgba(13, 148, 136, 0.2);
  background: #fff;
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-display);
  color: var(--text);
  text-align: center;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  caret-color: var(--teal);
}
.otp-digit:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}
.otp-digit.filled {
  border-color: var(--teal);
  background: rgba(13, 148, 136, 0.04);
}

.hidden {
  display: none;
}

/* ── Onboarding screens ─────────────────────────────────── */

.phone-screen.onboarding-screen {
  min-height: 812px;
  height: 812px;
  background: var(--bg);
}

.onboarding-content {
  padding: 16px 18px 24px;
  overflow-y: auto;
  height: 100%;
}

.onboarding-progress {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 4px;
  border-radius: 2px;
  background: rgba(17, 52, 64, 0.08);
  margin-bottom: 12px;
}

.onboarding-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--mint), var(--lime));
  transition: width 0.4s ease;
}

.onboarding-step-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(96, 219, 184, 0.12);
  color: var(--mint);
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.onboarding-header {
  text-align: center;
  margin-bottom: 20px;
}

.onboarding-emoji {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.onboarding-emoji-big {
  font-size: 3rem;
}

.onboarding-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.onboarding-header p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.4;
}

.onboarding-form {
  display: grid;
  gap: 18px;
  margin-bottom: 20px;
}

.onboarding-form .field-group label {
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

.onboarding-form .field-group input {
  min-height: 48px;
}

.onboarding-options {
  display: grid;
  gap: 8px;
}

.gender-options {
  grid-template-columns: 1fr 1fr;
}

.gender-options .onboarding-option:last-child {
  grid-column: 1 / -1;
}

.onboarding-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--card-strong);
  color: var(--text);
  font-weight: 600;
  font-size: 0.88rem;
  text-align: left;
  transition: all 0.15s ease;
}

.onboarding-option.selected {
  border-color: var(--mint);
  background: rgba(96, 219, 184, 0.08);
  box-shadow: 0 0 0 2px rgba(96, 219, 184, 0.15);
}

.onboarding-option iconify-icon {
  color: var(--mint);
}

.onboarding-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.onboarding-actions {
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.text-link-button {
  display: block;
  width: 100%;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.text-link-button:hover {
  color: var(--mint);
}

/* Autonomy options */
.autonomy-options {
  display: grid;
  gap: 8px;
}

.autonomy-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--card-strong);
  text-align: left;
  transition: all 0.15s ease;
  cursor: pointer;
}

.autonomy-option.selected {
  border-color: var(--mint);
  background: rgba(96, 219, 184, 0.08);
  box-shadow: 0 0 0 2px rgba(96, 219, 184, 0.15);
}

.autonomy-option iconify-icon {
  color: var(--mint);
  flex-shrink: 0;
}

.autonomy-option strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.autonomy-option span {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Interest grid */
.interest-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.interest-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--card-strong);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s ease;
}

.interest-chip.selected {
  border-color: var(--mint);
  background: rgba(96, 219, 184, 0.12);
  box-shadow: 0 0 0 1px rgba(96, 219, 184, 0.2);
}

.interest-emoji {
  font-size: 1rem;
}

/* Summary card */
.summary-card {
  display: grid;
  gap: 0;
  border-radius: var(--radius-lg);
  background: var(--card-strong);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row iconify-icon {
  color: var(--mint);
  flex-shrink: 0;
}

/* Mode selection */
.mode-section {
  margin-bottom: 20px;
}

.mode-section label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 18px 12px 14px;
  border-radius: var(--radius-lg);
  border: 1.5px solid var(--border);
  background: var(--card-strong);
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-card.selected {
  border-color: var(--mint);
  background: rgba(96, 219, 184, 0.06);
  box-shadow: 0 0 0 2px rgba(96, 219, 184, 0.15);
}

.mode-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(96, 219, 184, 0.12), rgba(214, 239, 106, 0.14));
  color: var(--mint);
  margin-bottom: 10px;
}

.mode-card strong {
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.mode-card p {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
  margin: 0;
}

.mode-badge {
  position: absolute;
  top: -8px;
  right: -4px;
  padding: 3px 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--mint), var(--lime));
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

/* Interest cards (onboarding 3) */
.interest-list {
  display: grid;
  gap: 8px;
}

.interest-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--card-strong);
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.interest-card.selected {
  border-color: var(--mint);
  background: rgba(96, 219, 184, 0.06);
}

.interest-card-emoji {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.interest-card-text {
  flex: 1;
  min-width: 0;
}

.interest-card-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 1px;
}

.interest-card-text span {
  font-size: 0.75rem;
  color: var(--muted);
}

.interest-card-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid var(--border);
  color: transparent;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.interest-card.selected .interest-card-check {
  background: linear-gradient(135deg, var(--mint), var(--lime));
  border-color: transparent;
  color: #fff;
}

/* Ready message (onboarding 4) */
.onboarding-ready-msg {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(96, 219, 184, 0.10), rgba(214, 239, 106, 0.12));
  border: 1px solid rgba(96, 219, 184, 0.18);
  margin-bottom: 16px;
}

.onboarding-ready-msg iconify-icon {
  color: var(--mint);
  flex-shrink: 0;
}

.onboarding-ready-msg p {
  font-size: 0.85rem;
  color: var(--text);
  margin: 0;
  font-weight: 500;
}

.onboarding-summary .onboarding-header {
  margin-bottom: 16px;
}

@media (max-width: 1080px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .prototype-header {
    display: grid;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 24px, 560px);
    margin: 18px auto 24px;
  }

  .spec-panel,
  .prototype-panel {
    padding: 20px;
    border-radius: 28px;
  }

  .prototype-header {
    padding: 16px;
  }

  .phone-stage {
    padding: 0;
  }

  .phone-shell {
    width: 100%;
    min-height: 760px;
    border-width: 1px;
  }

  .phone-screen {
    min-height: 760px;
    height: 760px;
  }
}

/* ═══════════════════════════════════════════════════
   BOLLA (lesson) screen
   ═══════════════════════════════════════════════════ */
.bolla-screen {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Header */
.bolla-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bolla-header-pos {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

/* Hero */
.bolla-hero {
  position: relative;
  background: linear-gradient(145deg, rgba(13,148,136,0.07) 0%, rgba(93,212,181,0.1) 100%);
  border: 1px solid rgba(13,148,136,0.1);
  border-radius: 20px;
  padding: 20px 16px;
  text-align: center;
}
.bolla-emoji {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 8px;
}
.bolla-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
}
.bolla-intro {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 14px;
}
.bolla-progress-row {
  margin-top: 4px;
}
.bolla-progress-row .progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.15);
  border-radius: 100px;
  overflow: hidden;
}
.bolla-progress-row .progress-bar span {
  display: block;
  height: 100%;
  border-radius: 100px;
  background: var(--teal);
  transition: width 0.4s ease;
}
.bolla-progress-row .progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 5px;
}

/* Sections list */
.bolla-sections-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bolla-sections-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}
.bolla-sections-heading iconify-icon {
  color: var(--teal);
}

/* Section card */
.bolla-section-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: var(--card-strong);
  border: 1px solid var(--border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.bolla-section-card.done {
  border-color: rgba(13,148,136,0.2);
}
.bolla-section-card.current {
  border-color: rgba(242,200,90,0.35);
  box-shadow: 0 0 0 1px rgba(242,200,90,0.12);
}
.bolla-section-card.locked {
  opacity: 0.55;
}

/* Section icon */
.bolla-sec-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(13,148,136,0.08);
  color: var(--teal);
}
.bolla-section-card.locked .bolla-sec-icon {
  background: rgba(255,255,255,0.06);
  color: var(--muted);
}

/* Section body */
.bolla-sec-body {
  flex: 1;
  min-width: 0;
}
.bolla-sec-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
  line-height: 1.3;
}
.bolla-sec-desc {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0;
}

/* Section status indicator */
.bolla-sec-status {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-top: 4px;
}
.bolla-sec-status.done {
  background: rgba(13,148,136,0.15);
  color: var(--teal);
}
.bolla-sec-status.current {
  background: rgba(242,200,90,0.18);
  color: #f2c85a;
}
.bolla-sec-status.locked {
  background: rgba(255,255,255,0.06);
  color: var(--muted);
}

/* CTA */
.bolla-cta-section {
  padding-top: 4px;
}
.bolla-cta-btn {
  width: 100%;
}

/* ═══════════════════════════════════════════════════
   SECTION DETAIL screen — v3
   ═══════════════════════════════════════════════════ */
.sd-screen {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header */
.sd-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sd-header-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sd-header-pos {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sd-header-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
}

/* Progress */
.sd-progress-wrap {
  margin: -12px 0 0;
}
.sd-progress-wrap .progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
  overflow: hidden;
}
.sd-progress-wrap .progress-bar span {
  display: block;
  height: 100%;
  border-radius: 100px;
  background: var(--teal);
  transition: width 0.4s ease;
}

/* ══ INTRO hero ══ */
.sd-intro-hero {
  text-align: center;
  padding: 24px 8px 20px;
  background: linear-gradient(160deg, rgba(13,148,136,0.08) 0%, rgba(93,212,181,0.06) 50%, rgba(168,85,247,0.05) 100%);
  border-radius: 20px;
  border: 1px solid rgba(13,148,136,0.1);
}
.sd-intro-emoji {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 12px;
}
.sd-intro-punch {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
  line-height: 1.3;
}
.sd-intro-sub {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  max-width: 280px;
  margin-inline: auto;
}

/* Rules card */
.sd-rules-card {
  border-radius: 16px;
  padding: 16px;
  background: var(--card-strong);
  border: 1px solid var(--border);
}
.sd-rules-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}
.sd-rules-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.sd-rule-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text);
}
.sd-rule-item iconify-icon {
  flex-shrink: 0;
  color: var(--teal);
  margin-top: 2px;
}

/* ══ THEORY: numbered items ══ */
.sd-th-section {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 16px;
  background: var(--card-strong);
  border: 1px solid var(--border);
  overflow: hidden;
}
.sd-th-item {
  display: flex;
  gap: 14px;
  padding: 16px;
}
.sd-th-item + .sd-th-item {
  border-top: 1px solid var(--border);
}
.sd-th-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(13,148,136,0.1);
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.sd-th-content {
  flex: 1;
  min-width: 0;
}
.sd-th-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.35;
}
.sd-th-body {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}
.sd-th-points {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sd-th-points li {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text);
  padding-left: 14px;
  position: relative;
}
.sd-th-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
}

/* ══ MEME ══ */
.sd-meme {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(242,200,90,0.06);
  border: 1px solid rgba(242,200,90,0.12);
}
.sd-meme-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}
.sd-meme-text {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
  font-style: italic;
}

/* ══ "METTITI ALLA PROVA" hero ══ */
.sd-prova-hero {
  padding: 20px 16px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(242,200,90,0.08) 0%, rgba(168,85,247,0.06) 100%);
  border: 1px solid rgba(242,200,90,0.12);
  text-align: center;
}
.sd-prova-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
  color: #f2c85a;
}
.sd-prova-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}
.sd-prova-sub {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

/* ══ QUIZ section ══ */
.sd-qz-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sd-qz-card {
  border-radius: 16px;
  padding: 16px;
  background: var(--card-strong);
  border: 1px solid var(--border);
  position: relative;
}
.sd-qz-num {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.5;
}
.sd-qz-question {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.4;
  padding-right: 32px;
}
.sd-qz-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Quiz option */
.sd-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.4;
  cursor: pointer;
  transition: all 0.2s ease;
}
.sd-opt:hover:not([disabled]) {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.03);
}
.sd-opt-text { flex: 1; }
.sd-opt-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

/* Quiz states with animation */
.sd-opt.correct {
  border-color: var(--teal);
  background: rgba(13,148,136,0.1);
  animation: sd-pop 0.3s ease;
}
.sd-opt.correct .sd-opt-text { color: var(--teal); font-weight: 600; }
.sd-opt.correct .sd-opt-icon { background: var(--teal); color: #fff; }

.sd-opt.wrong {
  border-color: #ef4444;
  background: rgba(239,68,68,0.06);
  animation: sd-shake 0.35s ease;
}
.sd-opt.wrong .sd-opt-text { color: rgba(239,68,68,0.7); text-decoration: line-through; }
.sd-opt.wrong .sd-opt-icon { background: #ef4444; color: #fff; }

.sd-opt.reveal {
  border-color: rgba(13,148,136,0.35);
  background: rgba(13,148,136,0.06);
  animation: sd-fade-in 0.4s ease 0.15s both;
}
.sd-opt.reveal .sd-opt-text { color: var(--teal); }
.sd-opt.reveal .sd-opt-icon { background: rgba(13,148,136,0.2); color: var(--teal); }

.sd-opt[disabled] { cursor: default; pointer-events: none; }

@keyframes sd-pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.02); }
  100% { transform: scale(1); }
}
@keyframes sd-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
@keyframes sd-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Feedback toast */
.sd-feedback {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  animation: sd-fade-in 0.25s ease;
}
.sd-feedback.correct {
  background: rgba(13,148,136,0.1);
  color: var(--teal);
}
.sd-feedback.wrong {
  background: rgba(239,68,68,0.08);
  color: #ef4444;
}

/* ══ GAME card (prominent) ══ */
.sd-game-card {
  border-radius: 16px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(168,85,247,0.06) 0%, rgba(99,102,241,0.05) 100%);
  border: 1px solid rgba(168,85,247,0.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.sd-game-visual {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(168,85,247,0.1);
  color: #a855f7;
  display: grid;
  place-items: center;
}
.sd-game-info {
  flex: 1;
}
.sd-game-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #a855f7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sd-game-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin: 3px 0 5px;
  line-height: 1.3;
}
.sd-game-desc {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.sd-game-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: #a855f7;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  align-self: flex-start;
}
.sd-game-start:hover {
  background: #9333ea;
}
.sd-game-start:active {
  transform: scale(0.97);
}

/* ══ EXTRA eventuale ══ */
.sd-extra {
  border-radius: 16px;
  padding: 16px;
  background: rgba(99,102,241,0.04);
  border: 1px solid rgba(99,102,241,0.1);
}
.sd-extra-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #818cf8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.sd-extra-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  line-height: 1.35;
}
.sd-extra-body {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.sd-extra-points {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sd-extra-points li {
  font-size: 0.76rem;
  line-height: 1.45;
  color: var(--text);
  padding-left: 14px;
  position: relative;
}
.sd-extra-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #818cf8;
}

/* ══ MICRO CHIUSURA ══ */
.sd-chiusura {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(13,148,136,0.04);
  border: 1px solid rgba(13,148,136,0.08);
}
.sd-chiusura iconify-icon {
  flex-shrink: 0;
  color: var(--teal);
  margin-top: 1px;
  opacity: 0.5;
}
.sd-chiusura-text {
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

/* ══ NEXT SECTION link ══ */
.sd-next-wrap {
  margin-top: 2px;
}
.sd-next {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
}
.sd-next:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
}
.sd-next-icon-wrap {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(13,148,136,0.1);
  color: var(--teal);
  display: grid;
  place-items: center;
}
.sd-next-icon-wrap.done {
  background: rgba(13,148,136,0.15);
}
.sd-next-body {
  flex: 1;
  min-width: 0;
}
.sd-next-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  line-height: 1;
}
.sd-next-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  line-height: 1.3;
  margin-top: 3px;
}
.sd-next-arrow {
  color: var(--muted);
  flex-shrink: 0;
  opacity: 0.5;
}
.sd-next.done .sd-next-label {
  color: var(--teal);
}
