:root {
  --paper: #f7f8f9;
  --surface: #ffffff;
  --ink: #222222;
  --muted: #575760;
  --line: #e6e8eb;
  --accent: #1b6aaf;
  --heading: #0893e3;
  --sans: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; height: 100dvh; display: flex; flex-direction: column; }
button { font: inherit; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
header { background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.brand img { height: 48px; width: auto; display: block; }
.mark { font-size: 20px; font-weight: 650; line-height: 1; margin: 0; color: var(--heading); }
.sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.tabs { display: flex; justify-content: center; gap: 4px; background: var(--accent); }
.tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 8px 18px; font-weight: 600; color: #fff; }
.tabs button.on { border-bottom-color: #bee8d2; color: #bee8d2; }
.search { position: relative; padding: 12px 16px; }
.search input, #panel input {
  width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: 12px;
  padding: 12px 14px; font: inherit; color: var(--ink);
}
.search input:focus, #panel input:focus { outline: none; border-color: var(--accent); }
#suggest {
  position: absolute; left: 16px; right: 16px; z-index: 5; margin: 4px 0 0; padding: 0;
  list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
#suggest button { width: 100%; text-align: left; border: 0; background: var(--surface); padding: 10px 14px; display: flex; justify-content: space-between; gap: 12px; }
#suggest button strong { font-weight: 600; }
#suggest button span { color: var(--muted); font-size: 13px; }
#suggest button.on, #suggest button:hover { background: var(--paper); }
.banner { margin: 0; background: var(--paper); color: var(--ink); font-size: 14px; padding: 8px 16px; border-left: 4px solid var(--accent); }
.layout { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.map-wrap { position: relative; height: 50%; min-height: 260px; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; }
.maplibregl-map { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; }
.loading {
  position: absolute;
  top: 12px;
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  margin: 0;
  background: var(--accent);
  color: var(--surface);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  pointer-events: none;
}
.legend {
  position: absolute; left: 12px; bottom: 12px; z-index: 2; list-style: none; margin: 0;
  background: color-mix(in srgb, var(--surface) 95%, transparent); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; font-size: 12px; max-width: 240px;
}
.legend li { display: flex; align-items: center; gap: 8px; padding: 2px 0; }
.sw { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
aside { flex: 1; min-height: 0; overflow: auto; background: var(--surface); border-top: 1px solid var(--line); padding: 16px; }
#panel h1 { font-size: 32px; font-weight: 650; line-height: 1.1; margin: 4px 0 0; color: var(--heading); }
.kicker { margin: 0; font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.badge { display: inline-block; margin-top: 12px; border-radius: 999px; padding: 4px 12px; color: var(--surface); font-size: 14px; font-weight: 700; }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.kpi { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.kpi span { display: block; color: var(--muted); font-size: 13px; }
.kpi strong { font-size: 18px; }
.why { margin-top: 14px; background: var(--paper); border-radius: 12px; padding: 12px; font-size: 14px; }
.why p { margin: 0 0 8px; }
.note { font-size: 12px; color: var(--muted); }
label.field { display: block; margin-top: 14px; font-size: 14px; color: var(--muted); }
@media (min-width: 960px) {
  .layout { flex-direction: row; }
  .map-wrap { height: auto; flex: 1; }
  aside { width: 400px; flex: none; border-top: 0; border-left: 1px solid var(--line); }
}
