/* ============================================================
   SAINT STAMP — Production CSS
   NexTech St. Helena · Offline-First PWA
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,900;1,600;1,700&family=Nunito:wght@400;500;600;700;800&display=swap');

:root {
  --forest:      #0D1F16;
  --forest-mid:  #1B3D2F;
  --forest-light:#2D6A4F;
  --sage:        #52B788;
  --sage-pale:   #D8F3DC;
  --gold:        #C4862A;
  --gold-bright: #E8B84B;
  --gold-pale:   #FFF5DC;
  --cream:       #F5EFE4;
  --cream-dark:  #E8DEC8;
  --ink:         #151510;
  --ink-mid:     #3A3830;
  --ink-soft:    #7A7568;
  --white:       #FDFCF8;
  --red-soft:    #E07070;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 4px 20px rgba(13,31,22,0.12);
  --shadow-sm:   0 2px 10px rgba(13,31,22,0.09);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-ui:      'Nunito', system-ui, sans-serif;
  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 20px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body { font-family: var(--font-ui); background: var(--cream); color: var(--ink); -webkit-font-smoothing: antialiased; }

/* ─── APP SHELL ─────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  background: var(--cream);
  overflow: hidden;
}

/* Safe area padding for notched devices */
#status-bar {
  height: calc(44px + var(--safe-top));
  padding-top: var(--safe-top);
  padding: var(--safe-top) 20px 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  background: transparent;
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  pointer-events: none;
}

#screen-container {
  flex: 1;
  overflow: hidden;
  position: relative;
  margin-top: 44px;
}

/* ─── SCREEN SYSTEM ─────────────────────────────────── */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--cream);
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.screen.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}
.screen.slide-back { transform: translateX(-20px); }

.scroll-area {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: none;
}
.scroll-area::-webkit-scrollbar { display: none; }

/* ─── BOTTOM NAV ────────────────────────────────────── */
#bottom-nav {
  display: flex;
  background: var(--white);
  border-top: 1px solid var(--cream-dark);
  padding-bottom: var(--safe-bottom);
  flex-shrink: 0;
  box-shadow: 0 -2px 12px rgba(13,31,22,0.06);
  position: relative;
  z-index: 10;
}

.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px 6px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  transition: all 0.2s;
  -webkit-appearance: none;
}
.nav-btn .nav-icon { font-size: 22px; transition: transform 0.2s; display: block; }
.nav-btn .nav-label { font-size: 10px; font-weight: 600; letter-spacing: 0.02em; }
.nav-btn.active { color: var(--forest-mid); }
.nav-btn.active .nav-icon { transform: scale(1.15); }
.nav-btn.active .nav-label { font-weight: 800; }

/* ─── SCREEN HEADERS ────────────────────────────────── */
.screen-header {
  padding: 16px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  border-bottom: 1px solid var(--cream-dark);
  flex-shrink: 0;
}
.screen-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--forest-mid);
}

/* ─── HERO BANNERS ──────────────────────────────────── */
.hero-banner {
  background: linear-gradient(150deg, var(--forest) 0%, var(--forest-mid) 100%);
  padding: 20px 20px 24px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.hero-banner::before {
  content: '';
  position: absolute;
  right: -30px; top: -30px;
  width: 160px; height: 160px;
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}

/* ─── BUTTONS ───────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: 50px; font-family: var(--font-ui); font-weight: 700; cursor: pointer; transition: all 0.2s; -webkit-appearance: none; text-decoration: none; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--forest-mid); color: var(--white); padding: 12px 24px; font-size: 15px; box-shadow: 0 4px 14px rgba(13,31,22,0.25); }
.btn-primary:hover { background: var(--forest); }
.btn-gold { background: var(--gold); color: var(--white); padding: 12px 24px; font-size: 15px; box-shadow: 0 4px 14px rgba(196,134,42,0.35); }
.btn-gold:hover { background: var(--gold-bright); color: var(--ink); }
.btn-outline { background: transparent; color: var(--forest-mid); border: 2px solid var(--forest-mid); padding: 10px 20px; font-size: 13px; }
.btn-outline:hover { background: var(--sage-pale); }
.btn-ghost { background: rgba(255,255,255,0.12); color: var(--white); border: 1px solid rgba(255,255,255,0.2); padding: 9px 18px; font-size: 13px; }
.btn-block { width: 100%; border-radius: var(--radius-sm); padding: 14px; font-size: 16px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 50%; background: rgba(255,255,255,0.15); color: var(--white); font-size: 17px; }

/* ─── CARDS ─────────────────────────────────────────── */
.card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--cream-dark); box-shadow: var(--shadow-sm); }
.card-padded { padding: 18px; }

/* ─── BADGE / CHIP ──────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 50px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.badge-green  { background: var(--sage-pale); color: var(--forest-mid); }
.badge-gold   { background: var(--gold-pale);  color: var(--gold); }
.badge-red    { background: #FDECEA; color: #C0392B; }
.badge-grey   { background: var(--cream-dark); color: var(--ink-soft); }

/* ─── OFFLINE BANNER ────────────────────────────────── */
#offline-banner {
  display: none;
  background: #1A4A6B;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 6px 16px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  letter-spacing: 0.05em;
}
#offline-banner.show { display: block; }
#sync-banner {
  display: none;
  background: var(--forest-mid);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 6px 16px;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
}
#sync-banner.show { display: block; }

/* ─── TOAST ─────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9000;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.toast-error { background: #C0392B; }
.toast.toast-success { background: var(--forest-mid); }

/* ─── DIFF PIPS ─────────────────────────────────────── */
.diff-pips { display: flex; gap: 2px; }
.pip { width: 14px; height: 4px; border-radius: 2px; background: var(--cream-dark); }
.pip.e { background: #52b788; }
.pip.m { background: #E8B84B; }
.pip.h { background: #e07070; }

/* ─── STAMP GRID ────────────────────────────────────── */
.stamp-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; padding: 16px; }
.stamp-slot {
  aspect-ratio: 1;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: transform 0.2s;
  position: relative;
  overflow: hidden;
}
.stamp-slot:active { transform: scale(0.92); }
.stamp-slot.earned {
  border: 2px solid var(--sage);
  background: var(--sage-pale);
}
.stamp-slot.locked {
  border: 2px dashed rgba(0,0,0,0.1);
  background: var(--cream-dark);
}
.stamp-slot.locked .slot-num { color: rgba(0,0,0,0.2); }
.stamp-slot .slot-num { font-size: 9px; font-weight: 800; color: var(--forest-mid); font-family: var(--font-ui); }

/* ─── PROGRESS BAR ──────────────────────────────────── */
.progress-wrap { background: rgba(255,255,255,0.12); border-radius: 50px; height: 7px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 50px; transition: width 0.8s ease; background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }
.progress-wrap.sage .progress-fill { background: linear-gradient(90deg, var(--sage), #74c69d); }

/* ─── CERT BANDS ────────────────────────────────────── */
.cert-band { border-radius: var(--radius-sm); padding: 14px 16px; display: flex; align-items: center; gap: 12px; border: 1.5px solid; margin-bottom: 10px; }
.cert-band.bronze { background: #FFF5EC; border-color: #CD7F32; }
.cert-band.silver { background: #F8F8F8; border-color: #9E9E9E; }
.cert-band.gold   { background: var(--gold-pale); border-color: var(--gold); }
.cert-band .cb-icon { font-size: 28px; flex-shrink: 0; }
.cert-band .cb-info { flex: 1; }
.cert-band .cb-name { font-family: var(--font-display); font-size: 16px; font-weight: 700; }
.cert-band.bronze .cb-name { color: #7A4010; }
.cert-band.silver .cb-name { color: #555; }
.cert-band.gold   .cb-name { color: #7A5A00; }
.cert-band .cb-desc { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }

/* ─── WALK CARDS ────────────────────────────────────── */
.walk-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border: 1px solid var(--cream-dark);
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.walk-card:active { transform: scale(0.98); }
.walk-card.completed { border-left: 4px solid var(--sage); }
.walk-card.closed .wc-name { color: var(--ink-soft); }

.wc-thumb {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--cream-dark);
}
.wc-info { flex: 1; min-width: 0; }
.wc-name { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-meta { display: flex; gap: 8px; margin-top: 3px; flex-wrap: wrap; align-items: center; }
.wc-meta span { font-size: 11px; color: var(--ink-soft); }
.wc-status { font-size: 18px; flex-shrink: 0; }

/* ─── WALK DETAIL HERO ──────────────────────────────── */
.walk-hero {
  height: 200px;
  background: linear-gradient(160deg, var(--forest) 0%, var(--forest-mid) 100%);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 16px 20px;
  overflow: hidden;
  flex-shrink: 0;
}
.walk-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.walk-hero-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(13,31,22,0.85) 0%, rgba(13,31,22,0.3) 100%); }
.walk-hero-content { position: relative; z-index: 2; width: 100%; }
.walk-hero-name { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--white); line-height: 1.1; }
.walk-hero-effort { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); border-radius: 8px; padding: 6px 12px; text-align: center; z-index: 2; }
.walk-hero-effort .effort-num { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--gold-bright); display: block; line-height: 1; }
.walk-hero-effort .effort-label { font-size: 9px; color: rgba(255,255,255,0.55); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; display: block; }
.back-btn { position: absolute; top: 10px; left: 12px; z-index: 2; }

/* ─── WALK META STRIP ───────────────────────────────── */
.walk-meta-strip { display: flex; background: var(--white); border-bottom: 1px solid var(--cream-dark); flex-shrink: 0; }
.wms-item { flex: 1; padding: 10px 6px; text-align: center; border-right: 1px solid var(--cream-dark); }
.wms-item:last-child { border-right: none; }
.wms-icon { font-size: 16px; display: block; margin-bottom: 2px; }
.wms-val { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--forest-mid); display: block; line-height: 1; }
.wms-lbl { font-size: 10px; color: var(--ink-soft); font-weight: 600; display: block; }

/* ─── SECTION LABELS ────────────────────────────────── */
.section-label { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--forest-mid); padding: 14px 16px 8px; }
.section-label-sm { font-size: 13px; font-weight: 700; color: var(--forest-mid); padding: 10px 16px 6px; text-transform: uppercase; letter-spacing: 0.08em; }

/* ─── ALERT BOX ─────────────────────────────────────── */
.alert-box { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 16px 12px; }
.alert-box.warn { background: #FFF8E1; border: 1.5px solid #E8B84B; }
.alert-box.danger { background: #FDECEA; border: 1.5px solid #E07070; }
.alert-box .alert-icon { font-size: 18px; flex-shrink: 0; }
.alert-box p { font-size: 12px; line-height: 1.55; color: var(--ink-mid); }

/* ─── POI LIST ──────────────────────────────────────── */
.poi-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--cream-dark); }
.poi-item:last-child { border-bottom: none; }
.poi-item .poi-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sage); margin-top: 5px; flex-shrink: 0; }
.poi-item p { font-size: 13px; color: var(--ink-mid); }

/* ─── QR SCAN SCREEN ────────────────────────────────── */
#screen-scan { background: #0a1a10; }
#qr-reader { width: 100%; flex: 1; position: relative; }
#qr-reader video { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.scan-footer { background: rgba(0,0,0,0.6); padding: 16px 20px calc(16px + var(--safe-bottom)); flex-shrink: 0; }
.scan-walk-label { font-family: var(--font-display); font-size: 18px; color: rgba(255,255,255,0.5); text-align: center; margin-bottom: 12px; font-style: italic; }

/* ─── STAMP SUCCESS OVERLAY ─────────────────────────── */
#stamp-overlay {
  position: fixed; inset: 0;
  background: linear-gradient(160deg, var(--forest) 0%, #050f08 100%);
  z-index: 500;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
#stamp-overlay.show { opacity: 1; pointer-events: all; }
.stamp-circle {
  width: 130px; height: 130px;
  border: 4px solid var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  animation: stampIn 0.5s cubic-bezier(0.34,1.56,0.64,1) both;
  overflow: hidden;
}
.stamp-circle::before { content: ''; position: absolute; inset: 6px; border: 2px dashed rgba(196,134,42,0.4); border-radius: 50%; }
.stamp-circle img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; opacity: 0.85; }
@keyframes stampIn { from { transform: scale(2) rotate(15deg); opacity: 0; } to { transform: scale(1) rotate(-2deg); opacity: 1; } }
.stamp-title { font-family: var(--font-display); font-size: 34px; font-weight: 700; color: var(--white); text-align: center; }
.stamp-walk-name { font-family: var(--font-display); font-size: 20px; font-style: italic; color: var(--gold-bright); text-align: center; }
.stamp-sub { font-size: 13px; color: rgba(255,255,255,0.4); text-align: center; }
.stamp-offline-note { font-size: 11px; color: rgba(255,255,255,0.3); text-align: center; font-style: italic; }
.stamp-actions { display: flex; gap: 10px; margin-top: 8px; }

/* ─── LEADERBOARD ───────────────────────────────────── */
.lb-tabs { display: flex; overflow-x: auto; scrollbar-width: none; background: var(--white); border-bottom: 1px solid var(--cream-dark); padding: 0 8px; flex-shrink: 0; }
.lb-tabs::-webkit-scrollbar { display: none; }
.lb-tab { padding: 12px 14px; font-size: 12px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; cursor: pointer; border-bottom: 2.5px solid transparent; transition: all 0.2s; font-family: var(--font-ui); border-top: none; border-left: none; border-right: none; background: none; }
.lb-tab.active { color: var(--forest-mid); border-bottom-color: var(--forest-mid); }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--white); border-radius: var(--radius-sm); margin-bottom: 8px; border: 1px solid var(--cream-dark); }
.lb-row.you { background: var(--sage-pale); border-color: var(--sage); }
.lb-pos { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--ink-soft); width: 28px; text-align: center; flex-shrink: 0; }
.lb-pos.top { color: var(--gold); }
.lb-av { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--white); flex-shrink: 0; }
.lb-user { flex: 1; }
.lb-uname { font-size: 13px; font-weight: 700; color: var(--ink); }
.lb-ubadge { font-size: 11px; color: var(--ink-soft); }
.lb-score { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--forest-mid); text-align: right; }
.lb-score span { display: block; font-size: 10px; color: var(--ink-soft); font-family: var(--font-ui); font-weight: 500; }

/* ─── PRICING CARDS ─────────────────────────────────── */
.plan-card { background: var(--white); border-radius: var(--radius); border: 1.5px solid var(--cream-dark); padding: 18px; margin-bottom: 12px; transition: all 0.2s; }
.plan-card.featured { background: var(--forest); border-color: transparent; }
.plan-card .plan-name { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--forest-mid); }
.plan-card.featured .plan-name { color: var(--white); }
.plan-card .plan-for { font-size: 12px; color: var(--ink-soft); margin-bottom: 10px; }
.plan-card.featured .plan-for { color: rgba(255,255,255,0.4); }
.plan-card .plan-price { font-family: var(--font-display); font-size: 32px; font-weight: 900; color: var(--forest); }
.plan-card.featured .plan-price { color: var(--gold-bright); }
.plan-card .plan-period { font-size: 12px; color: var(--ink-soft); margin-bottom: 14px; }
.plan-card.featured .plan-period { color: rgba(255,255,255,0.35); }
.plan-feature { display: flex; align-items: flex-start; gap: 7px; font-size: 12px; color: var(--ink-mid); margin-bottom: 6px; }
.plan-card.featured .plan-feature { color: rgba(255,255,255,0.7); }
.plan-feature.off { opacity: 0.35; text-decoration: line-through; }

/* ─── AUTH SCREEN ───────────────────────────────────── */
#screen-auth { background: var(--forest); }
.auth-logo { text-align: center; padding: 48px 20px 24px; }
.auth-wordmark { font-family: var(--font-display); font-size: 42px; font-weight: 700; color: var(--white); font-style: italic; }
.auth-sub { font-size: 14px; color: rgba(255,255,255,0.45); margin-top: 4px; }
.auth-card { background: var(--white); border-radius: var(--radius) var(--radius) 0 0; flex: 1; padding: 28px 24px; }
.auth-input { width: 100%; padding: 14px 16px; border: 1.5px solid var(--cream-dark); border-radius: var(--radius-sm); font-family: var(--font-ui); font-size: 16px; color: var(--ink); background: var(--cream); transition: border-color 0.2s; outline: none; }
.auth-input:focus { border-color: var(--sage); background: var(--white); }
.auth-label { font-size: 13px; font-weight: 700; color: var(--forest-mid); margin-bottom: 8px; display: block; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--cream-dark); }
.auth-divider span { font-size: 12px; color: var(--ink-soft); font-weight: 500; }

/* ─── ONBOARDING ────────────────────────────────────── */
#screen-onboarding { background: var(--forest); }
.onboard-slide { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; text-align: center; }
.onboard-slide .ob-icon { font-size: 72px; margin-bottom: 24px; }
.onboard-slide h2 { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: var(--white); margin-bottom: 12px; }
.onboard-slide p { font-size: 16px; color: rgba(255,255,255,0.55); line-height: 1.65; font-weight: 300; }
.onboard-dots { display: flex; gap: 8px; justify-content: center; padding-bottom: 20px; flex-shrink: 0; }
.onboard-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.2); transition: all 0.3s; }
.onboard-dot.active { background: var(--gold); width: 22px; border-radius: 4px; }

/* ─── PROFILE SCREEN ────────────────────────────────── */
.profile-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px 16px; background: var(--white); border-bottom: 1px solid var(--cream-dark); }
.pstat { background: var(--cream); border-radius: var(--radius-sm); padding: 14px; }
.pstat .pv { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--forest-mid); line-height: 1; }
.pstat .pl { font-size: 11px; color: var(--ink-soft); font-weight: 600; margin-top: 3px; }
.menu-item { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--cream-dark); cursor: pointer; transition: background 0.15s; }
.menu-item:active { background: var(--cream); }
.menu-item .mi-icon { font-size: 20px; width: 28px; }
.menu-item .mi-label { flex: 1; font-size: 14px; font-weight: 600; color: var(--ink); }
.menu-item .mi-arrow { color: var(--ink-soft); font-size: 14px; }

/* ─── INSTALL PROMPT ────────────────────────────────── */
/* Hidden state slides past the full bottom offset (70px + safe area) and
   also sets visibility:hidden. The old translateY(120%) was relative to the
   banner's own ~62px height — less than its 90px offset — so a "hidden"
   banner stayed parked on screen after Install / Later on wide layouts.
   Width is pinned to the 480px app column rather than the whole viewport. */
#install-prompt {
  position: fixed; bottom: calc(70px + var(--safe-bottom));
  left: 50%; width: min(448px, calc(100vw - 32px));
  transform: translate(-50%, calc(100% + 70px + var(--safe-bottom) + 24px));
  visibility: hidden; pointer-events: none;
  background: var(--forest-mid); border-radius: var(--radius); padding: 14px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 32px rgba(13,31,22,0.3);
  z-index: 400;
  transition: transform 0.4s ease, visibility 0s linear 0.4s;
}
#install-prompt.show {
  transform: translate(-50%, 0);
  visibility: visible; pointer-events: auto;
  transition: transform 0.4s ease, visibility 0s;
}
#install-prompt p { flex: 1; font-size: 13px; color: var(--white); font-weight: 600; line-height: 1.4; }

/* ─── FILTERS ───────────────────────────────────────── */
.filter-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px 16px; background: var(--white); border-bottom: 1px solid var(--cream-dark); flex-shrink: 0; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { white-space: nowrap; padding: 6px 14px; border-radius: 50px; font-size: 12px; font-weight: 700; border: 1.5px solid var(--cream-dark); background: var(--cream); color: var(--ink-soft); cursor: pointer; transition: all 0.2s; font-family: var(--font-ui); }
.filter-chip.active { background: var(--sage-pale); border-color: var(--sage); color: var(--forest-mid); }

/* ─── FORM INPUTS ───────────────────────────────────── */
input[type="email"], input[type="text"], input[type="number"] {
  -webkit-appearance: none; appearance: none;
}

/* ─── LOADING STATES ────────────────────────────────── */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--cream-dark); border-top-color: var(--sage); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── ANIMATIONS ────────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { animation: fadeUp 0.4s ease forwards; }
.fade-up-d1 { animation-delay: 0.1s; opacity: 0; }
.fade-up-d2 { animation-delay: 0.2s; opacity: 0; }
.fade-up-d3 { animation-delay: 0.3s; opacity: 0; }

/* ─── HOME SCREEN SPECIFICS ─────────────────────────── */
.home-greeting { font-size: 13px; color: rgba(255,255,255,0.5); font-weight: 500; }
.home-name { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--white); }
.home-name span { color: var(--gold-bright); }
.home-pass-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18); border-radius: 50px; padding: 5px 12px; margin-top: 10px; font-size: 11px; font-weight: 700; color: var(--gold-bright); letter-spacing: 0.06em; }
.stat-row { display: flex; gap: 10px; padding: 14px 16px; background: var(--white); border-bottom: 1px solid var(--cream-dark); flex-shrink: 0; }
.stat-tile { flex: 1; background: var(--cream); border-radius: var(--radius-sm); padding: 12px 8px; text-align: center; }
.stat-tile .sv { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--forest-mid); line-height: 1; }
.stat-tile .sl { font-size: 10px; color: var(--ink-soft); font-weight: 600; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px 14px; }
.quick-card { background: var(--white); border-radius: var(--radius-sm); padding: 16px 14px; border: 1px solid var(--cream-dark); box-shadow: var(--shadow-sm); cursor: pointer; transition: all 0.2s; }
.quick-card:active { transform: scale(0.97); }
.quick-card .qc-icon { font-size: 26px; display: block; margin-bottom: 7px; }
.quick-card .qc-title { font-size: 13px; font-weight: 700; color: var(--ink); }
.quick-card .qc-sub { font-size: 11px; color: var(--ink-soft); }
.featured-walk { margin: 0 16px 16px; background: linear-gradient(135deg, var(--forest-mid), var(--forest)); border-radius: var(--radius); padding: 18px; color: var(--white); cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden; }
.featured-walk:active { transform: scale(0.99); }
.featured-walk .fw-tag { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--gold-bright); text-transform: uppercase; margin-bottom: 4px; }
.featured-walk .fw-name { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.featured-walk .fw-meta { display: flex; gap: 12px; font-size: 12px; color: rgba(255,255,255,0.55); }
.featured-walk::after { content: '🌿'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 52px; opacity: 0.2; }

/* ─── WALK TRAIL MAP ─────────────────────────────────── */
#screen-walk-map { padding: 0; } /* keeps .screen's absolute positioning; children anchor to it */
#walk-map { position: absolute; inset: 0; z-index: 1; background: var(--cream); }
.map-back {
  position: absolute; top: calc(12px + var(--safe-top, 0px)); left: 12px; z-index: 500;
  background: var(--white); color: var(--forest-mid);
  box-shadow: 0 4px 16px rgba(13,31,22,0.25);
}
.map-title {
  position: absolute; top: calc(16px + var(--safe-top, 0px)); left: 64px; right: 64px; z-index: 500;
  background: var(--white); border-radius: 50px; padding: 9px 16px;
  font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--forest-mid);
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 4px 16px rgba(13,31,22,0.2);
}
.map-hud {
  position: absolute; left: 12px; right: 12px; bottom: calc(12px + var(--safe-bottom)); z-index: 500;
  background: var(--white); border-radius: var(--radius); padding: 12px 14px;
  box-shadow: 0 8px 32px rgba(13,31,22,0.3);
}
.map-hud-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.map-stat { flex: 1; text-align: center; }
.map-stat span { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--forest-mid); line-height: 1.1; }
.map-stat label { font-size: 10px; font-weight: 700; color: var(--ink-soft); letter-spacing: 0.06em; text-transform: uppercase; }
.map-recenter { background: var(--cream); box-shadow: none; flex-shrink: 0; }
.map-scan-locked {
  background: var(--cream-dark) !important; color: var(--ink-soft) !important;
  cursor: not-allowed; font-size: 13px;
}
.map-scan-unlocked {
  background: linear-gradient(135deg, var(--gold), #a86f1f) !important; color: #fff !important;
  animation: scanPulse 1.6s ease-in-out infinite; font-size: 14px;
}
@keyframes scanPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196,134,42,0.55); }
  50%      { box-shadow: 0 0 0 12px rgba(196,134,42,0); }
}
.postbox-marker { font-size: 30px; line-height: 38px; text-align: center; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.4)); }
.user-dot .user-dot-core {
  width: 16px; height: 16px; margin: 3px; border-radius: 50%;
  background: #1A73E8; border: 3px solid #fff;
  box-shadow: 0 0 0 2px rgba(26,115,232,0.35), 0 2px 6px rgba(0,0,0,0.3);
  animation: userPulse 2.4s ease-in-out infinite;
}
@keyframes userPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(26,115,232,0.35), 0 2px 6px rgba(0,0,0,0.3); }
  50%      { box-shadow: 0 0 0 8px rgba(26,115,232,0.12), 0 2px 6px rgba(0,0,0,0.3); }
}
.trailhead-marker { font-size: 20px; line-height: 26px; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4)); }

/* ─── ISLAND OVERVIEW MAP ───────────────────────────── */
.walk-pin {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 2.5px solid #fff;
  font-family: var(--font-ui); font-size: 12px; font-weight: 800; color: #fff;
  box-shadow: 0 2px 8px rgba(13,31,22,0.4);
}
.walk-pin span { line-height: 1; }
.walk-pin-open   { background: var(--gold); }
.walk-pin-done   { background: var(--forest-light); }
.walk-pin-closed { background: #9a9a94; }
.island-map-legend {
  position: absolute; left: 10px; bottom: 10px; z-index: 500;
  background: var(--white); border-radius: 8px; padding: 6px 10px;
  display: flex; gap: 12px; font-size: 11px; font-weight: 700; color: var(--ink-mid);
  box-shadow: 0 2px 10px rgba(13,31,22,0.2);
}
.island-map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg-open   { background: var(--gold); }
.lg-done   { background: var(--forest-light); }
.lg-closed { background: #9a9a94; }
.walk-popup { font-family: var(--font-ui); min-width: 170px; }
.walk-popup strong { font-family: var(--font-display); font-size: 14px; color: var(--forest-mid); }
.walk-popup .wp-meta   { font-size: 11px; color: var(--ink-soft); margin: 4px 0; }
.walk-popup .wp-status { font-size: 11px; font-weight: 700; margin-bottom: 8px; }



/* ============================================================
   TRAIL MAP SCREEN  v4.0 — Outdooractive / AllTrails pattern
   Map fills 100% of screen. All UI overlays float above it.
   No sidebar. Floating search bar at top, FAB controls on right,
   always-visible peek drawer at bottom for walk list.
   ============================================================ */

/* ── Screen — no transform (Leaflet must init on untransformed container) ── */
#screen-map {
  background:#1a2a20;
  transform:none !important;
  overflow:hidden;
}

/* ── Leaflet fills the entire screen ── */
#saintStampMap {
  position:absolute !important;
  inset:0 !important;
  z-index:1;
  background:#1a2a20;
}

/* ══════════════════════════════════════════════════════
   FLOATING SEARCH BAR  (top of map, like Google Maps)
   ══════════════════════════════════════════════════════ */
.map-search-bar {
  position:absolute; top:12px; left:12px; right:12px; z-index:600;
  display:flex; align-items:center; gap:8px;
  background:rgba(255,255,255,0.97);
  border-radius:14px;
  box-shadow:0 4px 20px rgba(0,0,0,0.25);
  padding:0 12px 0 14px;
  height:48px;
}
.msb-icon { font-size:16px; flex-shrink:0; color:#555; }
#map-search-input {
  flex:1; border:none; outline:none; background:transparent;
  font-size:14px; font-family:var(--font-ui); color:var(--ink);
  min-width:0;
}
#map-search-input::placeholder { color:#999; }
.msb-back {
  background:var(--forest-mid); color:#fff;
  border:none; border-radius:9px; padding:6px 11px;
  font-size:13px; font-weight:700; cursor:pointer;
  font-family:var(--font-ui); white-space:nowrap; flex-shrink:0;
  transition:background 0.15s;
}
.msb-back.active, .msb-back:active { background:var(--sage); color:var(--forest); }

/* ══════════════════════════════════════════════════════
   FAB BUTTONS  (right side, below Leaflet zoom control)
   ══════════════════════════════════════════════════════ */
.map-fabs {
  position:absolute; right:10px; top:130px; z-index:600;
  display:flex; flex-direction:column; gap:8px;
}
.map-fab {
  width:44px; height:44px;
  background:rgba(255,255,255,0.95);
  border:none; border-radius:12px;
  box-shadow:0 2px 12px rgba(0,0,0,0.22);
  font-size:18px; cursor:pointer; display:flex;
  align-items:center; justify-content:center;
  transition:transform 0.12s, box-shadow 0.12s;
}
.map-fab:active { transform:scale(0.93); box-shadow:0 1px 6px rgba(0,0,0,0.18); }

/* ══════════════════════════════════════════════════════
   ACTIVE-WALK BANNER  (slides down from top)
   ══════════════════════════════════════════════════════ */
.map-walk-banner {
  position:absolute; top:0; left:0; right:0; z-index:700;
  background:linear-gradient(135deg,#1a5c2a,#0d3d1e);
  border-bottom:2px solid var(--sage);
  padding:10px 14px;
  display:none; align-items:center; gap:8px;
  font-size:12px; color:#fff; font-family:var(--font-ui);
  box-shadow:0 4px 16px rgba(0,0,0,0.4);
  transform:translateY(-100%);
  transition:transform 0.3s ease;
}
.map-walk-banner.show {
  display:flex; transform:translateY(0);
}
.mwb-dot {
  width:10px; height:10px; border-radius:50%; background:var(--sage); flex-shrink:0;
  animation:wbPulse 1.5s infinite;
}
@keyframes wbPulse {
  0%   { box-shadow:0 0 0 0 rgba(82,183,136,0.7); }
  70%  { box-shadow:0 0 0 8px rgba(82,183,136,0); }
  100% { box-shadow:0 0 0 0 rgba(82,183,136,0); }
}
.mwb-text { flex:1; line-height:1.3; }
.mwb-scan {
  background:var(--sage); color:var(--forest); border:none; border-radius:8px;
  padding:6px 12px; font-size:12px; font-weight:700; cursor:pointer;
  font-family:var(--font-ui); white-space:nowrap;
}
.mwb-cancel {
  background:rgba(255,255,255,0.1); border:1px solid rgba(255,255,255,0.2);
  border-radius:8px; width:30px; height:30px; color:#fff;
  font-size:14px; cursor:pointer; display:flex; align-items:center; justify-content:center;
}

/* ══════════════════════════════════════════════════════
   WALK DETAIL SHEET  (slides up when trail/pin tapped)
   ══════════════════════════════════════════════════════ */
.map-detail-sheet {
  position:absolute; bottom:0; left:0; right:0; z-index:800;
  background:var(--cream); border-radius:20px 20px 0 0;
  box-shadow:0 -8px 48px rgba(0,0,0,0.45);
  transform:translateY(100%);
  transition:transform 0.32s cubic-bezier(0.34,1.56,0.64,1);
  max-height:75%; overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}
.map-detail-sheet.open { transform:translateY(0); }

.map-detail-backdrop {
  position:absolute; inset:0; z-index:790;
  display:none; background:rgba(0,0,0,0.4);
}
.map-detail-sheet.open ~ .map-detail-backdrop { display:block; }

/* Detail sheet internals */
.mds-bar  { width:40px; height:4px; background:#ccc; border-radius:2px; margin:10px auto 0; }
.mds-color-band { height:5px; margin:10px 16px; border-radius:3px; }
.mds-body { padding:4px 16px 12px; }
.mds-title { font-family:var(--font-display); font-size:21px; font-weight:700; color:var(--ink); line-height:1.2; margin-bottom:10px; }
.mds-chips { display:flex; gap:5px; flex-wrap:wrap; margin-bottom:10px; }
.mds-chip {
  font-size:11px; font-weight:700; padding:4px 10px; border-radius:20px;
  border:1.5px solid transparent; font-family:var(--font-ui); white-space:nowrap;
}
.mds-chip-blue   { background:rgba(52,152,219,0.1);  color:#1565c0; border-color:rgba(52,152,219,0.2); }
.mds-chip-purple { background:rgba(103,58,183,0.1);  color:#4527a0; border-color:rgba(103,58,183,0.2); }
.mds-chip-gold   { background:rgba(232,184,75,0.15); color:#7b5800; border-color:rgba(232,184,75,0.3); }
.mds-chip-teal   { background:rgba(0,150,136,0.1);   color:#00695c; border-color:rgba(0,150,136,0.2); }
.mds-chip-red    { background:rgba(192,57,43,0.1);   color:#b71c1c; border-color:rgba(192,57,43,0.2); }

/* Grade pips */
.mds-pips { display:flex; gap:3px; margin-bottom:10px; }
.gpip { display:inline-block; width:18px; height:5px; border-radius:3px; background:#e0e0e0; }
.gpip.on { /* color set inline */ }

.mds-highlight { font-size:13px; color:var(--ink-soft); font-style:italic; line-height:1.5; margin-bottom:8px; }
.mds-desc { font-size:13px; color:var(--ink-mid); line-height:1.65; margin-bottom:10px; }
.mds-alert {
  font-size:12px; padding:8px 12px; border-radius:8px; margin-bottom:8px; line-height:1.5;
  background:#FFF8F0; border-left:3px solid #f39c12; color:#6b4c1a;
}

/* Actions row */
.mds-actions {
  display:grid; grid-template-columns:1fr 1fr; gap:10px;
  padding:12px 16px 24px; border-top:1px solid var(--cream-dark);
}
.mds-btn-primary {
  grid-column:1; background:linear-gradient(135deg,#1B3D2F,#0D1F16);
  color:#fff; border:none; border-radius:50px; padding:14px;
  font-size:14px; font-weight:700; cursor:pointer; font-family:var(--font-ui);
  transition:opacity 0.15s; text-align:center;
}
.mds-btn-primary:active { opacity:0.8; }
.mds-btn-secondary {
  grid-column:2; background:var(--sage); color:var(--forest);
  border:none; border-radius:50px; padding:14px;
  font-size:14px; font-weight:700; cursor:pointer; font-family:var(--font-ui);
  text-align:center;
}
.mds-btn-ghost {
  grid-column:1 / -1; background:transparent;
  border:1.5px solid var(--cream-dark); border-radius:50px;
  color:var(--ink-soft); padding:11px; font-size:12px; font-weight:600;
  cursor:pointer; font-family:var(--font-ui); text-align:center;
}
.mds-closed {
  grid-column:1 / -1; text-align:center; color:#b71c1c;
  font-weight:700; padding:12px; background:#FFEBEE;
  border-radius:10px; font-family:var(--font-ui);
}

/* ══════════════════════════════════════════════════════
   PEEK DRAWER  (always partially visible at bottom)
   Peek state: drag handle + filter strip visible (≈72px)
   Open state: full walk list visible
   ══════════════════════════════════════════════════════ */
.map-peek-drawer {
  position:absolute; bottom:0; left:0; right:0; z-index:650;
  background:rgba(255,255,255,0.98);
  border-radius:20px 20px 0 0;
  box-shadow:0 -4px 24px rgba(0,0,0,0.18);
  /* Peek: only handle + filter strip (~72px) visible above nav */
  transform:translateY(calc(100% - 72px));
  transition:transform 0.38s cubic-bezier(0.32,0,0.67,0);
  max-height:78vh;
  display:flex; flex-direction:column;
}
.map-peek-drawer.open {
  transform:translateY(0);
  transition:transform 0.4s cubic-bezier(0.22,1,0.36,1);
}

/* Handle */
.mpd-handle {
  display:flex; justify-content:center;
  padding:10px 0 8px; cursor:pointer; flex-shrink:0;
}
.mpd-pill { width:40px; height:4px; background:#ddd; border-radius:2px; }

/* Filter strip */
.mpd-filters {
  display:flex; align-items:center; gap:6px; padding:0 14px 12px;
  overflow-x:auto; flex-shrink:0;
  scrollbar-width:none; -webkit-overflow-scrolling:touch;
}
.mpd-filters::-webkit-scrollbar { display:none; }

.map-filter-chip {
  font-size:12px; font-weight:600; padding:6px 14px;
  border-radius:20px; border:1.5px solid #e0e0e0;
  background:#fff; color:#555; cursor:pointer; white-space:nowrap;
  font-family:var(--font-ui); transition:all 0.18s; flex-shrink:0;
}
.map-filter-chip.active {
  background:var(--forest-mid); color:#fff;
  border-color:var(--forest-mid); font-weight:700;
}
.map-filter-chip:active { opacity:0.75; }

.mpd-count {
  margin-left:auto; font-size:12px; font-weight:700;
  color:var(--ink-soft); white-space:nowrap; flex-shrink:0;
  font-family:var(--font-ui);
}

/* Walk cards list */
.mpd-list {
  flex:1; overflow-y:auto; padding:4px 12px 80px;
  -webkit-overflow-scrolling:touch; overscroll-behavior:contain;
}
.mpd-list::-webkit-scrollbar { width:3px; }
.mpd-list::-webkit-scrollbar-thumb { background:#ddd; border-radius:2px; }

/* Individual walk card — AllTrails style */
.map-walk-card {
  display:flex; align-items:stretch;
  background:#fff; border:1px solid #efefef;
  border-radius:14px; margin-bottom:10px;
  cursor:pointer; overflow:hidden;
  box-shadow:0 1px 6px rgba(0,0,0,0.07);
  transition:box-shadow 0.15s, transform 0.12s;
  user-select:none;
}
.map-walk-card:active { box-shadow:0 2px 14px rgba(0,0,0,0.14); transform:scale(0.99); }

.mwc-accent { width:5px; flex-shrink:0; }
.mwc-body   { flex:1; padding:12px 10px 12px 14px; min-width:0; }
.mwc-name   { font-size:13px; font-weight:700; color:var(--ink); margin-bottom:5px; line-height:1.3; font-family:var(--font-ui); }
.mwc-done   { color:var(--sage); font-size:12px; margin-left:4px; }
.mwc-stats  { display:flex; gap:10px; margin-bottom:5px; flex-wrap:wrap; }
.mwc-stat   { font-size:11px; color:#666; font-family:var(--font-ui); font-weight:600; }
.mwc-sub    { font-size:11px; color:#999; font-style:italic; line-height:1.4; font-family:var(--font-ui); }
.mwc-arrow  { display:flex; align-items:center; padding:0 14px; color:#ccc; font-size:20px; flex-shrink:0; }

.map-no-results { text-align:center; color:#aaa; font-size:13px; padding:32px 16px; font-family:var(--font-ui); }

/* Trail chip label (Leaflet divIcon) */
.trail-chip {
  background:rgba(10,22,40,0.85); color:#fff;
  border-left:3px solid; border-radius:4px;
  padding:2px 7px; font-size:10px; font-weight:700;
  white-space:nowrap; pointer-events:none;
  box-shadow:0 1px 4px rgba(0,0,0,0.5);
  font-family:var(--font-ui);
}

/* GPS dot */
.gps-dot { position:relative; width:18px; height:18px; }
.gps-dot::after { content:''; position:absolute; inset:3px; background:#2979FF; border-radius:50%; border:2px solid #fff; box-shadow:0 0 0 3px rgba(41,121,255,0.25); }
.gps-ring { position:absolute; inset:-6px; border-radius:50%; background:rgba(41,121,255,0.18); animation:gpsRing 2s ease-out infinite; }
@keyframes gpsRing { 0% { transform:scale(0.5); opacity:1; } 100% { transform:scale(1.8); opacity:0; } }

/* Leaflet zoom control tweak */
.leaflet-control-zoom { margin-top:72px !important; } /* clear search bar */

/* ── Tablet: drawer becomes fixed left panel ── */
@media (min-width:641px) {
  .map-search-bar { left:300px; }
  .map-fabs { right:10px; top:130px; }
  #saintStampMap { left:280px !important; right:0 !important; width:auto !important; }
  .map-peek-drawer {
    position:absolute; top:0; left:0; bottom:0; right:auto;
    width:280px; border-radius:0; max-height:none;
    transform:none !important; box-shadow:2px 0 16px rgba(0,0,0,0.12);
    border-right:1px solid #e8e8e8;
  }
  .mpd-handle { display:none; }
  .map-fabs { right:12px; }
}

/* ── Break out of 480px app shell on larger screens ── */
@media (min-width:481px) {
  #screen-map { position:fixed !important; inset:0 !important; max-width:none !important; }
}

/* ─── HOW TO GET A PASS (voucher stockists) ─────────── */
.htb-card { scroll-margin-top: 12px; }
.htb-steps { display: flex; flex-direction: column; gap: 12px; margin-bottom: 18px; }
.htb-step { display: flex; align-items: flex-start; gap: 12px; }
.htb-num {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--forest-mid); color: var(--gold-bright);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 14px; font-weight: 700; font-style: italic;
}
.htb-text { font-size: 13px; line-height: 1.5; color: var(--ink-mid); padding-top: 3px; }
.htb-text strong { color: var(--ink); }
.htb-label {
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 8px;
}
.htb-stockists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.htb-stockist {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px;
  background: var(--cream); border: 1px solid var(--cream-dark); border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; color: var(--forest-mid); line-height: 1.25;
}
.htb-stockist svg { flex-shrink: 0; color: var(--gold); }
.htb-pulse { animation: htbPulse 1.4s ease-out 1; }
@keyframes htbPulse {
  0%   { box-shadow: 0 0 0 0 rgba(196,134,42,0.55); border-color: var(--gold); }
  100% { box-shadow: 0 0 0 14px rgba(196,134,42,0); }
}
.htb-help {
  display: flex; align-items: center; gap: 12px; margin-top: 4px; padding: 14px 16px;
  background: var(--forest-mid); color: var(--white); border-radius: var(--radius-sm);
  text-decoration: none; min-height: 44px;
}
.htb-help svg { flex-shrink: 0; color: var(--gold-bright); }
.htb-help-text { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; line-height: 1.35; }
.htb-help-text span { color: var(--gold-bright); font-weight: 700; word-break: break-all; }

/* ─── LEADERBOARD: empty state + "You" ──────────────── */
.lb-empty { text-align: center; padding: 48px 24px; }
.lb-empty-icon { font-size: 40px; margin-bottom: 12px; }
.lb-empty-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--forest-mid); margin-bottom: 6px; }
.lb-empty-body { font-size: 13px; color: var(--ink-soft); line-height: 1.55; max-width: 280px; margin: 0 auto; }
.lb-you {
  display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 50px; vertical-align: 1px;
  background: var(--forest-mid); color: var(--gold-bright);
  font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
}
.mi-sub { display: block; font-size: 11px; font-weight: 600; color: var(--ink-soft); margin-top: 1px; }

/* ─── LEADERBOARD NAME SHEET ────────────────────────── */
.name-sheet {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(13,31,22,0); pointer-events: none; visibility: hidden;
  display: flex; align-items: flex-end; justify-content: center;
  transition: background 0.3s ease, visibility 0s linear 0.3s;
}
.name-sheet.show {
  background: rgba(13,31,22,0.55); pointer-events: auto; visibility: visible;
  transition: background 0.3s ease, visibility 0s;
}
.name-sheet-card {
  width: 100%; max-width: 480px; background: var(--white);
  border-radius: 20px 20px 0 0; padding: 12px 24px calc(20px + var(--safe-bottom));
  transform: translateY(100%); transition: transform 0.35s cubic-bezier(.2,.8,.2,1);
}
.name-sheet.show .name-sheet-card { transform: translateY(0); }
.name-sheet-grip { width: 40px; height: 4px; border-radius: 4px; background: var(--cream-dark); margin: 0 auto 18px; }
.name-sheet-title { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--forest-mid); margin-bottom: 4px; }
.name-sheet-sub { font-size: 13px; color: var(--ink-soft); line-height: 1.5; margin-bottom: 16px; }
.name-sheet .auth-input { margin-bottom: 12px; }
.name-sheet-toggle {
  display: flex; align-items: center; gap: 10px; min-height: 44px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-mid); cursor: pointer;
}
.name-sheet-toggle input { width: 20px; height: 20px; accent-color: var(--forest-mid); }
.name-sheet-msg { font-size: 12.5px; min-height: 18px; margin: 4px 0 10px; text-align: center; }
.name-sheet-msg.err { color: #C0392B; font-weight: 600; }
.name-sheet-msg.ok  { color: var(--forest-light); font-weight: 600; }
.name-sheet-later {
  display: block; width: 100%; margin-top: 8px; min-height: 44px;
  background: none; border: none; font-family: var(--font-ui); font-size: 13px; font-weight: 700;
  color: var(--ink-soft); cursor: pointer;
}
