/*
 * Design philosophy: "אטלס שכבות חי" — Even Derech's cool blue-grey ground,
 * translucent learning surfaces and teal actions, translated into a compact
 * field map where every colour identifies a meaningful layer.
 */
@import url('../vendor/fonts/rubik/rubik.css');
@import url('../vendor/fonts/secular/secular.css');

:root {
  /* ---- Ground ----------------------------------------------------------
     A field tool read in direct sun, one-handed, mid-sentence in front of a
     group. The ground is near-white rather than the old beige: beige on beige
     read as an archive document, and it cost contrast outdoors. The warmth now
     lives in the accents instead of the paper. */
  --bg:            #FBFAF7;
  --bg-sunk:       #F2EFE8;
  --bg-panel:      #FFFFFF;
  --bg-panel-2:    #F7F4EE;

  --text:          #1E1B16;
  --text-dim:      #6B6355;
  --text-faint:    #9A9184;

  /* ---- Accents ---------------------------------------------------------
     One brand teal carries interactive state everywhere. The rest are layer
     identities: each map layer owns a hue that repeats in its panel header,
     its legend and its markers, so colour means something. */
  --accent:        #0E9C8E;
  --accent-dark:   #0A7A6F;
  --accent-soft:   #E4F5F2;

  --c-regions:     #C2622F;
  --c-visitor:     #2F7D5B;
  --c-nature:      #5E8C3A;
  --c-topo:        #7A6A52;
  --c-geology:     #C98A3A;
  --c-timeline:    #B23A48;
  --c-religion:    #7A4EA8;
  --c-route:       #EF6F53;

  --danger:        #D6452B;
  --warn-bg:       #FFF4DE;
  --warn-border:   #E8C98A;
  --warn-text:     #8A5F1E;
  --ok-bg:         #E3F3EC;
  --ok-border:     #A8D3C0;
  --ok-text:       #1F6B4C;

  --border:        #E5DFD3;
  --border-strong: #D3CABA;

  /* ---- Type scale ------------------------------------------------------
     Six steps on a ~1.25 ratio, replacing the eighteen ad-hoc sizes this file
     had grown. Fewer sizes is most of what "designed" looks like. */
  --fs-xs:   0.75rem;
  --fs-sm:   0.875rem;
  --fs-base: 1rem;
  --fs-lg:   1.25rem;
  --fs-xl:   1.625rem;
  --fs-2xl:  2.125rem;

  --font-body:    'Rubik', "Segoe UI", Arial, sans-serif;
  --font-display: 'Secular One', 'Rubik', "Segoe UI", Arial, sans-serif;

  /* ---- Space & shape ---------------------------------------------------- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px;

  --r-sm:   10px;
  --r-md:   18px;
  --r-lg:   26px;
  --r-full: 999px;

  --shadow-sm: 0 1px 2px rgba(30,27,22,.06), 0 2px 6px rgba(30,27,22,.05);
  --shadow:    0 2px 6px rgba(30,27,22,.06), 0 10px 26px -8px rgba(30,27,22,.14);
  --shadow-lg: 0 -10px 40px -12px rgba(30,27,22,.22);
  --shadow-pop: 0 12px 34px -10px rgba(14,156,142,.36);

  /* ---- Motion ----------------------------------------------------------- */
  --ease-out:   cubic-bezier(.22,1,.36,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --t-fast: .16s;
  --t-med:  .28s;

  /* back-compat aliases so existing rules keep resolving */
  --accent-2: #F2A93B; --accent-2-dark: #D98A1F; --accent-3: var(--c-route);
  --radius: var(--r-md); --radius-sm: var(--r-sm);
}

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

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: var(--font-body);
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  direction: rtl;
  -webkit-tap-highlight-color: transparent;
}

button, input { font-family: inherit; }

h1, h2, h3, .display { font-family: var(--font-display); font-weight: 400; letter-spacing: .002em; }

:where(button, a, input, [tabindex]):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ============================ header ============================ */
#app-header {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-2) var(--s-3);
  padding-top: max(var(--s-2), env(safe-area-inset-top));
  padding-left: max(var(--s-3), env(safe-area-inset-left));
  padding-right: max(var(--s-3), env(safe-area-inset-right));
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  min-height: 60px;
  position: relative;
  z-index: 1100;
}
#app-header .logo { width: 34px; height: 34px; flex-shrink: 0; display: block; }

#app-header h1 {
  font-size: var(--fs-lg);
  margin: 0;
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
/* the full name never fits beside four controls on a phone; the short form is
   the real title there and the long one returns when there is room */
#app-header h1 .long { display: none; }
@media (min-width: 560px) { #app-header h1 .long { display: inline; } }

#app-header button {
  background: var(--bg-panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 0 var(--s-3);
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 600;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--t-fast) var(--ease-spring),
              background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
#app-header button svg,
#app-header button img { width: 21px; height: 21px; display: block; }
#app-header button:active { transform: scale(.92); }
#app-header button:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-dark); }
#app-header button.active { background: var(--accent); color: #fff; border-color: var(--accent); }

#offline-indicator {
  background: var(--danger);
  color: #fff;
  padding: 5px var(--s-3);
  border-radius: var(--r-full);
  font-size: var(--fs-xs);
  font-weight: 600;
}

#app-body { position: relative; height: calc(100% - 60px); overflow: hidden; }
#map { position: absolute; inset: 0; background: var(--bg-sunk); }

/* ============================ sidebar =========================== */
#sidebar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-height: 82vh;
  /* faint contour paper behind the panels, so the sheet reads as a surface
     rather than a flat grey rectangle. The asset carries the drawing; the
     stylesheet only places it. */
  background: var(--bg) url('../assets/illustrations/texture-contours.svg') repeat;
  border-top: 1px solid var(--border);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--s-2) var(--s-3) var(--s-4);
  padding-bottom: max(var(--s-4), env(safe-area-inset-bottom));
  z-index: 900;
  transform: translateY(100%);
  transition: transform var(--t-med) var(--ease-out);
}
#sidebar::before {
  content: "";
  display: block;
  width: 44px; height: 5px;
  border-radius: var(--r-full);
  background: var(--border-strong);
  margin: var(--s-1) auto var(--s-4);
}
#sidebar:not(.collapsed) { transform: translateY(0); }

/* panels rise in sequence when the sheet opens, so it reads as one movement
   rather than a wall of boxes appearing at once */
#sidebar:not(.collapsed) .panel { animation: panel-in .42s var(--ease-out) backwards; }
#sidebar:not(.collapsed) .panel:nth-of-type(1) { animation-delay: .02s; }
#sidebar:not(.collapsed) .panel:nth-of-type(2) { animation-delay: .06s; }
#sidebar:not(.collapsed) .panel:nth-of-type(3) { animation-delay: .10s; }
#sidebar:not(.collapsed) .panel:nth-of-type(4) { animation-delay: .14s; }
#sidebar:not(.collapsed) .panel:nth-of-type(5) { animation-delay: .18s; }
#sidebar:not(.collapsed) .panel:nth-of-type(6) { animation-delay: .21s; }
#sidebar:not(.collapsed) .panel:nth-of-type(n+7) { animation-delay: .24s; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

#sidebar-backdrop {
  position: fixed; inset: 0;
  background: rgba(30, 27, 22, .38);
  backdrop-filter: blur(2px);
  z-index: 850;
  animation: fade-in var(--t-med) var(--ease-out);
}
#sidebar-backdrop.hidden { display: none; }
@keyframes fade-in { from { opacity: 0 } to { opacity: 1 } }

.group-label {
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  letter-spacing: .1em;
  color: var(--text-faint);
  margin: var(--s-5) var(--s-1) var(--s-2);
}
.group-label:first-of-type { margin-top: 0; }

/* ============================ panels ============================ */
.panel {
  --panel-color: var(--accent);
  position: relative;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 0 var(--s-4);
  margin-bottom: var(--s-3);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--t-med), border-color var(--t-med);
}
.panel:hover { box-shadow: var(--shadow); }
.panel.is-on { border-color: color-mix(in srgb, var(--panel-color) 45%, var(--border)); }

/* illustrated banner: the artwork is an <img> asset, not CSS shapes */
.panel-banner {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 40 / 11;
  object-fit: cover;
  background: color-mix(in srgb, var(--panel-color) 10%, #fff);
  border-bottom: 1px solid var(--border);
}
.panel h2 {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-lg);
  margin: 0;
  padding: var(--s-3) var(--s-4) var(--s-2);
  color: var(--text);
}
.panel h2 img { width: 26px; height: 26px; flex-shrink: 0; }
.panel > *:not(.panel-banner):not(h2) { margin-left: var(--s-4); margin-right: var(--s-4); }

.layer-toggle {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  cursor: pointer;
  font-size: var(--fs-base);
  font-weight: 500;
  min-height: 46px;
  border-radius: var(--r-sm);
  transition: color var(--t-fast);
}
.layer-toggle:hover { color: var(--accent-dark); }
.layer-toggle input[type="checkbox"],
.chip input[type="checkbox"] {
  width: 22px; height: 22px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}

.hint { font-size: var(--fs-xs); color: var(--text-dim); margin: var(--s-1) 0; line-height: 1.6; }

/* ============================ timeline ========================== */
#period-slider-wrap { margin-top: var(--s-3); }
#period-slider {
  width: 100%;
  accent-color: var(--c-timeline);
  height: 6px;
  cursor: pointer;
}
.period-label {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-display);
  margin-top: var(--s-3);
  font-size: var(--fs-lg);
}
.period-label img { width: 30px; height: 30px; }
.period-range { color: var(--text-dim); font-size: var(--fs-xs); margin-right: 38px; }

#temple-era-filters { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-3); }
.chip {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: var(--s-2) var(--s-3);
  min-height: 42px;
  cursor: pointer;
  width: fit-content;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.chip:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ============================ chips/filters ===================== */
.religion-filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.religion-chip {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: var(--s-2) var(--s-4);
  min-height: 42px;
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: 600;
  background: var(--bg-panel-2);
  transition: transform var(--t-fast) var(--ease-spring), border-color var(--t-fast), background var(--t-fast);
}
.religion-chip:active { transform: scale(.95); }
.religion-chip .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.religion-chip img { width: 20px; height: 20px; flex-shrink: 0; }
.religion-chip.active { border-color: var(--accent); background: var(--accent-soft); }

.geology-subtoggle {
  display: flex; gap: var(--s-1); margin: var(--s-3) 0;
  background: var(--bg-sunk);
  padding: var(--s-1);
  border-radius: var(--r-full);
}
.geology-subtoggle button {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: var(--r-full);
  padding: var(--s-2);
  min-height: 40px;
  font-weight: 600;
  font-size: var(--fs-sm);
  cursor: pointer;
  color: var(--text-dim);
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.geology-subtoggle button.active {
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.legend { margin-top: var(--s-2); display: flex; flex-direction: column; gap: var(--s-1); max-height: 240px; overflow-y: auto; }
.legend .legend-item {
  display: flex; align-items: center; gap: var(--s-2);
  font-size: var(--fs-sm); padding: 3px 0;
}
.legend .swatch {
  width: 22px; height: 22px; border-radius: 6px; display: inline-block; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
  background-repeat: repeat;   /* the unit's geological ornament tiles inside it */
}
.legend .legend-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.legend .legend-sub { font-size: var(--fs-xs); color: var(--text-faint); }
.legend .legend-note {
  margin: var(--s-3) 0 0;
  padding-top: var(--s-2);
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  line-height: 1.55;
  color: var(--text-faint);
}

.filters { display: flex; flex-direction: column; gap: var(--s-1); margin-top: var(--s-2); }
.filter-item { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-sm); min-height: 40px; cursor: pointer; }
.filter-item input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; }
.filter-item .swatch { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }

/* operator chips */
.operator-chips { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-3); }
.operator-chip {
  display: flex; align-items: center; gap: var(--s-3);
  width: 100%; min-height: 52px;
  padding: var(--s-2) var(--s-3);
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-panel-2);
  color: var(--text);
  font-family: inherit; font-size: var(--fs-sm); font-weight: 600;
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), opacity var(--t-fast), transform var(--t-fast) var(--ease-spring);
}
.operator-chip img { width: 26px; height: 26px; flex-shrink: 0; }
.operator-chip .dot { width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0; }
.operator-chip .op-label { flex: 1; text-align: right; }
.operator-chip .op-count {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 2px 10px;
  font-size: var(--fs-xs);
  font-variant-numeric: tabular-nums;
  color: var(--text-dim);
}
.operator-chip.active { border-color: var(--accent); background: var(--accent-soft); }
.operator-chip:not(.active) { opacity: .45; }
.operator-chip:active { transform: scale(.98); }
.operator-actions { margin-top: var(--s-2); }
.operator-actions .btn-secondary { width: 100%; }
.operator-chips.dimmed, .operator-actions.dimmed { opacity: .5; }

/* ============================ route ============================= */
.route-summary {
  margin: var(--s-3) 0 var(--s-1);
  padding: var(--s-3);
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-panel-2));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--border));
  border-radius: var(--r-sm);
  display: flex; flex-direction: column; gap: var(--s-1);
}
.route-summary strong { font-family: var(--font-display); font-size: var(--fs-lg); color: var(--accent-dark); }
.route-summary .route-note { font-size: var(--fs-xs); line-height: 1.5; color: var(--text-dim); }

#route-list { list-style: none; margin: var(--s-2) 0; padding: 0; display: flex; flex-direction: column; gap: var(--s-2); }
#route-list li {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--s-2) var(--s-3);
  min-height: 46px;
  font-size: var(--fs-sm);
}
#route-list li button {
  background: none; border: none; cursor: pointer;
  color: var(--danger); font-size: var(--fs-base);
  min-width: 36px; min-height: 36px; border-radius: var(--r-sm);
}
.route-actions { display: flex; gap: var(--s-2); margin-top: var(--s-2); flex-wrap: wrap; }

.btn-primary, .btn-secondary {
  border-radius: var(--r-sm);
  padding: var(--s-3) var(--s-4);
  min-height: 48px;
  font-weight: 600;
  font-size: var(--fs-sm);
  cursor: pointer;
  font-family: inherit;
  transition: transform var(--t-fast) var(--ease-spring), background var(--t-fast), box-shadow var(--t-fast);
}
.btn-primary {
  background: var(--accent); color: #fff; border: none;
  box-shadow: var(--shadow-pop);
  width: 100%;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active, .btn-secondary:active { transform: scale(.97); }
.btn-secondary {
  background: var(--bg-panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  flex: 1;
}
.btn-secondary:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }

/* ============================ info panel ======================== */
#info-panel {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-height: 76vh;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: var(--s-5) var(--s-4) var(--s-4);
  padding-bottom: max(var(--s-4), env(safe-area-inset-bottom));
  z-index: 1000;
  animation: sheet-up .34s var(--ease-out);
}
@keyframes sheet-up { from { transform: translateY(28px); opacity: 0 } to { transform: none; opacity: 1 } }
#info-panel.hidden { display: none; }
#info-panel::before {
  content: "";
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 44px; height: 5px; border-radius: var(--r-full); background: var(--border-strong);
}
#btn-close-info {
  position: absolute; top: var(--s-3); left: var(--s-3);
  background: var(--bg-panel-2); border: 1px solid var(--border);
  width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; font-size: var(--fs-base); color: var(--text-dim);
  transition: background var(--t-fast), color var(--t-fast);
}
#btn-close-info:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

#info-content h3 { font-size: var(--fs-xl); margin: 0 0 var(--s-1); color: var(--accent-dark); line-height: 1.2; }
#info-content .meta { font-size: var(--fs-xs); color: var(--text-faint); margin-bottom: var(--s-2); }
#info-content p { font-size: var(--fs-sm); line-height: 1.75; color: var(--text); }
#info-content h4 {
  margin: var(--s-4) 0 var(--s-1); font-size: var(--fs-base);
  display: flex; align-items: center; gap: 7px;
}
#info-content h4 img { width: 21px; height: 21px; flex-shrink: 0; }
.visitor-phone img { width: 19px; height: 19px; vertical-align: -4px; margin-left: 5px; }
#info-content .sources a img { width: 16px; height: 16px; vertical-align: -3px; margin-left: 4px; }
#info-content .sources { margin-top: var(--s-3); font-size: var(--fs-xs); display: flex; flex-direction: column; gap: 3px; }
#info-content .sources strong { color: var(--text-dim); }
#info-content .sources a { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }

.add-route-btn {
  margin-top: var(--s-4);
  width: 100%;
  background: var(--accent-2);
  color: var(--text);
  border: none;
  border-radius: var(--r-sm);
  padding: var(--s-3);
  min-height: 50px;
  font-weight: 700;
  font-size: var(--fs-sm);
  cursor: pointer;
  font-family: inherit;
  transition: transform var(--t-fast) var(--ease-spring), background var(--t-fast);
}
.add-route-btn:hover { background: var(--accent-2-dark); }
.add-route-btn:active { transform: scale(.97); }

/* tables */
.operator-tag {
  display: inline-flex; align-items: center; gap: 6px;
  color: #fff; font-size: var(--fs-xs); font-weight: 600;
  padding: 4px 12px 4px 10px; border-radius: var(--r-full); margin: var(--s-2) 0 var(--s-1);
}
.operator-tag img { width: 18px; height: 18px; filter: brightness(0) invert(1); }

/* the rock family this unit belongs to, shown with the ornament the map uses */
.rock-class {
  display: flex; width: fit-content; align-items: center; gap: var(--s-2);
  margin: 0 0 var(--s-3); padding: 4px 12px 4px 6px;
  border: 1px solid var(--border); border-radius: var(--r-full);
  background: var(--bg-panel-2); font-size: var(--fs-xs); font-weight: 600; color: var(--text-dim);
}
.rock-class img {
  width: 24px; height: 24px; border-radius: 5px;
  background: var(--bg-sunk); box-shadow: inset 0 0 0 1px rgba(0,0,0,.10);
}
.hours-table, .price-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.hours-table td, .price-table td { padding: 6px 2px; border-bottom: 1px solid var(--border); }
.hours-table td.p, .price-table td.p { text-align: left; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.price-table .note-row td { font-size: var(--fs-xs); color: var(--text-dim); border-bottom: none; padding-top: 0; }
.price-block { margin-bottom: var(--s-3); }
.hours-special { font-size: var(--fs-xs); color: var(--text-dim); margin: var(--s-2) 0 0; }
.visitor-phone { font-size: var(--fs-sm); }

.freshness {
  margin: var(--s-3) 0 var(--s-1);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-sm);
  font-size: var(--fs-xs);
  line-height: 1.5;
}
.freshness.stale { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); }
.freshness.checking { background: var(--bg-panel-2); border: 1px solid var(--border); color: var(--text-dim); }
.freshness.fresh { background: var(--ok-bg); border: 1px solid var(--ok-border); color: var(--ok-text); }

/* photos */
.rock-photo { margin: var(--s-3) 0 var(--s-1); }
.rock-photo img {
  width: 100%; max-height: 240px; object-fit: cover;
  border-radius: var(--r-sm); display: block; background: var(--bg-sunk);
}
.rock-photo figcaption {
  margin-top: 6px; font-size: var(--fs-xs); line-height: 1.45;
  color: var(--text-faint); display: flex; flex-direction: column; gap: 1px;
}
.rock-photo .credit a { color: var(--text-faint); text-decoration: underline; }

/* species */
.species-list { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-3) 0 var(--s-2); }
.species-chip {
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-full);
  padding: 5px 12px;
  font-size: var(--fs-sm);
}
.species-chip.known {
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer; font-family: inherit; color: var(--text);
  border-color: color-mix(in srgb, var(--c-nature) 45%, var(--border));
  background: color-mix(in srgb, var(--c-nature) 8%, #fff);
  min-height: 38px;
  transition: background var(--t-fast), transform var(--t-fast) var(--ease-spring);
}
.species-chip.known img { width: 19px; height: 19px; flex-shrink: 0; }
.species-chip.known:hover { background: color-mix(in srgb, var(--c-nature) 18%, #fff); }
.species-chip.known:active { transform: scale(.95); }
.species-chip.known::after { content: "›"; color: var(--c-nature); font-weight: 700; }

.species-back {
  background: var(--bg-panel-2); border: 1px solid var(--border);
  border-radius: var(--r-full); padding: 7px 15px; min-height: 40px;
  font-family: inherit; font-size: var(--fs-xs); font-weight: 600;
  color: var(--text); cursor: pointer; margin-bottom: var(--s-2);
  transition: border-color var(--t-fast), color var(--t-fast);
}
.species-back:hover { border-color: var(--accent); color: var(--accent-dark); }
#info-content h3 .kind-icon { width: 28px; height: 28px; vertical-align: -6px; margin-left: 8px; }

.season { font-size: var(--fs-sm); color: var(--accent-dark); margin-bottom: var(--s-1); font-weight: 500; }

.guide-note {
  margin-top: var(--s-4);
  padding: var(--s-3);
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--r-sm);
  position: relative;
}
.guide-note strong {
  display: block; font-family: var(--font-display);
  font-size: var(--fs-sm); color: var(--warn-text); margin-bottom: var(--s-1);
}
.guide-note p { margin: 0; font-size: var(--fs-sm); line-height: 1.7; }

/* ============================ search =========================== */
#search-overlay {
  position: fixed; inset: 60px 0 0 0;
  background: var(--bg);
  z-index: 1200;
  display: flex; flex-direction: column;
  animation: fade-in var(--t-fast) var(--ease-out);
}
#search-overlay.hidden { display: none; }
.search-bar {
  display: flex; gap: var(--s-2);
  padding: var(--s-3);
  padding-left: max(var(--s-3), env(safe-area-inset-left));
  padding-right: max(var(--s-3), env(safe-area-inset-right));
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
}
#search-input {
  flex: 1; min-width: 0;
  font-size: var(--fs-base);
  padding: var(--s-3) var(--s-4);
  min-height: 50px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-panel-2);
  color: var(--text);
}
#search-input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px var(--accent-soft); }
.search-bar button {
  background: var(--bg-panel-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); min-width: 50px; min-height: 50px;
  font-size: var(--fs-base); cursor: pointer; color: var(--text);
}
#search-results {
  flex: 1; overflow-y: auto;
  padding: var(--s-3) var(--s-3) var(--s-6);
  padding-bottom: max(var(--s-6), env(safe-area-inset-bottom));
}
.search-hint { font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.7; padding: var(--s-2); }
.search-group { margin-bottom: var(--s-4); }
.search-group h4 {
  display: flex; align-items: center; gap: var(--s-2);
  margin: var(--s-2) 2px;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  color: var(--text-dim);
}
.search-group h4 .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.search-group h4 .count {
  background: var(--bg-sunk); border-radius: var(--r-full);
  padding: 1px 9px; font-size: var(--fs-xs); font-family: var(--font-body); font-weight: 600;
}
.search-result {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  width: 100%; text-align: right;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--s-3);
  margin-bottom: var(--s-2);
  min-height: 52px; cursor: pointer;
  color: var(--text); font-family: inherit;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.search-result:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateX(-3px); }
.search-result .r-name { font-size: var(--fs-sm); font-weight: 600; }
.search-result .r-sub {
  font-size: var(--fs-xs); color: var(--text-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}

/* ============================ empty states ====================== */
.empty-state {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: var(--s-5) var(--s-3); gap: var(--s-2);
}
.empty-state img { width: 116px; height: 116px; opacity: .95; }
.empty-state p { margin: 0; font-size: var(--fs-sm); color: var(--text-dim); line-height: 1.6; max-width: 30ch; }

/* ============================ splash ============================ */
#splash {
  position: fixed; inset: 0; z-index: 2000;
  background: linear-gradient(160deg, #FFFDF8 0%, var(--accent-soft) 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--s-4);
  transition: opacity .45s var(--ease-out), visibility .45s;
}
#splash.done { opacity: 0; visibility: hidden; pointer-events: none; }
#splash img { width: 128px; height: 128px; animation: splash-pop .7s var(--ease-spring); }
#splash .splash-title { font-family: var(--font-display); font-size: var(--fs-xl); color: var(--accent-dark); }
#splash .splash-bar { width: 132px; height: 5px; border-radius: var(--r-full); background: color-mix(in srgb, var(--accent) 22%, #fff); overflow: hidden; }
#splash .splash-bar::after {
  content: ""; display: block; width: 42%; height: 100%;
  border-radius: var(--r-full); background: var(--accent);
  animation: splash-slide 1.15s var(--ease-out) infinite;
}
@keyframes splash-pop { from { transform: scale(.82); opacity: 0 } to { transform: none; opacity: 1 } }
@keyframes splash-slide { from { transform: translateX(140%) } to { transform: translateX(-240%) } }

/* ============================ map controls ====================== */
.maplibregl-ctrl-group {
  border-radius: var(--r-sm) !important;
  box-shadow: var(--shadow) !important;
  border: 1px solid var(--border) !important;
  overflow: hidden;
}
.maplibregl-ctrl-group button { width: 40px !important; height: 40px !important; }
.maplibregl-ctrl-attrib {
  font-size: var(--fs-xs) !important;
  background: rgba(255,255,255,.9) !important;
  border-radius: var(--r-full) !important;
}
.maplibregl-popup-content {
  border-radius: var(--r-sm) !important;
  box-shadow: var(--shadow) !important;
  font-family: var(--font-body) !important;
}

/* a pulse the search drops on whatever you picked, so the eye finds it */
.search-ping {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent);
  animation: ping 1.5s var(--ease-out) 3;
}
@keyframes ping {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 65%, transparent); }
  70%  { box-shadow: 0 0 0 26px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ============================ desktop =========================== */
@media (min-width: 900px) {
  #sidebar {
    position: absolute; top: 0; right: 0; bottom: 0; left: auto;
    width: 400px; max-height: none;
    border-radius: 0; border-top: none; border-left: 1px solid var(--border);
    transform: none !important;
    box-shadow: -6px 0 24px -14px rgba(30,27,22,.2);
    padding-top: var(--s-4);
  }
  #sidebar::before { display: none; }
  #sidebar-backdrop { display: none !important; }
  #btn-toggle-sidebar { display: none; }
  #map { right: 400px; }
  #info-panel {
    left: var(--s-4); right: auto; bottom: var(--s-4);
    width: 400px; max-height: 74vh;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
  }
  #info-panel::before { display: none; }
  #search-overlay {
    inset: 76px auto auto 50%;
    transform: translateX(-50%);
    width: min(620px, 92vw); max-height: 76vh;
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    box-shadow: var(--shadow);
    overflow: hidden;
  }
}

.hidden { display: none !important; }

/* ========================================================================
   EVEN DERECH BRAND REFRESH
   These overrides intentionally sit after the legacy field-tool rules: the
   map engine stays untouched while the visual shell becomes one product with
   the rest of the learning platform.
   ======================================================================== */

:root {
  --bg: #EEF2F7;
  --bg-sunk: #E6ECF3;
  --bg-panel: rgba(255, 255, 255, .72);
  --bg-panel-2: rgba(11, 32, 50, .055);
  --text: #0D1F2D;
  --text-dim: #55697A;
  --text-faint: #7C8E9D;
  --accent: #0D9488;
  --accent-dark: #0F766E;
  --accent-soft: rgba(13, 148, 136, .12);
  --c-regions: #F59E0B;
  --c-visitor: #0D9488;
  --c-nature: #059669;
  --c-topo: #64748B;
  --c-geology: #2563EB;
  --c-timeline: #E11D48;
  --c-religion: #7C3AED;
  --c-route: #F97316;
  --border: rgba(11, 32, 50, .13);
  --border-strong: rgba(11, 32, 50, .22);
  --shadow-sm: 0 1px 2px rgba(11, 32, 50, .04), 0 6px 18px -12px rgba(11, 32, 50, .24);
  --shadow: 0 16px 36px -22px rgba(11, 32, 50, .48);
  --shadow-lg: 0 -18px 48px -26px rgba(11, 32, 50, .58);
  --shadow-pop: 0 12px 28px -16px rgba(13, 148, 136, .68);
  --font-display: 'Rubik', "Segoe UI", Arial, sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070F18;
  --bg-sunk: #08131E;
  --bg-panel: rgba(18, 34, 47, .82);
  --bg-panel-2: rgba(255, 255, 255, .065);
  --text: #EAF2F8;
  --text-dim: #93A7B8;
  --text-faint: #6F879A;
  --accent: #2EE6C5;
  --accent-dark: #9FE8DD;
  --accent-soft: rgba(46, 230, 197, .12);
  --c-regions: #FFCE4D;
  --c-visitor: #2EE6C5;
  --c-nature: #46E08A;
  --c-topo: #93A7B8;
  --c-geology: #4AA8FF;
  --c-timeline: #FF6B81;
  --c-religion: #A78BFA;
  --c-route: #FF9B62;
  --border: rgba(255, 255, 255, .11);
  --border-strong: rgba(255, 255, 255, .2);
  --shadow-sm: 0 8px 24px -18px rgba(0, 0, 0, .85);
  --shadow: 0 18px 44px -24px rgba(0, 0, 0, .9);
  --shadow-lg: 0 -18px 48px -22px rgba(0, 0, 0, .9);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #070F18;
    --bg-sunk: #08131E;
    --bg-panel: rgba(18, 34, 47, .82);
    --bg-panel-2: rgba(255, 255, 255, .065);
    --text: #EAF2F8;
    --text-dim: #93A7B8;
    --text-faint: #6F879A;
    --accent: #2EE6C5;
    --accent-dark: #9FE8DD;
    --accent-soft: rgba(46, 230, 197, .12);
    --c-regions: #FFCE4D;
    --c-visitor: #2EE6C5;
    --c-nature: #46E08A;
    --c-topo: #93A7B8;
    --c-geology: #4AA8FF;
    --c-timeline: #FF6B81;
    --c-religion: #A78BFA;
    --c-route: #FF9B62;
    --border: rgba(255, 255, 255, .11);
    --border-strong: rgba(255, 255, 255, .2);
  }
}

html,
body {
  overflow: hidden;
  background:
    radial-gradient(95% 70% at 100% 0%, rgba(13, 148, 136, .13), transparent 58%),
    radial-gradient(80% 60% at 0% 100%, rgba(37, 99, 235, .09), transparent 62%),
    linear-gradient(180deg, var(--bg-sunk), var(--bg));
}

#app-header {
  min-height: 70px;
  padding: 9px 14px;
  gap: 12px;
  background: color-mix(in srgb, var(--bg-panel) 94%, transparent);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 30px -25px rgba(11, 32, 50, .72);
  backdrop-filter: blur(18px) saturate(145%);
}

#app-header .map-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

#app-header .logo {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  box-shadow: 0 8px 20px -12px rgba(11, 32, 50, .7);
}

.map-brand-copy { min-width: 0; line-height: 1.08; }
.map-brand-copy > span {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-dark);
  font-size: .67rem;
  font-weight: 800;
  letter-spacing: .04em;
}

#app-header .map-brand-copy h1 {
  overflow: hidden;
  margin: 0;
  color: var(--text);
  font-size: 1.04rem;
  font-weight: 900;
  letter-spacing: -.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-actions { display: flex; align-items: center; gap: 8px; }
#app-header button {
  gap: 7px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--text);
  background: var(--bg-panel-2);
  border-color: var(--border);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
#app-header button:hover {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--border));
}
#app-header button img { filter: none; }

#app-body { height: calc(100% - 70px); }
#map { background: var(--bg-sunk); }

#sidebar {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg-panel) 95%, transparent), color-mix(in srgb, var(--bg) 91%, transparent)),
    url('../assets/illustrations/texture-contours.svg') repeat;
  border-color: var(--border);
  backdrop-filter: blur(24px) saturate(130%);
}

.sidebar-intro {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 18px 18px 17px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--border));
  border-radius: 20px;
  background:
    radial-gradient(120% 120% at 110% -15%, var(--accent-soft), transparent 58%),
    var(--bg-panel);
  box-shadow: var(--shadow-sm);
}
.sidebar-intro::after {
  content: "";
  position: absolute;
  inset: auto -18px -28px auto;
  width: 120px;
  height: 90px;
  opacity: .16;
  background: url('../assets/illustrations/texture-contours.svg') center / 180px auto;
  transform: rotate(-8deg);
}
.sidebar-intro > span {
  color: var(--accent-dark);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
}
.sidebar-intro h2 {
  margin: 5px 0 4px;
  color: var(--text);
  font-size: 1.34rem;
  font-weight: 900;
  letter-spacing: -.03em;
}
.sidebar-intro p {
  max-width: 31ch;
  margin: 0;
  color: var(--text-dim);
  font-size: .78rem;
  line-height: 1.55;
}

.group-label {
  margin: 24px 5px 9px;
  color: var(--text-faint);
  font-family: var(--font-body);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
}

.panel {
  padding-bottom: 15px;
  margin-bottom: 11px;
  background: color-mix(in srgb, var(--bg-panel) 92%, transparent);
  border-color: var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.panel:hover {
  border-color: color-mix(in srgb, var(--panel-color) 28%, var(--border));
  box-shadow: var(--shadow);
}
.panel.is-on {
  border-color: color-mix(in srgb, var(--panel-color) 52%, var(--border));
  box-shadow: inset -3px 0 0 color-mix(in srgb, var(--panel-color) 72%, transparent), var(--shadow-sm);
}
.panel-banner {
  height: 68px;
  aspect-ratio: auto;
  opacity: .9;
  border-bottom-color: var(--border);
  filter: saturate(.82) contrast(.96);
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 100%);
}
.panel h2 {
  padding: 13px 16px 5px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: .98rem;
  font-weight: 850;
  letter-spacing: -.015em;
}
.panel h2 img {
  width: 25px;
  height: 25px;
  padding: 4px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-color) 13%, transparent);
}
.panel > *:not(.panel-banner):not(h2) { margin-left: 16px; margin-right: 16px; }

.layer-toggle {
  min-height: 42px;
  color: var(--text-dim);
  font-size: .84rem;
  font-weight: 600;
}
.panel.is-on .layer-toggle { color: var(--text); }
.layer-toggle input[type="checkbox"] {
  width: 38px;
  height: 22px;
  appearance: none;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background:
    radial-gradient(circle at 72% 50%, #fff 0 6px, transparent 7px),
    var(--bg-panel-2);
  box-shadow: inset 0 1px 2px rgba(11, 32, 50, .13);
  transition: background .18s var(--ease-out), border-color .18s;
}
.layer-toggle input[type="checkbox"]:checked {
  border-color: var(--panel-color, var(--accent));
  background:
    radial-gradient(circle at 28% 50%, #fff 0 6px, transparent 7px),
    var(--panel-color, var(--accent));
}

.chip,
.religion-chip,
.operator-chip,
.search-result,
#route-list li,
.species-chip,
.rock-class,
.geology-subtoggle {
  color: var(--text);
  background: var(--bg-panel-2);
  border-color: var(--border);
}
.operator-chip.active,
.religion-chip.active,
.chip:hover,
.search-result:hover {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}
.btn-secondary {
  color: var(--text);
  background: var(--bg-panel-2);
  border-color: var(--border);
}

#info-panel,
#search-overlay {
  color: var(--text);
  background: color-mix(in srgb, var(--bg-panel) 95%, transparent);
  border-color: var(--border);
  backdrop-filter: blur(24px) saturate(140%);
}
#info-content h3 { color: var(--accent-dark); font-weight: 900; }
#search-input,
.search-bar,
.search-bar button,
#btn-close-info {
  color: var(--text);
  background: var(--bg-panel-2);
  border-color: var(--border);
}

#splash {
  gap: 11px;
  padding: 24px;
  background:
    radial-gradient(65% 55% at 70% 25%, rgba(13, 148, 136, .18), transparent 70%),
    radial-gradient(55% 50% at 25% 80%, rgba(37, 99, 235, .11), transparent 72%),
    linear-gradient(165deg, var(--bg-sunk), var(--bg));
}
#splash::before,
#splash::after {
  content: "";
  position: absolute;
  width: min(580px, 86vw);
  height: min(580px, 86vw);
  border: 1px solid color-mix(in srgb, var(--accent) 12%, transparent);
  border-radius: 50%;
  transform: rotate(-16deg) scaleY(.48);
}
#splash::after { transform: rotate(21deg) scaleY(.62); opacity: .65; }
.splash-mark {
  position: relative;
  z-index: 1;
  width: 118px;
  height: 118px;
  margin-bottom: 8px;
  padding: 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: 31px;
  background: var(--bg-panel);
  box-shadow: 0 24px 55px -28px rgba(11, 32, 50, .62);
  animation: splash-pop .7s var(--ease-spring);
}
#splash .splash-mark img { width: 100%; height: 100%; border-radius: 24px; animation: none; }
.splash-eyebrow {
  position: relative;
  z-index: 1;
  color: var(--accent-dark);
  font-size: .74rem;
  font-weight: 850;
  letter-spacing: .07em;
}
#splash .splash-title {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: clamp(1.5rem, 5vw, 2.15rem);
  font-weight: 900;
  letter-spacing: -.04em;
}
.splash-copy {
  position: relative;
  z-index: 1;
  margin: 0 0 10px;
  color: var(--text-dim);
  font-size: .88rem;
}
#splash .splash-bar { position: relative; z-index: 1; height: 4px; background: var(--accent-soft); }

.maplibregl-ctrl-group {
  background: var(--bg-panel) !important;
  border-color: var(--border) !important;
  backdrop-filter: blur(14px);
}
.maplibregl-ctrl-group button { background-color: transparent !important; }
.maplibregl-ctrl-group button:hover { background-color: var(--accent-soft) !important; }
.maplibregl-ctrl-icon { opacity: .78; }
.maplibregl-ctrl-attrib {
  color: var(--text-dim) !important;
  background: var(--bg-panel) !important;
  border: 1px solid var(--border);
}

.maplibregl-popup-content {
  color: var(--text);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(140%);
}
.maplibregl-popup-tip { border-top-color: var(--bg-panel) !important; }
.maplibregl-popup-close-button {
  color: var(--text-dim);
  background: var(--bg-panel-2);
  border-radius: 8px;
}

.theme-button {
  min-width: 104px !important;
  color: var(--text) !important;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-panel-2)) !important;
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border)) !important;
}
.theme-button:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 8px 18px -14px var(--accent);
}
.theme-glyph {
  display: grid !important;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--accent-strong);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  font-size: 1rem;
  line-height: 1;
}

#sidebar,
#map { transition: transform 260ms var(--ease-out), right 260ms var(--ease-out); }

@media (max-width: 639px) {
  #app-header { min-height: 62px; padding: 7px 9px; }
  #app-body { height: calc(100% - 62px); }
  #app-header .logo { width: 38px; height: 38px; border-radius: 11px; }
  .map-brand-copy > span { display: none; }
  #app-header .map-brand-copy h1 { font-size: .92rem; }
  .map-actions button span { display: none; }
  .map-actions #btn-theme .theme-label { display: inline; }
  .theme-button { min-width: 94px !important; }
  #app-header button { min-width: 42px; padding: 0 10px; }
  .sidebar-intro { padding: 15px; }
}

@media (min-width: 900px) {
  #sidebar {
    width: 372px;
    padding: 15px 13px 28px;
    border-left-color: var(--border);
    box-shadow: -16px 0 44px -36px rgba(11, 32, 50, .68);
  }
  #sidebar.collapsed { transform: translateX(100%) !important; }
  #sidebar.collapsed ~ #map { right: 0; }
  #btn-toggle-sidebar { display: inline-flex; }
  #map { right: 372px; }
  #search-overlay { top: 86px; }
  #info-panel { width: 388px; }
}
