@font-face {
  font-family: "Open Sans Custom";
  src: url("../fonts/OpenSans-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Open Sans Custom";
  src: url("../fonts/OpenSans-Italic-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Lora Custom";
  src: url("../fonts/Lora/Lora-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #161616;
  --panel: #1e1e1e;
  --line: #353535;
  --text: #ececec;
  --text-muted: #b1b1b1;
  --accent: #9b9b9b;
  --v1: #b8423f;
  --v2: #245d9f;
  --other: #6b6b6b;
  --header-h: 66px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Open Sans Custom", sans-serif;
  height: 100%;
}

a {
  color: #d7d7d7;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2500;
  height: var(--header-h);
  background: rgba(25, 25, 25, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 18px;
  backdrop-filter: blur(4px);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.015em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  max-width: 56%;
  text-align: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.brand img {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
}

.brand span {
  line-height: 1.1;
}

.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.nav a.active {
  font-weight: 700;
  border-bottom-color: var(--accent);
}

.mobile-filter-btn {
  display: none;
}

.page-wrap {
  padding-top: var(--header-h);
}

.map-layout {
  height: calc(100vh - var(--header-h));
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 0;
}

.map-layout.details-open {
  grid-template-columns: 320px minmax(0, 1fr) 390px;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--panel);
  overflow: auto;
  padding: 18px;
}

.filter-group {
  margin-bottom: 18px;
}

.filter-group label {
  display: block;
  font-size: 13px;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  background: #131313;
  color: var(--text);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  border: 1px solid var(--line);
  background: #121212;
  color: var(--text);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  cursor: pointer;
}

.pill.active {
  border-color: #8e8e8e;
  background: #2b2b2b;
  color: #f0f0f0;
}

.small-note {
  margin-top: 8px;
  color: #d1a5a5;
  font-size: 12px;
  display: none;
}

.small-note.visible {
  display: block;
}

.range-wrap {
  padding: 2px 2px 8px;
}

.range-row {
  position: relative;
  height: 34px;
}

.range-row input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  pointer-events: none;
  background: none;
  -webkit-appearance: none;
}

.range-row input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: #6f6f6f;
}

.range-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  pointer-events: auto;
  border: 1px solid #9f9f9f;
  background: #dfdfdf;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-top: -6px;
}

.range-row input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: #6f6f6f;
}

.range-row input[type="range"]::-moz-range-thumb {
  pointer-events: auto;
  border: 1px solid #9f9f9f;
  background: #dfdfdf;
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.range-summary {
  font-size: 12px;
  color: var(--text-muted);
}

.map-stage {
  position: relative;
  min-width: 0;
  z-index: 1;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.legend {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 40;
  border: 1px solid var(--line);
  background: rgba(20, 20, 20, 0.92);
  padding: 10px;
  border-radius: 9px;
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.legend-item:first-child {
  margin-top: 0;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.panel {
  border-left: 1px solid var(--line);
  background: var(--panel);
  overflow: auto;
  padding: 16px;
}

.panel .close-btn {
  margin-left: auto;
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.panel-head {
  display: flex;
  align-items: start;
  gap: 8px;
}

.panel h2 {
  font-size: 22px;
  margin: 0;
}

.panel .muted {
  color: var(--text-muted);
  margin-top: 6px;
  font-size: 14px;
}

.panel h3 {
  margin: 20px 0 8px;
  font-size: 15px;
}

.panel p,
.panel li {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.45;
}

.panel ul {
  padding-left: 18px;
  margin: 0;
}

.action-btn {
  margin-top: 12px;
  border: 1px solid var(--accent);
  background: #111;
  color: #efefef;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

.sheet {
  display: none;
  pointer-events: none;
}

.page-content {
  width: min(900px, 100% - 28px);
  margin: 26px auto 36px;
}

.page-content h1 {
  font-size: 34px;
  margin: 0 0 10px;
}

.page-content h2 {
  font-size: 19px;
  margin-top: 26px;
}

.page-content p {
  font-family: "Lora Custom", serif;
  line-height: 1.7;
  font-size: 18px;
  margin: 0 0 16px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0 1.6rem;
  font-size: 16px;
}

.data-table th,
.data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.data-table thead th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--line);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.about-media {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 18px 0 24px;
}

.about-figure {
  margin: 0;
  background: #151515;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.about-figure img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #0f0f0f;
}

.about-figure figcaption {
  padding: 10px 11px 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.about-figure figcaption a {
  color: #d8d8d8;
}

#lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.88);
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

#lightbox-overlay.open {
  display: flex;
}

#lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border: 1px solid #444;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
}

.method-figure {
  margin: 2rem 0;
  text-align: center;
}

.method-figure img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ddd;
}

.method-figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.9rem;
  color: #555;
}

.site-footer {
  text-align: center;
  padding: 18px 12px 26px;
  color: var(--text-muted);
  border-top: 1px solid var(--line);
}

.site-footer p {
  margin: 0;
}

.gtranslate_wrapper {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 2605;
}

@media (max-width: 980px) {
  :root {
    --header-h: 116px;
  }

  .site-header {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
    justify-content: stretch;
    padding: 10px 8px 8px;
    gap: 6px 8px;
  }

  .brand {
    position: static;
    transform: none;
    grid-column: 1 / span 2;
    grid-row: 1;
    justify-self: center;
    max-width: 100%;
    font-size: 15px;
    line-height: 1.1;
    margin-top: 10px;
    padding: 0 64px;
  }

  .nav {
    grid-column: 1;
    grid-row: 2;
    gap: 10px;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
  }

  .nav a {
    font-size: 14px;
  }

  .mobile-filter-btn {
    grid-column: 2;
    grid-row: 2;
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #131313;
    color: var(--text);
    font: inherit;
    padding: 6px 10px;
    cursor: pointer;
  }

  .map-layout,
  .map-layout.details-open {
    display: block;
    height: calc(100vh - var(--header-h));
  }

  .map-stage {
    height: calc(100vh - var(--header-h));
  }

  #map {
    min-height: calc(100vh - var(--header-h));
  }

  .sidebar,
  .panel {
    display: none;
  }

  .sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    background: #171717;
    border-top: 1px solid var(--line);
    border-radius: 16px 16px 0 0;
    max-height: 78vh;
    overflow: auto;
    transform: translateY(100%);
    transition: transform 0.22s ease;
    display: block;
    pointer-events: none;
  }

  .sheet.open {
    transform: translateY(0%);
    pointer-events: auto;
  }

  .sheet-body {
    padding: 14px;
  }

  .sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    background: #1a1a1a;
  }

  .sheet-footer {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 14px;
    border-top: 1px solid var(--line);
    background: #1a1a1a;
  }

  .sheet-footer button {
    font: inherit;
    border-radius: 999px;
    padding: 8px 12px;
    border: 1px solid #454545;
    background: #111;
    color: var(--text);
    cursor: pointer;
  }

  .sheet-footer .apply {
    border-color: #9b9b9b;
    color: #131313;
    background: #d0d0d0;
  }

  .legend {
    bottom: 74px;
  }

  .gtranslate_wrapper {
    top: 8px;
    left: 10px;
  }
}
