:root {
  --bg: #0f1218;
  --panel: #171b23;
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #f4f0ea;
  --muted: #aab6c4;
  --accent: #f38b4a;
  --accent-soft: rgba(243, 139, 74, 0.16);
  --success: #67d5a5;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at top, #18202c, var(--bg) 55%);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
}

body {
  min-height: 100vh;
}

.app-shell {
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 24px 20px;
  border-right: 1px solid var(--panel-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 20%),
    #141922;
}

.brand-block h1 {
  margin: 6px 0 10px;
  font-size: 34px;
  line-height: 1.02;
}

.brand-block p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.eyebrow {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #ffd8bd;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(8px);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: #0e1218;
  color: var(--text);
  font-size: 14px;
}

.hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text);
}

.toggle:last-child {
  margin-bottom: 0;
}

.stats {
  display: grid;
  gap: 10px;
}

.stats div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
}

.stats span {
  color: var(--muted);
}

.selected-panel {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: Consolas, monospace;
  font-size: 12px;
  color: #d6dde8;
}

.map-stage {
  position: relative;
  min-height: 100vh;
}

#map {
  width: 100%;
  height: 100vh;
}

.status,
.debug-badge {
  position: absolute;
  z-index: 10;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: rgba(15, 18, 24, 0.82);
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.status {
  top: 18px;
  left: 18px;
  max-width: min(520px, calc(100% - 36px));
  padding: 12px 14px;
  color: #f7f0e9;
  font-size: 13px;
  line-height: 1.45;
}

.hidden {
  display: none;
}

.debug-badge {
  right: 18px;
  bottom: 18px;
  padding: 10px 12px;
  color: #e4edf8;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-line;
  pointer-events: none;
}

.maplibregl-popup-content {
  background: #151922;
  color: var(--text);
  border-radius: 12px;
  border: 1px solid var(--panel-border);
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: #151922;
}

@media (max-width: 920px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

  #map {
    height: 72vh;
  }
}
