/* ========================================
   SHINE PWA — Design Tokens
   ======================================== */
:root {
  /* ── New design tokens ── */
  --bg: #E5E0D6;
  --card: #FFFFFF;
  --text: #1C1C1E;
  --text2: #8E8E93;
  --text3: #AEAEB2;
  --teal: #0E918C;
  --teal-dark: #0A706C;
  --teal-light: #E2F5F2;
  --border: #E4DDD6;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 6px 24px rgba(0, 0, 0, 0.14);
  --radius: 14px;
  --radius-sm: 10px;
  --font-display: 'Quicksand', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-hand: 'Caveat', cursive;
  --tab-height: 64px;
  --route-bar-h: 82px;
  --header-height: 0px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  /* ── Legacy aliases (keep existing var() refs working) ── */
  --bg-card: var(--card);
  --accent: var(--teal);
  --accent-light: var(--teal-light);
  --text-muted: var(--text2);
  --text-primary: var(--text);
  --text-secondary: var(--text2);
  --radius-md: var(--radius);
}

/* ========================================
   Payment Gate
   ======================================== */
.gate-page {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.gate-page[hidden] {
  display: none;
}

.gate-content {
  min-height: auto;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
}

.gate-hero {
  background: linear-gradient(135deg, #0E918C 0%, #2A9D8F 100%);
  padding: calc(var(--safe-top) + 16px) 24px 16px;
  color: #fff;
}

.gate-hero-row {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
}

.gate-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
}

.gate-hero-tagline {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  color: rgba(255,255,255,0.85);
  text-align: center;
  margin-top: 10px;
  letter-spacing: 0.5px;
}

.gate-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 4px;
  text-align: left;
}

.gate-subtitle {
  font-size: 14px;
  opacity: 0.85;
  margin-top: 2px;
  letter-spacing: 1px;
  text-align: left;
}

.gate-body {
  flex: 1;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gate-tagline {
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  color: var(--text);
  line-height: 1.3;
  max-width: 320px;
}

.gate-features {
  list-style: none;
  margin-top: 12px;
  width: 100%;
  max-width: 300px;
}

.gate-features li {
  padding: 5px 0;
  padding-left: 28px;
  position: relative;
  font-size: 14px;
  color: var(--text);
}

.gate-features li::before {
  content: '\2713';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
}

.gate-buy-btn {
  margin-top: 16px;
  width: 100%;
  max-width: 320px;
  padding: 18px 28px;
  background: linear-gradient(180deg, #2A9D8F 0%, #0E918C 100%);
  color: #fff;
  border: 3px solid #fff;
  border-radius: 16px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.2);
}

.gate-buy-btn:active {
  transform: scale(0.97);
}

.gate-buy-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.gate-buy-sub {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  opacity: 0.85;
}

.gate-promo-hint {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.gate-restore {
  margin-top: 12px;
  text-align: center;
}

.gate-restore-btn {
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 10px 20px;
}

.gate-restore-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  justify-content: center;
  max-width: 320px;
  width: 100%;
}

.gate-restore-form input {
  padding: 8px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 13px;
  flex: 1;
  min-width: 0;
  width: 100%;
}

.gate-restore-msg {
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.gate-restore-msg.success { color: #43A047; }
.gate-restore-msg.error { color: #E53935; }

/* Standalone restore screen */
.restore-page {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0E918C 0%, #1B4965 100%);
  padding: 24px;
}

.restore-content {
  text-align: center;
  max-width: 340px;
  width: 100%;
}

.restore-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  letter-spacing: 3px;
  margin-bottom: 32px;
}

.restore-headline {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.restore-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
  margin-bottom: 24px;
}

.restore-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.restore-form input {
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.95);
  font-size: 16px;
  font-family: var(--font-body);
  text-align: center;
  outline: none;
}

.restore-form input:focus {
  border-color: #fff;
}

.restore-btn {
  padding: 14px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.restore-btn:active {
  transform: scale(0.97);
}

.restore-msg {
  margin-top: 12px;
  font-size: 14px;
  color: rgba(255,255,255,0.9);
}

.restore-msg.success { color: #a5d6a7; }
.restore-msg.error { color: #ef9a9a; }

.restore-reassure {
  margin-top: 24px;
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

/* Install walkthrough (full-screen) */
.install-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background: linear-gradient(160deg, #0E918C 0%, #1B4965 100%);
  padding: calc(var(--safe-top) + 12px) 24px 24px;
}

.install-walkthrough {
  text-align: center;
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.install-wt-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  margin-top: 16px;
}

.install-wt-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  flex-shrink: 0;
}

.install-wt-check {
  display: none;
}

.install-wt-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  color: #fff;
}

.install-wt-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.8);
}

.install-big-steps {
  width: 100%;
  max-width: 340px;
  margin-bottom: 16px;
}

.install-step-num {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent, #0E918C);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.install-step span {
  font-size: 12px;
  line-height: 1.3;
  color: var(--text, #1a1a2e);
}

.install-dots-icon,
.install-share-icon {
  display: inline-block;
  vertical-align: middle;
  margin: 0 2px;
  color: var(--accent, #0E918C);
}

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

.install-big-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  opacity: 0;
  animation: fadeSlideIn 0.4s ease forwards;
}

.install-big-step:nth-child(1) { animation-delay: 0.15s; }
.install-big-step:nth-child(2) { animation-delay: 0.3s; }
.install-big-step:nth-child(3) { animation-delay: 0.45s; }

.install-big-step + .install-big-step {
  border-top: 1px solid rgba(255,255,255,0.15);
  margin-top: 19px;
}

.install-big-step:last-child {
  margin-top: 160px;
  border-top: none;
}

.install-big-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-display);
}

.install-big-text {
  font-size: 20px;
  color: #fff;
  line-height: 1.3;
}

.install-big-text strong {
  color: #fff;
  font-weight: 700;
}

.install-dots-icon-lg {
  display: inline-block;
  vertical-align: middle;
  margin: 0 3px;
  color: #fff;
}

.install-share-icon-lg {
  display: inline-block;
  vertical-align: middle;
  margin: 0 3px;
  color: #fff;
}

.install-wt-skip {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  cursor: pointer;
  padding: 12px 24px;
  margin-top: 16px;
}

/* ========================================
   Reset & Base
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  background: var(--bg);
  overflow: hidden;
  overscroll-behavior: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  overscroll-behavior: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  -webkit-font-smoothing: antialiased;
}

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

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

input {
  font: inherit;
  border: none;
  background: none;
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

/* ========================================
   App Layout
   ======================================== */
#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ========================================
   Header
   ======================================== */
.app-header {
  display: none;
}

.header-inner {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}

.header-title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 2px;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.header-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.header-tagline {
  font-size: 13px;
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
  margin-left: auto;
  white-space: nowrap;
}

/* ========================================
   Search Bar
   ======================================== */
.search-bar {
  padding: calc(var(--safe-top) + 2px) 20px 8px;
  background: var(--bg);
}

.explore-float-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.5px;
  color: var(--text);
  margin: 0;
}

.explore-subtitle {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text2);
  margin: 2px 0 8px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.04);
  border: none;
  border-radius: 12px;
  padding: 0 14px;
  height: 42px;
}

.search-icon {
  flex-shrink: 0;
  color: var(--text-muted);
}

.search-input-wrap input {
  flex: 1;
  height: 100%;
  outline: none;
  font-size: 16px;
}

.search-input-wrap input::placeholder {
  color: var(--text-muted);
}

/* ========================================
   Explore Filter Pills
   ======================================== */
.explore-filters {
  padding: 8px 20px 12px;
  background: var(--bg);
}

.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
}

.filter-pills + .filter-pills {
  margin-top: 4px;
}

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

.year-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--card);
  color: var(--text);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.year-pill.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

.year-pill.year-sub {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
}

.year-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ========================================
   Main Content Area
   ======================================== */
.main-content {
  flex: 1;
  overflow-y: auto;
  background: var(--bg);
  padding-bottom: calc(var(--tab-height) + var(--safe-bottom));
}

.view {
  min-height: 100%;
}

/* Tour view needs explicit height so tour-layout can use 100% */
#view-loops {
  height: calc(100vh - var(--tab-height) - var(--safe-bottom));
  min-height: 0;
  overflow: hidden;
}


/* ========================================
   Large Titles
   ======================================== */
.explore-large-title {
  padding: 8px 20px 4px;
}
.tours-large-title {
  padding: calc(var(--safe-top) + 2px) 20px 10px;
}

.explore-large-title h1,
.tours-large-title h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.5px;
  color: var(--text);
}

.explore-large-title p,
.tours-large-title p {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text2);
  margin-top: 2px;
  font-weight: 400;
}

/* ========================================
   Mural Grid (Explore)
   ======================================== */
.mural-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  padding: 8px 20px 0;
}

.mural-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.mural-card:active {
  transform: scale(0.97);
}

.mural-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--border);
}

.mural-card-info {
  padding: 10px 12px 12px;
}

.mural-card-artist {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mural-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   Map View
   ======================================== */
.map-filter-bar {
  display: none;
}

/* ── Floating header over map ── */
.map-float-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: calc(var(--safe-top) + 2px) 20px 6px;
  pointer-events: none;
  background: rgba(245, 242, 237, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
}

.map-float-header .filter-pills {
  pointer-events: auto;
}

.map-float-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.5px;
  color: var(--text);
  margin-bottom: 1px;
  pointer-events: none;
}
.map-float-subtitle {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text2);
  margin: 0 0 6px;
  pointer-events: none;
}

/* ── Route bar — horizontal pill slider above tab bar (map tab only) ── */
.map-route-bar {
  position: fixed;
  bottom: calc(var(--tab-height) + var(--safe-bottom));
  left: 0;
  right: 0;
  z-index: 1100;
  height: var(--route-bar-h);
  display: none;
  flex-direction: column;
  justify-content: center;
  background: rgba(245, 242, 237, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
}
.map-route-bar.visible { display: flex; }
.route-bar-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  padding: 0 16px;
  margin: 4px 0 0;
}

.route-bar-track {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 8px;
  padding: 4px 16px 8px;
}
.route-bar-track::-webkit-scrollbar { display: none; }

/* Horizontal loop pills in route bar */
.route-bar-card {
  display: flex;
  align-items: center;
  height: 46px;
  border-radius: 23px;
  background: rgba(255,255,255,0.92);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 1.5px solid var(--route-color, #999);
  white-space: nowrap;
  transition: border-color 0.2s, opacity 0.2s;
}
.route-bar-card.route-key-off {
  border-color: #d0d0d0;
  opacity: 0.6;
}
.route-bar-card.route-key-off .route-bar-accent {
  opacity: 0.3;
}
.route-bar-accent {
  width: 5px;
  align-self: stretch;
  flex-shrink: 0;
  border-radius: 23px 0 0 23px;
}
.route-bar-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4px 14px 4px 10px;
}
.route-bar-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.route-bar-meta {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text2);
  line-height: 1.3;
}

/* Route toggle bar — bottom of map (legacy, hidden when floating strip is active) */
.route-key-section {
  display: none;
  position: relative;
  z-index: 10;
  background: var(--bg);
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 4px 10px 6px;
  flex-shrink: 0;
}

.route-key-title,
.map-section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  display: block;
  padding: 0 2px 3px;
}

.route-key-scroll {
  display: flex;
  align-items: center;
  position: relative;
}

.route-key-bar {
  display: flex;
  align-items: stretch;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1;
}

.route-key-bar::-webkit-scrollbar {
  display: none;
}

.route-key-arrow {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0 2px 0 4px;
  flex-shrink: 0;
  opacity: 0.5;
  animation: pulseArrow 2s ease-in-out infinite;
}

@keyframes pulseArrow {
  0%, 100% { transform: translateX(0); opacity: 0.5; }
  50% { transform: translateX(3px); opacity: 1; }
}

.route-key-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 12px;
  border: 2px solid var(--route-color, #999);
  background: rgba(255,255,255,0.9);
  transition: border-color 0.2s;
}

.route-key-item:active {
  opacity: 0.7;
}

.route-key-item.route-key-off {
  border-color: #d0d0d0;
}

.route-key-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.route-key-name {
  font-weight: 600;
}

.route-key-info {
  font-weight: 400;
  opacity: 0.55;
  font-size: 9px;
}

.route-key-line {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

#view-map {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--tab-height) - var(--safe-bottom));
  overflow: hidden;
  border-top: 0.5px solid rgba(0, 0, 0, 0.08);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.08);
}

#view-map[hidden] {
  display: none !important;
}

#map-container {
  width: 100%;
  flex: 1;
  min-height: 0;
}

.map-legend {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  box-shadow: var(--shadow-lg);
  font-size: 11px;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
}

.map-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Mural mini-icons on map */
.mural-map-icon {
  background: none;
  border: none;
}
.mural-map-icon img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  object-fit: cover;
}

/* ========================================
   User Location Marker (pulsing GPS dot)
   ======================================== */
.user-loc-pulse {
  background: transparent !important;
  border: none !important;
}
.user-loc-pulse::after {
  content: '';
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(66, 133, 244, 0.2);
  border: 2px solid rgba(66, 133, 244, 0.4);
  animation: user-pulse 2s ease-out infinite;
}
@keyframes user-pulse {
  0%   { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}
.user-loc-dot {
  background: transparent !important;
  border: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-loc-inner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #4285F4;
  border: 3px solid #fff;
  box-shadow: 0 0 6px rgba(0,0,0,0.35);
}

/* Edge arrow for off-screen user on tour mini-maps */
.picker-user-arrow {
  position: absolute;
  z-index: 800;
  pointer-events: none;
  display: flex;
  align-items: center;
  transform: translate(-50%, -50%);
  animation: edge-pulse 2s ease-in-out infinite;
}
.picker-user-arrow-tip {
  display: block;
  width: 0;
  height: 0;
  border-left: 10px solid #4285F4;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  flex-shrink: 0;
  filter: drop-shadow(0 0 3px rgba(66, 133, 244, 0.6));
}
.picker-user-arrow-label {
  position: absolute;
  white-space: nowrap;
  font-size: 9px;
  font-weight: 700;
  font-family: var(--font-display);
  color: #4285F4;
  background: rgba(255, 255, 255, 0.85);
  padding: 2px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
@keyframes edge-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* ========================================
   Map Floating Action Buttons (Komoot-style)
   ======================================== */
.map-fab-stack {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.map-fab-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.map-fab-label {
  background: rgba(44, 32, 22, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  pointer-events: none;
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 0.2s, transform 0.2s;
}

.map-fab-stack.show-labels .map-fab-label {
  opacity: 1;
  transform: translateX(0);
}

.map-fab {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  color: var(--text-primary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.map-fab:active {
  background: var(--border);
}

.map-fab.active {
  background: var(--accent);
  color: #fff;
}

.map-fab svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* Nearest mural popup — bottom sheet style */
.nearest-popup {
  position: absolute;
  bottom: calc(var(--tab-height) + var(--safe-bottom) + var(--route-bar-h) + 10px);
  left: 12px;
  right: 12px;
  z-index: 1001;
  background: var(--card);
  border-radius: 18px 18px 14px 14px;
  box-shadow: var(--shadow-lg);
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  animation: sheetUp 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  overflow: hidden;
}

.nearest-popup::before {
  content: '';
  display: block;
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.12);
  margin: 8px auto 4px;
}

.nearest-popup-top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px 12px;
}

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

@keyframes sheetUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.nearest-popup img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

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

.nearest-popup-info h4 {
  margin: 0;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nearest-popup-info p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-secondary);
}

.nearest-popup-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
}

.nearest-popup-btn {
  flex: 1;
  padding: 11px 8px;
  border-radius: 12px;
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s;
}

.nearest-popup-btn:active {
  transform: scale(0.96);
}

.nearest-popup-btn.primary {
  background: var(--teal);
  color: #fff;
}

.nearest-popup-btn.secondary {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.nearest-popup-btn.green {
  background: #2e7d32;
  color: #fff;
}

.nearest-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text2);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

/* ── Map mural bottom sheet ── */

/* Out-of-range banner */
.map-range-banner {
  position: absolute;
  bottom: calc(var(--tab-height) + var(--safe-bottom) + var(--route-bar-h) + 10px);
  left: 12px;
  right: 12px;
  z-index: 1001;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 16px;
  text-align: center;
  animation: slideUp 0.25s ease-out;
}

.map-range-banner p {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.map-range-banner small {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ========================================
   Nearby List
   ======================================== */
.nearby-list {
  padding: 12px 16px;
}

.nearby-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

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

.nearby-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border);
}

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

.nearby-artist {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
}

.nearby-location {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nearby-distance {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--accent);
  margin-top: 4px;
}

/* ========================================
   Detail Page
   ======================================== */
.detail-page {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.detail-back {
  position: fixed;
  top: calc(var(--safe-top) + 8px);
  left: 12px;
  z-index: 10000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.15s;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.6), 0 2px 10px rgba(0, 0, 0, 0.4);
}

.detail-back:active {
  transform: scale(0.9);
}

.detail-font-btn {
  float: right;
  margin: -12px -10px 0 8px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid var(--border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.15s;
}
.detail-font-btn:active { transform: scale(0.9); }

.detail-hero-wrap {
  position: relative;
  overflow: hidden;
  background: #1a1a1a;
  cursor: zoom-in;
  touch-action: manipulation;
  display: flex;
  justify-content: center;
}
.detail-hero {
  width: 100%;
  height: auto;
  display: block;
  background: #1a1a1a;
}

/* Fullscreen lightbox overlay */
.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: zoom-out;
  animation: lightbox-in 0.25s ease;
}
@keyframes lightbox-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.photo-lightbox.closing {
  animation: lightbox-out 0.2s ease forwards;
}
@keyframes lightbox-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
.photo-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}


.detail-body {
  padding: 20px;
  position: relative;
}

/* Text size toggle button — matches seen/like buttons */
.text-size-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--card);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  transition: background 0.15s, border-color 0.15s;
}
.text-size-btn:active { transform: scale(0.9); }
.detail-action-item .text-size-btn {
  width: 48px;
  height: 48px;
  padding: 0;
  margin: 0;
}

/* Text size classes — affect bio, descriptions, impressions, nav info */
.detail-body.text-large .detail-bio,
.detail-body.text-large .detail-impression,
.detail-body.text-large .detail-impressions,
.detail-body.text-large .detail-nav-address,
.detail-body.text-large .detail-nav-live {
  font-size: 18px;
  line-height: 1.6;
}
.detail-body.text-xl .detail-bio,
.detail-body.text-xl .detail-impression,
.detail-body.text-xl .detail-impressions,
.detail-body.text-xl .detail-nav-address,
.detail-body.text-xl .detail-nav-live {
  font-size: 22px;
  line-height: 1.7;
}

.detail-artist {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.detail-title {
  font-size: 15px;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 4px;
}

.detail-year-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 6px;
}

.detail-from {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.detail-ig {
  font-size: 13px;
  color: var(--accent);
  margin-top: 6px;
}

.detail-fw { margin-top: 8px; }

.detail-fw-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--accent);
  opacity: 0.5;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.detail-fw-btn:disabled {
  cursor: default;
}
.detail-fw-btn.open { opacity: 1; }

.detail-fw-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding-left: 4px;
}
.detail-fw-list a {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}
.detail-fw-list a:active { opacity: 0.7; }

.detail-meta-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-top: 6px;
}

.detail-meta-left {
  flex: 1;
  min-width: 0;
}

.detail-meta-row .like-btn {
  margin-top: 0;
  flex-shrink: 0;
}

.detail-nav-bar {
  margin-top: 16px;
  margin-left: -20px;
  margin-right: -20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.detail-compass-wrap {
  position: relative;
  width: 90%;
  margin: 4px auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-top: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  padding: 6px 0;
}

/* Detail HUD — tour-style compass on detail page */
.detail-hud-wrap {
  width: 100%;
  margin: 0;
  border: none;
  border-radius: 0;
  padding: 0;
  background: var(--bg);
  overflow: hidden;
  gap: 1px;
}
.detail-hud-arc {
  position: relative;
  top: auto;
  border: none;
  padding: 0;
  width: 100%;
  overflow: hidden;
}
.detail-hud-wrap .detail-hud-info,
.detail-hud-wrap .detail-nav-address,
.detail-hud-wrap .compass-cal-hint {
  color: var(--text1);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  text-shadow: none;
}
.detail-hud-wrap .detail-hud-info {
  margin-top: -8px;
  padding-bottom: 0;
}
.detail-hud-wrap .detail-nav-address {
  padding-bottom: 0;
  margin-top: 2px;
  font-size: 13px;
}
.detail-hud-wrap .compass-enable-btn {
  color: var(--text1);
  border-color: var(--border);
  margin: 4px 0;
}
.detail-hud-wrap .compass-cal-hint {
  padding-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

/* Detail page locator */
.detail-locator {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 6px 16px 6px 8px;
  margin: 0 auto;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.detail-locator[hidden] { display: none; }
.detail-locator-arrow {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease-out;
}
.detail-locator.arrived .detail-locator-arrow {
  animation: locator-pulse 1s ease-in-out infinite;
}
.detail-locator-dist {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  color: var(--text1);
}

.detail-compass-wrap .compass-enable-btn {
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  z-index: auto;
  padding: 8px 20px;
  font-size: 13px;
}

.detail-nav-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--text2);
}

.detail-nav-info[hidden] { display: none; }

.detail-nav-sep {
  color: var(--text3);
}

.detail-nav-live {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--teal);
  margin: 2px 0 0;
}

.detail-nav-address {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  color: var(--teal);
  text-align: center;
}

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.like-btn:active {
  transform: scale(0.95);
}

.like-btn.liked {
  color: #E53935;
  border-color: #E53935;
  background: #FFF0F0;
}

.like-btn.liked .like-heart {
  fill: #E53935;
}

.like-count {
  font-size: 13px;
  font-weight: 600;
}

.detail-bio {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
}
.detail-bio-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.detail-bio-label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

/* GoTo / Tour — navigating active state */
.detail-goto-pill.navigating {
  color: var(--teal);
  border-color: var(--teal);
  background: var(--teal-light);
}

/* Tour dropdown from round button */
.tour-dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  z-index: 100;
  min-width: 180px;
  animation: tour-dd-in 0.15s ease;
}

@keyframes tour-dd-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.tour-dropdown-item {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.tour-dropdown-item + .tour-dropdown-item {
  border-top: 1px solid var(--border);
}

.tour-dropdown-item:active {
  background: var(--teal-light);
}

.goto-map-zone {
  position: relative;
  height: 55vh;
  overflow: hidden;
  border-radius: 16px 16px 0 0;
  margin: 12px -20px -20px;
  touch-action: none;
}

.goto-map-spin {
  position: absolute;
  /* 142% = √2 × 100% so rotated square fully covers the visible zone */
  width: 142%;
  height: 142%;
  top: 50%;
  left: 50%;
  transform-origin: center center;
  margin-top: -71%;   /* half of 142% */
  margin-left: -71%;
  will-change: transform;
  transition: transform 0.15s linear;
}

.goto-arrived {
  padding: 16px 0;
  text-align: center;
}

.goto-arrived[hidden] { display: none; }

.goto-arrived-msg {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

.goto-tour-btn {
  background: var(--teal);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.goto-tour-btn:active {
  transform: scale(0.97);
  opacity: 0.85;
}

.goto-tour-select {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
}

.detail-tour-dropdown {
  padding: 0 20px;
  margin-top: 16px;
  margin-bottom: 8px;
}
.detail-tour-select {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: auto;
}
.detail-tour-select[hidden] { display: none; }

.detail-impressions {
  padding: 0 20px;
  margin-bottom: 20px;
}

.detail-impression {
  font-style: italic;
  font-size: 14px;
  color: var(--text);
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}

.detail-impression:last-child {
  border-bottom: none;
}

.detail-range-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  background: #fff;
  color: var(--text1);
  text-align: center;
  padding: 24px 28px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
  max-width: 320px;
  width: calc(100% - 48px);
  animation: fadeInUp 0.25s ease;
}
.detail-range-toast p { font-weight: 600; font-size: 17px; margin: 0 0 6px; }
.detail-range-toast small { font-size: 13px; color: var(--text2); line-height: 1.4; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.detail-directions-group {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-directions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.detail-gmaps-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  padding: 4px;
}

/* Detail: field photos horizontal scroller */
.detail-section {
  margin-top: 24px;
}

.detail-section-title {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.detail-photo-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.detail-photo-scroll::-webkit-scrollbar {
  display: none;
}

.detail-photo-card {
  flex-shrink: 0;
  width: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.detail-photo-card img {
  width: 100%;
  object-fit: contain;
  background: #1a1a1a;
}

/* Detail: nearby murals row */
.detail-nearby-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.detail-nearby-row::-webkit-scrollbar {
  display: none;
}

.detail-nearby-card {
  flex-shrink: 0;
  width: 120px;
  cursor: pointer;
}

.detail-nearby-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--border);
}

.detail-nearby-card-artist {
  font-size: 11px;
  font-weight: 500;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-nearby-card-dist {
  font-size: 10px;
  color: var(--text-muted);
}

/* ========================================
   Gallery Grid
   ======================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  padding: 3px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  cursor: pointer;
  background: var(--border);
}

/* ========================================
   Tab Bar
   ======================================== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  display: flex;
  height: calc(var(--tab-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(245, 242, 237, 0.82);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 0;
  color: var(--text-muted);
  transition: color 0.15s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  min-height: var(--tab-height);
  border: none;
  background: none;
}

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

.tab-icon {
  width: 26px;
  height: 26px;
}

.tab-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* ========================================
   Offline Banner
   ======================================== */
.offline-banner {
  position: fixed;
  top: calc(var(--safe-top) + 8px);
  right: 20px;
  z-index: 10000;
  background: rgba(232, 168, 56, 0.9);
  backdrop-filter: blur(10px);
  color: #fff;
  text-align: center;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 12px;
  letter-spacing: 0.3px;
}

/* ========================================
   Install Prompt
   ======================================== */
.install-prompt[hidden] {
  display: none !important;
}

.install-prompt {
  position: fixed;
  bottom: calc(var(--tab-height) + var(--safe-bottom) + 8px);
  left: 12px;
  right: 12px;
  z-index: 160;
}

.install-prompt-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 500;
}

.install-prompt-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.btn-text {
  font-size: 13px;
  color: var(--text-muted);
  padding: 6px 10px;
}

.btn-primary-sm {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  background: var(--accent);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
}

/* ========================================
   Utility
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.empty-state-text {
  font-size: 15px;
  line-height: 1.5;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, #ece6df 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================================
   Routes
   ======================================== */
.routes-header {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  padding: 16px 16px 8px;
  color: var(--text);
}

.routes-list {
  padding: 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.route-card {
  display: flex;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.route-card:active {
  transform: scale(0.98);
}

.route-card-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border);
}

.route-card-body {
  flex: 1;
  padding: 10px 12px 10px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.route-card-name {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.route-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.route-card-stats {
  font-family: var(--font-display);
  font-size: 11px;
  color: var(--accent);
  margin-top: 6px;
  font-weight: 700;
}

/* Route detail */
.route-detail-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.route-detail-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}

.route-detail-stats {
  font-size: 13px;
  color: var(--accent);
  margin-top: 4px;
  font-weight: 600;
}

.route-stop-list {
  padding: 12px 16px;
}

.route-stop {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
}

.route-stop-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.route-stop-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border);
}

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

.route-stop-artist {
  font-weight: 700;
  font-size: 13px;
}

.route-stop-loc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-walk-seg {
  padding: 4px 0 4px 38px;
  font-size: 11px;
  color: var(--text-muted);
  border-left: 2px dashed var(--border);
  margin-left: 13px;
}

/* ========================================
   Directions Bar (in-app routing)
   ======================================== */
.directions-bar {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(44, 32, 22, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding: 10px 14px;
  border-radius: var(--radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.directions-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.directions-distance {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
}

.directions-time {
  font-size: 12px;
  opacity: 0.8;
}

.directions-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.directions-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.directions-dest-icon {
  background: none !important;
  border: none !important;
}

/* Persistent mini chip — collapsed directions bar */
.directions-chip {
  position: absolute;
  top: calc(var(--safe-top) + 52px);
  left: 12px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(44, 32, 22, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding: 6px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  max-width: calc(100% - 80px);
}

.directions-chip-text {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.directions-chip-close {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  flex-shrink: 0;
}

/* Nearest popup scope label */
.nearest-popup-scope {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 2px;
}

.nearest-popup-route {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

/* ========================================
   Tour Picker — Rotary Card Layout
   ======================================== */
.tour-picker-layout {
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--tab-height) - var(--safe-bottom));
  overflow: hidden;
  background: #EBE7E1;
}

/* ── Scrollable tour list ── */
.tour-list-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Tour list card ── */
.tour-list-card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tour-list-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-lg);
}

.tour-list-card-map {
  height: 160px;
  position: relative;
  touch-action: none;
  pointer-events: none;
}

.tour-list-card-map .leaflet-container {
  width: 100%;
  height: 100%;
}

.tour-list-card-map-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to top, var(--card) 0%, transparent 100%);
  z-index: 5;
  pointer-events: none;
}

.tour-list-card-info {
  padding: 10px 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tour-list-card-accent {
  width: 4px;
  height: 44px;
  border-radius: 2px;
  flex-shrink: 0;
}

.tour-list-card-details {
  flex: 1;
  min-width: 0;
}

.tour-list-card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  color: var(--text);
}

.tour-list-card-desc {
  font-size: 13px;
  color: var(--text2);
  margin-top: 1px;
  line-height: 1.3;
}

.tour-list-card-stats {
  display: flex;
  gap: 14px;
  margin-top: 6px;
}

.tour-list-card-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text3);
}

.tour-list-card-stat svg {
  opacity: 0.5;
}

.tour-list-go-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 20px;
  border-radius: 24px;
  border: none;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(14, 145, 140, 0.3);
  transition: transform 0.15s;
  flex-shrink: 0;
}

.tour-list-go-btn:active {
  transform: scale(0.94);
}

/* Legacy picker elements (kept for compatibility) */
.tour-picker-selector { display: none; }
.tour-start-btn { display: none; }
#tour-picker-map { display: none; }

.tour-picker-stop {
  background: none !important;
  border: none !important;
}

.tour-picker-stop span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  border: 2px solid #fff;
}

.tour-stats-box {
  position: absolute;
  bottom: 10px;
  left: 10px;
  right: 10px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 10px 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}

.tour-stats-box strong {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text);
}

.tour-stats-box span {
  font-size: 12px;
  color: var(--text2);
}

/* ========================================
   Active Tour — New Design
   ======================================== */

/* ── Tour nav bar (top) ── */
.active-tour-nav {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(var(--safe-top) + 2px) 20px 8px;
  background: var(--card);
  border-bottom: 0.5px solid rgba(0, 0, 0, 0.06);
  z-index: 10;
}

.active-tour-back {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
}

.active-tour-nav-info {
  flex: 1;
  min-width: 0;
}

.active-tour-nav-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tour-skip-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--teal);
  background: transparent;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.tour-skip-btn:active {
  background: rgba(14, 145, 140, 0.1);
}

.tour-reverse-nav-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--teal);
  background: transparent;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: background 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.tour-reverse-nav-btn:active {
  background: rgba(14, 145, 140, 0.1);
}

.active-tour-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.active-tour-progress-track {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.active-tour-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}

.active-tour-progress-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  flex-shrink: 0;
  white-space: nowrap;
}


/* ── Tour map zone (middle) ── */
.active-tour-map-zone {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
  padding-top: 0;
  background: var(--bg);
  margin-bottom: -1px;
}

.active-tour-segment-badge {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.active-tour-segment-badge svg {
  color: var(--teal);
}

/* ── Compass Bearing Arc ── */
/* Mural Locator (over next card) */
.mural-locator {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 2px solid #E53935;
  border-radius: 20px;
  padding: 4px 10px 4px 4px;
  margin-bottom: 6px;
  align-self: center;
}
.mural-locator[hidden] { display: none; }
.mural-locator-arrow {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease-out;
}
.mural-locator-arrow svg {
  width: 28px;
  height: 28px;
}
.mural-locator-arrow svg polygon {
  stroke: none;
}
.mural-locator-arrow svg polygon:nth-child(1) { fill: rgba(229,57,53,0.3); }
.mural-locator-arrow svg polygon:nth-child(2) { fill: #E53935; }
.mural-locator-arrow svg polygon:nth-child(3) { fill: rgba(229,57,53,0.15); }
.mural-locator-arrow svg polygon:nth-child(4) { fill: rgba(229,57,53,0.3); }
.mural-locator.arrived .mural-locator-arrow {
  animation: locator-pulse 1s ease-in-out infinite;
}
@keyframes locator-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
.mural-locator-info {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.mural-locator-label {
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text1);
}
.mural-locator-dist {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: #E53935;
}

.compass-arc {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  pointer-events: none;
  overflow: hidden;
  padding: 0;
  border: none;
}

.compass-ring-svg {
  display: block;
  width: 100%;
  height: auto;
}

.compass-arc[hidden] { display: none; }

.compass-arc-dots {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: 100%;
  padding: 0 12px;
  flex: 1;
}

/* Detail page compass arc — not absolute, flows in document */
.detail-compass-arc {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  overflow: hidden;
}

/* Tour HUD overlay — transparent on map, no blur */
.tour-hud-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  pointer-events: none;
  overflow: hidden;
  padding-bottom: 8px;
}
.tour-hud-overlay .compass-enable-btn {
  pointer-events: auto;
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  z-index: 510;
  margin-top: 4px;
}
.tour-hud-overlay .compass-cal-hint { pointer-events: auto; }

/* Override generic .compass-arc styles for tour HUD */
.tour-hud-overlay .compass-arc {
  position: relative;
  top: auto;
  border: none;
  padding: 0;
  width: 100%;
  overflow: hidden;
  border-radius: 0;
}


/* HUD info text — overlaid on map */
.hud-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: -4px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  color: var(--text1);
  text-shadow: 0 1px 3px rgba(255,255,255,0.8);
}


.compass-arrow {
  font-size: 30px;
  font-weight: 900;
  color: #22C55E;
  text-shadow: 0 0 12px rgba(34, 197, 94, 0.8), 0 0 4px rgba(34, 197, 94, 0.5);
  animation: compass-arrow-pulse 1s ease-in-out infinite;
  flex-shrink: 0;
  width: 30px;
  text-align: center;
  align-self: center;
}

.compass-arrow[hidden] { display: none; }

@keyframes compass-arrow-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.compass-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: background 0.08s, transform 0.08s, box-shadow 0.08s;
  margin-bottom: var(--arc-y, 0px);
}

.compass-dot[data-heat="hot"] {
  background: #22C55E;
  transform: scale(1.3);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.compass-dot[data-heat="warm"] {
  background: #FACC15;
  transform: scale(1.1);
  box-shadow: 0 0 4px rgba(250, 204, 21, 0.4);
}

.compass-dot[data-heat="cold"] {
  background: rgba(239, 68, 68, 0.5);
}

.compass-enable-btn {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  background: var(--teal);
  border: none;
  border-radius: 28px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  letter-spacing: 0.02em;
}

.compass-enable-btn[hidden] { display: none; }

.route-arrow {
  background: none !important;
  border: none !important;
  color: #fff;
  font-size: 13px;
  line-height: 14px;
  text-align: center;
  text-shadow: 0 0 2px #1E5B8A, 0 0 2px #1E5B8A;
  opacity: 0.85;
}

.compass-cal-hint {
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  padding: 4px 0;
  transition: opacity 1s ease;
}
.compass-cal-hint[hidden] { display: none; }

/* ── Tour bottom panel ── */
.active-tour-bottom {
  flex-shrink: 0;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.18), 0 -1px 6px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 10;
  overflow: hidden;
  padding: 0 12px;
  margin-top: 0;
  padding-top: 12px;
  border-radius: 0;
}

/* Divider lines above/below bottom panel */
.tour-divider-line {
  height: 4px;
  background: var(--teal);
  width: 100%;
  flex-shrink: 0;
  position: relative;
  z-index: 11;
}
.tour-divider-line.walking {
  background: #FF7043;
}

/* ── Bottom panel layout ── */
.tour-bottom-row {
  padding: 12px 4px 4px;
}

/* Mode header */
.tour-mode-header {
  margin-bottom: 8px;
}
.tour-mode-label {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--teal);
  transition: color 0.3s;
}
.tour-bottom-row[data-state="walking"] .tour-mode-label {
  color: #FF7043;
}

/* Content row: left + right zones side by side */
.tour-bottom-content {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.tour-left-zone {
  flex: 0 0 62%;
  display: flex;
  align-items: center;
  min-width: 0;
}

.tour-right-zone {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

/* ── Mural card ── */
.tour-stop-card {
  cursor: pointer;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.tour-stop-card:active { transform: scale(0.96); }

.tour-stop-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  border: 4px solid var(--teal);
  background: #e8e4de;
  transition: border-color 0.3s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

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

.tour-stop-num {
  position: absolute;
  top: -3px;
  left: -3px;
  min-width: 28px;
  height: 28px;
  border-radius: 14px;
  background: var(--teal);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  font-family: var(--font-body);
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: background 0.3s;
}

/* Explore state — teal border */
.tour-bottom-row[data-state="arrived"] .tour-stop-img-wrap {
  border-color: var(--teal);
}
.tour-bottom-row[data-state="arrived"] .tour-stop-num {
  background: var(--teal);
}

/* Navigating state — orange border on destination card */
.tour-bottom-row[data-state="walking"] .tour-stop-img-wrap {
  border-color: #FF7043;
}
.tour-bottom-row[data-state="walking"] .tour-stop-num {
  background: #FF7043;
}

/* Artist name */
.active-tour-bottom .tour-stop-artist {
  font-size: 14px;
  font-weight: 700;
  text-align: left;
  margin-top: 4px;
  color: var(--text1);
  font-family: var(--font-body);
  line-height: 1.2;
  padding-left: 4px;
}
.tour-bottom-row[data-state="walking"] .tour-stop-artist {
  text-align: right;
  padding-left: 0;
  padding-right: 4px;
}

/* Right explore column: bullets on top, button at bottom */
.tour-right-explore {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 100%;
}
.tour-right-explore[hidden] { display: none; }

/* Mode bullet points */
.tour-mode-bullets {
  margin: 0;
  padding: 0 0 0 18px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--teal);
}
.tour-mode-bullets-nav {
  color: #FF7043;
}

/* ── Next Mural button (explore mode) ── */
.tour-action-btn {
  width: 100%;
  aspect-ratio: 2 / 1;
  border-radius: 18px;
  border: 4px solid var(--teal);
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.tour-action-btn:active {
  transform: scale(0.95);
}
.tour-action-btn[hidden] { display: none; }
.tour-action-line1,
.tour-action-line2 {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.2;
}

/* ── Navigation instruction (walking mode) ── */
.tour-nav-instruction {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 100%;
}
.tour-nav-instruction[hidden] { display: none; }

.tour-nav-instruction {
  align-self: flex-start;
  padding-top: 0;
}

.tour-bottom-row[data-state="walking"] .tour-bottom-content {
  align-items: flex-start;
}

/* Navigating layout: instruction left, mural right */
.tour-bottom-row[data-state="walking"] .tour-left-zone {
  flex: 1;
}
.tour-bottom-row[data-state="walking"] .tour-right-zone {
  flex: 0 0 50%;
}

/* Tour progress bar */
.tour-progress-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px 12px;
}
.tour-progress-track {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.tour-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.tour-progress-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--font-body);
}

/* Tour layout — fills viewport */
.tour-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Tour map — fills remaining space */
.tour-map-full {
  flex: 1;
  min-height: 200px;
}

#tour-map-container {
  width: 100%;
  height: 100%;
}

/* Tour map thumbnail pins */
.tour-map-pin {
  background: none !important;
  border: none !important;
}

.tour-pin {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

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

.tour-pin-num {
  position: absolute;
  top: -1px;
  left: -1px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border-radius: 0 0 6px 0;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
}

.tour-pin.from {
  width: 40px;
  height: 40px;
  border: 3px solid var(--teal);
}

.tour-pin.from .tour-pin-num {
  background: var(--teal);
}

.tour-pin.to {
  width: 48px;
  height: 48px;
  border: 3px solid #FF7043;
}

.tour-pin.to .tour-pin-num {
  background: #FF7043;
}

.tour-pin.adjacent {
  width: 32px;
  height: 32px;
  border: 2px solid #9CA3AF;
  opacity: 0.5;
  filter: grayscale(0.6);
}
.tour-pin.adjacent .tour-pin-num {
  background: #9CA3AF;
  font-size: 9px;
  min-width: 14px;
  height: 14px;
}

/* ========================================
   Walk Mode — Proximity Banner
   ======================================== */
.proximity-banner {
  position: fixed;
  bottom: calc(var(--tab-height) + var(--safe-bottom) + 12px);
  left: 12px;
  right: 12px;
  z-index: 1150;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 10px 12px;
  box-shadow: var(--shadow-lg);
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.proximity-banner.visible {
  transform: translateY(0);
  opacity: 1;
}

.proximity-banner-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border);
}

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

.proximity-banner-artist {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proximity-banner-title {
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.proximity-banner-dist {
  font-size: 11px;
  color: var(--teal);
  font-weight: 600;
  margin-top: 2px;
}

.proximity-banner-view {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  background: var(--teal);
  color: #fff;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.proximity-banner-dismiss {
  font-size: 18px;
  color: var(--text3);
  padding: 4px 6px;
  line-height: 1;
  flex-shrink: 0;
}

/* ========================================
   Discover Mode — Persistent Pill
   ======================================== */
.discover-pill {
  position: fixed;
  top: calc(var(--safe-top) + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px 6px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(14, 145, 140, 0.4);
  white-space: nowrap;
}

.discover-pill-x {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 4px;
  line-height: 1;
  padding: 0 2px;
}

.discover-pill-x:hover {
  color: #fff;
}

.discover-pill-sep {
  opacity: 0.6;
}

.discover-pill-radius {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  padding: 2px 8px;
  line-height: 1;
}

/* ========================================
   Discover Mode — Settings Dialog
   ======================================== */
.discover-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 10100;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.discover-dialog {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.discover-dialog-header {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.discover-dialog-desc {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.4;
  margin-bottom: 20px;
}

.discover-dialog-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
}

.discover-toggle {
  width: 50px;
  height: 28px;
  border-radius: 14px;
  background: var(--border);
  position: relative;
  transition: background 0.2s;
  cursor: pointer;
}

.discover-toggle.on {
  background: var(--teal);
}

.discover-toggle-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}

.discover-toggle.on .discover-toggle-knob {
  transform: translateX(22px);
}

.discover-dialog-radius-section {
  margin-bottom: 20px;
}

.discover-dialog-radius-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 8px;
}

.discover-dialog-radius-options {
  display: flex;
  gap: 6px;
}

.discover-radius-opt {
  flex: 1;
  padding: 8px 4px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.discover-radius-opt.active {
  border-color: var(--teal);
  background: var(--teal-light);
  color: var(--teal);
}

.discover-dialog-stats {
  font-size: 12px;
  color: var(--text2);
  text-align: center;
  margin-bottom: 16px;
}

.discover-dialog-stats-sep {
  margin: 0 6px;
  opacity: 0.5;
}

.discover-dialog-done {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.discover-dialog-done:active {
  opacity: 0.85;
}

/* ========================================
   Discover Mode — Toast
   ======================================== */
.discover-toast {
  position: fixed;
  top: calc(var(--safe-top) + 60px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: 10200;
  background: rgba(44, 32, 22, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 20px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

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

/* ========================================
   Proximity Banner — Seen It Button
   ======================================== */
.proximity-banner-seen {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  background: var(--teal-light);
  color: var(--teal);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.proximity-banner-seen:active {
  background: var(--teal);
  color: #fff;
}

/* ========================================
   Detail — Seen It Button
   ======================================== */
.detail-action-btns {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
  align-items: flex-start;
  align-self: center;
}
.detail-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.detail-action-item .audio-btn,
.detail-action-item .seen-btn,
.detail-action-item .like-btn,
.detail-action-item .detail-goto-pill,
.detail-action-item .detail-tour-pill {
  width: 48px;
  height: 48px;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.detail-action-label {
  font-size: 11px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.audio-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}
.audio-btn:active { transform: scale(0.95); }
.audio-btn.playing {
  color: var(--teal);
  border-color: var(--teal);
  background: var(--teal-light);
}
.audio-btn.playing .audio-icon { stroke: var(--teal); }

.seen-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.seen-btn:active {
  transform: scale(0.95);
}

.seen-btn.seen {
  color: var(--teal);
  border-color: var(--teal);
  background: var(--teal-light);
}

.seen-btn.seen .seen-check {
  stroke: var(--teal);
}

.detail-goto-pill,
.detail-tour-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 0;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.detail-goto-pill:active,
.detail-tour-pill:active {
  transform: scale(0.95);
}
.detail-tour-pill.dimmed {
  opacity: 0.3;
  pointer-events: none;
}

/* ========================================
   Splash Screen Overlay
   ======================================== */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 30000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 33vh;
  animation: splash-in 0.4s ease;
}
@keyframes splash-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.splash-overlay.splash-closing {
  animation: splash-out 0.3s ease forwards;
}
@keyframes splash-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
.splash-content {
  text-align: center;
  padding: 0 24px;
}
.splash-title {
  font-family: var(--font-hand);
  font-size: 38px;
  font-weight: 700;
  color: #FFD600;
  text-shadow: 0 2px 6px rgba(0,0,0,0.5);
  margin-bottom: 20px;
  line-height: 1.2;
}
.splash-lines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 36px;
}
.splash-line {
  font-family: var(--font-hand);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  line-height: 1.3;
}
.splash-gotta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 10vh;
}
.splash-gotta .splash-line {
  color: #00E676;
}
.splash-arrow {
  color: #00E676;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
  align-self: flex-end;
  margin-right: -2%;
}

/* ========================================
   Help Overlay
   ======================================== */
.help-overlay {
  position: fixed; inset: 0;
  z-index: 1095;
  pointer-events: none;
}
.help-overlay[hidden] { display: none; }

.help-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.help-annotations { position: absolute; inset: 0; top: var(--safe-top); pointer-events: none; }

.help-ann {
  position: absolute;
  pointer-events: none;
  max-width: none;
  animation: help-fade-in 0.4s ease both;
}

@keyframes help-fade-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.help-label {
  font-family: var(--font-hand);
  font-size: 26px; font-weight: 700; line-height: 1.2;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  white-space: pre-line;
}
.help-label-lg { font-size: 34px; }

.help-arrow { pointer-events: none; }
.help-arrow svg { display: block; }

#tab-help.help-active { color: var(--teal); }
