/* ============================================================
   Olea Camp Map — Production Styles
   Design language: "Sun-bleached Mediterranean, modern editorial"
   Palette: warm ivory canvas, sage + terracotta + gold-hour accents
   Typography: Fraunces (display serif) + Manrope (variable sans)
   ============================================================ */

/* ── 1. Design Tokens ── */

:root {
  /* Core palette — Mediterranean, olive-grove */
  --color-primary: #4A6B2E;          /* sage olive */
  --color-primary-strong: #324A1F;   /* deeper for hover/active */
  --color-primary-soft: #E7EDDA;     /* faint sage for hover surfaces */
  --color-primary-dark: #324A1F;     /* legacy alias → primary-strong */
  --color-primary-light: #6A8A47;    /* legacy alias */
  --color-accent: #C25A2C;           /* terracotta */
  --color-accent-hover: #9E4420;
  --color-accent-soft: #E3CBB0;      /* sand — chip bg, hover surfaces */

  /* Tier colors — tonally tuned to sit in the warm palette */
  --color-luxury: #A6473C;           /* weathered rust */
  --color-premium: #BD8A2B;          /* mustard gold */
  --color-grande: #5B6E8F;           /* dusty Adriatic */

  /* Surfaces & text */
  --color-bg: #F5EFE4;               /* warm ivory page bg (visible at edges) */
  --color-surface: rgba(255, 255, 255, 0.92);
  --color-surface-solid: #FFFFFF;
  --color-surface-warm: #FAF6ED;     /* secondary card / chip background */
  --color-ink: #1A1F14;              /* olive-black primary text */
  --color-text: #1A1F14;             /* alias kept for existing rules */
  --color-text-secondary: #4F5747;
  --color-text-muted: #837B6E;       /* warm stone */
  --color-border: rgba(26, 31, 20, 0.08);
  --color-line: rgba(26, 31, 20, 0.08);

  --color-success: #4A6B2E;
  --color-info: #3E6A7A;
  --color-warning: #BD8A2B;
  --color-error: #8E3A2E;

  /* Glass */
  --glass-bg: rgba(250, 246, 237, 0.78);
  --glass-blur: blur(18px) saturate(140%);
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);

  /* Radii — softer, warmer */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Warm-tinted shadows — warmer than pure-black */
  --shadow-sm: 0 2px 8px rgba(77, 56, 30, 0.08);
  --shadow-md: 0 6px 24px rgba(77, 56, 30, 0.12);
  --shadow-lg: 0 16px 48px rgba(77, 56, 30, 0.16);
  --shadow-primary: 0 6px 20px rgba(74, 107, 46, 0.28);
  --shadow-accent: 0 6px 20px rgba(194, 90, 44, 0.28);

  --transition-fast: 150ms ease;
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-panel: 400ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Typography — Fraunces (display serif) + Manrope (body/UI sans) */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-ui: 'Manrope', sans-serif;
  --font-heading: var(--font-display);    /* legacy alias */
}

/* ── 2. Reset & Base ── */

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

body {
  font-family: var(--font-body);
  color: var(--color-text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
}

button {
  font-family: var(--font-ui);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ── 3. Splash Screen ── */

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 70% 60% at 50% 30%, rgba(189, 138, 43, 0.22), transparent 70%),
    linear-gradient(168deg, #324A1F 0%, #4A6B2E 55%, #6A8A47 100%);
  transition: opacity 400ms ease, visibility 400ms ease;
}

.splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
}

.splash-brand {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 44px;
  font-weight: 500;
  color: #FAF6ED;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  font-variation-settings: "opsz" 144;
}

.splash-sub {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(250, 246, 237, 0.7);
  margin-bottom: 32px;
}

.splash-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* ── 4. Map ── */

#map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

/* Hide default Leaflet zoom */
.leaflet-control-zoom {
  display: none !important;
}

/* ── 5. Custom Map Controls ── */

.map-controls {
  position: absolute;
  bottom: 24px;
  right: 16px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.map-ctrl-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  color: var(--color-text);
  font-size: 20px;
  transition: background var(--transition-fast);
}

.map-ctrl-btn:first-child {
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.map-ctrl-btn:last-child {
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.map-ctrl-btn:only-child {
  border-radius: var(--radius-sm);
}

.map-ctrl-btn + .map-ctrl-btn {
  border-top: 1px solid var(--color-border);
}

.map-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.95);
}

.map-ctrl-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-ctrl-divider {
  height: 8px;
}

/* ── 6. Filter FAB ── */

.filter-fab {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 1000;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #FAF6ED;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-primary);
  transition: transform var(--transition-fast), background var(--transition-fast), box-shadow var(--transition-fast);
}

.filter-fab:hover {
  background: var(--color-primary-strong);
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 28px rgba(74, 107, 46, 0.36);
}

.filter-fab svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.filter-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: var(--color-error);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  display: none;
}

.filter-badge.visible {
  display: flex;
}

/* ── 7. Filter Panel ── */

.filter-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  height: 100%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: var(--glass-border);
  z-index: 1001;
  box-shadow: var(--shadow-lg);
  transform: translateX(-100%);
  transition: transform var(--transition-panel);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.filter-panel.open {
  transform: translateX(0);
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 0;
}

.filter-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
}

.filter-close-btn {
  display: none;
}

.filter-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 20px;
}

/* Search */
.filter-search {
  position: relative;
  margin-bottom: 16px;
}

.filter-search input {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--color-surface-solid);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition-fast);
}

.filter-search input:focus {
  border-color: var(--color-primary);
}

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

.search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 16px;
  transition: color var(--transition-fast);
}

.search-clear.visible {
  display: flex;
}

.search-clear:hover {
  color: var(--color-text);
}

/* Filter counter */
.filter-counter {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

/* Filter sections */
.filter-section {
  margin-bottom: 20px;
}

.filter-section-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-text-secondary);
  margin-bottom: 10px;
  padding-left: 8px;
  border-left: 3px solid var(--color-primary);
}

/* Tier pill toggles */
.tier-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tier-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  border: 2px solid;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.tier-pill input {
  display: none;
}

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

.tier-pill[data-tier="luxury"] {
  border-color: var(--color-luxury);
  color: var(--color-luxury);
}
.tier-pill[data-tier="luxury"].active {
  background: var(--color-luxury);
  color: #fff;
}

.tier-pill[data-tier="premium"] {
  border-color: var(--color-premium);
  color: var(--color-premium);
}
.tier-pill[data-tier="premium"].active {
  background: var(--color-premium);
  color: #fff;
}

.tier-pill[data-tier="grande"] {
  border-color: var(--color-grande);
  color: var(--color-grande);
}
.tier-pill[data-tier="grande"].active {
  background: var(--color-grande);
  color: #fff;
}

/* Custom checkboxes */
.custom-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  cursor: pointer;
  font-size: 14px;
  color: var(--color-text);
}

.custom-check input {
  display: none;
}

.check-box {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.custom-check input:checked + .check-box {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.check-box::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translateY(-1px);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.custom-check input:checked + .check-box::after {
  opacity: 1;
}

.check-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Styled range sliders */
.range-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.range-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.range-label {
  font-size: 12px;
  color: var(--color-text-secondary);
  min-width: 32px;
}

.range-row input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: #ddd;
  outline: none;
}

.range-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.range-row input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.range-row input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.range-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text);
  min-width: 52px;
  text-align: right;
}

/* Favorites toggle in filters */
.favorites-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
}

.favorites-section span {
  font-size: 14px;
}

.fav-count {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-left: 4px;
}

/* Sort select */
.sort-select {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  background: var(--color-surface-solid);
  color: var(--color-text);
  outline: none;
  cursor: pointer;
}

.sort-select:focus {
  border-color: var(--color-primary);
}

/* Pitch list in filter panel */
.pitch-list {
  max-height: 320px;
  overflow-y: auto;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pitch-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.pitch-list-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

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

.pitch-list-num {
  font-weight: 600;
  font-size: 14px;
  min-width: 28px;
}

.pitch-list-info {
  font-size: 12px;
  color: var(--color-text-secondary);
  flex: 1;
}

.pitch-list-thumb {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
}

/* Reset button */
.filter-reset {
  width: 100%;
  padding: 10px;
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all var(--transition-fast);
  margin-top: 8px;
}

.filter-reset:hover {
  background: rgba(0, 0, 0, 0.08);
  color: var(--color-text);
}

/* ── 8. Detail Panel ── */

/* ── Detail panel: card-stack container ──
   Panel is transparent; each card inside carries its own shadow + radius.
   `pointer-events: none` lets clicks in the padding gaps fall through to the map;
   children restore `pointer-events: auto` so cards stay interactive. */
.detail-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 460px;
  height: 100%;
  background: transparent;
  z-index: 1001;
  transform: translateX(110%);
  transition: transform var(--transition-panel);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 28px;
  pointer-events: none;
}

.detail-panel > * { pointer-events: auto; }

.detail-panel.open { transform: translateX(0); }

.detail-card {
  position: relative;
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  flex-shrink: 0;
}

/* Staggered reveal when the stack opens */
.detail-panel.open .detail-card,
.detail-panel.open .detail-thumb-strip:not([hidden]) {
  animation: card-rise 360ms cubic-bezier(.2,.8,.2,1) both;
}
.detail-panel.open .detail-card--hero       { animation-delay: 0ms; }
.detail-panel.open .detail-thumb-strip      { animation-delay: 40ms; }
.detail-panel.open .detail-card--stats      { animation-delay: 80ms; }
.detail-panel.open .detail-card--actions    { animation-delay: 140ms; }
.detail-panel.open .detail-card--amenities  { animation-delay: 200ms; }

@keyframes card-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero card — big photo, no padding around the image ── */
.detail-card--hero { padding: 0; }

.detail-photo-wrap {
  position: relative;
  width: 100%;
  min-height: 300px;
  aspect-ratio: 460 / 300;
  background: var(--color-surface-warm);
  overflow: hidden;
  flex-shrink: 0;
}

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

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

/* Legacy overlay class kept but disabled — we no longer darken the photo */
.detail-photo-overlay { display: none; }

/* Footer row below photo: title + tier pill */
.detail-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px 16px;
  background: var(--color-surface-solid);
}

.detail-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
  color: var(--color-ink);
  margin: 0;
  font-variation-settings: "opsz" 30;
  letter-spacing: -0.01em;
}

.detail-tier-pill {
  padding: 5px 12px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #FFFFFF;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(77, 56, 30, 0.2);
}

/* Legacy alias kept so JS selectors that still target .detail-tier-overlay work */
.detail-tier-overlay { /* class is still on the pill; alias is a no-op */ }

/* Close button */
.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--color-text);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.detail-close:hover {
  background: rgba(255, 255, 255, 0.95);
}

/* Favorite heart button on photo */
.detail-fav-btn {
  position: absolute;
  top: 12px;
  right: 56px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.detail-fav-btn svg {
  width: 18px;
  height: 18px;
  transition: all var(--transition-fast);
}

.detail-fav-btn.favorited svg {
  fill: #e74c3c;
  stroke: #e74c3c;
}

.detail-fav-btn:not(.favorited) svg {
  fill: none;
  stroke: var(--color-text);
  stroke-width: 2;
}

/* No image placeholder */
.detail-no-image {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  background: #f0f0f0;
}

.detail-no-image.visible {
  display: flex;
}

.detail-no-image svg {
  width: 48px;
  height: 48px;
  stroke: var(--color-text-muted);
  fill: none;
  stroke-width: 1.5;
  margin-bottom: 8px;
}

/* Gallery dots (replace counter) */
.detail-gallery-nav {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
}

.gallery-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.gallery-btn:hover {
  background: rgba(0, 0, 0, 0.6);
}

.gallery-dots {
  display: flex;
  gap: 6px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transition: all var(--transition-fast);
}

.gallery-dot.active {
  background: #fff;
  transform: scale(1.2);
}

/* Stats / actions / amenities card interiors */
.detail-card--stats,
.detail-card--actions,
.detail-card--amenities {
  padding: 16px 18px;
}

.detail-description {
  margin: 12px 0 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  color: var(--color-text-secondary);
}
.detail-description:empty { display: none; }

/* Legacy — unused now that body is split into cards */
.detail-body { padding: 0; flex: 0; }

/* Info grid as mini-cards */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.detail-grid-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-sm);
}

.detail-grid-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--color-primary);
  margin-top: 1px;
}

.detail-grid-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-grid-text {
  display: flex;
  flex-direction: column;
}

.detail-grid-text .label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
}

.detail-grid-text .value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}

/* Distance */
.detail-distance {
  font-size: 13px;
  color: var(--color-text-secondary);
  margin-bottom: 16px;
}

.detail-distance:empty {
  display: none;
}

/* Nearest amenities */
.detail-amenities-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 10px;
}

.detail-amenities {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 20px;
  scrollbar-width: thin;
}

.detail-amenities::-webkit-scrollbar {
  height: 4px;
}
.detail-amenities::-webkit-scrollbar-thumb {
  background: var(--color-text-muted);
  border-radius: 2px;
}

.amenity-card {
  flex-shrink: 0;
  width: 100px;
  padding: 10px 8px;
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-sm);
  text-align: center;
}

.amenity-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin: 0 auto 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  border: 1.5px solid var(--pm-color, var(--color-primary));
  box-shadow: 0 1px 3px rgba(77, 56, 30, 0.12);
}

.amenity-icon-emoji {
  font-size: 15px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(77, 56, 30, 0.15));
}

.amenity-name {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* Action buttons */
.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.detail-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.detail-action-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-navigate {
  background: var(--color-primary);
  color: #fff;
}

.btn-navigate:hover {
  background: var(--color-primary-dark);
}

.btn-share {
  background: var(--color-info);
  color: #fff;
}

.btn-share:hover {
  background: #3a7bc8;
}

.btn-share.copied {
  background: var(--color-success);
}

.btn-compare {
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-text);
}

.btn-compare:hover {
  background: rgba(0, 0, 0, 0.1);
}

.btn-compare.in-tray {
  background: var(--color-accent);
  color: var(--color-text);
}

/* ── 9. Legend ── */

.legend {
  position: absolute;
  bottom: 24px;
  left: 16px;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 14px 10px;
  box-shadow: var(--shadow-sm);
  font-size: 13px;
}

.legend-title {
  font-family: var(--font-body);
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text-muted);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px 0;
  cursor: pointer;
  transition: opacity var(--transition-fast);
  user-select: none;
  font-family: var(--font-display);
  font-weight: 500;
  font-variation-settings: "opsz" 14;
  color: var(--color-ink);
  font-size: 13.5px;
}

.legend-item:hover {
  opacity: 0.75;
}

.legend-item.disabled {
  opacity: 0.38;
  text-decoration: line-through;
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 5px;
  border: 1px solid rgba(26, 31, 20, 0.1);
  box-shadow: 0 1px 2px rgba(77, 56, 30, 0.12);
  flex-shrink: 0;
}

/* ── 10. Language Selector ── */

.lang-bar {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  background: rgba(250, 246, 237, 0.72);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-full);
  padding: 3px;
  box-shadow: var(--shadow-sm);
  gap: 2px;
}

.lang-btn {
  padding: 5px 9px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  transition: all var(--transition-fast);
  min-width: 32px;
  text-align: center;
}

.lang-btn:hover {
  color: var(--color-ink);
  background: rgba(74, 107, 46, 0.08);
}

.lang-btn.active {
  background: var(--color-primary);
  color: #FAF6ED;
  box-shadow: 0 1px 4px rgba(74, 107, 46, 0.28);
}

/* ── 11. Toast Notifications ── */

.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: toast-in 300ms ease forwards;
  white-space: nowrap;
}

.toast.removing {
  animation: toast-out 300ms ease forwards;
}

.toast-success { background: var(--color-success); }
.toast-info { background: var(--color-info); }
.toast-warning { background: var(--color-warning); color: var(--color-text); }
.toast-error { background: var(--color-error); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

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

/* ── 12. Lightbox ── */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10002;
  background:
    radial-gradient(ellipse 60% 45% at 50% 50%, rgba(74, 53, 22, 0.18), transparent 70%),
    rgba(26, 31, 20, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox.open {
  display: flex;
}

.lightbox-img {
  max-width: 95vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  transition: opacity 200ms ease;
  touch-action: pinch-zoom;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-dots {
  position: absolute;
  bottom: 24px;
  display: flex;
  gap: 8px;
}

.lightbox-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lightbox-dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* ── 13. Comparison Tray & Overlay ── */

.compare-tray {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%) translateY(140%);
  z-index: 1002;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 12px 14px;
  background: var(--color-surface-solid);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-normal);
}

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

.compare-tray-item {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid var(--color-border);
}

.compare-tray-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-tray-num {
  position: absolute;
  bottom: 2px;
  left: 2px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 2px;
}

.compare-tray-remove {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-error);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-tray-btn {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background var(--transition-fast);
}

.compare-tray-btn:hover {
  background: var(--color-primary-dark);
}

/* Comparison overlay */
.compare-overlay {
  position: fixed;
  inset: 0;
  z-index: 10003;
  background: var(--color-surface-solid);
  display: none;
  flex-direction: column;
  overflow-y: auto;
}

.compare-overlay.open {
  display: flex;
}

.compare-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.compare-header h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
}

.compare-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.compare-content {
  display: flex;
  gap: 1px;
  background: var(--color-border);
  flex: 1;
  overflow-x: auto;
}

.compare-col {
  flex: 1;
  min-width: 280px;
  background: var(--color-surface-solid);
  display: flex;
  flex-direction: column;
}

.compare-col-photo {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.compare-col-body {
  padding: 16px;
}

.compare-col-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.compare-col-tier {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 12px;
}

.compare-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  font-size: 14px;
}

.compare-row-label {
  color: var(--color-text-secondary);
}

.compare-row-value {
  font-weight: 600;
}

.compare-row-value.best {
  color: var(--color-primary);
}

/* ── 14. Pitch Labels ── */

.pitch-label {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.7);
  padding: 0 !important;
}

.pitch-label::before {
  display: none !important;
}

/* ── 15. POI Markers ── */

/* Modern circular POI marker: white ivory disc, colored ring + accent dot */
.poi-marker {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #FFFFFF;
  border: 2px solid var(--pm-color, var(--color-primary));
  border-radius: 999px;
  box-shadow:
    0 2px 6px rgba(77, 56, 30, 0.18),
    0 8px 24px rgba(77, 56, 30, 0.06);
  transition: transform 180ms cubic-bezier(.2,.7,.2,1), box-shadow 180ms;
}

.poi-marker-emoji {
  font-size: 19px;
  line-height: 1;
  filter: drop-shadow(0 1px 1px rgba(77, 56, 30, 0.2));
}

.poi-marker:hover {
  transform: translateY(-2px) scale(1.06);
  box-shadow:
    0 4px 12px rgba(77, 56, 30, 0.22),
    0 12px 32px rgba(77, 56, 30, 0.08);
  z-index: 10;
}

/* Leaflet tooltip — warm pill instead of the default unstyled rectangle */
.leaflet-tooltip {
  background: var(--color-ink);
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.1px;
  padding: 5px 12px;
  box-shadow: var(--shadow-md);
}
.leaflet-tooltip::before { display: none; }

/* ── 16. User Position ── */

.user-position-dot {
  width: 16px;
  height: 16px;
  background: var(--color-info);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(3); opacity: 0; }
}

.user-position-pulse {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(74, 144, 217, 0.3);
  animation: pulse-ring 2s ease-out infinite;
}

/* Favorite heart marker on map */
.fav-marker {
  color: #e74c3c;
  font-size: 14px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* ── 17. Offline Banner ── */

.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--color-warning);
  color: var(--color-text);
  text-align: center;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  transform: translateY(-100%);
  transition: transform var(--transition-normal);
}

.offline-banner.visible {
  transform: translateY(0);
}

/* Error card (replaces geojson load failure) */
.error-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
  background: var(--color-surface-solid);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  max-width: 320px;
}

.error-card h3 {
  font-family: var(--font-heading);
  margin-bottom: 8px;
}

.error-card p {
  color: var(--color-text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.error-card button {
  padding: 10px 24px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 500;
}

/* ── 18. Accessibility ── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .splash-screen { transition: none; }
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ── 19. Mobile Bottom Sheet ── */

.drag-handle {
  display: none;
}

/* Toggle switch for favorites */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  display: none;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: #ddd;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.toggle-switch input:checked + .toggle-track {
  background: var(--color-primary);
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

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

/* ── 20. Responsive — Mobile ── */

@media (max-width: 640px) {
  /* Filter panel from bottom */
  .filter-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 80%;
    transform: translateY(100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-right: none;
    border-top: var(--glass-border);
  }

  .filter-panel.open {
    transform: translateY(0);
  }

  .filter-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--color-primary);
    color: #fff;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
  }

  /* Detail panel bottom sheet — cards stack inside, sheet provides the frame */
  .detail-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 70%;
    transform: translateY(100%);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -6px 24px rgba(77, 56, 30, 0.18);
    background: var(--color-surface-warm);
    padding: 0 12px 16px;
    gap: 10px;
    /* Mobile sheet is opaque and covers the FAB/legend; trap taps so gaps
       between cards don't fall through to the filter FAB underneath. */
    pointer-events: auto;
  }

  .detail-panel.open {
    transform: translateY(0);
  }

  .drag-handle {
    display: flex;
    justify-content: center;
    padding: 10px 0 4px;
    cursor: grab;
    touch-action: none;
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--color-surface-warm);
  }

  .drag-handle-bar {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--color-text-muted);
  }

  .detail-photo-wrap {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .detail-card { border-radius: var(--radius-md); }
  .detail-card--hero .detail-photo-wrap { aspect-ratio: 16 / 10; }

  /* Legend compact */
  .legend {
    bottom: 72px;
    left: 8px;
    right: auto;
    padding: 8px 12px;
  }

  /* Language bar compact */
  .lang-bar {
    top: 16px;
    right: 16px;
  }

  .lang-btn {
    padding: 4px 6px;
    font-size: 11px;
    min-width: 28px;
  }

  .filter-fab {
    top: auto;
    bottom: 16px;
    left: 16px;
  }

  /* Map controls */
  .map-controls {
    bottom: 80px;
    right: 12px;
  }

  /* Tap target audit */
  .gallery-btn {
    width: 44px;
    height: 44px;
  }

  .detail-close,
  .detail-fav-btn {
    width: 44px;
    height: 44px;
  }

  .poi-marker {
    width: 40px;
    height: 40px;
  }
  .poi-marker-emoji { font-size: 21px; }

  /* Lightbox arrows */
  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
  }

  /* Compare tray */
  .compare-tray {
    padding: 10px 12px;
    gap: 8px;
    width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  /* Compare overlay columns scroll */
  .compare-col {
    min-width: 260px;
  }
}

@media (max-width: 400px) {
  .lang-bar {
    padding: 2px;
    gap: 1px;
  }
  .lang-btn {
    padding: 3px 5px;
    font-size: 10px;
    min-width: 24px;
  }
}

/* ── 360° Sphere Viewer ────────────────────────────────────────────────── */

.sphere-viewer {
  position: absolute;
  inset: 0;
  background: #000;
  z-index: 3;
}

.detail-photo-wrap.sphere-mode {
  min-height: 320px;
}

.detail-photo-wrap.sphere-mode .detail-photo,
.detail-photo-wrap.sphere-mode .detail-no-image,
.detail-photo-wrap.sphere-mode .detail-photo-overlay,
.detail-photo-wrap.sphere-mode .detail-photo-title,
.detail-photo-wrap.sphere-mode .detail-tier-overlay,
.detail-photo-wrap.sphere-mode .detail-gallery-nav {
  display: none !important;
}

.sphere-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: none;
  border-radius: var(--radius-full, 9999px);
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background 0.15s, transform 0.15s;
}

.sphere-badge:hover {
  background: rgba(0, 0, 0, 0.82);
  transform: translateY(-1px);
}

.sphere-badge:active {
  transform: translateY(0);
}

.sphere-badge.active {
  background: var(--color-primary, #37a021);
}

.sphere-badge svg {
  width: 16px;
  height: 16px;
}

.sphere-badge-label {
  line-height: 1;
}

.sphere-selector {
  /* Sits just above the bottom-left 360° badge */
  position: absolute;
  left: 12px;
  bottom: 52px;
  z-index: 5;
  display: flex;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-full, 9999px);
}

.sphere-pill {
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: var(--radius-full, 9999px);
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.sphere-pill:hover {
  background: rgba(255, 255, 255, 0.3);
}

.sphere-pill.active {
  background: #fff;
  color: var(--color-text, #1f1f1f);
}

/* ── Photo counter + thumbnail strip + skeleton loader ─────────────────── */

.detail-photo-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: var(--radius-full, 9999px);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  pointer-events: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* When the 360° badge is visible, shift the counter down so they don't overlap */
.detail-photo-wrap .sphere-badge:not([hidden]) ~ .detail-photo-counter {
  top: 52px;
}

.detail-photo-wrap.sphere-mode .detail-photo-counter { display: none; }

.detail-thumb-strip {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  background: var(--color-surface-solid);
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  flex-shrink: 0;
}

.detail-thumb-strip[hidden],
.sphere-selector[hidden] { display: none !important; }

.detail-thumb-strip::-webkit-scrollbar { height: 4px; }
.detail-thumb-strip::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2); border-radius: 2px; }

.detail-thumb {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: var(--radius-sm, 8px);
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
  position: relative;
}

.detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: calc(var(--radius-sm, 8px) - 2px);
}

.detail-thumb:hover { transform: translateY(-1px); }

.detail-thumb.active {
  border-color: var(--color-primary, #37a021);
  box-shadow: 0 2px 6px rgba(55, 160, 33, 0.25);
}

/* Skeleton loading for hero photo + lightbox */
.detail-photo.loading,
.lightbox-img.loading {
  animation: photo-skeleton 1.2s ease-in-out infinite;
}

@keyframes photo-skeleton {
  0%   { background-color: #e8e8e8; }
  50%  { background-color: #f1f1f1; }
  100% { background-color: #e8e8e8; }
}

/* ── POI mode: hide pitch-specific sections in the shared detail panel ── */

.detail-panel[data-entity-type="poi"] #detail-grid,
.detail-panel[data-entity-type="poi"] .detail-card--amenities,
.detail-panel[data-entity-type="poi"] #btn-compare,
.detail-panel[data-entity-type="poi"] #btn-favorite,
.detail-panel[data-entity-type="poi"] .sphere-badge {
  display: none !important;
}

/* Tier pill reused as a category badge in POI mode — emoji + label, looser type */
.detail-panel[data-entity-type="poi"] .detail-tier-pill {
  padding: 5px 12px;
  font-size: 11.5px;
  text-transform: none;
  letter-spacing: 0.2px;
}

/* In POI mode the stats card may have only the distance + description — keep it compact */
.detail-panel[data-entity-type="poi"] .detail-card--stats {
  padding: 14px 18px;
}
.detail-panel[data-entity-type="poi"] .detail-card--stats:has(.detail-distance:empty):has(.detail-description:empty) {
  display: none;
}

/* ── POI category chips (public filter panel) ──────────────────────────── */

.poi-chips-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.poi-chips-quick {
  display: flex;
  gap: 6px;
}

.btn-chip-quick {
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-full, 9999px);
  background: transparent;
  color: var(--color-text-secondary, #5f6368);
  cursor: pointer;
  font-family: var(--font-ui);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-chip-quick:hover {
  background: rgba(55, 160, 33, 0.08);
  border-color: var(--color-primary, #37a021);
  color: var(--color-primary, #37a021);
}

.poi-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.poi-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 5px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-full, 9999px);
  background: var(--color-surface, #fff);
  color: var(--color-text-secondary, #5f6368);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s, transform 0.15s;
  opacity: 0.55;
  user-select: none;
}

.poi-chip:hover { transform: translateY(-1px); }

.poi-chip.active {
  opacity: 1;
  color: var(--color-text, #1f1f1f);
  border-color: rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* Chip mark — echo the map marker: white disc with colored ring */
.poi-chip-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1.5px solid var(--pm-color, var(--color-primary));
  box-shadow: 0 1px 3px rgba(77, 56, 30, 0.12);
}

.poi-chip-letter,
.poi-chip-emoji {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.poi-chip-emoji {
  color: inherit;
  filter: drop-shadow(0 1px 1px rgba(77, 56, 30, 0.15));
}

.poi-chip-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  padding: 0 6px;
  height: 18px;
  border-radius: var(--radius-full, 9999px);
  background: rgba(0, 0, 0, 0.06);
  color: var(--color-text-secondary, #5f6368);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.poi-chip.active .poi-chip-count {
  background: rgba(55, 160, 33, 0.14);
  color: var(--color-primary-dark, #216114);
}

.poi-chips-empty {
  font-size: 12px;
  color: var(--color-text-muted, #9aa0a6);
  padding: 6px 0;
}

/* Lightbox counter */
.lightbox-counter {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 14px;
  border-radius: var(--radius-full, 9999px);
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  z-index: 2;
  pointer-events: none;
}
