/* ═══════════════════════════════════════════════════════
   RoadSide — style.css
   ═══════════════════════════════════════════════════════ */
:root {
  --bg:         #0d0c08;
  --surface:    #16140e;
  --surface2:   #1e1c14;
  --border:     #2e2b1f;
  --amber:      #e8a020;
  --amber-dim:  #a06a10;
  --amber-glow: rgba(232,160,32,0.14);
  --red:        #c84030;
  --green:      #3a8a58;
  --blue:       #4a7cc8;
  --text:       #e8e4d8;
  --text-dim:   #8a856e;
  --text-muted: #4a4838;
  --sidebar-w:  400px;
  --header-h:   54px;
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ═══════════════ HEADER ═══════════════ */
header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px;
  background: rgba(13,12,8,0.97);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  z-index: 1000;
}
.logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 900;
  color: var(--amber); letter-spacing: -0.5px;
  white-space: nowrap;
}
.logo span { color: var(--text); }
.tagline {
  font-family: 'DM Mono', monospace;
  font-size: 10px; color: var(--text-muted);
  letter-spacing: 2px; text-transform: uppercase;
}
.header-right { margin-left: auto; }
.mode-badge {
  font-family: 'DM Mono', monospace;
  font-size: 10px; color: var(--amber);
  border: 1px solid var(--amber-dim);
  background: var(--amber-glow);
  padding: 3px 10px; border-radius: 2px;
  letter-spacing: 1px;
}

/* ═══════════════ LAYOUT ═══════════════ */
.app {
  display: flex;
  height: 100vh;
  padding-top: var(--header-h);
}

/* ═══════════════ SIDEBAR ═══════════════ */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
  z-index: 10;
}
.sheet-handle   { display: none; }
.sheet-peek     { display: none; }
.sheet-body {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column;
  padding-bottom: 20px;
}

/* ═══════════════ PANELS ═══════════════ */
.panel {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.panel-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px; letter-spacing: 2.5px;
  color: var(--text-dim); text-transform: uppercase;
  margin-bottom: 10px;
}

/* ═══════════════ INPUTS ═══════════════ */
.input-wrap {
  position: relative;
  margin-bottom: 8px;
}
.input-wrap:last-child { margin-bottom: 0; }
.stop-lbl {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--amber); pointer-events: none; z-index: 1;
}
input[type="text"] {
  width: 100%; padding: 9px 10px 9px 30px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="text"]:focus {
  border-color: var(--amber-dim);
  box-shadow: 0 0 0 3px var(--amber-glow);
}
input[type="text"]::placeholder { color: var(--text-muted); }

.btn-add-wp {
  width: 100%; background: none;
  border: 1px dashed var(--border);
  color: var(--text-dim); padding: 7px;
  border-radius: 4px; cursor: pointer;
  font-size: 12px; font-family: 'DM Sans', sans-serif;
  margin: 6px 0;
  transition: all 0.15s;
}
.btn-add-wp:hover { border-color: var(--amber-dim); color: var(--amber); }

.wp-row { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.wp-row .input-wrap { flex: 1; margin-bottom: 0; }
.btn-remove-wp {
  background: none; border: 1px solid var(--border);
  color: var(--text-muted); width: 30px; height: 30px; min-width: 30px;
  border-radius: 4px; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.btn-remove-wp:hover { border-color: var(--red); color: var(--red); }

/* ═══════════════ AUTOCOMPLETE ═══════════════ */
.ac-wrap { position: relative; }
.ac-drop {
  position: absolute; top: calc(100% + 2px); left: 0; right: 0; z-index: 9999;
  background: var(--surface); border: 1px solid var(--amber-dim);
  border-radius: 4px; max-height: 220px; overflow-y: auto;
  box-shadow: 0 8px 30px rgba(0,0,0,0.7);
  display: none;
}
.ac-drop.open { display: block; }
.ac-item {
  padding: 9px 14px; font-size: 13px; cursor: pointer;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: baseline; gap: 8px;
  transition: background 0.1s;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.hi { background: var(--amber-glow); color: var(--amber); }
.ac-type {
  font-size: 10px; color: var(--text-muted);
  font-family: 'DM Mono', monospace;
  white-space: nowrap; margin-left: auto;
}

/* ═══════════════ MODE CARDS ═══════════════ */
.mode-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 6px; margin-bottom: 10px;
}
.mode-card {
  border: 1px solid var(--border); border-radius: 4px;
  padding: 9px 10px; cursor: pointer;
  background: var(--surface2); transition: all 0.15s;
  display: flex; flex-direction: column; gap: 2px;
}
.mode-card:hover { border-color: var(--amber-dim); }
.mode-card.active { border-color: var(--amber); background: var(--amber-glow); }
.mc-icon { font-size: 14px; }
.mc-name { font-size: 11px; font-weight: 500; color: var(--text); }
.mc-desc { font-size: 10px; color: var(--text-dim); }

/* ═══════════════ HOTEL SETTINGS ═══════════════ */
.hotel-settings-row { display: flex; gap: 10px; }
.hs-field { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.hs-label { font-size: 10px; font-family: 'DM Mono', monospace; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.hs-date-input {
  width: 100%; padding: 5px 8px; border-radius: 4px;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--text); font-size: 12px; font-family: 'DM Mono', monospace;
  color-scheme: dark;
}
.hs-date-input:focus { outline: none; border-color: var(--amber); }
.rate-type-toggle { display: flex; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.rt-btn {
  flex: 1; padding: 5px 0; font-size: 11px; font-family: 'DM Mono', monospace;
  background: var(--surface2); border: none; color: var(--text-dim); cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.rt-btn + .rt-btn { border-left: 1px solid var(--border); }
.rt-btn.active { background: var(--amber); color: var(--bg); font-weight: 600; }

/* ═══════════════ TIME LIMIT ═══════════════ */
.time-limit-row {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border: 1px solid var(--border);
  border-radius: 4px; background: var(--surface2);
}
.tl-toggle {
  display: flex; align-items: center; gap: 7px;
  cursor: pointer; flex-shrink: 0; font-size: 12px;
  color: var(--text-dim); white-space: nowrap;
}
.tl-box {
  width: 15px; height: 15px; border-radius: 3px;
  border: 1.5px solid var(--text-muted); flex-shrink: 0;
  position: relative; transition: all 0.15s;
}
.tl-box.on {
  background: var(--amber); border-color: var(--amber);
}
.tl-box.on::after {
  content: '✓'; position: absolute;
  top: -2px; left: 1px; font-size: 11px;
  color: #0d0c08; font-weight: 700;
}
input[type="range"] {
  flex: 1; accent-color: var(--amber);
  background: none; border: none; outline: none;
  padding: 0; min-width: 0;
}
.tl-val {
  font-family: 'DM Mono', monospace; font-size: 12px;
  color: var(--amber); min-width: 32px; text-align: right;
}

/* ═══════════════ CATEGORIES ═══════════════ */
.cat-row {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.cat-pill {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 4px 9px; font-size: 11px; cursor: pointer;
  color: var(--text-dim); background: var(--surface2);
  transition: all 0.15s;
}
.cat-pill:hover { border-color: var(--amber-dim); color: var(--text); }
.cat-pill.active { border-color: var(--amber); color: var(--amber); background: var(--amber-glow); }
.cat-pill.dimmed { opacity: 0.35; pointer-events: auto; }
.cat-pill.dimmed:hover { opacity: 0.6; border-color: var(--amber-dim); color: var(--text); }

/* ═══════════════ PLAN BUTTON ═══════════════ */
.btn-plan {
  margin: 14px 16px 0;
  width: calc(100% - 32px); padding: 12px;
  background: var(--amber); color: #0d0c08;
  border: none; border-radius: 4px;
  font-family: 'DM Mono', monospace; font-size: 12px;
  font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase;
  cursor: pointer; transition: all 0.2s;
}
.btn-plan:hover { background: #f0b030; box-shadow: 0 4px 20px rgba(232,160,32,0.3); }
.btn-plan:active { transform: scale(0.98); }

/* ═══════════════ EMPTY STATE ═══════════════ */
.empty-state {
  padding: 40px 20px; text-align: center;
}
.empty-icon { font-size: 42px; margin-bottom: 10px; opacity: 0.4; }
.empty-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px; color: var(--text-dim); margin-bottom: 6px;
}
.empty-sub { font-size: 12px; color: var(--text-muted); line-height: 1.6; }

/* ═══════════════ ROUTE SUMMARY ═══════════════ */
.route-summary {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
}
.stat-box {
  flex: 1; padding: 12px 14px;
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.stat-box:last-child { border-right: none; }
.stat-val {
  font-family: 'DM Mono', monospace; font-size: 18px;
  color: var(--amber); font-weight: 500;
}
.stat-label {
  font-size: 9px; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 1px;
}

/* ═══════════════ TABS ═══════════════ */
.tabs {
  display: flex; border-bottom: 1px solid var(--border);
}
.tab {
  flex: 1; padding: 9px 0; text-align: center; cursor: pointer;
  font-family: 'DM Mono', monospace; font-size: 10px;
  color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: all 0.15s;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--amber); border-bottom-color: var(--amber); }

/* ═══════════════ ATTRACTION CARDS ═══════════════ */
.cards-header {
  padding: 10px 16px 6px;
  display: flex; align-items: center; justify-content: space-between;
}
.cards-count {
  font-family: 'DM Mono', monospace; font-size: 10px; color: var(--text-dim);
}
.sort-sel {
  font-family: 'DM Mono', monospace; font-size: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-dim); padding: 3px 7px; border-radius: 3px;
  cursor: pointer; outline: none;
}

.attr-card {
  margin: 0 12px 8px;
  border: 1px solid var(--border); border-radius: 5px;
  background: var(--surface2); cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  overflow: hidden;
  animation: cardIn 0.25s ease forwards;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateX(-10px); }
  to   { opacity: 1; transform: translateX(0); }
}
.attr-card:hover { border-color: var(--amber-dim); transform: translateX(3px); }
.attr-card.selected { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.attr-card.on-route { border-left: 3px solid var(--green); }

.card-top { padding: 10px 12px 5px; display: flex; gap: 8px; }
.card-rank { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--text-muted); padding-top: 2px; min-width: 20px; }
.card-info { flex: 1; }
.card-name { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.3; margin-bottom: 3px; }
.card-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.card-cat { font-size: 10px; color: var(--text-dim); }
.card-stars { color: var(--amber); font-size: 10px; letter-spacing: -1px; }
.card-rating { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--text-dim); }

.card-bot { padding: 0 12px 10px 40px; }
.card-desc { font-size: 11px; color: var(--text-dim); line-height: 1.5; margin-bottom: 7px; }
.card-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-loc { font-family: 'DM Mono', monospace; font-size: 10px; color: var(--text-muted); }
.card-detour { font-size: 10px; color: var(--text-dim); }
.btn-card-add {
  margin-left: auto;
  font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: 0.5px;
  padding: 4px 10px; border-radius: 3px;
  border: 1px solid var(--border); background: none;
  color: var(--text-dim); cursor: pointer; transition: all 0.15s;
}
.btn-card-add:hover { border-color: var(--green); color: var(--green); }
.btn-card-add.added { border-color: var(--green); color: var(--green); background: rgba(58,138,88,0.12); }

/* ── Action row (Google Maps + Email) ── */
.action-row {
  display: flex; gap: 8px; margin: 10px 16px 0;
}
.btn-open-gmaps, .btn-email-itin {
  flex: 1; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--amber-dim);
  background: rgba(232,160,32,0.1);
  color: var(--amber); font-size: 13px; font-weight: 600;
  font-family: 'DM Mono', monospace; letter-spacing: 0.02em;
  cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.1s;
  text-align: center;
}
.btn-open-gmaps:hover, .btn-email-itin:hover {
  background: rgba(232,160,32,0.2); border-color: var(--amber); transform: translateY(-1px);
}
.btn-open-gmaps:active, .btn-email-itin:active { transform: translateY(0); }

/* ═══════════════ ITINERARY ═══════════════ */
.itin-list { padding: 12px 16px; }
.itin-stop {
  display: flex; align-items: flex-start; gap: 10px;
  padding-bottom: 0;
}
.itin-dot-col { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.itin-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 3px;
}
.itin-dot.origin   { background: var(--green); }
.itin-dot.dest     { background: var(--red); }
.itin-dot.attr     { background: var(--amber); }
.itin-dot.wp       { background: var(--blue); }
.itin-hotels { margin-top: 6px; }
.btn-find-hotels {
  margin-top: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-find-hotels:hover { border-color: var(--amber); color: var(--amber); }
.btn-find-hotels:disabled { opacity: 0.5; cursor: default; }
.itin-hotels-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.itin-hotels-label { font-size: 10px; color: var(--text-dim); font-family: 'DM Mono', monospace; }
.perdiem-note { color: var(--text-muted); }
.btn-hotel-refresh {
  background: none; border: none; color: var(--text-dim); cursor: pointer;
  font-size: 14px; padding: 0 2px; line-height: 1; opacity: 0.6;
  transition: opacity 0.15s, color 0.15s;
}
.btn-hotel-refresh:hover { opacity: 1; color: var(--amber); }
.itin-dot.hotel { background: #8855cc; }
.itin-hotel { padding: 4px 8px; margin-bottom: 3px; border-radius: 4px; background: var(--surface2); border: 1px solid var(--border); }
.itin-hotel-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.itin-hotel-name { font-size: 11px; font-weight: 500; color: var(--amber); text-decoration: none; }
.itin-hotel-name:hover { text-decoration: underline; }
.btn-hotel-add {
  flex-shrink: 0;
  padding: 2px 6px; font-size: 9px; font-family: 'DM Mono', monospace;
  background: none; border: 1px solid var(--border); border-radius: 3px;
  color: var(--text-dim); cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
.btn-hotel-add:hover { border-color: var(--green); color: var(--green); }
.btn-hotel-add.added { border-color: var(--green); color: var(--green); opacity: 0.6; cursor: default; }
.itin-hotel-addr { font-size: 10px; color: var(--text-dim); margin-top: 1px; }
.itin-hotel-rates { display: flex; gap: 8px; margin-top: 3px; }
.rate-std { font-size: 10px; font-family: 'DM Mono', monospace; color: var(--text); }
.rate-std.rate-under { color: var(--green); }
.rate-std.rate-over  { color: var(--red); }
.rate-gov { font-size: 10px; color: var(--text-dim); font-family: 'DM Mono', monospace; }
.itin-line { width: 2px; flex: 1; min-height: 20px; background: var(--border); margin: 3px 0; }
.itin-info { flex: 1; padding-bottom: 4px; }
.itin-name { font-size: 12px; font-weight: 500; color: var(--text); }
.itin-seg {
  font-family: 'DM Mono', monospace; font-size: 10px;
  margin-top: 3px; padding: 2px 6px; border-radius: 2px;
  display: inline-block;
}
.itin-seg.ok      { color: var(--green);    border: 1px solid rgba(58,138,88,0.4); }
.itin-seg.warning { color: var(--red);      border: 1px solid rgba(200,64,48,0.4); }

/* ── Leg time labels on route ── */
.leg-label {
  background: rgba(13,12,8,0.82);
  border: 1px solid rgba(74,124,200,0.55);
  color: #8ab4f8;
  font-family: 'DM Mono', monospace;
  font-size: 10px; font-weight: 500;
  padding: 2px 7px; border-radius: 10px;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ═══════════════ MAP ═══════════════ */
.map-area { flex: 1; position: relative; }
#map { width: 100%; height: 100%; }

/* Override Leaflet attribution styling */
.leaflet-control-attribution {
  background: rgba(13,12,8,0.7) !important;
  color: var(--text-muted) !important;
  font-size: 9px !important;
}
.leaflet-control-attribution a { color: var(--text-dim) !important; }

/* Routing machine panel — hide the verbose directions box */
.leaflet-routing-container { display: none !important; }

.map-overlay-top {
  position: absolute; top: 12px; right: 12px; z-index: 500;
  display: flex; flex-direction: column; gap: 5px;
}
.map-btn {
  width: 34px; height: 34px;
  background: rgba(22,20,14,0.92); border: 1px solid var(--border);
  border-radius: 4px; cursor: pointer; color: var(--text-dim); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(6px); transition: all 0.15s;
}
.map-btn:hover { border-color: var(--amber-dim); color: var(--amber); }

/* ── Custom Leaflet marker ── */
.custom-pin {
  width: 28px; height: 28px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,0.25);
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.custom-pin-inner {
  transform: rotate(45deg);
  font-size: 12px; line-height: 1;
}
.pin-origin  { background: var(--green); }
.pin-dest    { background: var(--red); }
.pin-wp      { background: var(--blue); }
.pin-attr    { background: var(--amber); }
.pin-attr.on-route { background: var(--red); }

/* ── Attraction popup (map overlay, not Leaflet popup) ── */
.attr-popup {
  position: absolute; bottom: 20px; left: 20px; z-index: 600;
  width: 300px; max-width: calc(100vw - 40px);
  background: rgba(22,20,14,0.96); border: 1px solid var(--amber-dim);
  border-radius: 6px; padding: 14px 16px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
  animation: popIn 0.2s ease;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.attr-popup-close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 16px; line-height: 1;
}
.attr-popup-close:hover { color: var(--text); }
.attr-popup-name {
  font-family: 'Playfair Display', serif;
  font-size: 15px; color: var(--amber); margin-bottom: 3px; margin-right: 20px;
}
.attr-popup-meta { font-size: 11px; color: var(--text-dim); margin-bottom: 8px; }
.attr-popup-desc { font-size: 12px; color: var(--text); line-height: 1.5; margin-bottom: 10px; }
.attr-popup-stats { display: flex; gap: 16px; margin-bottom: 12px; }
.ap-stat { display: flex; flex-direction: column; gap: 2px; }
.ap-sv { font-family: 'DM Mono', monospace; font-size: 14px; color: var(--amber); }
.ap-sl { font-size: 9px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 1px; }
.btn-add-to-route {
  width: 100%; padding: 8px;
  background: var(--amber); color: #0d0c08;
  border: none; border-radius: 4px;
  font-family: 'DM Mono', monospace; font-size: 11px; letter-spacing: 1px;
  cursor: pointer; transition: all 0.15s;
}
.btn-add-to-route:hover { background: #f0b030; }
.btn-add-to-route.on-route { background: var(--surface2); color: var(--green); border: 1px solid var(--green); }

/* ═══════════════ LOADING ═══════════════ */
.loading-veil {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(13,12,8,0.75);
  display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.loading-veil.show { display: flex; }
.loading-box {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--amber);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-msg {
  font-family: 'DM Mono', monospace; font-size: 11px;
  color: var(--text-dim); letter-spacing: 1px;
}

/* ═══════════════ TOAST ═══════════════ */
.toast {
  position: fixed; top: 64px; right: 16px; z-index: 3000;
  background: var(--surface); border: 1px solid var(--amber-dim);
  border-radius: 4px; padding: 9px 14px;
  font-size: 13px; color: var(--text);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  max-width: 300px; pointer-events: none;
  opacity: 0; transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ═══════════════ MOBILE ═══════════════ */
@media (max-width: 768px) {
  header { padding: 0 14px; }
  .tagline { display: none; }
  .logo { font-size: 19px; }

  .app { position: relative; }

  /* Map fills full screen */
  .map-area {
    position: absolute; inset: 0;
  }

  /* Sidebar = bottom sheet */
  .sidebar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    width: 100%; min-width: unset;
    border-right: none; border-top: 1px solid var(--border);
    border-radius: 14px 14px 0 0;
    max-height: 88vh;
    transform: translateY(calc(100% - 72px));
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -6px 40px rgba(0,0,0,0.7);
    z-index: 600;
  }
  .sidebar.open { transform: translateY(0); }

  .sheet-handle {
    display: flex; flex-direction: column; align-items: center;
    padding: 8px 0 4px; cursor: pointer; gap: 4px; flex-shrink: 0;
  }
  .sheet-handle-bar {
    width: 34px; height: 4px; background: var(--border); border-radius: 2px;
  }
  .sheet-handle-label {
    font-family: 'DM Mono', monospace; font-size: 9px;
    color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase;
  }

  .sheet-peek {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 14px 10px;
  }
  .sheet-peek-inputs { flex: 1; display: flex; flex-direction: column; gap: 5px; }
  .sheet-peek .input-wrap { margin-bottom: 0; }
  .sheet-peek input { font-size: 12px; padding: 7px 10px 7px 26px; }

  /* Hide full content while collapsed, show while open */
  .sheet-body { display: none; }
  .sidebar.open .sheet-body { display: flex; }
  .sidebar.open .sheet-peek { display: none; }

  .btn-go-mobile {
    background: var(--amber); border: none; border-radius: 8px;
    width: 44px; height: 44px; min-width: 44px;
    font-size: 20px; cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 12px rgba(232,160,32,0.4);
  }

  .attr-popup { left: 10px; right: 10px; width: auto; bottom: 80px; }
}

/* ── Leaflet tooltip custom style ── */
.rs-tooltip {
  background: rgba(22,20,14,0.92) !important;
  border: 1px solid var(--amber-dim) !important;
  color: var(--text) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 12px !important;
  padding: 4px 8px !important;
  border-radius: 3px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
}
.rs-tooltip::before { display: none !important; }

/* ── Leaflet zoom control ── */
.leaflet-control-zoom a {
  background: rgba(22,20,14,0.92) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-dim) !important;
}
.leaflet-control-zoom a:hover {
  background: var(--amber-glow) !important;
  color: var(--amber) !important;
}
