@font-face {
  font-family: "Inter";
  src: url("fonts/Inter/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --selected: #e6f4ee;
  --green: #4caf84;
  --yellow: #d9b24c;
  --gray: #9ca3af;
  --coffee: #d96b6b;
  --charcoal: #111827;
  --app-content-max: 393px;
  --app-nav-max: 393px;
  --app-page-pad-x: clamp(16px, 4.8vw, 24px);
  --app-page-pad-y: clamp(18px, 5.2vw, 28px);
  --app-card-pad: clamp(14px, 4.2vw, 20px);
  --app-section-gap: clamp(14px, 4vw, 18px);
  --app-nav-clearance: calc(112px + env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

body {
  min-height: 100dvh;
  position: fixed;
  inset: 0;
  width: 100%;
  overscroll-behavior: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.app {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

.screen {
  display: none;
  height: 100dvh;
  overflow: hidden;
}

.screen.active {
  display: block;
}

.screen-body {
  min-height: 0;
  height: 100dvh;
  max-width: var(--app-content-max);
  margin: 0 auto;
  padding: var(--app-page-pad-y) var(--app-page-pad-x);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.screen-body::-webkit-scrollbar {
  display: none;
}

.app-shell-layout {
  padding-bottom: calc(var(--app-nav-clearance) + 16px);
  scroll-padding-bottom: var(--app-nav-clearance);
}

.home-layout,
.friends-layout,
.profile-layout {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--app-section-gap);
  text-align: left;
}

.home-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-dev-topbar {
  min-height: 0;
}

.home-dev-topbar .micro-text:empty {
  display: none;
}

.home-dashboard {
  gap: 12px;
  max-width: 393px;
  margin-inline: auto;
  padding: 0 16px calc(var(--app-nav-clearance) + 16px);
  background: #f2ede4;
}

/* The dashboard is a scrolling flex column; keep its cards at natural height
   so the column scrolls instead of squashing the tall stage card on short
   (mobile) viewports. */
.home-dashboard > * {
  flex-shrink: 0;
}

.home-dashboard.home-theme-momo {
  background: #f0f5f0;
}

.home-dashboard-header {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding-top: 18px;
}

.home-greeting-stack {
  display: grid;
  align-content: end;
  gap: 0;
  min-width: 0;
  padding-bottom: 13px;
}

.home-guide-checkin {
  display: grid;
  grid-template-columns: minmax(0, 170px) minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  min-height: 190px;
  margin-top: -4px;
}

.home-guide-portrait-wrap {
  position: relative;
  width: 100px;
  min-height: 120px;
  overflow: hidden;
}

.home-guide-portrait {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100px;
  height: 120px;
  object-fit: contain;
  object-position: bottom center;
}

.home-guide-bubble {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 13px;
  border: 1px solid #d7a56d;
  border-radius: 16px 16px 16px 4px;
  background: #f8efe0;
}

.home-theme-momo .home-guide-bubble {
  border-color: #c8c0b0;
  background: #edf2e8;
}

.home-guide-name {
  margin: 0;
  color: #c86a32;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.home-theme-momo .home-guide-name {
  color: #5a7a4a;
}

.home-guide-message {
  margin: 0;
  color: #1f1a14;
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.38;
}

.home-path-card {
  display: grid;
  overflow: hidden;
  border: 1px solid #e8e2d8;
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.home-theme-ember .home-path-card {
  border-color: #e8c4a0;
}

.home-path-card-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px 8px;
  color: #c87040;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.home-theme-momo .home-path-card-label {
  color: #1a5c38;
}

.home-path-label-icon {
  font-size: 0.95rem;
  letter-spacing: 0;
}

.home-path-image-wrap {
  position: relative;
  height: 148px;
  margin: 0 16px;
  border-radius: 24px;
  overflow: hidden;
}

.home-stage-image {
  width: 100%;
  height: 139%;
  object-fit: cover;
  object-position: center 34%;
  transform: translateY(-15.7%);
}

.home-path-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 58%, rgba(255, 255, 255, 0.9) 100%);
}

.home-path-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #b55e2d;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.home-theme-momo .home-path-chip {
  color: #3a7a57;
}

.home-path-content {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}

.home-path-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.home-path-title-row .daily-status-pill {
  display: none;
}

.home-stage-count,
.home-stage-title,
.home-stage-percent {
  margin: 0;
}

.home-stage-count {
  color: #1f1a14;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.home-stage-title {
  color: #1f1a14;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.home-theme-momo .home-stage-title {
  color: #1f1a14;
}

.home-stage-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-stage-progressbar {
  position: relative;
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8e3db;
}

.home-stage-progressbar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #c87040;
}

.home-theme-momo .home-stage-progressbar span {
  background: #3a7a57;
}

/* Figma 234-4684 shows a clean full-width bar with no numeric percent. */
.home-stage-percent {
  display: none;
}

.home-stage-strip {
  display: none;
  gap: 12px;
  min-height: 60px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.home-stage-strip::-webkit-scrollbar {
  display: none;
}

.home-stage-step {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  flex: 0 0 44px;
  scroll-snap-align: start;
  color: #a09888;
}

.home-stage-step-marker {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid #ccc5ba;
  border-radius: 999px;
  background: #e8e3db;
  color: #b0a89e;
  font-size: 0.68rem;
  font-weight: 800;
}

.home-stage-step-marker img {
  width: 12px;
  height: 12px;
}

.home-stage-step.completed .home-stage-step-marker,
.home-stage-step.current .home-stage-step-marker {
  border-color: #c87040;
  background: #c87040;
  color: #fff;
}

.home-theme-momo .home-stage-step.completed .home-stage-step-marker,
.home-theme-momo .home-stage-step.current .home-stage-step-marker {
  border-color: #3a7a57;
  background: #3a7a57;
}

.home-stage-step-label {
  max-width: 48px;
  color: inherit;
  font-size: 0.5rem;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
}

.home-stage-step.current .home-stage-step-label {
  color: #c87040;
  font-weight: 800;
}

.home-theme-momo .home-stage-step.current .home-stage-step-label {
  color: #3a7a57;
}

.home-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-secondary-card {
  position: relative;
  display: grid;
  min-height: 162px;
  overflow: hidden;
  padding: 17px;
  border: 1px solid #e8c4a0;
  border-radius: 16px;
  background: #fffaf4;
  color: #4a3a2c;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.home-theme-momo .home-secondary-card {
  border-color: #e8e2d8;
}

.home-secondary-card:disabled {
  opacity: 0.52;
  cursor: default;
}

.home-secondary-bg,
.home-secondary-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.home-nook-card .home-secondary-bg {
  opacity: 0.9;
  background:
    url("nook-room/Nook%20background.png") center / cover no-repeat,
    #5d3b22;
}

.home-nook-card .home-secondary-overlay {
  background: rgba(40, 18, 6, 0.32);
}

.home-practice-card .home-secondary-bg {
  opacity: 0.42;
  background:
    url("logo/Daily%20Practice%20Background.png?v=1") center / cover no-repeat,
    #fffaf4;
}

.home-secondary-content {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
}

.home-secondary-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #a85a2a;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.home-theme-momo .home-secondary-eyebrow {
  color: #1a5c38;
}

.home-nook-card .home-secondary-eyebrow {
  color: #ffe9b0;
}

.home-secondary-copy {
  color: #4a3a2c;
  font-size: 0.875rem;
  line-height: 1.38;
}

.home-nook-card .home-secondary-copy {
  color: #fff8ee;
}

.home-secondary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: fit-content;
  margin-top: 4px;
  padding: 7px 13px;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #a85a2a;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.4;
}

.home-theme-momo .home-secondary-pill {
  color: #1a5c38;
}

.home-nook-card .home-secondary-pill {
  background: rgba(255, 255, 255, 0.15);
  color: #ffe9b0;
}

.home-goals-card,
.home-momentum-card {
  border-radius: 16px;
  background: #fff;
}

.home-goals-list {
  display: grid;
}

.home-goal-row {
  display: grid;
  grid-template-columns: 22px 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 0;
  border-bottom: 1px solid #f0ede5;
}

.home-goal-row:last-child {
  border-bottom: 0;
}

.home-goal-row.complete {
  color: #b0a89e;
}

.home-goal-check {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #ccc5ba;
  border-radius: 999px;
}

.home-goal-row.complete .home-goal-check {
  border-color: #c87040;
  background: #c87040;
}

.home-theme-momo .home-goal-row.complete .home-goal-check {
  border-color: #3a7a57;
  background: #3a7a57;
}

.home-goal-check img {
  width: 12px;
  height: 12px;
}

.home-goal-icon {
  font-size: 1rem;
  line-height: 1;
}

.home-goal-copy {
  display: grid;
  min-width: 0;
}

.home-goal-title {
  color: #1f1a14;
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.5;
}

.home-goal-row.complete .home-goal-title,
.home-goal-row.complete .home-goal-meta {
  color: #b0a89e;
}

.home-goal-meta {
  overflow: hidden;
  color: #b0a89e;
  font-size: 0.625rem;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-goal-action {
  min-height: 26px;
  padding: 4px 12px;
  border: 0;
  border-radius: 999px;
  background: #b55e2d;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.home-theme-momo .home-goal-action {
  background: #2d6645;
}

.home-goal-action:disabled {
  opacity: 0.45;
}

.home-momentum-card {
  gap: 12px;
  border-color: #e8c4a0;
  box-shadow: none;
}

.home-theme-momo .home-momentum-card {
  border-color: #e8e2d8;
}

.home-momentum-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.home-momentum-icon {
  font-size: 1.8rem;
  line-height: 1;
}

.home-momentum-title,
.home-momentum-copy {
  display: block;
}

.home-momentum-title {
  color: #1f1a14;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
}

.home-momentum-copy {
  color: #8b8178;
  font-size: 0.75rem;
  line-height: 1.35;
}

.home-day-dots {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 4px;
}

.home-day-dot-wrap {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.home-day-dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #e8e3db;
}

.home-day-dot.active {
  background: #c87040;
}

.home-theme-momo .home-day-dot.active {
  background: #3a7a57;
}

.home-day-dot img {
  width: 13px;
  height: 13px;
}

.home-day-label,
.home-weekday-labels span {
  color: #b0a89e;
  font-size: 0.625rem;
  font-weight: 750;
}

.home-weekly-momentum {
  display: grid;
  gap: 10px;
  margin: -1px;
  padding: 14px;
  border: 2px solid #f5d98a;
  border-radius: 16px;
  background: #fff8e6;
}

.home-weekly-grid {
  display: grid;
  gap: 5px;
}

.home-week-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.home-week-label {
  color: #b07a10;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.home-week-dots,
.home-weekday-labels {
  display: grid;
  grid-template-columns: repeat(7, 18px);
  gap: 4px;
}

.home-week-dot {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #f0e8d0;
}

.home-week-dot.active {
  background: #d4a017;
}

.home-week-dot img {
  width: 8px;
  height: 8px;
}

.home-weekday-labels {
  margin-left: 56px;
}

.daily-hero,
.home-panel,
.shell-page-hero,
.profile-stat-card,
.path-teaser {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05);
}

.daily-hero {
  display: grid;
  gap: 16px;
  padding: calc(var(--app-card-pad) + 2px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 10%, rgba(217, 178, 76, 0.2), transparent 30%),
    radial-gradient(circle at 10% 92%, rgba(76, 175, 132, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
}

.daily-session-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.daily-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid rgba(76, 175, 132, 0.22);
  border-radius: 999px;
  background: rgba(230, 244, 238, 0.78);
  color: #2f7258;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.daily-streak-card {
  display: grid;
  gap: 7px;
  padding: 14px;
  border: 1px solid #dfeee7;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.75);
}

.character-dialogue {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.045);
}

.character-dialogue-name {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.character-dialogue-text {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.42;
}

.character-dialogue.grandma-tiger {
  border-color: rgba(17, 24, 39, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(249, 250, 251, 0.82)),
    radial-gradient(circle at top right, rgba(217, 178, 76, 0.14), transparent 34%);
}

.teacher-dialogue {
  border-color: #dcebe5;
  background: #fbfefc;
}

.path-dialogue {
  margin-bottom: -2px;
}

.home-checkin {
  position: relative;
  padding: 15px 16px;
}

.home-checkin::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(217, 178, 76, 0.72), rgba(76, 175, 132, 0.4));
}

.daily-streak-number {
  margin: 0;
  color: var(--text);
  font-size: 1.56rem;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.home-primary-cta {
  width: 100%;
  min-height: 54px;
  font-weight: 750;
}

/* Primary CTA follows the guide accent (Ember = orange, Momo = green) instead
   of the global green so the recolor is consistent across the dashboard. */
.home-theme-ember .home-primary-cta {
  border-color: #b55e2d;
  background: #b55e2d;
}

.home-theme-momo .home-primary-cta {
  border-color: #2d6645;
  background: #2d6645;
}

.home-panel,
.shell-page-hero {
  display: grid;
  gap: 12px;
  padding: var(--app-card-pad);
  border-radius: 20px;
}

.home-section-heading,
.support-panel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.momentum-panel {
  background:
    radial-gradient(circle at 96% 0%, rgba(76, 175, 132, 0.09), transparent 34%),
    #ffffff;
}

.momentum-stat {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(229, 231, 235, 0.84);
  border-radius: 18px;
  background: rgba(249, 250, 251, 0.66);
}

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

.path-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border-radius: 20px;
  color: var(--text);
  text-align: left;
}

.path-teaser > span:first-child {
  display: grid;
  gap: 4px;
}

.path-teaser-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.path-teaser-copy {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.38;
}

.path-teaser-action {
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 750;
}

.support-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background:
    radial-gradient(circle at 100% 12%, rgba(217, 178, 76, 0.16), transparent 34%),
    #ffffff;
}

.support-panel-row {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.support-coin-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid rgba(217, 178, 76, 0.28);
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.88), transparent 44%),
    linear-gradient(180deg, #fff7dd 0%, #f7e6a9 100%);
  color: #654616;
  cursor: pointer;
  font: inherit;
  box-shadow: 0 8px 18px rgba(101, 70, 22, 0.11);
  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.support-coin-badge:active {
  transform: translateY(1px);
}

.support-coin-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
}

.support-coin-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.support-coin-reward {
  position: fixed;
  right: max(26px, calc((100vw - 520px) / 2 + 26px));
  bottom: calc(104px + env(safe-area-inset-bottom));
  z-index: 130;
  padding: 7px 11px;
  border: 1px solid rgba(217, 178, 76, 0.3);
  border-radius: 999px;
  background: rgba(255, 248, 225, 0.94);
  color: #775114;
  box-shadow: 0 12px 30px rgba(101, 70, 22, 0.16);
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1;
  pointer-events: none;
  transform: translateY(8px) scale(0.96);
  opacity: 0;
}

.support-coin-reward.is-floating {
  animation: support-coin-float 1.1s ease-out both;
}

@keyframes support-coin-float {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
  18% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  78% {
    opacity: 1;
    transform: translateY(-18px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-28px) scale(0.98);
  }
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 100;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  width: min(calc(100% - 20px), var(--app-nav-max));
  padding: 8px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.14);
  transform: translateX(-50%);
  backdrop-filter: blur(18px);
}

.screen .bottom-nav {
  display: none;
}

.global-bottom-nav {
  display: grid;
}

.bottom-nav-item {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 48px;
  padding: 7px 4px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.1;
}

.bottom-nav-item.active {
  background:
    radial-gradient(circle at 50% 12%, rgba(217, 178, 76, 0.16), transparent 42%),
    linear-gradient(180deg, #fff8ed 0%, #eef8f3 100%);
  color: var(--text);
  font-weight: 750;
  box-shadow: inset 0 0 0 1px rgba(217, 178, 76, 0.16), 0 8px 18px rgba(74, 52, 31, 0.08);
}

.bottom-nav-glyph {
  display: grid;
  place-items: center;
  width: 24px;
  height: 20px;
  color: #26313f;
  line-height: 1;
}

.bottom-nav-item:not(.active) .bottom-nav-glyph {
  color: #7b8493;
}

.bottom-nav-icon {
  background: none;
}

.bottom-nav-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.global-bottom-nav .bottom-nav-icon {
  background-color: currentColor;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}

.global-bottom-nav .bottom-nav-icon img {
  opacity: 0;
}

.global-bottom-nav .bottom-nav-icon-home {
  mask-image: url("icons/home.svg");
  -webkit-mask-image: url("icons/home.svg");
}

.global-bottom-nav .bottom-nav-icon-nook {
  mask-image: url("icons/nook.svg");
  -webkit-mask-image: url("icons/nook.svg");
}

.global-bottom-nav .bottom-nav-icon-path {
  mask-image: url("icons/path.svg");
  -webkit-mask-image: url("icons/path.svg");
}

.global-bottom-nav .bottom-nav-icon-practice {
  mask-image: url("icons/profile-edit.svg");
  -webkit-mask-image: url("icons/profile-edit.svg");
}

.global-bottom-nav .bottom-nav-icon-profile {
  mask-image: url("icons/profile.svg");
  -webkit-mask-image: url("icons/profile.svg");
}

.bottom-nav-item.active .bottom-nav-glyph {
  color: #d85e1b;
}

.bottom-nav-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #cbd5e1;
}

.bottom-nav-dot.active,
.bottom-nav-item.active .bottom-nav-dot {
  background: var(--green);
}

.friends-placeholder-list {
  display: grid;
  gap: 10px;
}

.friends-placeholder-item,
.profile-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  color: var(--text);
}

.profile-setting-action {
  width: 100%;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.profile-setting-action:active {
  transform: translateY(1px);
}

.friends-placeholder-item {
  justify-content: flex-start;
  color: var(--muted);
}

/* ===== Nook (Figma 132:6225) — full-screen wooden hutch, no scroll ===== */
.nook-layout {
  position: relative;
  height: 100dvh;
  max-width: var(--app-content-max);
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

.nook-room {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    url("nook-room/Nook background.png") center / 100% 100% no-repeat,
    #b88a4e;
}

/* top scrim keeps the white title + chip legible over the lit shelves */
.nook-scrim {
  position: absolute;
  inset: 0 0 auto 0;
  height: 150px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(28, 16, 4, 0.5) 0%, rgba(28, 16, 4, 0.18) 55%, transparent 100%);
}

.nook-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px 14px;
}

.nook-title {
  margin: 0;
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
}

.nook-topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* circular shop-bag button — the only way into the shop */
.nook-shop-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 248, 230, 0.92);
  color: #b07a10;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(40, 22, 6, 0.28);
  transition: transform 0.12s;
}

.nook-shop-btn:active {
  transform: scale(0.94);
}

/* shared masked shop-bag glyph — one SVG, recolored per context via background */
.nook-bag {
  display: inline-block;
  -webkit-mask: url("icons/shop-bag.svg") center / contain no-repeat;
  mask: url("icons/shop-bag.svg") center / contain no-repeat;
  background-color: currentColor;
}

.nook-shop-btn-icon {
  width: 17px;
  height: 17px;
  background-color: #b07a10;
}

/* points display pill — informational only, NOT interactive */
.nook-points-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 248, 230, 0.92);
  color: #6b4a1c;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(40, 22, 6, 0.28);
  cursor: default;
  user-select: none;
}

.nook-coin {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
}

.nook-coin img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* shop-bag icon used inline within sentence copy (empty hint = light over room) */
.nook-inline-bag {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  background-color: #fdf3df;
}

/* lighter variant for the dark coach tooltip */
.nook-inline-bag-light {
  background-color: #f5c451;
}

/* points star inside shop buy buttons */
.nook-cost-star {
  width: 15px;
  height: 15px;
  object-fit: contain;
  vertical-align: -2px;
}

/* shop-bag icon next to the "Shop" sheet title */
.nook-shop-title-bag {
  width: 18px;
  height: 18px;
  vertical-align: -3px;
  background-color: #2a1a08;
}

.nook-items-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.nook-item {
  --nook-object-size: clamp(58px, 15vw, 82px);
  --nook-size-scale: 1;
  --nook-drag-x: 0px;
  --nook-drag-y: 0px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  transform-origin: bottom center;
  transform: translate3d(var(--nook-drag-x), var(--nook-drag-y), 0) scale(var(--nook-size-scale));
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
  transition: transform 0.15s, opacity 0.15s;
  backface-visibility: hidden;
}

.nook-item.dragging {
  z-index: 50;
  cursor: grabbing;
  opacity: 0.96;
  transition: none;
  will-change: transform;
}

.nook-item.selected {
  z-index: 45;
}

.nook-item-size-large {
  --nook-size-scale: 1;
}

.nook-item-size-medium {
  --nook-size-scale: 0.82;
}

.nook-item-size-small {
  --nook-size-scale: 0.68;
}

@keyframes nook-item-pop {
  from { opacity: 0; transform: scale(0.4); }
  to { opacity: 1; transform: scale(1); }
}

.nook-item-emoji {
  display: block;
  font-size: clamp(2rem, 11vw, 3rem);
  line-height: 1;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.22));
  animation: nook-item-pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  pointer-events: none;
}

.nook-item-img {
  width: var(--nook-object-size);
  height: var(--nook-object-size);
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.3)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

/* slightly larger plush / blanket companions */
.nook-item[data-item-id="dino"],
.nook-item[data-item-id="blanket"],
.nook-item[data-item-id="sloth"],
.nook-item[data-item-id="raccoon"],
.nook-item[data-item-id="otter"],
.nook-item[data-item-id="cat"],
.nook-item[data-item-id="owl"],
.nook-item[data-item-id="deer"],
.nook-item[data-item-id="headphones"] {
  --nook-object-size: clamp(72px, 19vw, 100px);
}

.nook-size-controls {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(var(--app-nav-clearance) + 10px);
  z-index: 14;
  display: grid;
  grid-template-columns: 1fr repeat(3, auto);
  align-items: center;
  gap: 7px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 248, 230, 0.94);
  color: #5d3c16;
  box-shadow: 0 10px 24px rgba(40, 22, 6, 0.25);
  backdrop-filter: blur(12px);
}

.nook-size-controls[hidden] {
  display: none;
}

.nook-size-controls span {
  padding-left: 8px;
  font-size: 0.75rem;
  font-weight: 800;
}

.nook-size-controls button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(107, 74, 28, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  color: #6b4a1c;
  font-size: 0.75rem;
  font-weight: 800;
}

.nook-size-controls button.active {
  border-color: rgba(176, 122, 16, 0.5);
  background: #f5c451;
  color: #2a1a08;
}

/* ===== Coach popup (Figma 146-232) — also the empty-nook shop direction ===== */
.nook-coach {
  position: absolute;
  inset: 0;
  z-index: 8;
}

.nook-coach[hidden] { display: none; }

.nook-coach-dim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  animation: nook-coach-fade 0.25s ease both;
}

.nook-coach-tip {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + 62px);
  right: 16px;
  z-index: 14;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: min(72vw, 232px);
  padding: 12px 12px 12px 14px;
  border-radius: 12px;
  background: #2a1a08;
  color: #fdf1dd;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.4);
  animation: nook-coach-pop 0.28s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}

.nook-coach-tip::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 22px;
  width: 13px;
  height: 13px;
  background: #2a1a08;
  border-radius: 3px;
  transform: rotate(45deg);
}

.nook-coach-tip p {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.35;
}

.nook-coach-dismiss {
  flex: 0 0 auto;
  margin: -2px -2px 0 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fdf1dd;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
}

@keyframes nook-coach-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nook-coach-pop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.nook-shop-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.nook-shop-overlay[hidden] {
  display: none;
}

.nook-shop-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 24, 39, 0.38);
  backdrop-filter: blur(2px);
}

.nook-shop-panel {
  position: relative;
  z-index: 1;
  max-height: 76vh;
  overflow-y: auto;
  padding: 6px 20px 44px;
  border-radius: 26px 26px 0 0;
  background: var(--surface);
  box-shadow: 0 -8px 40px rgba(17, 24, 39, 0.14);
}

.nook-shop-panel::before {
  content: "";
  display: block;
  width: 36px;
  height: 4px;
  margin: 12px auto 16px;
  border-radius: 999px;
  background: var(--line);
}

.nook-shop-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.nook-shop-title {
  flex: 1;
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.nook-shop-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
}

.nook-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nook-shop-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 20px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 4px 14px rgba(17, 24, 39, 0.04);
}

.nook-shop-item.owned {
  border-color: #b8e0cc;
  background: linear-gradient(160deg, #f2faf6 0%, #eefaf4 100%);
}

.nook-shop-item.nook-shop-locked {
  border-color: rgba(138, 106, 68, 0.18);
  background: linear-gradient(160deg, rgba(253, 249, 242, 0.9) 0%, rgba(244, 235, 219, 0.82) 100%);
  color: #7a6247;
}

.nook-shop-item.nook-shop-locked .nook-shop-item-icon {
  background: rgba(138, 106, 68, 0.08);
  color: #8a6a44;
}

.nook-shop-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  font-size: 2rem;
  line-height: 1;
}

.nook-shop-item-icon img {
  width: 62px;
  height: 62px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18));
}

.nook-shop-item-name,
.nook-shop-item-desc {
  margin: 0;
}

.nook-shop-item-name {
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.2;
}

.nook-shop-item-desc {
  flex: 1;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.nook-shop-buy-btn,
.nook-shop-owned-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 800;
}

.nook-shop-buy-btn {
  border: 1.5px solid #e9c94c;
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #7a5500;
  cursor: pointer;
}

.nook-shop-buy-btn.muted,
.nook-shop-buy-btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.nook-shop-owned-badge {
  background: rgba(76, 175, 132, 0.12);
  color: #267252;
}

.profile-stat-card {
  display: grid;
  gap: 6px;
  padding: var(--app-card-pad);
  border-radius: 20px;
}

.profile-action {
  width: 100%;
}

.profile-identity-card,
.profile-reputation-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.05);
}

.profile-identity-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: calc(var(--app-card-pad) + 2px);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 8%, rgba(217, 178, 76, 0.18), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(217, 178, 76, 0.28);
  border-radius: 26px;
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.82), transparent 35%),
    linear-gradient(145deg, #fff2c4 0%, #e4b74c 100%);
  color: #654616;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 850;
  letter-spacing: 0.04em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 14px 24px rgba(101, 70, 22, 0.12);
}

.profile-identity-copy {
  display: grid;
  gap: 5px;
}

.profile-title {
  margin: 0;
  color: #79551c;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.profile-reputation-card {
  display: grid;
  gap: 8px;
  padding: var(--app-card-pad);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 250, 251, 0.86)),
    radial-gradient(circle at top right, rgba(217, 178, 76, 0.14), transparent 34%);
}

.profile-reputation-text {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.42;
}

.profile-title-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-title-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(76, 175, 132, 0.18);
  border-radius: 999px;
  background: rgba(230, 244, 238, 0.62);
  color: #2f7258;
  font-size: 0.78rem;
  font-weight: 750;
}

.profile-invite-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(76, 175, 132, 0.1), transparent 34%),
    #ffffff;
}

.profile-invite-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.profile-referral-code {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(249, 250, 251, 0.9);
  color: var(--text);
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-invite-action {
  white-space: nowrap;
}

.profile-figma-layout {
  gap: 0;
  /* Match the Path screen's title position (top inset) so "Profile" sits where
     "Your Path" does when switching tabs. */
  padding-top: 30px;
  background: #f2ede4;
  color: #1f1a14;
  font-family: Inter, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.profile-page-header {
  padding: 0 0 8px;
}

.profile-page-header h1 {
  margin: 0;
  color: #1f1a14;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0 16px;
  text-align: center;
}

.profile-figma-layout .profile-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 3px solid #c8c0b0;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.72), transparent 34%),
    linear-gradient(145deg, #c4d1b5 0%, #8aa179 100%);
  color: #7c4b1d;
  font-family: Inter, "Segoe UI", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.02em;
  box-shadow: none;
  overflow: hidden;
}

.profile-figma-layout .profile-avatar.has-photo {
  background: #c8c0b0;
}

.profile-figma-layout .profile-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-hero h2 {
  margin: 8px 0 0;
  color: #1f1a14;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.02em;
}

.profile-email-line {
  margin: 0;
  padding-top: 2px;
  color: #8b8178;
  font-size: 0.875rem;
  line-height: 1.45;
}

.profile-stat-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 12px;
}

.profile-stat {
  display: grid;
  justify-items: center;
  gap: 0;
  min-width: 38px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
}

.profile-stat-button {
  cursor: pointer;
}

.profile-stat strong {
  color: #1f1a14;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.5;
}

.profile-stat span {
  color: #8b8178;
  font-size: 0.625rem;
  line-height: 1.5;
  white-space: nowrap;
}

.profile-stat-divider {
  width: 1px;
  height: 28px;
  background: #c8c0b0;
}

.profile-section {
  padding-top: 16px;
}

.profile-section-label {
  margin: 0;
  padding: 0 0 8px;
  color: #8b8178;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.profile-companion-card,
.profile-list-card,
.profile-share-card {
  width: 100%;
  border: 1px solid #c8c0b0;
  border-radius: 16px;
  background: rgba(253, 249, 242, 0.42);
  overflow: hidden;
}

.profile-companion-card {
  padding: 12px 14px 16px;
}

.profile-companion-copy {
  margin: 0 0 10px;
  color: #6e6354;
  font-size: 0.75rem;
  line-height: 1.5;
}

.profile-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.profile-guide-card {
  display: flex;
  min-width: 0;
  min-height: 232px;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 9px 12px;
  border: 1px solid #c8c0b0;
  border-radius: 16px;
  background: rgba(245, 240, 232, 0.5);
  color: #1f1a14;
  cursor: pointer;
  text-align: center;
}

.profile-guide-card.selected {
  min-height: 240px;
  border: 2px solid #5a7a4a;
  background: rgba(237, 242, 232, 0.8);
}

.profile-guide-card[data-guide="ember"].selected {
  border-color: #d4845a;
  background: #f5ede0;
}

.profile-guide-portrait {
  display: grid;
  place-items: center;
  width: min(100%, 118px);
  height: 146px;
  margin-bottom: 8px;
  border-radius: 28px;
  overflow: visible;
}

.profile-guide-portrait-momo {
  background: linear-gradient(180deg, rgba(226, 238, 220, 0.82), rgba(237, 242, 232, 0.14));
}

.profile-guide-portrait-ember {
  background: linear-gradient(180deg, rgba(255, 234, 218, 0.82), rgba(245, 240, 232, 0.12));
}

.profile-guide-portrait img {
  display: block;
  width: 100%;
  height: 154px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 10px 14px rgba(61, 54, 41, 0.14));
  pointer-events: none;
}

.profile-guide-portrait-momo img {
  width: 112%;
}

.profile-guide-portrait-ember img {
  width: 106%;
  height: 160px;
}

.profile-guide-card strong {
  margin-top: 2px;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.42;
}

.profile-guide-card > span:not(.profile-guide-portrait):not(.profile-guide-state) {
  min-height: 30px;
  color: #6e6354;
  font-size: 0.625rem;
  line-height: 1.5;
}

.profile-guide-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 21px;
  margin-top: 8px;
  padding: 3px 13px;
  border: 1px solid #c8c0b0;
  border-radius: 999px;
  background: #ede8df;
  color: #5a7a4a;
  font-size: 0.625rem;
  font-weight: 750;
  line-height: 1.2;
}

.profile-guide-card.selected .profile-guide-state {
  gap: 4px;
  border-color: #5a7a4a;
  background: #5a7a4a;
  color: #ffffff;
}

.profile-guide-card[data-guide="ember"].selected .profile-guide-state {
  border-color: #b85c2a;
  background: #b85c2a;
}

.profile-guide-success {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-top: 4px;
  padding: 13px 17px;
  border: 1px solid #a8cc98;
  border-radius: 16px;
  background: #edf5e8;
  color: #2a4a1e;
}

.profile-guide-success-momo {
  border-color: #a8cc98;
  background: #edf5e8;
  color: #2a4a1e;
}

.profile-guide-success-ember {
  border-color: #e8b890;
  background: #f5ede0;
  color: #5a2a0e;
}

.profile-guide-success[hidden] {
  display: none;
}

.profile-guide-success-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #5a7a4a;
  color: #ffffff;
}

.profile-guide-success-icon img {
  display: block;
  width: 13px;
  height: 13px;
}

.profile-guide-success-ember .profile-guide-success-icon {
  background: #b85c2a;
}

.profile-guide-success-momo .profile-guide-success-icon {
  background: #5a7a4a;
}

.profile-guide-success strong,
.profile-guide-success small {
  display: block;
}

.profile-guide-success strong {
  font-size: 0.875rem;
  font-weight: 750;
  line-height: 1.42;
}

.profile-guide-success small {
  color: #5a7a4a;
  font-size: 0.6875rem;
  line-height: 1.5;
}

.profile-guide-success-ember small {
  color: #b85c2a;
}

.profile-guide-success-momo small {
  color: #5a7a4a;
}

.profile-guide-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  align-items: end;
  justify-items: center;
  background: transparent;
}

.profile-guide-modal[hidden] {
  display: none;
}

.profile-guide-modal-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 14, 8, 0.6);
  cursor: pointer;
}

.profile-guide-sheet {
  position: relative;
  z-index: 1;
  width: min(100%, var(--app-content-max));
  padding: 12px 20px max(32px, calc(24px + env(safe-area-inset-bottom)));
  border: 1px solid #e0d8cc;
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: #fffdf9;
  box-shadow: 0 -12px 48px rgba(20, 14, 8, 0.22);
}

.profile-guide-sheet-handle {
  width: 36px;
  height: 4px;
  margin: 0 auto 10px;
  border-radius: 999px;
  background: #c8c0b0;
}

.profile-guide-sheet-close {
  position: absolute;
  top: 14px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #c8c0b0;
  border-radius: 999px;
  background: #ede8df;
  color: #8b8178;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.profile-guide-sheet h2 {
  margin: 0 36px 8px;
  color: #1f1a14;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.55;
  text-align: center;
}

.profile-guide-preview-stack {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}

.profile-guide-preview-panel {
  position: relative;
  display: grid;
  place-items: end center;
  height: 180px;
  overflow: hidden;
  border: 1px solid #d4845a;
  border-radius: 16px;
  background: #f5ede0;
}

.profile-guide-preview-panel.momo {
  border-color: #b8d4a8;
  background: #edf2e8;
}

.profile-guide-preview-panel.is-muted {
  opacity: 0.6;
}

.profile-guide-preview-panel.is-muted::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.3);
  mix-blend-mode: saturation;
  pointer-events: none;
}

.profile-guide-video-frame {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  z-index: 1;
  display: block;
  height: 200px;
  width: auto;
  max-width: none;
  overflow: hidden;
  background: transparent;
}

.profile-guide-preview-panel.momo .profile-guide-video-frame {
  height: 200px;
}

.profile-guide-preview-panel video,
.profile-guide-preview-fallback {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  background: transparent;
}

.profile-guide-preview-panel video {
  z-index: 2;
}

.profile-guide-preview-fallback {
  z-index: 1;
  pointer-events: none;
}

.profile-guide-switch-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  margin-top: 16px;
  border: 0;
  border-radius: 16px;
  background: var(--guide-action-color, #5a7a4a);
  color: #ffffff;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.5;
}

.profile-guide-keep-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 36px;
  border: 0;
  background: transparent;
  color: #8b8178;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.42;
}

.profile-list-card {
  background: #ffffff;
}

.profile-list-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 57px;
  padding: 12px 16px 13px;
  border: 0;
  border-bottom: 1px solid #ede8df;
  background: transparent;
  color: #1f1a14;
  cursor: pointer;
  font-size: 0.875rem;
  line-height: 1.42;
  text-align: left;
}

.profile-list-row:last-child {
  border-bottom: 0;
}

.profile-weekly-goal-row {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  cursor: default;
}

.profile-weekly-goal-options {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}

.profile-weekly-goal-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  border: 0;
  border-radius: 12px;
  background: #ede8df;
  color: #8b8178;
  cursor: pointer;
  font-size: 0.6875rem;
  font-weight: 750;
  line-height: 1;
}

.profile-weekly-goal-chip.selected {
  background: #5a7a4a;
  color: #ffffff;
}

.profile-weekly-goal-chip:focus-visible {
  outline: 2px solid rgba(90, 122, 74, 0.38);
  outline-offset: 2px;
}

.profile-row-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: #ede8df;
  color: #5a7a4a;
}

.profile-row-icon img {
  display: block;
  width: 16px;
  height: 16px;
}

.profile-row-meta {
  color: #8b8178;
}

.profile-row-with-chevron {
  grid-template-columns: 44px minmax(0, 1fr) auto;
}

.profile-danger-row {
  color: #c0532a;
}

.profile-row-icon-danger {
  background: #ffeada;
}

.profile-row-chevron {
  color: #8b8178;
  font-size: 1.4rem;
  line-height: 1;
}

.profile-subscreen-layout {
  min-height: 100%;
  padding-top: 12px;
  padding-bottom: calc(var(--app-nav-clearance) + 28px) !important;
  scroll-padding-bottom: calc(var(--app-nav-clearance) + 24px);
}

.profile-subscreen-header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 12px 16px;
}

.profile-subscreen-header h1 {
  margin: 0;
  color: #1f1a14;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.03em;
}

.profile-back-button,
.profile-save-button {
  border: 0;
  cursor: pointer;
  font: inherit;
}

.profile-back-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #c8c0b0;
  border-radius: 999px;
  background: #ede8df;
}

.profile-back-button img {
  width: 16px;
  height: 16px;
}

.profile-save-button {
  min-height: 32px;
  padding: 6px 16px;
  border-radius: 24px;
  background: #5a7a4a;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 750;
  line-height: 1.4;
}

.profile-edit-photo,
.profile-change-photo-current,
.profile-password-hero,
.profile-delete-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  text-align: center;
}

.profile-edit-photo {
  padding: 8px 0 20px;
}

.profile-edit-photo-button {
  position: relative;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.profile-avatar-large {
  width: 80px !important;
  height: 80px !important;
}

.profile-avatar-xl {
  width: 88px !important;
  height: 88px !important;
}

.profile-photo-camera {
  position: absolute;
  right: -1px;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 2px solid #f2ede4;
  border-radius: 999px;
  background: #5a7a4a;
}

.profile-photo-camera img {
  width: 12px;
  height: 12px;
  filter: brightness(0) invert(1);
}

.profile-change-photo-link {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: #5a7a4a;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.5;
}

.profile-change-photo-current {
  padding: 8px 0 16px;
}

.profile-change-photo-current p {
  margin: 8px 0 0;
  color: #8b8178;
  font-size: 0.75rem;
  line-height: 1.5;
}

.profile-form-stack {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 0 16px;
}

.profile-field {
  display: grid;
  gap: 6px;
  width: 100%;
}

.profile-field > span:first-child,
.profile-delete-confirm-field > span:first-child {
  color: #8b8178;
  font-size: 0.6875rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}

.profile-field input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c8c0b0;
  border-radius: 24px;
  background: #f5f0e8;
  color: #1f1a14;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.4;
  padding: 13px 15px;
}

.profile-field input::placeholder {
  color: #b0a89e;
}

.profile-field-readonly input {
  color: #6f695f;
  background: #ebe5da;
}

.profile-field small {
  color: #8b8178;
  font-size: 0.72rem;
  line-height: 1.4;
}

.profile-save-button:disabled {
  opacity: 0.62;
}

.profile-subscreen-section {
  width: 100%;
  padding: 20px 16px 0;
}

.profile-photo-option {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  min-height: 62px;
}

.profile-photo-option strong,
.profile-photo-option small {
  display: block;
}

.profile-photo-option strong {
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.42;
}

.profile-photo-option small {
  color: #8b8178;
  font-size: 0.6875rem;
  line-height: 1.5;
}

.profile-remove-photo-card {
  margin-top: 12px;
}

.profile-password-hero {
  padding: 16px 32px 24px;
}

.profile-password-icon,
.profile-delete-icon {
  display: grid;
  place-items: center;
  border: 1px solid #c8c0b0;
  border-radius: 16px;
  background: #ede8df;
}

.profile-password-icon {
  width: 56px;
  height: 56px;
}

.profile-password-icon img {
  width: 26px;
  height: 26px;
}

.profile-password-hero p {
  max-width: 280px;
  margin: 16px 0 0;
  color: #6e6354;
  font-size: 0.875rem;
  line-height: 1.42;
}

.profile-password-form {
  gap: 16px;
}

.profile-password-input-wrap {
  position: relative;
  display: block;
}

.profile-password-input-wrap input {
  padding-right: 44px;
}

.profile-password-input-wrap img {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
}

.profile-password-requirements {
  display: grid;
  gap: 4px;
  width: calc(100% - 32px);
  margin: 16px 16px 0;
  padding: 13px 17px 17px;
  border: 1px solid #a8cc98;
  border-radius: 24px;
  background: #edf5e8;
  color: #5a7a4a;
  font-size: 0.6875rem;
  line-height: 1.5;
}

.profile-password-requirements strong {
  color: #2a4a1e;
  font-size: 0.6875rem;
}

.profile-password-requirements span::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 8px;
  border: 1px solid currentColor;
  vertical-align: 1px;
}

.profile-primary-action,
.profile-delete-action,
.profile-secondary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 32px);
  min-height: 48px;
  margin: 20px 16px 0;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.42;
}

.profile-primary-action {
  background: #5a7a4a;
  color: #ffffff;
}

.profile-form-status {
  margin: 12px 16px 0;
  color: #5a7a4a;
  font-size: 0.75rem;
  line-height: 1.5;
  text-align: center;
}

.profile-form-status.is-error {
  color: #c0532a;
}

.profile-delete-hero {
  padding: 16px 32px 20px;
}

.profile-delete-icon {
  width: 64px;
  height: 64px;
  border-color: #f5c4a8;
  background: #ffeada;
}

.profile-delete-icon img {
  width: 28px;
  height: 28px;
}

.profile-delete-hero h2 {
  margin: 18px 0 6px;
  color: #1f1a14;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.55;
}

.profile-delete-hero p {
  max-width: 300px;
  margin: 0;
  color: #6e6354;
  font-size: 0.875rem;
  line-height: 1.62;
}

.profile-loss-row {
  cursor: default;
}

.profile-delete-confirm-field {
  width: calc(100% - 32px);
  margin: 20px 16px 0;
}

.profile-delete-action {
  background: #c9532a;
  color: #ffffff;
}

.profile-delete-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.profile-secondary-action {
  margin-top: 8px;
  border: 1px solid #c8c0b0;
  background: #ede8df;
  color: #3d3629;
}

.profile-row-chevron {
  color: #8b8178;
  font-size: 1.4rem;
  line-height: 1;
}

.profile-share-card {
  padding: 16px;
  background: #ffffff;
}

.profile-share-copy {
  display: grid;
  gap: 2px;
}

.profile-share-copy strong {
  color: #1f1a14;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1.42;
}

.profile-share-copy p {
  margin: 0;
  color: #8b8178;
  font-size: 0.75rem;
  line-height: 1.5;
}

.profile-share-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding-top: 16px;
}

.profile-share-primary,
.profile-share-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 24px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 750;
  line-height: 1.42;
}

.profile-share-primary {
  border: 0;
  background: #5a7a4a;
  color: #ffffff;
}

.profile-share-secondary {
  padding: 0 17px;
  border: 1px solid #c8c0b0;
  background: #ede8df;
  color: #3d3629;
}

.profile-signout-wrap {
  padding-top: 12px;
}

.profile-signout-button {
  width: 100%;
  min-height: 46px;
  border: 1px solid #f5c4a8;
  border-radius: 16px;
  background: #ffeada;
  color: #c0532a;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 750;
  line-height: 1.42;
}

.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
}

.login-layout {
  max-width: 420px;
}

.onboarding-layout {
  justify-content: center;
  gap: 14px;
  text-align: left;
}

.onboarding-card {
  display: grid;
  gap: 18px;
  width: 100%;
  padding: clamp(20px, 5vw, 28px);
  border: 1px solid rgba(229, 217, 198, 0.82);
  border-radius: 30px;
  background:
    radial-gradient(circle at 92% 8%, rgba(217, 178, 76, 0.16), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.08);
}

.onboarding-card h1 {
  max-width: 11ch;
}

.onboarding-actions,
.onboarding-option-list {
  display: grid;
  gap: 10px;
}

.guide-choice-grid {
  display: grid;
  gap: 12px;
}

.guide-choice-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(229, 231, 235, 0.92);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.045);
}

.guide-choice-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.guide-choice-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: #fff8ed;
  font-size: 1.5rem;
}

.guide-choice-head strong,
.guide-choice-head em {
  display: block;
}

.guide-choice-head strong {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.2;
}

.guide-choice-head em {
  color: var(--muted);
  font-style: normal;
  font-size: 0.86rem;
  font-weight: 750;
}

.guide-choice-copy {
  display: grid;
  gap: 5px;
}

.guide-choice-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.38;
}

.onboarding-summary {
  display: grid;
  gap: 10px;
}

.onboarding-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(249, 250, 251, 0.76);
}

.onboarding-summary span {
  color: var(--muted);
}

.onboarding-summary strong {
  color: var(--text);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ===== Onboarding flow (Figma redesign) ===== */
.onboarding-shell {
  display: flex;
  justify-content: center;
  width: 100%;
  min-height: 100%;
  height: 100%;
  padding: 0;
  background: #f2ede6;
}

.onboarding-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 430px;
  min-height: 100%;
  height: 100%;
  background: #f2ede6;
  text-align: left;
  overflow: hidden;
}

.onboarding-error {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 92px;
  z-index: 6;
  margin: 0 auto;
  max-width: 398px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fce8e6;
  color: #a3261d;
  font-size: 0.85rem;
  text-align: center;
}

/* Top bars */
.onb-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  flex: 0 0 auto;
}
.onb-topbar-auth { justify-content: space-between; }
.onb-back {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid #c0b6a0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: #3d3629;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.onb-back-spacer { width: 36px; flex: 0 0 auto; }
.onb-wordmark { font-weight: 800; color: #1f1a14; }
.onb-progress { display: flex; gap: 6px; flex: 1; }
.onb-progress-seg { flex: 1; height: 5px; border-radius: 99px; background: #ddd5c6; }
.onb-progress-seg.on { background: #5a7a4a; }

.onb-background-screen {
  isolation: isolate;
  background: #1a1510;
}

.onb-background-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("characters/onboarding-background.webp") center top / cover no-repeat;
}

.onb-background-screen .onb-topbar {
  position: relative;
  z-index: 2;
  padding: 16px 20px 4px;
}

.onb-background-screen .onb-back {
  width: 32px;
  height: 32px;
  border-color: rgba(192, 182, 160, 0.6);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 4px 14px rgba(20, 14, 8, 0.12);
}

.onb-background-screen .onb-progress-seg {
  background: rgba(200, 192, 176, 0.7);
}

.onb-background-screen .onb-progress-seg.on {
  background: #5a7a4a;
}

.onb-background-spacer {
  flex: 0 0 clamp(214px, 56vh, 294px);
}

.onb-title-card {
  margin: 0 24px 16px;
  padding: 12px 16px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(4px);
}

.onb-title-card .onb-title {
  font-size: 1.5rem;
  line-height: 1.25;
}

.onb-title-card-centered .onb-title {
  text-align: center;
}

.onb-background-content {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 24px;
  padding: 0 24px calc(32px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}

.onb-background-options {
  gap: 12px;
}

.onb-background-screen .onb-option {
  gap: 16px;
  min-height: 70px;
  padding: 15px 17px;
  border-color: rgba(192, 182, 160, 0.7);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
}

.onb-background-screen .onb-option.selected {
  border-width: 2px;
  border-color: #8aac76;
  background: rgba(237, 242, 232, 0.96);
}

.onb-background-screen .onb-option-text strong {
  font-size: 0.875rem;
  line-height: 1.5;
}

.onb-background-screen .onb-option-text small {
  font-size: 0.6875rem;
  line-height: 1.5;
}

.onb-background-screen .onb-btn {
  min-height: 56px;
  margin-top: auto;
  border-radius: 16px;
}

.onb-frequency-screen .onb-background-spacer {
  flex-basis: 240px;
}

.onb-grade-screen .onb-background-spacer {
  flex-basis: 220px;
}

.onb-frequency-content {
  gap: 47px;
}

.onb-grade-content {
  gap: 16px;
}

.onb-background-frequency {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.onb-background-screen .onb-freq-card {
  min-height: 111px;
  padding: 21px 8px 19px;
  border-color: rgba(192, 182, 160, 0.7);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  text-align: center;
}

.onb-background-screen .onb-freq-card.selected {
  border-width: 2px;
  border-color: #8aac76;
  background: rgba(237, 242, 232, 0.96);
}

.onb-background-screen .onb-freq-card.selected .onb-freq-n,
.onb-background-screen .onb-freq-card.selected strong {
  color: #5a7a4a;
}

.onb-background-screen .onb-freq-n {
  font-size: 1.625rem;
  line-height: 1;
}

.onb-background-screen .onb-freq-card strong {
  color: #3d3629;
  font-size: 0.875rem;
  line-height: 1.43;
}

.onb-background-screen .onb-freq-card small {
  color: #8b8178;
  font-size: 0.6875rem;
  line-height: 1.5;
}

/* Scroll + sheet regions */
.onb-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 20px 16px;
}
.onb-sheet {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 0;
  padding: 4px 20px 20px;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
}
.onb-sheet .onb-btn { margin-top: auto; }

/* Hero images */
.onb-hero { position: relative; width: 100%; overflow: hidden; flex: 0 0 auto; }
.onb-hero-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.onb-hero-tall { height: 44vh; max-height: 340px; min-height: 240px; }
.onb-hero-short { height: 180px; }
.onb-step-screen .onb-hero-img {
  object-position: center 24%;
}

.onb-step-screen .onb-hero-short {
  height: clamp(174px, 44vw, 190px);
}
.onb-hero-badge {
  position: absolute;
  top: 16px; left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  padding: 6px 16px;
  border-radius: 99px;
  background: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  color: #1f1a14;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Opening screen: circular Daily Whisk badge logo, centered above the hero
   (Figma 153:2 — 150x150 on the tan page bg). */
.onb-opening-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 0 10px;
}
.onb-opening-logo-img {
  width: clamp(124px, 38vw, 150px);
  height: clamp(124px, 38vw, 150px);
  object-fit: contain;
}

/* Hero gradient overlays: bottom fade blends the image into the page bg;
   top scrim darkens the top for depth (finish screens). */
.onb-hero-faded::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 170px;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(242, 237, 230, 0), #f2ede6);
  pointer-events: none;
}
/* Top fade: blends the top edge of the hero image into the tan page bg so the
   logo above flows into the image (opening screen). */
.onb-hero-faded-top::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 96px;
  z-index: 1;
  background: linear-gradient(to top, rgba(242, 237, 230, 0), #f2ede6);
  pointer-events: none;
}
.onb-hero-scrim::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 100px;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(15, 12, 8, 0.55), rgba(15, 12, 8, 0));
  pointer-events: none;
}

/* Typography */
.onb-eyebrow { margin: 0; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; font-weight: 800; color: #8b8178; }
.onb-eyebrow-green { color: #6f9359; }
.onb-title { margin: 0; font-size: 1.6rem; font-weight: 800; line-height: 1.22; color: #1f1a14; }
.onb-sub { margin: 0; color: #6e6354; font-size: 0.95rem; line-height: 1.45; }
.onb-center { text-align: center; }

/* Buttons + links */
.onb-footer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  background: #f2ede6;
}
.onb-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}
.onb-btn-primary { background: #5a7a4a; color: #fff; }
.onb-btn-primary:disabled { background: #d8d0c4; color: #a09890; cursor: not-allowed; }
.onb-btn-apple { background: #1f1a14; color: #fff; }
.onb-btn-white { background: #fff; color: #1f1a14; border: 1px solid #e0d8c8; }
.onb-btn-soft { background: #f8f4ec; color: #2d261f; border: 1px solid #ded3c2; }
.onb-auth-mark { font-size: 1.2rem; line-height: 1; }
.onb-g { font-weight: 800; color: #4285f4; }
.onb-link { padding: 6px; border: 0; background: none; color: #7a7060; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.onb-link-right { align-self: flex-end; }
.onb-inline-link { padding: 0; border: 0; background: none; color: #5a7a4a; font: inherit; font-weight: 700; cursor: pointer; }
.onb-browser-note { margin: 0; color: #7a7060; font-size: 0.78rem; line-height: 1.35; text-align: center; }

/* Opening feature list */
.onb-feature-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.onb-feature-list li { display: flex; align-items: center; gap: 10px; color: #3d3629; font-size: 0.95rem; }

/* Option lists (goal / grade) */
.onb-option-list { display: flex; flex-direction: column; gap: 10px; }
.onb-option {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px;
  border: 1px solid #e7dfd2; border-radius: 16px; background: #fff;
  text-align: left; cursor: pointer;
}
.onb-option.selected { border-color: #5a7a4a; background: #edf2e8; }
.onb-option-icon { font-size: 1.2rem; flex: 0 0 auto; }
.onb-option-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.onb-option-text strong { color: #1f1a14; font-size: 0.95rem; }
.onb-option-text small { color: #8b8178; font-size: 0.78rem; }
.onb-option-check { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 auto; border: 1.5px solid #ccc5ba; border-radius: 50%; }
.onb-option.selected .onb-option-check { border-color: #5a7a4a; background: #5a7a4a; }
.onb-option.selected .onb-option-check::after { content: "✓"; color: #fff; font-size: 0.7rem; font-weight: 800; }

/* Frequency grid */
.onb-freq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.onb-freq-card {
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px; border: 1px solid #e7dfd2; border-radius: 16px; background: #fff;
  text-align: left; cursor: pointer;
}
.onb-freq-card.selected { border-color: #5a7a4a; background: #edf2e8; }
.onb-freq-n { font-size: 1.5rem; font-weight: 800; color: #1f1a14; }
.onb-freq-card strong { color: #1f1a14; }
.onb-freq-card small { color: #8b8178; font-size: 0.75rem; }

.onb-consent { color: #8b8178; font-size: 0.8rem; line-height: 1.45; }

/* Google success */
.onb-google-body { align-items: center; text-align: center; }
.onb-success-avatar {
  display: grid; place-items: center;
  width: 96px; height: 96px; margin: 20px auto 8px;
  border-radius: 50%; background: #cfe3c4; color: #3a5a2c;
  font-size: 2rem; font-weight: 800; border: 3px solid #fff; box-shadow: 0 0 0 1px #cfe3c4;
}
.onb-info-card { width: 100%; margin-top: 8px; padding: 4px 16px; border: 1px solid #e7dfd2; border-radius: 18px; background: #fff; }
.onb-info-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; text-align: left; }
.onb-info-row + .onb-info-row { border-top: 1px solid #f0ede5; }
.onb-info-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; background: #dcebd0; }
.onb-info-icon.ok { color: #3a5a2c; font-weight: 800; }
.onb-info-row strong { display: block; color: #1f1a14; }
.onb-info-row small { color: #8b8178; font-size: 0.8rem; }

.onb-email-body { gap: 12px; }
.onb-email-form { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.onb-field { display: flex; flex-direction: column; gap: 7px; color: #6e6354; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.onb-field input {
  width: 100%;
  min-height: 52px;
  padding: 0 14px;
  border: 1px solid #e0d8c8;
  border-radius: 15px;
  background: #fff;
  color: #1f1a14;
  font: inherit;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  outline: none;
}
.onb-field input:focus { border-color: #5a7a4a; box-shadow: 0 0 0 3px rgba(90, 122, 74, 0.14); }

/* Legal */
.onb-legal-screen {
  background: #f2ede4;
  color: #1f1a14;
}

.onb-legal-header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 20px 8px;
}

.onb-legal-title {
  margin: 0;
  color: #1f1a14;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.4;
  text-align: center;
}

.onb-legal-back {
  width: 36px;
  height: 36px;
  border-color: #dcd4c7;
  background: #fffaf2;
  color: #1f1a14;
  box-shadow: none;
}

.onb-legal-tabs-wrap {
  flex: 0 0 auto;
  padding: 12px 16px 22px;
}

.onb-legal-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 18px;
  background: #e6dfd4;
}

.onb-legal-tab {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8b8178;
  cursor: pointer;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 750;
  line-height: 1.4;
}

.onb-legal-tab.active {
  background: #ffffff;
  color: #1f1a14;
  box-shadow: 0 1px 4px rgba(58, 53, 47, 0.08);
}

.onb-legal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 24px calc(env(safe-area-inset-bottom, 0px) + 32px);
  -webkit-overflow-scrolling: touch;
}

.onb-legal-updated {
  margin: 0 0 18px;
  color: #8aac76;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.45;
  text-transform: uppercase;
}

.onb-legal-intro {
  margin: 0 0 24px;
  color: #5f554a;
  font-size: 0.875rem;
  line-height: 1.7;
}

.onb-legal-sections {
  display: grid;
  gap: 20px;
}

.onb-legal-section h2 {
  margin: 0 0 7px;
  color: #1f1a14;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.5;
}

.onb-legal-section p {
  margin: 0;
  color: #5f554a;
  font-size: 0.875rem;
  line-height: 1.7;
}

.onb-legal-contact {
  display: grid;
  gap: 4px;
  margin-top: 32px;
  padding: 17px 20px;
  border: 1px solid rgba(180, 168, 150, 0.36);
  border-radius: 16px;
  background: #ffffff;
}

.onb-legal-contact strong {
  color: #1f1a14;
  font-size: 0.95rem;
  font-weight: 800;
}

.onb-legal-contact span,
.onb-legal-contact a {
  color: #5f554a;
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Companion picker */
.onb-pick-screen {
  padding-bottom: 32px;
  background: #f2ede6;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.onb-pick-screen .onb-topbar {
  padding: 16px 20px 8px;
}
.onb-pick-intro {
  display: grid;
  gap: 8px;
  padding: 20px 24px 12px;
  text-align: center;
}
.onb-pick-kicker {
  margin: 0;
  color: #8aac76;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.5;
  text-transform: uppercase;
}
.onb-pick-sub {
  margin: 0;
  color: #7a7060;
  font-size: 0.875rem;
  line-height: 1.43;
}
.onb-pick-body {
  display: grid;
  gap: 12px;
  padding: 12px 24px 0;
}
.onb-pick-list { display: flex; flex-direction: column; gap: 12px; }
.onb-pick-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 272px;
  padding: 12px 12px 14px;
  border: 1px solid #c8c0b0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  cursor: pointer;
  text-align: left;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.onb-pick-card.is-selected {
  border-width: 2px;
  box-shadow: 0 2px 12px rgba(90, 122, 74, 0.18);
}
.onb-pick-ember.is-selected {
  border-color: #c87040;
  box-shadow: 0 2px 12px rgba(200, 112, 64, 0.18);
}
.onb-pick-momo.is-selected {
  border-color: #5a7a4a;
}
.onb-pick-momo { min-height: 290px; }
.onb-pick-media { position: relative; height: 160px; border-radius: 24px; overflow: hidden; display: grid; place-items: stretch; }
.onb-pick-ember .onb-pick-media { background: #f5ede0; border: 1px solid #e0d4c4; }
.onb-pick-momo .onb-pick-media { background: #f0f5ec; border: 1px solid #d0dfc4; }
.onb-pick-portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.onb-pick-video {
  display: block;
  background: transparent;
  background-color: transparent;
  pointer-events: none;
}
.onb-pick-spark {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 900;
  transition: background-color 180ms ease, transform 180ms ease;
}
.onb-pick-ember .onb-pick-spark { background: rgba(200,112,64,0.88); }
.onb-pick-momo .onb-pick-spark { background: rgba(90,122,74,0.88); }
.onb-pick-play {
  font-size: 0.68rem;
  padding-left: 2px;
}
.onb-pick-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px 0; }
.onb-pick-meta strong { display: block; color: #1f1a14; font-size: 1rem; line-height: 1.5; }
.onb-pick-meta small { color: #8b8178; font-size: 0.75rem; line-height: 1.5; }
.onb-pick-ember .onb-pick-meta small { color: #c87040; }
.onb-pick-momo.is-selected .onb-pick-meta small { color: #5a7a4a; }
.onb-pick-choose {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 13px;
  border: 1px solid #c8c0b0;
  border-radius: 99px;
  background: #ede8e0;
  color: #8b8178;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1.5;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.onb-pick-choose.is-selected {
  border-color: transparent;
  color: #fff;
}
.onb-pick-ember .onb-pick-choose.is-selected { background: #c87040; }
.onb-pick-momo .onb-pick-choose.is-selected { background: #5a7a4a; }
.onb-pick-quote {
  margin: 16px 4px 0;
  color: #a09080;
  font-size: 0.75rem;
  font-style: italic;
  line-height: 1.5;
}
.onb-pick-note {
  margin: 8px 0 0;
  color: #7a7060;
  font-size: 0.875rem;
  line-height: 1.43;
  text-align: center;
}
.onb-pick-cta {
  min-height: 56px;
  margin-top: 0;
  border: 0;
  background: #d8d0c4;
  color: #a09890;
}
.onb-pick-screen .onb-footer {
  padding-right: 24px;
  padding-left: 24px;
}

/* Finish (content sits on the tan page bg; hero fades into it) */
.onb-finish-body { gap: 8px; }

/* Guide-themed finish (Momo green / Ember orange) */
.onb-theme-momo .onb-btn-primary { background: #5a7a4a; }
.onb-theme-momo .onb-eyebrow-green { color: #5a7a4a; }
.onb-theme-ember .onb-btn-primary { background: #c87040; }
.onb-theme-ember .onb-eyebrow-green { color: #b85c2a; }

/* ===== Stage interior hero banner (Figma 109:3964) ===== */
/* Figma 109:3965 hero: stage scene on top + a SOLID themed panel below (stacked,
   not an overlay). Title sits on the full-width panel so it stays on one line. */
.path-stage-banner {
  flex: 0 0 auto;
  width: 100%;
  max-width: 411px;
  margin: 4px auto 14px;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.08);
  display: flex;
  flex-direction: column;
}
.path-stage-banner-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 341 / 198;
  overflow: hidden;
}
.path-stage-banner-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.path-stage-banner-guide {
  position: absolute;
  right: 8px;
  bottom: 0;
  z-index: 1;
  height: 96%;
  width: auto;
  object-fit: contain;
  object-position: bottom right;
  pointer-events: none;
}
.path-stage-banner-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px 14px;
}
.path-stage-banner-ember .path-stage-banner-panel {
  background: #a8461c;
}
.path-stage-banner-momo .path-stage-banner-panel {
  background: #2a5c3f;
}
.path-stage-banner-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-size: 0.64rem;
  font-weight: 800;
}
.path-stage-banner-ember .path-stage-banner-eyebrow {
  color: #f4c9ad;
}
.path-stage-banner-momo .path-stage-banner-eyebrow {
  color: #a0dcb4;
}
.path-stage-banner-title {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 800;
  line-height: 1.15;
  color: #ffffff;
}
.path-stage-banner-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.path-stage-banner-lessons {
  font-size: 0.74rem;
  font-weight: 600;
}
.path-stage-banner-ember .path-stage-banner-lessons {
  color: #f3d6c5;
}
.path-stage-banner-momo .path-stage-banner-lessons {
  color: #c8ebd7;
}
.path-stage-banner-status {
  padding: 0;
  background: none;
  font-size: 0.72rem;
  font-weight: 700;
}
.path-stage-banner-ember .path-stage-banner-status {
  color: #ffce9e;
}
.path-stage-banner-momo .path-stage-banner-status {
  color: #7fd9a8;
}
/* The banner carries the stage title, so hide the duplicate text header in interior */
app-premium-concepts-screen.path-stage-interior .path-tab-header .premium-copy {
  display: none;
}

/* ===== Stage interior cleanup: the banner is the hero ===== */
/* Hide the duplicate in-list stage header, its progress bar/label, the section
   preview, and the guide dialogue bubble — the banner already shows the stage
   title, lessons, and status, so these were rendering twice. Also hide the
   decorative atmosphere layer (glowing orbs + faint skyline band) the way the
   overview does — in the interior its skyline shows as a stray bar near the top.
   The overview already hides this. */
app-premium-concepts-screen.path-stage-interior .path-atmosphere,
app-premium-concepts-screen.path-stage-interior .path-dialogue,
app-premium-concepts-screen.path-stage-interior .learning-path-stage-header,
app-premium-concepts-screen.path-stage-interior .learning-path-stage-progress,
app-premium-concepts-screen.path-stage-interior .learning-path-stage-progressbar,
app-premium-concepts-screen.path-stage-interior .learning-path-sections-preview {
  display: none !important;
}

/* Interior top bar: just the coin pill, right-aligned at its natural size, on the
   page background (no stretched bar). Back to the overview is the Path nav tab. */
app-premium-concepts-screen.path-stage-interior .path-tab-header {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 8px !important;
  min-height: 0 !important;
  padding: 10px 16px 0 !important;
  /* Override the old "header card" styling (border/rounded/shadow/bg) so the bar
     disappears — just the back pill on the left and the coin on the right. */
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
app-premium-concepts-screen.path-stage-interior .path-tab-header [data-role="back"] {
  display: none !important;
}
/* Back-to-overview pill ("‹ Path"), top-left, matching the Figma. */
app-premium-concepts-screen.path-stage-interior .path-tab-header [data-role="stage-exit"] {
  order: -1 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 3px !important;
  flex: 0 0 auto !important;
  padding: 6px 14px 6px 9px !important;
  border: 1px solid #c0b6a0 !important;
  border-radius: 999px !important;
  background: rgba(255, 255, 255, 0.82) !important;
  color: #3d3629 !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
}
app-premium-concepts-screen.path-stage-interior .path-tab-header [data-role="stage-exit"]::before {
  content: "\2039" !important;
  font-size: 1.15rem !important;
  line-height: 1 !important;
}
app-premium-concepts-screen.path-stage-interior .path-tab-header .support-coin-badge {
  flex: 0 0 auto !important;
  width: auto !important;
  align-self: center !important;
}

/* Banner progress bar (Figma: full-width thin bar between title and the
   lessons/status row). */
.path-stage-banner-progress {
  display: block;
  width: 100%;
  height: 4px;
  margin: 7px 0 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}
.path-stage-banner-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  /* Figma: green→gold gradient fill on the banner progress bar. */
  background: linear-gradient(90deg, #7fd9a8 0%, #f5d98a 100%);
}
.path-stage-banner-ember .path-stage-banner-progress-fill {
  background: linear-gradient(90deg, #f6b27a 0%, #f5d98a 100%);
}

/* Activity pills — exact Figma dims: 50px tall, radius 24, white, 1px #e8e3db,
   pad 10/12, 12px icon gap, 14px/600 label. */
app-premium-concepts-screen.path-stage-interior .stage-path-step {
  min-height: 50px !important;
  padding: 10px 14px !important;
  gap: 12px !important;
  border-radius: 24px !important;
  border: 1px solid #e8e3db !important;
  background: #ffffff !important;
  box-shadow: none !important;
}
app-premium-concepts-screen.path-stage-interior .stage-path-step-title {
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: #1f1a14 !important;
}
app-premium-concepts-screen.path-stage-interior .stage-path-steps {
  gap: 8px !important;
}
/* Pill icons: neutral #f0ece6 circle + dark glyph for every state (Figma shows
   activity state on the spine node, not on the pill icon). Exported SVGs carry
   their own matching circle, so they sit seamlessly on the marker. */
app-premium-concepts-screen.path-stage-interior .stage-path-step-marker {
  width: 28px !important;
  height: 28px !important;
  background: #f0ece6 !important;
  box-shadow: none !important;
  color: #1f1a14 !important;
}
app-premium-concepts-screen.path-stage-interior .stage-path-step-marker .step-type-icon-img {
  width: 28px !important;
  height: 28px !important;
  display: block !important;
}

/* Interior spacing to match Figma: 20px between lessons, 8px within a lesson,
   and a flat/compact concept header (no oversized gradient card). */
app-premium-concepts-screen.path-stage-interior .stage-path {
  gap: 20px !important;
  padding: 4px 0 8px !important;
}
app-premium-concepts-screen.path-stage-interior .stage-path-cluster {
  gap: 8px !important;
  margin: 0 !important;
  padding-left: 38px !important;
  align-content: start !important;
}
app-premium-concepts-screen.path-stage-interior .stage-path-cluster-header,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.current .stage-path-cluster-header,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.path-next-location .stage-path-cluster-header {
  /* Flex (not grid) so the row can't stretch to a fixed tall height — header
     hugs its content (~42px, matching Figma). */
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 4px 12px 4px 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  height: auto !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
}
app-premium-concepts-screen.path-stage-interior .stage-path-cluster-copy {
  flex: 1 1 auto !important;
  align-self: center !important;
  min-height: 0 !important;
  height: auto !important;
  /* Flex column so the label + title hug their content instead of stretching
     into tall grid rows. */
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 1px !important;
}
app-premium-concepts-screen.path-stage-interior .stage-path-cluster-marker,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster-meta,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster-status {
  flex: 0 0 auto !important;
}
/* Single-line header (Figma 109:3965): "N Concept (abbr)" takes the row,
   the status word sits right-aligned. */
app-premium-concepts-screen.path-stage-interior .stage-path-cluster-title {
  flex: 1 1 auto !important;
  font-size: 1rem !important;
  line-height: 1.25 !important;
  margin: 0 !important;
}
/* The label/title are <p> elements — kill default browser margins that were
   spreading them apart and inflating the header to ~90px. */
app-premium-concepts-screen.path-stage-interior .stage-path-cluster-label {
  margin: 0 !important;
}
/* Inline node number before the concept name. */
app-premium-concepts-screen.path-stage-interior .stage-path-cluster-num {
  margin-right: 8px !important;
  color: #8a7a5e !important;
  font-weight: 700 !important;
}
/* Right-aligned DONE / START HERE / LOCKED status word. */
app-premium-concepts-screen.path-stage-interior .stage-path-cluster-status {
  font-size: 0.6875rem !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #9a8a6e !important;
}
app-premium-concepts-screen.path-stage-interior .stage-path-cluster-status.completed {
  color: #3f9d6b !important;
}
app-premium-concepts-screen.path-stage-interior .stage-path-cluster-status.current {
  color: #d4621a !important;
}
app-premium-concepts-screen.path-stage-interior.path-guide-momo .stage-path-cluster-status.current {
  color: #4f8a3d !important;
}
app-premium-concepts-screen.path-stage-interior .stage-path-cluster-status.locked {
  color: #b3a489 !important;
}

.question-screen {
  background: var(--bg);
}

.question-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 22px;
  background: transparent;
  max-width: 720px;
  text-align: left;
  scroll-padding-bottom: calc(32px + env(safe-area-inset-bottom));
}

h1,
.question-text,
.large-text,
.medium-text {
  margin: 0;
  line-height: 1.28;
}

h1 {
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.brand-lockup {
  display: grid;
  gap: 6px;
}

.home-greeting {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.3rem, 6vw, 2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.home-guide-message {
  max-width: 34rem;
  color: #6c5841;
  font-weight: 600;
}

.home-dashboard .home-greeting {
  color: #1f1410;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.home-dashboard .home-greeting-name {
  display: none;
}

.home-dashboard [data-role="home-greeting-name"] {
  color: #a85a2a;
  font-size: 1.875rem;
  line-height: 1.25;
}

.home-theme-momo [data-role="home-greeting-name"] {
  color: #1a5c38;
}

/* Greeting period + icon flow as inline text (Figma 234-4684); name drops
   below. Inline keeps the weather icon glued to the period words when the
   column is narrow, instead of floating to the right edge. */
.home-greeting-period-row {
  display: block;
}

.home-greeting-icon {
  margin-left: 5px;
  color: #1f1410;
  font-size: 1.1rem;
  line-height: 1;
  white-space: nowrap;
}

.home-dashboard-header .support-coin-badge {
  align-self: end;
  margin-bottom: 54px;
  border-color: #e8c4a0;
  background: #fff8f0;
  color: #a85a2a;
  box-shadow: none;
}

.home-theme-momo .home-dashboard-header .support-coin-badge {
  border-color: #f0c84a;
  background: #fff8e6;
  color: #b07a10;
}

.large-text {
  font-size: 1.3rem;
}

.medium-text {
  font-size: 1.08rem;
}

.small-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.small-width {
  max-width: 34ch;
}

.micro-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
  letter-spacing: 0.04em;
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.daily-practice-layout {
  justify-content: center;
}

.daily-mode-icon {
  flex: 0 0 auto;
}

.daily-progressbar {
  display: block;
}

.daily-continue {
  width: 100%;
  font-weight: 750;
}

.question-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.58rem;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.01em;
  max-width: 34ch;
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.choice {
  width: 100%;
  min-height: 54px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  border-radius: 14px;
  line-height: 1.35;
  font-size: 1rem;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.choice:active,
.choice:focus-visible {
  background: var(--selected);
  outline: none;
}

.choice.selected {
  border-color: var(--green);
  background: var(--selected);
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(76, 175, 132, 0.16);
}

.choice.selected.incorrect {
  border-color: var(--coffee);
  background: rgba(217, 107, 107, 0.1);
  box-shadow: 0 0 0 3px rgba(217, 107, 107, 0.18);
}

.choice[disabled] {
  opacity: 1;
  cursor: default;
}

.choice.dense-choice {
  min-height: auto;
  padding-block: 12px;
  line-height: 1.4;
}

.button {
  min-width: 180px;
  min-height: 50px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.button:disabled {
  opacity: 0.55;
}

.button-primary {
  border-color: var(--green);
  background: var(--green);
  color: #ffffff;
}

.button-secondary {
  background: #f3f4f6;
  color: var(--text);
}

.button:focus-visible {
  outline: 2px solid rgba(76, 175, 132, 0.25);
  outline-offset: 2px;
}

.utility-reset {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  opacity: 0.35;
}

.utility-row {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

.utility-link {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
}

.input {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.error-text {
  margin: 0;
  color: #8a2e2e;
  font-size: 0.88rem;
}

.status-text {
  margin: 0;
  max-width: 32ch;
  color: #8a5a28;
  font-size: 0.88rem;
  line-height: 1.4;
}

.streak-strip {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.streak-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
}

.streak-dot.active {
  background: var(--text);
  border-color: var(--text);
}

.results-cups {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.result-cup {
  display: inline-flex;
  width: 28px;
  height: 24px;
  align-items: center;
  justify-content: center;
}

.cup-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cup-stroke,
.cup-handle,
.cup-rim {
  fill: none;
  stroke: var(--charcoal);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.result-cup.matcha .cup-stroke {
  fill: var(--green);
}

.result-cup.coffee .cup-stroke {
  fill: var(--coffee);
}

@keyframes cupReveal {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.82);
  }
  58% {
    opacity: 1;
    transform: translateY(-3px) scale(1.05);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.feedback-state {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 500;
}

.feedback-state.correct {
  color: var(--green);
}

.feedback-state.incorrect {
  color: var(--coffee);
}

.feedback-tag-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.takeaway {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 30ch;
}

.review-layout {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  max-width: 720px;
}

.review-copy {
  display: grid;
  gap: 4px;
}

.review-items {
  display: grid;
  gap: 12px;
}

.review-item {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.review-item-number,
.review-item-question {
  margin: 0 0 8px;
}

.review-item-number {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.review-item-question {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  line-height: 1.45;
}

.screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.premium-layout {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 20px;
  max-width: 680px;
}

.path-tab-layout {
  isolation: isolate;
  overflow-x: hidden;
  min-height: 0;
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: calc(128px + env(safe-area-inset-bottom));
  border-inline: 1px solid rgba(255, 255, 255, 0.38);
  background:
    linear-gradient(180deg, rgba(242, 228, 255, 0.54) 0%, rgba(225, 239, 250, 0.58) 18%, rgba(248, 244, 235, 0.82) 58%, rgba(246, 250, 247, 0.96) 100%),
    radial-gradient(circle at 78% 9%, rgba(126, 93, 186, 0.26), transparent 31%),
    radial-gradient(circle at 14% 28%, rgba(76, 175, 132, 0.16), transparent 28%),
    #f6f7f4;
}

.path-tab-layout::-webkit-scrollbar {
  display: none;
}

.path-layer {
  position: relative;
}

.path-environment-layer {
  z-index: 0;
}

.path-interactive-overlay-layer {
  z-index: 1;
}

.path-functional-ui-layer {
  z-index: 2;
}

app-premium-concepts-screen.screen.active {
  height: 100dvh;
  overflow: hidden;
}

app-premium-concepts-screen.path-overview .path-tab-layout {
  max-width: 430px;
  padding: 24px 16px 104px;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 230, 196, 0.28), transparent 16%),
    radial-gradient(circle at 78% 23%, rgba(189, 144, 242, 0.32), transparent 18%),
    radial-gradient(circle at 24% 52%, rgba(74, 198, 124, 0.18), transparent 22%),
    linear-gradient(180deg, #9eb9ee 0%, #8aa1cf 13%, #6f7fa4 32%, #4d607b 58%, #2f4057 82%, #243347 100%);
}

.path-tab-header {
  align-items: flex-start;
  padding: 4px 2px 0;
}

app-premium-concepts-screen.path-overview .path-tab-header {
  position: relative;
  z-index: 4;
  align-items: center;
  min-height: 54px;
  padding: 2px 4px 0;
  color: #111827;
}

app-premium-concepts-screen.path-overview .premium-copy {
  gap: 0;
}

app-premium-concepts-screen.path-overview .premium-copy .eyebrow,
app-premium-concepts-screen.path-overview .premium-copy .small-text {
  display: none;
}

app-premium-concepts-screen.path-overview .premium-copy h1 {
  color: #0f172a;
  font-size: 1.78rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.34);
}

app-premium-concepts-screen.path-overview .premium-copy h1::after {
  content: " paw";
  display: inline-block;
  margin-left: 4px;
  color: transparent;
  width: 18px;
  height: 18px;
  border-radius: 58% 58% 52% 52%;
  background:
    radial-gradient(circle at 30% 18%, #0f172a 0 2px, transparent 3px),
    radial-gradient(circle at 50% 10%, #0f172a 0 2px, transparent 3px),
    radial-gradient(circle at 70% 18%, #0f172a 0 2px, transparent 3px),
    radial-gradient(circle at 50% 62%, #0f172a 0 6px, transparent 7px);
  vertical-align: 6px;
}

app-premium-concepts-screen.path-overview .path-dialogue {
  display: none;
}

.path-tab-layout > :not(.path-atmosphere) {
  position: relative;
  z-index: 1;
}

.path-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.path-atmosphere::before {
  content: "";
  position: absolute;
  inset: -20% -18% auto;
  height: 44%;
  background:
    radial-gradient(circle at 22% 38%, rgba(255, 255, 255, 0.72), transparent 18%),
    radial-gradient(circle at 70% 22%, rgba(255, 211, 150, 0.38), transparent 22%),
    linear-gradient(180deg, rgba(83, 91, 146, 0.22), transparent);
  filter: blur(2px);
}

.path-atmosphere-orb {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.62) 0%, rgba(217, 178, 76, 0.14) 38%, transparent 68%);
  opacity: 0.78;
}

.path-atmosphere-orb.orb-one {
  top: 88px;
  right: -72px;
}

.path-atmosphere-orb.orb-two {
  top: 510px;
  left: -86px;
  background: radial-gradient(circle, rgba(234, 255, 245, 0.72) 0%, rgba(76, 175, 132, 0.15) 34%, transparent 70%);
}

.path-atmosphere-skyline {
  position: absolute;
  top: 86px;
  left: 0;
  right: 0;
  height: 190px;
  opacity: 0.22;
  background:
    linear-gradient(to top, rgba(54, 63, 83, 0.26) 0 44%, transparent 44%) 5% 100% / 38px 92px no-repeat,
    linear-gradient(to top, rgba(54, 63, 83, 0.22) 0 54%, transparent 54%) 25% 100% / 52px 124px no-repeat,
    linear-gradient(to top, rgba(54, 63, 83, 0.18) 0 62%, transparent 62%) 52% 100% / 44px 148px no-repeat,
    linear-gradient(to top, rgba(54, 63, 83, 0.2) 0 48%, transparent 48%) 78% 100% / 60px 106px no-repeat;
  filter: blur(0.4px);
}

.path-atmosphere::after {
  content: "GT";
  position: absolute;
  right: 24px;
  top: 132px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(217, 178, 76, 0.34);
  border-radius: 999px;
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.78), transparent 35%),
    linear-gradient(145deg, rgba(255, 246, 220, 0.62), rgba(74, 52, 31, 0.08));
  color: rgba(74, 52, 31, 0.44);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 14px 30px rgba(36, 50, 69, 0.1);
}

.premium-copy {
  display: grid;
  gap: 6px;
}

.premium-list {
  display: grid;
  gap: 10px;
}

.next-up-hero {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 12%, rgba(217, 178, 76, 0.22), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(246, 253, 249, 0.84) 100%);
  box-shadow: 0 20px 46px rgba(36, 50, 69, 0.12);
  backdrop-filter: blur(14px);
}

.path-paywall {
  padding: 14px 16px;
  border: 1px solid #dfeee7;
  border-radius: 18px;
  background: #f8fcfa;
}

app-premium-concepts-screen.path-locked .next-up-button {
  display: none;
}

app-premium-concepts-screen.path-locked .pathway-stages {
  opacity: 0.82;
}

app-premium-concepts-screen.path-locked .learning-path-stage-header {
  cursor: default;
}

.next-up-copy {
  display: grid;
  gap: 8px;
}

.next-up-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.next-up-button {
  justify-self: start;
  padding: 10px 16px;
  border: 1px solid rgba(76, 175, 132, 0.92);
  border-radius: 999px;
  background: linear-gradient(180deg, #55ba8d 0%, #449a76 100%);
  color: #ffffff;
  font: inherit;
  box-shadow: 0 12px 22px rgba(76, 175, 132, 0.24);
}

.next-up-button:hover {
  background: #449a76;
  border-color: #449a76;
}

.next-up-button:focus-visible {
  outline: 2px solid rgba(76, 175, 132, 0.25);
  outline-offset: 2px;
}

.pathway-stages {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 4px 0 6px;
}

app-premium-concepts-screen.path-stage-interior .pathway-stages {
  gap: 12px;
}

app-premium-concepts-screen.path-stage-interior .learning-path-stage:not(.expanded) {
  display: none;
}

app-premium-concepts-screen.path-overview .stage-path,
app-premium-concepts-screen.path-overview .learning-path-sections-preview {
  display: none;
}

app-premium-concepts-screen.path-overview .learning-path-stage {
  position: absolute;
  z-index: 2;
  width: min(72%, 310px);
  padding: 0;
}

app-premium-concepts-screen.path-overview .learning-path-stage:nth-child(odd) {
  padding-right: 0;
}

app-premium-concepts-screen.path-overview .learning-path-stage:nth-child(even) {
  padding-left: 0;
}

app-premium-concepts-screen.path-overview .learning-path-stage-header {
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 999px;
  overflow: hidden;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  box-shadow:
    0 16px 34px rgba(16, 24, 40, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

app-premium-concepts-screen.path-overview .learning-path-stage-node {
  width: 48px;
  height: 48px;
  color: #ffffff;
  font-size: 1.16rem;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.54),
    0 10px 20px rgba(16, 24, 40, 0.2);
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed .learning-path-stage-node,
app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-node {
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.52), transparent 30%),
    linear-gradient(180deg, #71c99b 0%, #4caf84 100%);
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-node {
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.46), transparent 30%),
    linear-gradient(180deg, #a8aeb9 0%, #787f8b 100%);
  color: rgba(255, 255, 255, 0.86);
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="sentence_boundaries"] .learning-path-stage-node {
  background: linear-gradient(180deg, #7cbce7 0%, #4f91c6 100%);
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="core_punctuation"] .learning-path-stage-node {
  background: linear-gradient(180deg, #7dc878 0%, #579c59 100%);
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="grammar_rules"] .learning-path-stage-node {
  background: linear-gradient(180deg, #b075e1 0%, #7e49ba 100%);
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="rhetoric_clarity"] .learning-path-stage-node {
  background: linear-gradient(180deg, #e46fa5 0%, #b24678 100%);
}

app-premium-concepts-screen.path-overview .learning-path-stage-copy {
  gap: 0;
}

app-premium-concepts-screen.path-overview .learning-path-stage-district {
  color: #111827;
  font-size: 0.94rem;
  line-height: 1.18;
}

app-premium-concepts-screen.path-overview .learning-path-stage-title {
  color: #111827;
  font-size: 0.74rem;
  font-weight: 500;
}

app-premium-concepts-screen.path-overview .pathway-stage-status {
  min-width: 26px;
  width: 28px;
  height: 28px;
  padding: 0;
  overflow: hidden;
  color: transparent;
  border-color: rgba(255, 255, 255, 0.56);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.9), transparent 34%),
    rgba(245, 247, 250, 0.82);
}

app-premium-concepts-screen.path-overview .pathway-stage-status::before {
  content: "›";
  color: rgba(17, 24, 39, 0.62);
  font-size: 1.25rem;
  line-height: 1;
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .pathway-stage-status::before {
  content: "⌕";
  font-size: 0.84rem;
}

app-premium-concepts-screen.path-overview .learning-path-stage::before {
  inset: auto;
  left: 50%;
  bottom: -70px;
  width: min(146%, 390px);
  height: 184px;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 22%, rgba(255, 241, 208, 0.42), transparent 42%),
    radial-gradient(ellipse at 50% 64%, rgba(32, 44, 62, 0.4), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(20, 32, 47, 0.18));
  box-shadow:
    0 38px 70px rgba(11, 18, 29, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  opacity: 1;
}

app-premium-concepts-screen.path-overview .learning-path-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: -38px;
  width: min(126%, 320px);
  height: 112px;
  transform: translateX(-50%);
  border-radius: 40% 40% 48% 48%;
  background:
    linear-gradient(to top, rgba(24, 37, 53, 0.34) 0 48%, transparent 48%) 8% 100% / 24px 58px no-repeat,
    linear-gradient(to top, rgba(24, 37, 53, 0.24) 0 68%, transparent 68%) 34% 100% / 32px 78px no-repeat,
    linear-gradient(to top, rgba(24, 37, 53, 0.32) 0 58%, transparent 58%) 68% 100% / 38px 66px no-repeat,
    radial-gradient(ellipse at 50% 100%, rgba(255, 207, 130, 0.22), transparent 62%);
  opacity: 0.72;
  pointer-events: none;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="sentence_foundations"]::before {
  background:
    radial-gradient(ellipse at 44% 18%, rgba(255, 238, 180, 0.46), transparent 42%),
    radial-gradient(ellipse at 50% 64%, rgba(40, 93, 58, 0.34), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(36, 74, 53, 0.22));
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="sentence_boundaries"]::before {
  background:
    radial-gradient(ellipse at 52% 18%, rgba(197, 235, 255, 0.48), transparent 42%),
    radial-gradient(ellipse at 50% 64%, rgba(44, 85, 121, 0.35), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(28, 58, 91, 0.22));
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="core_punctuation"]::before {
  background:
    radial-gradient(ellipse at 48% 18%, rgba(190, 255, 204, 0.46), transparent 42%),
    radial-gradient(ellipse at 50% 64%, rgba(42, 97, 58, 0.35), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(41, 92, 52, 0.23));
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="grammar_rules"]::before {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(229, 203, 255, 0.5), transparent 42%),
    radial-gradient(ellipse at 50% 64%, rgba(73, 50, 105, 0.35), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(60, 44, 96, 0.22));
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="rhetoric_clarity"]::before {
  background:
    radial-gradient(ellipse at 50% 16%, rgba(255, 225, 246, 0.48), transparent 42%),
    radial-gradient(ellipse at 50% 64%, rgba(75, 61, 112, 0.35), transparent 68%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(58, 50, 105, 0.22));
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="rhetoric_clarity"] {
  top: 34px;
  left: 4px;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="grammar_rules"] {
  top: 320px;
  right: 2px;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="core_punctuation"] {
  top: 562px;
  left: 0;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="sentence_boundaries"] {
  top: 826px;
  left: 8px;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="sentence_foundations"] {
  top: 1088px;
  right: 0;
}

app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-header {
  box-shadow:
    0 0 0 1px rgba(76, 175, 132, 0.12),
    0 24px 52px rgba(76, 175, 132, 0.18),
    0 16px 38px rgba(36, 50, 69, 0.12);
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-header {
  filter: saturate(0.75);
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed .learning-path-stage-header {
  opacity: 0.82;
}

app-premium-concepts-screen.path-overview .path-dialogue {
  border-color: rgba(217, 178, 76, 0.28);
  background:
    radial-gradient(circle at 92% 18%, rgba(217, 178, 76, 0.12), transparent 28%),
    rgba(255, 255, 255, 0.72);
}

app-premium-concepts-screen.path-overview .pathway-stages {
  display: block;
  min-height: 1320px;
  padding-top: 0;
}

.path-world-route {
  display: none;
}

app-premium-concepts-screen.path-overview .path-world-route {
  position: absolute;
  inset: 0 0 auto;
  z-index: 1;
  display: block;
  width: 100%;
  height: 1320px;
  overflow: visible;
  pointer-events: none;
}

.path-world-route-halo,
.path-world-route-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.path-world-route-halo {
  stroke: rgba(126, 245, 232, 0.26);
  stroke-width: 18;
  filter: url("#path-route-glow");
}

.path-world-route-line {
  stroke: rgba(214, 255, 235, 0.9);
  stroke: url("#path-world-gradient");
  stroke-width: 5;
  filter: url("#path-route-glow");
}

.path-world-waypoint {
  fill: rgba(255, 255, 255, 0.72);
  stroke: rgba(217, 255, 230, 0.92);
  stroke-width: 4;
  filter: url("#path-route-glow");
}

/* Pathway composition pass 1: preserve structure before final atmosphere. */
app-premium-concepts-screen.path-overview .path-tab-layout {
  max-width: 430px;
  padding: 24px 16px 104px;
  background: linear-gradient(180deg, #d7dde8 0%, #b5becb 34%, #909cae 68%, #748091 100%);
}

app-premium-concepts-screen.path-overview .path-atmosphere {
  display: none;
}

app-premium-concepts-screen.path-overview .pathway-stages {
  min-height: 1280px;
}

app-premium-concepts-screen.path-overview .pathway-stages::before,
app-premium-concepts-screen.path-overview .pathway-stages::after {
  display: none;
}

app-premium-concepts-screen.path-overview .path-world-route {
  height: 1280px;
}

app-premium-concepts-screen.path-overview .path-world-route-halo {
  display: none;
}

app-premium-concepts-screen.path-overview .path-world-route-line {
  stroke: rgba(255, 255, 255, 0.76);
  stroke-width: 6;
  filter: none;
}

app-premium-concepts-screen.path-overview .path-world-waypoint {
  fill: rgba(255, 255, 255, 0.84);
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 5;
  filter: none;
}

app-premium-concepts-screen.path-overview .learning-path-stage {
  width: min(68%, 284px);
}

app-premium-concepts-screen.path-overview .learning-path-stage-header {
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(246, 244, 238, 0.84) !important;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.18);
}

app-premium-concepts-screen.path-overview .learning-path-district-scene {
  display: none;
}

app-premium-concepts-screen.path-overview .learning-path-stage::before {
  bottom: -78px;
  width: min(160%, 388px);
  height: 182px;
  background: rgba(35, 45, 58, 0.28) !important;
  box-shadow: 0 24px 48px rgba(16, 24, 40, 0.2);
}

app-premium-concepts-screen.path-overview .learning-path-stage::after {
  bottom: -42px;
  width: min(132%, 324px);
  height: 112px;
  background:
    linear-gradient(to top, rgba(28, 37, 49, 0.42) 0 50%, transparent 50%) 8% 100% / 24px 58px no-repeat,
    linear-gradient(to top, rgba(28, 37, 49, 0.34) 0 68%, transparent 68%) 36% 100% / 32px 78px no-repeat,
    linear-gradient(to top, rgba(28, 37, 49, 0.4) 0 58%, transparent 58%) 70% 100% / 38px 66px no-repeat;
  opacity: 0.84;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="rhetoric_clarity"] {
  top: 52px;
  left: 2px;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="grammar_rules"] {
  top: 318px;
  right: 0;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="core_punctuation"] {
  top: 548px;
  left: 0;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="sentence_boundaries"] {
  top: 802px;
  left: 2px;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="sentence_foundations"] {
  top: 1068px;
  right: 0;
}

app-premium-concepts-screen.path-overview .learning-path-stage-node {
  width: 48px;
  height: 48px;
  background: #7f8793 !important;
  color: #ffffff;
  box-shadow: none;
}

app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-node {
  background: #5f956f !important;
}

app-premium-concepts-screen.path-overview .pathway-stages::before {
  inset: 0;
  width: auto;
  transform: none;
  border-radius: 0;
  background:
    radial-gradient(circle at 18% 11%, rgba(255, 255, 255, 0.35), transparent 9%),
    radial-gradient(circle at 78% 24%, rgba(255, 222, 165, 0.22), transparent 12%),
    radial-gradient(circle at 18% 49%, rgba(86, 211, 152, 0.15), transparent 15%),
    radial-gradient(circle at 72% 72%, rgba(91, 173, 236, 0.14), transparent 16%),
    linear-gradient(180deg, rgba(67, 93, 141, 0.08), rgba(33, 45, 63, 0.04));
  box-shadow: none;
}

app-premium-concepts-screen.path-overview .pathway-stages::after {
  display: none;
}

.pathway-stages::before {
  content: "";
  position: absolute;
  top: 26px;
  bottom: 42px;
  left: 18px;
  width: 3px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(217, 178, 76, 0.25), rgba(76, 175, 132, 0.42), rgba(96, 130, 180, 0.2)),
    rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 20px rgba(76, 175, 132, 0.16);
  pointer-events: none;
}

.pathway-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.pathway-stage.disabled {
  cursor: default;
}

.pathway-stage-rail {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 16px;
}

.pathway-stage-node {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.stage-icon {
  width: 16px;
  height: 16px;
  display: block;
}

.stage-icon-circle {
  fill: var(--surface);
  stroke: var(--charcoal);
  stroke-width: 1.5;
}

.stage-icon-mark {
  fill: none;
  stroke: var(--charcoal);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stage-icon-lock {
  fill: none;
  stroke: var(--gray);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Adaptive Review marker star (Figma 109:3965 shows a purple star). */
.stage-icon-star-mark {
  fill: #8a7ff0;
  stroke: none;
}

.pathway-stage-card {
  min-width: 0;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.pathway-stage:not(.disabled):hover .pathway-stage-card {
  border-color: #d1d5db;
  background: #fcfcfd;
}

.pathway-stage:focus-visible {
  outline: none;
}

.pathway-stage:focus-visible .pathway-stage-card {
  outline: 2px solid rgba(76, 175, 132, 0.25);
  outline-offset: 2px;
}

.pathway-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.pathway-stage-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.pathway-stage-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.pathway-stage-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f9fafb;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

.pathway-stage-time {
  color: var(--muted);
}

.pathway-stage-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.pathway-stage-progressbar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #edf1f5;
  overflow: hidden;
}

.pathway-stage-progressfill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #cbd5e1;
}

.pathway-stage.completed .pathway-stage-node {
  border-color: var(--green);
  background: var(--selected);
}

.pathway-stage.completed .stage-icon-circle {
  fill: var(--selected);
  stroke: var(--green);
}

.pathway-stage.completed .stage-icon-mark {
  stroke: var(--green);
}

.pathway-stage.completed .pathway-stage-card {
  border-color: #cfe7dc;
}

.pathway-stage.completed .pathway-stage-status {
  border-color: #cfe7dc;
  background: var(--selected);
  color: var(--green);
}

.pathway-stage.completed .pathway-stage-progressfill {
  background: var(--green);
}

.pathway-stage.current .pathway-stage-node {
  border-color: var(--green);
  background: var(--selected);
}

.pathway-stage.current .stage-icon-circle {
  fill: var(--selected);
  stroke: var(--green);
}

.pathway-stage.current .stage-icon-mark {
  fill: var(--green);
  stroke: none;
}

.pathway-stage.current .pathway-stage-card {
  border-color: #cfe7dc;
  background: #f8fcfa;
}

.pathway-stage.current .pathway-stage-status {
  border-color: #cfe7dc;
  background: var(--selected);
  color: var(--green);
}

.pathway-stage.current .pathway-stage-progressfill {
  background: var(--green);
}

.pathway-stage.locked .pathway-stage-node {
  border-color: var(--line);
  background: #f9fafb;
}

.pathway-stage.locked .stage-icon-circle {
  fill: #f9fafb;
  stroke: var(--gray);
}

.pathway-stage.locked .pathway-stage-card {
  background: #f9fafb;
  opacity: 0.82;
}

.pathway-stage.locked .pathway-stage-status {
  background: #f3f4f6;
}

.pathway-stage.locked .pathway-stage-progressfill {
  background: #d1d5db;
}

.learning-path-stage {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 12px 0 24px;
}

.learning-path-stage + .learning-path-stage {
  border-top: 0;
  padding-top: 18px;
}

.learning-path-stage::before {
  content: "";
  position: absolute;
  inset: 2px 0 auto 44px;
  height: 86px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 16%, rgba(255, 255, 255, 0.52), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.12));
  opacity: 0.72;
  pointer-events: none;
}

.learning-path-stage-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(250, 246, 238, 0.78) 100%);
  box-shadow: 0 16px 38px rgba(36, 50, 69, 0.11);
  backdrop-filter: blur(15px);
  text-align: left;
  color: inherit;
}

.learning-path-district-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}

.district-architecture {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
  height: 76%;
  opacity: 0.32;
  background:
    linear-gradient(to top, rgba(49, 62, 82, 0.32) 0 54%, transparent 54%) 6% 100% / 18px 72px no-repeat,
    linear-gradient(to top, rgba(49, 62, 82, 0.22) 0 72%, transparent 72%) 34% 100% / 24px 92px no-repeat,
    linear-gradient(to top, rgba(49, 62, 82, 0.28) 0 62%, transparent 62%) 64% 100% / 28px 82px no-repeat,
    radial-gradient(ellipse at 75% 34%, rgba(49, 62, 82, 0.24) 0 28%, transparent 30%);
}

.district-light {
  position: absolute;
  inset: auto 10px 8px auto;
  width: 90px;
  height: 90px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 232, 177, 0.38), transparent 66%);
  filter: blur(1px);
}

.learning-path-stage-header > :not(.learning-path-district-scene) {
  position: relative;
  z-index: 1;
}

.learning-path-stage-header:disabled {
  cursor: default;
}

.learning-path-stage-rail {
  display: flex;
  justify-content: center;
  padding-top: 0;
}

.learning-path-stage-node {
  display: grid;
  place-items: center;
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.92), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #eef2f4 100%);
  color: var(--muted);
  box-shadow: inset 0 -5px 10px rgba(33, 43, 54, 0.08), 0 10px 22px rgba(36, 50, 69, 0.14);
}

.learning-path-stage-number {
  display: grid;
  place-items: center;
  color: currentColor;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1;
}

.learning-path-stage-node .stage-icon {
  display: none;
}

.learning-path-stage.current .learning-path-stage-node,
.learning-path-stage.expanded .learning-path-stage-node {
  border-color: rgba(142, 227, 192, 0.78);
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.94), transparent 32%),
    linear-gradient(180deg, #73c99e 0%, #4caf84 100%);
  color: #ffffff;
  box-shadow: 0 0 0 5px rgba(76, 175, 132, 0.14), 0 14px 26px rgba(76, 175, 132, 0.24);
}

.learning-path-stage.completed .learning-path-stage-node {
  border-color: rgba(207, 231, 220, 0.86);
  background: linear-gradient(180deg, #f6fbf8 0%, #e2f3eb 100%);
  color: var(--green);
}

.learning-path-stage.locked .learning-path-stage-node {
  background: linear-gradient(180deg, #f7f8fa 0%, #e9edf2 100%);
  color: #9aa5b1;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="sentence_foundations"] .learning-path-stage-header {
  background:
    radial-gradient(circle at 86% 16%, rgba(255, 222, 158, 0.34), transparent 31%),
    radial-gradient(circle at 12% 82%, rgba(76, 175, 132, 0.16), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(248, 242, 223, 0.8));
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="sentence_boundaries"] .learning-path-stage-header {
  background:
    radial-gradient(circle at 84% 14%, rgba(123, 196, 235, 0.28), transparent 31%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(231, 244, 251, 0.78));
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="core_punctuation"] .learning-path-stage-header {
  background:
    radial-gradient(circle at 82% 18%, rgba(128, 213, 154, 0.28), transparent 31%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(235, 248, 235, 0.8));
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="grammar_rules"] .learning-path-stage-header {
  background:
    radial-gradient(circle at 84% 14%, rgba(174, 124, 224, 0.27), transparent 31%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(241, 235, 249, 0.82));
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id="rhetoric_clarity"] .learning-path-stage-header {
  background:
    radial-gradient(circle at 82% 16%, rgba(217, 178, 76, 0.25), transparent 32%),
    radial-gradient(circle at 60% 84%, rgba(118, 144, 222, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(239, 240, 251, 0.82));
}

.learning-path-stage-copy {
  display: grid;
  gap: 3px;
}

.learning-path-stage-district {
  color: rgba(74, 52, 31, 0.72);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.learning-path-stage-title {
  color: var(--text);
  font-size: 1.03rem;
  font-weight: 700;
  line-height: 1.25;
}

.learning-path-stage-description {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.42;
}

.learning-path-stage-meta {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.learning-path-stage.locked {
  opacity: 0.78;
}

.learning-path-stage.expanded {
  margin-block: 4px 10px;
}

.learning-path-stage.expanded::before {
  inset: 4px -8px auto 34px;
  height: 132px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 244, 214, 0.74), transparent 28%),
    radial-gradient(circle at 18% 72%, rgba(76, 175, 132, 0.14), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0.16));
  opacity: 0.9;
}

.learning-path-stage.expanded .learning-path-stage-header {
  padding: 18px 16px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 88% 12%, rgba(217, 178, 76, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(246, 252, 249, 0.86) 100%);
  box-shadow: 0 24px 50px rgba(36, 50, 69, 0.15);
}

.learning-path-stage.collapsed .learning-path-stage-header {
  padding-block: 12px;
  box-shadow: 0 12px 28px rgba(36, 50, 69, 0.08);
}

.learning-path-stage.collapsed.completed .learning-path-stage-header {
  opacity: 0.76;
}

.learning-path-stage.collapsed.locked .learning-path-stage-header {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.62) 0%, rgba(241, 244, 248, 0.58) 100%);
  box-shadow: 0 8px 20px rgba(36, 50, 69, 0.05);
}

.learning-path-stage-progress {
  display: none;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  padding-left: 58px;
}

.learning-path-stage-progressbar {
  margin-left: 58px;
  width: calc(100% - 58px);
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(36, 50, 69, 0.06);
}

.learning-path-stage-progressfill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4caf84, #d9b24c);
}

.learning-path-stage-progressfill.locked {
  opacity: 0.45;
}

.learning-path-sections-preview {
  display: none;
  gap: 6px;
  padding-left: 58px;
}

.learning-path-section-preview {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 22px;
}

.learning-path-section-preview-marker {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.learning-path-section-preview.completed .learning-path-section-preview-marker,
.learning-path-section-preview.current .learning-path-section-preview-marker {
  color: var(--green);
}

.learning-path-section-preview-title {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.learning-path-section-preview.current .learning-path-section-preview-title {
  color: var(--text);
  font-weight: 600;
}

.learning-path-stage.expanded .learning-path-sections-preview {
  display: none;
}

.unified-stage-path {
  margin-left: 6px;
}

@media (max-width: 640px) {
  .path-tab-layout {
    padding-inline: 16px;
  }

  .next-up-hero {
    padding: 16px;
  }

  .pathway-stage {
    gap: 12px;
  }

  .pathway-stage-header {
    flex-direction: column;
  }

  .pathway-stage-meta {
    justify-items: start;
    text-align: left;
  }

  .pathway-stage-progress-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .learning-path-stage-header {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .learning-path-stage-meta {
    grid-column: 2;
    justify-items: start;
  }

  .learning-path-stage-progress,
  .learning-path-stage-progressbar,
  .learning-path-sections-preview {
    margin-left: 0;
    width: 100%;
    padding-left: 42px;
  }

  .unified-stage-path {
    margin-left: 0;
  }

  .stage-path-step:nth-child(odd),
  .stage-path-step:nth-child(even) {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Figma-aligned Path overview timeline. Stage interior styles remain separate. */
app-premium-concepts-screen.path-overview .path-tab-layout {
  max-width: 393px;
  padding: 12px 8px calc(var(--app-nav-clearance) + 8px);
  background: #f2ede4;
  color: #1f1a14;
}

app-premium-concepts-screen.path-overview .path-atmosphere {
  display: none;
}

app-premium-concepts-screen.path-overview .path-tab-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  min-height: 0;
  padding: 14px 12px 8px;
}

app-premium-concepts-screen.path-overview .premium-copy {
  gap: 2px;
}

app-premium-concepts-screen.path-overview .premium-copy .eyebrow {
  display: none;
}

app-premium-concepts-screen.path-overview .premium-copy .small-text {
  display: block;
  color: #6e6354;
  font-size: 14px;
  line-height: 20px;
}

app-premium-concepts-screen.path-overview .premium-copy h1 {
  margin: 0;
  color: #1f1a14;
  font-size: 24px;
  font-weight: 800;
  line-height: 30px;
  letter-spacing: -0.045em;
  text-shadow: none;
}

app-premium-concepts-screen.path-overview .premium-copy h1::after {
  content: none;
}

app-premium-concepts-screen.path-overview .support-coin-badge {
  min-height: 34px;
  margin-top: 4px;
  padding: 7px 11px;
  border-color: #f5d98a;
  background: #fff8e6;
  color: #b07a10;
  box-shadow: none;
}

app-premium-concepts-screen.path-overview .support-coin-icon {
  color: inherit;
}

app-premium-concepts-screen.path-overview [data-role="content"] {
  display: grid;
  gap: 0;
}

app-premium-concepts-screen.path-stage-interior .path-guide-hero {
  display: none;
}

.path-guide-hero {
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
  align-items: end;
  min-height: 160px;
  margin: 0 8px 16px;
  overflow: hidden;
  border: 1px solid #e8c4a0;
  border-radius: 16px;
  background: #f5ede0;
}

.path-guide-hero-momo {
  border-color: #c8c0b0;
  background: #edf2e8;
}

.path-guide-hero-ember {
  border-color: transparent;
  background: transparent;
  background-color: transparent;
}

.path-guide-portrait {
  position: relative;
  height: 150px;
  align-self: end;
  overflow: visible;
  background: transparent;
  background-color: transparent;
}

.path-guide-portrait img,
.path-guide-portrait video {
  position: absolute;
  bottom: 0;
  left: -4px;
  width: 150px;
  height: 150px;
  object-fit: contain;
  object-position: bottom left;
  background: transparent;
  background-color: transparent;
}

.path-guide-portrait video {
  display: block;
  pointer-events: none;
  mix-blend-mode: normal;
  isolation: auto;
}

.path-guide-portrait video[hidden] {
  display: none;
}

.path-guide-copy {
  display: grid;
  gap: 5px;
  align-self: stretch;
  align-content: center;
  padding: 20px 16px;
}

.path-guide-hero-ember .path-guide-copy {
  margin: 10px 10px 10px 0;
  border: 1px solid #e8c4a0;
  border-radius: 16px;
  background: rgba(245, 237, 224, 0.92);
}

.path-guide-name {
  margin: 0;
  color: #c87040;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.path-guide-hero-momo .path-guide-name {
  color: #5a7a4a;
}

.path-guide-message {
  margin: 0;
  color: #1f1a14;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.375;
  letter-spacing: -0.02em;
}

app-premium-concepts-screen.path-overview .path-dialogue,
app-premium-concepts-screen.path-overview .next-up-hero,
app-premium-concepts-screen.path-overview .stage-path,
app-premium-concepts-screen.path-overview .learning-path-sections-preview,
app-premium-concepts-screen.path-overview .learning-path-stage-progress,
app-premium-concepts-screen.path-overview .learning-path-stage-progressbar {
  display: none !important;
}

app-premium-concepts-screen.path-overview .pathway-stages {
  display: grid;
  gap: 0;
  min-height: 0;
  padding: 0 8px;
}

app-premium-concepts-screen.path-overview .pathway-stages::before,
app-premium-concepts-screen.path-overview .pathway-stages::after,
app-premium-concepts-screen.path-overview .learning-path-stage::before,
app-premium-concepts-screen.path-overview .learning-path-stage::after {
  content: none;
  display: none;
}

app-premium-concepts-screen.path-overview .learning-path-stage {
  position: relative;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 1;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-height: 135px;
  padding: 0;
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed {
  min-height: 173px;
}

app-premium-concepts-screen.path-overview .learning-path-stage.current {
  min-height: 141px;
}

app-premium-concepts-screen.path-overview .learning-path-stage-rail {
  position: relative;
  display: flex;
  justify-content: center;
  padding-top: 14px;
}

app-premium-concepts-screen.path-overview .learning-path-stage-rail::after {
  content: "";
  position: absolute;
  top: 44px;
  bottom: 0;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  background: #c8c0b0;
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed .learning-path-stage-rail::after {
  background: var(--path-accent, #8aac76);
}

app-premium-concepts-screen.path-overview .learning-path-stage:last-child .learning-path-stage-rail::after {
  display: none;
}

app-premium-concepts-screen.path-overview .learning-path-stage-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid #b8b0a0;
  border-radius: 999px;
  background: #ddd8cc;
  color: #8b8178;
  font-size: 14px;
  font-weight: 800;
  box-shadow: none;
}

app-premium-concepts-screen.path-guide-momo {
  --path-accent: #8aac76;
  --path-accent-soft: #eef7ea;
  --path-active-border: #8aac76;
  --path-active-shadow: rgba(138, 172, 118, 0.16);
}

app-premium-concepts-screen.path-guide-ember {
  --path-accent: #c87040;
  --path-accent-soft: #fdf4ec;
  --path-active-border: #e8c4a0;
  --path-active-shadow: rgba(200, 112, 64, 0.16);
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed .learning-path-stage-node {
  border-color: var(--path-accent, #8aac76);
  background: var(--path-accent, #8aac76);
  color: #ffffff;
}

app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-node {
  border-color: var(--path-accent, #8aac76);
  background: #ffffff;
  color: var(--path-accent, #8aac76);
}

app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-node::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 5px;
  background: var(--path-accent, #8aac76);
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-node {
  color: transparent;
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-node::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 2px;
  background: linear-gradient(#8b8178, #8b8178) center 7px / 8px 6px no-repeat;
  opacity: 0.65;
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-node::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 9px;
  width: 10px;
  height: 8px;
  border: 1.5px solid rgba(139, 129, 120, 0.7);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}

app-premium-concepts-screen.path-overview .learning-path-stage-header {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 123px;
  margin: 6px 0 12px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #c8c0b0;
  border-radius: 16px;
  background: #f5ede0 !important;
  color: #1f1a14;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  backdrop-filter: none;
}

app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-header {
  border-color: var(--path-active-border, #8aac76);
  background: #ffffff !important;
  box-shadow: 0 4px 18px var(--path-active-shadow, rgba(138, 172, 118, 0.16));
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-header {
  filter: none;
  opacity: 1;
}

app-premium-concepts-screen.path-overview .learning-path-stage-image {
  display: block;
  width: 88px;
  height: 88px;
  overflow: hidden;
  border-radius: 24px;
  background: #e7dfd0;
}

app-premium-concepts-screen.path-overview .learning-path-stage-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.18);
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-image img {
  filter: saturate(0.2);
  opacity: 0.72;
}

app-premium-concepts-screen.path-overview .learning-path-stage-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

app-premium-concepts-screen.path-overview .learning-path-stage-district {
  color: #8b8178;
  font-family: "Inter", "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

app-premium-concepts-screen.path-overview .learning-path-stage-title {
  color: #1f1a14;
  font-size: 15px;
  font-weight: 800;
  line-height: 18.75px;
  letter-spacing: -0.02em;
}

app-premium-concepts-screen.path-overview .learning-path-stage-description {
  display: none;
}

app-premium-concepts-screen.path-overview .learning-path-stage-overview-description {
  display: block;
  padding-top: 2px;
  color: #7a7060;
  font-size: 11px;
  font-weight: 400;
  line-height: 15.13px;
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-title {
  color: #b0a89e;
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-overview-description {
  color: #c0b8b0;
}

app-premium-concepts-screen.path-overview .learning-path-stage-meta {
  display: grid;
  place-items: center;
}

app-premium-concepts-screen.path-overview .pathway-stage-status {
  width: 16px;
  min-width: 16px;
  height: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
}

app-premium-concepts-screen.path-overview .pathway-stage-status::before {
  content: "›";
  color: #a89780;
  font-size: 20px;
  line-height: 1;
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .pathway-stage-status::before,
app-premium-concepts-screen.path-overview .learning-path-stage.completed .pathway-stage-status::before {
  content: "";
}

app-premium-concepts-screen.path-overview .learning-path-stage-overview-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding-top: 7px;
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed .learning-path-stage-overview-progress {
  display: inline-flex;
  justify-content: flex-start;
}

app-premium-concepts-screen.path-overview .learning-path-stage-overview-track {
  display: block;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #ddd8cc;
}

app-premium-concepts-screen.path-overview .learning-path-stage-overview-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--path-accent, #8aac76);
}

app-premium-concepts-screen.path-overview .learning-path-stage-overview-percent {
  color: var(--path-accent, #8aac76);
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed .learning-path-stage-overview-track {
  display: none;
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed .learning-path-stage-overview-percent {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--path-accent-soft, #eef7ea);
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-overview-track {
  display: none;
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-overview-progress {
  display: block;
  padding-top: 5px;
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-overview-percent {
  color: #c0b8b0;
  font-weight: 400;
}

app-premium-concepts-screen.path-overview .bottom-nav {
  width: min(calc(100% - 16px), 393px);
  padding: 9px 12px max(20px, env(safe-area-inset-bottom)) 12px;
  border: 1px solid #e8dfd3;
  border-radius: 0;
  background: #fcf8f2;
  box-shadow: 0 -10px 22px rgba(61, 54, 41, 0.08);
}

app-premium-concepts-screen.path-overview .bottom-nav-item {
  min-height: 52px;
  border-radius: 24px;
  color: #6e6354;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.055em;
}

app-premium-concepts-screen.path-overview .bottom-nav-item.active {
  background: #ffeada;
  color: #d85e1b;
  box-shadow: none;
}

app-premium-concepts-screen.path-overview .bottom-nav-glyph {
  font-family: "Inter", "Segoe UI", sans-serif;
}

.premium-item-meta.current {
  color: var(--text);
}

.premium-item-meta.locked {
  color: var(--muted);
}

.premium-item {
  width: 100%;
  padding: 16px 0;
  border: none;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.premium-item-copy {
  display: grid;
  gap: 6px;
}

.premium-item-title {
  font-size: 1rem;
  line-height: 1.3;
}

.premium-item-meta {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.3;
  white-space: nowrap;
}

.premium-item-meta.mastered {
  color: var(--green);
}

.premium-item-meta.review {
  color: var(--coffee);
}

.premium-rules {
  display: grid;
  gap: 10px;
}

.stage-detail {
  display: grid;
  gap: 18px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.06);
}

.stage-detail .small-text,
.stage-detail .premium-item-meta {
  color: var(--muted);
}

.stage-subsections {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(208px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.stage-subsection-card {
  display: grid;
  gap: 12px;
  min-height: 128px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.stage-subsection-card:not(:disabled),
.stage-activity-row:not(:disabled) {
  cursor: pointer;
}

.stage-subsection-card.selected,
.stage-subsection-card.current {
  border-color: #b7e0ce;
  background: #f8fcfa;
}

.stage-subsection-card.selected {
  border-color: var(--green);
  background: linear-gradient(180deg, #f8fcfa, var(--selected));
  box-shadow: 0 0 0 1px rgba(76, 175, 132, 0.12), 0 14px 26px rgba(17, 24, 39, 0.08);
  transform: translateY(-2px) scale(1.015);
}

.stage-subsection-card.selected .stage-subsection-title {
  color: var(--text);
}

.stage-subsection-card.selected .stage-subsection-number,
.stage-subsection-card.selected .stage-subsection-state,
.stage-subsection-card.selected .premium-item-meta,
.stage-subsection-card.selected .stage-subsection-hint {
  color: var(--muted);
}

.stage-subsection-card.selected .stage-subsection-progressbar {
  background: #dcefe6;
}

.stage-subsection-card.selected .stage-subsection-progressfill {
  box-shadow: 0 0 12px rgba(76, 175, 132, 0.16);
}

.stage-subsection-card.completed {
  border-color: #cfe7dc;
  background: #f6fbf8;
  opacity: 0.9;
}

.stage-subsection-card.completed:not(.selected) .stage-subsection-title {
  color: var(--text);
}

.stage-subsection-card.extra-practice-tile {
  border-style: dashed;
  border-color: #9dd0ba;
  background: linear-gradient(180deg, #f8fcfa, var(--selected));
}

.stage-subsection-card.extra-practice-tile .stage-subsection-number,
.stage-subsection-card.extra-practice-tile .stage-subsection-state,
.stage-subsection-card.extra-practice-tile .premium-item-meta,
.stage-subsection-card.extra-practice-tile .stage-subsection-hint {
  color: var(--muted);
}

.stage-subsection-card.locked {
  opacity: 0.56;
}

.stage-subsection-card:disabled {
  cursor: default;
}

.stage-subsection-card:not(:disabled):hover,
.stage-subsection-card:focus-visible {
  outline: none;
  border-color: #cfd8e3;
  background: #fcfcfd;
}

.stage-subsection-card.selected:not(:disabled):hover,
.stage-subsection-card.selected:focus-visible {
  border-color: var(--green);
  background: linear-gradient(180deg, #f9fdfb, var(--selected));
}

.stage-subsection-head,
.stage-subsection-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.stage-subsection-number,
.stage-subsection-state {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stage-subsection-title {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.3;
}

.stage-subsection-title-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.stage-subsection-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
}

.stage-subsection-title-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.stage-subsection-hint {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.stage-subsection-card.completed .stage-subsection-state,
.stage-subsection-card.completed .stage-subsection-hint {
  color: var(--muted);
}

.stage-subsection-progressbar {
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #edf1f5;
  overflow: hidden;
}

.stage-subsection-progressfill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #cbd5e1;
}

.stage-subsection-progressfill.completed {
  background: var(--green);
}

.stage-subsection-progressfill.current {
  background: var(--green);
}

.stage-subsection-progressfill.locked {
  background: #d1d5db;
}

.stage-selected {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.stage-selected-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.stage-selected-copy {
  display: grid;
  gap: 6px;
}

.stage-selected-meta {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.stage-selected-progress {
  display: grid;
  gap: 8px;
}

.stage-selected-progress-copy {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.stage-selected-progressbar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #edf1f5;
  overflow: hidden;
}

.stage-selected-progressfill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.stage-detail .pathway-stage-status {
  border-color: var(--line);
  background: #f9fafb;
  color: var(--muted);
}

.stage-detail .pathway-stage-status.completed {
  border-color: #cfe7dc;
  background: var(--selected);
  color: var(--green);
}

.stage-detail .pathway-stage-status.current {
  border-color: #cfe7dc;
  background: #f8fcfa;
}

.stage-detail .pathway-stage-status.locked {
  opacity: 0.72;
}

.stage-path {
  position: relative;
  display: grid;
  gap: 20px;
  padding: 10px 0 8px 0;
}

.stage-path::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 12px;
  bottom: 12px;
  width: 3px;
  background:
    linear-gradient(180deg, rgba(217, 178, 76, 0.2), rgba(101, 213, 246, 0.48), rgba(76, 175, 132, 0.32)),
    rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  box-shadow: 0 0 22px rgba(94, 191, 205, 0.26);
}

.stage-path-cluster {
  position: relative;
  display: grid;
  gap: 8px;
  padding-left: 38px;
}

.stage-path-cluster.path-distant-history,
.stage-path-cluster.path-distant-future {
  display: none;
}

.stage-path-cluster.path-near-history,
.stage-path-cluster.path-next-location {
  opacity: 0.72;
}

.stage-path-cluster.path-near-history .stage-path-cluster-label,
.stage-path-cluster.path-next-location .stage-path-cluster-label {
  font-size: 0.66rem;
}

.stage-path-cluster.path-near-history .stage-path-cluster-title,
.stage-path-cluster.path-next-location .stage-path-cluster-title {
  font-size: 0.82rem;
}

.stage-path-cluster.path-next-location {
  opacity: 0.58;
}

.stage-path-cluster.path-next-location .stage-path-cluster-header {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.28);
}

.stage-path-cluster.collapsed {
  gap: 6px;
}

.stage-path-cluster.current {
  gap: 16px;
  margin-block: 8px 14px;
}

.stage-path-cluster-header {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 4px;
  align-items: start;
  padding: 8px 10px 8px 0;
  border-radius: 20px;
}

.stage-path-cluster:not(.current) .stage-path-steps {
  display: none;
}

.stage-path-cluster.current .stage-path-cluster-header {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  padding: 16px 14px 16px 0;
  border-radius: 28px;
  background:
    radial-gradient(circle at 90% 16%, rgba(217, 178, 76, 0.18), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(247, 252, 249, 0.54));
  box-shadow: 0 16px 34px rgba(36, 50, 69, 0.09);
}

.stage-path-cluster-marker {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: -38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: linear-gradient(180deg, #ffffff 0%, #f2f5f7 100%);
  color: var(--muted);
  box-shadow: 0 8px 18px rgba(36, 50, 69, 0.12);
}

.stage-path-cluster.current .stage-path-cluster-marker {
  width: 34px;
  height: 34px;
}

.stage-path-cluster.current .stage-path-cluster-marker {
  border-color: rgba(142, 227, 192, 0.82);
  background: linear-gradient(180deg, #6ec59a 0%, #4caf84 100%);
  color: #ffffff;
  box-shadow: 0 0 0 5px rgba(76, 175, 132, 0.14), 0 14px 26px rgba(76, 175, 132, 0.22);
}

.stage-path-cluster.completed .stage-path-cluster-marker {
  border-color: #cfe7dc;
  background: #f6fbf8;
  color: var(--green);
}

.stage-path-cluster.locked .stage-path-cluster-marker {
  background: #f7f8fa;
  color: #9aa5b1;
}

.stage-path-cluster-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.stage-path-cluster-label {
  color: rgba(74, 52, 31, 0.62);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stage-path-cluster-title {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
}

.stage-path-cluster.current .stage-path-cluster-title {
  font-size: 1.08rem;
  color: #172033;
}

.stage-path-cluster-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stage-path-cluster.completed .stage-path-cluster-title {
  color: #22303b;
}

.stage-path-cluster.completed,
.stage-path-cluster.locked {
  padding-block: 1px;
}

.stage-path-cluster.completed .stage-path-cluster-header,
.stage-path-cluster.locked .stage-path-cluster-header {
  opacity: 0.78;
}

.stage-path-cluster.stage_review {
  margin-top: 6px;
}

.stage-path-cluster.stage_review .stage-path-cluster-marker {
  border-color: #d9dfeb;
  background: #fbfcfe;
}

.stage-path-cluster.stage_review.current .stage-path-cluster-marker,
.stage-path-cluster.stage_review.completed .stage-path-cluster-marker {
  border-color: #cfd8e6;
  background: #f7fafc;
  color: #556273;
}

.stage-path-cluster.locked {
  opacity: 0.54;
}

.stage-path-cluster.locked .stage-path-cluster-meta {
  display: none;
}

.stage-path-steps {
  display: grid;
  gap: 12px;
  padding-top: 0;
}

.stage-path-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  background:
    radial-gradient(circle at 94% 18%, rgba(217, 178, 76, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(250, 249, 244, 0.86) 100%);
  color: var(--text);
  text-align: left;
  box-shadow: 0 14px 30px rgba(36, 50, 69, 0.1);
  backdrop-filter: blur(12px);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.stage-path-step:nth-child(odd) {
  margin-right: 14px;
}

.stage-path-step:nth-child(even) {
  margin-left: 14px;
}

.stage-path-step:disabled {
  cursor: default;
  opacity: 0.56;
}

.stage-path-step:not(:disabled):hover,
.stage-path-step:focus-visible {
  outline: none;
  border-color: rgba(217, 178, 76, 0.34);
  background:
    radial-gradient(circle at 94% 18%, rgba(217, 178, 76, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(250, 249, 244, 0.92) 100%);
  box-shadow: 0 18px 36px rgba(36, 50, 69, 0.14);
  transform: translateY(-1px);
}

.stage-path-step-marker {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(36, 50, 69, 0.06);
}

.stage-path-step.current {
  margin-left: 0;
  margin-right: 0;
  padding: 20px 18px;
  border-color: rgba(142, 227, 192, 0.82);
  background:
    radial-gradient(circle at 92% 16%, rgba(217, 178, 76, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(239, 250, 245, 0.94) 100%);
  box-shadow: 0 0 0 1px rgba(76, 175, 132, 0.1), 0 22px 44px rgba(76, 175, 132, 0.18);
  animation: pathway-current-breathe 4.8s ease-in-out infinite;
}

.stage-path-step.available {
  border-color: rgba(207, 216, 227, 0.8);
  background:
    radial-gradient(circle at 94% 18%, rgba(76, 175, 132, 0.11), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 252, 250, 0.86) 100%);
  box-shadow: 0 14px 30px rgba(36, 50, 69, 0.1);
}

.stage-path-step.completed {
  padding: 9px 11px;
  border-color: rgba(226, 235, 231, 0.78);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 6px 14px rgba(36, 50, 69, 0.05);
}

.stage-path-step.locked {
  padding: 10px 11px;
  border-color: rgba(231, 235, 240, 0.78);
  background: rgba(250, 251, 253, 0.58);
  box-shadow: none;
}

.stage-path-step.current .stage-path-step-marker,
.stage-path-step.available .stage-path-step-marker,
.stage-path-step.completed .stage-path-step-marker {
  color: var(--green);
}

.stage-path-step.current .stage-path-step-marker {
  background: linear-gradient(180deg, #69c397 0%, #4caf84 100%);
  color: #ffffff;
  box-shadow: 0 0 0 5px rgba(76, 175, 132, 0.12), 0 10px 20px rgba(76, 175, 132, 0.2);
}

.stage-path-step-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.stage-path-step-meta,
.stage-path-step-state {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stage-path-step.current .stage-path-step-state {
  color: var(--green);
  font-weight: 600;
}

.stage-path-step-title {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.35;
}

.stage-path-step.current .stage-path-step-title {
  font-size: 1.04rem;
  font-weight: 700;
}

.stage-path-step.available .stage-path-step-title {
  font-weight: 600;
}

.stage-path-step.final-review {
  border-radius: 24px;
}

.stage-path-step.final-review .stage-path-step-marker {
  color: #556273;
}

.stage-path-step.final-review.current {
  background:
    radial-gradient(circle at 90% 16%, rgba(217, 178, 76, 0.24), transparent 30%),
    linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
  border-color: rgba(217, 178, 76, 0.34);
  box-shadow: 0 18px 36px rgba(85, 98, 115, 0.14);
}

.stage-path-step.final-review.completed {
  background: #f8fafc;
  border-color: #dbe3ee;
}

.stage-path-step.final-review.current .stage-path-step-state,
.stage-path-step.final-review.completed .stage-path-step-marker {
  color: #556273;
}

.stage-path-step.completed .stage-path-step-meta,
.stage-path-step.locked .stage-path-step-meta {
  font-size: 0.62rem;
}

.stage-path-step.completed .stage-path-step-state,
.stage-path-step.locked .stage-path-step-state {
  display: none;
}

.stage-path-cluster-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
}

.stage-path-cluster-summary-copy {
  color: var(--muted);
  font-size: 0.84rem;
}

.stage-path-review {
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 600;
}

@keyframes pathway-current-breathe {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(76, 175, 132, 0.1), 0 22px 44px rgba(76, 175, 132, 0.18);
  }

  50% {
    box-shadow: 0 0 0 5px rgba(76, 175, 132, 0.08), 0 24px 48px rgba(76, 175, 132, 0.22);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nook-hint-arrow,
  .stage-path-step.current {
    animation: none;
  }

  .stage-path-step {
    transition: none;
  }
}

.stage-activities {
  display: grid;
  gap: 12px;
}

.stage-activity-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.stage-activity-row.current {
  border-color: #b7e0ce;
  background: #f8fcfa;
}

.stage-activity-row.completed {
  border-color: #cfe7dc;
  background: #f6fbf8;
  opacity: 0.9;
}

.stage-activity-row.locked {
  opacity: 0.5;
}

.stage-activity-row:disabled {
  cursor: default;
}

.stage-activity-row:not(:disabled):hover,
.stage-activity-row:focus-visible {
  outline: none;
  border-color: #cfd8e3;
  background: #fcfcfd;
}

.stage-activity-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
}

.stage-activity-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.stage-activity-type-badge {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 8px;
  border-radius: 999px;
  border: 1px solid #cfe7dc;
  background: var(--selected);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 600;
}

.stage-activity-type-badge.learn {
  background: rgba(243, 230, 190, 0.14);
}

.stage-activity-type-badge.check {
  background: rgba(120, 145, 122, 0.16);
}

.stage-activity-type-badge.practice {
  background: rgba(214, 169, 109, 0.16);
}

.stage-activity-meta,
.stage-activity-state {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.stage-activity-title {
  color: #ffffff;
  font-size: 0.98rem;
  line-height: 1.35;
}

.stage-activity-hint {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.stage-activity-row.completed .stage-activity-state,
.stage-activity-row.completed .stage-activity-hint {
  color: var(--muted);
}

.lesson-blocks {
  display: grid;
  gap: 12px;
}

.lesson-step {
  display: grid;
  gap: 18px;
}

.lesson-progressbar {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf2;
}

.lesson-progressfill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.lesson-mode-block {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #f9fafb;
}

.lesson-mode-block.learn {
  background: #f9fafb;
}

.lesson-mode-block.check {
  background: var(--selected);
}

.lesson-step .lesson-block {
  gap: 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.lesson-demo {
  display: grid;
  gap: 10px;
  padding: 14px 0 4px;
}

.lesson-demo-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.lesson-token {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: transparent;
  transition: background-color 180ms ease, border-color 180ms ease, opacity 180ms ease;
}

.lesson-token.active {
  border-color: #cfd8e3;
  background: #f9fafb;
}

.lesson-token.core {
  border-color: var(--green);
  background: var(--selected);
}

.lesson-token.dim {
  opacity: 0.5;
}

.lesson-token-text {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.35;
}

.lesson-token-label {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lesson-check {
  display: grid;
  gap: 12px;
  margin-top: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.lesson-check [data-role="lesson-check-prompt"] {
  color: var(--text);
  font-weight: 650;
}

.sort-card {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
}

.sort-card.assigned {
  border-color: #b7e0ce;
  background: var(--selected);
}

.sort-card-text {
  font-size: 0.96rem;
  line-height: 1.35;
}

.sort-card-label {
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lesson-takeaway {
  display: none;
}

.lesson-step .lesson-block .small-text {
  line-height: 1.35;
}

.lesson-step .lesson-block .small-text:nth-of-type(1) {
  color: var(--text);
  font-size: 1rem;
}

.lesson-step .lesson-block .small-text:nth-of-type(3) {
  color: var(--text);
}

.lesson-block {
  display: grid;
  gap: 8px;
  padding-top: 0;
  border-top: 0;
}

.lesson-block-title {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.premium-rule {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--text);
  line-height: 1.45;
}

.premium-drill-layout {
  gap: 22px;
  padding-bottom: calc(34px + env(safe-area-inset-bottom));
}

.premium-drill-layout [data-role="content"] {
  display: grid;
  gap: 18px;
}

.drill-progressbar {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf2;
}

.drill-progressfill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.drill-instruction {
  margin: 0;
  color: var(--text);
  font-weight: 650;
}

.premium-drill-layout .question-text {
  margin-top: 2px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.04);
}

.premium-drill-layout .question-text.dense-question-text {
  max-width: none;
  padding: 14px;
  font-size: 1.06rem;
  line-height: 1.5;
}

.premium-drill-layout .question-text.editorial-context {
  display: grid;
  max-width: none;
  gap: 10px;
  padding: 14px;
  font-family: var(--font-body);
  font-size: 0.98rem;
  line-height: 1.45;
  letter-spacing: 0;
}

.editorial-context-label,
.editorial-added-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

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

.editorial-context-line {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin: 0;
}

.editorial-sentence-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #eef3f7;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 750;
}

.editorial-sentence-text {
  min-width: 0;
}

.editorial-added-sentence {
  display: grid;
  gap: 5px;
  margin-top: 2px;
  padding: 10px 11px;
  border: 1px solid #dfe7ef;
  border-radius: 13px;
  background: #f9fbfc;
}

.editorial-added-text {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.04rem;
  line-height: 1.45;
}

.premium-feedback {
  display: grid;
  gap: 4px;
  margin-top: 2px;
}

.premium-feedback.learn-feedback {
  margin-top: 2px;
  border-color: #cfe7dc;
  background: #fbfefc;
}

.learn-feedback .feedback-state {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.learn-feedback [data-role="lesson-explanation"] {
  color: var(--muted);
}

.learn-feedback [data-role="lesson-source"] {
  opacity: 0.72;
  font-size: 0.82rem;
}

.reflection-block {
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.reflection-choices {
  display: grid;
  gap: 8px;
}

.reflection-choice {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.reflection-choice.selected,
.reflection-choice:focus-visible,
.reflection-choice:active {
  background: var(--selected);
  outline: none;
}

.lesson-step .reflection-choice.selected {
  border-color: var(--green);
  background: var(--selected);
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(76, 175, 132, 0.18);
}

.reflection-choice.correct {
  border-color: var(--green);
  color: var(--text);
}

.reflection-choice.incorrect {
  border-color: var(--coffee);
}

.lesson-step .reflection-choice.selected.correct {
  background: var(--selected);
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(76, 175, 132, 0.22);
}

.lesson-step .reflection-choice.selected.incorrect {
  background: rgba(217, 107, 107, 0.1);
  border-color: var(--coffee);
  box-shadow: 0 0 0 3px rgba(217, 107, 107, 0.2);
}

.lesson-step [data-role="lesson-continue"] {
  margin-top: 6px;
  min-height: 48px;
  font-weight: 750;
}

.premium-drill-layout [data-role="continue"] {
  margin-top: 8px;
  min-height: 48px;
  font-weight: 750;
}

.lesson-prompt-sentence {
  margin: 4px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9fafb;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.4;
}

.extra-practice-summary {
  display: grid;
  gap: 16px;
  padding-top: 8px;
}

.extra-practice-summary-head {
  display: grid;
  gap: 6px;
}

.extra-practice-summary-body {
  display: grid;
  gap: 12px;
}

.extra-practice-sections {
  display: grid;
  gap: 8px;
}

.extra-practice-section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.extra-practice-section-title {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.35;
}

.extra-practice-section-state {
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.extra-practice-patterns {
  display: grid;
  gap: 8px;
}

.extra-practice-pattern-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.extra-practice-pattern-chip {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 0.82rem;
}

.extra-practice-actions {
  display: grid;
  gap: 10px;
}

.locked-block {
  display: grid;
  gap: 6px;
}

@media (max-width: 640px) {
  .stage-detail {
    padding: 16px;
  }

  .stage-path {
    gap: 24px;
  }

  .stage-path-cluster {
    padding-left: 32px;
  }

  .stage-path-cluster-marker {
    margin-left: -32px;
  }

  .stage-path-step {
    grid-template-columns: 28px minmax(0, 1fr);
    border-radius: 22px;
  }

  .stage-path-step-state {
    grid-column: 2;
  }

  .stage-subsections {
    grid-auto-columns: 86%;
  }

  .stage-selected-header {
    flex-direction: column;
  }

  .stage-selected-meta {
    justify-items: start;
    text-align: left;
  }

  .stage-activity-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .stage-activity-state {
    grid-column: 2;
  }

  .screen-body {
    padding-inline: var(--app-page-pad-x);
  }

  .app-shell-layout {
    padding-bottom: calc(var(--app-nav-clearance) + 14px);
  }

  .daily-hero {
    padding: 18px;
  }

  .home-progress-grid,
  .profile-stats-grid {
    grid-template-columns: 1fr;
  }

  .support-panel {
    grid-template-columns: 1fr;
  }

  .support-panel-row {
    justify-content: space-between;
  }

  .profile-identity-card,
  .profile-invite-row {
    grid-template-columns: 1fr;
  }

  .profile-avatar {
    width: 64px;
    height: 64px;
  }

  .profile-identity-card {
    gap: 12px;
    border-radius: 24px;
  }

  .profile-reputation-text,
  .character-dialogue-text {
    font-size: 1rem;
    line-height: 1.42;
  }

  .momentum-stat {
    min-height: auto;
  }

  .path-teaser {
    align-items: flex-start;
    padding: var(--app-card-pad);
  }

  .bottom-nav {
    bottom: max(10px, env(safe-area-inset-bottom));
    width: min(calc(100% - 20px), var(--app-nav-max));
    border-radius: 22px;
  }

  .bottom-nav-item {
    min-height: 48px;
    font-size: 0.72rem;
  }

  h1 {
    font-size: clamp(1.55rem, 7vw, 1.95rem);
    line-height: 1.08;
  }

  .home-topbar,
  .question-meta {
    gap: 10px;
  }

  .question-layout {
    justify-content: flex-start;
    gap: 18px;
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: calc(34px + env(safe-area-inset-bottom));
  }

  .question-text {
    max-width: none;
    font-size: clamp(1.24rem, 6vw, 1.5rem);
    line-height: 1.4;
  }

  .choice,
  .reflection-choice {
    min-height: 50px;
    padding: 12px 13px;
  }

  .premium-feedback {
    padding: 13px 14px;
  }

  .premium-drill-layout [data-role="content"] {
    gap: 15px;
  }

  .premium-drill-layout .question-text {
    padding: 14px;
  }

  .premium-drill-layout .question-text.dense-question-text {
    font-size: 1rem;
    line-height: 1.48;
  }

  .premium-drill-layout .question-text.editorial-context {
    gap: 9px;
    padding: 12px;
    font-size: 0.95rem;
  }

  .editorial-context-line {
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 7px;
  }

  .editorial-sentence-number {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }

  .editorial-added-sentence {
    padding: 9px 10px;
  }

  .editorial-added-text {
    font-size: 1rem;
    line-height: 1.42;
  }
}
/* Premium light-theme readability overrides */
.stage-subsection-card,
.stage-selected,
.lesson-step,
.premium-feedback {
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.04);
}

.stage-subsection-card.completed,
.stage-activity-row.completed {
  opacity: 1;
}

.stage-subsection-card.completed,
.stage-subsection-card.selected,
.stage-subsection-card.current,
.stage-activity-row,
.stage-activity-row.current,
.premium-feedback {
  background: #ffffff;
}

.stage-subsection-card.selected {
  border-color: var(--green);
  box-shadow: 0 10px 26px rgba(76, 175, 132, 0.12);
}

.stage-subsection-head,
.stage-selected-header,
.stage-activity-main {
  align-items: start;
}

.stage-subsection-title,
.stage-selected-title,
.stage-activity-title,
.lesson-block-title {
  color: var(--text);
  font-weight: 700;
}

.stage-subsection-title,
.stage-selected-title {
  letter-spacing: -0.02em;
}

.stage-subsection-card .stage-subsection-meta,
.stage-subsection-card .stage-subsection-hint,
.stage-subsection-card .stage-subsection-number,
.stage-subsection-card .stage-subsection-time,
.stage-selected-meta,
.stage-activity-meta,
.stage-activity-hint,
.stage-activity-state,
.premium-feedback .small-text,
.premium-feedback .feedback-meta {
  color: var(--muted);
}

.stage-subsection-state,
.stage-activity-state {
  justify-self: end;
  text-align: right;
}

.stage-subsection-card.locked,
.stage-activity-row.locked {
  opacity: 0.5;
}

.stage-activity-row.current {
  border-color: #b7e0ce;
  box-shadow: 0 8px 22px rgba(76, 175, 132, 0.08);
}

.stage-activity-type-badge {
  background: #f9fafb;
  border-color: var(--line);
  color: var(--muted);
  width: 24px;
  height: 24px;
  border-radius: 8px;
  vertical-align: middle;
}

.stage-activity-type-badge.learn {
  background: #f9fafb;
  border-color: var(--line);
  color: #6b7280;
}

.stage-activity-type-badge.check {
  background: #eef5ff;
  border-color: #bfdbfe;
  color: #2563eb;
}

.stage-activity-type-badge.practice {
  background: #e6f4ee;
  border-color: #b7e0ce;
  color: var(--green);
}

.step-type-icon {
  width: 15px;
  height: 15px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lesson-mode-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lesson-mode-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #6b7280;
  background: #ffffff;
}

.lesson-mode-block.learn .lesson-mode-icon {
  background: #f9fafb;
  border-color: var(--line);
  color: #6b7280;
}

.lesson-mode-block.check .lesson-mode-icon {
  background: #eef5ff;
  border-color: #bfdbfe;
  color: #2563eb;
}

.lesson-mode-block.practice .lesson-mode-icon {
  background: #e6f4ee;
  border-color: #b7e0ce;
  color: var(--green);
}

.question-meta {
  align-items: center;
}

.drill-mode-icon {
  background: #e6f4ee;
  border-color: #b7e0ce;
  color: var(--green);
}

.lesson-step {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #ffffff;
}

.lesson-mode-block {
  gap: 2px;
  padding: 8px 10px;
  background: #f9fafb;
}

.lesson-mode-block.learn {
  background: #f9fafb;
  border-color: var(--line);
}

.lesson-mode-block.check {
  background: #eef5ff;
  border-color: #bfdbfe;
}

.lesson-mode-block.practice {
  background: #e6f4ee;
  border-color: #b7e0ce;
}

.lesson-prompt-sentence,
.reflection-choice,
.sort-card {
  background: #ffffff;
}

.reflection-choice {
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.lesson-step .reflection-choice.selected {
  border-width: 2px;
  background: var(--selected);
  font-weight: 700;
  box-shadow: 0 0 0 3px rgba(76, 175, 132, 0.18);
}

.premium-feedback {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

[data-role="lesson-progress"] {
  margin: -2px 0 2px;
  color: var(--muted);
}

/* Stable Pathway baseline reset: remove experimental world-scene overrides. */
app-premium-concepts-screen.path-overview .path-tab-layout {
  max-width: 680px;
  padding: 28px 24px calc(128px + env(safe-area-inset-bottom));
  border-inline: 1px solid rgba(255, 255, 255, 0.38);
  background:
    linear-gradient(180deg, rgba(242, 228, 255, 0.3) 0%, rgba(225, 239, 250, 0.34) 18%, rgba(248, 244, 235, 0.6) 58%, rgba(246, 250, 247, 0.92) 100%),
    #f6f7f4;
}

app-premium-concepts-screen.path-overview .path-tab-header {
  align-items: flex-start;
  min-height: 0;
  padding: 4px 2px 0;
}

app-premium-concepts-screen.path-overview .premium-copy {
  gap: 6px;
}

app-premium-concepts-screen.path-overview .premium-copy .eyebrow,
app-premium-concepts-screen.path-overview .premium-copy .small-text {
  display: block;
}

app-premium-concepts-screen.path-overview .premium-copy h1 {
  color: var(--text);
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-shadow: none;
}

app-premium-concepts-screen.path-overview .premium-copy h1::after,
app-premium-concepts-screen.path-overview .pathway-stages::after,
app-premium-concepts-screen.path-overview .learning-path-stage::after,
app-premium-concepts-screen.path-overview .pathway-stage-status::before {
  content: none;
  display: none;
}

app-premium-concepts-screen.path-overview .path-atmosphere,
app-premium-concepts-screen.path-overview .path-world-route,
app-premium-concepts-screen.path-overview .learning-path-district-scene {
  display: none;
}

app-premium-concepts-screen.path-overview .path-dialogue {
  display: grid;
  border-color: rgba(217, 178, 76, 0.2);
  background: rgba(255, 255, 255, 0.74);
}

app-premium-concepts-screen.path-overview .pathway-stages {
  position: relative;
  display: grid;
  gap: 18px;
  min-height: 0;
  margin-top: 0;
  padding: 4px 0 6px;
}

app-premium-concepts-screen.path-overview .pathway-stages::before {
  display: block;
  top: 26px;
  bottom: 42px;
  left: 18px;
  width: 3px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(217, 178, 76, 0.25), rgba(76, 175, 132, 0.42), rgba(96, 130, 180, 0.2)),
    rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 20px rgba(76, 175, 132, 0.16);
  transform: none;
}

app-premium-concepts-screen.path-overview .learning-path-stage {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  padding: 12px 0 24px;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-id] {
  inset: auto;
}

app-premium-concepts-screen.path-overview .learning-path-stage::before {
  display: none;
}

app-premium-concepts-screen.path-overview .learning-path-stage-header {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  min-height: 0;
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(250, 246, 238, 0.78) 100%) !important;
  box-shadow: 0 16px 38px rgba(36, 50, 69, 0.11);
  filter: none;
}

app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-header {
  box-shadow: 0 16px 38px rgba(36, 50, 69, 0.11), 0 0 0 1px rgba(76, 175, 132, 0.1);
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed .learning-path-stage-header {
  opacity: 0.9;
}

app-premium-concepts-screen.path-overview .learning-path-stage-node {
  width: 38px;
  height: 38px;
  color: var(--muted);
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.92), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #eef2f4 100%) !important;
  box-shadow: inset 0 -5px 10px rgba(33, 43, 54, 0.08), 0 10px 22px rgba(36, 50, 69, 0.14);
}

app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-node,
app-premium-concepts-screen.path-overview .learning-path-stage.completed .learning-path-stage-node {
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.94), transparent 32%),
    linear-gradient(180deg, #73c99e 0%, #4caf84 100%) !important;
  color: #ffffff;
}

app-premium-concepts-screen.path-overview .learning-path-stage-node .stage-icon {
  display: block;
}

app-premium-concepts-screen.path-overview .learning-path-stage-copy {
  gap: 3px;
}

app-premium-concepts-screen.path-overview .learning-path-stage-district {
  color: rgba(74, 52, 31, 0.72);
  font-size: 0.78rem;
  line-height: 1.25;
}

app-premium-concepts-screen.path-overview .learning-path-stage-title {
  color: var(--text);
  font-size: 1.03rem;
  font-weight: 700;
}

app-premium-concepts-screen.path-overview .pathway-stage-status {
  width: auto;
  height: auto;
  min-width: 0;
  padding: 4px 10px;
  overflow: visible;
  border-color: var(--line);
  background: #f9fafb;
  color: var(--muted);
}

/* Pathway Overview rhythm refinement: preserve structure, improve breathing and pacing. */
app-premium-concepts-screen.path-overview .path-tab-layout {
  padding-top: 30px;
  padding-bottom: calc(142px + env(safe-area-inset-bottom));
}

app-premium-concepts-screen.path-overview .path-tab-header {
  padding: 6px 4px 0;
  margin-bottom: 18px;
}

app-premium-concepts-screen.path-overview .premium-copy {
  gap: 8px;
}

app-premium-concepts-screen.path-overview .premium-copy h1 {
  margin-bottom: 1px;
}

app-premium-concepts-screen.path-overview .premium-copy .small-text {
  max-width: 29rem;
  line-height: 1.5;
}

app-premium-concepts-screen.path-overview .pathway-stages {
  gap: 0;
  padding: 14px 0 18px;
}

app-premium-concepts-screen.path-overview .pathway-stages::before {
  top: 34px;
  bottom: 58px;
  left: 22px;
}

app-premium-concepts-screen.path-overview .learning-path-stage {
  padding: 0 0 28px 0;
}

app-premium-concepts-screen.path-overview .learning-path-stage:nth-child(2) {
  padding-bottom: 34px;
}

app-premium-concepts-screen.path-overview .learning-path-stage:nth-child(3) {
  padding-bottom: 42px;
}

app-premium-concepts-screen.path-overview .learning-path-stage:nth-child(4) {
  padding-bottom: 32px;
}

app-premium-concepts-screen.path-overview .learning-path-stage:last-child {
  padding-bottom: 22px;
}

app-premium-concepts-screen.path-overview .learning-path-stage-header {
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 18px;
  padding: 16px 16px 16px 15px;
}

app-premium-concepts-screen.path-overview .learning-path-stage-node {
  justify-self: start;
}

app-premium-concepts-screen.path-overview .learning-path-stage-copy {
  gap: 4px;
  padding-top: 1px;
}

@media (max-width: 430px) {
  app-premium-concepts-screen.path-overview .path-tab-layout {
    padding-inline: 18px;
    padding-bottom: calc(140px + env(safe-area-inset-bottom));
  }

  app-premium-concepts-screen.path-overview .path-tab-header {
    margin-bottom: 16px;
  }

  app-premium-concepts-screen.path-overview .learning-path-stage-header {
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: 16px;
    padding: 15px 14px;
  }

  app-premium-concepts-screen.path-overview .pathway-stages::before {
    left: 21px;
  }
}

/* Authoritative Figma Path overview overrides: keep these after earlier baseline resets. */
app-premium-concepts-screen.path-overview .path-tab-layout {
  max-width: 393px !important;
  padding: 12px 8px calc(var(--app-nav-clearance) + 8px) !important;
  border-inline: 0 !important;
  background: #f2ede4 !important;
  color: #1f1a14;
}

app-premium-concepts-screen.path-overview .path-tab-header {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: start !important;
  gap: 12px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 18px 12px 14px !important;
}

app-premium-concepts-screen.path-overview .premium-copy {
  gap: 2px !important;
}

app-premium-concepts-screen.path-overview .premium-copy .eyebrow {
  display: none !important;
}

app-premium-concepts-screen.path-overview .premium-copy .small-text {
  display: block !important;
  max-width: none !important;
  color: #6e6354 !important;
  font-size: 14px !important;
  line-height: 20px !important;
}

app-premium-concepts-screen.path-overview .premium-copy h1 {
  margin: 0 !important;
  color: #1f1a14 !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  line-height: 30px !important;
  letter-spacing: -0.045em !important;
}

app-premium-concepts-screen.path-overview .path-dialogue,
app-premium-concepts-screen.path-overview .next-up-hero {
  display: none !important;
}

app-premium-concepts-screen.path-overview .path-guide-hero {
  margin: 0 8px 22px !important;
}

app-premium-concepts-screen.path-overview .pathway-stages {
  display: grid !important;
  gap: 0 !important;
  min-height: 0 !important;
  width: calc(100% + 28px) !important;
  margin-left: -28px !important;
  padding: 0 8px 18px !important;
}

app-premium-concepts-screen.path-overview .pathway-stages::before,
app-premium-concepts-screen.path-overview .pathway-stages::after,
app-premium-concepts-screen.path-overview .learning-path-stage::before,
app-premium-concepts-screen.path-overview .learning-path-stage::after {
  content: none !important;
  display: none !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  width: 100% !important;
  min-height: 135px !important;
  padding: 0 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed {
  min-height: 151px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.current {
  min-height: 132px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-header {
  display: grid !important;
  grid-template-columns: 36px 88px minmax(0, 1fr) 16px !important;
  grid-column: 1 / -1 !important;
  gap: 10px 12px !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 116px !important;
  margin: 0 0 12px !important;
  padding: 12px !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-rail {
  position: relative !important;
  align-self: stretch !important;
  display: flex !important;
  justify-content: center !important;
  padding-top: 8px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-rail::after {
  content: "" !important;
  position: absolute !important;
  top: 38px !important;
  bottom: -18px !important;
  left: 50% !important;
  display: block !important;
  width: 2px !important;
  transform: translateX(-50%) !important;
  border-radius: 999px !important;
  background: #c8c0b0 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed .learning-path-stage-rail::after {
  background: var(--path-accent, #8aac76) !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage:last-child .learning-path-stage-rail::after {
  display: none !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-node {
  width: 28px !important;
  height: 28px !important;
  border: 2px solid #b8b0a0 !important;
  border-radius: 999px !important;
  background: #ddd8cc !important;
  color: #8b8178 !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed .learning-path-stage-node {
  border-color: var(--path-accent, #8aac76) !important;
  background: var(--path-accent, #8aac76) !important;
  color: #ffffff !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-node {
  border-color: var(--path-accent, #8aac76) !important;
  background: #ffffff !important;
  color: var(--path-accent, #8aac76) !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-node .stage-icon {
  display: none !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-image,
app-premium-concepts-screen.path-overview .learning-path-stage-copy,
app-premium-concepts-screen.path-overview .learning-path-stage-meta {
  position: relative !important;
  z-index: 1 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-image {
  display: block !important;
  width: 86px !important;
  height: 86px !important;
  overflow: hidden !important;
  border-radius: 22px !important;
  background: #e7dfd0 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-header::before {
  content: "" !important;
  position: absolute !important;
  z-index: 0 !important;
  top: 6px !important;
  right: 0 !important;
  bottom: 12px !important;
  left: 58px !important;
  border: 1px solid #c8c0b0 !important;
  border-radius: 16px !important;
  background: #f5ede0 !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-header::before {
  border-color: var(--path-active-border, #8aac76) !important;
  background: #ffffff !important;
  box-shadow: 0 4px 18px var(--path-active-shadow, rgba(138, 172, 118, 0.16)) !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-copy {
  display: grid !important;
  gap: 2px !important;
  min-width: 0 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-district {
  color: #8b8178 !important;
  font-family: "Inter", "Segoe UI", sans-serif !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  line-height: 15px !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-title {
  color: #1f1a14 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  line-height: 18.75px !important;
  letter-spacing: -0.02em !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-overview-description {
  display: block !important;
  color: #7a7060 !important;
  font-size: 11px !important;
  line-height: 15.13px !important;
}

app-premium-concepts-screen.path-overview .pathway-stage-status {
  width: 16px !important;
  min-width: 16px !important;
  height: 16px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: transparent !important;
  font-size: 0 !important;
}

app-premium-concepts-screen.path-overview .pathway-stage-status::before {
  content: "›" !important;
  display: block !important;
  color: #a89780 !important;
  font-size: 20px !important;
  line-height: 1 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed .pathway-stage-status::before,
app-premium-concepts-screen.path-overview .learning-path-stage.locked .pathway-stage-status::before {
  content: "" !important;
}

@media (max-width: 430px) {
  app-premium-concepts-screen.path-overview .path-tab-layout {
    padding-inline: 8px !important;
  }
}

/* Stage Interior: focused mastery progression with visible Learn / Check / Practice rhythm. */
app-premium-concepts-screen.path-stage-interior .path-tab-layout {
  max-width: 393px;
  margin-inline: auto;
  padding: 12px 16px calc(132px + env(safe-area-inset-bottom));
  height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

app-premium-concepts-screen.path-stage-interior .pathway-stages {
  display: grid;
  gap: 18px;
}

app-premium-concepts-screen.path-stage-interior .stage-path {
  gap: 22px;
  padding: 10px 0 12px;
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster {
  display: grid;
  opacity: 1;
  gap: 10px;
  padding-left: 38px;
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster.path-distant-history,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.path-distant-future {
  display: grid;
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster:not(.current) .stage-path-steps {
  display: grid;
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster.completed .stage-path-steps {
  gap: 6px;
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster.locked .stage-path-steps {
  display: grid;
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster-header {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  padding: 10px 12px 10px 0;
  background: transparent;
  box-shadow: none;
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster.current .stage-path-cluster-header {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  padding: 14px 14px 14px 0;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 16%, rgba(217, 178, 76, 0.14), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.74), rgba(247, 252, 249, 0.5));
  box-shadow: 0 12px 26px rgba(36, 50, 69, 0.08);
}

app-premium-concepts-screen.path-stage-interior .stage-path-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 52px;
  padding: 13px 15px;
}

app-premium-concepts-screen.path-stage-interior .stage-path-step.current {
  min-height: 66px;
  padding: 18px;
}

app-premium-concepts-screen.path-stage-interior .stage-path-step.completed {
  min-height: 42px;
  padding: 8px 11px;
}

app-premium-concepts-screen.path-stage-interior .stage-path-step.locked {
  min-height: 42px;
  padding: 9px 11px;
  opacity: 0.62;
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster.completed {
  gap: 6px;
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster.completed .stage-path-cluster-title {
  color: #22303b;
}

app-premium-concepts-screen.path-stage-interior .stage-path-step.completed .stage-path-step-title,
app-premium-concepts-screen.path-stage-interior .stage-path-step.locked .stage-path-step-title {
  font-size: 0.84rem;
}

app-premium-concepts-screen.path-stage-interior .stage-path-step.current .stage-path-step-title {
  font-size: 1.04rem;
}

app-premium-concepts-screen.path-stage-interior .stage-path-step.available .stage-path-step-title {
  font-weight: 650;
}

/* Canonical Stage Interior: clean, repeatable mastery template. */
app-premium-concepts-screen.path-stage-interior .path-environment-layer,
app-premium-concepts-screen.path-stage-interior .path-atmosphere,
app-premium-concepts-screen.path-stage-interior .path-atmosphere-orb,
app-premium-concepts-screen.path-stage-interior .path-atmosphere-skyline,
app-premium-concepts-screen.path-stage-interior .learning-path-district-scene,
app-premium-concepts-screen.path-stage-interior .district-architecture,
app-premium-concepts-screen.path-stage-interior .district-light {
  display: none !important;
}

app-premium-concepts-screen.path-stage-interior .path-tab-layout {
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.96) 0%, rgba(247, 250, 248, 0.98) 48%, #f6f8f7 100%);
  /* Just enough to clear the ~82px floating bottom nav (plus a small buffer);
     190px left a large empty gap after the last node. */
  padding-bottom: calc(100px + env(safe-area-inset-bottom));
  scroll-padding-bottom: calc(100px + env(safe-area-inset-bottom));
}

/* Drop the overview-oriented trailing padding inside the stage layers so the
   last node sits just above the nav instead of below a big empty gap. */
app-premium-concepts-screen.path-stage-interior .path-interactive-overlay-layer,
app-premium-concepts-screen.path-stage-interior .learning-path-stage.expanded {
  padding-bottom: 0 !important;
}

app-premium-concepts-screen.path-stage-interior .path-tab-header {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border: 1px solid rgba(229, 217, 198, 0.82);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 32px rgba(36, 50, 69, 0.07);
}

app-premium-concepts-screen.path-stage-interior .path-tab-header h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.8rem, 7vw, 2.35rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

app-premium-concepts-screen.path-stage-interior .path-tab-header .small-text {
  max-width: 34rem;
}

app-premium-concepts-screen.path-stage-interior .path-dialogue,
app-premium-concepts-screen.path-stage-interior .next-up {
  border: 1px solid rgba(229, 217, 198, 0.82);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(36, 50, 69, 0.05);
}

app-premium-concepts-screen.path-stage-interior .pathway-stages {
  position: relative;
  z-index: 1;
  gap: 18px;
  padding-bottom: calc(74px + env(safe-area-inset-bottom));
}

app-premium-concepts-screen.path-stage-interior .learning-path-stage {
  margin: 0 !important;
  transform: none !important;
}

app-premium-concepts-screen.path-stage-interior .learning-path-stage::before,
app-premium-concepts-screen.path-stage-interior .learning-path-stage::after {
  content: none !important;
}

app-premium-concepts-screen.path-stage-interior .learning-path-stage-header {
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 15px !important;
  border: 1px solid rgba(229, 217, 198, 0.82) !important;
  border-radius: 24px !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 10px 24px rgba(36, 50, 69, 0.06) !important;
}

app-premium-concepts-screen.path-stage-interior .learning-path-stage.expanded .learning-path-stage-header {
  background: rgba(255, 255, 255, 0.94) !important;
}

app-premium-concepts-screen.path-stage-interior .learning-path-stage-description {
  display: none !important;
}

app-premium-concepts-screen.path-stage-interior .learning-path-stage-copy {
  gap: 3px;
}

app-premium-concepts-screen.path-stage-interior .learning-path-stage-district {
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

app-premium-concepts-screen.path-stage-interior .learning-path-stage-title {
  font-size: 1.05rem;
  line-height: 1.2;
}

app-premium-concepts-screen.path-stage-interior .learning-path-stage-progress,
app-premium-concepts-screen.path-stage-interior .learning-path-stage-progressbar {
  margin-inline: 14px;
}

app-premium-concepts-screen.path-stage-interior .stage-path {
  gap: 18px;
  padding: 18px 0 10px;
}

app-premium-concepts-screen.path-stage-interior .stage-path::before {
  left: 14px;
  width: 2px;
  background: linear-gradient(180deg, #d9dfeb 0%, #cfe7dc 56%, #d9dfeb 100%);
  box-shadow: none;
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster {
  gap: 10px;
  padding-left: 38px;
  opacity: 1;
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster.path-distant-history,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.path-distant-future,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.path-near-history,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.path-next-location {
  display: grid;
  opacity: 1;
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster-header,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.current .stage-path-cluster-header,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.path-next-location .stage-path-cluster-header {
  grid-template-columns: 30px minmax(0, 1fr) auto;
  padding: 12px 14px 12px 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
  box-shadow: none;
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster-marker,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.current .stage-path-cluster-marker,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.completed .stage-path-cluster-marker,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.stage_review.current .stage-path-cluster-marker,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.stage_review.completed .stage-path-cluster-marker {
  width: 30px;
  height: 30px;
  margin-left: -38px;
  border: 1px solid #d9dfeb;
  background: #ffffff;
  color: var(--muted);
  box-shadow: 0 8px 16px rgba(36, 50, 69, 0.08);
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster.current .stage-path-cluster-marker,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.completed .stage-path-cluster-marker {
  border-color: #b7e0ce;
  color: var(--green);
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster-title,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.current .stage-path-cluster-title,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.path-near-history .stage-path-cluster-title,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.path-next-location .stage-path-cluster-title {
  color: var(--text);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.25;
}

app-premium-concepts-screen.path-stage-interior .stage-path-cluster:not(.current) .stage-path-steps,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.current .stage-path-steps,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.completed .stage-path-steps,
app-premium-concepts-screen.path-stage-interior .stage-path-cluster.locked .stage-path-steps {
  display: grid;
  gap: 10px;
}

app-premium-concepts-screen.path-stage-interior .stage-path-step,
app-premium-concepts-screen.path-stage-interior .stage-path-step.available,
app-premium-concepts-screen.path-stage-interior .stage-path-step.current,
app-premium-concepts-screen.path-stage-interior .stage-path-step.completed,
app-premium-concepts-screen.path-stage-interior .stage-path-step.locked,
app-premium-concepts-screen.path-stage-interior .stage-path-step.final-review,
app-premium-concepts-screen.path-stage-interior .stage-path-step.final-review.current,
app-premium-concepts-screen.path-stage-interior .stage-path-step.final-review.completed {
  grid-template-columns: 28px minmax(0, 1fr) auto;
  min-height: 52px;
  margin: 0;
  padding: 13px 15px;
  border: 1px solid rgba(229, 217, 198, 0.82);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(36, 50, 69, 0.05);
  animation: none;
  backdrop-filter: none;
}

app-premium-concepts-screen.path-stage-interior .stage-path-step.current {
  min-height: 64px;
  border-color: #b7e0ce;
  background: #f8fcfa;
  box-shadow: 0 10px 24px rgba(76, 175, 132, 0.1);
}

app-premium-concepts-screen.path-stage-interior .stage-path-step.completed {
  border-color: #dbe9e2;
  background: #f7fbf9;
}

app-premium-concepts-screen.path-stage-interior .stage-path-step.locked {
  border-color: #e3e7ed;
  background: #f8fafc;
  opacity: 0.62;
}

app-premium-concepts-screen.path-stage-interior .stage-path-step-marker,
app-premium-concepts-screen.path-stage-interior .stage-path-step.current .stage-path-step-marker {
  background: #ffffff;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px rgba(36, 50, 69, 0.08);
}

app-premium-concepts-screen.path-stage-interior .stage-path-step.current .stage-path-step-marker,
app-premium-concepts-screen.path-stage-interior .stage-path-step.completed .stage-path-step-marker {
  color: var(--green);
}

app-premium-concepts-screen.path-stage-interior .stage-path-step-title,
app-premium-concepts-screen.path-stage-interior .stage-path-step.current .stage-path-step-title,
app-premium-concepts-screen.path-stage-interior .stage-path-step.available .stage-path-step-title,
app-premium-concepts-screen.path-stage-interior .stage-path-step.completed .stage-path-step-title,
app-premium-concepts-screen.path-stage-interior .stage-path-step.locked .stage-path-step-title {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.3;
}

app-premium-concepts-screen.path-stage-interior .stage-path-step.current .stage-path-step-title {
  font-size: 1rem;
}

@media (max-width: 640px) {
  app-premium-concepts-screen.path-stage-interior .path-tab-layout {
    padding: 18px 18px calc(190px + env(safe-area-inset-bottom));
    scroll-padding-bottom: calc(170px + env(safe-area-inset-bottom));
  }

  app-premium-concepts-screen.path-stage-interior .path-tab-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  app-premium-concepts-screen.path-stage-interior .path-tab-header .support-coin-badge {
    grid-column: 2;
    grid-row: 1;
  }

  app-premium-concepts-screen.path-stage-interior .path-tab-header [data-role="stage-exit"] {
    grid-column: 1 / -1;
    justify-self: start;
  }

  app-premium-concepts-screen.path-stage-interior .stage-path-step,
  app-premium-concepts-screen.path-stage-interior .stage-path-step.current {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  app-premium-concepts-screen.path-stage-interior .stage-path-step-state {
    grid-column: 2;
  }
}

/* Final Path overview alignment overrides. Keep last so older pathway rules cannot override Figma fidelity. */
app-premium-concepts-screen.path-overview .path-tab-layout {
  max-width: 393px !important;
  padding: 0 8px calc(92px + env(safe-area-inset-bottom)) !important;
  background: #f2ede4 !important;
}

app-premium-concepts-screen.path-overview .path-tab-header {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 -8px !important;
  padding: 28px 20px 2px !important;
  background: #f2ede4 !important;
}

app-premium-concepts-screen.path-overview .path-guide-hero {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 8px 22px !important;
  box-shadow: 0 12px 18px rgba(61, 54, 41, 0.04) !important;
}

app-premium-concepts-screen.path-overview .pathway-stages {
  width: calc(100% + 28px) !important;
  margin-left: -28px !important;
  padding-top: 0 !important;
  padding-bottom: 22px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-node {
  overflow: hidden !important;
  background: transparent !important;
  border-color: transparent !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-node {
  overflow: visible !important;
  border-color: var(--path-accent, #c87040) !important;
  background: #ffffff !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-node::before {
  content: "" !important;
  display: block !important;
}

.path-marker-image {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
}

.path-marker-image img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.path-marker-momo {
  display: none !important;
}

app-premium-concepts-screen.path-guide-momo .path-marker-ember {
  display: none !important;
}

app-premium-concepts-screen.path-guide-momo .path-marker-momo {
  display: block !important;
}

app-premium-concepts-screen.path-overview .bottom-nav {
  right: auto !important;
  bottom: 0 !important;
  left: 50% !important;
  width: min(100vw, 393px) !important;
  min-height: 68px !important;
  padding: 9px 12px max(12px, env(safe-area-inset-bottom)) !important;
  border: 1px solid #e8dfd3 !important;
  border-bottom: 0 !important;
  border-radius: 22px 22px 0 0 !important;
  background: #fcf8f2 !important;
  box-shadow: 0 -10px 24px rgba(61, 54, 41, 0.08) !important;
  transform: translateX(-50%) !important;
}

app-premium-concepts-screen.path-overview .bottom-nav-item {
  min-height: 48px !important;
  padding: 5px 8px !important;
  border-radius: 20px !important;
  color: #6e6354 !important;
}

app-premium-concepts-screen.path-overview .bottom-nav-item.active {
  background: #ffeada !important;
  color: #1f1a14 !important;
}

app-premium-concepts-screen.path-overview .bottom-nav-glyph {
  width: 20px !important;
  height: 20px !important;
  font-size: 1rem !important;
}

/* Path Figma fidelity fix: keep the selected card highlight contained in the stage card area. */
app-premium-concepts-screen.path-overview .learning-path-stage,
app-premium-concepts-screen.path-overview .learning-path-stage.current,
app-premium-concepts-screen.path-overview .learning-path-stage.completed,
app-premium-concepts-screen.path-overview .learning-path-stage.locked {
  background: transparent !important;
  box-shadow: none !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-header,
app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-header,
app-premium-concepts-screen.path-overview .learning-path-stage.completed .learning-path-stage-header,
app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-header {
  position: relative !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-header::before {
  content: "" !important;
  position: absolute !important;
  z-index: 0 !important;
  top: 6px !important;
  right: 0 !important;
  bottom: 12px !important;
  left: 62px !important;
  display: block !important;
  border: 1px solid #d7cab8 !important;
  border-radius: 16px !important;
  background: #f5ede0 !important;
  box-shadow: 0 1px 4px rgba(31, 26, 20, 0.05) !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-header::before {
  border-color: var(--path-active-border, #d67843) !important;
  background: #ffffff !important;
  box-shadow: 0 4px 16px rgba(141, 88, 44, 0.1) !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-header::before {
  border-color: #d8cfc0 !important;
  background: #f5ede0 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-node::before,
app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-node::before {
  content: none !important;
  display: none !important;
}

/* Mobile Path Figma pass: exact frame rhythm, rail lane, stage cards, and tab bar seating. */
app-premium-concepts-screen.path-overview .path-tab-layout {
  max-width: 393px !important;
  padding: 0 0 calc(96px + env(safe-area-inset-bottom)) !important;
  background: #f2ede4 !important;
}

app-premium-concepts-screen.path-overview .path-tab-header {
  margin: 0 !important;
  padding: 30px 16px 0 !important;
}

app-premium-concepts-screen.path-overview .path-guide-hero {
  grid-template-columns: 146px minmax(0, 1fr) !important;
  width: auto !important;
  min-height: 160px !important;
  margin: 0 16px 16px !important;
  border: 1px solid #e8c4a0 !important;
  border-radius: 16px !important;
  background: #f5ede0 !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

app-premium-concepts-screen.path-guide-momo .path-guide-hero {
  border-color: #c8c0b0 !important;
  background: #edf2e8 !important;
}

app-premium-concepts-screen.path-guide-ember .path-guide-hero .path-guide-copy {
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

app-premium-concepts-screen.path-overview .path-guide-portrait {
  height: 150px !important;
  background: transparent !important;
}

app-premium-concepts-screen.path-overview .path-guide-portrait img,
app-premium-concepts-screen.path-overview .path-guide-portrait video {
  left: -4px !important;
  width: 150px !important;
  height: 150px !important;
}

app-premium-concepts-screen.path-overview .pathway-stages {
  display: grid !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 0 10px !important;
  gap: 0 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage {
  width: 100% !important;
  min-height: 135px !important;
  padding: 0 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage:first-child {
  min-height: 173px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-header {
  display: grid !important;
  grid-template-columns: 52px 88px minmax(0, 1fr) 16px !important;
  gap: 0 12px !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 135px !important;
  margin: 0 !important;
  padding: 0 16px 18px 0 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage:first-child .learning-path-stage-header {
  min-height: 173px !important;
  padding-bottom: 12px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-header::before {
  top: 6px !important;
  right: 16px !important;
  bottom: 18px !important;
  left: 62px !important;
  border-radius: 16px !important;
  border-color: #d7cab8 !important;
  background: #f5ede0 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-header::before {
  border-color: #c87040 !important;
  background: #ffffff !important;
}

app-premium-concepts-screen.path-guide-momo .learning-path-stage.current .learning-path-stage-header::before {
  border-color: #5a7a4a !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-rail {
  width: 52px !important;
  height: 100% !important;
  align-self: stretch !important;
  justify-content: center !important;
  padding-top: 14px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage:first-child .learning-path-stage-rail {
  padding-top: 14px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-rail::after {
  top: 42px !important;
  bottom: 0 !important;
  width: 2px !important;
  background: #c8c0b0 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed .learning-path-stage-rail::after {
  background: #c87040 !important;
}

app-premium-concepts-screen.path-guide-momo .learning-path-stage.completed .learning-path-stage-rail::after {
  background: #5a7a4a !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-node,
app-premium-concepts-screen.path-overview .learning-path-stage.current .learning-path-stage-node,
app-premium-concepts-screen.path-overview .learning-path-stage.completed .learning-path-stage-node,
app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-node {
  width: 28px !important;
  height: 28px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: inherit !important;
  box-shadow: none !important;
  overflow: visible !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-image {
  width: 88px !important;
  height: 90.81px !important;
  border-radius: 20px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="1"] .learning-path-stage-image {
  height: 128.65px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="2"] .learning-path-stage-image {
  height: 96.81px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="3"] .learning-path-stage-image,
app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="4"] .learning-path-stage-image,
app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="5"] .learning-path-stage-image,
app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="6"] .learning-path-stage-image,
app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="7"] .learning-path-stage-image,
app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="8"] .learning-path-stage-image {
  height: 90.81px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-copy {
  gap: 2px !important;
  align-content: center !important;
  min-width: 0 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-district {
  font-size: 10px !important;
  line-height: 15px !important;
  letter-spacing: 0.1em !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-title {
  font-size: 16px !important;
  line-height: 19px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-overview-description {
  font-size: 11px !important;
  line-height: 15px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-overview-progress {
  margin-top: 7px !important;
}

app-premium-concepts-screen.path-overview .pathway-stage-status {
  display: grid !important;
  place-items: center !important;
  width: 16px !important;
  height: 16px !important;
  opacity: 1 !important;
}

app-premium-concepts-screen.path-overview .pathway-stage-status::before {
  content: "" !important;
  display: block !important;
  width: 16px !important;
  height: 16px !important;
  background: url("icons/path-chevron.svg") center / contain no-repeat !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.completed .pathway-stage-status::before,
app-premium-concepts-screen.path-overview .learning-path-stage.locked .pathway-stage-status::before {
  display: none !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-node::before,
app-premium-concepts-screen.path-overview .learning-path-stage.locked .learning-path-stage-node::after {
  content: none !important;
  display: none !important;
}

app-premium-concepts-screen.path-overview .path-marker-lock,
app-premium-concepts-screen.path-overview .path-marker-lock img {
  width: 28px !important;
  height: 28px !important;
  background: transparent !important;
  box-shadow: none !important;
}

app-premium-concepts-screen.path-overview .bottom-nav {
  width: min(100vw, 393px) !important;
  min-height: 82px !important;
  padding: 9px 12px max(18px, env(safe-area-inset-bottom)) !important;
  border-radius: 22px 22px 0 0 !important;
}

/* Path overview: guide card scrolls inline with the stages (no sticky overlay). */
app-premium-concepts-screen.path-overview .path-tab-header {
  z-index: 140 !important;
  padding: 30px 16px 0 !important;
}

app-premium-concepts-screen.path-overview .path-guide-hero {
  position: relative !important;
  z-index: 1 !important;
  margin: 0 16px 16px !important;
  overflow: hidden !important;
}

app-premium-concepts-screen.path-overview .path-guide-hero::before {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 0 !important;
  display: block !important;
  border-radius: inherit !important;
  background: #f5ede0 !important;
  pointer-events: none !important;
}

app-premium-concepts-screen.path-guide-momo.path-overview .path-guide-hero::before {
  background: #edf2e8 !important;
}

app-premium-concepts-screen.path-overview .path-guide-portrait,
app-premium-concepts-screen.path-overview .path-guide-copy {
  position: relative !important;
  z-index: 1 !important;
}

app-premium-concepts-screen.path-overview .path-guide-portrait {
  background: #f5ede0 !important;
}

app-premium-concepts-screen.path-guide-momo.path-overview .path-guide-portrait {
  background: #edf2e8 !important;
}

app-premium-concepts-screen.path-overview .pathway-stages {
  position: relative !important;
  z-index: 1 !important;
  padding-top: 5px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-header {
  grid-template-columns: 62px 88px minmax(0, 1fr) 16px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-header::before {
  left: 62px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-image,
app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="1"] .learning-path-stage-image,
app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="2"] .learning-path-stage-image,
app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="3"] .learning-path-stage-image,
app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="4"] .learning-path-stage-image,
app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="5"] .learning-path-stage-image,
app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="6"] .learning-path-stage-image,
app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="7"] .learning-path-stage-image,
app-premium-concepts-screen.path-overview .learning-path-stage[data-stage-index="8"] .learning-path-stage-image {
  width: 88px !important;
  height: 88px !important;
  border-radius: 24px !important;
}

/* Path overview spacing pass: match Figma's title/hero separation and top-pinned stage labels. */
app-premium-concepts-screen.path-overview .path-tab-header {
  padding: 30px 16px 8px !important;
  /* Don't let the flex column shrink the sticky header below its content, or the
     "Your Path / Every step forward matters" title overflows its opaque background
     and the stage cards show through behind it while scrolling. */
  flex-shrink: 0 !important;
}

app-premium-concepts-screen.path-overview .premium-copy {
  display: grid !important;
  gap: 2px !important;
}

app-premium-concepts-screen.path-overview .path-guide-hero {
  top: 0 !important;
  margin: 0 16px 16px !important;
}

app-premium-concepts-screen.path-overview .pathway-stages {
  padding-top: 0 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-copy {
  align-self: start !important;
  align-content: start !important;
  padding-top: 18px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage:first-child .learning-path-stage-copy {
  padding-top: 20px !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-district {
  display: block !important;
  margin: 0 !important;
}

app-premium-concepts-screen.path-overview .learning-path-stage-title,
app-premium-concepts-screen.path-overview .learning-path-stage-overview-description,
app-premium-concepts-screen.path-overview .learning-path-stage-overview-progress {
  margin: 0 !important;
}

/* Global mobile shell: match the Figma bottom tab bar as an opaque app layer. */
.global-bottom-nav {
  right: auto !important;
  bottom: 0 !important;
  left: 50% !important;
  width: min(100vw, var(--app-content-max)) !important;
  min-height: 82px !important;
  padding: 9px 12px max(20px, env(safe-area-inset-bottom)) !important;
  border: 0 !important;
  border-top: 1px solid #e8dfd3 !important;
  border-radius: 0 !important;
  background: #fcf8f2 !important;
  box-shadow: 0 -10px 24px rgba(61, 54, 41, 0.08) !important;
  transform: translateX(-50%) !important;
  backdrop-filter: none !important;
}

.global-bottom-nav .bottom-nav-item {
  min-height: 52px !important;
  padding: 5px 8px !important;
  border-radius: 24px !important;
  background: transparent !important;
  color: #6e6354 !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.055em !important;
  box-shadow: none !important;
}

.global-bottom-nav .bottom-nav-item.active {
  background: #ffeada !important;
  color: #d85e1b !important;
}

.global-bottom-nav .bottom-nav-glyph {
  width: 20px !important;
  height: 20px !important;
  color: currentColor !important;
}

/* ===== Daily Practice — SAT-style flow (Figma 171-*) ===== */

app-daily-practice-screen {
  background: #f7f2ea;
}

.dp-layout {
  display: block;
  height: 100%;
  padding: 0;
  overflow-y: auto;
  background: #f7f2ea;
}

.dp-shell {
  max-width: 411px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 16px calc(env(safe-area-inset-bottom, 0px) + 28px);
  position: relative;
}

.dp-shell::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 50%;
  z-index: 0;
  width: min(100vw, 411px);
  pointer-events: none;
  background:
    url("logo/Daily%20Practice%20Background.png?v=1") center top / cover no-repeat,
    #f7f2ea;
  transform: translateX(-50%);
}

.dp-shell > * {
  position: relative;
  z-index: 1;
}

.dp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #a39d92;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dp-eyebrow-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  line-height: 1;
  transform: translateY(-0.5px);
}

.dp-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #a39d92;
  cursor: pointer;
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
}

.dp-ic {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.14em;
}

/* --- Question phase --- */

.dp-question-content {
  padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
}

.dp-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #9a9590;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.dp-question-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.dp-progress {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: #e8e4de;
  overflow: hidden;
  margin-bottom: 0;
}

.dp-progress-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #3a352f;
  transition: width 0.25s ease;
}

.dp-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.dp-tool {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 7px 13px;
  border: 1px solid #ddd8d0;
  border-radius: 999px;
  background: #ffffff;
  color: #87816f;
  cursor: pointer;
  font: inherit;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dp-tool .dp-ic {
  font-size: 1rem;
}

.dp-tool-mark .dp-ic {
  font-size: 1.35rem;
}

.dp-tool.active {
  border-color: #3a352f;
  background: #3a352f;
  color: #ffffff;
}

.dp-tool-abc s {
  text-decoration-thickness: 2px;
}

.dp-passage,
.dp-passage-card {
  margin-bottom: 16px;
  padding: 17px;
  border: 1px solid #ddd8d0;
  border-radius: 16px;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 0.875rem;
  line-height: 1.62;
  /* Rhetorical-synthesis items render their note bullets on separate lines. */
  white-space: pre-line;
}

.dp-blank {
  display: inline-block;
  width: 52px;
  height: 15px;
  border-bottom: 2px solid #b9b3a7;
  border-radius: 4px;
  background: #e9e5dc;
  vertical-align: -2px;
}

.dp-prompt {
  margin: 0 0 8px;
  color: #1a1a1a;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.38;
}

.dp-choices {
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.dp-choice-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.dp-choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 16px;
  border: 1px solid #ddd8d0;
  border-radius: 24px;
  background: #ffffff;
  color: #1a1a1a;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.12s, border-color 0.12s;
}

.dp-choice-letter {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #f0ede8;
  color: #5a5550;
  font-size: 0.75rem;
  font-weight: 800;
}

.dp-choice-text {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.42;
}

.dp-choice.selected {
  border-color: #3a352f;
  background: #3a352f;
  color: #ffffff;
}

.dp-choice.selected .dp-choice-letter {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.dp-choice.eliminated {
  background: #ffffff;
  border-color: #ddd8d0;
  color: #b6b0a6;
}

.dp-choice.eliminated::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: #3a3530;
  transform: translateY(-50%);
  pointer-events: none;
}

.dp-choice.eliminated .dp-choice-text,
.dp-choice.eliminated .dp-choice-letter {
  color: #b0aaa4;
}

.dp-choice.eliminated .dp-choice-letter {
  background: #f0ede8;
  border: 0;
}

.dp-choice-restore {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid #ccc8c0;
  border-radius: 999px;
  background: transparent;
  color: #9a9590;
  cursor: pointer;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  position: relative;
}

.dp-choice-restore.eliminator::after {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  top: 50%;
  height: 2px;
  border-radius: 999px;
  background: #3a3530;
  transform: translateY(-50%);
  pointer-events: none;
}

.dp-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 70;
  width: min(calc(100vw - 32px), 379px);
  margin: 0;
  padding: 10px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(247, 242, 234, 0) 0%, rgba(247, 242, 234, 0.94) 24%, #f7f2ea 100%);
  transform: translateX(-50%);
}

.dp-nav-icon,
.dp-back {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 24px;
  background: #3a352f;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 1.15rem;
}

.dp-nav-review {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 52px;
  padding: 10px 18px;
  border: 1px solid #ddd8d0;
  border-radius: 24px;
  background: #ffffff;
  color: #3a352f;
  cursor: pointer;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 800;
}

.dp-next {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  min-height: 52px;
  padding: 12px 20px;
  border: 0;
  border-radius: 24px;
  background: #3a352f;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 800;
}

.dp-nav-start .dp-next {
  flex: 1 1 auto;
  min-height: 52px;
  font-size: 1rem;
}

.dp-nav-mid .dp-nav-icon,
.dp-nav-final .dp-nav-icon {
  border: 1px solid #ddd8d0;
  background: #ffffff;
  color: #3a352f;
}

.dp-nav-mid .dp-next {
  flex: 1 1 auto;
  min-height: 52px;
  font-size: 1rem;
}

.dp-nav-review-start {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
}

.dp-nav-review-mode {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 52px;
}

.dp-nav-review-mode .dp-nav-icon {
  border: 1px solid #ddd8d0;
  background: #ffffff;
  color: #3a352f;
}

.dp-nav-review-mode .dp-nav-review {
  border-color: #3a352f;
  background: #3a352f;
  color: #ffffff;
}

.dp-nav-final {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) minmax(112px, 0.96fr);
  align-items: start;
}

.dp-nav-final .dp-nav-review,
.dp-nav-submit {
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 24px;
  font-size: 1rem;
}

.dp-nav-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #3a352f;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.dp-wide {
  width: 100%;
}

.dp-ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 54px;
  padding: 12px 20px;
  border: 1px solid #e8e4dc;
  border-radius: 999px;
  background: #ffffff;
  color: #25211c;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
}

/* --- Review Summary --- */

.dp-h1 {
  margin: 0 0 14px;
  color: #1a1a1a;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.dp-center {
  text-align: center;
}

.dp-divider {
  height: 1px;
  margin: 4px 0 16px;
  background: #e5e1d8;
}

.dp-subhead {
  margin: 0 0 12px;
  color: #a39d92;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dp-chips {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.dp-chip {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 52px;
  padding: 8px 4px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: #ffffff;
  cursor: pointer;
  font: inherit;
}

.dp-chip-n {
  font-size: 1rem;
  font-weight: 800;
}

.dp-chip .dp-chip-glyph {
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  line-height: 1;
}

.dp-chip-answered {
  border-color: #6e8fa6;
  background: #6e8fa6;
  color: #ffffff;
}

.dp-chip-unanswered {
  border-color: #aaa8a4;
  border-style: dashed;
  background: #ffffff;
  color: #1a1a1a;
}

.dp-chip-marked {
  border-color: #ddd8d0;
  background: #ffffff;
  color: #1a1a1a;
}

.dp-chip.current {
  outline: 2px solid #3a3530;
  outline-offset: 2px;
}

.dp-summary-actions {
  display: grid;
  gap: 12px;
}

.dp-overlay-state {
  position: relative;
  min-height: calc(100dvh - 96px);
}

.dp-overlay-base {
  pointer-events: none;
}

.dp-overlay-state .dp-sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 80;
  width: min(100vw, 411px);
  min-height: 100dvh;
  margin: 0;
  left: 50%;
  transform: translateX(-50%);
}

.dp-sheet-wrap {
  position: relative;
  min-height: calc(100dvh - 96px);
  margin: -18px -4px -28px;
  display: flex;
  align-items: flex-end;
}

.dp-sheet-scrim {
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: rgba(46, 41, 35, 0.24);
  pointer-events: auto;
}

.dp-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: calc(100dvh - 52px);
  overflow-y: auto;
  padding: 10px 18px calc(env(safe-area-inset-bottom, 0px) + 22px);
  border: 1px solid #ddd8d0;
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: #f9f6ef;
  box-shadow: 0 -18px 44px rgba(58, 53, 47, 0.18);
  touch-action: pan-y;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.dp-sheet-handle {
  display: block;
  width: 44px;
  height: 5px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: #d8d2c7;
}

.dp-sheet .dp-h1 {
  margin-bottom: 16px;
}

.dp-sheet-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.dp-sheet-titlebar .dp-h1 {
  margin-bottom: 0;
}

.dp-sheet-close {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6b665f;
  cursor: pointer;
  font: inherit;
  font-size: 1.35rem;
  line-height: 1;
}

.dp-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 18px;
  color: #5f5a52;
  font-size: 0.72rem;
  font-weight: 800;
}

.dp-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.dp-legend-dot {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 999px;
  font-size: 0.63rem;
  line-height: 1;
}

.dp-legend-dot.answered {
  background: #6e8fa6;
}

.dp-legend-dot.unanswered {
  border: 1.5px dashed #aaa8a4;
  background: #ffffff;
}

.dp-legend-dot.marked {
  width: 20px;
  height: 20px;
  border: 1px solid #ddd8d0;
  background: #ffffff;
  color: #3a3530;
  font-size: 0.88rem;
}

.dp-review-marked .dp-ic {
  font-size: 1.35rem;
}

.dp-review-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 54px;
  padding: 12px 18px;
  border-radius: 24px;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
}

.dp-review-marked {
  border: 1px solid #ddd8d0;
  background: #f0f0ef;
  color: #3a3530;
}

.dp-review-unanswered {
  border: 1px solid #eed6ad;
  background: #fffaf1;
  color: #6f4c1e;
}

.dp-review-unanswered .dp-ic {
  font-size: 1.25rem;
  color: #c97c1a;
}

/* --- Confirm --- */

.dp-sheet-compact {
  padding-bottom: 24px;
}

.dp-submit-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 18px;
}

.dp-submit-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: 2px;
  border-radius: 999px;
  background: #3a352f;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(58, 53, 47, 0.16);
}

.dp-submit-icon-warning {
  background: #fef3e2;
  color: #c97c1a;
  box-shadow: none;
}

.dp-submit-icon .dp-ic {
  width: 20px;
  height: 20px;
  font-size: 1.25rem;
}

.dp-submit-copy {
  min-width: 0;
}

.dp-submit-copy .dp-h1 {
  margin-bottom: 1px;
}

.dp-confirm-sub {
  margin: 0;
  color: #9a9590;
  font-size: 0.875rem;
  line-height: 1.6;
}

/* --- Leave confirmation --- */

.dp-leave-confirming .dp-topbar {
  opacity: 0.42;
}

.dp-leave-state {
  display: grid;
  gap: 24px;
}

.dp-leave-base {
  max-height: 418px;
  overflow: hidden;
  opacity: 0.24;
  pointer-events: none;
  user-select: none;
}

.dp-leave-base .dp-nav {
  display: none;
}

.dp-leave-card {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: 100%;
  margin: 0 auto 22px;
  padding: 25px 20px;
  border: 1px solid #ddd8d0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(58, 53, 47, 0.08);
}

.dp-leave-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: #f4f2ef;
  color: #3a352f;
}

.dp-leave-icon .dp-ic {
  width: 24px;
  height: 24px;
}

.dp-leave-title,
.dp-leave-copy {
  margin: 0;
  text-align: center;
}

.dp-leave-title {
  color: #1a1a1a;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.55;
}

.dp-leave-copy {
  margin-top: -12px;
  color: #9a9590;
  font-size: 0.875rem;
  line-height: 1.45;
}

.dp-leave-actions {
  display: grid;
  gap: 8px;
  width: 100%;
  padding-top: 4px;
}

.dp-leave-primary,
.dp-leave-secondary {
  min-height: 52px;
  border-radius: 24px;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
}

.dp-leave-primary {
  border: 0;
  background: #3a352f;
  color: #ffffff;
}

.dp-leave-secondary {
  border: 1px solid #ddd8d0;
  background: #ffffff;
  color: #3a352f;
}

/* --- Companion completion --- */

.dp-complete {
  display: grid;
  justify-items: center;
  padding-top: 12px;
}

.dp-complete-portrait {
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin-bottom: 16px;
  border-radius: 999px;
  overflow: hidden;
  border: 3px solid;
}

.dp-complete-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.dp-theme-momo .dp-complete-portrait {
  border-color: #9bbd8e;
  background: #eef3e8;
}

.dp-theme-ember .dp-complete-portrait {
  border-color: #e8a878;
  background: #fbeee2;
}

.dp-complete .dp-h1 {
  margin-bottom: 16px;
}

.dp-quote-card {
  width: 100%;
  margin-bottom: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid;
}

.dp-theme-momo .dp-quote-card {
  border-color: #cfe0c8;
  background: #eef3e9;
}

.dp-theme-ember .dp-quote-card {
  border-color: #f0cfa9;
  background: #fdf3e9;
}

.dp-quote-says {
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.dp-theme-momo .dp-quote-says {
  color: #5a7a4a;
}

.dp-theme-ember .dp-quote-says {
  color: #c2680e;
}

.dp-quote-text {
  margin: 0;
  color: #3d3833;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.5;
}

.dp-score-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin-bottom: 16px;
}

.dp-score-chip {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 15px 8px 12px;
  border-radius: 18px;
  border: 1px solid transparent;
  color: #6f695f;
  font-size: 0.85rem;
  font-weight: 700;
}

.dp-score-correct {
  border-color: #c5ddc8;
  background: #e7f2e8;
}

.dp-score-correct .dp-score-num {
  color: #3f7d4a;
}

.dp-score-accuracy {
  border-color: #e7d391;
  background: #f9efd4;
}

.dp-score-accuracy .dp-score-num {
  color: #b9952a;
}

.dp-score-num {
  font-size: 1.4rem;
  font-weight: 800;
}

.dp-review-answers-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 56px;
  margin-bottom: 12px;
  padding: 12px 18px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 800;
}

.dp-theme-momo .dp-review-answers-btn {
  border: 0;
  background: #5a7a4a;
  color: #ffffff;
}

.dp-theme-ember .dp-review-answers-btn {
  border: 1px solid #f0b886;
  background: #fdf3e9;
  color: #c2680e;
}

/* --- Answers review + countdown --- */

.dp-countdown {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: #3a352f;
  color: #ffffff;
}

.dp-countdown-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1.1rem;
}

.dp-countdown-copy {
  display: grid;
  gap: 2px;
}

.dp-countdown-copy strong {
  font-size: 1rem;
  font-weight: 800;
}

.dp-countdown-copy span {
  color: #cfc9bf;
  font-size: 0.84rem;
  font-weight: 600;
}

.dp-results-hero {
  display: grid;
  gap: 16px;
  margin: 0 0 18px;
  padding: 20px;
  border-radius: 18px;
  background: #6e8fa6;
  box-shadow: none;
}

.dp-results-title {
  margin: 0;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.33;
}

.dp-result-marks {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dp-result-mark {
  display: grid;
  place-items: center;
  flex: 1 1 0;
  min-width: 0;
  max-width: 54.2px;
  height: 84px;
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.12);
  color: #ffffff;
  font-size: 1.25rem;
}

.dp-result-mark .result-cup {
  display: grid;
  place-items: center;
  width: 54.2px;
  height: 62px;
  opacity: 0;
  transform-origin: center bottom;
  animation: cupReveal 460ms cubic-bezier(0.2, 0.85, 0.25, 1.15) forwards;
  animation-delay: calc(var(--cup-index, 0) * 110ms);
}

.dp-result-mark .cup-icon {
  width: 84%;
  height: 84%;
  object-fit: contain;
}

/* Correct = full-colour mug; wrong = dimmed grayscale mug; blank = faint. */
.dp-result-mark.correct .cup-icon {
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.18));
}

.dp-result-mark:not(.correct) .cup-icon {
  filter: grayscale(1) brightness(1.08) opacity(0.55);
}

.dp-result-mark.unanswered .cup-icon {
  filter: grayscale(1) brightness(1.2) opacity(0.32);
}

@media (prefers-reduced-motion: reduce) {
  .dp-result-mark .result-cup {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

.dp-result-mark.correct {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.dp-result-mark.unanswered {
  background: rgba(0, 0, 0, 0.1);
  color: #ffffff;
}

.dp-results-percent {
  margin: -6px 0 0;
  color: #827a70;
  font-size: 0.86rem;
  font-weight: 700;
}

.dp-scorecard-bar {
  display: block;
  height: 6px;
  border-radius: 999px;
  background: #e3ddd3;
  overflow: hidden;
}

.dp-scorecard-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #3f7d4a;
}

.dp-review-heading {
  margin: 0 0 12px;
}

.dp-qreviews {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.dp-qreview {
  overflow: hidden;
  padding: 0;
  border-radius: 16px;
  border: 1px solid #ddd8d0;
  background: #ffffff;
}

/* Figma 206-3392: the whole card is tinted by outcome. */
.dp-qreview-correct {
  border-color: #d3ebda;
  background: #f4fbf7;
}

.dp-qreview-incorrect,
.dp-qreview-unanswered {
  border-color: #f4d9d4;
  background: #fff8f8;
}

.dp-qreview-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dp-qreview-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  font-size: 0.85rem;
}

/* Correct = solid dark-green badge with white check (Figma). */
.dp-qreview-correct .dp-qreview-mark {
  background: #1a5c38;
  color: #ffffff;
}

.dp-qreview-incorrect .dp-qreview-mark,
.dp-qreview-unanswered .dp-qreview-mark {
  background: #ffffff;
  border: 1.5px solid #e7b9b1;
  color: #c0493c;
}

.dp-qreview-title {
  flex: 1;
  color: #25211c;
  font-size: 1.02rem;
  font-weight: 800;
}

.dp-qstatus {
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.dp-qstatus.correct {
  background: #e3f0e4;
  color: #3f7d4a;
}

.dp-qstatus.incorrect {
  background: #f7e3df;
  color: #b9473d;
}

.dp-qstatus.unanswered {
  background: #fcefdd;
  color: #b96a0c;
}

.dp-qreview-text {
  margin: 0;
  color: #57514a;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-line;
}

.dp-qreview-question {
  display: grid;
  gap: 12px;
  padding: 12px 16px 14px;
}

.dp-qreview-question .dp-qreview-text {
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 14px;
  background: #ffffff;
}

.dp-qreview-prompt {
  margin: 0;
  color: #1a1a1a;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.38;
}

.dp-qreview-text .dp-blank {
  width: 40px;
  height: 12px;
}

.dp-answer-row {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 16px 10px;
  padding: 10px 13px;
  border-radius: 12px;
}

.dp-answer-correct {
  background: #e6f4ec;
}

.dp-answer-yours {
  background: #ffffff;
  border: 1px solid #f0cfc9;
}

.dp-answer-letter {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 800;
}

.dp-answer-correct .dp-answer-letter {
  background: #3f7d4a;
}

.dp-answer-yours .dp-answer-letter {
  background: #b9473d;
}

.dp-answer-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.dp-answer-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dp-answer-correct .dp-answer-label {
  color: #3f7d4a;
}

.dp-answer-yours .dp-answer-label {
  color: #b9473d;
}

.dp-answer-copy strong {
  color: #2f2a24;
  font-size: 0.94rem;
  font-weight: 800;
}

.dp-explanation {
  margin: 0 16px 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f0ede8;
}

.dp-explanation-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: #8d877d;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.dp-explanation-text {
  margin: 0;
  color: #57514a;
  font-size: 0.88rem;
  line-height: 1.55;
}

/* ===== Nook shop: keep the bottom sheet at app/mobile width ===== */

.nook-shop-panel {
  width: 100%;
  max-width: 411px;
  margin: 0 auto;
}

/* The points chip in the shop header (its old styles were dropped during the
   nook redesign, leaving the star + number unformatted). */
.nook-token-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fdf3df;
  color: #6b4a1c;
  font-size: 0.92rem;
  font-weight: 800;
  white-space: nowrap;
}

/* ===== Restore Purchase (Figma 171-1217; momo green / ember orange) ===== */

app-restore-purchase-screen {
  background: #f1efea;
}

.rp-layout {
  display: block;
  height: 100%;
  padding: 0;
  overflow-y: auto;
  background: #f1efea;
}

.rp-shell {
  display: grid;
  justify-items: center;
  max-width: 411px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 20px calc(env(safe-area-inset-bottom, 0px) + 26px);
}

.rp-back {
  justify-self: start;
  margin-bottom: 4px;
  padding: 6px 10px 6px 0;
  border: 0;
  background: none;
  color: #57514a;
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
}

.rp-portrait {
  height: 148px;
  width: auto;
  margin-bottom: 10px;
  object-fit: contain;
}

.rp-h1 {
  margin: 0 0 8px;
  color: #25211c;
  text-align: center;
  font-size: 1.55rem;
  font-weight: 800;
}

.rp-sub {
  margin: 0 0 18px;
  max-width: 34ch;
  color: #6f695f;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.5;
}

.rp-card {
  width: 100%;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #e8e4dc;
  border-radius: 18px;
  background: #ffffff;
}

.rp-card-label {
  margin: 0 0 10px;
  color: #a39d92;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.rp-step {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 9px 0;
  color: #3d3833;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
}

.rp-step + .rp-step {
  border-top: 1px solid #f0ede6;
}

.rp-step-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.rp-theme-momo .rp-step-icon {
  background: #eef3e9;
  color: #5a7a4a;
}

.rp-theme-ember .rp-step-icon {
  background: #fdf3e9;
  color: #c2680e;
}

.rp-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  width: 100%;
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #ece9e2;
  color: #6f695f;
  font-size: 0.84rem;
  line-height: 1.45;
}

.rp-note .dp-ic {
  flex: 0 0 auto;
  margin-top: 2px;
  font-size: 1rem;
}

.rp-cta {
  width: 100%;
  min-height: 54px;
  margin-bottom: 12px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  font-size: 1.02rem;
  font-weight: 800;
}

.rp-theme-momo .rp-cta {
  background: #5a7a4a;
}

.rp-theme-ember .rp-cta {
  background: #d4621a;
}

.rp-status {
  margin: 0 0 12px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 700;
}

.rp-status-ok {
  background: #e7f2e8;
  color: #3f7d4a;
}

.rp-status-warn {
  background: #fcefdd;
  color: #b96a0c;
}

.rp-help {
  margin: 0 0 6px;
  color: #6f695f;
  text-align: center;
  font-size: 0.84rem;
}

.rp-help a {
  color: inherit;
  font-weight: 700;
}

.rp-footer {
  margin: 0;
  color: #a39d92;
  text-align: center;
  font-size: 0.78rem;
}

/* ===== Bottom-sheet modals hide the tab bar (Figma 27-676) =====
   Any bottom panel that slides over the shell — the Profile switch-companion
   sheet and the Nook shop sheet — takes over the full viewport, so the global
   navigation bar disappears while it is open. */
body:has(.profile-guide-modal:not([hidden])) #global-bottom-nav,
body:has(.nook-shop-overlay:not([hidden])) #global-bottom-nav {
  display: none !important;
}

/* Paywall: low-key restore entry for store-billed subscribers (the production
   surface — a paying user blocked here should not have to dig into Profile). */
.paywall-restore-link {
  margin-top: 10px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: #6f695f;
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
