:root {
  --radius-sm: 30px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --primary-bg: #161b22;
  --sidebar-bg: #1e2430ee;
  --panel-bg: #232b38cc;
  --accent: #5d9efa;
  --accent-hover: #89bcff;
  --accent-light: #84b6f4;
  --danger: #be3a34;
  --text-main: #f5f6fa;
  --text-muted: #8da3ba;
  --input-bg: #171b23cc;
  --input-border: #4a69a1;
  --input-focus: #377de7;
  --scrollbar-thumb: #33415a;
}

body, h1, h2, h3, h4, h5, h6, #sidebar, #controls, 
button, input, textarea, select, 
.label, .mode-header, .legend-label, #legend, #country-popup, .logo-title {
  font-family: 'Monda', 'Inter', 'Segoe UI', Arial, sans-serif;
}

body {
  margin: 0;
  font-family: 'Monda', 'Inter', 'Segoe UI', Arial, sans-serif;
  display: flex;
  min-height: 100vh;
  background: linear-gradient(120deg, #181c24 0%, #222733 100%);
  color: var(--text-main);
  letter-spacing: 0.01em;
}

#sidebar {
  width: 350px;
  min-width: 220px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 2.5px solid #4a8afc55;
  box-shadow: 0 0 36px #71a6fc1a;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  background: rgba(30, 36, 48, 0.55);
  backdrop-filter: blur(16px) saturate(130%);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
}

#sidebar-collapse-toggle {
  position: absolute;
  top: 50%;
  right: -12px;
  transform: translateY(-50%);
  width: 28px;
  height: 40px;
  border: none;
  background: transparent;
  color: rgba(227, 237, 255, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  z-index: 2100;
  user-select: none;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.2s ease, color 0.2s ease;
}

#sidebar-collapse-toggle.sidebar-toggle-visible,
#sidebar-collapse-toggle:focus-visible,
#sidebar-collapse-toggle:hover {
  opacity: 0.92;
  pointer-events: auto;
}

#sidebar-collapse-toggle:hover {
  transform: translateY(-50%) scale(1.05);
  color: #f7fbff;
}

#sidebar-collapse-toggle:focus-visible {
  outline: 2px solid #9ec3ff;
  outline-offset: 4px;
}

#sidebar.sidebar-collapsed {
  width: 5px !important;
  min-width: 5px !important;
  background: rgba(30, 36, 48, 0.62);
  box-shadow: 0 0 24px #71a6fc0f;
}

#sidebar.sidebar-collapsed #sidebar-scroll,
#sidebar.sidebar-collapsed #sidebar-logo,
#sidebar.sidebar-collapsed #lang-switch {
  display: none !important;
}

#sidebar.sidebar-collapsed #sidebar-resizer {
  display: none !important;
}

#sidebar.sidebar-collapsed #sidebar-collapse-toggle {
  right: -11px;
  transform: translateY(-50%) translateX(2px);
}

#sidebar.sidebar-collapsed #sidebar-collapse-toggle:hover {
  transform: translateY(-50%) translateX(2px) scale(1.05);
}

#sidebar-logo {
  /* padding-top: 28px;
  padding-bottom: 14px; */
  text-align: center;
  flex: 0 0 auto;
  z-index: 2;
}
/* 
.logo {
  height: 112px;
  margin: 0 auto;
  display: block;
} */

.logo {
  margin: 0 auto;
  display: block;
  width: 100%;
  max-width: 124px;
  height: auto;
}


#sidebar-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  /* padding-top: 26px; */
  padding-bottom: 72px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#sidebar-scroll::-webkit-scrollbar {
  display: none;
}


#controls {
  padding: 0 22px 18px 22px;
  /* border-bottom: 1px solid #223044; */
  background: transparent;
  box-sizing: border-box;
}

#lang-switch {
  position: absolute;
  left: 18px;
  bottom: 10px;
  z-index: 3;
  font-size: 14px;
  color: var(--accent);
  cursor: pointer;
  user-select: none;
}

/* #lang-switch #current-lang {
  padding: 4px 8px;
  background: #223044cc;
  border-radius: 6px;
  transition: background 0.17s, color 0.17s;
  cursor: pointer;
  font-weight: 600;
}

#lang-switch #current-lang:hover,
#lang-switch #current-lang:focus {
  background: var(--accent);
  color: #223044;
} */

#lang-switch #lang-menu {
  position: absolute;
  bottom: 28px;
  left: 0;
  background: var(--panel-bg);
  border: 1px solid #2a395b;
  border-radius: 6px;
  box-shadow: 0 4px 12px #0006;
  min-width: 100px;
  z-index: 2000;
}

#lang-switch #lang-menu div {
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text-main);
  border-radius: 4px;
}

#lang-switch #lang-menu div:hover {
  background: #2a395b;
  color: var(--accent);
}

.dropdown-label {
  display: block;
  margin-left: 8px;
  font-weight: 500;
}

#datasetSelect, 
.datasetSelect {
  width: 100%;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: var(--radius-md);
  background-color: #fff;
  color: #333;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='black' height='16' viewBox='0 0 24 24' width='16' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  cursor: pointer;
  transition: 0.2s;
}

#datasetSelect:hover, 
.datasetSelect:hover {
  border-color: #888; 
}

#datasetSelect:focus, 
.datasetSelect:focus {
  outline: none;
  border-color: #0078d7;
  box-shadow: 0 0 4px rgba(0,120,215,0.5);
}

#controls input,
#controls textarea,
#controls select {
  width: 100%;
  margin-bottom: 14px;
  font-size: 15px;
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  border: 1.5px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text-main);
  outline: none;
  box-shadow: none;
  transition: border 0.15s, background 0.17s;
  box-sizing: border-box;
  font-weight: 500;
}

#controls select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%23a9c9fa' height='14' viewBox='0 0 24 24' width='14' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
  cursor: pointer;
  padding-right: 36px;
  line-height: 1.4;
}

#controls textarea {
  border-radius: 6px;
}

#controls button {
  width: 100%;
  margin-bottom: 17px;
  font-size: 15px;
  border-radius: var(--radius-lg);
  padding: 4px 4px;
  background: var(--accent);
  border: none;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  color: #223044;
  letter-spacing: 0.03em;
  box-shadow: 0 0 0 1.2px #61aaff4c;
  transition: background 0.15s, color 0.12s, box-shadow 0.15s;
}

#controls button:hover,
#controls button:focus,
button:hover,
button:focus {
  background: var(--accent-hover);
  color: #e6ecf5;
  /* box-shadow: 0 0 8px 1px #70beff80; */
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--input-focus);
  background: #273246;
  color: var(--text-main);
}

select option {
  background-color: #1e2430;
  color: #f5f6fa;
}

button {
  background: var(--accent);
  border: none;
  cursor: pointer;
  font-weight: 700;
  text-transform: uppercase;
  color: #f9fbff;
  letter-spacing: 0.03em;
  border-radius: var(--radius-md);
  padding: 11px 13px;
  margin-bottom: 17px;
  font-size: 15px;
  box-shadow: none;
  transition: background 0.15s, color 0.12s, box-shadow 0.15s;
}

#map {
  flex: 1;
  height: 100vh;
  width: 100vw;
  background: linear-gradient(120deg,#202634 0%, #252b38 80%);
  position: relative;
  z-index: 0;
}

.collapsible-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
}

.collapsible-section:focus {
  outline: 2px solid #3c4a69;
  outline-offset: 2px;
}

.section-toggle-icon {
  font-size: 14px;
  color: #a9c9fa;
  transition: transform 0.18s ease;
}

.section-toggle-icon.is-collapsed,
.collapsible-section.is-collapsed .section-toggle-icon {
  transform: rotate(-90deg);
}

.user-dataset-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  margin: 2px 0;
  border-radius: 4px;
  transition: background 0.15s;
  line-height: 1.25;
}

.user-dataset-row:hover {
  background: #2a395b55;
}

.dataset-name-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

#my-datasets-list,
#my-drawmaps-list {
  max-height: calc(8 * 30px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(111, 142, 191, 0.7) transparent;
  scroll-behavior: smooth;
  scrollbar-gutter: stable both-edges;
}

#my-datasets-list::-webkit-scrollbar,
#my-drawmaps-list::-webkit-scrollbar {
  width: 6px;
}

#my-datasets-list::-webkit-scrollbar-track,
#my-drawmaps-list::-webkit-scrollbar-track {
  background: transparent;
}

#my-datasets-list::-webkit-scrollbar-thumb,
#my-drawmaps-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(111, 142, 191, 0.65) 0%, rgba(89, 124, 176, 0.85) 100%);
  border-radius: 999px;
}

#my-datasets-list::-webkit-scrollbar-thumb:hover,
#my-drawmaps-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(135, 166, 214, 0.8) 0%, rgba(109, 148, 202, 0.95) 100%);
}

#my-drawmaps-list.requires-login {
  opacity: 0.6;
  pointer-events: none;
  filter: grayscale(0.2);
}

#custom-layers-header.requires-login {
  opacity: 0.85;
}

#custom-layers-header.requires-login::after {
  content: " – login to sync";
  font-size: 11px;
  font-weight: 500;
  color: #b6c7eb;
  margin-left: 6px;
}

.dataset-row-index,
.custom-layer-index {
  color: #8aa6d7;
  font-size: 12px;
  line-height: 1.3;
  min-width: 16px;
  text-align: right;
  display: inline-block;
}

.dataset-name {
  text-decoration: underline;
  color: #a9c9fa;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.3;
  transition: color 0.17s, text-decoration 0.18s;
}

.dataset-name:hover,
.dataset-name:focus {
  text-decoration: underline dotted;
  color: #c3e0ff;
  outline: none;
}

.inline-action-icon {
  opacity: 0;
  transition: opacity 0.15s;
  cursor: pointer;
  font-size: 14px;
  color: #8fb8fa;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  padding: 0 2px;
}

.inline-action-icon:focus {
  outline: none;
}

.inline-action-icon.rename-icon:hover,
.inline-action-icon.rename-icon:focus {
  color: #c3e0ff;
}

.inline-action-icon.edit-icon:hover,
.inline-action-icon.edit-icon:focus {
  color: #b9d5ff;
}

.inline-action-icon.delete-icon {
  color: #d86b6b;
}

.inline-action-icon.delete-icon:hover,
.inline-action-icon.delete-icon:focus {
  color: #ff8989;
}

.dataset-name-wrapper:hover .inline-action-icon,
.dataset-name-wrapper:focus-within .inline-action-icon,
.user-dataset-row.is-editing .inline-action-icon,
.custom-layer-name:hover .inline-action-icon,
.custom-layer-name:focus-within .inline-action-icon,
.custom-layer-row.is-editing .inline-action-icon {
  opacity: 1;
}

.inline-rename-input {
  flex: 1;
  background: #1d2a45;
  border: 1px solid #3c4a69;
  color: #f0f6ff;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 14px;
}

.custom-layer-row {
  display: grid;
  grid-template-columns: 18px 18px 1fr;
  align-items: center;
  column-gap: 6px;
  margin: 2px 0;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background 0.15s;
  line-height: 1.25;
}

.custom-layer-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  justify-self: center;
}

.custom-layer-row:hover {
  background: #2a395b55;
}

.custom-layer-name {
  display: flex;
  align-items: center;
  gap: 6px;
}

.custom-layer-title {
  color: #c3e0ff;
  text-decoration: underline;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.3;
  cursor: pointer;
  transition: color 0.17s, text-decoration 0.18s;
}

.custom-layer-title:hover,
.custom-layer-title:focus {
  text-decoration: underline dotted;
  color: #e0f0ff;
  outline: none;
}

#ai-model-switch {
  display: flex;
  gap: 10px;
  margin: 6px 0 10px 0;
}

.ai-model-btn {
  cursor: pointer;
  font-size: 16px;
  transition: transform 0.15s, color 0.2s;
  user-select: none;
  opacity: 0.6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  vertical-align: middle;
  margin-top: -3px; /* поднимаем обе кнопки выше */
}

.ai-model-btn.active {
  opacity: 1;
  color: var(--accent);
  transform: scale(1.2);
}

.ai-model-btn.big-brain {
  font-size: 26px;
  transform: translateY(1px);
}

.ai-model-btn.small-brain {
  font-size: 18px;
  transform: translateY(2px);
}

.ai-model-btn.big-brain.active {
  transform: scale(1.2) translateY(1px);
}

.ai-model-btn.small-brain.active {
  transform: scale(1.05) translateY(2px);
}


#fetch-openai.loading {
  position: relative;
  overflow: hidden;
  color: #fff !important;
}

#fetch-openai.loading::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-hover) 100%);
  animation: loadProgress 3s linear infinite;
  z-index: 0;
}

#fetch-openai.loading span {
  position: relative;
  z-index: 1;
}

@keyframes loadProgress {
  from { width: 0%; }
  to   { width: 100%; }
}

#legend,
#legend-compare {
  position: absolute;
  right: 28px;
  z-index: 999;
  background: var(--panel-bg);
  border-radius: var(--radius-lg);
  padding: 18px 26px 12px 20px;
  box-shadow: 0 8px 30px #11224418, 0 2px 8px #0009;
  font-size: 15px;
  border: 1.5px solid #224075;
  margin-top: 16px;
  min-width: 200px;
  width: auto;
  max-width: min(320px, calc(100vw - 64px));
  backdrop-filter: blur(8px) saturate(110%);
  overflow: hidden;
  color: var(--text-main);
}

#legend {
  bottom: 26px;
  max-height: 50vh;
  height: min-content;
  width: auto;
  max-width: min(320px, calc(100vw - 64px));
  position: absolute;
  right: 28px;
  z-index: 999;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Только для легенды — стильный видимый скроллбар */
.legend-scroll {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) #232b38cc;
}
.legend-scroll::-webkit-scrollbar {
  width: 7px;
  background: #232b38cc;
}
.legend-scroll::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 7px;
}

#legend .legend-scroll {
  flex: 1;
  padding-right: 4px;
}

.legend-header {
  position: sticky;
  top: 0;
  background: var(--panel-bg);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 6px 10px;
  border-bottom: 1px solid #2a395b;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  z-index: 2;
  flex-wrap: wrap;
}

.legend-header--datasets > * {
  min-width: 0;
}

.legend-toggle {
  font-size: 13px;
  color: #ddd;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.legend-title {
  font-size: 14px;
  font-weight: bold;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
  flex: 1 1 auto;
}

.legend-compare {
  font-size: 13px;
  color: #99b8e3;
  font-weight: 600;
  white-space: normal;
  word-break: break-word;
  flex: 1 1 100%;
}


.legend-bar {
  width: 106px;
  height: 13px;
  margin: 0 7px 5px 0;
  display: inline-block;
  vertical-align: middle;
  border-radius: var(--radius-sm);
  border: 1.2px solid #3b5ca3;
  box-shadow: 0 1px 6px #22306612;
  background: linear-gradient(to right,#b5d4ff,#9cc4ff,#648fd2);
}

.legend-label {
  display: inline-block;
  width: 34px;
  text-align: right;
  margin-right: 5px;
  color: var(--accent-light);
  font-weight: 700;
}

.legend-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.legend-block {
  min-width: 0;
  flex: 1 1 auto;
  width: 100%;
}

.legend-cat {
  margin: 2px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  transition: background 0.15s ease, outline 0.15s ease;
}

.legend-cat:hover {
  background: rgba(90, 120, 160, 0.18);
}

.legend-cat--selected {
  background: rgba(90, 120, 160, 0.25);
  outline: 2px solid #7bb6fa;
  box-shadow: 0 0 0 1px rgba(35, 75, 130, 0.3);
}

.legend-cat__dot {
  flex: 0 0 auto;
  width: 0.95em;
  height: 0.95em;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--legend-dot-color, #fff);
  box-shadow: 0 0 0 1px rgba(10, 14, 24, 0.4);
  margin-top: 0.25em;
}

.legend-cat__dot--compare {
  background: repeating-radial-gradient(circle at 50% 50%,
      var(--legend-dot-color, #fff),
      var(--legend-dot-color, #fff) 3px,
      transparent 3px,
      transparent 7px);
  border: 2px solid var(--legend-dot-color, transparent);
  box-shadow: none;
  opacity: 0.95;
}

.legend-cat__label {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.legend-footer {
  display: flex;
  flex-direction: row;
  gap: 14px;
  justify-content: flex-start;
  align-items: center;
  margin-top: 6px;
}

#legend .legend-footer span {
  display: inline-flex;
  align-items: center;
  margin-right: 12px;
}

#legend .legend-footer input[type="checkbox"] {
  margin: 0;
  vertical-align: middle;
}

#legend .legend-footer label {
  font-size: 13px;
  font-weight: 400;
  margin-left: 4px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;   /* 👈 предотвращает перенос текста */
}

.side-btn {
  width: 32px;
  height: 32px;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #1e2430cc;
  transition: background-color .18s, transform .18s;
  position: relative;
  flex-shrink: 0;
}

.side-btn:hover:not(.active) {
  background-color: #283040;
}

.side-btn.active {
  background-color: var(--accent);
}


#country-popup {
  position: fixed;
  left: 50%;
  top: 8vh;
  z-index: 9999;
  transform: translate(-50%, 0);
  background: var(--panel-bg);
  border-radius: 20px;
  border: 1.5px solid var(--accent);
  min-width: 250px;
  max-width: 350px;
  box-shadow: 0 2px 22px #25407422, 0 2px 10px #000a;
  padding: 12px 16px 12px 16px;
  font-size: 16px;
  color: var(--text-main);
  display: none;
  overflow: hidden;
}

#country-popup .close-btn {
  position: absolute;
  right: 12px;
  top: -12px;
  color: var(--accent-light);
  background: none;
  border: none;
  font-size: 33px;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.13s;
}

#country-popup .close-btn:hover,
#country-popup .close-btn:focus {
  box-shadow: none !important;
  background: none !important;
  color: var(--danger);
}

#country-popup .popup-title {
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 7px;
  color: var(--accent);
  letter-spacing: 0.04em;
}

#country-popup .popup-row {
  margin-bottom: 7px;
  color: #fff7ca;
}

#country-popup .popup-table {
  font-size: 14px;
  background: #192130;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  border: 1.2px solid #233457;
}

.country-label {
  pointer-events: none;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #eaf1fa;
  text-shadow: 0 1px 5px #23345755, 0 1px 0 #0009;

  white-space: normal;
  word-break: keep-all;   /* ❗️ запрещаем ломать слова внутри */
  line-height: 1.25;
}



#genprompt-app {
  margin-top: 19px;
  background: var(--panel-bg);
  border-radius: var(--radius-md);
  border: 1.3px solid #2a395b;
  box-shadow: 0 1px 10px #21345a17, 0 1px 6px #0008;
  padding: 5px 14px 5px 14px;
  overflow: hidden;
}

#prompt-result[readonly] {
  background: #1b2130;
  color: var(--accent-light);
  border: none;
  box-shadow: 0 1px 6px #28407614;
  font-size: 14px;
  font-family: 'Inter', 'Segoe UI', 'Roboto', monospace;
}

.mode {
  margin-top: 13px;
  margin-bottom: 9px;
  border: 1.5px solid #233457;
  border-radius: var(--radius-md);
  background: var(--panel-bg);
  box-shadow: 0 1px 5px #2a396017;
  overflow: hidden;
  /* padding-bottom: 2px; */
}

.mode-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  padding: 9px 13px;
  box-sizing: border-box;
  transition: background 0.2s ease;
}

.mode-header:hover {
  background: #5D9EFA; 
}

.mode-header::before {
  content: "▶";
  margin-right: 8px;
  flex-shrink: 0;
}

.mode-header.open::before {
  content: "▼";
}

.mode-header.inactive {
  opacity: 0.5;
  color: var(--text-muted);
}


.mode-body {
  padding: 12px 4px 4px 4px;
  display: none;
  color: var(--text-main);
  font-size: 14px;
}

.mode-header.open::before {
  content: "▼ ";
}

.mode-header::before {
  content: "▶ ";
}

.legend-block span[style*="background:transparent"],
.legend-block span[style*="border:2px solid"] {
  box-shadow: 0 0 0 2.5px #adc7e44d;
  background: transparent !important;
}

#controls hr {
  margin: 16px 0 15px 0;
  border: none;
  border-top: 1px solid #ffffff8d;
}


@media (max-width: 900px) {
  #sidebar {
    min-width: 0;
    width: 100vw;
    height: auto;
    border-right: none;
    border-bottom: 1.5px solid #233457;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
  #sidebar-scroll {
    max-height: 70vh;
  }
}

/* === Controls sync === */
/* === Controls sync with Leaflet === */
:root {
  --map-border-color: #000000;
  --map-border-width: 1;
  --map-fill-opacity: 0.8;
}

.leaflet-overlay-pane path {
  /* stroke: var(--map-border-color) !important; */
  stroke-width: var(--map-border-width) !important;
  /* fill-opacity: var(--map-fill-opacity) !important; */
}

.leaflet-overlay-pane path[fill^="url("] {
  stroke: none !important;
  stroke-width: 0 !important;
}

#legend-controls input[type="color"] {
  width: 34px;
  height: 26px;
  border-radius: 5px;
  border: 1.5px solid #888;
  background: #fff;
  padding: 0;
  box-sizing: border-box;
  display: inline-block;
  vertical-align: middle;
}

.leaflet-control-attribution {
  display: none !important;
}
