html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, 'Noto Sans Thai', Arial, sans-serif;
}

.app {
  display: flex;
  height: 100vh;
  width: 100vw;
}

.map-wrap {
  flex: 1 1 64%;
  min-width: 300px;
  position: relative;
  background: #fff;
}

#map {
  position: absolute;
  inset: 0;
}

.panel {
  flex: 0 0 36%;
  max-width: 36%;
  padding: 18px 20px;
  overflow: auto;
  border-left: 1px solid #eee;
}

.panel h1 { font-size: 22px; margin: 0 0 8px; }
.panel h2 { font-size: 16px; margin: 18px 0 6px; }
.panel p { margin: 8px 0; line-height: 1.5; }

.foot {
  color: #666;
  font-size: 12px;
  margin-top: 18px;
}

.info,
.legend,
.lang-toggle {
  z-index: 500;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.12);
}

.info {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 8px 12px;
  font-size: 14px;
}

.legend {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 8px 10px;
  font-size: 12px;
}

.legend .row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0;
}

.swatch {
  width: 14px;
  height: 14px;
  border: 1px solid #999;
}

.lang-toggle {
  position: absolute;
  top: 80px;
  right: 10px;
  border: 1px solid #ddd;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.lang-toggle:hover {
  background: #f5f5f5;
}

.lang-content { display: none; }
.lang-content.active { display: block; }

.status-banner {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 550;
  max-width: 48%;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid;
  font-size: 13px;
}

.status-banner.loading {
  background: #eef6ff;
  border-color: #b8d9ff;
  color: #0b5394;
}

.status-banner.error {
  background: #fff1f1;
  border-color: #ffc7c7;
  color: #7f1d1d;
}

.status-banner button {
  margin-left: 8px;
}

.hidden {
  display: none;
}

@media (max-width: 960px) {
  .app { flex-direction: column; }
  .panel { max-width: 100%; flex-basis: 42%; }
  .map-wrap { flex-basis: 58%; }
  .info { top: 8px; right: 8px; }
  .legend { bottom: 8px; right: 8px; }
  .lang-toggle { top: 70px; right: 8px; }
  .status-banner { max-width: 75%; left: 8px; top: 8px; }
}