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

/* Android Chrome fix: overflow must be on html + body */
html {
  height: 100%;
  overflow: hidden;
}

:root {
  --ivory: #FAF8F5;
  --ink: #0F1A14;
  --emerald: #0D5E4A;
  --emerald-mid: #1B7A65;
  --emerald-light: #2A9D8F;
  --gold: #C5A44E;
  --gold-bright: #D4AF57;
  --gold-soft: #F2E4C0;
  --slate: #6B7280;
  --cloud: #F0EFEB;
  --dark-bg: #0D1F1A;
  --dark-surface: #152B23;
  --white: #FFFFFF;
  --danger: #DC2626;
  --success: #059669;
}

body {
  font-family: 'DM Sans', 'Plus Jakarta Sans', sans-serif;
  background: var(--ivory);
  color: var(--ink);
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height: fixes mobile browser chrome cutting off map */
  overflow: hidden;
}

/* ===== TOP NAV ===== */
.top-nav {
  height: 60px;
  background: var(--dark-bg);
  border-bottom: 1px solid rgba(197, 164, 78, 0.15);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 1000;
  position: relative;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.nav-brand img {
  height: 36px;
  width: auto;
  object-fit: contain;
}

.nav-brand-text {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
}

.nav-brand-text .throne { color: #FAF8F5; }
.nav-brand-text .hunt { color: var(--gold); }

.nav-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: 0.4rem 0.8rem;
  gap: 0.5rem;
  max-width: 280px;
  transition: all 0.2s;
}

.nav-search:focus-within {
  background: rgba(255,255,255,0.1);
  border-color: rgba(197, 164, 78, 0.4);
}

.nav-search input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.85rem;
  color: #FAF8F5;
  outline: none;
  width: 180px;
}

.nav-search input::placeholder { color: rgba(250,248,245,0.45); }

.nav-search svg { flex-shrink: 0; color: rgba(250,248,245,0.5); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  border-radius: 100px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--gold);
  color: var(--dark-bg);
}
.btn-primary:hover { background: var(--gold-bright); }

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #FAF8F5;
  border: 1px solid rgba(255,255,255,0.12);
}
.btn-secondary:hover { background: rgba(255,255,255,0.13); }

.btn-icon {
  background: rgba(255,255,255,0.07);
  color: rgba(250,248,245,0.85);
  border: 1px solid rgba(255,255,255,0.1);
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}
.btn-icon:hover { background: rgba(255,255,255,0.13); color: #FAF8F5; }

.btn-icon.active {
  background: var(--gold);
  color: var(--dark-bg);
  border-color: var(--gold);
}

/* ===== MAIN LAYOUT ===== */
.app-layout {
  display: flex;
  height: calc(100vh - 60px);
  height: calc(100dvh - 60px); /* Dynamic viewport height fallback */
  position: relative;
  overflow: hidden; /* clip off-screen panels (sidebar, detail-panel) */
}

/* ===== MAP ===== */
#map {
  flex: 1;
  height: 100%;
  z-index: 1;
}

/* Custom Leaflet markers — standard */
/* ===== MARKER CLUSTERING ===== */
.throne-cluster {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25), 0 0 0 3px rgba(255,255,255,0.6);
  transition: transform 0.15s ease;
}
.throne-cluster:hover { transform: scale(1.12); }

.throne-cluster-small {
  background: var(--emerald);
  width: 36px;
  height: 36px;
  font-size: 12px;
}
.throne-cluster-medium {
  background: var(--emerald-mid);
  width: 44px;
  height: 44px;
  font-size: 13px;
}
.throne-cluster-large {
  background: var(--gold);
  color: var(--ink);
  width: 52px;
  height: 52px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 2px 16px rgba(197,164,78,0.5), 0 0 0 3px rgba(255,255,255,0.7);
}

/* Override default markercluster styles */
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: none !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: none !important; }
.leaflet-marker-icon.marker-cluster { background: none !important; border: none !important; }

.toilet-marker {
  background: var(--emerald);
  border: 2.5px solid var(--white);
  border-radius: 50%;
  width: 32px !important;
  height: 32px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 10px rgba(13,94,74,0.4);
  cursor: pointer;
  transition: transform 0.15s;
  position: relative;
}
.toilet-marker:hover { transform: scale(1.2); }

.toilet-marker.paid {
  background: var(--gold);
  box-shadow: 0 2px 10px rgba(197,164,78,0.4);
}

.toilet-marker.has-photo {
  border-color: var(--gold-soft);
}

/* Pro venue — golden crown pin */
.toilet-marker.pro {
  background: var(--dark-bg);
  border: 2.5px solid var(--gold);
  border-radius: 50%;
  width: 36px !important;
  height: 36px !important;
  font-size: 16px;
  box-shadow: 0 0 0 3px rgba(197,164,78,0.25), 0 3px 14px rgba(197,164,78,0.45);
  animation: pro-pulse 2.5s ease-in-out infinite;
}
@keyframes pro-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(197,164,78,0.25), 0 3px 14px rgba(197,164,78,0.45); }
  50% { box-shadow: 0 0 0 6px rgba(197,164,78,0.15), 0 3px 18px rgba(197,164,78,0.55); }
}

/* Validation badge */
.toilet-marker.validated {
  border-color: #10B981;
  box-shadow: 0 0 0 2px rgba(16,185,129,0.35), 0 2px 8px rgba(0,0,0,0.2);
}

/* Unverified imported toilet — orange ring + dot */
.toilet-marker.unverified {
  border-color: #F59E0B;
  box-shadow: 0 0 0 2px rgba(245,158,11,0.35), 0 2px 8px rgba(0,0,0,0.15);
}
.unverified-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 11px;
  height: 11px;
  background: #F59E0B;
  border-radius: 50%;
  border: 1.5px solid white;
  font-size: 7px;
  font-weight: 900;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}

/* Community verified badge: toilet with >= 3 "J'y étais" validations */
.toilet-marker.verified-community {
  border-color: #059669;
  box-shadow: 0 0 0 2px rgba(5,150,105,0.35), 0 2px 8px rgba(0,0,0,0.2);
}
.toilet-marker.verified-community::after {
  /* Subtle green ring pulse effect */
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid rgba(5,150,105,0.25);
  animation: verified-pulse 2.5s ease-in-out infinite;
}
@keyframes verified-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 0.2; transform: scale(1.1); }
}
.verified-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 13px;
  height: 13px;
  background: #059669;
  border-radius: 50%;
  border: 1.5px solid white;
  font-size: 7px;
  font-weight: 900;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  pointer-events: none;
}

/* Leaflet popup override */
.leaflet-popup-content-wrapper {
  border-radius: 16px !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,0.14) !important;
  border: 1px solid rgba(197,164,78,0.12) !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  min-width: 240px;
  max-width: 300px;
}

.popup-card { padding: 1rem; }

.popup-card h3 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.popup-address {
  font-size: 0.8rem;
  color: var(--slate);
  margin-bottom: 0.5rem;
}

.popup-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.popup-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 100px;
  background: var(--cloud);
  color: var(--ink);
  font-weight: 500;
}

.popup-tag.free { background: rgba(13,94,74,0.1); color: var(--emerald); }
.popup-tag.paid { background: var(--gold-soft); color: #7A5C14; }

.popup-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.stars { color: var(--gold); letter-spacing: 1px; }

.popup-photo {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.popup-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.popup-btn {
  flex: 1;
  padding: 0.4rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.08);
  background: var(--cloud);
  color: var(--ink);
  text-align: center;
  transition: all 0.2s;
}
.popup-btn:hover { background: var(--ivory); }
.popup-btn.primary {
  background: var(--emerald);
  color: var(--white);
  border-color: var(--emerald);
}
.popup-btn.primary:hover { background: var(--emerald-mid); }

/* ===== SIDEBAR (LIST VIEW) ===== */
.sidebar {
  width: 380px;
  height: 100%;
  background: var(--white);
  border-left: 1px solid rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  z-index: 500;
  overflow: hidden;
  box-shadow: -4px 0 20px rgba(0,0,0,0.06);
}

.sidebar.hidden {
  transform: translateX(100%);
  position: absolute;
  right: 0;
}

.sidebar-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ivory);
}

.sidebar-header h2 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
}

.sidebar-count {
  font-size: 0.78rem;
  color: var(--slate);
  background: var(--cloud);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
}

.sidebar-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.list-card {
  padding: 0.75rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border: 1px solid transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: rgba(13,94,74,0.1);
}

.list-card:hover {
  background: var(--cloud);
  border-color: rgba(197,164,78,0.15);
}

/* Sponsored (Pro) toilet card — gold highlight */
.list-card-sponsored {
  background: linear-gradient(135deg, rgba(255,251,240,0.8) 0%, rgba(255,248,225,0.4) 100%);
  border-color: rgba(197,164,78,0.3);
}
.list-card-sponsored:hover {
  background: rgba(255,251,240,0.95);
  border-color: rgba(197,164,78,0.55);
}

.list-card-photo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--cloud);
}

.list-card-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--cloud);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

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

.list-card-info h4 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}

.list-card-info .address {
  font-size: 0.78rem;
  color: var(--slate);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.list-card-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.list-tag {
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 100px;
  font-weight: 500;
}
.list-tag.free { background: rgba(13,94,74,0.1); color: var(--emerald); }
.list-tag.paid { background: var(--gold-soft); color: #7A5C14; }

.list-rating {
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 600;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,31,26,0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: 20px;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
  overscroll-behavior: contain; /* prevent underlying map from catching scroll */
  padding: 1.5rem;
  transform: translateY(20px);
  transition: transform 0.25s;
  border: 1px solid rgba(197,164,78,0.1);
  box-shadow: 0 20px 60px rgba(13,31,26,0.2);
}
.modal-overlay.active .modal { transform: translateY(0); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-header h2 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--cloud);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--slate);
  transition: all 0.2s;
}
.modal-close:hover { background: var(--ivory); color: var(--ink); }

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--ink);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--ivory);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--emerald);
  background: var(--white);
}

.form-group textarea { resize: vertical; min-height: 80px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.form-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}

.toggle-switch {
  width: 44px;
  height: 24px;
  border-radius: 100px;
  background: #D1D5DB;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-switch.active { background: var(--emerald); }

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  top: 3px;
  left: 3px;
  transition: left 0.2s;
}
.toggle-switch.active::after { left: 23px; }

.star-input {
  display: flex;
  gap: 0.25rem;
}

.star-input button {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #D1D5DB;
  transition: color 0.15s;
  padding: 0;
  line-height: 1;
}
.star-input button.active { color: var(--gold); }
.star-input button:hover { color: var(--gold); }

.photo-upload-area {
  border: 2px dashed rgba(0,0,0,0.1);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.photo-upload-area:hover {
  border-color: var(--emerald);
  background: rgba(13, 94, 74, 0.03);
}

.photo-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-upload-icon { font-size: 2rem; margin-bottom: 0.5rem; }

.photo-upload-text {
  font-size: 0.85rem;
  color: var(--slate);
}

.photo-preview {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.photo-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--cloud);
}

.form-submit {
  width: 100%;
  padding: 0.8rem;
  border-radius: 12px;
  background: var(--emerald);
  color: var(--white);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
}
.form-submit:hover { background: var(--emerald-mid); }
.form-submit:disabled {
  background: #D1D5DB;
  cursor: not-allowed;
}

/* Detail panel */
.detail-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 400px;
  height: 100%;
  background: var(--white);
  z-index: 600;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  border-left: 1px solid rgba(0,0,0,0.07);
  box-shadow: -4px 0 20px rgba(0,0,0,0.08);
}
.detail-panel.active { transform: translateX(0); }

.detail-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ivory);
}

.detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.detail-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.detail-photos img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
}

.detail-no-photo {
  background: var(--cloud);
  border-radius: 10px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  grid-column: 1 / -1;
}

.detail-info { margin-bottom: 1rem; }

.detail-info h3 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
  color: var(--ink);
}

.detail-address {
  font-size: 0.9rem;
  color: var(--slate);
  margin-bottom: 0.75rem;
}

.detail-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.detail-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 100px;
  font-weight: 500;
  background: var(--cloud);
}
.detail-tag.free { background: rgba(13,94,74,0.1); color: var(--emerald); }
.detail-tag.paid { background: var(--gold-soft); color: #7A5C14; }
.detail-tag.accessible { background: #DBEAFE; color: #1E40AF; }

.detail-section {
  margin-bottom: 1.25rem;
}

.detail-section h4 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
}

.review-card {
  background: var(--ivory);
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(197,164,78,0.1);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.3rem;
}

.review-author {
  font-weight: 600;
  font-size: 0.85rem;
}

.review-date {
  font-size: 0.75rem;
  color: var(--slate);
}

.review-stars {
  color: var(--gold);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.review-comment {
  font-size: 0.85rem;
  color: var(--slate);
  line-height: 1.5;
}

/* ===== LOCATE ME BUTTON ===== */
.locate-btn {
  position: fixed;
  bottom: 5.5rem;
  left: 1rem;
  z-index: 750;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--white, #fff);
  border: 1px solid rgba(0,0,0,0.09);
  box-shadow: 0 3px 12px rgba(0,0,0,0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--emerald);
}
.locate-btn:hover { background: var(--ivory); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 3000;
  opacity: 0;
  transition: all 0.3s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}
.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.toast.success { background: var(--emerald); }
.toast.error { background: var(--danger); }
.toast.warning { background: #D97706; }
.toast.milestone {
  background: linear-gradient(135deg, #7C3AED, #C5A44E);
  font-size: 1rem;
  padding: 1rem 1.5rem;
  max-width: 320px;
  text-align: center;
  line-height: 1.4;
}
.toast.streak-danger {
  background: linear-gradient(135deg, #DC2626, #EA580C);
  font-size: 0.9rem;
  max-width: 300px;
  text-align: center;
  line-height: 1.4;
}

/* Loading state */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(250, 248, 245, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--cloud);
  border-top-color: var(--emerald);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Empty state */
.empty-state {
  text-align: center;
  padding: 2rem;
  color: var(--slate);
}

.empty-state .icon { font-size: 3rem; margin-bottom: 0.75rem; }

.empty-state h3 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

.empty-state p {
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ===== SEARCH DROPDOWN ===== */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid rgba(197,164,78,0.15);
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  margin-top: 4px;
  z-index: 2000;
  overflow: hidden;
}

.search-result {
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  transition: background 0.15s;
}
.search-result:hover { background: var(--cloud); }
.search-result:last-child { border-bottom: none; }

/* ===== COUNTRY QUICK NAV ===== */
.country-nav {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 0.35rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  border: 1px solid rgba(197,164,78,0.12);
  max-width: 92vw;
}

.nav-continent-row, .nav-country-row {
  display: flex;
  gap: 0.2rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-continent-row::-webkit-scrollbar, .nav-country-row::-webkit-scrollbar { height: 0; }

.nav-country-row {
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 0.25rem;
}

.country-nav::-webkit-scrollbar { height: 0; }

.country-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.6rem;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--slate);
  font-family: inherit;
  white-space: nowrap;
  transition: all 0.15s;
}
.country-chip:hover { background: var(--cloud); color: var(--ink); }
.country-chip.active { background: var(--emerald); color: var(--white); }
.country-chip.continent-chip { font-weight: 600; font-size: 0.75rem; }
.country-chip.gps-chip { font-weight: 600; font-size: 0.75rem; border: 1px solid var(--emerald); color: var(--emerald); }
.country-chip.gps-chip:hover { background: var(--emerald); color: var(--white); }
.country-chip.gps-chip:disabled { opacity: 0.6; cursor: not-allowed; }
.country-chip .chip-flag { font-size: 0.9rem; }
.country-chip .chip-count {
  font-size: 0.6rem;
  opacity: 0.6;
  font-weight: 400;
}

/* ===== GLOBAL STATS BADGE ===== */
.global-stats-badge {
  position: fixed;
  bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 199;
  background: rgba(13,31,26,0.88);
  backdrop-filter: blur(8px);
  border-radius: 100px;
  padding: 0.45rem 1.1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--gold);
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
  border: 1px solid rgba(197,164,78,0.2);
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 2rem);
}

/* ===== USER MENU ===== */
.user-menu {
  position: relative;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid rgba(197,164,78,0.12);
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(13,31,26,0.12);
  min-width: 220px;
  z-index: 2000;
  display: none;
  overflow: hidden;
}

.user-dropdown.show { display: block; }

.user-info {
  padding: 0.75rem 1rem;
  background: var(--ivory);
}
.user-info .user-name {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
  color: var(--ink);
}
.user-info .user-email {
  font-size: 0.78rem;
  color: var(--slate);
}
.user-info .user-tier {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  font-weight: 600;
  margin-top: 0.35rem;
}
.user-tier.premium { background: rgba(13,94,74,0.1); color: var(--emerald); }
.user-tier.free { background: var(--cloud); color: var(--slate); }
.user-tier.trial { background: var(--gold-soft); color: #7A5C14; }

.dropdown-divider {
  height: 1px;
  background: rgba(0,0,0,0.05);
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.6rem 1rem;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}
.dropdown-item:hover { background: var(--cloud); }

/* Premium upgrade CTA in dropdown */
.dropdown-item.upgrade-cta {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e !important;
  font-weight: 600;
  border-top: 1px solid rgba(180,130,30,0.18);
  border-bottom: 1px solid rgba(180,130,30,0.18);
  margin: 4px 0;
}
.dropdown-item.upgrade-cta:hover {
  background: linear-gradient(135deg, #fde68a, #fcd34d);
}

/* ===== LOGIN WALL ===== */
.login-wall {
  position: fixed;
  inset: 0;
  z-index: 5000;
  background: rgba(250, 248, 245, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 2rem;
}

.login-wall .wall-icon { font-size: 4rem; margin-bottom: 1.5rem; }

.login-wall h2 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-weight: 800;
  font-size: 2rem;
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.login-wall p {
  font-size: 1.05rem;
  color: var(--slate);
  margin-bottom: 2rem;
  max-width: 400px;
}

.login-wall .wall-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.login-wall .wall-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  border-radius: 100px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
}

.wall-btn-primary {
  background: var(--gold);
  color: var(--dark-bg);
}
.wall-btn-primary:hover { background: var(--gold-bright); }

.wall-btn-secondary {
  background: var(--cloud);
  color: var(--ink);
  border: 1px solid rgba(0,0,0,0.08);
}
.wall-btn-secondary:hover { background: var(--ivory); }

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  /* Sidebar: full-screen side panel on mobile (not a flex sibling) */
  .sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 100vw;
    height: 100%;
    z-index: 800; /* above FAB (700) when open */
    border-left: none;
    border-top: none;
    border-radius: 0;
  }

  /* Hidden: slide to the right (fully off-screen) */
  .sidebar.hidden {
    transform: translateX(100%);
    pointer-events: none;
  }

  .detail-panel {
    width: 100%;
    border-radius: 20px 20px 0 0;
    border-left: none;
    border-top: 1px solid rgba(0,0,0,0.08);
    height: 70%;
    top: auto;
    bottom: 0;
  }

  .nav-search input { width: 120px; }

  .modal {
    width: 95%;
    max-height: 85vh;
    margin-bottom: env(safe-area-inset-bottom);
  }

  .btn span.btn-text { display: none; }
}

/* ===== LANGUAGE PICKER ===== */
.lang-picker {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  padding: 3px;
}

.lang-btn {
  background: transparent;
  color: rgba(250,248,245,0.55);
  border: none;
  padding: 3px 8px;
  border-radius: 100px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.15s;
}

.lang-btn:hover {
  color: rgba(250,248,245,0.9);
  background: rgba(255,255,255,0.08);
}

.lang-btn.active {
  background: var(--gold);
  color: var(--dark-bg);
}

/* ===== MOBILE FAB (Add Toilet) ===== */
.fab-add {
  display: none; /* hidden on desktop */
  position: fixed; /* fixed, not absolute — absolute gets clipped by .app-layout overflow:hidden */
  bottom: 90px;
  right: 16px;
  z-index: 700; /* above sidebar (500) and detail panel (600) */
  width: auto;
  height: 48px;
  padding: 0 18px;
  gap: 6px;
  border-radius: 100px;
  background: var(--gold);
  color: var(--dark-bg);
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 16px rgba(197,164,78,0.45), 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.15s, box-shadow 0.15s;
}

.fab-add:hover,
.fab-add:active {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(197,164,78,0.55), 0 3px 10px rgba(0,0,0,0.25);
}

/* ===== CAMERA FAB: Quick-add Throne ===== */
.fab-camera {
  display: none; /* shown via JS for logged-in users */
  position: fixed; /* MUST be fixed (same coord system as #wcFabBtn loupe) — absolute breaks on Android Chrome dynamic address bar */
  bottom: 90px; /* desktop default: below the loupe (152px on map) */
  right: 16px;
  z-index: 800;
  width: 56px;
  height: 56px;
  padding: 0;
  gap: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #0D5E4A 0%, #1a7a63 100%);
  color: #fff;
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  font-family: 'DM Sans', 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 20px rgba(13,94,74,0.5), 0 2px 8px rgba(0,0,0,0.25);
  transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.18s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
  animation: fabcam-pop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}
@keyframes fabcam-pop {
  0%   { transform: scale(0); opacity: 0; }
  70%  { transform: scale(1.08); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.fab-camera-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.fab-camera:hover,
.fab-camera:active {
  transform: scale(1.05);
  box-shadow: 0 6px 24px rgba(13,94,74,0.65), 0 3px 10px rgba(0,0,0,0.3);
}

/* ===== DROPDOWN LANGUAGE SWITCHER (mobile only) ===== */
.dropdown-lang-divider,
.dropdown-lang-row {
  display: none; /* hidden on desktop — lang-picker in nav handles it */
}

.dropdown-lang-row {
  padding: 8px 12px;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
}

.dropdown-lang-btn {
  background: rgba(0,0,0,0.06);
  color: var(--ink);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 100px;
  padding: 3px 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: all 0.15s;
}

.dropdown-lang-btn:hover,
.dropdown-lang-btn.active {
  background: var(--gold);
  color: var(--dark-bg);
  border-color: var(--gold);
}

/* ===== MOBILE OVERRIDES ===== */
@media (max-width: 768px) {
  /* Show FAB, hide nav add button */
  .fab-add { display: flex; }
  .nav-add-btn { display: none !important; }

  /* Camera FAB: stacked above wcFabBtn (152px + 56px height + 14px gap = 222px)
     Stack order from bottom: gold +WC (90px) → wcFabBtn search (152px) → camera (222px) */
  .fab-camera { bottom: 222px; }

  /* Move lang-picker into user dropdown on mobile to free nav space */
  .lang-picker { display: none !important; }

  /* Show lang switcher inside dropdown on mobile */
  .dropdown-lang-divider { display: block; }
  .dropdown-lang-row { display: flex; }

  /* Shrink brand text on very small screens */
  .nav-brand-text { font-size: 1rem; }
  .nav-brand img { height: 28px; }

  /* Truncate search on mobile */
  .nav-search { max-width: 110px; min-width: 0; }
  .nav-search input { width: 70px; }
}

@media (max-width: 380px) {
  /* Ultra-small (iPhone SE): hide search bar entirely */
  .nav-search { display: none; }
}

/* ===== LEAFLET MOBILE POSITIONING ===== */
/* Push zoom controls (bottom-left) above FAB + safe area on iOS */
/* Attribution (bottom-right) stays at default bottom position */
@media (max-width: 768px) {
  .leaflet-bottom.leaflet-left {
    bottom: calc(150px + env(safe-area-inset-bottom, 0px));
  }
  .leaflet-bottom.leaflet-right {
    bottom: 0;
  }
}

/* ===== NOMINATIM AUTOCOMPLETE DROPDOWN (Add WC form) ===== */
.form-name-wrapper {
  position: relative;
}

.name-autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid rgba(197,164,78,0.2);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 3px;
}

.name-autocomplete-result {
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  color: var(--ink);
  line-height: 1.4;
  transition: background 0.15s;
}
.name-autocomplete-result:hover { background: var(--cloud); }
.name-autocomplete-result:last-child { border-bottom: none; }
.name-autocomplete-result strong { font-weight: 600; }

/* ===== MANUAL MODE TOGGLE ===== */
.manual-mode-toggle {
  margin-bottom: 1rem;
  margin-top: -0.25rem;
}
.manual-mode-toggle label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--slate);
  cursor: pointer;
  user-select: none;
}
.manual-mode-toggle input[type="checkbox"] {
  width: auto;
  cursor: pointer;
  accent-color: var(--emerald);
  margin: 0;
}

/* ===== SEARCH RESULT BADGE ===== */
.search-result-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
  padding: 0.4rem 0.7rem;
  background: rgba(13,94,74,0.07);
  border: 1px solid rgba(13,94,74,0.15);
  border-radius: 8px;
  font-size: 0.78rem;
  color: var(--emerald);
  line-height: 1.4;
}
.search-result-badge svg {
  flex-shrink: 0;
  color: var(--emerald);
}

/* ===== HOURS "JE NE SAIS PAS" CHECKBOX ===== */
.hours-unknown-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.hours-unknown-wrapper > label:first-child {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin-bottom: 0;
}

.hours-unknown-check {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--slate);
  cursor: pointer;
  font-weight: 500;
  text-transform: none;
  user-select: none;
}

.hours-unknown-check input[type="checkbox"] {
  width: auto;
  cursor: pointer;
  accent-color: var(--emerald);
  margin: 0;
}

.form-group input:disabled {
  background: var(--cloud);
  color: var(--slate);
  cursor: not-allowed;
  border-color: rgba(0,0,0,0.06);
}

/* ===== NEW ADD-WC FORM SECTIONS ===== */
.add-section {
  border: 1.5px solid var(--cloud);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.65rem;
  transition: border-color 0.2s;
}
.add-section.section-done {
  border-color: rgba(5, 150, 105, 0.3);
  background: rgba(5, 150, 105, 0.02);
}
.add-section-opt {
  border-style: dashed;
  border-color: rgba(0,0,0,0.1);
}
.add-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}
.add-section-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink);
}
.add-step {
  width: 22px;
  height: 22px;
  background: var(--ink);
  color: white;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.add-step-opt { background: var(--slate); }
.add-check {
  font-size: 0.88rem;
  font-weight: 700;
  color: transparent;
  min-width: 1.2rem;
  text-align: right;
  transition: color 0.15s;
}
.add-check.ok { color: var(--success); }

/* ===== LOCATION MODE TABS ===== */
.loc-tabs {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.7rem;
}
.loc-tab {
  flex: 1;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  border: 1.5px solid var(--cloud);
  background: white;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--slate);
}
.loc-tab.active {
  background: var(--emerald);
  color: white;
  border-color: var(--emerald);
  font-weight: 600;
}

/* ===== GPS LOADING SPINNER ===== */
.gps-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--slate);
  padding: 0.4rem 0;
}
.gps-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--cloud);
  border-top-color: var(--emerald);
  border-radius: 50%;
  animation: gpsSpin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes gpsSpin { to { transform: rotate(360deg); } }

/* ===== CONFIRMED LOCATION BADGE ===== */
.confirmed-loc {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  background: rgba(5, 150, 105, 0.07);
  border: 1px solid rgba(5, 150, 105, 0.2);
  color: #065F46;
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  font-size: 0.8rem;
  line-height: 1.45;
  margin-bottom: 0.5rem;
}
.confirmed-loc svg { flex-shrink: 0; margin-top: 1px; }

/* ===== MINI MAP CONTAINER ===== */
.mini-map-container {
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  border: 1px solid var(--cloud);
  min-height: 0;
}

/* ===== ADDRESS SEARCH INPUT IN FORM ===== */
.addr-search-wrap {
  position: relative;
  margin-bottom: 0.5rem;
}
.addr-search-wrap input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--cloud);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
  color: var(--ink);
  background: white;
}
.addr-search-wrap input:focus { border-color: var(--emerald); }
.addr-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--cloud);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 9999;
  overflow: hidden;
  margin-top: 4px;
}
.addr-dropdown-item {
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
  border-bottom: 1px solid var(--cloud);
  transition: background 0.1s;
  line-height: 1.4;
  color: var(--ink);
}
.addr-dropdown-item:hover { background: var(--cloud); }
.addr-dropdown-item:last-child { border-bottom: none; }
.addr-dropdown-item strong { font-weight: 600; }

/* ===== LOCATION ACTION ROW ===== */
.loc-action-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.btn-sm-pad {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}
.add-more-photos-btn {
  margin-top: 0.5rem;
  width: 100%;
  justify-content: center;
}
.btn-text-link {
  background: none;
  border: none;
  color: var(--emerald);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
  padding: 0;
  line-height: 1.4;
}
.btn-text-link:hover { color: var(--emerald-mid); }

/* ===== MANUAL INPUT PANEL ===== */
.manual-panel {
  background: var(--cloud);
  border-radius: 10px;
  padding: 0.75rem;
  margin-top: 0.5rem;
}
.manual-input {
  display: block;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1.5px solid rgba(0,0,0,0.09);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.84rem;
  background: white;
  margin-bottom: 0.5rem;
  outline: none;
  color: var(--ink);
  transition: border-color 0.15s;
}
.manual-input:focus { border-color: var(--emerald); }
.manual-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.manual-row .manual-input { margin-bottom: 0; }

/* ===== EXIF LOCATION PANEL ===== */
.exif-confirmed {
  align-items: flex-start;
}
.exif-confirmed svg { flex-shrink: 0; margin-top: 2px; }

/* ===== MANUAL GPS COORDS WRAP ===== */
.manual-gps-wrap {
  margin-top: 0.6rem;
  padding: 0.6rem 0.75rem;
  background: var(--cloud);
  border-radius: 8px;
  border: 1px dashed rgba(0,0,0,0.1);
}
.manual-gps-wrap .manual-input {
  margin-bottom: 0;
  font-size: 0.82rem;
}
.manual-gps-wrap .hint-text {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--slate);
}

/* ===== FUNNEL STEPS (country → city → street) ===== */
.funnel-step {
  margin-bottom: 0.5rem;
}
.funnel-step-indent {
  padding-left: 0;
}
.funnel-select {
  display: block;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid rgba(0,0,0,0.11);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.86rem;
  background: white;
  color: var(--ink);
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230D5E4A' 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;
}
.funnel-select:focus { border-color: var(--emerald); }
.funnel-breadcrumb {
  margin-bottom: 6px;
}
.funnel-back-btn {
  background: none;
  border: none;
  color: var(--emerald);
  font-size: 0.78rem;
  font-family: inherit;
  cursor: pointer;
  padding: 2px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: 0.8;
}
.funnel-back-btn:hover { opacity: 1; }

/* ===== NO-RESULTS HINT (address search fallback) ===== */
.addr-no-results-hint {
  display: none;
  margin-top: 6px;
  padding: 10px 12px;
  background: rgba(240,239,235,0.9);
  border: 1.5px solid rgba(197,164,78,0.35);
  border-radius: 10px;
  font-size: 0.8rem;
  color: var(--slate);
  text-align: center;
}
.addr-no-results-hint.show { display: block; }
.addr-no-results-hint .addr-no-results-msg {
  margin-bottom: 8px;
  line-height: 1.4;
}
.btn-pin-highlight {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 14px;
  background: var(--emerald);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-pin-highlight:hover { background: var(--emerald-mid); }

/* Pulse highlight when map button gets focus after no-results */
@keyframes pin-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(13,94,74,0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(13,94,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(13,94,74,0); }
}
.pick-on-map-highlighted {
  animation: pin-pulse 1s ease-out 2;
  border-color: var(--emerald) !important;
  color: var(--emerald) !important;
}

/* ===== CUSTOM COUNTRY DROPDOWN ===== */
.country-trigger {
  display: flex;
  align-items: center;
  font-weight: 400;
  color: var(--ink);
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.country-trigger.has-value {
  font-weight: 500;
}
.country-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--cloud);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 99999;
  margin-top: 4px;
  overflow: hidden;
}
/* Mobile bottom-sheet: quasi full-screen like native select */
.country-backdrop {
  display: none;
}
@media (max-width: 640px) {
  .country-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99998;
    -webkit-tap-highlight-color: transparent;
  }
  .country-dropdown-panel {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin-top: 0 !important;
    border-radius: 18px 18px 0 0 !important;
    max-height: 82vh;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 -4px 32px rgba(0,0,0,0.18);
  }
  /* Bottom-sheet drag handle */
  .country-dropdown-panel::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    background: rgba(0,0,0,0.15);
    border-radius: 2px;
    margin: 10px auto 6px;
    flex-shrink: 0;
  }
  .country-search-wrap {
    flex-shrink: 0;
  }
  .country-list {
    max-height: none !important;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
/* ===== NATIVE SELECT FOR MOBILE (touch devices) =====
   Touch devices get a native OS picker — always works, no custom dropdown bugs.
   @media (hover: none) and (pointer: coarse) = pure touch device (phone/tablet).
   Desktop/laptop = @media (hover: hover) OR (pointer: fine) → custom dropdown shown, native hidden.
*/
.country-native-mobile {
  display: none; /* hidden by default (desktop: custom dropdown shows) */
}
@media (hover: none) and (pointer: coarse) {
  /* Touch device: hide custom dropdown, show native select */
  .country-selector-wrap {
    display: none !important;
  }
  .country-native-mobile {
    display: block !important;
  }
}

.country-search-input {
  display: block;
  width: 100%;
  padding: 0.45rem 0.7rem;
  border: 1.5px solid rgba(0,0,0,0.11);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.82rem;
  outline: none;
  color: var(--ink);
  box-sizing: border-box;
}
.country-search-input:focus { border-color: var(--emerald); }
.country-list {
  max-height: 240px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.country-list-group-label {
  padding: 4px 10px 2px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate);
  background: var(--cloud);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.country-list-item {
  padding: 0.48rem 0.85rem;
  font-size: 0.83rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(0,0,0,0.04);
  color: var(--ink);
  transition: background 0.1s;
  display: flex;
  align-items: center;
  gap: 6px;
  /* Mobile: eliminate 300ms tap delay + suppress tap highlight flash */
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.country-list-item:hover { background: var(--cloud); }
.country-list-item:last-child { border-bottom: none; }
.country-list-item.active { background: rgba(16,185,129,0.09); font-weight: 600; }
.addr-input {
  display: block;
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid rgba(0,0,0,0.11);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.86rem;
  background: white;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}
.addr-input:focus { border-color: var(--emerald); }
.funnel-step-indent .addr-search-wrap { position: relative; }

/* ===== HINT TEXT ===== */
.hint-text {
  font-size: 0.75rem;
  color: var(--slate);
  margin-top: 0.4rem;
  line-height: 1.4;
}

/* ===== VALIDATION SUMMARY ===== */
.validation-summary {
  background: #FEF3C7;
  border: 1px solid #F59E0B;
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
  color: #92400E;
  margin-bottom: 0.65rem;
}

/* ===== SUBMIT BUTTON STATE ===== */
.form-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--slate);
}
.form-submit:not(:disabled) {
  background: var(--emerald);
}

/* ===== VENUE TYPE STEP ===== */
.venue-type-header {
  text-align: center;
  margin-bottom: 1rem;
}
.venue-type-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.venue-type-header p {
  font-size: 0.78rem;
  color: var(--slate);
}
.venue-type-options {
  display: flex;
  gap: 12px;
  margin-bottom: 0.5rem;
}
.venue-type-btn {
  flex: 1;
  background: var(--ivory);
  border: 1.5px solid var(--cloud);
  border-radius: 12px;
  padding: 18px 12px;
  cursor: pointer;
  color: var(--ink);
  text-align: center;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}
.venue-type-btn:hover {
  border-color: var(--gold);
  background: rgba(197,164,78,0.06);
  transform: translateY(-1px);
}
.venue-type-btn:active { transform: translateY(0); }
.venue-type-icon { font-size: 2rem; line-height: 1; }
.venue-type-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
}
.venue-type-desc {
  font-size: 0.72rem;
  color: var(--slate);
  line-height: 1.3;
}
.private-blocked {
  margin-top: 12px;
  padding: 20px 16px;
  background: rgba(197,164,78,0.05);
  border: 1px solid rgba(197,164,78,0.2);
  border-radius: 12px;
  text-align: center;
}
.private-blocked-icon { font-size: 2.2rem; margin-bottom: 10px; }
.private-blocked p {
  margin: 6px 0;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.5;
}
.private-blocked a {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}
.private-blocked a:hover { text-decoration: underline; }
.private-blocked .back-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--slate);
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.private-blocked .back-link:hover { color: var(--ink); }

/* ===== NEARBY SEARCH BUTTON ===== */
.nearby-btn {
  position: absolute;
  bottom: 5.5rem;
  right: 1rem;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.8rem;
  background: var(--dark-bg);
  border: 1px solid var(--gold);
  border-radius: 24px;
  cursor: pointer;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: all 0.2s;
}
.nearby-btn:hover { background: var(--dark-surface); box-shadow: 0 4px 16px rgba(0,0,0,0.35); }
.nearby-btn-label { white-space: nowrap; }

/* ===== NEARBY FILTER PANEL ===== */
.nearby-panel {
  position: absolute;
  bottom: 9.5rem;
  right: 1rem;
  z-index: 500;
  background: var(--dark-bg);
  border: 1px solid rgba(197,164,78,0.3);
  border-radius: 16px;
  padding: 1rem;
  width: 260px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  color: var(--ivory);
}
.nearby-panel.hidden { display: none; }
.nearby-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}
.nearby-panel-header h3 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--gold);
}
.nearby-panel-close {
  background: none;
  border: none;
  color: var(--slate);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}
.nearby-panel-close:hover { color: var(--ivory); }
.nearby-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 0.45rem;
}
.nearby-distance-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.85rem;
}
.nearby-opt {
  padding: 0.28rem 0.55rem;
  background: var(--dark-surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  color: var(--ivory);
  font-size: 0.72rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}
.nearby-opt.active, .nearby-opt:hover {
  background: var(--emerald);
  border-color: var(--emerald);
  color: white;
}
.nearby-stars-row {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.nearby-star-btn {
  padding: 0.28rem 0.45rem;
  background: var(--dark-surface);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--gold-bright);
  font-size: 0.65rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: -0.5px;
}
.nearby-star-btn.active, .nearby-star-btn:hover {
  background: rgba(197,164,78,0.2);
  border-color: var(--gold);
}
.nearby-search-btn {
  width: 100%;
  padding: 0.6rem;
  background: var(--emerald);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background 0.2s;
}
.nearby-search-btn:hover { background: var(--emerald-mid); }
.nearby-search-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ===== NEARBY HIGHLIGHT MARKERS ===== */
.toilet-marker.nearby-highlight {
  box-shadow: 0 0 0 3px var(--gold), 0 0 0 5px rgba(197,164,78,0.3);
  border-radius: 50%;
  transform: scale(1.15);
}

/* ===== NEARBY RESULTS SIDEBAR HEADER ===== */
.nearby-results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.7rem;
  background: rgba(13,94,74,0.12);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  color: var(--ink);
}
.nearby-clear-btn {
  background: none;
  border: 1px solid rgba(107,114,128,0.35);
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 0.68rem;
  cursor: pointer;
  color: var(--slate);
  font-family: inherit;
}
.nearby-clear-btn:hover { border-color: var(--danger); color: var(--danger); }

/* ===== PREMIUM TEASER MODAL ===== */
.nearby-premium-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.62);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nearby-premium-overlay.hidden { display: none; }
.nearby-premium-modal {
  background: var(--dark-bg);
  border: 1px solid rgba(197,164,78,0.3);
  border-radius: 20px;
  padding: 2rem 1.75rem;
  max-width: 320px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.nearby-premium-lock { font-size: 2.5rem; margin-bottom: 0.75rem; }
.nearby-premium-modal h3 {
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.nearby-premium-modal p {
  color: var(--slate);
  font-size: 0.875rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}
.nearby-premium-cta {
  display: block;
  background: var(--gold);
  color: var(--dark-bg);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  transition: background 0.2s;
}
.nearby-premium-cta:hover { background: var(--gold-bright); }
.nearby-premium-dismiss {
  background: none;
  border: none;
  color: var(--slate);
  font-size: 0.8rem;
  cursor: pointer;
  font-family: inherit;
  padding: 0.3rem 0.5rem;
}
.nearby-premium-dismiss:hover { color: var(--ivory); }

/* ===== MOBILE OVERRIDES: NEARBY ===== */
@media (max-width: 768px) {
  .nearby-btn-label { display: none; }
  .nearby-btn { padding: 0.5rem; width: 46px; justify-content: center; border-radius: 50%; }
  .nearby-panel {
    bottom: 9.5rem;
    right: 0.75rem;
    width: calc(100vw - 1.5rem);
    max-width: 320px;
  }
}

/* ===== MAP PICKER PIN ICON ===== */
/* Override default leaflet-div-icon white background/border */
.map-picker-pin {
  background: none !important;
  border: none !important;
}

/* ===== USER AVATAR BUTTON ===== */
.user-avatar-btn {
  padding: 0 !important;
  width: 34px !important;
  height: 34px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.user-avatar-btn #userMenuAvatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* ===== OFFLINE MODE ===== */

/* Offline zones modal */
.offline-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 31, 26, 0.7);
  z-index: 3000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.offline-modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.offline-modal {
  background: #FAF8F5;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 -4px 30px rgba(0,0,0,0.3);
}
.offline-modal-overlay.open .offline-modal {
  transform: translateY(0);
}
.offline-modal-header {
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid #e8e6e0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}
.offline-modal-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.offline-modal-title {
  flex: 1;
}
.offline-modal-title h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  color: #0F1A14;
  margin-bottom: 0.15rem;
}
.offline-modal-title p {
  font-size: 0.78rem;
  color: #6B7280;
}
.offline-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6B7280;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.offline-modal-close:hover { background: #f0efeb; }

.offline-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  -webkit-overflow-scrolling: touch;
}

/* Search section */
.offline-search-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.offline-search-input {
  flex: 1;
  border: 1.5px solid #e8e6e0;
  border-radius: 10px;
  padding: 0.6rem 0.85rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: #0F1A14;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
}
.offline-search-input:focus { border-color: #0D5E4A; }
.offline-search-btn {
  background: #0D5E4A;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.offline-search-btn:hover { background: #1B7A65; }
.offline-search-btn:disabled { background: #ccc; cursor: not-allowed; }

/* Geocode results */
.offline-geo-results {
  margin-bottom: 1rem;
  display: none;
}
.offline-geo-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid #e8e6e0;
  border-radius: 10px;
  margin-bottom: 0.4rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  gap: 0.75rem;
}
.offline-geo-result:hover {
  border-color: #0D5E4A;
  background: #f0faf5;
}
.offline-geo-result-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: #0F1A14;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.offline-geo-result-meta {
  font-size: 0.75rem;
  color: #6B7280;
  white-space: nowrap;
  flex-shrink: 0;
}
.offline-geo-result-size {
  background: #f0faf5;
  color: #0D5E4A;
  border: 1px solid #0D5E4A30;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  flex-shrink: 0;
}

/* Download progress */
.offline-download-progress {
  display: none;
  padding: 1rem;
  background: #f0faf5;
  border-radius: 12px;
  margin-bottom: 1rem;
}
.offline-download-progress.active { display: block; }
.offline-dl-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #0D5E4A;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
}
.offline-dl-bar-wrap {
  background: #d1fae5;
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
}
.offline-dl-bar {
  height: 100%;
  background: linear-gradient(90deg, #0D5E4A, #2A9D8F);
  border-radius: 20px;
  transition: width 0.2s ease;
  width: 0%;
}
.offline-dl-status {
  font-size: 0.75rem;
  color: #6B7280;
  margin-top: 0.4rem;
}

/* Zones list */
.offline-zones-section {
  margin-top: 0.5rem;
}
.offline-zones-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}
.offline-empty {
  text-align: center;
  color: #9CA3AF;
  font-size: 0.85rem;
  padding: 1.5rem 0;
}

.offline-zone-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  background: #fff;
  border: 1.5px solid #e8e6e0;
  border-radius: 12px;
  margin-bottom: 0.5rem;
}
.offline-zone-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}
.offline-zone-info {
  flex: 1;
  min-width: 0;
}
.offline-zone-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0F1A14;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.offline-zone-meta {
  font-size: 0.75rem;
  color: #6B7280;
  margin-top: 0.1rem;
}
.offline-zone-delete {
  background: none;
  border: none;
  color: #9CA3AF;
  cursor: pointer;
  padding: 0.35rem;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: color 0.15s, background 0.15s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.offline-zone-delete:hover {
  color: #DC2626;
  background: #fef2f2;
}

/* Storage used footer */
.offline-storage-bar {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid #e8e6e0;
}
.offline-storage-label {
  font-size: 0.75rem;
  color: #6B7280;
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.offline-storage-track {
  background: #e8e6e0;
  border-radius: 20px;
  height: 5px;
  overflow: hidden;
}
.offline-storage-fill {
  height: 100%;
  background: linear-gradient(90deg, #0D5E4A, #C5A44E);
  border-radius: 20px;
}

/* Premium gate overlay for offline */
.offline-premium-gate {
  text-align: center;
  padding: 2rem 1rem;
}
.offline-premium-gate-lock {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}
.offline-premium-gate h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: #0F1A14;
  margin-bottom: 0.5rem;
}
.offline-premium-gate p {
  font-size: 0.88rem;
  color: #6B7280;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}
.offline-premium-cta {
  display: inline-block;
  background: linear-gradient(135deg, #0D5E4A, #1B7A65);
  color: #fff;
  text-decoration: none;
  padding: 0.65rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.15s;
}
.offline-premium-cta:hover { opacity: 0.9; }

/* Downloading state indicator on the zone item */
.offline-zone-item.downloading {
  border-color: #0D5E4A80;
  background: #f0faf5;
}
.offline-zone-downloading-bar {
  margin-top: 0.4rem;
  background: #d1fae5;
  border-radius: 10px;
  height: 4px;
  overflow: hidden;
}
.offline-zone-downloading-fill {
  height: 100%;
  background: linear-gradient(90deg, #0D5E4A, #2A9D8F);
  border-radius: 10px;
  transition: width 0.3s ease;
}

/* Offline mode dropdown item */
.dropdown-item.offline-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.offline-item-badge {
  background: #0D5E4A;
  color: #fff;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-left: auto;
}

@media (min-width: 640px) {
  .offline-modal {
    border-radius: 20px;
    max-height: 80vh;
    margin-bottom: 2rem;
  }
  .offline-modal-overlay {
    align-items: center;
  }
}
