@font-face {
  font-family: "Ysabeau Regular";
  src: url("../../../vendor/fonts/ysabeau/Ysabeau-wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  color-scheme: light;
  --split: 50%;
  --ink: #17342d;
  --paper: rgba(250, 250, 245, 0.94);
  --line: rgba(23, 52, 45, 0.18);
  font-family: "Ysabeau Regular", Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
.comparison,
.map-slot,
.map-clip {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: #e5e6dd;
  color: var(--ink);
}

.viewer-brand {
  display: none;
}

.comparison,
.map-slot,
.map-clip {
  position: fixed;
  inset: 0;
}

.comparison {
  z-index: 0;
}

.map-left {
  z-index: 0;
}

.map-clip {
  z-index: 1;
  overflow: hidden;
  clip-path: inset(0 0 0 var(--split));
}

.map-right {
  z-index: 0;
}

.style-controls {
  position: fixed;
  z-index: 4;
  top: 14px;
  right: 14px;
  left: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  pointer-events: none;
}

.style-picker {
  display: grid;
  grid-template-columns: auto minmax(150px, 250px);
  align-items: center;
  gap: 9px;
  padding: 7px 9px 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(24, 49, 42, 0.18);
  pointer-events: auto;
  backdrop-filter: blur(16px);
}

.style-picker > span {
  color: #65766f;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.style-picker select {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: 650 13px/1.2 inherit;
}

.style-picker select:focus-visible {
  outline: 2px solid #2f725f;
  outline-offset: 4px;
  border-radius: 4px;
}

body.single-viewer .map-clip,
body.single-viewer .compare-divider,
body.single-viewer .style-picker-right,
body.single-viewer .archive-source,
body.single-viewer .typography-editor-toggle,
body.single-viewer .relief-editor-toggle,
body.single-viewer .layer-explorer-toggle,
body.single-viewer .typography-editor,
body.single-viewer .relief-editor,
body.single-viewer .layer-explorer {
  display: none !important;
}

body.single-viewer .viewer-brand {
  position: fixed;
  z-index: 5;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 14px 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(24, 49, 42, 0.18);
  color: var(--ink);
  font-size: 13px;
  font-weight: 820;
  letter-spacing: 0.11em;
  text-decoration: none;
  backdrop-filter: blur(16px);
}

body.single-viewer .viewer-brand__mark {
  width: 21px;
  height: 21px;
  background: #2f725f;
  clip-path: polygon(0 88%, 34% 19%, 50% 51%, 66% 4%, 100% 88%);
}

body.single-viewer .style-controls {
  right: 14px;
  left: auto;
  justify-content: flex-end;
}

body.single-viewer .style-picker-left {
  grid-template-columns: auto minmax(180px, 260px);
}

body.single-viewer .maplibregl-ctrl-top-left {
  top: 58px;
}

.comparison-search {
  position: fixed;
  z-index: 7;
  top: 14px;
  left: 50%;
  width: min(480px, calc(100vw - 610px));
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(24, 49, 42, 0.18);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

#searchForm {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
}

#searchForm svg {
  width: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: #65766f;
  stroke-linecap: round;
  stroke-width: 1.8;
}

#searchInput {
  min-width: 0;
  flex: 1;
  height: 46px;
  padding: 0 11px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: 650 13px/1.2 inherit;
}

#searchInput::placeholder {
  color: #788a84;
}

#searchForm kbd {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(47, 114, 95, 0.06);
  color: #65766f;
  font: 650 9px/1 inherit;
}

#searchForm.is-loading::after {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border: 2px solid rgba(47, 114, 95, 0.2);
  border-top-color: #2f725f;
  border-radius: 50%;
  content: "";
  animation: comparison-search-spin 650ms linear infinite;
}

.search-results {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  width: 100%;
  max-height: min(540px, calc(100vh - 94px));
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 13px;
  background: rgba(250, 250, 245, 0.98);
  box-shadow: 0 14px 36px rgba(24, 49, 42, 0.22);
}

.search-results[hidden] {
  display: none;
}

.archive-source {
  position: fixed;
  z-index: 7;
  bottom: 14px;
  left: 50%;
  width: min(680px, calc(100vw - 260px));
  padding: 7px 9px 6px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 13px;
  background: var(--paper);
  box-shadow: 0 10px 30px rgba(24, 49, 42, 0.18);
  transform: translateX(-50%);
  backdrop-filter: blur(16px);
}

#archiveSourceForm {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

#archiveSourceForm label {
  color: #65766f;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#archiveSourceInput {
  min-width: 0;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: 620 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace;
}

#archiveSourceInput:focus {
  border-color: #2f725f;
  box-shadow: 0 0 0 2px rgba(47, 114, 95, 0.13);
}

#archiveSourceForm button {
  height: 30px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: #2f725f;
  color: #fff;
  cursor: pointer;
  font: 750 10px/1 inherit;
}

#archiveSourceMessage {
  display: block;
  margin: 3px 0 0 57px;
  overflow: hidden;
  color: #65766f;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#archiveSourceForm.has-error + #archiveSourceMessage {
  color: #a24032;
  font-weight: 700;
}

.search-results button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.search-results button:hover,
.search-results button:focus-visible {
  outline: 0;
  background: rgba(47, 114, 95, 0.09);
}

.search-result-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.search-result-copy strong,
.search-result-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-copy strong {
  font-size: 13px;
  font-weight: 730;
}

.search-result-copy small {
  color: #65766f;
  font-size: 10px;
  text-transform: capitalize;
}

.search-result-badge {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  background: #7d8d78;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.search-result-badge::after {
  content: "•";
}

.search-result-badge[data-category="peak"] {
  background: #4f615b;
}

.search-result-badge[data-category="peak"]::after {
  content: "▲";
}

.search-result-badge[data-category="pass"] {
  background: #766b5b;
}

.search-result-badge[data-category="pass"]::after {
  content: "⌁";
}

.search-result-badge[data-category="park"] {
  background: #47805b;
}

.search-result-badge[data-category="park"]::after {
  content: "♧";
  font-size: 16px;
}

.search-result-badge[data-category="glacier"] {
  background: #5e9eaa;
}

.search-result-badge[data-category="glacier"]::after {
  content: "◆";
}

.search-result-badge[data-category="massif"] {
  background: #6d7169;
}

.search-result-badge[data-category="massif"]::after {
  content: "M";
}

.search-result-badge[data-category="locality"] {
  background: #8a7558;
}

.search-result-badge[data-category="locality"]::after {
  content: "●";
}

.search-result-badge[data-category="poi"] {
  background: #9b5c48;
}

.search-result-badge[data-category="poi"]::after {
  content: "+";
}

.search-results .search-empty {
  margin: 0;
  padding: 18px;
  color: #65766f;
  font-size: 13px;
  text-align: center;
}

.layer-explorer-toggle,
.relief-editor-toggle,
.typography-editor-toggle {
  position: fixed;
  z-index: 5;
  bottom: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(24, 49, 42, 0.18);
  color: var(--ink);
  cursor: pointer;
  font: 750 11px/1 inherit;
  backdrop-filter: blur(14px);
}

.layer-explorer-toggle {
  right: 14px;
}

.relief-editor-toggle {
  right: 86px;
}

.typography-editor-toggle {
  right: 151px;
}

.relief-editor {
  position: fixed;
  z-index: 6;
  right: 14px;
  bottom: 42px;
  display: flex;
  flex-direction: column;
  width: min(370px, calc(100vw - 28px));
  max-height: min(78vh, 780px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 15px;
  background: rgba(248, 249, 244, 0.97);
  box-shadow: 0 18px 55px rgba(19, 42, 36, 0.28);
  backdrop-filter: blur(18px);
}

.relief-editor[hidden] {
  display: none;
}

.relief-editor > header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 9px 13px;
  border-bottom: 1px solid var(--line);
}

.relief-editor > header > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.relief-editor > header strong {
  font-size: 13px;
}

.relief-editor > header small {
  overflow: hidden;
  color: #70817a;
  font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relief-editor > header button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #51645d;
  cursor: pointer;
  font-size: 20px;
}

.relief-editor__toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(23, 52, 45, 0.08);
}

.relief-editor__sides {
  display: flex;
  padding: 2px;
  border-radius: 8px;
  background: rgba(23, 52, 45, 0.07);
}

.relief-editor__sides button {
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5f716a;
  cursor: pointer;
  font: 700 9px/1 inherit;
}

.relief-editor__sides button.is-active {
  background: #fff;
  box-shadow: 0 1px 5px rgba(23, 52, 45, 0.12);
  color: var(--ink);
}

.relief-editor__visibility {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #53665f;
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
}

.relief-editor__visibility input {
  accent-color: #2f725f;
}

.relief-editor__content {
  min-height: 0;
  padding: 13px;
  overflow: auto;
}

.relief-editor__empty {
  margin: 0;
  padding: 12px;
  border-radius: 10px;
  background: rgba(23, 52, 45, 0.06);
  color: #60716a;
  font-size: 11px;
  line-height: 1.45;
}

.typography-editor {
  position: fixed;
  z-index: 6;
  right: 14px;
  bottom: 42px;
  display: flex;
  flex-direction: column;
  width: min(370px, calc(100vw - 28px));
  max-height: min(78vh, 780px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 15px;
  background: rgba(248, 249, 244, 0.97);
  box-shadow: 0 18px 55px rgba(19, 42, 36, 0.28);
  backdrop-filter: blur(18px);
}

.typography-editor[hidden] {
  display: none;
}

.typography-editor > header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 9px 13px;
  border-bottom: 1px solid var(--line);
}

.typography-editor > header > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
  min-width: 0;
}

.typography-editor > header strong {
  font-size: 13px;
}

.typography-editor > header small {
  overflow: hidden;
  color: #70817a;
  font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.typography-editor > header button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #51645d;
  cursor: pointer;
  font-size: 20px;
}

.typography-editor__toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(23, 52, 45, 0.08);
}

.typography-editor__sides {
  display: flex;
  padding: 2px;
  border-radius: 8px;
  background: rgba(23, 52, 45, 0.07);
}

.typography-editor__sides button,
#resetTypography {
  padding: 5px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5f716a;
  cursor: pointer;
  font: 700 9px/1 inherit;
}

.typography-editor__sides button.is-active {
  background: #fff;
  box-shadow: 0 1px 5px rgba(23, 52, 45, 0.12);
  color: var(--ink);
}

#resetTypography {
  border: 1px solid rgba(23, 52, 45, 0.12);
  background: #fff;
}

.typography-editor__content {
  display: grid;
  min-height: 0;
  gap: 12px;
  padding: 13px;
  overflow: auto;
}

.typography-preset {
  display: grid;
  gap: 6px;
  color: #53665f;
  font-size: 9px;
  font-weight: 750;
}

.typography-preset select {
  width: 100%;
  padding: 8px 30px 8px 9px;
  border: 1px solid rgba(23, 52, 45, 0.16);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: 650 11px/1.2 inherit;
}

.font-drop-zone {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 112px;
  padding: 16px;
  border: 1.5px dashed rgba(47, 114, 95, 0.48);
  border-radius: 12px;
  background: rgba(47, 114, 95, 0.055);
  color: #35574c;
  cursor: pointer;
  text-align: center;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.font-drop-zone:hover,
.font-drop-zone:focus-visible,
.font-drop-zone.is-dragging {
  border-color: #2f725f;
  outline: none;
  background: rgba(47, 114, 95, 0.11);
}

.font-drop-zone.is-dragging {
  transform: scale(1.01);
}

.font-drop-zone strong {
  font-size: 13px;
}

.font-drop-zone span {
  max-width: 290px;
  color: #6c7d76;
  font-size: 9px;
  line-height: 1.45;
}

.font-library {
  display: grid;
  gap: 8px;
}

.font-library > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.font-library > header strong {
  color: #29483f;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.font-library > header span {
  min-width: 22px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(23, 52, 45, 0.07);
  color: #60716a;
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: center;
}

.font-library__sample {
  display: grid;
  gap: 4px;
}

.font-library__sample span {
  color: #667770;
  font-size: 9px;
  font-weight: 700;
}

.font-library__sample input {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(23, 52, 45, 0.16);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
  color: #263f37;
  font: 12px/1.2 system-ui, sans-serif;
  box-sizing: border-box;
}

.font-library__sample input:focus {
  border-color: rgba(47, 114, 95, 0.55);
  outline: 2px solid rgba(47, 114, 95, 0.12);
}

#fontLibraryEmpty {
  margin: 0;
  padding: 9px;
  border-radius: 8px;
  background: rgba(23, 52, 45, 0.045);
  color: #788680;
  font-size: 9px;
  text-align: center;
}

#fontLibraryEmpty[hidden] {
  display: none;
}

#fontLibraryList {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.font-library__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 8px;
  padding: 8px 8px 7px 9px;
  border: 1px solid rgba(23, 52, 45, 0.11);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.68);
}

.font-library__preview {
  overflow: hidden;
  color: #263f37;
  font-size: 18px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.font-library__meta {
  grid-column: 1;
  overflow: hidden;
  color: #75847e;
  font: 8px/1.25 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.font-library__remove {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: rgba(157, 65, 49, 0.08);
  color: #904335;
  cursor: pointer;
  font-size: 15px;
}

.font-library__remove:hover {
  background: rgba(157, 65, 49, 0.16);
}

.typography-status,
.typography-note {
  margin: 0;
  color: #60716a;
  font-size: 10px;
  line-height: 1.45;
}

.typography-status {
  padding: 8px 9px;
  border-radius: 8px;
  background: rgba(23, 52, 45, 0.06);
}

.typography-status[data-state="loading"] {
  color: #765d27;
  background: rgba(194, 144, 45, 0.11);
}

.typography-status[data-state="success"] {
  color: #286451;
  background: rgba(47, 114, 95, 0.1);
}

.typography-status[data-state="error"] {
  color: #904335;
  background: rgba(157, 65, 49, 0.1);
}

.typography-note {
  color: #75837e;
  font-size: 9px;
}

.relief-ramp {
  display: grid;
  gap: 12px;
}

.relief-ramp__preview {
  height: 42px;
  border: 1px solid rgba(23, 52, 45, 0.14);
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.relief-ramp__zoom-note {
  display: flex;
  justify-content: space-between;
  margin-top: -6px;
  color: #71817b;
  font: 8px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.relief-ramp__intensity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px 9px;
  color: #53665f;
  font-size: 9px;
  font-weight: 750;
}

.relief-ramp__intensity input {
  grid-column: 1;
  width: 100%;
  accent-color: #2f725f;
}

.relief-ramp__intensity output {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 42px;
  padding: 6px 7px;
  border-radius: 7px;
  background: rgba(23, 52, 45, 0.07);
  color: #345248;
  font: 700 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: right;
}

.relief-ramp__section-heading {
  display: grid;
  gap: 2px;
  padding-top: 2px;
  color: #29483f;
}

.relief-ramp__section-heading strong {
  font-size: 10px;
}

.relief-ramp__section-heading small {
  color: #71817b;
  font-size: 8px;
}

.relief-opacity-curve {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(23, 52, 45, 0.1);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.54);
}

.relief-opacity-curve__preview {
  height: 24px;
  overflow: hidden;
  border: 1px solid rgba(23, 52, 45, 0.14);
  border-radius: 7px;
  background-color: #eef1ec;
  background-image:
    linear-gradient(45deg, rgba(23, 52, 45, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(23, 52, 45, 0.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(23, 52, 45, 0.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(23, 52, 45, 0.08) 75%);
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-size: 12px 12px;
}

.relief-opacity-curve__preview-bar {
  width: 100%;
  height: 100%;
}

.relief-opacity-curve__stops {
  display: grid;
  gap: 6px;
}

.relief-opacity-curve__stop {
  display: grid;
  gap: 5px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(23, 52, 45, 0.045);
}

.relief-opacity-curve__stop > strong {
  color: #405c53;
  font-size: 9px;
}

.relief-opacity-curve__control {
  display: grid;
  grid-template-columns: 43px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 6px;
}

.relief-opacity-curve__control span {
  color: #71817b;
  font-size: 8px;
  font-weight: 700;
}

.relief-opacity-curve__control input[type="range"] {
  min-width: 0;
  width: 100%;
  accent-color: #2f725f;
}

.relief-opacity-curve__control output {
  color: #345248;
  font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: right;
}

.relief-ramp__stops {
  display: grid;
  gap: 7px;
}

.relief-ramp__stop {
  display: grid;
  grid-template-columns: 34px 62px minmax(0, 1fr) 52px;
  align-items: center;
  gap: 7px;
}

.relief-ramp__stop input[type="color"] {
  width: 34px;
  height: 28px;
  padding: 2px;
  border: 1px solid rgba(23, 52, 45, 0.16);
  border-radius: 7px;
  background: #fff;
  cursor: pointer;
}

.relief-ramp__stop label {
  overflow: hidden;
  color: #53665f;
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relief-ramp__stop input[type="range"] {
  min-width: 0;
  width: 100%;
  accent-color: var(--stop-color, #2f725f);
}

.relief-ramp__stop output {
  color: #345248;
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-align: right;
}

.relief-ramp__reset {
  padding: 8px 10px;
  border: 1px solid rgba(151, 64, 45, 0.2);
  border-radius: 9px;
  background: rgba(151, 64, 45, 0.07);
  color: #924636;
  cursor: pointer;
  font: 750 10px/1 inherit;
}

.layer-explorer {
  position: fixed;
  z-index: 6;
  right: 14px;
  bottom: 42px;
  display: flex;
  flex-direction: column;
  width: min(320px, calc(100vw - 28px));
  max-height: min(76vh, 760px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 15px;
  background: rgba(248, 249, 244, 0.97);
  box-shadow: 0 18px 55px rgba(19, 42, 36, 0.28);
  backdrop-filter: blur(18px);
}

.layer-explorer[hidden] {
  display: none;
}

.layer-explorer > header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px 9px 13px;
  border-bottom: 1px solid var(--line);
}

.layer-explorer > header > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.layer-explorer > header strong {
  font-size: 13px;
}

.layer-explorer > header small {
  color: #70817a;
  font: 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.layer-explorer > header button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #51645d;
  cursor: pointer;
  font-size: 20px;
}

.layer-explorer__toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 8px 9px;
  border-bottom: 1px solid rgba(23, 52, 45, 0.08);
}

.layer-explorer__sides,
.layer-explorer__history {
  display: flex;
  padding: 2px;
  border-radius: 8px;
  background: rgba(23, 52, 45, 0.07);
}

.layer-explorer__toolbar button {
  padding: 5px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #5f716a;
  cursor: pointer;
  font: 700 9px/1 inherit;
}

.layer-explorer__sides button.is-active {
  background: #fff;
  box-shadow: 0 1px 5px rgba(23, 52, 45, 0.12);
  color: var(--ink);
}

.layer-explorer__history button {
  min-width: 25px;
  font-size: 15px;
}

.layer-explorer__toolbar button:disabled {
  opacity: 0.3;
  cursor: default;
}

#resetLayerStructure {
  color: #924636;
}

#openReliefFromLayers {
  background: rgba(47, 114, 95, 0.1);
  color: #2f725f;
}

.layer-explorer > p {
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 11px;
  border-bottom: 1px solid rgba(23, 52, 45, 0.08);
  color: #7a8984;
  font-size: 8px;
}

.layer-explorer__list {
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.layer-explorer__item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 31px;
  padding: 3px 5px 3px 4px;
  border-bottom: 1px solid rgba(23, 52, 45, 0.07);
  background: transparent;
  transition: background 100ms ease, opacity 100ms ease;
}

.layer-explorer__item:hover {
  background: rgba(226, 237, 228, 0.58);
}

.layer-explorer__item.is-dragging {
  opacity: 0.35;
}

.layer-explorer__item.is-drag-target {
  box-shadow: inset 0 2px #2f725f;
}

.layer-explorer__handle {
  color: #91a09a;
  cursor: grab;
  font-size: 10px;
  letter-spacing: -3px;
}

.layer-explorer__name {
  overflow: hidden;
  color: #304d44;
  font: 9px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-explorer__actions {
  display: flex;
  gap: 1px;
}

.layer-explorer__actions button:not(:first-child) {
  opacity: 0;
  pointer-events: none;
  transition: opacity 100ms ease;
}

.layer-explorer__item:hover .layer-explorer__actions button,
.layer-explorer__item:focus-within .layer-explorer__actions button {
  opacity: 1;
  pointer-events: auto;
}

.layer-explorer__actions button {
  display: grid;
  width: 22px;
  height: 22px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  color: #53665f;
  cursor: pointer;
  font: 700 11px/1 inherit;
}

.layer-explorer__actions button:last-child {
  color: #9a4938;
}

.compare-divider {
  position: fixed;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 32px;
  border: 0;
  outline: none;
  background: transparent;
  cursor: ew-resize;
  touch-action: none;
  transform: translateX(-50%);
}

.compare-divider::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow:
    0 0 0 1px rgba(23, 52, 45, 0.24),
    0 0 18px rgba(23, 52, 45, 0.24);
  content: "";
  transform: translateX(-50%);
}

.compare-divider:focus-visible .compare-handle {
  outline: 3px solid #d95f3b;
  outline-offset: 3px;
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 4px;
  min-width: 68px;
  height: 42px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  background: rgba(23, 52, 45, 0.92);
  box-shadow: 0 10px 30px rgba(23, 52, 45, 0.3);
  color: #fff;
  font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  pointer-events: none;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(12px);
}

.compare-handle span {
  font-size: 19px;
  line-height: 1;
}

.compare-handle b {
  min-width: 19px;
  text-align: center;
  font-size: 10px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.maplibregl-ctrl-top-left {
  top: 62px;
}

.maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(24, 49, 42, 0.16);
}

.maplibregl-ctrl-attrib {
  margin: 0 6px 6px !important;
  border-radius: 8px;
  background: rgba(250, 250, 245, 0.86) !important;
  backdrop-filter: blur(10px);
}

.feature-inspector-popup {
  z-index: 12;
}

.feature-inspector-popup .maplibregl-popup-content {
  width: min(720px, calc(100vw - 32px));
  max-height: min(78vh, 720px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 16px;
  background: rgba(248, 249, 244, 0.97);
  box-shadow: 0 18px 55px rgba(19, 42, 36, 0.28);
  color: var(--ink);
  backdrop-filter: blur(18px);
}

.feature-inspector-popup .maplibregl-popup-tip {
  border-top-color: rgba(248, 249, 244, 0.97);
  border-bottom-color: rgba(248, 249, 244, 0.97);
}

.feature-inspector-popup .maplibregl-popup-close-button {
  z-index: 2;
  top: 7px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #51645d;
  font-size: 20px;
}

.feature-inspector-popup .maplibregl-popup-close-button:hover {
  background: rgba(23, 52, 45, 0.09);
}

.feature-popup {
  display: flex;
  flex-direction: column;
  max-height: min(78vh, 720px);
}

.feature-popup > header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 10px 46px 10px 14px;
  border-bottom: 1px solid var(--line);
}

.feature-popup > header strong {
  font-size: 14px;
}

.feature-popup > header span {
  color: #64766f;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-browser {
  display: grid;
  grid-template-columns: minmax(180px, 34%) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.feature-browser__list {
  max-height: calc(min(78vh, 720px) - 45px);
  overflow: auto;
  border-right: 1px solid var(--line);
  background: rgba(229, 233, 225, 0.52);
}

.feature-browser__list button {
  display: grid;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(23, 52, 45, 0.09);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.feature-browser__list button:hover {
  background: rgba(255, 255, 255, 0.68);
}

.feature-browser__list button.is-selected {
  background: #fff;
  box-shadow: inset 3px 0 #2f725f;
}

.feature-browser__list strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-browser__list small {
  margin-top: 2px;
  overflow: hidden;
  color: #70817a;
  font: 9px/1.25 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-browser__editor {
  max-height: calc(min(78vh, 720px) - 45px);
  overflow: auto;
}

.feature-layer-editor {
  display: grid;
  gap: 13px;
  padding: 14px;
}

.feature-layer-editor__notice {
  margin: 0;
  color: #61736c;
  font-size: 11px;
}

.feature-summary {
  overflow: hidden;
  border: 1px solid rgba(47, 114, 95, 0.2);
  border-radius: 11px;
  background: rgba(226, 237, 228, 0.55);
}

.feature-summary > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-bottom: 1px solid rgba(47, 114, 95, 0.14);
}

.feature-summary strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-summary > div span {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(47, 114, 95, 0.11);
  color: #45645a;
  font-size: 9px;
  font-weight: 750;
}

.feature-summary dl {
  display: grid;
  grid-template-columns: repeat(2, auto minmax(0, 1fr));
  gap: 5px 7px;
  margin: 0;
  padding: 8px 10px 10px;
  font-size: 9px;
}

.feature-summary dt {
  color: #71817b;
  font-weight: 700;
}

.feature-summary dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #345248;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-layer-editor h4 {
  margin: 2px 0 -6px;
  color: #53665f;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.feature-edit-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.feature-color-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.feature-edit-field {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: #60716a;
  font-size: 9px;
  font-weight: 700;
}

.feature-edit-field > small {
  color: #84918c;
  font-weight: 500;
}

.feature-edit-field.is-current-feature {
  padding: 6px;
  border: 1px solid rgba(47, 114, 95, 0.34);
  border-radius: 9px;
  background: rgba(224, 238, 229, 0.72);
}

.feature-edit-field.is-current-feature > span::after {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 4px;
  border-radius: 999px;
  background: #2f725f;
  color: #fff;
  content: "actuelle";
  font-size: 7px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  vertical-align: 1px;
}

.feature-edit-field.is-current-feature > small {
  color: #3f6b5d;
  font-weight: 700;
}

.feature-edit-field input,
.feature-edit-field select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 5px 7px;
  border: 1px solid rgba(23, 52, 45, 0.16);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: 600 11px/1 inherit;
}

.feature-edit-field input[type="color"] {
  padding: 3px;
  cursor: pointer;
}

.feature-edit-field input[type="checkbox"] {
  width: 32px;
  accent-color: #2f725f;
}

.feature-scale-controls {
  display: grid;
  gap: 7px;
}

.feature-scale-row {
  display: grid;
  grid-template-columns: minmax(100px, 1.3fr) repeat(2, minmax(84px, 1fr));
  align-items: end;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(23, 52, 45, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.55);
}

.feature-scale-row > code {
  align-self: center;
  overflow: hidden;
  color: #39564c;
  font-size: 10px;
  text-overflow: ellipsis;
}

.feature-scale-row__warning {
  display: none;
  grid-column: 1 / -1;
  color: #984936;
  font-size: 9px;
  font-weight: 700;
}

.feature-scale-row.has-collision-risk {
  border-color: rgba(177, 76, 51, 0.34);
  background: rgba(255, 237, 230, 0.58);
}

.feature-scale-row.has-collision-risk .feature-scale-row__warning {
  display: block;
}

.feature-attributes {
  border-top: 1px solid var(--line);
  color: #53665f;
  font-size: 10px;
}

.feature-attributes summary {
  padding: 10px 0 4px;
  cursor: pointer;
  font-weight: 750;
}

.feature-attributes dl {
  display: grid;
  grid-template-columns: minmax(90px, 0.7fr) minmax(0, 1.3fr);
  margin: 5px 0;
  overflow: hidden;
  border: 1px solid rgba(23, 52, 45, 0.1);
  border-radius: 8px;
}

.feature-attributes dt,
.feature-attributes dd {
  min-width: 0;
  margin: 0;
  padding: 5px 7px;
  overflow-wrap: anywhere;
  border-bottom: 1px solid rgba(23, 52, 45, 0.07);
}

.feature-attributes dt {
  background: rgba(229, 233, 225, 0.58);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.feature-layer-editor__reset {
  justify-self: start;
  padding: 7px 10px;
  border: 1px solid rgba(157, 65, 49, 0.25);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: #904335;
  cursor: pointer;
  font: 700 10px/1 inherit;
}

.saved-edits-manager {
  border-top: 1px solid var(--line);
  color: #53665f;
  font-size: 10px;
}

.saved-edits-manager summary {
  padding: 10px 0 4px;
  cursor: pointer;
  font-weight: 750;
}

.saved-edits-manager > div {
  display: grid;
  gap: 5px;
  margin-top: 5px;
}

.saved-edits-manager > div > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 7px;
  border: 1px solid rgba(23, 52, 45, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.saved-edits-manager code {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-edits-manager button {
  flex: 0 0 auto;
  padding: 5px 7px;
  border: 1px solid rgba(157, 65, 49, 0.2);
  border-radius: 7px;
  background: #fff;
  color: #904335;
  cursor: pointer;
  font: 700 9px/1 inherit;
}

.feature-popup__empty {
  margin: 0;
  padding: 18px;
  color: #64766f;
  font-size: 12px;
}

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

@media (max-width: 900px) {
  .comparison-search {
    top: 70px;
    width: min(540px, calc(100vw - 28px));
  }

  .search-results {
    max-height: min(540px, calc(100vh - 132px));
  }
}

@media (max-width: 720px) {
  .style-controls {
    gap: 8px;
  }

  .style-picker {
    grid-template-columns: 1fr;
    gap: 1px;
    width: calc(50% - 4px);
    padding: 7px 9px;
  }

  .style-picker > span {
    font-size: 8px;
  }

  .style-picker select {
    font-size: 11px;
  }

  .comparison-search {
    top: 76px;
    width: calc(100vw - 28px);
  }

  .archive-source {
    bottom: 10px;
    width: calc(100vw - 28px);
  }

  #archiveSourceForm {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #archiveSourceForm label {
    display: none;
  }

  #archiveSourceMessage {
    margin-left: 1px;
  }

  .search-results {
    max-height: min(540px, calc(100vh - 138px));
  }

  .maplibregl-ctrl-top-left {
    top: 130px;
  }

  .feature-browser {
    grid-template-columns: 1fr;
  }

  .feature-browser__list {
    display: flex;
    max-height: 118px;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .feature-browser__list button {
    min-width: 170px;
    border-right: 1px solid rgba(23, 52, 45, 0.09);
  }

  .feature-browser__editor {
    max-height: calc(min(78vh, 720px) - 164px);
  }

  .feature-color-controls,
  .feature-edit-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
