:root {
  --color-charcoal: #25211c;
  --color-olive: #56704a;
  --color-sand: #cbb18a;
  --color-warm-white: #f3efe6;
  --color-stone: #8a8170;
  --color-panel: #f7f5ef;
  --color-border: #ded8cc;
  --topbar-height: 60px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--color-charcoal);
  background: var(--color-warm-white);
}

#top-bar {
  height: var(--topbar-height);
  width: 100vw;
  background: var(--color-charcoal);
  border-bottom: 1px solid rgba(203, 177, 138, 0.35);
  box-shadow: 0 3px 14px rgba(37, 33, 28, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  z-index: 1500;
}

.brand-link {
  display: flex;
  align-items: center;
  height: 100%;
  text-decoration: none;
}

.brand-logo {
  height: 46px;
  width: auto;
  display: block;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-search,
.topbar-filter {
  width: 260px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(243, 239, 230, 0.22);
  background: rgba(243, 239, 230, 0.10);
  color: var(--color-warm-white);
  padding: 0 14px;
  font-size: 14px;
  outline: none;
}

.topbar-search::placeholder,
.topbar-filter::placeholder {
  color: rgba(243, 239, 230, 0.55);
}

.topbar-button {
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(243, 239, 230, 0.22);
  background: rgba(243, 239, 230, 0.10);
  color: var(--color-warm-white);
  padding: 0 14px;
  font-size: 14px;
  cursor: pointer;
}

.topbar-button:hover {
  background: rgba(243, 239, 230, 0.18);
}

.topbar-button-primary {
  background: var(--color-sand);
  border-color: var(--color-sand);
  color: var(--color-charcoal);
  font-weight: 700;
}

.topbar-button-primary:hover {
  background: #d8c099;
}

.language-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.language-menu-button {
  height: 36px;
  min-width: 72px;
  border-radius: 999px;
  border: 1px solid rgba(203, 177, 138, 0.45);
  background: rgba(243, 239, 230, 0.12);
  color: var(--color-warm-white);
  padding: 0 10px 0 13px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.language-menu-button:hover {
  background: rgba(243, 239, 230, 0.18);
  border-color: rgba(203, 177, 138, 0.72);
}

.language-menu-button:focus {
  outline: none;
  border-color: var(--color-sand);
  box-shadow: 0 0 0 3px rgba(203, 177, 138, 0.22);
}

.language-menu-chevron {
  font-size: 11px;
  color: rgba(243, 239, 230, 0.72);
  transform: translateY(-1px);
}

.language-menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 120px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(203, 177, 138, 0.42);
  background: var(--color-warm-white);
  box-shadow: 0 10px 28px rgba(37, 33, 28, 0.24);
  display: none;
  z-index: 2500;
}

.language-menu.is-open .language-menu-list {
  display: grid;
  gap: 4px;
}

.language-menu-option {
  width: 100%;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--color-charcoal);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.language-menu-option:hover {
  background: rgba(86, 112, 74, 0.12);
  color: var(--color-olive);
}

.language-menu-option.is-active {
  background: rgba(203, 177, 138, 0.32);
  color: var(--color-charcoal);
}




#app {
  height: calc(100vh - var(--topbar-height));
  width: 100vw;
  display: flex;
  overflow: hidden;
}

#side-panel {
  width: 390px;
  max-width: 42vw;
  height: calc(100vh - var(--topbar-height));
  background: #f3efe6;
  border-right: 1px solid rgba(138, 129, 112, 0.35);
  box-shadow: 4px 0 18px rgba(37, 33, 28, 0.16);
  z-index: 1000;
  overflow-y: auto;
  display: none;
}

#side-panel.is-visible {
  display: block;
}

#panel-content {
  padding: 20px;
}

#map {
  flex: 1;
  height: calc(100vh - var(--topbar-height));
  min-width: 0;
}

.panel-card {
  position: relative;
  background: rgba(255, 252, 245, 0.86);
  border: 1px solid rgba(203, 177, 138, 0.42);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(37, 33, 28, 0.07);
  overflow: hidden;
}

.panel-card::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--color-olive), var(--color-sand));
  margin: -14px -14px 12px -14px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.panel-title {
  font-size: 24px;
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--color-charcoal);
}

.panel-close-button {
  border: 1px solid #ded8cc;
  background: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  color: #4a443b;
}

.panel-close-button:hover {
  background: #ffffff;
}

.segment-meta {
  color: #5f584e;
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 14px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(210, 203, 190, 0.55);
}

.meta-row:last-child {
  border-bottom: none;
}

.meta-label {
  color: var(--color-stone);
}

.meta-value {
  color: var(--color-charcoal);
  font-weight: 700;
  text-align: right;
}

.segment-description {
  font-size: 15px;
  line-height: 1.45;
  margin-bottom: 16px;
}

.section-title {
  font-size: 15px;
  font-weight: 800;
  margin: 18px 0 10px;
  color: var(--color-charcoal);
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 18px 0 10px;
}

.section-title-row .section-title {
  margin: 0;
}

.small-panel-button {
  border: 1px solid rgba(86, 112, 74, 0.35);
  background: rgba(86, 112, 74, 0.10);
  color: var(--color-olive);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.small-panel-button:hover {
  background: rgba(86, 112, 74, 0.18);
  border-color: rgba(86, 112, 74, 0.55);
}

.small-panel-button:active {
  transform: translateY(1px);
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.thumbnail-button {
  border: 1px solid rgba(210, 203, 190, 0.8);
  padding: 0;
  background: #ffffff;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 2px 8px rgba(37, 33, 28, 0.08);
}

.thumbnail-button:hover {
  outline: 3px solid rgba(86, 112, 74, 0.65);
  box-shadow: 0 4px 14px rgba(37, 33, 28, 0.16);
  transform: translateY(-1px);
}

.thumbnail-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.empty-state {
  color: #777;
  font-size: 14px;
  font-style: italic;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.status-verified {
  background: #cbb18a;
  color: var(--color-charcoal);
}

.status-to_be_verified {
  background: #e0a15a;
  color: var(--color-charcoal);
}

.status-hidden {
  background: #d8b07a;
  color: var(--color-charcoal);
}

.endpoint-marker {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid var(--color-warm-white);
  box-shadow: 0 2px 8px rgba(37, 33, 28, 0.35);
  color: var(--color-warm-white);
  font-size: 13px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}

.endpoint-marker-a {
  background: var(--color-olive);
}

.endpoint-marker-b {
  background: var(--color-stone);
}

.elevation-profile {
  width: 100%;
}

.elevation-profile-svg {
  width: 100%;
  height: 110px;
  display: block;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(203, 177, 138, 0.38);
  border-radius: 10px;
}

.elevation-profile-line {
  fill: none;
  stroke: var(--color-olive);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.elevation-profile-area {
  fill: rgba(86, 112, 74, 0.16);
}

.elevation-profile-gridline {
  stroke: rgba(138, 129, 112, 0.30);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.elevation-profile-label {
  font-size: 11px;
  fill: var(--color-stone);
  font-weight: 700;
}

.elevation-profile-y-label {
  fill: rgba(37, 33, 28, 0.68);
  font-size: 10px;
  font-weight: 700;
}

.elevation-profile-meta {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  color: var(--color-stone);
  font-size: 13px;
}

.elevation-profile-meta strong {
  color: var(--color-charcoal);
}

#lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

#lightbox.is-visible {
  display: flex;
}

.lightbox-dialog {
  position: relative;
  background: #fff;
  border-radius: 10px;
  width: fit-content;
  max-width: 94vw;
  max-height: 94vh;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.lightbox-image-wrapper {
  position: relative;
  background: #fff;
  width: fit-content;
  max-width: 94vw;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 92vw;
  max-height: min(1200px, calc(92vh - 80px));
  object-fit: contain;
}

.lightbox-click-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  cursor: pointer;
}

.lightbox-click-zone.left {
  left: 0;
}

.lightbox-click-zone.right {
  right: 0;
}

.lightbox-close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.lightbox-caption {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--color-warm-white);
  background: var(--color-stone);
  border-top: none;
  max-width: 92vw;
}

.lightbox-counter {
  color: rgba(243, 239, 230, 0.72);
  font-size: 13px;
  margin-top: 4px;
}

@media (max-width: 900px) {
  .topbar-search,
  .topbar-filter {
    display: none;
  }

  .brand-logo {
    height: 40px;
  }

  #top-bar {
    padding: 0 14px;
  }
}

@media (max-width: 800px) {
  #app {
    display: block;
  }

  #side-panel {
    position: absolute;
    left: 0;
    top: var(--topbar-height);
    width: 88vw;
    max-width: 88vw;
  }

  #map {
    width: 100vw;
    height: calc(100vh - var(--topbar-height));
  }

  .thumbnail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.static-page {
  min-height: calc(100vh - var(--topbar-height));
  background:
    radial-gradient(circle at top left, rgba(203, 177, 138, 0.22), transparent 34%),
    var(--color-warm-white);
  padding: 42px 22px;
}

.static-page-card {
  width: min(820px, 100%);
  margin: 0 auto;
  background: rgba(255, 252, 245, 0.88);
  border: 1px solid rgba(203, 177, 138, 0.42);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(37, 33, 28, 0.10);
  padding: 34px;
}

.static-page-kicker {
  margin: 0 0 8px;
  color: var(--color-olive);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.static-page-card h1 {
  margin: 0 0 18px;
  color: var(--color-charcoal);
  font-size: 34px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.static-page-card h2 {
  margin: 28px 0 10px;
  color: var(--color-charcoal);
  font-size: 19px;
  line-height: 1.2;
}

.static-page-card p,
.static-page-card li {
  color: #4d463d;
  font-size: 16px;
  line-height: 1.65;
}

.static-page-card ul {
  margin: 10px 0 0;
  padding-left: 22px;
}

.contact-callout {
  margin: 22px 0;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(86, 112, 74, 0.28);
  background: rgba(86, 112, 74, 0.08);
  color: var(--color-charcoal);
}

.contact-callout a {
  color: var(--color-olive);
  font-weight: 800;
  text-decoration: none;
}

.contact-callout a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .static-page {
    padding: 24px 14px;
  }

  .static-page-card {
    padding: 24px;
  }

  .static-page-card h1 {
    font-size: 28px;
  }
}

.filter-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.filter-menu-button {
  font-weight: 700;
}

.filter-menu-button.is-active {
  background: rgba(203, 177, 138, 0.92);
  border-color: var(--color-sand);
  color: var(--color-charcoal);
  box-shadow: 0 0 0 3px rgba(203, 177, 138, 0.18);
}

.filter-menu-button.is-active:hover {
  background: #d8c099;
}

.filter-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(203, 177, 138, 0.42);
  background: var(--color-warm-white);
  box-shadow: 0 12px 32px rgba(37, 33, 28, 0.26);
  z-index: 2600;
}

.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(203, 177, 138, 0.35);
  margin-bottom: 10px;
}

.filter-panel-title {
  color: var(--color-charcoal);
  font-size: 14px;
  font-weight: 850;
}

.filter-reset-button {
  border: 1px solid rgba(86, 112, 74, 0.28);
  background: rgba(86, 112, 74, 0.08);
  color: var(--color-olive);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.filter-reset-button:hover {
  background: rgba(86, 112, 74, 0.14);
}

.filter-group {
  padding: 10px 0;
  border-bottom: 1px solid rgba(203, 177, 138, 0.24);
}

.filter-group:last-of-type {
  border-bottom: none;
}

.filter-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.filter-group-title {
  color: var(--color-charcoal);
  font-size: 13px;
  font-weight: 850;
}

.filter-group-actions {
  display: flex;
  gap: 10px;
  margin: 0 0 8px;
}

.filter-link-button {
  border: none;
  background: transparent;
  color: var(--color-olive);
  padding: 0;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.filter-link-button:hover {
  text-decoration: underline;
}

.filter-options {
  display: grid;
  gap: 5px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-charcoal);
  font-size: 13px;
  line-height: 1.3;
  cursor: pointer;
}

.filter-option input {
  accent-color: var(--color-olive);
}

.filter-visible-count {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(203, 177, 138, 0.35);
  color: var(--color-stone);
  font-size: 12px;
  font-weight: 750;
}

.segment-search {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.segment-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 320px;
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid rgba(203, 177, 138, 0.42);
  background: var(--color-warm-white);
  box-shadow: 0 12px 32px rgba(37, 33, 28, 0.26);
  z-index: 2600;
}

.segment-search-result {
  width: 100%;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--color-charcoal);
  padding: 9px 10px;
  cursor: pointer;
  display: grid;
  gap: 3px;
  text-align: left;
}

.segment-search-result:hover {
  background: rgba(86, 112, 74, 0.12);
}

.segment-search-result-title {
  font-size: 13px;
  font-weight: 800;
}

.segment-search-result-meta {
  color: var(--color-stone);
  font-size: 12px;
  font-weight: 600;
}

.segment-search-empty {
  color: var(--color-stone);
  font-size: 13px;
  font-weight: 700;
  padding: 10px;
}

.static-page-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(86, 112, 74, 0.35);
  background: rgba(86, 112, 74, 0.10);
  color: var(--color-olive);
  padding: 0 16px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.static-page-link-button:hover {
  background: rgba(86, 112, 74, 0.18);
  border-color: rgba(86, 112, 74, 0.55);
  text-decoration: none;
}