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

:root {
  --bg: #F6F8FB;
  --surface: #FFFFFF;
  --surface-hover: #F6F8FB;
  --border: #D7E0EA;
  --divider: #E5EAF1;

  --text: #002B48;
  --text-muted: #4B5563;
  --text-tertiary: #6B7280;

  /* UN brand blue */
  --accent: #009EDB;
  --accent-brand: #009EDB;
  --accent-hover: #008BC3;
  --accent-soft: rgba(0, 158, 219, 0.12);
  --info-soft: rgba(0, 158, 219, 0.12);
  --accent-glow: rgba(0, 158, 219, 0.18);
  --accent-border-soft: rgba(0, 158, 219, 0.25);

  --success: #4ADE80;
  --warning: #FBBF24;
  --danger: #D94A3A;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 10px 30px rgba(0, 43, 72, 0.12);
  --sheet-shadow: 0 -4px 24px rgba(0, 43, 72, 0.10);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --sheet-peek: 92px;
}

.hidden {
  display: none !important;
}

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── Toast notification ─────────────────────────────── */

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  max-width: 360px;
  width: calc(100% - 32px);
  box-shadow: var(--shadow);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.toast.visible {
  transform: translateX(-50%) translateY(0);
}

.toast.hidden {
  transform: translateX(-50%) translateY(-120%);
}

.toast-icon {
  font-size: 22px;
  color: var(--accent);
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: 50%;
}

.toast-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  flex-shrink: 0;
}

/* ── Toast photos button ────────────────────────────── */

.toast-photos-btn {
  margin-top: 6px;
  background: none;
  border: 1px solid var(--accent-brand);
  color: var(--accent-brand);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.toast-photos-btn:hover {
  background: var(--accent-brand);
  color: #fff;
}

/* ── Gallery (sheet) ─────────────────────────────────────────────── */

.gallery-sheet-card {
  overflow: hidden;
  padding-bottom: calc(16px + var(--safe-bottom));
}

.gallery-topbar {
  padding: 12px 16px 12px;
  display: grid;
  grid-template-columns: 1fr auto auto 44px;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
}

.gallery-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 22px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.gallery-count {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
  padding-right: 2px;
  text-align: right;
}

.gallery-close {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-video-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--accent-border-soft);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.gallery-video-btn svg {
  flex-shrink: 0;
}

.gallery-body {
  flex: 1;
  min-height: 0;
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

/* Video mode: the gallery becomes a dedicated video player (no photo caption/strip UI). */
#gallery-screen.is-video .gallery-count,
#gallery-screen.is-video .gallery-dots,
#gallery-screen.is-video .gallery-caption,
#gallery-screen.is-video .gallery-thumbs {
  display: none !important;
}

#gallery-screen.is-video .gallery-body {
  gap: 10px;
}

.gallery-video-controls {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px 12px;
  box-shadow: 0 6px 18px rgba(0, 43, 72, 0.06);
}

.gallery-video-controls.hidden {
  display: none;
}

.gallery-video-progress-row {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.gallery-video-time {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.gallery-video-progress-wrap {
  width: 100%;
}

.gallery-video-progress {
  width: 100%;
  height: 6px;
  appearance: none;
  background: #E6EDF4;
  border-radius: 999px;
  outline: none;
}

.gallery-video-progress::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 10px rgba(0, 43, 72, 0.18);
}

.gallery-video-progress::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 10px rgba(0, 43, 72, 0.18);
}

.gallery-video-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.gallery-video-btn2 {
  height: 44px;
  min-width: 56px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #F7FAFD;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.gallery-video-btn2--play {
  min-width: 56px;
  width: 56px;
  height: 56px;
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-size: 18px;
}

.gallery-hero {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #E8EEF4;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 43, 72, 0.08);
  position: relative;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding-top: 2px;
}

.gallery-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(0, 43, 72, 0.18);
}

.gallery-dot.active {
  background: var(--accent);
}

.gallery-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.gallery-hero img.hidden {
  display: none;
}

.gallery-hero .gallery-video {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center center;
  background: #0b1220;
}

.gallery-hero .gallery-video.hidden {
  display: none;
}

.gallery-caption {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.gallery-eyebrow {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 4px;
}

.gallery-image-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  line-height: 22px;
  margin-bottom: 6px;
}

.gallery-image-caption {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.gallery-thumb {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumb.active {
  border: 2px solid var(--accent);
}

/* ── Photo Viewer (optional enlarge) ─────────────────── */

.photo-viewer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
}

.photo-viewer.hidden {
  display: none;
}

.photo-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.photo-viewer-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top));
}

.photo-viewer-close {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.photo-viewer-body {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px calc(16px + env(safe-area-inset-bottom));
}

#photo-viewer-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 18px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.04);
}

/* ── Progress Rings ─────────────────────────────────── */

.progress-rings {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 100;
  width: 66px;
  height: 66px;
  cursor: pointer;
  filter: drop-shadow(0 2px 8px rgba(0,43,72,0.14));
  transition: transform 0.15s;
}

.progress-rings:hover {
  transform: scale(1.06);
}

.progress-rings svg text {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ring-progress-seg {
  opacity: 0;
}

.ring-progress-seg.filled {
  opacity: 1;
}

/* ── Progress Sheet (Prototype match) ───────────────────────────── */

#rings-sheet .overlay-sheet-backdrop {
  background: rgba(0, 43, 72, 0.30);
  backdrop-filter: blur(2px);
}

#rings-sheet .overlay-sheet-card {
  border-top: none;
  border: 1px solid #D7E0EA;
  box-shadow: 0 -4px 24px rgba(0, 43, 72, 0.10);
  border-radius: 20px 20px 0 0;
}

#rings-sheet .overlay-sheet-header {
  border-bottom: 1px solid #D7E0EA;
  margin-bottom: 0;
  flex-shrink: 0;
}

#rings-sheet .overlay-sheet-title {
  color: #002B48;
}

#rings-sheet .rings-detail-body.progress-sheet.rings-progress-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 10px 12px 8px;
  gap: 0;
}

#rings-sheet .badges-detail {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 18px;
}

#rings-sheet .badges-detail-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border);
}

#rings-sheet .badges-back-btn {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid #D7E0EA;
  background: #ffffff;
  color: #3E4A57;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

#rings-sheet .badges-detail-title {
  font-size: 16px;
  font-weight: 800;
  color: #002B48;
  letter-spacing: -0.01em;
}

#rings-sheet .badges-detail-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#rings-sheet .badges-section-title {
  font-size: 13px;
  font-weight: 700;
  color: #3E4A57;
  margin: 0 0 10px;
}

#rings-sheet .badges-completed-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}

#rings-sheet .badges-completed-row {
  display: flex;
  gap: 12px;
  padding: 2px 2px 0;
  min-width: max-content;
}

#rings-sheet .badge-card {
  width: 132px;
  border: 1px solid #D7E0EA;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 43, 72, 0.08);
  padding: 10px 10px 8px;
  display: grid;
  gap: 8px;
  justify-items: center;
}

#rings-sheet .badge-card-icon-wrap {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  position: relative;
}

#rings-sheet .badge-card-icon {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

#rings-sheet .badge-card-center-icon {
  position: absolute;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  opacity: 0.95;
}

#rings-sheet .badge-card-center-icon--steps {
  object-fit: contain;
  filter: saturate(0) brightness(0.1);
}

#rings-sheet .badge-card-center-icon--stop svg {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

#rings-sheet .badge-card-name {
  font-size: 12px;
  font-weight: 700;
  color: #002B48;
  text-align: center;
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#rings-sheet .badge-card-more {
  width: 100%;
  border: none;
  background: transparent;
  padding: 6px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #6B7786;
  border-top: 1px solid #E2E8F0;
  cursor: pointer;
}

#rings-sheet .badges-scrollbar {
  /* Avoid "double scrollbars": the row itself already scrolls horizontally. */
  display: none;
  height: 6px;
  border-radius: 999px;
  background: #D7E0EA;
  margin: 8px 2px 0;
  position: relative;
  overflow: hidden;
}

#rings-sheet .badges-scrollbar-thumb {
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: #2F3A45;
  transform: translateX(0);
}

#rings-sheet .badges-uncompleted-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

#rings-sheet .badge-blank {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid #D7E0EA;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(0, 43, 72, 0.06);
}

#rings-sheet .rings-awards-grid.is-steps-only {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  justify-items: center;
}

@media (min-width: 400px) {
  #rings-sheet .rings-awards-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

#rings-sheet .award-tile-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  min-width: 0;
}

#rings-sheet .award-tile {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#rings-sheet .award-tile.is-locked {
  border: 1.5px solid #CBD5E1;
  background: #E6EDF4;
}

#rings-sheet .award-tile.is-earned {
  border: 1.5px solid #CBD5E1;
  background: #ffffff;
}

#rings-sheet .award-tile-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}

#rings-sheet .award-tile-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

#rings-sheet .award-tile-col {
  gap: 6px;
}

#rings-sheet .rings-progress-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 8px;
}

#rings-sheet .rings-progress-main .progress-sheet-top {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  margin: 0;
  gap: 8px;
}

#rings-sheet .rings-progress-main .progress-stops-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#rings-sheet .rings-progress-main .progress-stops-summary {
  flex-shrink: 0;
  padding: 8px 12px;
}

#rings-sheet .rings-progress-main .progress-stops-caption {
  font-size: 16px;
}

#rings-sheet .rings-progress-main .progress-timeline {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 4px 10px 6px;
}

#rings-sheet .rings-progress-main .timeline-node {
  padding: 3px 0;
}

#rings-sheet .rings-progress-main .timeline-node:not(:last-child)::after {
  top: 16px;
  bottom: -6px;
}

#rings-sheet .rings-progress-main .timeline-title {
  font-size: 12px;
}

#rings-sheet .rings-progress-main .timeline-status {
  font-size: 11px;
}

#rings-sheet .rings-progress-main .progress-steps-summary {
  flex-shrink: 0;
  padding: 8px 10px 10px;
}

#rings-sheet .rings-progress-main .progress-sheet-note {
  flex-shrink: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
}

#rings-sheet .rings-progress-main .btn-primary-wide {
  flex-shrink: 0;
}

#rings-sheet .rings-progress-main .progress-sheet-footnote {
  flex-shrink: 0;
  margin-bottom: 0;
  padding-bottom: 2px;
}

.progress-sheet {
  padding: 16px 16px 0;
}

.progress-sheet-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 6px 0 10px;
}

.progress-top-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  align-items: stretch;
}

@media (max-width: 360px) {
  .progress-top-cards {
    grid-template-columns: 1fr;
  }
}

.progress-stops-card {
  background: #F6F8FB;
  border: 1px solid #D7E0EA;
  border-radius: 12px;
  overflow: hidden;
}

.progress-tour-head {
  padding: 12px 14px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.progress-tour-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.progress-stops-summary {
  padding: 10px 14px 12px;
  text-align: left;
  border-top: 1px solid #D7E0EA;
}

.tour-graph {
  position: relative;
  flex: 1;
  min-height: 190px;
  /* Tighter padding so all 7 nodes fit on small screens. */
  padding: 12px 12px 12px;
  overflow: hidden;
  /* Responsive node sizing: ensures 7 columns fit without clipping. */
  --tour-node-size: clamp(44px, 12vw, 58px);
  /* Control node spacing explicitly (reduces default spread of 1fr columns). */
  /* Reduced ~50% vs prior spacing to match the provided red-grid guide. */
  --tour-node-gap-x: clamp(1px, 0.55vw, 3px);
  --tour-node-gap-y: clamp(6px, 1.1vw, 9px);
}

.tour-graph-lines {
  position: absolute;
  /* Slightly smaller inset so the left/right outer margins match the comp. */
  inset: 10px;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.tour-graph-nodes {
  position: absolute;
  /* Keep nodes and lines aligned by sharing the same inset. */
  inset: 10px;
  width: 100%;
  height: 100%;
  z-index: 2;
  /* Exact grid: 7 columns, 4 rows
     - Row 1: top labels
     - Rows 2–3: stop circles (zig-zag)
     - Row 4: bottom labels */
  display: grid;
  /* Use fixed node-sized tracks + explicit gaps to match the provided grid layout. */
  grid-template-columns: repeat(7, var(--tour-node-size));
  grid-template-rows: 28px var(--tour-node-size) var(--tour-node-size) 28px;
  column-gap: var(--tour-node-gap-x);
  row-gap: var(--tour-node-gap-y);
  justify-content: center;
  align-items: stretch;
  justify-items: stretch;
}

.tour-node {
  position: relative;
  transform: none;
  /* Each node spans all rows so the label can live in the outer rows,
     while the circle sits in the inner rows. */
  grid-row: 1 / span 4;
  display: grid;
  grid-template-rows: 28px var(--tour-node-size) var(--tour-node-size) 28px;
  align-items: center;
  justify-items: center;
  gap: 0;
  color: var(--accent);
}

.tour-node-label {
  font-size: 11px;
  font-weight: 600;
  color: #7B8289;
  line-height: 1.2;
  /* Keep labels inside their grid column on small screens. */
  max-width: calc(var(--tour-node-size) + 14px);
  text-align: center;
  /* Match the Figma map: labels can wrap to 2 lines, no ellipsis. */
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tour-node-label--top { grid-row: 1; align-self: end; }
.tour-node-label--bottom { grid-row: 4; align-self: start; }

.tour-graph.is-placeholder .tour-node-label {
  display: none;
}

.tour-node-circle {
  width: var(--tour-node-size);
  height: var(--tour-node-size);
  border-radius: 999px;
  border: none;
  /* Render the ring as a background SVG so we don't depend on box borders/pseudo-elements,
     and so it matches the provided Figma SVG more closely. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 58 58'%3E%3Ccircle cx='29' cy='29' r='27' fill='%23F6F8FB'/%3E%3Ccircle cx='29' cy='29' r='25.5' fill='none' stroke='%23049CDC' stroke-opacity='0.35' stroke-width='2'/%3E%3Ccircle cx='29' cy='29' r='19.5' fill='none' stroke='%23049CDC' stroke-opacity='0.22' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  display: grid;
  place-items: center;
  box-shadow: none;
  position: relative;
}

.tour-node-badge-img {
  width: var(--tour-node-size);
  height: var(--tour-node-size);
  display: block;
  object-fit: contain;
  opacity: 1;
}

.tour-node.is-empty .tour-node-circle {
  box-shadow: 0 10px 22px rgba(0, 43, 72, 0.08);
}

.tour-node.is-empty .tour-node-badge-img {
  opacity: 0;
}

.tour-node.is-placeholder {
  opacity: 0.55;
}

.tour-node.is-placeholder .tour-node-badge-img {
  opacity: 0;
}

.tour-graph.is-placeholder .tour-node-circle {
  box-shadow: 0 8px 18px rgba(0, 43, 72, 0.08);
}

.tour-graph.is-placeholder .tour-node-circle {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 58 58'%3E%3Ccircle cx='29' cy='29' r='27' fill='%23F6F8FB'/%3E%3Ccircle cx='29' cy='29' r='25.5' fill='none' stroke='%23049CDC' stroke-opacity='0.55' stroke-width='2'/%3E%3Ccircle cx='29' cy='29' r='19.5' fill='none' stroke='%23049CDC' stroke-opacity='0.28' stroke-width='2'/%3E%3C/svg%3E");
}

.tour-node.is-completed .tour-node-badge-img {
  filter: drop-shadow(0 10px 20px rgba(0, 158, 219, 0.16));
}

.tour-node.is-next .tour-node-badge-img {
  filter: drop-shadow(0 12px 26px rgba(0, 158, 219, 0.28));
  /* Only the "next stop" should look faded (not yet earned). */
  opacity: 0.35;
}

.tour-node.is-upcoming {
  opacity: 0.34;
}

.tour-node.is-locked { opacity: 0.28; }

.tour-node.is-hidden {
  display: none;
}

.tour-graph--diagonal .tour-node[data-slot="0"] { grid-column: 1; }
.tour-graph--diagonal .tour-node[data-slot="1"] { grid-column: 2; }
.tour-graph--diagonal .tour-node[data-slot="2"] { grid-column: 3; }
.tour-graph--diagonal .tour-node[data-slot="3"] { grid-column: 4; }
.tour-graph--diagonal .tour-node[data-slot="4"] { grid-column: 5; }
.tour-graph--diagonal .tour-node[data-slot="5"] { grid-column: 6; }
.tour-graph--diagonal .tour-node[data-slot="6"] { grid-column: 7; }

/* Zig-zag circles in inner rows */
.tour-graph--diagonal .tour-node[data-slot="0"] .tour-node-circle { grid-row: 2; }
.tour-graph--diagonal .tour-node[data-slot="1"] .tour-node-circle { grid-row: 3; }
.tour-graph--diagonal .tour-node[data-slot="2"] .tour-node-circle { grid-row: 2; }
.tour-graph--diagonal .tour-node[data-slot="3"] .tour-node-circle { grid-row: 3; }
.tour-graph--diagonal .tour-node[data-slot="4"] .tour-node-circle { grid-row: 2; }
.tour-graph--diagonal .tour-node[data-slot="5"] .tour-node-circle { grid-row: 3; }
.tour-graph--diagonal .tour-node[data-slot="6"] .tour-node-circle { grid-row: 2; }

.tour-graph--diagonal .tour-node.is-hidden {
  display: none;
}

.progress-stops-caption {
  font-size: 18px;
  font-weight: 600;
  color: #002B48;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.progress-stops-caption #rings-stops-complete {
  font-weight: 900;
  color: #002B48;
}

.progress-stops-caption #rings-stops-total {
  font-weight: 700;
  color: #002B48;
}

.progress-stops-caption {
  line-height: 1.15;
}

.progress-steps-summary {
  background: #F6F8FB;
  border: 1px solid #D7E0EA;
  border-radius: 12px;
  padding: 10px 12px 12px;
}

.steps-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  background: var(--accent);
  -webkit-mask: url("assets/icons/shoes.png") center / contain no-repeat;
  mask: url("assets/icons/shoes.png") center / contain no-repeat;
}

.progress-steps-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.progress-steps-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.badge-peek-slot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid #CBD5E1;
  background: #E6EDF4;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.badge-peek-slot.is-earned {
  border-color: var(--accent);
  background: rgba(4, 156, 220, 0.16);
}

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

/* (kept intentionally blank) old embedded awards peek styles removed */

.steps-ring-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  padding: 8px 0 2px;
}

.steps-ring {
  max-width: 150px;
  width: 100%;
  height: auto;
}

.steps-ring-track {
  stroke: #CBD5E1;
  opacity: 0.95;
}

.steps-ring-progress {
  stroke: var(--accent);
  stroke-dasharray: 1 999;
  stroke-dashoffset: 0;
}

.steps-ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.steps-ring-values {
  font-size: 22px;
  font-weight: 900;
  color: #002B48;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.steps-ring-sub {
  font-size: 18px;
  font-weight: 700;
  color: #6B7A88;
}

.progress-awards-card {
  background: #F6F8FB;
  border: 1px solid #D7E0EA;
  border-radius: 12px;
  padding: 12px;
}

.progress-awards-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.progress-awards-title {
  /* inherits typography from .progress-card-label */
  line-height: 1.15;
}

.progress-awards-next {
  /* inherits typography from .progress-card-sub */
  max-width: 48%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
  line-height: 1.15;
}

.progress-awards-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 16px;
}

.award-peek-circle {
  width: clamp(42px, 15vw, 56px);
  height: clamp(42px, 15vw, 56px);
  border-radius: 50%;
  border: 3px solid #CBD5E1;
  background: #F4F7FB;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  position: relative;
}

.award-peek-circle + .award-peek-circle {
  margin-left: -18px;
}

.award-peek-circle--last {
  width: clamp(50px, 17vw, 64px);
  height: clamp(50px, 17vw, 64px);
  border-width: 6px;
  border-color: var(--accent);
  background: #ffffff;
  z-index: 2;
}

.award-peek-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  opacity: 0.9;
}

.award-peek-icon--steps {
  filter: none;
}

.award-peek-icon--stop {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.award-peek-circle--last .award-peek-icon--stop {
  width: 46px;
  height: 46px;
}

.award-peek-circle.is-earned {
  border-color: rgba(4, 156, 220, 0.35);
  background: rgba(4, 156, 220, 0.08);
}

.award-peek-circle--last.is-earned {
  border-color: var(--accent);
  background: rgba(4, 156, 220, 0.06);
}

.progress-awards-btn.btn-primary-wide {
  width: 100%;
  margin: 0;
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 999px;
}

.progress-timeline {
  padding: 10px 12px;
}

.timeline-node {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 8px 0;
  align-items: flex-start;
}

.timeline-node:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 20px;
  bottom: -8px;
  width: 2px;
  background: #D7E0EA;
  border-radius: 2px;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #D7E0EA;
  flex: 0 0 12px;
  margin-top: 4px;
}

.timeline-body {
  flex: 1;
  min-width: 0;
}

.timeline-award {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-sizing: border-box;
  flex: 0 0 34px;
  margin-left: 6px;
  border: 1.5px solid #CBD5E1;
  background: #E6EDF4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.timeline-award.is-earned {
  border-color: var(--accent);
  background: rgba(4, 156, 220, 0.16);
}

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

.timeline-node.completed .timeline-dot {
  background: var(--accent);
}

.timeline-node.current .timeline-dot {
  background: #ffffff;
  border: 2px solid var(--accent);
  box-sizing: border-box;
}

.timeline-title {
  font-size: 13px;
  font-weight: 800;
  color: #002B48;
  line-height: 1.25;
}

.timeline-status {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  color: #6B7280;
}

.progress-sheet-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 10px 0 12px;
}

.progress-sheet-card {
  background: #F6F8FB;
  border: 1px solid #D7E0EA;
  border-radius: 12px;
  padding: 10px 12px;
}

.progress-sheet-card--wide {
  padding: 12px 14px;
}

.progress-card-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #4B5563;
}

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

.progress-card-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 6px;
  font-size: 22px;
  font-weight: 800;
  color: #002B48;
}

.progress-card-value--small {
  font-size: 18px;
}

.progress-card-sub,
.progress-card-unit {
  font-size: 12px;
  font-weight: 700;
  color: #4B5563;
}

.progress-sheet-note {
  font-size: 12px;
  color: #4B5563;
  line-height: 1.45;
  margin: 2px 2px 12px;
}

.btn-primary-wide {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 16px var(--accent-border-soft);
  transition: background 0.15s, transform 0.15s;
}

.btn-primary-wide:hover {
  background: var(--accent-hover);
}

.btn-primary-wide:active {
  transform: translateY(1px);
}

.progress-sheet-footnote {
  text-align: center;
  font-size: 12px;
  color: #6B7280;
  margin: 10px 0 0;
  padding-bottom: 6px;
}

/* ── Audio buttons (shared) ─────────────────────────── */

.audio-btn {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--accent);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.audio-btn:hover {
  background: var(--surface-hover);
}

.audio-btn-primary {
  width: 52px;
  height: 52px;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-size: 20px;
}

.audio-btn-primary:hover {
  background: var(--accent-hover);
}

.audio-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.audio-btn:disabled:hover {
  background: var(--surface-hover);
}

.audio-btn-primary:disabled:hover {
  background: var(--accent);
}

/* ── Active stop view (inside sheet) ────────────────── */

.sheet-stop-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.sheet-stop-view.hidden {
  display: none;
}

.stop-view-header {
  padding: 12px 16px 2px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.stop-view-toprow {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  margin-bottom: 10px;
  position: relative;
}

.stop-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  min-height: 28px;
  margin: 0;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}

.stop-back-btn svg {
  stroke: var(--accent);
}

.stop-view-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  padding: 0;
  margin: 0;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  max-width: calc(100% - 140px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 1;
}

.stop-view-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Stop view tabs ──────────────────────────────────── */

.stop-tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin: 0 16px;
}

.stop-tab-btn {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 9px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.stop-tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.stop-tab-panel {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 12px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stop-tab-panel.hidden {
  display: none;
}

/* ── Directions inside stop view ────────────────────── */

.stop-dir-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.stop-dir-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stop-dir-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-get-directions {
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-get-directions:hover {
  background: var(--accent-hover);
}

.btn-get-directions:disabled {
  opacity: 0.5;
  pointer-events: none;
}

.stop-dir-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* ── Audio tab track list ───────────────────────────── */

.audio-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 4px 0 6px;
}

.track-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
}

.track-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid #bbb;
  background: transparent;
  transition: background 0.2s, border-color 0.2s;
}

.track-dot.playing {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.track-dot.played {
  background: var(--success);
  border-color: var(--success);
}

.track-dot.queued {
  background: var(--accent-soft);
  border-color: var(--border);
}

.track-dot.locked {
  background: transparent;
  border-color: #ddd;
  opacity: 0.5;
}

.track-name {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-name.locked {
  color: #bbb;
}

.track-play-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.track-play-btn:hover {
  background: var(--accent-hover);
}

/* ── Audio player controls (bottom of audio tab) ─────── */

.audio-player-controls {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audio-player-controls.is-locked .stop-audio-buttons,
.audio-player-controls.is-locked .stop-audio-progress-wrap,
.audio-player-controls.is-locked .stop-audio-time {
  opacity: 0.45;
}

.audio-player-controls.is-locked .stop-audio-progress-wrap {
  pointer-events: none;
}

.audio-now-playing-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.audio-now-playing-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stop-audio-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.stop-audio-progress-wrap {
  height: 4px;
  background: #E6EDF4;
  border-radius: 2px;
  overflow: hidden;
}

.stop-audio-progress {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.08s linear;
}

.stop-audio-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: -2px;
}

/* ── Inline video inside "Now Playing" ─────────────────────────── */
.audio-player-controls.is-video #audio-controls-wrap {
  display: block;
}

.audio-player-controls.is-video #video-controls-wrap {
  display: block;
}

.video-controls-wrap {
  margin-top: 10px;
}

.audio-player-controls.is-video .stop-audio-buttons {
  margin-top: 12px;
}

.audio-player-controls.is-video .stop-audio-progress-wrap {
  margin-top: 10px;
}

.inline-video-player {
  width: 100%;
  display: block;
  border-radius: 14px;
  background: #0b1220;
  max-height: 220px;
}

.stop-view-footer {
  padding: 0 16px calc(16px + var(--safe-bottom));
}

.btn-learn-more {
  width: 100%;
  padding: 12px;
  background: none;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-learn-more:hover {
  background: var(--accent);
  color: #fff;
}

.btn-learn-more.hidden {
  display: none;
}

/* ── Follow button ──────────────────────────────────── */

.map-btn {
  position: fixed;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.15s, color 0.15s;
}

.map-btn:hover {
  background: var(--surface-hover);
}

.map-btn.active {
  color: var(--accent);
  border-color: var(--accent);
}

.follow-btn {
  bottom: calc(var(--sheet-peek) + 16px + var(--safe-bottom));
  right: 16px;
}

.help-btn {
  top: 16px;
  right: 16px;
}

/* ── Route mode icon toggle (inside stop view) ──────── */

.route-toggle-icons {
  display: flex;
  gap: 8px;
}

.route-icon-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 8px 4px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.route-icon-btn svg {
  stroke: currentColor;
}

.route-icon-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
  margin-top: 2px;
  /* Tint black PNGs to match label color. */
  filter: brightness(0) saturate(100%) invert(46%) sepia(93%) saturate(1464%) hue-rotate(167deg) brightness(96%) contrast(97%);
}

.route-icon-btn.active .route-icon-img {
  filter: brightness(0) invert(1);
}

.route-icon-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.route-icon-btn:not(.active):hover {
  background: var(--surface-hover);
}

/* ── POI bottom sheet ───────────────────────────────── */

.poi-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 120;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius) var(--radius) 0 0;
  height: 60vh; /* JS will dynamically size when expanded */
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(calc(100% - var(--sheet-peek) - var(--safe-bottom)));
  padding-bottom: var(--safe-bottom);
  box-shadow: var(--sheet-shadow);
}

.poi-sheet.expanded {
  transform: translateY(0);
}

.poi-sheet-handle {
  display: flex;
  justify-content: center;
  padding: 14px 0 14px;
  cursor: grab;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
}

.sheet-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  user-select: none;
}

.sheet-hint-text {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.sheet-hint-chevron {
  color: var(--accent);
  transition: transform 0.18s ease;
}

.poi-sheet:not(.expanded) .sheet-hint-chevron {
  animation: sheet-hint-nudge 1.2s ease-in-out infinite;
}

.poi-sheet.expanded .sheet-hint-chevron {
  transform: rotate(180deg);
  animation: none;
}


@keyframes sheet-hint-nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.poi-sheet-header {
  padding: 10px 16px 6px;
}

#sheet-list-view {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.poi-sheet-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.poi-sheet-title-row h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.poi-sheet-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-reset {
  background: none;
  border: 1px solid var(--border);
  color: var(--danger);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-reset:hover {
  background: var(--danger);
  color: #fff;
}

.btn-extras {
  background: none;
  border: 1px solid var(--border);
  color: var(--accent);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-extras:hover {
  background: var(--accent);
  color: #fff;
}

.poi-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  max-height: none;
  padding: 0 12px calc(12px + var(--safe-bottom));
}

.poi-list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.poi-list-item:hover {
  background: var(--surface-hover);
}

.poi-list-item.active {
  background: var(--surface-hover);
}

/* POI list — inactive badge (Figma: Uncharter_badgeicons / BadgeShell inactive) */
.poi-list-badge {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  box-sizing: border-box;
  border: none;
  background: transparent;
  background-clip: padding-box;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.poi-list-badge.upcoming {
  box-shadow: none;
}

.poi-list-badge.playing {
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: poi-list-badge-pulse 1.5s ease-in-out infinite;
}

.poi-list-badge.played {
  box-shadow: none;
}

.poi-list-badge.next {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.poi-list-badge.completed {
  box-shadow: none;
  animation: none;
}

.poi-list-badge-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  opacity: 1;
}

/* Only the "next stop" badge should appear faded (not earned yet). */
.poi-list-badge.next .poi-list-badge-img {
  opacity: 0.35;
}

@keyframes poi-list-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-soft); }
  50%      { box-shadow: 0 0 0 5px var(--accent-glow); }
}

@media (prefers-reduced-motion: reduce) {
  .poi-list-badge.playing {
    animation: none;
  }
}

.poi-item-info {
  flex: 1;
  min-width: 0;
}

.poi-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.poi-item-status {
  font-size: 11px;
  color: #888;
  margin-top: 1px;
}

/* ── GPS warning ────────────────────────────────────── */

.gps-warning {
  position: fixed;
  top: 68px;
  right: 16px;
  z-index: 180;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
  color: var(--warning);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  transition: opacity 0.3s;
}

.gps-warning.hidden {
  opacity: 0;
  pointer-events: none;
}

.gps-warning svg {
  stroke: var(--warning);
  flex-shrink: 0;
}

/* ── Permission / Onboarding overlay ────────────────── */

.permission-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  backdrop-filter: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s;
}

.permission-overlay.hidden {
  display: flex !important;
  opacity: 0;
  pointer-events: none;
}

.permission-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  max-width: 340px;
  width: calc(100% - 48px);
  box-shadow: var(--shadow);
}

.permission-card .btn-primary,
.permission-card .btn-secondary {
  width: 100%;
}

.permission-card .btn-primary + .btn-secondary {
  margin-top: 10px;
}

.onboard-geo-debug {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-hover);
  color: var(--text-tertiary);
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  white-space: pre-wrap;
  word-break: break-word;
}

.help-location-note {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--divider);
  border-radius: 10px;
  background: var(--surface-hover);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.help-location-note ul {
  margin-top: 8px;
  padding-left: 18px;
}

.help-location-note li {
  margin: 4px 0;
}

.permission-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(91, 146, 229, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.permission-icon-circle--neutral {
  background: #F6F8FB;
  border: 1px solid var(--border);
}

.permission-icon-circle--warn {
  background: rgba(251, 191, 36, 0.18);
}

.permission-icon {
  color: var(--accent);
}

.permission-icon--warn {
  color: #D97706;
}

.permission-icon svg {
  stroke: var(--accent);
  width: 32px;
  height: 32px;
}

.permission-icon--warn svg {
  stroke: #D97706;
}

.permission-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text);
}

.permission-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.permission-footnote {
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  margin: 16px 0 0 !important;
}

/* Onboarding step transitions */
.onboard-step {
  display: none;
  opacity: 0;
  transform: translateX(32px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.onboard-step.active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

.onboard-step.exit-left {
  display: block;
  opacity: 0;
  transform: translateX(-32px);
}

/* Email input */
.onboard-email-input {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  margin-bottom: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.onboard-email-input:focus {
  border-color: var(--accent);
}

.onboard-email-input::placeholder {
  color: var(--text-tertiary);
}

/* Resume section */
.onboard-resume-section {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  text-align: left;
}

.onboard-resume-section.hidden {
  display: none;
}

.onboard-resume-text {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px !important;
}

.onboard-resume-actions {
  display: flex;
  gap: 8px;
}

.onboard-step2-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Button variants */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  height: 50px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: #ffffff;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex: 1;
}

.btn-secondary:hover {
  background: var(--accent);
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border: none;
  height: 50px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
}

.btn-danger:hover {
  background: #C53B2E;
}

.btn-danger-secondary {
  background: #ffffff;
  color: var(--danger);
  border: 1.5px solid var(--danger);
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  width: 100%;
}

.btn-danger-secondary:hover {
  background: var(--danger);
  color: #fff;
}

.btn-ghost {
  background: none;
  color: var(--text-muted);
  border: none;
  padding: 10px;
  border-radius: 24px;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.15s;
  width: 100%;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-danger-outline {
  background: none;
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 11px 24px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  width: 100%;
}

.btn-danger-outline:hover {
  background: var(--danger);
  color: #fff;
}

/* ── Pulsing user dot (map marker) ──────────────────── */

.user-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(108, 140, 255, 0.5); }
  70%  { box-shadow: 0 0 0 14px rgba(108, 140, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(108, 140, 255, 0); }
}

.user-accuracy {
  position: absolute;
  border-radius: 50%;
  background: rgba(108, 140, 255, 0.1);
  border: 1px solid rgba(108, 140, 255, 0.2);
  pointer-events: none;
  transform: translate(-50%, -50%);
}

/* ── POI map markers ────────────────────────────────── */

.poi-marker {
  width: 32px;
  height: 32px;
  border-radius: 50% 50% 50% 0;
  background: var(--accent);
  border: 2px solid #fff;
  transform: rotate(-45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
}

.poi-marker.played {
  background: var(--success);
}

.poi-marker.completed {
  background: var(--success);
}

.poi-marker.playing {
  background: var(--accent);
  animation: marker-glow 1.5s infinite;
}

@keyframes marker-glow {
  0%, 100% { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); }
  50%      { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 16px var(--accent-glow); }
}

/* ── Directions steps (shared style) ────────────────── */

.directions-steps {
  list-style: none;
}

.directions-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
}

.directions-step.transit {
  background: var(--bg);
  border: 1px solid var(--border);
  margin: 4px 0;
}

.step-icon {
  font-size: 18px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 50%;
  flex-shrink: 0;
}

.directions-step.transit .step-icon {
  background: var(--accent-soft);
}

.step-info {
  flex: 1;
  min-width: 0;
}

.step-label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text);
}

.step-line {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 10px;
  margin-bottom: 3px;
}

.step-duration {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.poi-directions-btn {
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.poi-directions-btn:hover {
  background: var(--accent);
  color: #fff;
}

.poi-directions-btn.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Overlay sheets (rings, help, extras) ───────────── */

.overlay-sheet {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
}

.overlay-sheet:not(.hidden) {
  pointer-events: auto;
}

.overlay-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 43, 72, 0.30);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.3s;
}

.overlay-sheet:not(.hidden) .overlay-sheet-backdrop {
  opacity: 1;
}

.overlay-sheet-card {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  max-height: 75vh;
  overflow-y: auto;
  padding-bottom: calc(16px + var(--safe-bottom));
  box-shadow: var(--sheet-shadow);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.overlay-sheet:not(.hidden) .overlay-sheet-card {
  transform: translateY(0);
}

.overlay-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.overlay-sheet-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.overlay-sheet-close {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.overlay-sheet-separator {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ── Rings Detail Sheet ─────────────────────────────── */

.rings-detail-body {
  padding: 16px 16px 0;
}

.rings-stops-grid {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.rings-stop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 44px;
  cursor: pointer;
}

.rings-stop-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-tertiary);
  transition: background 0.2s, border-color 0.2s;
}

.rings-stop-circle.completed {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.rings-stop-name {
  font-size: 9px;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.2;
  max-width: 44px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.rings-stop-name.completed {
  color: var(--accent);
}

.rings-steps-section {
  text-align: center;
  margin-bottom: 8px;
}

.rings-steps-number {
  font-size: 40px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.rings-steps-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.rings-steps-bar-wrap {
  height: 6px;
  background: #E6EDF4;
  border-radius: 3px;
  overflow: hidden;
  margin: 0 0 8px;
}

.rings-steps-bar {
  height: 100%;
  background: #4ade80;
  border-radius: 3px;
  width: 0%;
  transition: width 0.4s ease;
}

.rings-distance-label {
  font-size: 12px;
  color: #888;
}

/* ── Help Sheet ─────────────────────────────────────── */

.help-accordion {
  display: block;
}

.help-acc-item {
  border-bottom: 1px solid var(--border);
}

.help-acc-btn {
  width: 100%;
  padding: 0 16px;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: none;
  cursor: pointer;
  text-align: left;
  gap: 12px;
}

.help-acc-btn.open {
  background: var(--bg);
}

.help-acc-title {
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.help-acc-icon {
  font-size: 16px;
  color: var(--text-muted);
}

.help-acc-btn.open .help-acc-icon {
  color: var(--accent);
}

.help-acc-content {
  display: none;
  padding: 0 16px 16px 16px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.help-acc-content.open {
  display: block;
}

.help-toggle-row {
  margin-top: 12px;
}

.help-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #F6F8FB;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.help-toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.help-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.help-toggle-slider {
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #D7E0EA;
  position: relative;
  flex: 0 0 46px;
  transition: background 0.18s ease;
}

.help-toggle-slider::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 43, 72, 0.18);
  transition: transform 0.18s ease;
}

.help-toggle input:checked + .help-toggle-slider {
  background: var(--accent);
}

.help-toggle input:checked + .help-toggle-slider::after {
  transform: translateX(20px);
}

.help-bottom-spacer {
  height: max(24px, env(safe-area-inset-bottom));
  min-height: 24px;
}

/* ── Extras Sheet ───────────────────────────────────── */

.extras-helper {
  padding: 10px 16px 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.extras-list {
  padding: 8px 0 0;
}

.extras-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.extras-item.tappable {
  cursor: pointer;
}

.extras-item.tappable:hover {
  background: var(--bg);
}

.extras-item:last-child {
  border-bottom: none;
}

.extras-item-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.extras-num-chip {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: #EDF1F7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.extras-num-chip span {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

.extras-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: 0;
}

.extras-pills {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

button.extras-pill {
  border: none;
  cursor: pointer;
  font: inherit;
}

.extras-pill-icon {
  flex-shrink: 0;
}

.extras-pill--photos,
.extras-pill--video {
  background: var(--info-soft);
  color: var(--accent);
}

.extras-pill--none {
  background: #F3F4F6;
  color: #6B7280;
}

.extras-pill--locked {
  background: #F3F4F6;
  color: #6B7280;
  border: 1px solid #D7E0EA;
}

.extras-item.locked {
  opacity: 0.65;
}

.extras-item-chevron {
  font-size: 18px;
  color: var(--text-tertiary);
  padding-right: 2px;
  margin-left: 2px;
}

.extras-footer-note {
  padding: 20px 16px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ── Modal overlays (badge, video, stall, end tour, highlight) */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  transition: opacity 0.3s;
}

.modal-overlay.hidden {
  display: flex !important;
  opacity: 0;
  pointer-events: none;
}

.modal-card {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 28px 24px;
  text-align: center;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

.modal-card-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.06);
  border: none;
  color: #555;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.modal-card-close:hover {
  background: rgba(0,0,0,0.12);
  color: #111;
}

.modal-card-title {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
}

.modal-card-body {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-card-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.intro-audio-card {
  width: min(520px, calc(100vw - 32px));
  padding: 18px 16px 16px;
  max-height: 82vh;
  display: flex;
  flex-direction: column;
}

.intro-audio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.intro-audio-header .modal-card-title {
  margin-bottom: 0;
}

.intro-audio-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.intro-audio-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.intro-audio-progress-wrap {
  margin-top: 8px;
  height: 6px;
  background: #E6EDF4;
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
}

.intro-audio-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 999px;
}

.intro-audio-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.intro-audio-btn {
  border: 1px solid var(--border);
  background: var(--surface-hover);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.intro-audio-btn--play {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-size: 18px;
}

.intro-audio-transcript {
  border: 1px solid var(--border);
  background: var(--surface-hover);
  border-radius: 12px;
  padding: 12px;
  flex: 1;
  min-height: 160px;
  max-height: none;
  overflow: auto;
  color: var(--text);
}

.intro-lyrics {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 4px 2px;
}

.intro-lyric {
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s, transform 0.15s;
  opacity: 0.42;
}

.intro-lyric.active {
  opacity: 1;
  transform: translateY(-1px);
}

.intro-lyric-time {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

.intro-lyric-text {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: -0.01em;
}

.intro-lyric.active .intro-lyric-text {
  font-size: 18px;
}

.intro-lyric:active .intro-lyric-text {
  opacity: 0.8;
}

.intro-audio-continue.btn-primary-wide {
  margin-top: 14px;
}

.intro-audio-footnote {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.video-card {
  max-width: 360px;
  width: calc(100% - 40px);
  padding: 18px 16px 16px;
}

.video-card-body {
  margin-top: 10px;
}

.video-player-el {
  width: 100%;
  max-height: 56vh;
  border-radius: 14px;
  background: #000;
}

/* Badge popup specifics */
.badge-unlocked-card {
  max-width: 360px;
  width: calc(100% - 40px);
  padding: 18px 18px 16px;
  text-align: center;
}

.badge-unlocked-head {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 36px;
}

.badge-unlocked-head .modal-card-close {
  position: absolute;
  right: -2px;
  top: -2px;
}

.badge-popup-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.badge-popup-extra {
  font-size: 14px;
  color: #7B8289;
  margin-top: 6px;
  margin-bottom: 14px;
}

.badge-unlocked-emblem {
  display: grid;
  place-items: center;
  margin: 4px 0 12px;
}

.badge-unlocked-ring {
  width: 170px;
  height: 170px;
  border-radius: 999px;
  background: rgba(0, 158, 219, 0.08);
  display: grid;
  place-items: center;
  box-shadow: 0 18px 40px rgba(0, 43, 72, 0.18);
  position: relative;
}

.badge-popup-img {
  width: 142px;
  height: 142px;
  object-fit: contain;
  display: block;
}

.badge-unlocked-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--accent);
}

.badge-unlocked-icon svg {
  width: 52px;
  height: 52px;
}

.badge-popup-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-top: 2px;
}

.badge-popup-tagline {
  font-size: 13px;
  color: #7B8289;
  margin-top: 4px;
  margin-bottom: 14px;
}

/* Suggested Next Stop popup (Frame 27) */
.next-stop-card {
  max-width: 360px;
  width: calc(100% - 40px);
  padding: 18px 18px 16px;
  text-align: center;
}

.next-stop-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-top: 2px;
}

.next-stop-sub {
  font-size: 13px;
  color: #7B8289;
  margin-top: 6px;
  margin-bottom: 14px;
}

.next-stop-emblem {
  display: grid;
  place-items: center;
  margin: 4px 0 12px;
}

.next-stop-ring {
  width: 110px;
  height: 110px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.next-stop-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  display: block;
}

.next-stop-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin-top: 2px;
}

.next-stop-meta {
  font-size: 13px;
  color: #7B8289;
  margin-top: 6px;
  margin-bottom: 14px;
}

.next-stop-actions .btn-primary-wide {
  margin-bottom: 10px;
}

.next-stop-actions .btn-secondary {
  width: 100%;
}

.badge-next-row {
  width: 100%;
  margin: 6px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 158, 219, 0.22);
  background: rgba(0, 158, 219, 0.08);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 700;
}

.badge-next-text {
  color: #7B8289;
  font-weight: 600;
}

.badge-next-arrow {
  color: var(--accent);
  font-weight: 800;
}

.badge-next-mini {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(0, 158, 219, 0.35);
  background: #F3F6F9;
  display: grid;
  place-items: center;
  color: var(--accent);
}

/* ── Mapbox overrides ───────────────────────────────── */

.mapboxgl-ctrl-bottom-left,
.mapboxgl-ctrl-bottom-right {
  bottom: calc(var(--sheet-peek) + 12px + var(--safe-bottom));
}

/* ── Responsive ─────────────────────────────────────── */

@media (min-width: 600px) {
  .mapboxgl-ctrl-bottom-left,
  .mapboxgl-ctrl-bottom-right {
    bottom: 68px;
  }

  .poi-sheet {
    left: auto;
    right: 16px;
    bottom: 16px;
    width: 340px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    max-height: calc(100vh - 32px);
    transform: translateY(calc(100% - 64px));
  }

  .stop-tab-panel {
    max-height: calc(100vh - 200px);
  }

  .poi-sheet.expanded {
    transform: translateY(0);
  }

  .follow-btn {
    bottom: 100px;
  }

  .overlay-sheet-card {
    left: auto;
    right: 16px;
    bottom: 16px;
    width: 380px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    max-height: calc(100vh - 32px);
  }
}

/* Rings sheet: win cascade over generic `.overlay-sheet-card` (scroll + max-height). */
#rings-sheet.overlay-sheet .overlay-sheet-card {
  max-height: min(92vh, 860px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (min-width: 600px) {
  #rings-sheet.overlay-sheet .overlay-sheet-card {
    max-height: calc(100vh - 32px);
    overflow: hidden;
  }
}
