/*
  styles.css — California Campgrounds Explorer v3
  ================================================
  Sections:
  1. CSS Variables
  2. Base / Reset
  3. Topbar
  4. Filter Bar (with scroll affordance)
  5. Sidebar / Cards
  6. Vistas Score
  7. Map
  8. Leaflet Popup
  9. Compare
  10. Mobile
  11. Account Panel
  12. Add Spot Modal
  13. Toast
  14. Utility
*/

/* ═══════════════════════════════════════════
   1. CSS VARIABLES
═══════════════════════════════════════════ */
[data-theme="light"] {
  --bg:   #f5f3ef;
  --sf:   #fff;
  --sf2:  #efece7;
  --sf3:  #e5e1da;
  --bd:   #e0dbd3;
  --bdm:  #c4bdb4;
  --tx:   #1c1a17;
  --tx2:  #6b6660;
  --tx3:  #a09890;
  --sh:   rgba(0,0,0,.06);
  --shp:  rgba(0,0,0,.13);
  --acc:  #247a42;
  --acc2: #e8f5ed;
  --comm: #d4576b;
  --comm2:#fdf0f2;
  --comm-bd:#e8a0ae;
}
[data-theme="dark"] {
  --bg:   #1a1917;
  --sf:   #242320;
  --sf2:  #2e2d29;
  --sf3:  #3a3833;
  --bd:   #44413a;
  --bdm:  #5e5850;
  --tx:   #f2eee6;
  --tx2:  #b5ad9e;
  --tx3:  #847c72;
  --sh:   rgba(0,0,0,.22);
  --shp:  rgba(0,0,0,.40);
  --acc:  #3cc866;
  --acc2: #162e1c;
  --comm: #e0708a;
  --comm2:#361820;
  --comm-bd:#8a3848;
}
/* Dark map: invert Voyager tiles to preserve terrain colors (lakes, forests, parks) while going dark */
[data-theme="dark"] .leaflet-tile { filter: invert(1) hue-rotate(180deg) brightness(1.05) contrast(.92) saturate(.8); }
[data-theme="dark"] #map { background: #1a1917; }
[data-theme="dark"] .leaflet-control-zoom a { background: var(--sf); color: var(--tx); border-color: var(--bd); }
/* Dark mode badge overrides for better contrast */
[data-theme="dark"] .conf-high { color: #4ade80; background: #162e1c; border-color: #2a5a38; }
[data-theme="dark"] .conf-medium { color: #f0b040; background: #362210; border-color: #6a4020; }
[data-theme="dark"] .conf-low { color: #908880; background: #2e2d29; border-color: #44413a; }
[data-theme="dark"] .fb.on { background: #f2eee6; border-color: #f2eee6; color: #1a1917; }
[data-theme="dark"] .dt-t { background: #3a3833; }
[data-theme="dark"] .dt-k { background: #b5ad9e; }

/* ═══════════════════════════════════════════
   2. BASE
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--tx);
  overflow: hidden;
  transition: background .22s, color .22s;
}
/* Shared trip mode — restore normal page behavior */
body.shared-mode {
  overflow: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
  background: #f9f7f3 !important;
}
html:has(body.shared-mode) { overflow: auto !important; height: auto !important; }
body.shared-mode #app { display: none !important; }
body.shared-mode .m-fab,
body.shared-mode .trip-pill,
body.shared-mode .toast-container,
body.shared-mode .mobile-detail,
body.shared-mode .m-list-sheet,
body.shared-mode .nav-menu,
body.shared-mode .nav-overlay,
body.shared-mode .trip-panel,
body.shared-mode .trip-overlay,
body.shared-mode .mf-panel,
body.shared-mode .mf-overlay { display: none !important; }
#app { display: flex; flex-direction: column; height: 100vh; }

/* ═══════════════════════════════════════════
   3. TOPBAR
═══════════════════════════════════════════ */
.topbar {
  background: var(--sf);
  border-bottom: 1px solid var(--bd);
  padding: 10px 15px 9px;
  flex-shrink: 0;
  z-index: 1001;
}
.tr1 {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 9px;
}
.logo {
  width: 30px; height: 30px;
  background: var(--acc);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo svg { width: 22px; height: 22px; color: var(--acc); }
.brand { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }

/* Location picker button */
.loc-btn {
  display: flex; align-items: center; gap: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 500;
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  border: 1px solid var(--bd);
  background: var(--sf2);
  color: var(--tx2);
  cursor: pointer;
  transition: all .14s;
  white-space: nowrap;
  flex-shrink: 0;
}
.loc-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.loc-btn:hover { border-color: var(--acc); color: var(--acc); }
.loc-btn.loc-set { border-color: var(--acc); color: var(--acc); background: var(--acc2); }
.loc-label { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width:700px) {
  .loc-label { max-width: 120px; }
}

.tr1-r { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.sw { position: relative; }
.sw svg {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px;
  stroke: var(--tx3); fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.si {
  font-family: 'DM Sans', sans-serif;
  font-size: 12.5px;
  padding: 6px 10px 6px 27px;
  border: 1px solid var(--bd);
  border-radius: 999px;
  background: var(--sf2);
  color: var(--tx);
  width: 185px;
  outline: none;
  transition: all .14s;
}
.si:focus { border-color: var(--bdm); background: var(--sf); }
.si::placeholder { color: var(--tx3); }

.dt { display: flex; align-items: center; gap: 5px; cursor: pointer; user-select: none; }
.dt-l { font-size: 11px; font-weight: 500; color: var(--tx2); }
.dt-t {
  width: 33px; height: 18px;
  border-radius: 999px;
  background: var(--sf3);
  border: 1px solid var(--bdm);
  position: relative; cursor: pointer; flex-shrink: 0;
  transition: all .22s;
}
[data-theme="dark"] .dt-t { background: #3a3830; }
.dt-k {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--tx3);
  position: absolute; top: 2px; left: 2px;
  transition: transform .22s, background .22s;
}
[data-theme="dark"] .dt-k { transform: translateX(15px); background: var(--tx); }

/* Account button */
.acct-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--bd);
  background: var(--sf2);
  color: var(--tx2);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .14s;
  flex-shrink: 0;
}
.acct-btn svg { width: 14px; height: 14px; }
.acct-btn:hover { border-color: var(--acc); color: var(--acc); background: var(--acc2); }
.acct-btn.logged-in { border-color: var(--acc); background: var(--acc); color: #fff; }

/* ═══════════════════════════════════════════
   4. FILTER BAR
═══════════════════════════════════════════ */
.filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filters-wrap {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.filters {
  display: flex;
  gap: 4px;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 2px;
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
/* Scroll affordance — right fade */
.filters-fade {
  position: absolute;
  right: 0; top: 0; bottom: 2px;
  width: 48px;
  background: linear-gradient(90deg, transparent, var(--sf) 80%);
  pointer-events: none;
  z-index: 3;
  transition: opacity .2s;
}
.filters-fade.hidden { opacity: 0; }

.fb-div {
  width: 1px; height: 18px;
  background: var(--bd);
  flex-shrink: 0;
  margin: 0 2px;
}

.fb {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--bd);
  background: var(--sf);
  color: var(--tx2);
  cursor: pointer;
  display: flex; align-items: center; gap: 4px;
  transition: all .12s;
  white-space: nowrap;
  flex-shrink: 0;
}
.fb:hover { background: var(--sf2); border-color: var(--bdm); }
.fb.on { background: var(--tx); border-color: var(--tx); color: var(--bg); }
.fb svg { flex-shrink: 0; }
.fb-fav svg { color: #e74c3c; }
.fb-fav.on svg { color: #fff; }
.fdot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* Sort (now inside sidebar rbar) */
.sort-sel {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 500;
  padding: 4px 24px 4px 8px;
  border: 1px solid var(--bd);
  border-radius: 7px;
  background: var(--sf2);
  color: var(--tx);
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a09890' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}
.sort-sel:focus { border-color: var(--bdm); }
.cnt {
  font-size: 10px;
  background: var(--sf3);
  color: var(--tx3);
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid var(--bd);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   5. SIDEBAR + CARDS
═══════════════════════════════════════════ */
.main { display: flex; flex: 1; overflow: hidden; }
.sidebar {
  width: 295px; flex-shrink: 0;
  background: var(--sf);
  border-right: 1px solid var(--bd);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.rbar {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; font-weight: 600;
  color: var(--tx3);
  text-transform: uppercase; letter-spacing: .07em;
  padding: 6px 10px 5px 12px;
  background: var(--sf2);
  border-bottom: 1px solid var(--bd);
  flex-shrink: 0;
}
.rbar-count { flex: 1; }
.rbar-sort { flex-shrink: 0; }
.cl { flex: 1; overflow-y: auto; }
.cl::-webkit-scrollbar { width: 3px; }
.cl::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 3px; }

.shdr {
  padding: 6px 12px 5px;
  background: var(--sf2);
  border-bottom: 1px solid var(--bd);
  font-size: 9.5px; font-weight: 600;
  color: var(--tx3);
  text-transform: uppercase; letter-spacing: .07em;
  display: flex; align-items: center; gap: 5px;
  position: sticky; top: 0; z-index: 2;
}
.sdot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* old card styles removed — see new styles at bottom */
.bdg {
  font-size: 9px; font-weight: 600;
  padding: 2px 6px; border-radius: 999px;
  white-space: nowrap; flex-shrink: 0;
  border: 1px solid transparent;
}
.bdg-comm {
  background: var(--comm2);
  color: var(--comm);
  border-color: var(--comm-bd);
}









.conf-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 8.5px; font-weight: 600;
  padding: 1px 5px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: .04em;
  border: 1px solid transparent;
}
.conf-high   { color: #247a42; background: #e8f5ed; border-color: #90d4aa; }
.conf-medium { color: #a06000; background: #fef3e2; border-color: #f0c060; }
.conf-low    { color: #888;    background: var(--sf3); border-color: var(--bd); }

.no-res {
  padding: 32px 14px;
  text-align: center;
  color: var(--tx3);
  font-size: 13px; line-height: 1.7;
}
.no-res button {
  margin-top: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--bd);
  background: var(--sf2);
  color: var(--tx2);
  cursor: pointer;
  display: block; margin-left: auto; margin-right: auto;
}
.no-res button:hover { background: var(--sf3); }

/* ═══════════════════════════════════════════
   6. VISTAS SCORE
═══════════════════════════════════════════ */
.vs-card {
  display: flex; align-items: center; gap: 7px;
  margin-top: 2px;
}
.vs-label-card {
  font-size: 9px; font-weight: 600;
  color: var(--tx3);
  text-transform: uppercase; letter-spacing: .08em;
  white-space: nowrap;
  font-family: 'DM Mono', monospace;
}
.vs-bar-wrap {
  flex: 1; height: 6px;
  border-radius: 999px;
  background: var(--sf3);
  overflow: hidden;
}
.vs-bar-fill { height: 100%; border-radius: 999px; transition: width .4s ease; }
.vs-num {
  font-size: 11px; font-weight: 600;
  font-family: 'DM Mono', monospace;
  min-width: 20px; text-align: right;
}
.vs-dot-card {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0; box-shadow: 0 0 4px currentColor;
}
.vs-popup { padding: 12px 14px 11px; border-top: 1px solid var(--bd); }
.vs-popup-header {
  display: flex; align-items: center;
  justify-content: space-between; gap: 8px; margin-bottom: 9px;
}
.vs-brand { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; }
.vs-brand-icon { width: 16px; height: 16px; flex-shrink: 0; }
.vs-brand-name { font-size: 10.5px; font-weight: 600; color: var(--tx2); letter-spacing: .04em; white-space: nowrap; }
.vs-brand-name span { color: var(--tx); font-weight: 700; }
.vs-overall-wrap { display: flex; align-items: baseline; gap: 2px; flex-shrink: 0; }
.vs-overall-num { font-size: 22px; font-weight: 700; font-family: 'DM Mono', monospace; line-height: 1; }
.vs-overall-denom { font-size: 11px; color: var(--tx3); font-family: 'DM Mono', monospace; }
.vs-main-bar-wrap { position: relative; height: 10px; border-radius: 999px; overflow: visible; margin-bottom: 4px; }
.vs-main-bar-track { position: absolute; inset: 0; border-radius: 999px; background: var(--sf3); }
.vs-main-bar-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 999px; transition: width .5s cubic-bezier(.4,0,.2,1); }
.vs-main-bar-dot {
  position: absolute; top: 50%; transform: translate(-50%,-50%);
  width: 14px; height: 14px; border-radius: 50%;
  border: 2.5px solid var(--sf);
  box-shadow: 0 0 0 1.5px rgba(0,0,0,.15), 0 2px 6px rgba(0,0,0,.2);
  transition: left .5s cubic-bezier(.4,0,.2,1);
}
.vs-ticks { display: flex; justify-content: space-between; padding: 0 2px; margin-bottom: 11px; }
.vs-tick { font-size: 8.5px; color: var(--tx3); font-family: 'DM Mono', monospace; }
.vs-subs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.vs-sub { background: var(--sf2); border-radius: 8px; padding: 7px 8px; text-align: center; border: 1px solid var(--bd); }
.vs-sub-icon { font-size: 13px; margin-bottom: 3px; }
.vs-sub-label { font-size: 8.5px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; line-height: 1.3; }
.vs-sub-bar { height: 4px; border-radius: 999px; background: var(--sf3); overflow: hidden; margin-bottom: 3px; }
.vs-sub-bar-fill { height: 100%; border-radius: 999px; }
.vs-sub-num { font-size: 11px; font-weight: 600; font-family: 'DM Mono', monospace; }
.vs-scenic-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; border: 1px solid transparent; letter-spacing: .01em; white-space: nowrap; flex-shrink: 0; }

/* ═══════════════════════════════════════════
   7. MAP
═══════════════════════════════════════════ */
.map-wrap { flex: 1; position: relative; overflow: hidden; }
#map { width: 100%; height: 100%; z-index: 1; }

/* Map action buttons group — top right, FIXED on mobile */
.map-actions {
  position: absolute; top: 10px; right: 10px; z-index: 999;
  display: flex; flex-direction: column; gap: 6px;
  align-items: flex-end;
}
.map-action-btn {
  font-family: 'DM Sans', sans-serif;
  border-radius: 10px;
  border: 1px solid var(--bd);
  background: var(--sf);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px var(--sh);
  transition: all .15s;
}
.map-action-btn svg { flex-shrink: 0; }

/* GPS locate button */
.map-gps-btn {
  width: 38px; height: 38px;
  color: var(--acc);
}
.map-gps-btn svg { width: 18px; height: 18px; }
.map-gps-btn:hover { background: var(--acc2); border-color: var(--acc); }
.map-gps-btn.locating { animation: gps-pulse 1s ease infinite; }
@keyframes gps-pulse {
  0%, 100% { box-shadow: 0 2px 10px var(--sh); }
  50% { box-shadow: 0 2px 10px var(--sh), 0 0 0 4px rgba(36,122,66,.2); }
}

/* Community spot button — prominent, warm, inviting */
.map-community-btn {
  padding: 8px 14px 8px 10px; gap: 6px;
  background: var(--sf);
  border-color: var(--acc);
  color: var(--acc);
  font-size: 12px; font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 2px 10px var(--sh);
}
.map-community-btn svg { width: 15px; height: 15px; }
.map-community-btn:hover { background: var(--acc); color: #fff; }
.mcb-label { white-space: nowrap; }

/* Legend — collapsible */
.legend {
  position: absolute; bottom: 28px; right: 10px; z-index: 999;
  background: var(--sf); border: 1px solid var(--bd); border-radius: 10px;
  box-shadow: 0 2px 10px var(--sh);
  font-family: 'DM Sans', sans-serif;
  overflow: hidden;
}
.legend-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 11px; cursor: pointer; user-select: none;
}
.legend-toggle-label {
  font-size: 9px; font-weight: 600; color: var(--tx3);
  text-transform: uppercase; letter-spacing: .08em;
}
.legend-toggle-icon {
  width: 12px; height: 12px; color: var(--tx3);
  transition: transform .2s;
}
.legend.collapsed .legend-toggle-icon { transform: rotate(180deg); }
.legend-body {
  padding: 0 11px 9px;
  transition: max-height .25s ease, opacity .2s;
  max-height: 300px; opacity: 1;
}
.legend.collapsed .legend-body {
  max-height: 0; opacity: 0; padding: 0 11px;
  overflow: hidden;
}
.l-t { font-size: 9px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.l-r { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--tx); margin-bottom: 3px; }
.l-r:last-child { margin-bottom: 0; }
.ldot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.ldot-community { background: var(--comm); border: 1.5px dashed #fff; box-shadow: 0 0 0 1px var(--comm); width: 8px; height: 8px; }
.l-d { border: none; border-top: 1px solid var(--bd); margin: 5px 0; }

/* ═══════════════════════════════════════════
   8. LEAFLET POPUP
═══════════════════════════════════════════ */
.leaflet-popup-content-wrapper {
  font-family: 'DM Sans', sans-serif !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 28px var(--shp) !important;
  border: 1px solid var(--bd) !important;
  padding: 0 !important;
  overflow: hidden;
  min-width: 268px; max-width: 308px;
  background: var(--sf) !important;
}
.leaflet-popup-content { margin: 0 !important; width: auto !important; }
.leaflet-popup-close-button {
  top: auto !important; bottom: calc(100% - 38px) !important;
  right: 10px !important; font-size: 15px !important;
  color: var(--tx3) !important; z-index: 10;
  width: 22px !important; height: 22px !important;
  background: var(--sf2) !important; border-radius: 50% !important;
  display: flex !important; align-items: center !important; justify-content: center !important;
  border: 1px solid var(--bd) !important;
  font-weight: 400 !important; line-height: 1 !important;
}
.pi { background: var(--sf); color: var(--tx); }
.ph { padding: 12px 14px 9px; }
.pt { display: flex; align-items: flex-start; gap: 7px; margin-bottom: 2px; padding-right: 30px; }
.pname { font-size: 13.5px; font-weight: 600; color: var(--tx); line-height: 1.3; flex: 1; }
.preg { font-size: 10.5px; color: var(--tx2); margin-bottom: 4px; }
.p-verified { display: flex; align-items: center; gap: 6px; padding: 5px 14px; background: var(--sf2); border-bottom: 1px solid var(--bd); font-size: 9.5px; color: var(--tx2); }
.p-verified-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ptags { display: flex; flex-wrap: wrap; gap: 2px; margin-bottom: 4px; }
.ptag { font-size: 9px; padding: 1px 5px; border-radius: 3px; border: 1px solid var(--bd); color: var(--tx3); background: var(--sf2); }
.pstats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--bd); border-top: 1px solid var(--bd); border-bottom: 1px solid var(--bd); }
.pstat { background: var(--sf); padding: 7px 9px; }
.psl { font-size: 8.5px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.psv { font-size: 11.5px; font-weight: 500; color: var(--tx); }
.pfire { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--bd); background: var(--sf2); }
.pfire-i { font-size: 14px; flex-shrink: 0; }
.pfire-l { font-size: 11.5px; font-weight: 600; }
.pfire-s { font-size: 10.5px; color: var(--tx2); margin-left: auto; white-space: nowrap; }
.ptrails { padding: 8px 14px 7px; }
.psect { font-size: 8.5px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 5px; }
.trail { display: flex; align-items: baseline; gap: 6px; margin-bottom: 4px; }
.trail:last-child { margin-bottom: 0; }
.tdot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; align-self: flex-start; }
.tname { font-size: 11.5px; font-weight: 500; color: var(--tx); flex: 1; min-width: 0; }
.tmeta { font-size: 10px; color: var(--tx2); white-space: nowrap; flex-shrink: 0; text-align: right; }
.pdesc { font-size: 11px; color: var(--tx2); line-height: 1.65; padding: 7px 14px 8px; border-top: 1px solid var(--bd); }
.pact { display: flex; gap: 5px; padding: 9px 14px 12px; flex-wrap: wrap; }
.ab { flex: 1 1 auto; font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 500; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--bd); background: var(--sf2); color: var(--tx); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; transition: all .13s; text-decoration: none; white-space: nowrap; min-width: fit-content; }
.ab:hover { background: var(--sf3); border-color: var(--bdm); }
.ab.pri { background: var(--acc); border-color: var(--acc); color: #fff; }
.ab.pri:hover { opacity: .88; }
.ab.dis { opacity: .38; pointer-events: none; }
.ab svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.ab.photo-ab { background: var(--sf); border-color: var(--bdm); color: var(--tx2); }
.ab.photo-ab:hover { background: var(--sf3); color: var(--tx); }

.pdrv { font-size: 9.5px; color: #c95d18; font-weight: 500; padding: 0 14px 8px; display: flex; align-items: center; gap: 4px; }
/* Photo link row in popup */
.pphoto-row { padding: 0 14px 9px; display: flex; align-items: center; gap: 7px; }
.pphoto-link { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; color: var(--tx2); text-decoration: none; padding: 5px 10px; border: 1px solid var(--bd); border-radius: 7px; background: var(--sf2); transition: all .13s; flex: 1; justify-content: center; }
.pphoto-link:hover { background: var(--sf3); border-color: var(--bdm); color: var(--tx); }
.pphoto-link svg { width: 13px; height: 13px; flex-shrink: 0; }

/* Popup action bar: rating + fav */
.popup-user-row { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-top: 1px solid var(--bd); background: var(--sf2); }
.popup-fav-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 10.5px; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--bd);
  background: var(--sf);
  color: var(--tx2);
  cursor: pointer;
  transition: all .12s;
}
.popup-fav-btn:hover { border-color: #e74c3c; color: #e74c3c; }
.popup-fav-btn.active { border-color: #e74c3c; background: #e74c3c; color: #fff; }
.popup-fav-btn svg { width: 11px; height: 11px; }

/* Popup star rating */
.popup-rate { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.popup-rate-star {
  font-size: 16px; cursor: pointer; color: var(--tx3);
  transition: color .1s; line-height: 1;
  user-select: none;
}
.popup-rate-star.filled { color: #d08000; }
.popup-rate-star:hover { color: #d08000; }

/* Community comment section in popup */
.popup-comments { padding: 8px 14px 10px; border-top: 1px solid var(--bd); }
.popup-comments-title { font-size: 9px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }
.popup-comment { margin-bottom: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--bd); }
.popup-comment:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.popup-comment-user { font-size: 10px; font-weight: 600; color: var(--tx); }
.popup-comment-date { font-size: 9px; color: var(--tx3); margin-left: 6px; }
.popup-comment-text { font-size: 10.5px; color: var(--tx2); line-height: 1.5; margin-top: 2px; }
.popup-add-comment {
  display: flex; gap: 5px; margin-top: 6px;
}
.popup-add-comment input {
  flex: 1;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  padding: 5px 8px;
  border: 1px solid var(--bd);
  border-radius: 7px;
  background: var(--sf);
  color: var(--tx);
  outline: none;
}
.popup-add-comment input:focus { border-color: var(--bdm); }
.popup-add-comment button {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px; font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--acc);
  background: var(--acc);
  color: #fff;
  cursor: pointer;
}

/* ═══════════════════════════════════════════
   9. COMPARE
═══════════════════════════════════════════ */
.compare-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 2000;
  background: var(--tx); color: var(--bg);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.3);
  transform: translateY(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.compare-bar.visible { transform: translateY(0); }
.compare-bar-slots { display: flex; gap: 6px; flex: 1; overflow: hidden; }
.compare-slot {
  font-size: 11px; font-weight: 500;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; gap: 5px;
  max-width: 160px; overflow: hidden; white-space: nowrap;
}
.compare-slot-name { overflow: hidden; text-overflow: ellipsis; }
.compare-slot-x { cursor: pointer; opacity: .7; flex-shrink: 0; font-size: 13px; line-height: 1; }
.compare-slot-x:hover { opacity: 1; }
.compare-bar-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 600;
  padding: 7px 16px; border-radius: 8px;
  border: none; cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: opacity .13s;
}
.compare-bar-btn.go { background: #fff; color: var(--tx); }
.compare-bar-btn.go:hover { opacity: .88; }
.compare-bar-btn.clr { background: rgba(255,255,255,.15); color: #fff; }
.compare-bar-btn.clr:hover { background: rgba(255,255,255,.25); }

.compare-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(680px, 100vw);
  background: var(--sf); border-left: 1px solid var(--bd);
  box-shadow: -8px 0 32px var(--shp);
  z-index: 2100;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.compare-panel.open { transform: translateX(0); }
.compare-panel-head { padding: 14px 18px; border-bottom: 1px solid var(--bd); display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.compare-panel-title { font-size: 14px; font-weight: 600; flex: 1; }
.compare-panel-close { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--bd); background: var(--sf2); display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--tx2); cursor: pointer; }
.compare-panel-close:hover { background: var(--sf3); }
.compare-panel-body { flex: 1; overflow-y: auto; padding: 0; }
.compare-panel-body::-webkit-scrollbar { width: 4px; }
.compare-panel-body::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 4px; }
.cmp-table { width: 100%; border-collapse: collapse; }
.cmp-table th { font-size: 10px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .06em; padding: 10px 14px 8px; text-align: left; border-bottom: 1px solid var(--bd); background: var(--sf2); }
.cmp-table td { padding: 10px 14px; font-size: 12px; color: var(--tx); border-bottom: 1px solid var(--bd); vertical-align: top; }
.cmp-table tr:last-child td { border-bottom: none; }
.cmp-camp-head { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--bd); background: var(--sf); }
.cmp-camp-name { font-size: 12.5px; font-weight: 600; color: var(--tx); line-height: 1.3; margin-bottom: 2px; }
.cmp-camp-badge { margin-bottom: 3px; }
.cmp-camp-region { font-size: 10px; color: var(--tx3); }
.cmp-best { color: var(--acc); font-weight: 700; }
.cmp-row-label { font-size: 10px; font-weight: 600; color: var(--tx3); white-space: nowrap; }

/* ═══════════════════════════════════════════
   10. MOBILE
═══════════════════════════════════════════ */
@media (max-width:700px) {
  /* Fix topbar to top of screen so it never disappears */
  .topbar {
    position: sticky; top: 0; z-index: 1200;
  }
  .tr1 { flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
  .brand { flex: 1; }
  .tr1-r {
    width: 100%; order: 3; margin-left: 0;
    display: flex; align-items: center; gap: 5px;
  }
  .loc-btn { order: 1; flex-shrink: 1; min-width: 0; }
  .loc-label { max-width: 90px; }
  .si { order: 2; width: auto; flex: 1; min-width: 80px; }
  .sw { order: 2; flex: 1; }
  .dt { order: 3; flex-shrink: 0; }
  .acct-btn { position: absolute; top: 10px; right: 12px; z-index: 5; }
  .topbar { position: sticky; top: 0; }
  .filter-row { flex-wrap: wrap; gap: 4px; }
  .filters { gap: 3px; }
  .fb { font-size: 10px; padding: 3px 9px; }
  .fb-active { font-size: 9px; padding: 2px 5px 2px 7px; }
  .cnt { display: none; }
  .sidebar { display: none !important; }
  .map-wrap { flex: 1; overflow: hidden; position: relative; }
  .leaflet-popup { display: none !important; }
  /* Legend: fixed position so it doesn't get lost */
  /* Fixed positioning so map controls never disappear */
  .legend { position: fixed; bottom: 76px; left: 8px; right: auto; z-index: 999; }
  .l-r { font-size: 9px; margin-bottom: 2px; }
  .ldot { width: 6px; height: 6px; }
  .l-t { font-size: 8px; margin-bottom: 4px; }
  .l-d { margin: 4px 0; }
  .compare-bar { padding-bottom: 16px; }
  .compare-panel { width: 100vw; }
  /* Map action buttons — fixed, high z-index, always visible */
  .map-actions { position: fixed !important; top: auto !important; bottom: 80px; right: 10px; left: auto !important; z-index: 1100 !important; flex-direction: column-reverse; pointer-events: auto; }
  .mcb-label { display: none; }
  .map-community-btn { width: 40px; height: 40px; padding: 0; border-radius: 50%; box-shadow: 0 2px 10px var(--sh); }
  .map-gps-btn { width: 38px; height: 38px; box-shadow: 0 3px 10px rgba(0,0,0,.2); }
}

.m-fab { display: none; }
@media (max-width:700px) {
  .m-fab {
    display: flex; position: fixed; bottom: 16px; left: 50%;
    transform: translateX(-50%); z-index: 1400;
    background: var(--tx); color: var(--bg);
    border: none; border-radius: 999px; padding: 10px 20px;
    font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600;
    box-shadow: 0 4px 20px var(--shp); cursor: pointer;
    align-items: center; gap: 7px; white-space: nowrap;
  }
  .m-fab:active { opacity: .8; }
  .m-fab svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }
}

.m-list-sheet { display: none; }
@media (max-width:700px) {
  .m-list-sheet {
    display: flex; flex-direction: column;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--sf); border-radius: 16px 16px 0 0;
    border-top: 1px solid var(--bd); box-shadow: 0 -4px 24px var(--shp);
    z-index: 1500; height: 78vh;
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
    will-change: transform;
  }
  .mls-half { transform: translateY(42%) !important; }
  .mls-open { transform: translateY(0) !important; }
  .mls-drag { padding: 8px 0 3px; text-align: center; cursor: pointer; flex-shrink: 0; user-select: none; }
  .mls-pill { display: inline-block; width: 34px; height: 4px; background: var(--bdm); border-radius: 99px; }
  .mls-head { display: flex; align-items: center; padding: 3px 14px 8px; border-bottom: 1px solid var(--bd); flex-shrink: 0; gap: 8px; }
  .mls-title { font-size: 13px; font-weight: 600; color: var(--tx); flex: 1; }
  .mls-cnt { font-size: 11px; color: var(--tx3); }
  .mls-x { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--bd); background: var(--sf2); display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--tx2); cursor: pointer; flex-shrink: 0; }
  .mls-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .mls-body::-webkit-scrollbar { display: none; }
}

/* Mobile detail card */
.mobile-detail { display: none; }
@media (max-width:700px) {
  .mobile-detail {
    display: block; position: fixed; left: 10px; right: 10px; bottom: 10px;
    z-index: 1600;
    transform: translateY(calc(100% + 18px));
    transition: transform .24s ease, opacity .24s ease;
    opacity: 0; pointer-events: none;
  }
  .mobile-detail.md-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .md-card {
    background: var(--sf); border: 1px solid var(--bd); border-radius: 18px;
    box-shadow: 0 10px 28px var(--shp); overflow: hidden; max-height: 52vh;
  }
  .mobile-detail.md-expanded .md-card { max-height: 80vh; }
  .md-scroll { overflow: auto; -webkit-overflow-scrolling: touch; }
  .md-scroll::-webkit-scrollbar { display: none; }
  .md-grab-wrap { padding: 7px 0 2px; text-align: center; }
  .md-grab { display: inline-block; width: 34px; height: 4px; border-radius: 999px; background: var(--bd); }
  .md-main { padding: 0 12px 12px; }
  .md-topline { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
  .md-region { font-size: 10.5px; color: var(--tx2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
  .md-close { border: 1px solid var(--bd); background: var(--sf2); color: var(--tx3); width: 28px; height: 28px; border-radius: 50%; font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
  .md-title-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
  .md-title { font-size: 15px; font-weight: 600; color: var(--tx); line-height: 1.25; flex: 1; }
  /* Branded Vistas Score block — matches desktop popup style */
  .md-vistas {
    background: var(--sf2); border: 1px solid var(--bd);
    border-radius: 12px; padding: 10px 12px 6px;
    margin-bottom: 10px;
  }
  .md-vistas-top {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 8px;
  }
  .md-vistas-brand {
    display: flex; align-items: center; gap: 5px;
  }
  .md-vistas-icon { width: 16px; height: 16px; flex-shrink: 0; }
  .md-vistas-label {
    font-size: 10.5px; font-weight: 500; color: var(--tx2);
    letter-spacing: .03em;
  }
  .md-vistas-label strong { color: var(--tx); font-weight: 700; }
  .md-vistas-num {
    font-size: 22px; font-weight: 700;
    font-family: 'DM Mono', monospace;
    line-height: 1;
  }
  .md-vistas-denom {
    font-size: 11px; color: var(--tx3);
    font-weight: 400; margin-left: 1px;
  }
  .md-vistas-bar {
    position: relative; height: 8px; border-radius: 999px;
    background: var(--sf3); overflow: visible; margin-bottom: 4px;
  }
  .md-vistas-fill {
    position: absolute; left: 0; top: 0; height: 100%;
    border-radius: 999px;
  }
  .md-vistas-dot {
    position: absolute; top: 50%; transform: translate(-50%, -50%);
    width: 12px; height: 12px; border-radius: 50%;
    border: 2px solid var(--sf);
    box-shadow: 0 0 0 1px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.18);
  }
  .md-vistas-ticks {
    display: flex; justify-content: space-between; padding: 0 2px;
    font-size: 8px; color: var(--tx3); font-family: 'DM Mono', monospace;
  }
  .md-quick { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
  .md-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; font-size: 10.5px; line-height: 1; border-radius: 999px; border: 1px solid var(--bd); background: var(--sf2); color: var(--tx2); }
  .md-chip.fire { font-weight: 500; }
  .md-tags { display: flex; gap: 4px; overflow: auto; padding-bottom: 1px; margin-bottom: 8px; }
  .md-tags::-webkit-scrollbar { display: none; }
  .md-tag { font-size: 10px; padding: 3px 7px; border-radius: 999px; border: 1px solid var(--bd); background: var(--sf); color: var(--tx3); white-space: nowrap; }
  .md-mini { display: flex; flex-direction: column; gap: 5px; padding: 8px 0 0; border-top: 1px solid var(--bd); }
  .md-mini-row { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--tx2); min-width: 0; }
  .md-mini-row strong { color: var(--tx); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .md-mini-row span:last-child { margin-left: auto; color: var(--tx3); font-size: 10px; white-space: nowrap; }
  .md-actions { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
  .md-btn { flex: 1; min-height: 38px; border-radius: 11px; border: 1px solid var(--bd); background: var(--sf2); color: var(--tx); font-family: 'DM Sans', sans-serif; font-size: 11.5px; font-weight: 600; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 10px; cursor: pointer; min-width: 0; }
  .md-btn svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .md-btn.pri { background: var(--acc); border-color: var(--acc); color: #fff; }
  .md-btn.ghost { background: transparent; border-color: var(--bd); color: var(--tx2); }
  .md-btn.dis { opacity: .38; pointer-events: none; }
  /* Photo button prominent on mobile preview */
  .md-btn.photo-btn { background: var(--sf); border-color: var(--bdm); color: var(--tx2); }
  .md-btn.photo-btn svg { stroke: #0882a0; }
  .md-btn.fav-btn { min-width: 38px; max-width: 38px; flex: 0 0 38px; }
  .md-btn.fav-btn svg { fill: none; stroke: #e74c3c; }
  .md-btn.fav-btn.active { background: #e74c3c; border-color: #e74c3c; }
  .md-btn.fav-btn.active svg { fill: #fff; stroke: #fff; }
  /* Expand strip — full-width drawer-like affordance */
  .md-expand-strip {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: 10px; padding: 10px 0 2px;
    border-top: 1px solid var(--bd);
    cursor: pointer; user-select: none;
    transition: background .12s;
    -webkit-tap-highlight-color: transparent;
  }
  .md-expand-strip:active { background: var(--sf2); border-radius: 8px; }
  .md-expand-strip span {
    font-size: 11px; font-weight: 600;
    color: var(--acc);
    letter-spacing: .01em;
  }
  .md-expand-chevron {
    width: 16px; height: 16px;
    color: var(--acc);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
    flex-shrink: 0;
  }
  .md-expand-chevron.flipped { transform: rotate(180deg); }
  /* Subtle bounce animation on the chevron when collapsed */
  @keyframes nudge-down {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
  }
  .md-expand-strip:not(:active) .md-expand-chevron:not(.flipped) {
    animation: nudge-down 2s ease-in-out infinite;
  }
  .md-extra { padding-top: 8px; border-top: 1px solid var(--bd); margin-top: 8px; display: flex; flex-direction: column; gap: 10px; }
  .md-label { font-size: 8.5px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 5px; }
  .md-desc { font-size: 11px; color: var(--tx2); line-height: 1.6; }
  .md-trails { display: flex; flex-direction: column; gap: 4px; }
  .md-trail { display: flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--tx2); }
  .md-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
  .md-trail-meta { margin-left: auto; font-size: 10px; color: var(--tx3); white-space: nowrap; }
  .md-links { display: flex; gap: 6px; }
  .md-link { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; font-size: 10.8px; font-weight: 500; color: var(--tx2); text-decoration: none; border: 1px solid var(--bd); border-radius: 10px; background: var(--sf2); padding: 8px 10px; }
  .md-link svg { width: 12px; height: 12px; flex-shrink: 0; }
}

/* Mobile list cards */
.mcc { display: none; }
@media (max-width:700px) {
  .mcc { display: block; padding: 10px 14px 9px; border-bottom: 1px solid var(--bd); cursor: pointer; background: var(--sf); position: relative; }
  .mcc:active, .mcc.sel { background: var(--sf2); }
  .mcc.sel { border-left: 3px solid var(--acc); padding-left: 11px; }
  .mcc.mcc-community { border-left: 2px solid var(--comm); }
  .mcc-r1 { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-bottom: 2px; padding-right: 30px; }
  .mcc-name { font-size: 13px; font-weight: 600; color: var(--tx); line-height: 1.3; flex: 1; }
  .mcc-vs { font-size: 14px; font-weight: 600; font-family: 'DM Mono', monospace; flex-shrink: 0; }
  .mcc-r2 { font-size: 10.5px; color: var(--tx2); margin-bottom: 5px; display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
  .mcc-type { font-weight: 500; }
  .mcc-sep { color: var(--tx3); }
  .mcc-r3 { display: flex; align-items: center; gap: 6px; }
  .mcc-bar { flex: 1; height: 5px; border-radius: 99px; background: var(--sf3); overflow: hidden; }
  .mcc-barf { height: 100%; border-radius: 99px; }
  .mcc-fi { font-size: 11px; }
  .mcc-fee { font-size: 10px; color: var(--tx3); }
  .mcc-rv { font-size: 9px; font-weight: 600; color: var(--acc); background: var(--acc2); border: 1px solid #90d4aa; padding: 1px 5px; border-radius: 3px; }
  .mcc-shdr { padding: 5px 14px 4px; background: var(--sf2); border-bottom: 1px solid var(--bd); font-size: 9px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .06em; position: sticky; top: 0; z-index: 2; }
  /* Photo quick-tap on mobile list card */
  .mcc-photo-btn {
    position: absolute; top: 10px; right: 10px;
    width: 24px; height: 24px; border-radius: 6px;
    border: 1px solid var(--bd); background: var(--sf2);
    color: var(--tx3); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 1;
  }
  .mcc-photo-btn svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .mcc-photo-btn:active { background: var(--sf3); }
}

/* ═══════════════════════════════════════════
   11. ACCOUNT PANEL
═══════════════════════════════════════════ */
.panel-overlay {
  position: fixed; inset: 0; z-index: 2400;
  background: rgba(0,0,0,.4);
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.panel-overlay.open { opacity: 1; pointer-events: auto; }

.account-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(380px, 90vw);
  background: var(--sf);
  border-left: 1px solid var(--bd);
  box-shadow: -8px 0 32px var(--shp);
  z-index: 2500;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.account-panel.open { transform: translateX(0); }
.acct-panel-head {
  padding: 16px 18px;
  border-bottom: 1px solid var(--bd);
  display: flex; align-items: center; gap: 10px;
}
.acct-panel-title { font-size: 15px; font-weight: 600; flex: 1; }
.acct-panel-close {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--bd); background: var(--sf2);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--tx2); cursor: pointer;
}
.acct-panel-close:hover { background: var(--sf3); }
.acct-panel-body {
  flex: 1; overflow-y: auto; padding: 18px;
}
.acct-panel-body::-webkit-scrollbar { width: 3px; }
.acct-panel-body::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 3px; }

/* Auth form styles */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 4px; }
.auth-field label { font-size: 10px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .06em; }
.auth-field input {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; padding: 8px 12px;
  border: 1px solid var(--bd); border-radius: 8px;
  background: var(--sf2); color: var(--tx);
  outline: none; transition: border-color .14s;
}
.auth-field input:focus { border-color: var(--acc); }
.auth-submit {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  padding: 10px; border-radius: 10px;
  border: none; background: var(--acc); color: #fff;
  cursor: pointer; transition: opacity .12s;
}
.auth-submit:hover { opacity: .88; }
.auth-switch {
  font-size: 11.5px; color: var(--tx2); text-align: center;
}
.auth-switch a { color: var(--acc); cursor: pointer; font-weight: 500; text-decoration: none; }

/* Profile section — shared */
.profile-section-title {
  font-size: 9.5px; font-weight: 600; color: var(--tx3);
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 8px;
}
.profile-saved-list { display: flex; flex-direction: column; gap: 4px; }
.profile-saved-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  background: var(--sf2); border: 1px solid var(--bd);
  cursor: pointer; transition: background .1s;
  font-size: 12px; font-weight: 500; color: var(--tx);
}
.profile-saved-item:hover { background: var(--sf3); }
.profile-saved-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.profile-saved-region { font-size: 10px; color: var(--tx3); margin-left: auto; }
.profile-logout {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 500;
  padding: 8px 14px; border-radius: 8px;
  border: 1px solid var(--bd); background: var(--sf2);
  color: var(--tx2); cursor: pointer; width: 100%;
  margin-top: 10px; transition: all .12s;
}
.profile-logout:hover { background: var(--sf3); border-color: var(--bdm); }

/* ── New Profile Card ── */
.pro-card {
  background: var(--sf2); border: 1px solid var(--bd);
  border-radius: 14px; padding: 16px; margin-bottom: 14px;
}
.pro-header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.pro-avatar-wrap { position: relative; cursor: pointer; flex-shrink: 0; }
.pro-avatar {
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--acc); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700;
  border: 2.5px solid var(--sf);
  box-shadow: 0 2px 8px var(--sh);
}
.pro-avatar.emoji { font-size: 26px; background: var(--sf3); }
.pro-avatar-edit {
  position: absolute; bottom: -2px; right: -2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--tx); color: var(--bg);
  font-size: 9px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--sf);
}
.pro-info { flex: 1; min-width: 0; }
.pro-name { font-size: 15px; font-weight: 700; color: var(--tx); margin-bottom: 3px; }
.pro-rank-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid; margin-bottom: 3px;
}
.pro-joined { font-size: 10px; color: var(--tx3); }
.pro-bio {
  font-size: 11.5px; color: var(--tx2); font-style: italic;
  line-height: 1.5; margin-bottom: 10px; padding: 0 2px;
}

/* XP bar */
.pro-xp-section { margin-bottom: 12px; }
.pro-xp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.pro-xp-label { font-size: 10px; font-weight: 600; color: var(--tx2); font-family: 'DM Mono', monospace; }
.pro-xp-next { font-size: 9px; color: var(--tx3); }
.pro-xp-bar { height: 6px; border-radius: 999px; background: var(--sf3); overflow: hidden; }
.pro-xp-fill { height: 100%; border-radius: 999px; transition: width .5s ease; }

/* Stats row */
.pro-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.pro-stat {
  text-align: center; padding: 8px 4px; border-radius: 8px;
  background: var(--sf); border: 1px solid var(--bd);
}
.pro-stat-num { font-size: 16px; font-weight: 700; font-family: 'DM Mono', monospace; color: var(--tx); }
.pro-stat-lbl { font-size: 8px; color: var(--tx3); text-transform: uppercase; letter-spacing: .05em; margin: 1px 0; }
.pro-stat-xp { font-size: 8px; color: var(--acc); font-weight: 600; font-family: 'DM Mono', monospace; }

/* Badges mini row */
.pro-badges-row { display: flex; gap: 4px; align-items: center; }
.pro-badge-mini {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--sf); border: 1px solid var(--bd);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: default;
}
.pro-badge-more {
  font-size: 9px; font-weight: 600; color: var(--tx3);
  padding: 4px 8px; border-radius: 999px;
  background: var(--sf); border: 1px solid var(--bd);
}

/* Tabs */
.pro-tabs {
  display: flex; gap: 2px; margin-bottom: 14px;
  background: var(--sf2); border-radius: 10px; padding: 3px;
  border: 1px solid var(--bd);
}
.pro-tab {
  flex: 1; font-family: 'DM Sans', sans-serif;
  font-size: 10.5px; font-weight: 600;
  padding: 7px 4px; border-radius: 8px;
  border: none; background: transparent;
  color: var(--tx3); cursor: pointer;
  transition: all .12s; text-align: center;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.pro-tab:hover { color: var(--tx2); }
.pro-tab.active { background: var(--sf); color: var(--tx); box-shadow: 0 1px 4px var(--sh); }
.pro-tab-count { font-size: 9px; color: var(--tx3); font-family: 'DM Mono', monospace; }
.pro-tab-content { min-height: 100px; }

/* Tips */
.pro-tips { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.pro-tip {
  font-size: 11px; color: var(--tx2); line-height: 1.5;
  padding: 8px 10px; border-radius: 8px;
  background: var(--acc2); border: 1px solid var(--acc)22;
}
.pro-section { margin-bottom: 14px; }
.pro-see-all {
  font-size: 10.5px; font-weight: 500; color: var(--acc);
  cursor: pointer; margin-top: 6px; text-align: center;
}
.pro-empty {
  text-align: center; padding: 24px 12px;
  font-size: 12px; color: var(--tx3); line-height: 1.6;
}

/* Badges grid */
.pro-badges-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pro-badge-card {
  padding: 12px 10px; border-radius: 10px;
  background: var(--sf2); border: 1px solid var(--bd);
  text-align: center; transition: all .12s;
}
.pro-badge-card.locked { opacity: .45; }
.pro-badge-icon { font-size: 24px; margin-bottom: 4px; }
.pro-badge-name { font-size: 11px; font-weight: 600; color: var(--tx); margin-bottom: 2px; }
.pro-badge-desc { font-size: 9.5px; color: var(--tx3); line-height: 1.4; margin-bottom: 4px; }
.pro-badge-earned { font-size: 9px; font-weight: 600; color: var(--acc); }
.pro-badge-locked { font-size: 9px; font-weight: 600; color: var(--tx3); }

/* Activity feed */
.pro-activity-list { display: flex; flex-direction: column; gap: 2px; }
.pro-activity-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; border-radius: 8px;
  cursor: pointer; transition: background .1s;
}
.pro-activity-item:hover { background: var(--sf2); }
.pro-activity-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.pro-activity-body { flex: 1; min-width: 0; }
.pro-activity-line { font-size: 11.5px; color: var(--tx); line-height: 1.4; }
.pro-activity-line strong { font-weight: 600; }
.pro-activity-text { font-size: 10px; color: var(--tx3); font-style: italic; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Avatar picker grid */
.pro-avatar-grid {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px;
}
.pro-avatar-option {
  width: 100%; aspect-ratio: 1; border-radius: 8px;
  border: 2px solid var(--bd);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer;
  transition: all .12s; background: var(--sf);
}
.pro-avatar-option:hover { border-color: var(--acc); background: var(--acc2); }
.pro-avatar-option.selected { border-color: var(--acc); background: var(--acc2); box-shadow: 0 0 0 2px var(--acc); }

/* Settings */
.pro-settings { display: flex; flex-direction: column; gap: 12px; }

/* ═══════════════════════════════════════════
   12. ADD SPOT MODAL
═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2600;
  background: rgba(0,0,0,.5);
  opacity: 0; pointer-events: none;
  transition: opacity .22s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }

.add-spot-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.95);
  width: min(460px, 92vw);
  max-height: 85vh;
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: 18px;
  box-shadow: 0 20px 60px var(--shp);
  z-index: 2700;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: all .25s cubic-bezier(.4,0,.2,1);
}
.add-spot-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.asm-head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--bd);
  display: flex; align-items: center;
}
.asm-title { font-size: 15px; font-weight: 600; flex: 1; }
.asm-close {
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--bd); background: var(--sf2);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--tx2); cursor: pointer;
}
.asm-close:hover { background: var(--sf3); }
.asm-body { flex: 1; overflow-y: auto; padding: 20px; }
.asm-body::-webkit-scrollbar { width: 3px; }
.asm-body::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 3px; }

.asm-form { display: flex; flex-direction: column; gap: 14px; }
.asm-field { display: flex; flex-direction: column; gap: 4px; }
.asm-field label { font-size: 10px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .06em; }
.asm-field input, .asm-field textarea, .asm-field select {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; padding: 8px 12px;
  border: 1px solid var(--bd); border-radius: 8px;
  background: var(--sf2); color: var(--tx);
  outline: none; transition: border-color .14s;
  resize: vertical;
}
.asm-field input:focus, .asm-field textarea:focus, .asm-field select:focus { border-color: var(--acc); }
.asm-field textarea { min-height: 70px; }
.asm-field-row { display: flex; gap: 10px; }
.asm-field-row .asm-field { flex: 1; }
.asm-hint { font-size: 10px; color: var(--tx3); margin-top: 2px; }
.asm-map-pick {
  height: 160px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--bd); margin-top: 4px;
}
.asm-submit {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 600;
  padding: 10px; border-radius: 10px;
  border: none; background: var(--comm); color: #fff;
  cursor: pointer; transition: opacity .12s;
}
.asm-submit:hover { opacity: .88; }
.asm-status-row { display: flex; gap: 6px; flex-wrap: wrap; }
.asm-status-chip {
  font-size: 10px; font-weight: 500;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--bd); background: var(--sf);
  color: var(--tx2); cursor: pointer;
  transition: all .12s;
}
.asm-status-chip.on { background: var(--comm); border-color: var(--comm); color: #fff; }
.asm-star-row { display: flex; gap: 4px; }
.asm-star {
  font-size: 22px; cursor: pointer; color: var(--tx3);
  transition: color .1s; user-select: none;
}
.asm-star.filled { color: #d08000; }
.asm-star:hover { color: #d08000; }

/* ═══════════════════════════════════════════
   13. TOAST
═══════════════════════════════════════════ */
.toast-container {
  position: fixed; bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  pointer-events: none;
}
.toast {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 500;
  padding: 10px 18px; border-radius: 10px;
  background: var(--tx); color: var(--bg);
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
  pointer-events: auto;
  animation: toast-in .3s ease, toast-out .3s ease 2.5s forwards;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* ═══════════════════════════════════════════
   14. UTILITY
═══════════════════════════════════════════ */
.bottom-sheet { display: none; }

/* ═══════════════════════════════════════════
   15. MY LOCATION PIN
═══════════════════════════════════════════ */
.my-loc-pin {
  width: 36px; height: 36px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}
.my-loc-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: #247a42;
  border: 3px solid #fff;
  box-shadow: 0 1px 6px rgba(0,0,0,.35);
  position: relative;
  z-index: 2;
}
.my-loc-pulse {
  position: absolute;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(36, 122, 66, .18);
  animation: loc-pulse 2.5s ease-out infinite;
  z-index: 1;
}
@keyframes loc-pulse {
  0% { transform: scale(.5); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}
[data-theme="dark"] .my-loc-dot { background: #3cc866; border-color: #242320; }
[data-theme="dark"] .my-loc-pulse { background: rgba(60, 200, 102, .2); }

/* ═══════════════════════════════════════════
   16. MORE FILTERS PANEL
═══════════════════════════════════════════ */
/* Filters button */
.fb-filters-btn { color: var(--tx2); gap: 4px; border-style: dashed; }
.fb-filters-btn:hover { color: var(--tx); border-style: solid; }
.fb-filters-btn.has-active { border-color: var(--acc); color: var(--acc); background: var(--acc2); border-style: solid; }
.fb-filters-count {
  font-size: 9px; font-weight: 700;
  background: var(--acc); color: #fff;
  min-width: 16px; height: 16px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
  font-family: 'DM Mono', monospace; padding: 0 4px;
}
.fb-filters-btn.has-active .fb-filters-count { display: flex; }

/* Dynamic active filter chips */
.fb-active {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px; font-weight: 600;
  padding: 3px 6px 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--acc);
  background: var(--acc2);
  color: var(--acc);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 3px;
  transition: all .12s;
  white-space: nowrap;
  flex-shrink: 0;
}
.fb-active:hover { background: var(--acc); color: #fff; }
.fb-active.layer-chip { border-color: var(--comm); background: var(--comm2); color: var(--comm); }
.fb-active.layer-chip:hover { background: var(--comm); color: #fff; }
.fb-active-x { font-size: 12px; line-height: 1; opacity: .6; margin-left: 1px; }

/* Filter panel reset button */
.mf-reset {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px; font-weight: 500;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--bd);
  background: var(--sf2); color: var(--tx3);
  cursor: pointer; margin-left: auto; margin-right: 8px;
  transition: all .12s;
}
.mf-reset:hover { color: var(--tx2); border-color: var(--bdm); }

/* Filter panel chip groups */
.mf-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.mf-chip {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 500;
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--bd);
  background: var(--sf); color: var(--tx2);
  cursor: pointer; transition: all .12s;
  display: inline-flex; align-items: center; gap: 4px;
}
.mf-chip:hover { background: var(--sf3); border-color: var(--bdm); }
.mf-chip.on { background: var(--tx); border-color: var(--tx); color: var(--bg); }

.mf-overlay {
  position: fixed; inset: 0; z-index: 2300;
  background: rgba(0,0,0,.3);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.mf-overlay.open { opacity: 1; pointer-events: auto; }

.mf-panel {
  position: fixed;
  top: 100px; left: 50%; transform: translateX(-50%) scale(.95);
  width: min(400px, 90vw);
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: 16px;
  box-shadow: 0 16px 48px var(--shp);
  z-index: 2350;
  opacity: 0; pointer-events: none;
  transition: all .22s cubic-bezier(.4,0,.2,1);
}
.mf-panel.open { opacity: 1; pointer-events: auto; transform: translateX(-50%) scale(1); }
@media (max-width:700px) {
  .mf-panel { top: auto; bottom: 0; left: 0; right: 0; transform: translateY(100%); width: 100%; border-radius: 16px 16px 0 0; }
  .mf-panel.open { transform: translateY(0); }
}
.mf-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--bd);
  display: flex; align-items: center;
}
.mf-title { font-size: 14px; font-weight: 600; flex: 1; }
.mf-body { padding: 16px 18px; }
.mf-section { margin-bottom: 16px; }
.mf-section:last-child { margin-bottom: 0; }
.mf-section-title { font-size: 10px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 4px; }
.mf-section-desc { font-size: 11px; color: var(--tx3); line-height: 1.5; margin-bottom: 10px; }
.mf-toggles { display: flex; flex-direction: column; gap: 6px; }
.mf-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--sf2); border: 1px solid var(--bd);
  cursor: pointer; transition: all .12s;
}
.mf-toggle:hover { background: var(--sf3); }
.mf-toggle.active { border-color: var(--acc); background: var(--acc2); }
.mf-toggle-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.mf-toggle-icon { font-size: 18px; flex-shrink: 0; }
.mf-toggle-name { font-size: 12px; font-weight: 600; color: var(--tx); }
.mf-toggle-desc { font-size: 10px; color: var(--tx3); }

.mf-switch {
  width: 36px; height: 20px;
  border-radius: 999px;
  background: var(--sf3);
  border: 1px solid var(--bdm);
  position: relative; flex-shrink: 0;
  transition: all .2s;
}
.mf-toggle.active .mf-switch { background: var(--acc); border-color: var(--acc); }
.mf-switch-knob {
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff;
  position: absolute; top: 2px; left: 2px;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.mf-toggle.active .mf-switch-knob { transform: translateX(16px); }

.mf-active {
  font-size: 11px; color: var(--tx3); line-height: 1.6;
  padding: 8px 10px; border-radius: 8px;
  background: var(--sf2); border: 1px solid var(--bd);
}
.mf-active-tag {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 500;
  padding: 2px 8px; border-radius: 999px;
  background: var(--acc2); color: var(--acc);
  border: 1px solid var(--acc)33;
  margin: 2px;
}

/* POI markers on map */
.poi-marker {
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  width: 24px; height: 24px;
  background: var(--sf);
  border: 1.5px solid var(--bd);
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

/* ═══════════════════════════════════════════
   17. NWS ALERT MARKERS
═══════════════════════════════════════════ */
.nws-marker {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  border: 2px solid;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  animation: nws-pulse 2s ease infinite;
}
@keyframes nws-pulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(0,0,0,.25); }
  50% { box-shadow: 0 2px 8px rgba(0,0,0,.25), 0 0 0 4px rgba(220,38,38,.15); }
}
.popup-alert-zone:empty { display: none; }
.popup-alert-zone { padding: 0; }

/* ═══════════════════════════════════════════
   18. VISTAS INFO BUTTON + MODAL
═══════════════════════════════════════════ */
.vs-info-btn {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 1px solid var(--bd);
  background: var(--sf2);
  color: var(--tx3);
  font-family: 'DM Sans', sans-serif;
  font-size: 9px; font-weight: 700; font-style: italic;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .12s;
  flex-shrink: 0;
  line-height: 1;
  padding: 0;
  vertical-align: middle;
  margin-left: 2px;
}
.vs-info-btn:hover { border-color: var(--acc); color: var(--acc); background: var(--acc2); }

.vistas-info-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.95);
  width: min(380px, 90vw);
  max-height: 80vh;
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: 16px;
  box-shadow: 0 20px 60px var(--shp);
  z-index: 2700;
  opacity: 0; pointer-events: none;
  transition: all .22s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.vistas-info-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }

.vim-head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--bd);
  display: flex; align-items: center; gap: 8px;
}
.vim-icon { width: 20px; height: 20px; flex-shrink: 0; }
.vim-title { font-size: 14px; flex: 1; color: var(--tx); letter-spacing: .02em; }
.vim-title strong { font-weight: 700; }

.vim-body {
  padding: 16px;
  overflow-y: auto;
}
.vim-intro {
  font-size: 12.5px; color: var(--tx2);
  line-height: 1.65; margin-bottom: 14px;
}
.vim-intro strong { color: var(--tx); font-weight: 600; }
.vim-intro em { color: var(--tx); font-style: italic; }

.vim-subs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.vim-sub {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: 10px;
  background: var(--sf2); border: 1px solid var(--bd);
}
.vim-sub-icon { font-size: 20px; flex-shrink: 0; margin-top: 1px; }
.vim-sub-name { font-size: 12px; font-weight: 700; color: var(--tx); margin-bottom: 2px; }
.vim-sub-desc { font-size: 11px; color: var(--tx2); line-height: 1.55; }

.vim-scale { margin-bottom: 14px; }
.vim-scale-title { font-size: 9px; font-weight: 600; color: var(--tx3); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 6px; }
.vim-scale-labels {
  display: flex; justify-content: space-between;
  font-size: 9px; color: var(--tx3); font-family: 'DM Mono', monospace;
}

.vim-note {
  font-size: 10.5px; color: var(--tx3); line-height: 1.6;
  padding: 10px 12px; border-radius: 8px;
  background: var(--sf2); border: 1px solid var(--bd);
}

/* ═══════════════════════════════════════════
   19. BRAND TAGLINE + WELCOME BANNER
═══════════════════════════════════════════ */
.brand-tag {
  font-size: 11px; font-weight: 400; color: var(--tx3);
  margin-left: 6px; letter-spacing: 0;
}
.brand-tag-m { display: none; }
@media (max-width:700px) {
  .brand-tag { display: none; }
  .brand-tag-m {
    display: inline;
    font-size: 9px; font-weight: 400; color: var(--tx3);
    margin-left: 5px; opacity: .55;
  }
}

.welcome-banner {
  background: var(--acc2);
  border-bottom: 1px solid var(--acc)22;
  padding: 8px 15px;
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.wb-content { display: flex; align-items: center; gap: 8px; flex: 1; }
.wb-icon { font-size: 16px; flex-shrink: 0; }
.wb-text { font-size: 11.5px; color: var(--tx2); line-height: 1.5; }
.wb-text strong { color: var(--acc); font-weight: 600; }
.wb-link { color: var(--acc); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.wb-link:hover { opacity: .8; }
.wb-close {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--bd); background: var(--sf);
  color: var(--tx3); font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
@media (max-width:700px) {
  .welcome-banner { padding: 6px 12px; }
  .wb-text { font-size: 10.5px; }
}

/* ═══════════════════════════════════════════
   20. REDESIGNED SIDEBAR CARDS
═══════════════════════════════════════════ */
.cc {
  padding: 10px 12px;
  border-bottom: 1px solid var(--bd);
  cursor: pointer;
  transition: background .1s, border-color .1s, box-shadow .1s;
  background: var(--sf);
  border-left: 3px solid transparent;
}
.cc:hover { background: var(--sf2); }
.cc.sel { background: var(--acc2); border-left-color: var(--acc); }
.cc.cc-hover { background: var(--acc2); border-left-color: var(--acc); }
.cc.cc-community { border-left-color: var(--comm); }

.cc-row1 {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 3px;
}
.cc-name { font-size: 13px; font-weight: 600; color: var(--tx); line-height: 1.3; flex: 1; }

.cc-row2 {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--tx3);
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.cc-drv {
  font-size: 9px; padding: 1px 5px;
  border-radius: 3px;
  background: var(--sf3); color: var(--tx2);
  border: 1px solid var(--bd);
}
.cc-stars { color: #d08000; font-size: 9px; }
.conf-inline {
  font-size: 9px; color: var(--acc); font-weight: 700;
}

/* Card Vistas bar — compact */
.cc-vistas {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 6px;
}
.cc-vs-bar {
  flex: 1; height: 5px; border-radius: 999px;
  background: var(--sf3); overflow: hidden;
}
.cc-vs-fill { height: 100%; border-radius: 999px; }
.cc-vs-num {
  font-size: 12px; font-weight: 700;
  font-family: 'DM Mono', monospace;
  min-width: 22px; text-align: right;
}
.cc-vs-tag {
  font-size: 9px; font-weight: 600;
  padding: 1px 6px; border-radius: 999px;
  border: 1px solid; white-space: nowrap;
}

/* Card bottom row — tags + quick actions */
.cc-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
}
.cc-tags { display: flex; gap: 2px; flex: 1; overflow: hidden; }
.cc-tag {
  font-size: 9px; padding: 1px 5px;
  border-radius: 3px;
  border: 1px solid var(--bd);
  color: var(--tx3); background: var(--bg);
  white-space: nowrap;
}
.cc-tag.cc-rv { border-color: #90d4aa; color: #247a42; font-weight: 600; }
.cc-quick-actions { display: flex; gap: 2px; flex-shrink: 0; }
.cc-qa {
  font-size: 12px; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px; cursor: pointer;
  border: none; background: transparent;
  text-decoration: none;
  transition: background .1s;
}
.cc-qa:hover { background: var(--sf3); }
.cc-qa-fav { font-size: 13px; }

/* ═══════════════════════════════════════════
   21. HIGH-SCORE PIN GLOW ANIMATIONS
═══════════════════════════════════════════ */
/* Pin aura — animated box-shadow using pre-computed opacity vars */
.pin-aura {
  animation: pin-aura-glow 3s ease-in-out infinite;
}
.pin-aura-strong {
  animation: pin-aura-glow-strong 2.5s ease-in-out infinite;
}
@keyframes pin-aura-glow {
  0%   { box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 0 0 2px var(--ac5); }
  50%  { box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 0 0 3px var(--ac8), 0 0 5px var(--ac3); }
  100% { box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 0 0 2px var(--ac5); }
}
@keyframes pin-aura-glow-strong {
  0%   { box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 0 0 2.5px var(--ac6); filter: hue-rotate(0deg); }
  33%  { box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 0 0 3px var(--aca), 0 0 6px var(--ac4); filter: hue-rotate(10deg); }
  66%  { box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 0 0 2.5px var(--ac7); filter: hue-rotate(-8deg); }
  100% { box-shadow: 0 2px 8px rgba(0,0,0,.3), 0 0 0 2.5px var(--ac6); filter: hue-rotate(0deg); }
}

/* Score number glow in popups — subtle, brighter tone */
.vs-overall-num { transition: text-shadow .3s; }
.vs-num-glow { animation: score-glow 3.5s ease-in-out infinite; }
@keyframes score-glow {
  0%   { text-shadow: 0 0 3px rgba(100, 210, 255, .3); }
  50%  { text-shadow: 0 0 6px rgba(100, 210, 255, .5), 0 0 2px rgba(100, 210, 255, .2); }
  100% { text-shadow: 0 0 3px rgba(100, 210, 255, .3); }
}

/* ═══════════════════════════════════════════
   22. LOCATION HINT PULSE
═══════════════════════════════════════════ */
.loc-hint-pulse {
  animation: hint-glow 1.5s ease infinite !important;
}
@keyframes hint-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(36,122,66,.4); }
  50% { box-shadow: 0 0 0 6px rgba(36,122,66,0); }
}
.toast-loc-prompt {
  background: var(--acc) !important;
  color: #fff !important;
  font-size: 12px !important;
}
.toast-loc-prompt strong { font-weight: 700; }

/* ═══════════════════════════════════════════
   21. USER LINK + USER CARD POPUP
═══════════════════════════════════════════ */
.user-link {
  color: var(--comm);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px dashed var(--comm);
  transition: opacity .12s;
}
.user-link:hover { opacity: .75; }

.user-card-popup {
  position: fixed;
  width: 260px;
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: 14px;
  box-shadow: 0 8px 32px var(--shp), 0 0 0 1px var(--bd);
  z-index: 3000;
  opacity: 0;
  transform: scale(.95);
  transition: all .18s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.user-card-popup.open { opacity: 1; transform: scale(1); }

.uc-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 14px 10px;
  background: linear-gradient(135deg, var(--sf2), var(--sf));
  border-bottom: 1px solid var(--bd);
}
.uc-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--acc); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
  border: 2.5px solid var(--sf);
  box-shadow: 0 3px 10px var(--sh);
}
.uc-avatar.emoji { font-size: 24px; background: var(--sf3); }
.uc-info { flex: 1; min-width: 0; }
.uc-name { font-size: 14px; font-weight: 700; color: var(--tx); margin-bottom: 4px; }
.uc-rank {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 9.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid;
}
.uc-close {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid var(--bd); background: var(--sf2);
  color: var(--tx3); font-size: 11px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  align-self: flex-start;
}
.uc-close:hover { background: var(--sf3); }
.uc-bio {
  font-size: 11px; color: var(--tx2); font-style: italic;
  line-height: 1.5; padding: 6px 14px 8px;
  margin: 0;
}
.uc-meta {
  font-size: 10px; color: var(--tx3);
  padding: 0 14px 10px;
}
.uc-stats-row {
  display: flex;
  background: var(--sf2);
  border-bottom: 1px solid var(--bd);
}
.uc-stat-item {
  flex: 1; text-align: center;
  padding: 10px 4px;
  border-right: 1px solid var(--bd);
}
.uc-stat-item:last-child { border-right: none; }
.uc-stat-num { font-size: 16px; font-weight: 700; font-family: 'DM Mono', monospace; color: var(--tx); }
.uc-stat-label { font-size: 7.5px; color: var(--tx3); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.uc-profile-btn {
  display: block; width: 100%;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 600;
  color: var(--acc);
  padding: 9px; border: none;
  background: transparent; cursor: pointer;
  text-align: center;
  transition: background .1s;
}
.uc-profile-btn:hover { background: var(--sf2); }

/* ═══════════════════════════════════════════
   23. PUBLIC PROFILE
═══════════════════════════════════════════ */
.pub-profile { padding: 0; }
.pub-header {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 18px 14px;
}
.pub-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--acc); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; flex-shrink: 0;
  border: 3px solid var(--sf);
  box-shadow: 0 3px 12px var(--sh);
}
.pub-avatar.emoji { font-size: 30px; background: var(--sf3); }
.pub-info { flex: 1; }
.pub-name { font-size: 17px; font-weight: 700; color: var(--tx); margin-bottom: 4px; }
.pub-rank {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; font-weight: 600;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid; margin-bottom: 4px;
}
.pub-joined { font-size: 10.5px; color: var(--tx3); }
.pub-bio {
  font-size: 12px; color: var(--tx2); font-style: italic;
  line-height: 1.6; padding: 0 18px 12px;
  border-bottom: 1px solid var(--bd);
}
.pub-xp { padding: 12px 18px; border-bottom: 1px solid var(--bd); }
.pub-xp-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 600; color: var(--tx2);
  margin-bottom: 6px;
}
.pub-xp-bar {
  height: 6px; border-radius: 999px; background: var(--sf3); overflow: hidden;
}
.pub-xp-fill { height: 100%; border-radius: 999px; transition: width .4s; }
.pub-stats {
  display: flex; border-bottom: 1px solid var(--bd);
}
.pub-stat {
  flex: 1; text-align: center; padding: 12px 4px;
  border-right: 1px solid var(--bd);
}
.pub-stat:last-child { border-right: none; }
.pub-stat-num {
  font-size: 18px; font-weight: 700;
  font-family: 'DM Mono', monospace; color: var(--tx);
}
.pub-stat-lbl {
  font-size: 8.5px; color: var(--tx3);
  text-transform: uppercase; letter-spacing: .06em; margin-top: 2px;
}
.pub-section { padding: 14px 18px; border-bottom: 1px solid var(--bd); }
.pub-section:last-child { border-bottom: none; }
.pub-section-title {
  font-size: 10px; font-weight: 600; color: var(--tx3);
  text-transform: uppercase; letter-spacing: .06em; margin-bottom: 10px;
}
.pub-badges {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.pub-badge {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--sf2); border: 1px solid var(--bd);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: default;
  transition: transform .1s;
}
.pub-badge:hover { transform: scale(1.15); }

/* Community Score placeholder */
.comm-score-placeholder {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border-top: 1px solid var(--bd);
  background: var(--sf2);
}
.csp-icon { font-size: 14px; flex-shrink: 0; }
.csp-text {
  font-size: 10.5px; color: var(--tx3); line-height: 1.5;
}
.csp-text strong {
  color: var(--tx2); font-weight: 600;
}

/* ═══════════════════════════════════════════
   24. NAV MENU
═══════════════════════════════════════════ */
.menu-btn {
  width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--bd); background: var(--sf2);
  color: var(--tx2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s; flex-shrink: 0;
}
.menu-btn svg { width: 16px; height: 16px; }
.menu-btn:hover { background: var(--sf3); color: var(--tx); }
@media (max-width:700px) {
  .menu-btn { position: absolute; top: 10px; right: 12px; z-index: 5; }
}

.nav-overlay {
  position: fixed; inset: 0; z-index: 2500;
  background: rgba(0,0,0,.3);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.nav-overlay.open { opacity: 1; pointer-events: auto; }

.nav-menu {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(280px, 80vw);
  background: var(--sf);
  border-left: 1px solid var(--bd);
  box-shadow: -4px 0 20px var(--shp);
  z-index: 2600;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  padding: 16px 0;
}
.nav-menu.open { transform: translateX(0); }

.nav-user {
  padding: 12px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background .1s;
}
.nav-user:hover { background: var(--sf2); }

.nav-section { padding: 4px 0; }
.nav-section-title {
  font-size: 9px; font-weight: 600; color: var(--tx3);
  text-transform: uppercase; letter-spacing: .07em;
  padding: 8px 16px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 16px;
  border: none; background: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 500; color: var(--tx);
  cursor: pointer; text-align: left;
  transition: background .1s;
}
.nav-item:hover { background: var(--sf2); }
.nav-icon { font-size: 16px; width: 22px; text-align: center; flex-shrink: 0; }

/* ═══════════════════════════════════════════
   25. TRIP PLANNER — IMMERSIVE WORKSPACE
═══════════════════════════════════════════ */
.trip-overlay {
  position: fixed; inset: 0; z-index: 2300;
  background: rgba(0,0,0,.45); backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.trip-overlay.open { opacity: 1; pointer-events: auto; }

.trip-panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(540px, 100vw);
  background: var(--bg);
  border-left: 1px solid var(--bd);
  box-shadow: -12px 0 48px var(--shp);
  z-index: 2400;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.trip-panel.open { transform: translateX(0); }

.trip-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--bd);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--sf); flex-shrink: 0;
}
.trip-head-left { display: flex; align-items: center; gap: 10px; flex: 1; }
.trip-head-icon { font-size: 22px; }
.trip-name-input {
  font-family: 'DM Sans', sans-serif;
  font-size: 17px; font-weight: 700;
  color: var(--tx); background: none; border: none; outline: none;
  flex: 1; min-width: 0; padding: 4px 0;
}
.trip-name-input::placeholder { color: var(--tx3); }
.trip-head-right { display: flex; align-items: center; gap: 5px; }
.trip-head-btn {
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--bd); background: var(--sf2);
  font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.trip-head-btn:hover { background: var(--sf3); }
.trip-head-close {
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--bd); background: var(--sf2);
  color: var(--tx3); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.trip-head-close:hover { background: var(--sf3); color: var(--tx); }

.trip-body { flex: 1; overflow-y: auto; }
.trip-body::-webkit-scrollbar { width: 4px; }
.trip-body::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 4px; }

/* Trip hero stats */
.trip-hero {
  background: linear-gradient(140deg, var(--acc), #1a6a3a);
  color: #fff; padding: 22px 24px;
}
.trip-hero-stats { display: flex; }
.trip-hero-stat { flex: 1; text-align: center; }
.trip-hero-num { font-size: 24px; font-weight: 800; font-family: 'DM Mono', monospace; }
.trip-hero-lbl { font-size: 7.5px; text-transform: uppercase; letter-spacing: .08em; opacity: .6; margin-top: 3px; }

/* Trip origin */
.trip-origin {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-bottom: 1px solid var(--bd); background: var(--sf);
}
.trip-origin-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--acc); flex-shrink: 0; box-shadow: 0 0 0 3px rgba(36,122,66,.15); }
.trip-origin-text { font-size: 12px; color: var(--tx2); }
.trip-origin-name { font-weight: 600; color: var(--tx); }

/* Route connector line */
.trip-route-line {
  margin: 0 0 0 35px; height: 16px;
  border-left: 2px dashed var(--bd);
}

/* Rich stop cards */
.trip-stops { padding: 8px 20px 20px; }
.trip-card {
  background: var(--sf); border: 1px solid var(--bd);
  border-radius: 14px; overflow: hidden;
  margin-bottom: 4px;
  box-shadow: 0 1px 4px var(--sh);
  transition: border-color .12s;
}
.trip-card:hover { border-color: var(--bdm); }
.trip-card-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.trip-card-num {
  width: 30px; height: 30px; border-radius: 10px;
  background: var(--acc); color: #fff;
  font-size: 13px; font-weight: 700; font-family: 'DM Mono', monospace;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.trip-card-main { flex: 1; min-width: 0; }
.trip-card-name { font-size: 14px; font-weight: 700; color: var(--tx); }
.trip-card-region { font-size: 10.5px; color: var(--tx3); margin-top: 1px; }
.trip-card-remove {
  width: 26px; height: 26px; border-radius: 7px;
  border: 1px solid var(--bd); background: var(--sf2);
  color: var(--tx3); font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
}
.trip-card-remove:hover { background: #fef0ef; color: #e74c3c; border-color: #e74c3c; }
.trip-card-tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 16px 14px; }
.trip-tag {
  font-size: 10px; font-weight: 500; padding: 3px 9px;
  border-radius: 7px; border: 1px solid var(--bd);
  background: var(--sf2); color: var(--tx2);
}
.trip-tag.free { background: #e8f5ed; border-color: #90d4aa; color: #247a42; }
.trip-tag.paid { background: #fef3e2; border-color: #f0c060; color: #a06000; }
.trip-tag.rv { background: #e8f5ed; border-color: #90d4aa; color: #247a42; }
.trip-tag.reserve { background: #fce4ec; border-color: #f48fb1; color: #c62828; }

/* Empty state */
.trip-empty { text-align: center; padding: 48px 28px; color: var(--tx3); }
.trip-empty-icon { font-size: 44px; margin-bottom: 14px; opacity: .4; }
.trip-empty-title { font-size: 15px; font-weight: 600; color: var(--tx2); margin-bottom: 8px; }
.trip-empty-desc { font-size: 12px; line-height: 1.7; }

/* ═══════════════════════════════════════════
   26. PERSISTENT TRIP PILL
═══════════════════════════════════════════ */
.trip-pill {
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  z-index: 1300;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px 8px 14px;
  background: var(--sf);
  border: 1px solid var(--acc);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(0,0,0,.18), 0 0 0 1px var(--acc)33;
  font-family: 'DM Sans', sans-serif;
  opacity: 0;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
  white-space: nowrap;
}
.trip-pill.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.trip-pill-icon { font-size: 16px; flex-shrink: 0; }
.trip-pill-text {
  font-size: 12px; font-weight: 600; color: var(--tx);
}
.trip-pill-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px;
  background: var(--acc); color: #fff;
  border: none; cursor: pointer;
  transition: opacity .12s;
}
.trip-pill-btn:hover { opacity: .85; }
.trip-pill-undo {
  font-size: 14px;
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--bd); background: var(--sf2);
  color: var(--tx3); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all .12s;
}
.trip-pill-undo:hover { background: var(--sf3); color: var(--tx); }

/* Flash state when a spot is added */
.trip-pill.flash {
  border-color: var(--acc);
  background: var(--acc);
  animation: pill-flash .3s ease;
}
.trip-pill.flash .trip-pill-text { color: #fff; }
.trip-pill.flash .trip-pill-icon { filter: brightness(10); }
.trip-pill.flash .trip-pill-btn { background: #fff; color: var(--acc); }
.trip-pill.flash .trip-pill-undo { background: rgba(255,255,255,.2); border-color: rgba(255,255,255,.3); color: #fff; }
@keyframes pill-flash {
  0% { transform: translateX(-50%) scale(1.06); }
  100% { transform: translateX(-50%) scale(1); }
}

@media (max-width:700px) {
  .trip-pill { bottom: 80px; padding: 7px 8px 7px 12px; gap: 6px; }
  .trip-pill-text { font-size: 11px; }
  .trip-pill-btn { font-size: 10px; padding: 3px 10px; }
}

/* ═══════════════════════════════════════════
   27. SEARCH AUTOCOMPLETE DROPDOWN
═══════════════════════════════════════════ */
.sw { position: relative; }
.search-dropdown {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: 12px;
  box-shadow: 0 8px 28px var(--shp);
  z-index: 2000;
  max-height: 320px;
  overflow-y: auto;
  display: none;
}
.search-dropdown.open { display: block; }
.search-dropdown::-webkit-scrollbar { width: 4px; }
.search-dropdown::-webkit-scrollbar-thumb { background: var(--bd); border-radius: 4px; }

.search-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--bd);
  transition: background .08s;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: var(--sf2); }
.search-item:first-child { border-radius: 12px 12px 0 0; }
.search-item:last-child { border-radius: 0 0 12px 12px; }
.search-item:only-child { border-radius: 12px; }

.search-item-main { flex: 1; min-width: 0; }
.search-item-name {
  font-size: 13px; font-weight: 600; color: var(--tx);
  display: block; line-height: 1.3;
}
.search-item-name strong { color: var(--acc); }
.search-item-region {
  font-size: 10px; color: var(--tx3); display: block;
  margin-top: 2px;
}
.search-item-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  flex-shrink: 0; padding-top: 1px;
}
.search-item-score {
  font-size: 13px; font-weight: 700;
  font-family: 'DM Mono', monospace;
  display: flex; align-items: baseline; gap: 3px;
}
.search-item-score-label {
  font-size: 8px; font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  text-transform: uppercase; letter-spacing: .04em;
  opacity: .6;
}
.search-item-type {
  font-size: 9px; font-weight: 600;
}

@media (max-width:700px) {
  .search-dropdown {
    position: fixed;
    top: auto; bottom: auto;
    left: 10px; right: 10px;
    top: 140px;
    max-height: 50vh;
  }
}

/* ═══════════════════════════════════════════
   28. MAP CLUSTERING
═══════════════════════════════════════════ */
/* Override all default MarkerCluster styles */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large,
.marker-cluster { background: none !important; }
.marker-cluster div { background: none !important; }

.ch-cluster-wrap { background: none !important; }

.ch-cluster-sm, .ch-cluster-md, .ch-cluster-lg {
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-family: 'DM Mono', monospace;
  font-weight: 700; color: #fff;
  border: 2.5px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.2), 0 0 0 1px rgba(36,122,66,.15);
  transition: transform .15s;
  cursor: pointer;
}
.ch-cluster-sm {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, #34b85e, #247a42);
  font-size: 12px;
}
.ch-cluster-md {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, #2a8a4a, #1a6a3a);
  font-size: 13px;
}
.ch-cluster-lg {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, #1a6a3a, #145a30);
  font-size: 14px;
}
.ch-cluster-sm:hover, .ch-cluster-md:hover, .ch-cluster-lg:hover {
  transform: scale(1.08);
}

/* Dark mode cluster colors */
[data-theme="dark"] .ch-cluster-sm { background: linear-gradient(135deg, #3cc866, #2a8a4a); border-color: #242320; }
[data-theme="dark"] .ch-cluster-md { background: linear-gradient(135deg, #2a8a4a, #1a6a3a); border-color: #242320; }
[data-theme="dark"] .ch-cluster-lg { background: linear-gradient(135deg, #1a6a3a, #145a30); border-color: #242320; }

/* Cluster toggle button */
.map-cluster-btn, .map-tooltip-btn {
  width: 38px; height: 38px;
  color: var(--tx3);
}
.map-cluster-btn svg, .map-tooltip-btn svg { width: 16px; height: 16px; }
.map-cluster-btn:hover, .map-tooltip-btn:hover { background: var(--sf3); }
.map-cluster-btn.active, .map-tooltip-btn.active {
  background: var(--acc2); border-color: var(--acc); color: var(--acc);
}
@media (max-width:700px) {
  .map-cluster-btn, .map-tooltip-btn { width: 36px; height: 36px; }
}

/* ═══════════════════════════════════════════
   29. SHARED TRIP PAGE — STANDALONE
═══════════════════════════════════════════ */
.sv2 {
  min-height: 100vh; background: #f9f7f3;
  font-family: 'DM Sans', sans-serif; color: #1a1917;
}

.sv2-hero {
  position: relative; overflow: hidden;
  padding: 56px 24px 44px; text-align: center;
}
.sv2-hero-bg {
  position: absolute; inset: 0;
  background: linear-gradient(165deg, #0a2e16, #14472a 30%, #1d6638 60%, #247a42 85%, #2e9450);
}
.sv2-hero-bg::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 25% 25%, rgba(255,255,255,.07), transparent 40%),
    radial-gradient(circle at 75% 75%, rgba(0,0,0,.2), transparent 50%);
}
.sv2-hero-inner { position: relative; z-index: 1; color: #fff; }
.sv2-eyebrow { font-size: 9px; letter-spacing: .22em; text-transform: uppercase; opacity: .4; margin-bottom: 14px; }
.sv2-title { font-size: clamp(24px, 5vw, 36px); font-weight: 800; line-height: 1.1; margin-bottom: 12px; }
.sv2-subtitle { font-size: 13px; opacity: .6; }
.sv2-creator { font-size: 11px; opacity: .35; margin-top: 12px; }
.sv2-creator strong { opacity: 1; }

.sv2-map-section { position: relative; }
.sv2-map { height: 280px; }
@media(min-width:700px) { .sv2-map { height: 360px; } }

.sv2-overview {
  max-width: 440px; margin: -36px auto 0; position: relative; z-index: 2;
  background: #fff; border-radius: 18px;
  box-shadow: 0 6px 30px rgba(0,0,0,.1);
  padding: 22px 28px 18px;
}
.sv2-ov-row { display: flex; justify-content: center; }
.sv2-ov-item { flex: 1; text-align: center; }
.sv2-ov-big .sv2-ov-num { font-size: 28px; font-weight: 800; font-family: 'DM Mono', monospace; color: #1a1917; }
.sv2-ov-big .sv2-ov-lbl { font-size: 8px; color: #a09890; text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.sv2-ov-secondary {
  display: flex; justify-content: center; gap: 4px; flex-wrap: wrap;
  font-size: 11px; color: #847c72;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid #f0ece6;
}

.sv2-highlights { max-width: 640px; margin: 0 auto; padding: 28px 24px 20px; }
.sv2-sec-title { font-size: 9px; font-weight: 700; color: #b0a898; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; }
.sv2-hl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media(max-width:400px) { .sv2-hl-grid { grid-template-columns: 1fr; } }
.sv2-hl-card {
  background: #fff; border: 1px solid #eae6e0; border-radius: 14px;
  padding: 16px 18px; box-shadow: 0 1px 4px rgba(0,0,0,.03);
}
.sv2-hl-icon { font-size: 22px; margin-bottom: 8px; }
.sv2-hl-label { font-size: 9px; color: #a09890; text-transform: uppercase; letter-spacing: .06em; }
.sv2-hl-val { font-size: 16px; font-weight: 700; color: #1a1917; margin-top: 3px; }
.sv2-hl-detail { font-size: 11px; color: #847c72; margin-top: 2px; }

.sv2-journey { max-width: 640px; margin: 0 auto; padding: 24px 24px 8px; }
.sv2-origin {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; margin-bottom: 18px;
  background: #fff; border: 1px solid #eae6e0; border-radius: 14px;
  font-size: 12px; color: #847c72;
}
.sv2-origin strong { color: #1a1917; }
.sv2-origin-dot { width: 10px; height: 10px; border-radius: 50%; background: #247a42; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(36,122,66,.15); }

.sv2-segment {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 0 6px 16px;
  font-size: 10.5px; color: #c0b8a8;
}

.sv2-stop { display: flex; gap: 14px; margin-bottom: 18px; }
.sv2-stop-badge {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(140deg, #247a42, #145a2e);
  color: #fff; font-size: 13px; font-weight: 700; font-family: 'DM Mono', monospace;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
  box-shadow: 0 2px 8px rgba(36,122,66,.2);
}
.sv2-stop-body {
  flex: 1; min-width: 0;
  background: #fff; border: 1px solid #eae6e0; border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.03);
  transition: box-shadow .15s, transform .15s;
}
.sv2-stop-body:hover { box-shadow: 0 4px 18px rgba(0,0,0,.07); transform: translateY(-1px); }
.sv2-stop-head { display: flex; gap: 10px; align-items: flex-start; }
.sv2-stop-name { font-size: 15px; font-weight: 700; color: #1a1917; line-height: 1.25; }
.sv2-stop-sub { font-size: 10.5px; color: #a09890; margin-top: 2px; }
.sv2-score { flex-shrink: 0; text-align: right; }
.sv2-score-val { font-size: 20px; font-weight: 800; font-family: 'DM Mono', monospace; line-height: 1; }
.sv2-score-lbl { font-size: 7px; color: #b0a898; text-transform: uppercase; letter-spacing: .06em; }
.sv2-stop-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.sv2-tag { font-size: 10px; font-weight: 500; padding: 3px 10px; border-radius: 8px; border: 1px solid #e8e4de; background: #faf8f4; color: #6a6258; }
.t-free { background: #edf7f0; border-color: #b8e4c8; color: #1a6a3a; }
.t-paid { background: #fef8f0; border-color: #f0d890; color: #a06000; }
.t-rv { background: #edf7f0; border-color: #b8e4c8; color: #1a6a3a; }
.t-res { background: #fdf0f2; border-color: #e8a0ae; color: #a03040; }
.sv2-trail { font-size: 10.5px; color: #847c72; margin-top: 8px; }
.sv2-desc { font-size: 11.5px; color: #5a5248; line-height: 1.55; margin-top: 8px; }

.sv2-share { text-align: center; padding: 28px 24px; max-width: 640px; margin: 0 auto; }
.sv2-share-row { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.sv2-sbtn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 16px; border-radius: 9px;
  font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 600;
  text-decoration: none; border: 1px solid #e0dcd6;
  background: #fff; color: #1a1917; cursor: pointer;
}
.sv2-sbtn:hover { background: #f0ece6; }

.sv2-cta { text-align: center; padding: 36px 24px; background: #fff; border-top: 1px solid #eae6e0; }
.sv2-cta p { font-size: 13px; color: #a09890; margin-bottom: 14px; }
.sv2-cta-btn {
  display: inline-block; padding: 13px 32px; border-radius: 14px;
  background: linear-gradient(140deg, #247a42, #145a2e);
  color: #fff; font-weight: 700; font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(36,122,66,.25);
  transition: transform .12s;
}
.sv2-cta-btn:hover { transform: translateY(-2px); }
.sv2-foot { text-align: center; padding: 16px; font-size: 9px; color: #c8c0b6; }

@media(max-width:500px) {
  .sv2-hero { padding: 44px 18px 36px; }
  .sv2-overview { margin: -28px 14px 0; padding: 18px 20px 14px; }
  .sv2-ov-big .sv2-ov-num { font-size: 22px; }
  .sv2-stop-body { padding: 14px 16px; }
}

/* ═══════════════════════════════════════════
   30. CROSS-HIGHLIGHT (sidebar ↔ map)
═══════════════════════════════════════════ */
/* Card hover state */
.cc-hover {
  background: var(--acc2) !important;
  border-color: var(--acc) !important;
  box-shadow: 0 0 0 1px var(--acc)22, 0 2px 8px var(--sh) !important;
  transition: all .12s ease;
}

/* Marker hover state — glow ring, no transform (conflicts with Leaflet translate3d) */
.marker-hover {
  filter: drop-shadow(0 0 8px rgba(36,122,66,.5)) drop-shadow(0 0 3px rgba(36,122,66,.3)) !important;
  z-index: 10000 !important;
}
.marker-hover > * {
  transform: scale(1.3);
  transition: transform .15s ease;
}
/* Smooth filter transition */
.leaflet-marker-icon {
  transition: filter .15s ease;
}
.leaflet-marker-icon > * {
  transition: transform .15s ease;
}

/* Floating marker tooltip (for pins not in sidebar) */
.marker-tip {
  position: fixed; z-index: 2000;
  background: var(--sf);
  border: 1px solid var(--bd);
  border-radius: 10px;
  padding: 8px 12px;
  box-shadow: 0 4px 16px var(--shp);
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .12s, transform .12s;
  max-width: 220px;
  font-family: 'DM Sans', sans-serif;
}
.marker-tip.visible {
  opacity: 1;
  transform: translateY(0);
}
.mt-name {
  font-size: 12.5px; font-weight: 700; color: var(--tx);
  line-height: 1.3; margin-bottom: 4px;
}
.mt-meta {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px;
}
.mt-type { font-weight: 600; }
.mt-score { font-weight: 700; font-family: 'DM Mono', monospace; }
.mt-fee { color: var(--tx3); }

/* Search empty state */
.search-empty {
  padding: 14px 16px;
  font-size: 12px; color: var(--tx3);
  text-align: center;
}
.search-empty strong { color: var(--tx2); }

/* Beta badge */
.beta-badge {
  font-size: 8px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  padding: 2px 6px; border-radius: 4px;
  background: var(--acc2); color: var(--acc);
  border: 1px solid var(--acc);
  margin-left: 5px; margin-right: 4px;
  vertical-align: middle;
  position: relative; top: -1px;
}

/* Geocode search item */
.search-geo {
  background: var(--sf2) !important;
  border-top: 1px solid var(--bd);
}
.search-geo .search-item-name { color: var(--acc) !important; }
.search-geo:hover { background: var(--acc2) !important; }
