:root {
  --void: #0d1612;
  --panel: #14241c;
  --panel-2: #1b3026;
  --line: #2a4638;
  --moss: #3f8f62;
  --moss-2: #7dcea0;
  --ember: #e8b86d;
  --weka: #c45c26;
  --ink: #f4efe4;
  --muted: #b7c4b8;
  --danger: #e07a5f;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --sans: "DM Sans", "Segoe UI", sans-serif;
  --display: "Fraunces", "Times New Roman", serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  min-height: 100%;
}

a { color: var(--ember); }
img.fit { max-width: 100%; display: block; }
button, input, select { font: inherit; }

.app {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 22, 18, 0.92);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}
.brand img { width: 42px; height: 34px; }
.brand strong {
  display: block;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
}
.brand span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}
.nav a:hover { color: var(--ink); }

.hero {
  padding: 0.7rem 1.1rem 0.2rem;
  max-width: 72rem;
}
.hero h1 {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.1;
  font-weight: 560;
}
.hero p { margin: 0; color: var(--muted); max-width: 40rem; }

.warn {
  margin: 0.5rem 1.1rem 0;
  padding: 0.7rem 0.9rem;
  border: 1px solid #5a4a22;
  background: #2a2414;
  color: #f0e2b8;
  border-radius: 12px;
  font-size: 0.88rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) minmax(300px, 1fr) minmax(280px, 1fr);
  min-height: 0;
  height: 100%;
  gap: 0;
  position: relative;
}

.filters, .list, .map-wrap {
  min-height: 0;
  position: relative;
  z-index: 2;
}

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

.list {
  border-right: 1px solid var(--line);
  overflow: auto;
  background: #101c16;
}

.map-wrap {
  position: relative;
  z-index: 1;
  min-height: 0;
  overflow: hidden;
}
#map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

label.block {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0.95rem 0 0.35rem;
}

input[type="search"], input[type="text"], select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--void);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
}

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}
.chip.is-on, .chip:hover { border-color: var(--ember); color: var(--ember); }

.checks { display: grid; gap: 0.35rem; color: var(--muted); font-size: 0.92rem; }
.checks label { display: flex; gap: 0.45rem; align-items: center; }

.range { width: 100%; accent-color: var(--weka); }
.meta { color: var(--muted); font-size: 0.85rem; }

.list-head {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: #101c16;
  border-bottom: 1px solid var(--line);
  z-index: 2;
}

.card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.card:hover, .card.is-on { background: var(--panel-2); }
.card img, .thumb {
  width: 96px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  background: #24352c;
}
.card-title { display: block; margin: 0 0 0.2rem; font-size: 1rem; font-family: var(--display); font-weight: 560; }
.card p { margin: 0; color: var(--muted); font-size: 0.86rem; }
.pills { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; }
.pill {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  color: var(--ink);
  background: #1d3328;
}

.detail {
  position: absolute;
  right: 0.8rem;
  top: 0.8rem;
  bottom: 0.8rem;
  width: min(380px, calc(100% - 1.6rem));
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: auto;
  z-index: 20;
  display: none;
  pointer-events: auto;
}
.detail.is-open { display: block; }
.detail img.hero-pic { width: 100%; height: 180px; object-fit: cover; }
.detail .pad { padding: 1rem 1.05rem 1.3rem; }
.detail h2 { margin: 0 0 0.3rem; font-family: var(--display); font-size: 1.55rem; }
.close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  border: 0;
  background: rgba(0,0,0,0.5);
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  cursor: pointer;
}

.actions { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.8rem 0; }
.btn {
  border: 1px solid var(--line);
  background: var(--void);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.btn.primary { background: var(--weka); border-color: var(--weka); color: #fff8f2; }

.leaflet-container { background: #0b1410; font-family: var(--sans); }
.leaflet-container img,
.leaflet-container svg {
  max-width: none !important;
  max-height: none !important;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 0.9rem 1.1rem 1.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.page {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1.1rem 3rem;
}
.page h1 { font-family: var(--display); }

@media (max-width: 1100px) {
  .layout { grid-template-columns: minmax(240px, 280px) 1fr; }
  .map-wrap { min-height: 320px; }
}

@media (max-width: 800px) {
  .hero { display: none; }
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) minmax(220px, 40%);
  }
  .filters {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 34vh;
  }
  .list { order: 2; }
  .map-wrap { order: 3; min-height: 220px; }
  .mobile-bar {
    display: none;
  }
}

@media (min-width: 801px) {
  .mobile-bar { display: none; }
}
