:root {
  --bg: #f4f7f9;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --text: #1f2937;
  --text-soft: #6b7280;
  --border: #dbe3ea;
  --primary: #136f63;
  --primary-dark: #0f5a51;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  line-height: 1.5;
}

.container {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
}

.page-header {
  background: linear-gradient(135deg, #0f5a51, #136f63);
  color: white;
  padding: 40px 0 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo-block {
  flex-shrink: 0;
}

.logo {
  width: 200px;
  height: auto;
  object-fit: contain;
  margin-left: 400px;
}

.header-text {
  display: flex;
  flex-direction: column;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
}

.page-header h1 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.15;
}

.page-intro {
  margin: 0;
  max-width: 900px;
  font-size: 1.05rem;
  opacity: 0.95;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
  margin-bottom: 32px;
}

.main-content {
  display: grid;
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.info-card {
  padding: 20px 22px;
  background: var(--surface-muted);
}

.info-card h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.info-card p {
  margin: 0;
  color: var(--text-soft);
}

.map-card {
  overflow: hidden;
}

.section-header {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
}

.section-header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.section-header p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 0.95rem;
}

#map {
  width: 100%;
  height: 450px;
}

.sidebar-card {
  padding: 0;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#legend-list {
  list-style: none;
  margin: 0;
  padding: 16px 18px 18px;
  overflow-y: auto;
}

#legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eef2f6;
}

#legend li:last-child {
  border-bottom: none;
}

.legend-line-swatch {
  width: 36px;
  min-width: 36px;
  height: 12px;
  display: inline-flex;
  align-items: center;
}

.legend-line-swatch svg {
  width: 36px;
  height: 12px;
  overflow: visible;
}

.legend-label-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.legend-label-wrap label {
  font-weight: 600;
  cursor: pointer;
}

.legend-meta {
  color: var(--text-soft);
  font-size: 0.8rem;
}

#nearby {
  padding: 0;
}

#nearby-list {
  list-style: none;
  margin: 0;
  padding: 16px 20px 20px;
}

#nearby li {
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
}

#nearby li:last-child {
  margin-bottom: 0;
}

.nearby-title {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.nearby-status {
  color: var(--text-soft);
}

.nearby-meta {
  color: var(--text-soft);
  font-size: 0.94rem;
}

.nearby-link {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.nearby-link:hover {
  text-decoration: underline;
}

#search {
  position: relative;
}

#search input {
  width: 100%;
  max-width: 420px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
}

#search button {
  padding: 12px 16px;
  border: none;
  background: var(--primary);
  color: white;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s ease;
}

#search button:hover {
  background: var(--primary-dark);
}

#suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  max-width: 420px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 1000;
  overflow: hidden;
}

.suggestion-item {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eef2f6;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background: #f3f6f9;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar-card {
    position: static;
    max-height: none;
  }

  #map {
    height: 560px;
  }
}

.site-footer {
  margin-top: 40px;
  padding: 20px 0;
  background: #0f5a51;
  color: white;
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .logo {
    width: 60px;
    margin-left: 0;
    margin: auto;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 20px, 1400px);
  }

  .page-header {
    padding: 28px 0 24px;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .section-header,
  .info-card,
  #legend-list,
  #nearby-list {
    padding-left: 16px;
    padding-right: 16px;
  }

  #map {
    height: 420px;
  }
}

.legend-color-box {
  width: 16px;
  height: 16px;
  min-width: 16px;
  flex: 0 0 16px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.25);
  display: inline-block;
}
