/* ============================================
   GreenSpot — Botanical Dark Theme
   ============================================ */

:root {
  /* Greens */
  --green-50: #ecfdf5;
  --green-100: #d1fae5;
  --green-400: #34d399;
  --green-500: #22c55e;
  --green-600: #16a34a;
  --green-700: #15803d;
  --green-glow: rgba(34, 197, 94, 0.12);
  --green-glow-strong: rgba(34, 197, 94, 0.25);

  /* Surfaces */
  --bg-root: #080c10;
  --bg-body: #0d1117;
  --bg-surface: #161b22;
  --bg-surface-hover: #1c2129;
  --bg-elevated: #21262d;
  --bg-input: #0d1117;

  /* Text */
  --text-primary: #e6edf3;
  --text-secondary: #7d8590;
  --text-tertiary: #484f58;
  --text-link: #58a6ff;

  /* Accents */
  --star-color: #fbbf24;
  --danger: #f85149;
  --warning: #d29922;

  /* Borders */
  --border: #30363d;
  --border-subtle: #21262d;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--green-glow), 0 0 60px rgba(34, 197, 94, 0.06);

  /* Typography */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'Outfit', system-ui, sans-serif;

  /* Transparent backgrounds */
  --bg-nav: rgba(13, 17, 23, 0.85);
  --bg-panel: rgba(13, 17, 23, 0.95);
  --bg-attribution: rgba(13, 17, 23, 0.7);

  /* Layout — mobile default (bottom bar) */
  --nav-height: 56px;
}

/* ---- Light Theme ---- */
[data-theme="light"] {
  --green-glow: rgba(34, 197, 94, 0.08);
  --green-glow-strong: rgba(34, 197, 94, 0.18);

  --bg-root: #f4f6f4;
  --bg-body: #ffffff;
  --bg-surface: #f0f3f0;
  --bg-surface-hover: #e6eae6;
  --bg-elevated: #e0e5e0;
  --bg-input: #ffffff;

  --text-primary: #1a2e1a;
  --text-secondary: #4a5e4a;
  --text-tertiary: #7a8e7a;
  --text-link: #2563eb;

  --border: #c8d4c8;
  --border-subtle: #dce4dc;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
  --shadow-glow: 0 0 20px rgba(34, 197, 94, 0.12), 0 0 60px rgba(34, 197, 94, 0.06);

  --bg-nav: rgba(255, 255, 255, 0.88);
  --bg-panel: rgba(255, 255, 255, 0.95);
  --bg-attribution: rgba(255, 255, 255, 0.75);
}

/* ---- Lucide inline icons ---- */
.gs-icon-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.gs-icon-label svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  flex-shrink: 0;
}

/* Nav icons */
.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.brand-icon svg {
  width: 22px;
  height: 22px;
  color: var(--green-400);
}

/* Badge icons */
.badge svg {
  width: 13px;
  height: 13px;
  stroke-width: 2;
}

/* Tag/filter button icons */
.tag-filter-btn svg,
.tag svg,
.lb-spot-tag svg {
  width: 13px;
  height: 13px;
  stroke-width: 2;
}

/* Report button icon */
.btn-report svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

/* Sort arrow icons */
.sort-arrow svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

/* Leaderboard rank icons */
.rank-cell svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.rank-1 svg { color: #fbbf24; }
.rank-2 svg { color: #94a3b8; }
.rank-3 svg { color: #d97706; }

/* Expand arrow */
.lb-expand-arrow svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

/* Role cell icons */
.role-cell svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

/* Achievement badge icons in leaderboard */
.lb-ach-count svg {
  width: 13px;
  height: 13px;
  stroke-width: 2;
}

/* Weather widget icons */
.weather-detail-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  color: var(--green-400);
}

.weather-expand-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}



/* Wind info icon */
.wind-info-icon svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

/* Legal section heading icons */
.legal-section h2 svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
  color: var(--green-400);
  vertical-align: -3px;
}

/* Legal link icons */
.legal-link-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

/* Leaderboard header icons */
.leaderboard-table th svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
  vertical-align: -2px;
}

/* Profile report button */
.profile-report-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2;
}

/* Checkbox label icons in spot form */
.checkbox-label svg {
  width: 15px;
  height: 15px;
  stroke-width: 2;
  vertical-align: -2px;
  color: var(--green-400);
}

/* ============================================
   BASE STYLES — Mobile-first (320-480px)
   ============================================ */

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-size: 0.875rem;
}

/* Subtle grain texture overlay */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ---- Typography (mobile) ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 { font-size: 1.375rem; }
h2 { font-size: 1.125rem; }
h3 { font-size: 1.125rem; }

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

/* ---- Navigation — Mobile: bottom tab bar ---- */
#main-nav {
  position: fixed;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-nav);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid var(--border-subtle);
  border-bottom: none;
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  gap: 0;
}

.nav-brand {
  display: none;
}

.brand-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px var(--green-glow-strong));
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.brand-accent {
  color: var(--green-500);
}

.nav-links {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: space-around;
  gap: 0;
}

.nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-radius: var(--radius-md);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 44px;
  justify-content: center;
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.nav-link.active {
  color: var(--green-400);
  background: var(--green-glow);
}

.nav-link span:not(.nav-icon) {
  display: none;
}

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

#auth-nav {
  display: none;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.user-info-link {
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  transition: all 0.15s ease;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  text-decoration: none;
}

.user-info-link:hover {
  background: var(--green-glow);
  border-color: var(--green-700);
  color: var(--green-400);
}

/* ---- Buttons ---- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--green-600);
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 44px;
}

.btn-primary:hover {
  background: var(--green-500);
  box-shadow: var(--shadow-glow);
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 44px;
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--text-tertiary);
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  min-height: 44px;
}

.btn-text:hover {
  color: var(--text-primary);
  background: var(--bg-surface);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
}

.btn-danger {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}

.btn-danger:hover {
  background: rgba(248, 81, 73, 0.1);
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-newbie { background: rgba(34, 197, 94, 0.1); color: var(--green-400); }
.badge-regular { background: rgba(34, 197, 94, 0.2); color: var(--green-400); }
.badge-pro { background: rgba(251, 191, 36, 0.15); color: var(--star-color); }
.badge-admin { background: rgba(248, 81, 73, 0.15); color: var(--danger); }

/* ---- Pages ---- */
.page { display: none; }
.page.active { display: block; }

main {
  padding-top: 0;
  padding-bottom: calc(56px + env(safe-area-inset-bottom));
  min-height: 100vh;
}

.content-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.content-container--narrow {
  max-width: 720px;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h1 {
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--green-400) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

/* ---- Map (mobile) ---- */
#map-container {
  position: relative;
  height: calc(100vh - 56px);
}

#map {
  height: 100%;
  width: 100%;
  background: var(--bg-root);
}

/* Custom Leaflet overrides */
.leaflet-control-zoom {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-md) !important;
  overflow: hidden;
  box-shadow: var(--shadow-md) !important;
}

.leaflet-control-zoom a {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border-bottom: 1px solid var(--border) !important;
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  font-size: 16px !important;
}

.leaflet-control-zoom a:hover {
  background: var(--bg-elevated) !important;
}

.leaflet-control-attribution {
  background: var(--bg-attribution) !important;
  color: var(--text-tertiary) !important;
  font-size: 10px !important;
  backdrop-filter: blur(8px);
}

.leaflet-control-attribution a {
  color: var(--text-secondary) !important;
}

/* Green spot markers */
.greenspot-marker {
  background: none !important;
  border: none !important;
}

.marker-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green-500);
  border: 2px solid var(--green-400);
  box-shadow: 0 0 12px var(--green-glow-strong), 0 0 4px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.marker-dot:hover {
  transform: scale(1.4);
}

.marker-dot[data-stars="1"] {
  background: #6b7280;
  border-color: #9ca3af;
  box-shadow: 0 0 6px rgba(107, 114, 128, 0.3), 0 0 4px rgba(0, 0, 0, 0.5);
}
.marker-dot[data-stars="1"]:hover {
  box-shadow: 0 0 14px rgba(107, 114, 128, 0.4), 0 0 30px rgba(107, 114, 128, 0.15);
}

.marker-dot[data-stars="2"] {
  background: #4ade80;
  border-color: #86efac;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.25), 0 0 4px rgba(0, 0, 0, 0.5);
}
.marker-dot[data-stars="2"]:hover {
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.4), 0 0 30px rgba(74, 222, 128, 0.15);
}

.marker-dot[data-stars="3"] {
  background: var(--green-500);
  border-color: var(--green-400);
  box-shadow: 0 0 10px var(--green-glow-strong), 0 0 4px rgba(0, 0, 0, 0.5);
}
.marker-dot[data-stars="3"]:hover {
  box-shadow: 0 0 18px var(--green-glow-strong), 0 0 35px rgba(34, 197, 94, 0.15);
}

.marker-dot[data-stars="4"] {
  background: #22d3ee;
  border-color: #67e8f9;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.35), 0 0 4px rgba(0, 0, 0, 0.5);
}
.marker-dot[data-stars="4"]:hover {
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.5), 0 0 40px rgba(34, 211, 238, 0.15);
}

.marker-dot[data-stars="5"] {
  background: var(--star-color);
  border-color: #fcd34d;
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.4), 0 0 4px rgba(0, 0, 0, 0.5);
}
.marker-dot[data-stars="5"]:hover {
  box-shadow: 0 0 22px rgba(251, 191, 36, 0.55), 0 0 44px rgba(251, 191, 36, 0.2);
}

/* Leaflet popup styling */
.leaflet-popup-content-wrapper {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  font-family: var(--font-body) !important;
  font-size: 0.875rem !important;
  line-height: 1.5 !important;
}

.leaflet-popup-tip {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: none !important;
}

.leaflet-popup-close-button {
  color: var(--text-secondary) !important;
  font-size: 18px !important;
  top: 8px !important;
  right: 10px !important;
}

.spot-popup {
  padding: 16px 18px;
  min-width: 220px;
  max-width: 300px;
}

.spot-popup h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  padding-right: 20px;
}

.spot-popup .stars {
  color: var(--star-color);
  font-size: 0.875rem;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.spot-popup .stars .star-empty {
  color: var(--text-tertiary);
}

.spot-popup p {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
  margin-bottom: 10px;
}

.spot-popup .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

.spot-popup .popup-meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.popup-actions {
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.btn-report {
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s ease;
}

.btn-report:hover {
  color: var(--danger);
}

/* FAB (mobile) */
.fab {
  position: absolute;
  bottom: 72px;
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--green-600);
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.35), var(--shadow-md);
  transition: all 0.25s ease;
}

.fab:hover {
  background: var(--green-500);
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(34, 197, 94, 0.45), var(--shadow-lg);
}

.fab:active {
  transform: scale(0.95);
}

/* Wind/Weather toggles removed — now in chip bar */

/* Map filter toggle (mobile) */

.wind-info {
  position: absolute;
  top: 12px;
  right: 64px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 800;
  font-size: 0.8125rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
  animation: fadeIn 0.3s ease;
}

.wind-info-icon {
  font-size: 1.125rem;
}

.wind-info-text strong {
  color: var(--green-400);
}

.wind-gust {
  display: inline-block;
  margin-left: 6px;
  color: var(--warning);
  font-size: 0.75rem;
}

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

/* Weather widget (mobile) */
.weather-widget {
  position: absolute;
  top: auto;
  bottom: 72px;
  left: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  z-index: 800;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  user-select: none;
  transition: box-shadow 0.15s ease;
  font-size: 0.6875rem;
}

.weather-widget:hover {
  box-shadow: var(--shadow-md);
}

.weather-dragging {
  cursor: grabbing;
  box-shadow: var(--shadow-md), 0 0 0 2px var(--green-600);
  opacity: 0.92;
}

.weather-loading,
.weather-error {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  text-align: center;
  padding: 4px 0;
}

.weather-main {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--border-subtle);
}

.weather-icon {
  font-size: 1.375rem;
  line-height: 1;
}

.weather-temp-block {
  display: flex;
  flex-direction: column;
}

.weather-temp {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.weather-desc {
  font-size: 0.625rem;
  color: var(--text-secondary);
}

.weather-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 10px;
}

.weather-detail {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.625rem;
}

.weather-detail-icon {
  font-size: 0.6875rem;
  width: 14px;
  text-align: center;
}

.weather-detail-val {
  font-weight: 600;
  color: var(--text-primary);
}

.weather-detail-label {
  color: var(--text-tertiary);
  font-size: 0.5625rem;
}

.uv-low { color: var(--green-400); }
.uv-moderate { color: var(--star-color); }
.uv-high { color: #fb923c; }
.uv-very-high { color: var(--danger); }
.uv-extreme { color: #c084fc; }

.weather-expand-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 4px 0 0;
  margin-top: 5px;
  border: none;
  border-top: 1px solid var(--border-subtle);
  background: none;
  color: var(--text-tertiary);
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease;
}

.weather-expand-btn:hover {
  color: var(--text-primary);
}

.weather-expand-arrow {
  font-size: 0.5625rem;
}

.weather-chart-wrap {
  margin-top: 6px;
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
}

.weather-chart-date {
  font-size: 0.5625rem;
  color: var(--text-tertiary);
  margin-bottom: 4px;
  text-transform: capitalize;
}

#weather-chart {
  display: block;
  width: 100%;
}

.weather-chart-legend {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  font-size: 0.5625rem;
  color: var(--text-tertiary);
}

.weather-chart-legend-item {
  display: flex;
  align-items: center;
  gap: 3px;
}

.weather-legend-bar {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: rgba(52, 211, 153, 0.8);
}

.weather-legend-line {
  display: inline-block;
  width: 10px;
  height: 1.5px;
  background: rgba(88, 166, 255, 0.8);
  border-radius: 1px;
}

/* Map hint bar (mobile) */
.map-hint {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-surface);
  border: 1px solid var(--green-600);
  border-radius: var(--radius-xl);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--green-400);
  z-index: 800;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  animation: slideUp 0.3s ease;
  white-space: nowrap;
}

.map-hint.hidden { display: none; }

.hint-cancel {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.hint-cancel:hover { color: var(--text-primary); }

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ---- Tags ---- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}

.tag-active {
  background: var(--green-glow);
  border-color: var(--green-700);
  color: var(--green-400);
}

/* ---- Search (mobile: stacked) ---- */
.search-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.search-bar input {
  flex: 1;
}

.search-filters {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 28px;
}

.search-filters.hidden {
  display: none;
}

#btn-search-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

#btn-search-filter:hover {
  border-color: var(--green-600);
  color: var(--green-500);
}

#btn-search-filter svg {
  width: 18px;
  height: 18px;
}

.filter-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 8px;
}

.filter-hint {
  display: block;
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  margin-top: 6px;
  font-style: italic;
}

.filter-group {
  margin-bottom: 16px;
}

.filter-group:last-child {
  margin-bottom: 0;
}

/* Mobile: single column */
.filter-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.tag-filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 44px;
}

.tag-filter-btn:hover {
  border-color: var(--text-tertiary);
  color: var(--text-primary);
}

.tag-filter-btn.active {
  background: var(--green-glow);
  border-color: var(--green-700);
  color: var(--green-400);
}

.checkbox-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
  min-height: 44px;
}

.checkbox-inline input[type="checkbox"] {
  accent-color: var(--green-500);
  width: 16px;
  height: 16px;
}

/* ---- Inputs (mobile: min-height for touch) ---- */
.text-input,
.search-bar input,
.select-input,
textarea.text-input {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  min-height: 44px;
}

.text-input:focus,
.search-bar input:focus,
.select-input:focus,
textarea.text-input:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.select-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%237d8590' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

textarea.text-input {
  min-height: 100px;
  resize: vertical;
}

/* ---- Search Results ---- */
.spot-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: default;
}

.spot-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.spot-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.spot-card h3 {
  font-size: 1.0625rem;
  flex: 1;
}

.spot-card .stars {
  color: var(--star-color);
  font-size: 0.875rem;
  letter-spacing: 1px;
  flex-shrink: 0;
  margin-left: 12px;
}

.spot-card .stars .star-empty {
  color: var(--text-tertiary);
}

.spot-card p {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.spot-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

.spot-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spot-card-meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  display: flex;
  gap: 12px;
}

.spot-card-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-show-on-map {
  background: none;
  border: none;
  color: var(--green-400);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.15s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.btn-show-on-map:hover {
  color: var(--green-500);
  text-decoration: underline;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-tertiary);
  font-size: 0.9375rem;
}

.results-count {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-bottom: 16px;
}

/* ---- Profile settings ---- */
.settings-section {
  padding: 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.settings-section h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-section h3 i {
  width: 18px;
  height: 18px;
}

.settings-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.4;
}

.settings-toggles {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.9rem;
  cursor: pointer;
}

.settings-toggle span:first-child {
  flex: 1;
  color: var(--text-secondary);
}

.settings-toggle input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--green-500);
  cursor: pointer;
}

.select-sm {
  padding: 4px 8px;
  font-size: 0.85rem;
  min-width: 120px;
}

.range-with-value {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
}

.range-with-value input[type="range"] {
  flex: 1;
  accent-color: var(--green-500);
}

.range-with-value span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-width: 45px;
  text-align: right;
}

.settings-cat-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-cat-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  cursor: pointer;
}

.settings-cat-toggle input[type="checkbox"] {
  accent-color: var(--green-500);
}

.settings-danger {
  border-color: var(--red-500, #ef4444);
}

.settings-danger h3 {
  color: var(--red-400);
}

/* ---- Email verify banner ---- */
.verify-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(210, 153, 34, 0.12);
  border-bottom: 1px solid rgba(210, 153, 34, 0.25);
  color: #d29922;
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  justify-content: center;
}

.verify-banner svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---- Follow button ---- */
.btn-follow {
  display: inline-block;
  padding: 2px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  border: 1px solid var(--green-600);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--green-500);
  cursor: pointer;
  margin-left: 8px;
  vertical-align: middle;
  transition: all 0.2s ease;
}

.btn-follow:hover {
  background: var(--green-glow-strong);
}

/* ---- Activity Feed ---- */
.feed-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.feed-view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 3px;
}

.view-btn {
  background: none;
  border: none;
  color: var(--text-tertiary);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.view-btn svg { width: 16px; height: 16px; }

.view-btn.active {
  background: var(--green-glow);
  color: var(--green-500);
}

.feed-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.feed-card:hover {
  border-color: var(--green-600);
}

.feed-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.8125rem;
}

.feed-author {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-weight: 500;
}

.feed-time {
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

.feed-card-body {
  display: flex;
  gap: 14px;
}

.feed-card-text {
  flex: 1;
  min-width: 0;
}

.feed-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.feed-card-stars {
  margin-bottom: 6px;
  font-size: 0.875rem;
}

.feed-card-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.feed-card-media {
  flex-shrink: 0;
}

.feed-card-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-md);
  object-fit: cover;
}

.feed-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  color: var(--text-tertiary);
}

.feed-card-placeholder svg { width: 24px; height: 24px; }

/* Grid / Tile view */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.feed-grid .feed-card {
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feed-grid .feed-card-meta {
  padding: 10px 12px 0;
  margin-bottom: 6px;
}

.feed-grid .feed-card-body {
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.feed-grid .feed-card-media {
  order: -1;
  width: 100%;
}

.feed-grid .feed-card-thumb {
  width: 100%;
  height: 120px;
  border-radius: 0;
}

.feed-grid .feed-card-text {
  padding: 8px 12px 12px;
}

.feed-grid .feed-card-title {
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feed-grid .feed-card-desc {
  display: none;
}

.feed-grid .feed-card-stars {
  font-size: 0.75rem;
  margin-bottom: 4px;
}

.feed-grid .tags { display: none; }

@media (min-width: 481px) {
  .feed-grid { grid-template-columns: repeat(3, 1fr); }
  .feed-grid .feed-card-thumb { height: 140px; }
}

@media (min-width: 769px) {
  .feed-grid { grid-template-columns: repeat(4, 1fr); }
  .feed-grid .feed-card-thumb { height: 160px; }
}

/* ---- Leaderboard (mobile: hide avgStars & role) ---- */
.leaderboard-table {
  width: 100%;
  border-spacing: 0;
}

.leaderboard-table thead th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  text-align: left;
  padding: 10px 10px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-primary);
  z-index: 10;
  white-space: nowrap;
}

.leaderboard-table .col-avgstars,
.leaderboard-table .col-role {
  display: none;
}

.th-sortable {
  cursor: pointer;
  user-select: none;
  transition: color 0.15s ease;
}

.th-sortable:hover {
  color: var(--green-400);
}

.sort-arrow {
  margin-left: 4px;
  font-size: 0.7rem;
  color: var(--green-400);
}

.sort-arrow.sort-inactive {
  color: var(--text-tertiary);
  opacity: 0.4;
}

.leaderboard-table tbody tr {
  transition: background 0.15s ease;
}

.leaderboard-table tbody tr:hover {
  background: var(--bg-surface);
}

.leaderboard-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9375rem;
}

.leaderboard-table td.col-avgstars,
.leaderboard-table td.col-role {
  display: none;
}

.rank-cell {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  width: 50px;
}

.rank-1 { color: var(--star-color); }
.rank-2 { color: #c0c0c0; }
.rank-3 { color: #cd7f32; }

.username-cell {
  font-weight: 600;
}

.spotcount-cell {
  color: var(--green-400);
  font-weight: 600;
}

.avgstars-cell {
  color: var(--star-color);
}

.role-cell {
  font-size: 1rem;
}

.expand-cell {
  width: 32px;
  text-align: center;
}

.lb-clickable {
  cursor: pointer;
}

.lb-clickable:hover {
  background: var(--bg-surface-hover) !important;
}

.lb-expanded {
  background: var(--bg-surface) !important;
  border-bottom-color: transparent !important;
}

.lb-expand-arrow {
  color: var(--text-tertiary);
  font-size: 0.75rem;
  transition: color 0.15s ease;
}

.lb-clickable:hover .lb-expand-arrow {
  color: var(--green-400);
}

.lb-spots-row td {
  padding: 0 16px 16px !important;
  border-bottom: 1px solid var(--border) !important;
}

.lb-spots-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  background: var(--bg-root);
  border-radius: var(--radius-md);
}

.lb-spot-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.lb-spot-title {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--text-primary);
  min-width: 150px;
}

.lb-spot-stars {
  font-size: 0.8125rem;
  color: var(--star-color);
  white-space: nowrap;
}

.lb-spot-stars .stars-empty {
  color: var(--border);
}

.lb-spot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: auto;
}

.lb-spot-tag {
  font-size: 0.6875rem;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 99px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.lb-tag-clickable {
  cursor: pointer;
  transition: all 0.15s ease;
}

.lb-tag-clickable:hover {
  background: var(--green-glow);
  border-color: var(--green-700);
  color: var(--green-400);
}

/* ---- Profile ---- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-700), var(--green-500));
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 20px var(--green-glow);
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-email {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.profile-report-btn {
  margin-left: auto;
  align-self: flex-start;
  flex-shrink: 0;
}

/* Profile stats (mobile: 3 columns but smaller padding) */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 32px;
}

.profile-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.profile-stat-val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-400);
}

.profile-stat-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.profile-section {
  margin-bottom: 32px;
}

.profile-section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.profile-section-header h2 {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-section-sub {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Profile tabs */
.profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.profile-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.profile-tab svg {
  width: 16px;
  height: 16px;
  stroke-width: 2;
}

.profile-tab:hover {
  color: var(--text-primary);
}

.profile-tab.active {
  color: var(--green-400);
  border-bottom-color: var(--green-500);
}

.profile-tab-count {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  font-weight: 400;
}

.profile-tab.active .profile-tab-count {
  color: var(--green-400);
}

.profile-tab-content.hidden {
  display: none;
}

.profile-ach-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.profile-ach-pct {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.profile-ach-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.profile-ach {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.profile-ach.ach-unlocked {
  background: var(--bg-surface);
  border-color: var(--green-700);
}

.profile-ach.ach-locked {
  background: var(--bg-root);
  opacity: 0.45;
}

.profile-ach-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-ach-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.5;
}

.ach-unlocked .profile-ach-icon svg {
  color: var(--green-400);
}

.ach-locked .profile-ach-icon svg {
  color: var(--text-tertiary);
}

.profile-ach-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.profile-ach-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-ach-desc {
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.profile-ach-date {
  font-size: 0.625rem;
  color: var(--green-400);
}

.profile-ach.ach-locked .profile-ach-title {
  color: var(--text-tertiary);
}

.profile-ach.ach-locked .profile-ach-desc {
  color: var(--text-tertiary);
}

.profile-spots-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-spot-card {
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease;
}

.profile-spot-card:hover {
  border-color: var(--border);
}

.profile-spot-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.profile-spot-main h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.profile-spot-stars {
  color: var(--star-color);
  font-size: 0.875rem;
  white-space: nowrap;
}

.profile-spot-stars .stars-empty {
  color: var(--border);
}

.profile-spot-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.5;
}

.profile-spot-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.profile-spot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.profile-spot-season {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.profile-spot-actions {
  display: flex;
  justify-content: flex-end;
}

/* ---- Achievements (mobile: single column) ---- */
.ach-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
}

.ach-progress-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
}

.ach-progress-count {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--green-400);
}

.ach-progress-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ach-progress-bar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ach-progress-bar {
  flex: 1;
  height: 10px;
  background: var(--bg-elevated);
  border-radius: 99px;
  overflow: hidden;
}

.ach-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green-700), var(--green-400));
  border-radius: 99px;
  transition: width 0.5s ease;
}

.ach-progress-pct {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 40px;
}

.ach-category {
  margin-bottom: 28px;
}

.ach-category-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.ach-grid {
  display: grid;
  grid-template-columns: minmax(100%, 1fr);
  gap: 10px;
}

.ach-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s ease;
}

.ach-unlocked {
  background: var(--bg-surface);
  border-color: var(--green-700);
  box-shadow: inset 0 0 20px var(--green-glow);
}

.ach-locked {
  background: var(--bg-root);
  opacity: 0.5;
}

.ach-icon {
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ach-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.5;
}

.ach-unlocked .ach-icon svg {
  color: var(--green-400);
}

.ach-locked .ach-icon svg {
  color: var(--text-tertiary);
}

.ach-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.ach-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.ach-locked .ach-title {
  color: var(--text-secondary);
}

.ach-desc {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.ach-date {
  font-size: 0.6875rem;
  color: var(--green-400);
  opacity: 0.8;
  margin-top: 2px;
}

.ach-check {
  color: var(--green-400);
  display: flex;
  align-items: center;
}

.ach-check svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

.ach-lock {
  display: flex;
  align-items: center;
  color: var(--text-tertiary);
}

.ach-lock svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.5;
}

.ach-badges {
  display: inline-flex;
  gap: 2px;
  margin-left: 6px;
}

.ach-badge {
  font-size: 0.75rem;
  cursor: default;
}

.ach-blurred-wrap {
  position: relative;
}

.ach-blurred {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
  opacity: 0.6;
}

.ach-login-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.ach-login-box {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 380px;
}

.ach-login-box h2 {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.ach-login-box p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.ach-login-buttons {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.ach-login-buttons .btn-primary,
.ach-login-buttons .btn-secondary {
  flex: 1;
}

.lb-ach-count {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  margin-left: 8px;
  vertical-align: middle;
}

/* ---- Legal ---- */
.legal-section {
  margin-bottom: 36px;
}

.legal-section h2 {
  font-size: 1.375rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.legal-section h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: var(--green-400);
}

.legal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
}

.legal-card--allowed {
  border-left: 3px solid var(--green-500);
}

.legal-card--forbidden {
  border-left: 3px solid var(--danger);
}

.legal-card--warning {
  border-left: 3px solid var(--warning);
}

.legal-card ul {
  list-style: none;
  padding: 0;
}

.legal-card li {
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.legal-card li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legal-card--allowed li::before { background: var(--green-500); }
.legal-card--forbidden li::before { background: var(--danger); }
.legal-card--warning li::before { background: var(--warning); }

/* Mobile: single column */
.legal-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 24px;
}

.legal-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  min-height: 44px;
}

.legal-link:hover {
  border-color: var(--green-700);
  background: var(--bg-surface-hover);
}

.legal-link-icon {
  font-size: 1.25rem;
}

.legal-disclaimer {
  margin-top: 32px;
  padding: 16px 20px;
  background: rgba(210, 153, 34, 0.08);
  border: 1px solid rgba(210, 153, 34, 0.2);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- Modal (mobile: bottom-sheet style) ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.modal-overlay.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 20px;
  max-width: 100%;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalInMobile 0.25s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

.modal h2 {
  margin-bottom: 24px;
  font-size: 1.25rem;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group .text-input,
.form-group .select-input {
  width: 100%;
}

.coords-display {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  font-family: monospace;
  background: var(--bg-root);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* Mobile: single column */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 44px;
}

.checkbox-label:hover {
  border-color: var(--text-tertiary);
  color: var(--text-primary);
}

.checkbox-label input:checked + span,
.checkbox-label:has(input:checked) {
  color: var(--green-400);
  border-color: var(--green-700);
  background: var(--green-glow);
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--green-500);
  width: 14px;
  height: 14px;
}

/* Star input */
.star-input {
  display: flex;
  gap: 4px;
}

.star-option {
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-tertiary);
  transition: color 0.1s ease, transform 0.1s ease;
  user-select: none;
}

.star-option:hover {
  transform: scale(1.15);
}

.star-option.active {
  color: var(--star-color);
}

.form-error {
  color: var(--danger);
  font-size: 0.8125rem;
  margin-top: 6px;
}

.form-success {
  color: var(--green-400);
  font-size: 0.8125rem;
  margin-top: 6px;
}

/* ---- Loading / Empty States ---- */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-tertiary);
  gap: 10px;
  font-size: 0.875rem;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--green-500);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Toast Messages (mobile) ---- */
.toast {
  position: fixed;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px 24px;
  font-size: 0.875rem;
  color: var(--text-primary);
  z-index: 3000;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}

.toast--success { border-color: var(--green-700); }
.toast--error { border-color: var(--danger); }

.toast--achievement {
  border-color: var(--green-500);
  background: linear-gradient(135deg, var(--bg-elevated), rgba(34, 197, 94, 0.1));
  padding: 14px 20px;
  animation: toastIn 0.4s ease, toastOut 0.4s ease 3.8s forwards;
}

.achievement-toast-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.achievement-toast-content svg {
  width: 28px;
  height: 28px;
  color: var(--green-400);
  flex-shrink: 0;
}

.achievement-toast-content div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.achievement-toast-content strong {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.achievement-toast-content span {
  font-size: 0.75rem;
  color: var(--green-400);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(16px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to { opacity: 0; transform: translateX(-50%) translateY(16px); }
}

/* ---- Theme Toggle ---- */
.theme-toggle {
  display: none; /* Only shown in nav on desktop via media query */
  position: static;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 900;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
  color: var(--green-400);
  border-color: var(--green-700);
  box-shadow: var(--shadow-md);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* Light theme: reduce grain overlay */
[data-theme="light"] .grain-overlay {
  opacity: 0.015;
}

/* Light theme: Leaflet marker cluster adjustments */
[data-theme="light"] .marker-dot {
  box-shadow: 0 0 12px var(--green-glow-strong), 0 0 4px rgba(0, 0, 0, 0.15);
}

/* ---- POI Layer: Headshops & Spätis ---- */
.poi-marker {
  background: none !important;
  border: none !important;
}

.poi-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.poi-dot:hover { transform: scale(1.4); }

.poi-dot--headshop {
  background: #a855f7;
  border-color: #c084fc;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4), 0 0 3px rgba(0,0,0,0.4);
}
.poi-dot--spaeti {
  background: #f97316;
  border-color: #fb923c;
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.4), 0 0 3px rgba(0,0,0,0.4);
}

.poi-dot--claimed {
  box-shadow: 0 0 0 3px var(--green-400), 0 0 8px rgba(34, 197, 94, 0.4);
}

/* Crosshair location marker */
.crosshair-marker {
  width: 24px;
  height: 24px;
  position: relative;
}
.crosshair-marker::before,
.crosshair-marker::after {
  content: '';
  position: absolute;
  background: var(--text-primary);
}
.crosshair-marker::before {
  width: 24px;
  height: 2px;
  top: 11px;
  left: 0;
}
.crosshair-marker::after {
  width: 2px;
  height: 24px;
  top: 0;
  left: 11px;
}

/* Zone center icon */
.zone-icon {
  font-size: 12px;
  line-height: 16px;
  text-align: center;
}

/* POI toggle button (generic, for exclusion zones + location) */
.poi-toggle-btn {
  position: absolute;
  bottom: 80px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 800;
  transition: all 0.2s;
  box-shadow: var(--shadow-md);
  font-size: 18px;
  cursor: pointer;
}
#btn-poi-zones { right: 224px; }
#btn-poi-location { right: 276px; }

#btn-poi-zones:hover { color: #ef4444; border-color: #ef4444; }
#btn-poi-zones.active { background: rgba(239,68,68,0.15); color: #ef4444; border-color: #ef4444; }
#btn-poi-location:hover { color: var(--green-400); border-color: var(--green-400); }
#btn-poi-location.active { background: rgba(34,197,94,0.15); color: var(--green-400); border-color: var(--green-400); }

@media (min-width: 769px) {
  #btn-poi-zones { bottom: 28px; right: 416px; }
  #btn-poi-location { bottom: 28px; right: 468px; }
}

.headshop-toggle, .spaeti-toggle {
  position: absolute;
  bottom: 80px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 800;
  transition: all 0.2s;
  box-shadow: var(--shadow-md);
}
.headshop-toggle { right: 120px; }
.spaeti-toggle { right: 172px; }

.headshop-toggle:hover { color: #a855f7; border-color: #a855f7; }
.headshop-toggle.active { background: rgba(168,85,247,0.15); color: #a855f7; border-color: #a855f7; }
.spaeti-toggle:hover { color: #f97316; border-color: #f97316; }
.spaeti-toggle.active { background: rgba(249,115,22,0.15); color: #f97316; border-color: #f97316; }
.headshop-toggle svg, .spaeti-toggle svg { width: 20px; height: 20px; }

@media (min-width: 769px) {
  .headshop-toggle { bottom: 28px; right: 312px; }
  .spaeti-toggle { bottom: 28px; right: 364px; }
}

/* POI Popup */
.poi-popup { font-size: 0.8125rem; line-height: 1.5; min-width: 200px; }
.poi-popup-status { font-weight: 600; margin-bottom: 4px; }
.poi-popup-status--open { color: #22c55e; }
.poi-popup-status--closed { color: #ef4444; }
.poi-popup-name { font-size: 0.9375rem; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.poi-popup-type { color: var(--text-tertiary); font-size: 0.75rem; margin-bottom: 8px; }
.poi-popup-divider { border: none; border-top: 1px solid var(--border-color); margin: 8px 0; }
.poi-popup-address { color: var(--text-secondary); margin-bottom: 4px; }
.poi-popup-hours { color: var(--text-secondary); margin: 4px 0; }
.poi-popup-hours-table { width: 100%; font-size: 0.75rem; }
.poi-popup-hours-table td { padding: 1px 8px 1px 0; }
.poi-popup-hours-table .today { font-weight: 600; color: var(--text-primary); }
.poi-popup-links { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.poi-popup-links a { color: var(--green-400); text-decoration: none; font-size: 0.8125rem; }
.poi-popup-links a:hover { text-decoration: underline; }

/* Business badge & search integration */
.business-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  vertical-align: middle;
  margin-left: 6px;
}

.business-card {
  border-left: 3px solid #a855f7;
}

.search-section-title {
  font-family: var(--font-display);
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

/* ---- Offline Sync Badge ---- */
.offline-sync-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: #f97316;
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  z-index: 10;
}
.offline-sync-badge.hidden { display: none; }

/* ---- Mobile Chip Bar ---- */
.chip-bar {
  display: none;
  gap: 8px;
  padding: 8px 12px;
  overflow-x: auto;
  background: rgba(13, 17, 23, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border-color);
  z-index: 900;
  scrollbar-width: none;
}
.chip-bar::-webkit-scrollbar { display: none; }
@media (max-width: 768px) {
  .chip-bar { display: flex; }
}
[data-theme="light"] .chip-bar {
  background: rgba(255, 255, 255, 0.85);
}

.chip {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
  white-space: nowrap;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.chip:hover { border-color: var(--green-500); }
.chip svg { width: 14px; height: 14px; }
[data-theme="light"] .chip {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}
.chip--active {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--green-400);
}
.chip--filter-badge {
  background: var(--green-500);
  color: #fff;
  border-radius: 10px;
  padding: 0 6px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 4px;
}
.chip--theme { padding: 6px 10px; }

/* Weather Detail Sheet */
.weather-detail-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
  border-radius: 16px 16px 0 0;
  padding: 20px 16px;
  z-index: 1100;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  max-height: 60vh;
  overflow-y: auto;
}
.weather-detail-sheet.visible { transform: translateY(0); }
.weather-detail-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1099;
  display: none;
}
.weather-detail-sheet-backdrop.visible { display: block; }
.weather-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.weather-detail-header h3 { margin: 0; font-size: 1.125rem; }
.weather-detail-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}
.weather-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.weather-detail-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 12px;
}
.weather-detail-card-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}
.weather-detail-card-value {
  font-size: 1.25rem;
  font-weight: 700;
}
.weather-detail-card-sub {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
}
.wind-scale {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 12px 16px;
}
.wind-scale-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}
.wind-scale-text {
  font-size: 0.9375rem;
  font-weight: 600;
}
.wind-scale--calm { color: #22c55e; }
.wind-scale--light { color: #4ade80; }
.wind-scale--windy { color: #fbbf24; }
.wind-scale--stormy { color: #f97316; }
.wind-scale--extreme { color: #ef4444; }

/* Weather Sheet extras */
.weather-sheet-handle {
  width: 40px;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  margin: 0 auto 12px;
  cursor: grab;
}
.weather-sheet-expanded { display: none; }

.weather-spot-rec {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 12px;
}
.weather-spot-rec-icon { font-size: 1.25rem; flex-shrink: 0; }
.weather-spot-rec-text { flex: 1; font-size: 0.8125rem; color: var(--text-secondary); }
.weather-spot-rec-btn {
  background: none;
  border: none;
  color: var(--green-400);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.weather-spot-rec-btn:hover { text-decoration: underline; }

.weather-sun-row {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding: 8px 0;
  margin-top: 8px;
}

.weather-forecast { margin-top: 12px; }
.weather-forecast-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.weather-forecast-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8125rem;
}
.weather-forecast-row:last-child { border-bottom: none; }
.weather-forecast-day { width: 28px; font-weight: 600; color: var(--text-primary); }
.weather-forecast-icon { width: 24px; text-align: center; }
.weather-forecast-temp { flex: 1; color: var(--text-secondary); }
.weather-forecast-rain { color: var(--text-tertiary); font-size: 0.75rem; }

.weather-wind-toggle-row {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}
.weather-wind-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.weather-wind-label input { display: none; }
.weather-wind-slider {
  width: 40px;
  height: 22px;
  background: var(--bg-secondary);
  border-radius: 11px;
  position: relative;
  transition: background 0.2s;
}
.weather-wind-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.weather-wind-label input:checked + .weather-wind-slider {
  background: rgba(34, 197, 94, 0.3);
}
.weather-wind-label input:checked + .weather-wind-slider::after {
  transform: translateX(18px);
  background: var(--green-400);
}

/* ---- Utility classes ---- */
.hide-mobile { display: none; }
.hide-tablet-down { display: none; }

/* ============================================
   TABLET — min-width: 481px
   ============================================ */
@media (min-width: 481px) {
  .hide-mobile { display: revert; }

  /* Nav: still bottom bar, but show text labels */
  .nav-link span:not(.nav-icon) {
    display: block;
  }

  /* Search bar: horizontal */
  .search-bar {
    flex-direction: row;
  }

  /* Filter row: 2 columns */
  .filter-row {
    grid-template-columns: 1fr 1fr;
  }

  /* Tag filter buttons: restore original padding */
  .tag-filter-btn {
    padding: 6px 12px;
  }


  /* Content padding */
  .content-container {
    padding: 28px 24px 80px;
  }

  /* Checkbox grid: 2 columns */
  .checkbox-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Legal links: 2 columns */
  .legal-links {
    grid-template-columns: 1fr 1fr;
  }

  /* Achievement grid: auto-fill */
  .ach-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }

  /* Profile stats: restore padding */
  .profile-stats {
    gap: 12px;
  }

  .profile-stat {
    padding: 16px;
  }

  /* Leaderboard: show all columns */
  .leaderboard-table .col-avgstars,
  .leaderboard-table .col-role,
  .leaderboard-table td.col-avgstars,
  .leaderboard-table td.col-role {
    display: table-cell;
  }

  .leaderboard-table thead th {
    padding: 12px 16px;
  }

  .leaderboard-table td {
    padding: 14px 16px;
  }
}

/* ============================================
   DESKTOP — min-width: 769px
   ============================================ */
@media (min-width: 769px) {
  :root {
    --nav-height: 60px;
  }

  .hide-tablet-down { display: revert; }


  /* Typography: desktop sizes */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  body {
    font-size: 1rem;
  }

  /* Navigation: top bar */
  #main-nav {
    top: 0;
    bottom: auto;
    height: 60px;
    border-bottom: 1px solid var(--border-subtle);
    border-top: none;
    padding-bottom: 0;
  }

  .nav-inner {
    padding: 0 20px;
    gap: 8px;
    justify-content: flex-start;
  }

  .nav-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 24px;
    flex-shrink: 0;
  }

  .nav-links {
    gap: 2px;
    flex: 1;
    justify-content: flex-start;
  }

  .nav-link {
    flex-direction: row;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.875rem;
    min-height: auto;
  }

  .nav-link span:not(.nav-icon) {
    display: inline;
  }

  #auth-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
  }

  /* Theme toggle: visible only in nav on desktop */
  .theme-toggle {
    display: flex;
    position: static;
    width: 36px;
    height: 36px;
    margin-left: 4px;
    box-shadow: none;
  }

  main {
    padding-top: var(--nav-height);
    padding-bottom: 0;
  }

  /* Content container */
  .content-container {
    padding: 40px 20px 80px;
  }

  /* Map container: top nav */
  #map-container {
    height: calc(100vh - var(--nav-height));
  }

  /* FAB: desktop position */
  .fab {
    bottom: 28px;
    right: 28px;
  }


  /* Weather widget: desktop position */
  .weather-widget {
    top: 10px;
    bottom: auto;
    left: 10px;
  }

  /* Map hint: desktop position */
  .map-hint {
    bottom: 28px;
  }

  /* Filter row: 3 columns */
  .filter-row {
    grid-template-columns: 1fr 1fr 1fr;
  }

  /* Leaderboard sticky header accounts for top nav */
  .leaderboard-table thead th {
    top: var(--nav-height);
  }

  /* Modal: centered, not bottom-sheet */
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }

  .modal {
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 480px;
    max-height: 85vh;
    animation: modalIn 0.25s ease;
  }

  /* Toast: desktop position */
  .toast {
    bottom: 24px;
  }
}

/* ---- Image Upload ---- */
.file-input {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
}
.file-input:hover { border-color: var(--green); }
.image-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.image-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.image-preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.7);
  color: white;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Popup Image ---- */
.popup-image {
  margin: -12px -12px 8px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
  max-height: 160px;
}
.popup-image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

/* ---- Favorites ---- */
.btn-favorite {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}
.btn-favorite:hover { border-color: #ef4444; color: #ef4444; }
.btn-favorite.favorited { border-color: #ef4444; color: #ef4444; background: rgba(239,68,68,0.1); }
.btn-favorite svg { width: 14px; height: 14px; }
.btn-favorite.favorited svg { fill: #ef4444; }

/* ===== SPOT DETAIL — Card Stack ===== */
.detail-page {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  border: none;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.detail-back:hover { color: var(--green); }
.detail-back svg { width: 16px; height: 16px; }

/* -- Card base -- */
.detail-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* -- Gallery Card -- */
.detail-gallery {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.gallery-main {
  position: relative;
  aspect-ratio: 3 / 2;
  background: var(--bg-body);
  overflow: hidden;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}
.gallery-nav:hover { background: rgba(0, 0, 0, 0.75); }
.gallery-nav svg { width: 18px; height: 18px; }
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.gallery-counter {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: white;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  backdrop-filter: blur(4px);
}
.gallery-thumbs {
  display: flex;
  gap: 4px;
  padding: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.gallery-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 48px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  background: none;
  transition: border-color 0.2s;
}
.gallery-thumb.active { border-color: var(--green); }
.gallery-thumb:hover { border-color: var(--green-700); }
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* -- Title + Voting Card -- */
.detail-header-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.detail-header-info { flex: 1; min-width: 0; }
.detail-title {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0;
  color: var(--text-primary);
}
.detail-stars {
  font-size: 0.875rem;
  margin-top: 6px;
  letter-spacing: 1px;
}
.detail-stars .star-filled { color: var(--star-color); }
.detail-stars .star-empty { color: var(--text-muted); }
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 0.75rem;
}
.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.detail-meta svg { width: 14px; height: 14px; }
.detail-author-link { color: var(--green); cursor: pointer; }
.detail-author-link:hover { text-decoration: underline; }

/* Voting (integrated right side) */
.detail-voting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.vote-btn {
  width: 36px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  padding: 0;
}
.vote-btn svg { width: 16px; height: 16px; }
.vote-btn:hover { border-color: var(--text-primary); color: var(--text-primary); }
.vote-up { background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.2); }
.vote-up:hover { background: rgba(34,197,94,0.15); border-color: var(--green); }
.vote-up.active { background: rgba(34,197,94,0.2); border-color: var(--green); color: var(--green); }
.vote-up.active svg { fill: var(--green); }
.vote-down { background: rgba(255,255,255,0.03); }
.vote-down:hover { background: rgba(239,68,68,0.08); border-color: #ef4444; }
.vote-down.active { background: rgba(239,68,68,0.15); border-color: #ef4444; color: #ef4444; }
.vote-down.active svg { fill: #ef4444; }
.vote-score {
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-secondary);
  min-width: 32px;
  text-align: center;
  padding: 2px 0;
}
.vote-positive { color: var(--green); }
.vote-negative { color: #ef4444; }

/* -- Tags + Description Card -- */
.detail-content-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 14px;
}
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.detail-tag {
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(34,197,94,0.12);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--green);
}
.detail-description {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.5;
  margin: 0;
}

/* -- Map Card -- */
.detail-map-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.detail-minimap {
  height: 140px;
}
.detail-map-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
}
.detail-map-coords {
  color: var(--text-muted);
  font-size: 0.75rem;
}
.detail-map-link {
  color: var(--green);
  font-size: 0.75rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.detail-map-link:hover { text-decoration: underline; }

/* -- Weather Card -- */
.detail-weather-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 14px;
  display: flex;
  gap: 12px;
}
.detail-weather-col {
  flex: 1;
  text-align: center;
  padding: 8px;
  background: var(--bg-body);
  border-radius: 8px;
}
.detail-weather-label {
  color: var(--text-muted);
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.detail-weather-icon {
  font-size: 1.25rem;
  margin-top: 4px;
}
.detail-weather-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
}
.detail-weather-desc {
  font-size: 0.6875rem;
  color: var(--text-muted);
}

/* -- Actions Card (Pill Buttons) -- */
.detail-actions-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  position: relative;
}
.detail-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 99px;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid;
  background: transparent;
  transition: all 0.2s;
  flex: 1;
  min-width: 45%;
}
.detail-pill svg { width: 14px; height: 14px; }
.detail-pill-favorite {
  color: #ef4444;
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.25);
}
.detail-pill-favorite:hover { background: rgba(239,68,68,0.2); }
.detail-pill-favorite.active {
  background: rgba(239,68,68,0.2);
  border-color: #ef4444;
}
.detail-pill-share {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.05);
  border-color: rgba(255,255,255,0.1);
}
.detail-pill-share:hover { border-color: var(--text-secondary); }
.detail-pill-edit {
  color: var(--green);
  background: rgba(34,197,94,0.1);
  border-color: rgba(34,197,94,0.25);
}
.detail-pill-edit:hover { background: rgba(34,197,94,0.2); }
.detail-pill-report {
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.06);
}
.detail-pill-report:hover { color: var(--text-secondary); border-color: rgba(255,255,255,0.15); }

/* Share menu inside actions card */
.detail-actions-card .share-menu {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 8px;
}

/* -- Desktop -- */
@media (min-width: 769px) {
  .detail-minimap { height: 200px; }
  .gallery-main { max-height: 400px; aspect-ratio: auto; }
  .gallery-main img { max-height: 400px; }
}

/* Clickable elements */
.popup-title-link {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}
.popup-title-link:hover { color: var(--green); }

.spot-card-link {
  cursor: pointer;
  transition: color 0.15s;
}
.spot-card-link:hover h3 { color: var(--green); }

.lb-spot-clickable {
  cursor: pointer;
  transition: background 0.15s;
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  margin: -6px -8px;
}
.lb-spot-clickable:hover {
  background: var(--bg-surface-hover);
}
.lb-spot-clickable:hover .lb-spot-title {
  color: var(--green);
}

.profile-spot-clickable {
  cursor: pointer;
  transition: border-color 0.15s;
}
.profile-spot-clickable:hover {
  border-color: var(--green-700);
}

/* ---- Share Button ---- */
.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}
.btn-share:hover { border-color: var(--green); color: var(--green); }
.btn-share svg { width: 14px; height: 14px; }

/* ---- Heatmap Toggle ---- */
.heatmap-toggle {
  position: absolute;
  bottom: 80px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 800;
  transition: all 0.2s;
  box-shadow: var(--shadow-md);
}
.heatmap-toggle:hover { color: #f97316; border-color: #f97316; }
.heatmap-toggle.active { background: rgba(249,115,22,0.15); color: #f97316; border-color: #f97316; }
.heatmap-toggle svg { width: 20px; height: 20px; }

@media (min-width: 769px) {
  .heatmap-toggle {
    bottom: 28px;
    right: 208px;
  }
}

/* ---- Route Planning ---- */
.route-toggle {
  position: absolute;
  bottom: 80px;
  right: 68px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 800;
  transition: all 0.2s;
}

.route-toggle:hover { color: var(--green-500); border-color: var(--green-600); }
.route-toggle.active { background: var(--green-glow-strong); color: var(--green-500); border-color: var(--green-600); }
.route-toggle svg { width: 20px; height: 20px; }

@media (min-width: 769px) {
  .route-toggle {
    bottom: 28px;
    right: 260px;
  }
}

.route-panel {
  position: absolute;
  bottom: 130px;
  right: 16px;
  width: 260px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  z-index: 900;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 769px) {
  .route-panel {
    bottom: 80px;
    right: 260px;
  }
}

.route-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.875rem;
}

.route-panel-header svg { width: 16px; height: 16px; margin-right: 4px; }

.route-list { margin-bottom: 8px; }

.route-empty {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-style: italic;
}

.route-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.route-number-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--green-600);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  flex-shrink: 0;
}

.route-number-marker {
  background: none;
  border: none;
}

.route-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-600);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.route-summary {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--green-500);
}
.btn-navigate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 10px 16px;
  border: none;
  border-radius: 99px;
  background: var(--green);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-navigate:hover { opacity: 0.85; }
.btn-navigate svg { width: 16px; height: 16px; }

/* ---- Edit Button ---- */
.btn-edit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}
.btn-edit:hover { border-color: var(--green); color: var(--green); }
.btn-edit svg { width: 14px; height: 14px; }

/* ---- Share Menu ---- */
.share-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  z-index: 10000;
  box-shadow: var(--shadow-lg);
  animation: shareMenuIn 0.15s ease-out;
}
@keyframes shareMenuIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.share-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}
.share-option:hover {
  background: var(--bg-surface-hover);
  color: var(--green);
}
.share-option svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ---- Site Footer ---- */
.site-footer {
  padding: 24px 16px 32px;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  border-top: 1px solid var(--border);
  margin-top: 48px;
}
.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}
.site-footer a:hover { color: var(--green); }
.footer-donate { color: #ff5e5b !important; }
.footer-donate:hover { color: #ff3b38 !important; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.footer-sep { color: var(--text-tertiary); }
@media (max-width: 480px) {
  .site-footer { padding-bottom: calc(56px + env(safe-area-inset-bottom) + 16px); }
}

/* ---- Landing Page ---- */
.landing-hero {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg-base, #0d1117);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.landing-hero.hidden {
  display: none;
}

.landing-hero.landing-exit {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.landing-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding: 20px;
  width: 100%;
  max-width: 1100px;
}

.landing-text {
  text-align: center;
}

.landing-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.landing-logo .brand-icon {
  font-size: 1.5rem;
}

.landing-logo .brand-text {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.landing-headline {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.landing-subline {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.landing-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.landing-ctas .btn-primary,
.landing-ctas .btn-secondary {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg, 12px);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.landing-ctas .btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.landing-ctas .btn-secondary:hover {
  border-color: var(--green-500);
  color: var(--green-400);
}

.landing-stats {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-tertiary, #6b7280);
}

.landing-map-container {
  width: 100%;
  height: 40vh;
  border-radius: var(--radius-lg, 12px);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

#landing-map {
  width: 100%;
  height: 100%;
}

.landing-nav-hidden {
  display: none !important;
}

/* Desktop landing */
@media (min-width: 769px) {
  .landing-content {
    flex-direction: row;
    align-items: center;
    gap: 48px;
    padding: 40px 60px;
  }

  .landing-text {
    flex: 1;
    text-align: left;
  }

  .landing-logo {
    justify-content: flex-start;
  }

  .landing-headline {
    font-size: 2.8rem;
  }

  .landing-subline {
    font-size: 1.1rem;
  }

  .landing-ctas {
    flex-direction: row;
  }

  .landing-map-container {
    flex: 1;
    height: 60vh;
    max-height: 500px;
  }
}
