/* ============================================================
   SANKOFA COMPONENT LIBRARY
   Reusable UI components, ordered from smallest to largest.
   ============================================================ */

/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-charcoal);
  background: var(--color-white);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; text-decoration: none; }

/* ── TYPOGRAPHY UTILITIES ────────────────────────────────── */
.font-serif { font-family: var(--font-serif); }
.font-sans  { font-family: var(--font-sans); }

.kicker {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-kicker);
  text-transform: uppercase;
  color: var(--color-red);
}

.kicker--green {
  color: var(--color-green);
}

.section-heading {
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-green);
  line-height: 1.2;
}

.card-title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-dark);
  line-height: 1.25;
}

.body-text {
  font-size: var(--text-base);
  color: var(--color-charcoal);
  line-height: 1.55;
}

.body-sm {
  font-size: var(--text-sm);
  color: var(--color-charcoal-light);
}

.curator-credit {
  font-size: var(--text-sm);
  color: var(--color-charcoal-light);
  font-style: italic;
}

/* ── MEDALLION MOTIF ─────────────────────────────────────── */
/* Concentric rings: gold outer → green → red → gold center */
.medallion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.medallion--sm {
  width: 36px;
  height: 36px;
}

.medallion--lg {
  width: 80px;
  height: 80px;
}

/* SVG medallion is rendered inline — sizing handled per context */

/* ── ICON CIRCLES ────────────────────────────────────────── */
.icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--color-green);
  color: var(--color-white);
  flex-shrink: 0;
}

.icon-circle svg { width: 24px; height: 24px; }

.icon-circle--sm {
  width: 36px;
  height: 36px;
}

.icon-circle--sm svg { width: 18px; height: 18px; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-weight: var(--weight-bold);
  font-size: var(--text-base);
  line-height: 1;
  transition: all var(--duration-fast) var(--ease-standard);
  cursor: pointer;
  border: none;
}

/* Primary CTA — gold fill, dark green text */
.btn--primary {
  width: 100%;
  background: var(--color-gold);
  color: var(--color-green-dark);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
}

.btn--primary:hover {
  background: var(--color-gold-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn--primary svg {
  width: 18px;
  height: 18px;
}

/* Secondary / outline */
.btn--outline {
  background: transparent;
  border: 1.5px solid var(--color-warm-border);
  color: var(--color-charcoal);
}

.btn--outline:hover {
  border-color: var(--color-green);
  color: var(--color-green);
}

/* Ghost — text only with underline */
.btn--ghost {
  background: transparent;
  color: var(--color-green);
  padding: var(--space-2) var(--space-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Clear filters */
.btn--clear {
  background: var(--color-gold);
  color: var(--color-green-dark);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--color-light-fill);
  border: 1px solid var(--color-warm-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
}

/* No accent stripe anywhere — strictly enforced */

.card--flat {
  box-shadow: none;
}

.card--elevated {
  box-shadow: var(--shadow-sm);
}

/* ── FORMAT BADGE (Audio + Text pill) ───────────────────── */
.format-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-green);
  color: var(--color-green);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

/* ── STATUS BADGE ────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.status-badge--nearby {
  background: #E8F5EE;
  color: var(--color-green);
  border: 1px solid #B3D9C5;
}

.status-badge--unlocked {
  background: #E8F5EE;
  color: var(--color-green);
}

/* ── CHECKPOINT PROGRESS LINE ────────────────────────────── */
.checkpoint-progress {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-charcoal-light);
}

.checkpoint-progress svg {
  width: 20px;
  height: 20px;
  color: var(--color-green);
  flex-shrink: 0;
}

/* ── AUDIO PLAYER ────────────────────────────────────────── */
.audio-player {
  background: var(--color-light-fill);
  border: 1px solid var(--color-warm-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.audio-player__title {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-green);
  text-align: center;
  margin-bottom: var(--space-1);
}

.audio-player__narrator {
  font-size: var(--text-sm);
  color: var(--color-charcoal-light);
  text-align: center;
  font-style: italic;
  margin-bottom: var(--space-5);
}

.audio-player__timeline {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.audio-player__time {
  font-size: var(--text-xs);
  color: var(--color-charcoal-light);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.audio-player__progress {
  flex: 1;
  height: 4px;
  background: var(--color-warm-border);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  overflow: visible;
}

.audio-player__progress-fill {
  height: 100%;
  background: var(--color-green);
  border-radius: var(--radius-full);
  position: relative;
  transition: width 0.1s linear;
}

.audio-player__progress-thumb {
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 13px;
  height: 13px;
  border-radius: var(--radius-full);
  background: var(--color-green);
  box-shadow: 0 0 0 2px var(--color-white), 0 0 0 4px var(--color-green);
}

.audio-player__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
}

.audio-ctrl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-green);
  padding: var(--space-2);
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-standard);
}

.audio-ctrl-btn:hover {
  background: rgba(4, 106, 56, 0.08);
}

.audio-ctrl-btn svg { width: 28px; height: 28px; }

.audio-ctrl-btn--play {
  width: 56px;
  height: 56px;
  background: var(--color-green);
  color: var(--color-white);
  border-radius: var(--radius-full);
  padding: 0;
}

.audio-ctrl-btn--play:hover {
  background: var(--color-green-dark);
}

.audio-ctrl-btn--play svg { width: 24px; height: 24px; }

/* Dungeon checkpoint — muted play button */
.is-dungeon .audio-ctrl-btn--play {
  background: #4A5568;
}

.is-dungeon .audio-ctrl-btn--play:hover {
  background: #374151;
}

/* Transcript toggle */
.transcript-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--color-warm-border);
  margin: var(--space-4) calc(-1 * var(--space-5)) calc(-1 * var(--space-5));
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  cursor: pointer;
  transition: background var(--duration-fast);
}

.transcript-toggle:hover {
  background: rgba(4, 106, 56, 0.04);
}

.transcript-toggle__label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-green);
}

.transcript-toggle__label svg { width: 18px; height: 18px; }

.transcript-toggle__chevron {
  color: var(--color-charcoal-light);
  transition: transform var(--duration-base) var(--ease-standard);
}

.transcript-toggle__chevron svg { width: 18px; height: 18px; }

.transcript-toggle[aria-expanded="true"] .transcript-toggle__chevron {
  transform: rotate(180deg);
}

.transcript-body {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-charcoal);
  line-height: 1.65;
  border-top: 1px solid var(--color-warm-border);
   white-space: pre-line;
  display: none;
}

.transcript-body.is-open {
  display: block;
}

/* ── WEAK-SIGNAL BANNER ──────────────────────────────────── */
.weak-signal-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  border: 1.5px solid #F59E0B;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-charcoal);
}

.weak-signal-banner svg {
  width: 20px;
  height: 20px;
  color: #F59E0B;
  flex-shrink: 0;
}

.weak-signal-banner a {
  color: var(--color-green);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: var(--weight-semibold);
}

/* ── BADGE ITEM ──────────────────────────────────────────── */
.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-4);
  background: var(--color-light-fill);
  border: 1px solid var(--color-warm-border);
  border-radius: var(--radius-lg);
  text-align: center;
}

.badge-item__circle {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-green-dark);
}

.badge-item__circle svg {
  width: 36px;
  height: 36px;
}

.badge-item--locked .badge-item__circle {
  background: var(--color-locked-bg);
  color: var(--color-locked);
}

.badge-item__name {
  font-family: var(--font-serif);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  color: var(--color-charcoal);
}

.badge-item--locked .badge-item__name {
  color: var(--color-locked);
}

.badge-item__meaning {
  font-size: var(--text-xs);
  color: var(--color-charcoal-light);
  font-style: italic;
}

.badge-item--locked .badge-item__meaning {
  color: var(--color-locked);
}

/* ── STORY CARD (Voices library) ─────────────────────────── */
.story-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  background: var(--color-light-fill);
  border: 1px solid var(--color-warm-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: box-shadow var(--duration-fast) var(--ease-standard),
              transform var(--duration-fast) var(--ease-standard);
  text-align: left;
  width: 100%;
}

.story-card:hover {
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.story-card__icon {
  flex-shrink: 0;
}

.story-card__body {
  flex: 1;
  min-width: 0;
}

.story-card__origin {
  /* kicker styles applied inline */
  margin-bottom: var(--space-1);
}

.story-card__title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-dark);
  line-height: 1.25;
  margin-bottom: var(--space-2);
}

.story-card__desc {
  font-size: var(--text-sm);
  color: var(--color-charcoal);
  line-height: 1.5;
  margin-bottom: var(--space-3);
}

.story-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-2);
}

.read-time {
  font-size: var(--text-sm);
  color: var(--color-charcoal-light);
}

.story-card__curator {
  font-size: var(--text-sm);
  color: var(--color-charcoal-light);
  font-style: italic;
}

/* ── COMING SOON / PLACEHOLDER STORY CARD ────────────────── */
.tag-coming-soon {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: #FEF3C7;
  color: #92400E;
  font-size: 0.6875rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid #FDE68A;
}

.story-card--placeholder {
  opacity: 0.94;
  border-style: dashed;
}

.story-card--placeholder:hover {
  opacity: 1;
}

.story-card__characters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-2);
}

.char-chip {
  font-size: 0.6875rem;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: rgba(4, 106, 56, 0.08);
  color: var(--color-green);
  font-weight: var(--weight-medium);
}

.voices-curator-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-1) 0;
}

.toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-warm-border);
  background: var(--color-white);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-charcoal);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.toggle-btn:hover {
  border-color: var(--color-green);
}

.toggle-btn.is-active {
  background: #FEF3C7;
  border-color: #F59E0B;
  color: #92400E;
}


/* ── FILTER PILLS ────────────────────────────────────────── */
.filter-pills {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-1);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-pills::-webkit-scrollbar { display: none; }

.filter-pill {
  flex-shrink: 0;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-warm-border);
  background: var(--color-white);
  color: var(--color-charcoal);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-standard);
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--color-green);
  color: var(--color-green);
}

.filter-pill.is-active {
  background: var(--color-green);
  color: var(--color-white);
  border-color: var(--color-green);
}

/* ── SEARCH BAR ──────────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  border: 1.5px solid var(--color-warm-border);
  border-radius: var(--radius-full);
  transition: border-color var(--duration-fast);
}

.search-bar:focus-within {
  border-color: var(--color-green);
}

.search-bar svg {
  width: 18px;
  height: 18px;
  color: var(--color-charcoal-light);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  color: var(--color-charcoal);
}

.search-bar input::placeholder {
  color: var(--color-charcoal-light);
}

/* ── NUMBERED LESSON LIST ────────────────────────────────── */
.lesson-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.lesson-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}

.lesson-item__number {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-green);
  color: var(--color-white);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lesson-item__text {
  font-size: var(--text-base);
  color: var(--color-charcoal);
  line-height: 1.55;
  padding-top: 4px;
}

/* ── WISDOM PANEL CARDS ──────────────────────────────────── */
.wisdom-card {
  background: var(--color-light-fill);
  border: 1px solid var(--color-warm-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.wisdom-card__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-kicker);
  text-transform: uppercase;
  color: var(--color-green);
  margin-bottom: var(--space-2);
}

.wisdom-card__heading {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--color-dark);
  margin-bottom: var(--space-3);
}

.wisdom-card__body {
  font-size: var(--text-sm);
  color: var(--color-charcoal);
  line-height: 1.65;
}

/* ── THINK-ABOUT-IT QUESTIONS ────────────────────────────── */
.reflection-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.reflection-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--color-light-fill);
  border: 1px solid var(--color-warm-border);
  border-radius: var(--radius-md);
}

.reflection-item__dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  flex-shrink: 0;
  margin-top: 7px;
}

.reflection-item__text {
  font-size: var(--text-base);
  color: var(--color-charcoal);
  font-style: italic;
  line-height: 1.5;
}

/* ── PROFILE SECTIONS ────────────────────────────────────── */
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--color-green);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
}

.progress-bar {
  height: 6px;
  background: var(--color-warm-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar__fill {
  height: 100%;
  background: var(--color-green);
  border-radius: var(--radius-full);
  transition: width var(--duration-slow) var(--ease-enter);
}

/* ── SAVED-STORY COMPACT LIST ────────────────────────────── */
.saved-story-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  border-bottom: 1px solid var(--color-warm-border);
}

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

.saved-story-row__icon {
  flex-shrink: 0;
}

.saved-story-row__body { flex: 1; min-width: 0; }

.saved-story-row__title {
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  color: var(--color-charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.saved-story-row__origin {
  font-size: var(--text-xs);
  color: var(--color-charcoal-light);
}

.bookmark-btn {
  color: var(--color-charcoal-light);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: color var(--duration-fast);
}

.bookmark-btn.is-saved {
  color: var(--color-gold-dark);
}

.bookmark-btn svg { width: 20px; height: 20px; }

/* ── SOCIAL PROOF ROW ────────────────────────────────────── */
.social-proof {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--color-light-fill);
  border: 1px solid var(--color-warm-border);
  border-radius: var(--radius-lg);
}

.social-proof__avatars {
  display: flex;
  margin-right: var(--space-1);
}

.social-proof__avatars span {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--color-green);
  border: 2px solid var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 10px;
  font-weight: var(--weight-bold);
  margin-left: -6px;
}

.social-proof__avatars span:first-child { margin-left: 0; }

.social-proof__text {
  font-size: var(--text-sm);
  color: var(--color-charcoal);
}

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-12) var(--space-6);
  gap: var(--space-4);
}

.empty-state__illustration {
  width: 120px;
  height: 120px;
  margin-bottom: var(--space-2);
}

.empty-state__title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-charcoal);
}

.empty-state__body {
  font-size: var(--text-base);
  color: var(--color-charcoal-light);
  max-width: 280px;
  line-height: 1.6;
}

/* ── HERO SECTION ────────────────────────────────────────── */
.hero {
  background: linear-gradient(160deg, #1E160D 0%, #2B1F14 50%, #1E160D 100%);
  color: var(--color-white);
  padding: var(--space-10) var(--space-6) var(--space-8);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(30,22,13,0.5) 0%, rgba(30,22,13,0.78) 60%, rgba(30,22,13,0.94) 100%),
    linear-gradient(105deg, rgba(252,209,22,0.22) 0%, rgba(4,106,56,0.16) 50%, rgba(206,17,38,0.2) 100%);
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__heading {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: var(--weight-extrabold);
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

.hero__sub {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.65);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* Route Complete hero variant */
.hero--route-complete {
  padding: var(--space-8) var(--space-6);
}
.hero --voices{
  size: 500px;
}

.hero--route-complete .hero__kicker {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.85);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-kicker);
  text-transform: uppercase;
  padding: var(--space-1) var(--space-4);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-3);
}

.hero--route-complete .hero__heading {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-2);
}

.hero--route-complete .hero__subtitle-gold {
  color: var(--color-gold);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  font-family: var(--font-serif);
}

/* ── MAP CONTAINER ───────────────────────────────────────── */
.map-container {
  background: var(--color-warm-bg);
  border: 1px solid var(--color-warm-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.map-legend {
  display: flex;
  gap: var(--space-5);
  padding: var(--space-3) var(--space-4);
  background: var(--color-white);
  border-top: 1px solid var(--color-warm-border);
}

.map-legend__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-charcoal-light);
}

.map-legend__dot {
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.map-legend__dot--nearby   { background: var(--color-gold); }
.map-legend__dot--locked   { background: #B0A898; }

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  position: sticky;
  top: 0;
  z-index: var(--z-nav);
  height: var(--header-height);
  background: var(--color-green);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-5);
  gap: var(--space-3);
  flex-shrink: 0;
}

.page-header__title {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--color-white);
  flex: 1;
  text-align: center;
  letter-spacing: var(--tracking-wide);
}

.page-header__btn {
  color: var(--color-white);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
}

.page-header__btn:hover {
  background: rgba(255,255,255,0.12);
}

.page-header__btn svg { width: 22px; height: 22px; }

/* ── BOTTOM NAV ──────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-white);
  border-top: 1px solid var(--color-warm-border);
  display: flex;
  align-items: stretch;
  z-index: var(--z-nav);
  box-shadow: 0 -2px 12px rgba(30, 22, 13, 0.06);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-2) 0;
  cursor: pointer;
  position: relative;
  transition: color var(--duration-fast);
  border: none;
  background: transparent;
}

.nav-item__dot {
  position: absolute;
  top: 6px;
  width: 5px;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--color-gold);
  opacity: 0;
  transition: opacity var(--duration-fast);
}

.nav-item.is-active .nav-item__dot {
  opacity: 1;
}

.nav-item svg {
  width: 24px;
  height: 24px;
  color: #9E9E9E;
  transition: color var(--duration-fast);
}

.nav-item.is-active svg {
  color: var(--color-green);
}

.nav-item__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: #9E9E9E;
  transition: color var(--duration-fast), font-weight var(--duration-fast);
}

.nav-item.is-active .nav-item__label {
  color: var(--color-green);
  font-weight: var(--weight-bold);
}

/* ── LEFT SIDEBAR (desktop) ──────────────────────────────── */
.sidebar {
  display: none; /* hidden on mobile — shown by CSS media query */
}

/* ── PAGE TRANSITIONS ────────────────────────────────────── */
.page {
  display: none;
  opacity: 0;
  min-height: calc(100dvh - var(--nav-height));
  flex-direction: column;
}

.page.is-active {
  display: flex;
  animation: fadeIn var(--duration-base) var(--ease-enter) forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Scroll area within a page (below sticky header) */
.page-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-height) + var(--space-4));
}

/* Section padding */
.section {
  padding: var(--space-6) var(--space-5);
}

.section + .section {
  padding-top: 0;
}

.section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

/* ── CHECKPOINT MAP PIN (SVG overlay items) ──────────────── */
.map-pin-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  fill: var(--color-charcoal);
}

/* ── VIDEO PLACEHOLDER ───────────────────────────────────── */
.video-player {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-dark);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-player__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30,22,13,0.4);
}

.video-play-btn {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.9);
  color: var(--color-green);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--duration-fast);
}

.video-play-btn:hover {
  transform: scale(1.08);
}

.video-play-btn svg { width: 28px; height: 28px; }

/* ── DUNGEON-SPECIFIC OVERRIDES ──────────────────────────── */
/* Applied to the checkpoint detail when id=dungeon */
.checkpoint-dungeon-context .card-title {
  color: var(--color-charcoal); /* not full green — subdued */
}

.checkpoint-dungeon-context .audio-player__title {
  color: #3D5A4E; /* muted green */
}

.checkpoint-dungeon-context .status-badge--nearby {
  background: #EEE8E0;
  color: #5C5048;
  border-color: #C4B8A8;
}

/* ============================================================
   BEFORE / AFTER PHOTO COMPARE
   ============================================================ */
.photo-compare {
  margin: 1.25rem 0 1.5rem;
}

.photo-compare__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--color-warm-bg);
  border: 1px solid var(--color-warm-border);
  user-select: none;
}

.photo-compare__layer {
  position: absolute;
  inset: 0;
}

.photo-compare__layer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-compare__fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  background: var(--color-locked-bg);
  color: var(--color-charcoal-light);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  line-height: 1.4;
  padding: 1rem;
}

.photo-compare__fallback span {
  display: block;
  font-weight: var(--weight-regular);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-charcoal-light);
  opacity: 0.75;
  margin-top: 0.25rem;
}

[data-photo-before-wrap] {
  clip-path: inset(0 50% 0 0);
}

.photo-compare__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  pointer-events: none;
  transform: translateX(-50%);
}

.photo-compare__handle::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--color-gold);
  transform: translateX(-50%);
}

.photo-compare__grip {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  color: var(--color-dark);
}

.photo-compare__grip svg {
  width: 12px;
  height: 12px;
}

.photo-compare__label {
  position: absolute;
  top: 0.6rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(30, 22, 13, 0.72);
  color: var(--color-white);
  pointer-events: none;
}

.photo-compare__label--before { left: 0.6rem; }
.photo-compare__label--after  { right: 0.6rem; }

.photo-compare__range {
  width: 100%;
  margin-top: 0.75rem;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-warm-border);
  outline: none;
}

.photo-compare__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-gold);
  border: 2px solid var(--color-white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.photo-compare__range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-gold);
  border: 2px solid var(--color-white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

/* Dungeon: quieter accent, no gold flourish */
.checkpoint-dungeon-context .photo-compare__handle::before {
  background: var(--color-dungeon-text);
}

.checkpoint-dungeon-context .photo-compare__grip {
  background: var(--color-dungeon-text);
  color: var(--color-white);
}
/* Checkpoint pin: toggleable active ring */
.checkpoint-pin__active-ring {
  opacity: 0;
  transition: opacity 0.15s ease;
}
[data-checkpoint-pin].is-active .checkpoint-pin__active-ring {
  opacity: 1;
}


/* Story illustration */
.story-illustration {
  margin: 1.25rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--color-warm-bg);
  border: 1px solid var(--color-warm-border);
  position: relative;
}
.story-illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.story-illustration__fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  background: var(--color-locked-bg);
  color: var(--color-charcoal-light);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-align: center;
  padding: 1rem;
}
.badge-item__circle img,
.profile-badge-item__circle img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  display: block;
}
.badge{
  border: #E8F5EE 5px;
  border-radius: 30px;
}