* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  color: #e7edf4;
  background: #101010;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

button,
input,
select {
  font: inherit;
}

#landmax-app {
  --lm-gew-header-row-height: 44px;
  --lm-gew-camera-row-height: 40px;
  --lm-gew-footer-height: 30px;
  display: grid;
  grid-template-rows:
    var(--lm-gew-header-row-height)
    var(--lm-gew-camera-row-height)
    minmax(0, 1fr)
    var(--lm-gew-footer-height);
  width: 100%;
  height: 100%;
}

.camera-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--lm-gew-camera-row-height);
  min-height: var(--lm-gew-camera-row-height);
  padding: 5px 16px;
  background: #101010;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  color: #d7d9dd;
  font-size: 14px;
  white-space: nowrap;
  overflow-x: auto;
}
.camera-bar .range-control {
  display: grid;
  grid-template-columns: auto minmax(112px, 200px);
  align-items: center;
  gap: 8px;
}
.camera-bar .range-control output {
  display: inline-block;
  min-width: 38px;
  color: #c7e8ff;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.camera-bar .range-control input[type="range"] {
  width: 100%;
  accent-color: #d7ecff;
}
.camera-bar .heading-control {
  display: flex;
  align-items: center;
  gap: 8px;
}
.camera-bar .heading-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}
.camera-bar .compass-button {
  min-width: 30px;
  height: 28px;
  padding: 0 6px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 7px;
  color: #e8eaed;
  background: #202124;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.camera-bar .compass-button:hover { background: #2b2c2f; }
.camera-bar .compass-button.is-active {
  border-color: rgba(255,255,255,0.42);
  color: #fff;
  background: #3c4043;
}

.app-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  height: var(--lm-gew-header-row-height);
  min-height: var(--lm-gew-header-row-height);
  padding: 6px 16px;
  background: #101010;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.header-tail {
  display: flex;
  align-items: center;
  gap: 10px;
}

.viewport-tail {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  background: #202124;
  color: #bdc1c6;
  font-size: 14px;
  visibility: hidden;
}

.viewport-tail.visible {
  visibility: visible;
}

.viewport-tail-arrow {
  color: #6f7e8d;
}

.viewport-tail-label {
  color: #e8eaed;
}

.viewport-tail-save {
  padding: 3px 10px;
  border: 0;
  border-radius: 999px;
  color: #0d1820;
  background: #9fdcbe;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.viewport-tail-save:disabled {
  color: #4a5969;
  background: rgba(159, 220, 190, 0.32);
  cursor: not-allowed;
}

.earth-web-button {
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 7px;
  color: #e8eaed;
  background: #202124;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.earth-web-button:hover {
  border-color: rgba(255,255,255,0.36);
  background: #2b2c2f;
}

.local-pmtiles-prompt {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 14;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(460px, calc(100% - 40px));
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 8px;
  color: #e8eaed;
  background: rgba(16, 16, 16, 0.95);
  box-shadow: 0 18px 42px rgba(0,0,0,0.46);
  text-align: center;
  transform: translate(-50%, -50%);
}

.local-pmtiles-prompt[hidden] {
  display: none;
}

.local-pmtiles-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  font-size: 15px;
}

.local-pmtiles-copy strong {
  font-size: 18px;
}

.local-pmtiles-copy span {
  color: #bdc1c6;
  line-height: 1.35;
}

.local-pmtiles-prompt button {
  min-height: 38px;
  padding: 7px 16px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 7px;
  color: #101010;
  background: #c7e8ff;
  font-weight: 700;
  cursor: pointer;
}

.local-pmtiles-prompt button:disabled {
  color: #526070;
  background: rgba(199, 232, 255, 0.46);
  cursor: wait;
}

.basemap-switcher {
  position: relative;
  flex: 0 0 auto;
  color: #e7edf4;
  font-size: 14px;
}

.basemap-switcher summary {
  display: block;
  min-height: 32px;
  min-width: 86px;
  max-width: 214px;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 7px;
  background: #202124;
  font-weight: 700;
  list-style: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.basemap-switcher summary::-webkit-details-marker {
  display: none;
}

.basemap-switcher[open] summary {
  border-color: rgba(255,255,255,0.36);
  background: #2b2c2f;
}

.basemap-switcher-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  display: grid;
  gap: 6px;
  width: 260px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  background: rgba(16,16,16,0.97);
  box-shadow: 0 12px 26px rgba(0,0,0,0.34);
}

.basemap-switcher-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 6px;
  color: #e8eaed;
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  text-align: left;
}

.basemap-switcher-option:hover:not(:disabled),
.basemap-switcher-option.is-active {
  border-color: rgba(138,180,248,0.56);
  background: rgba(138,180,248,0.14);
}

.basemap-switcher-option:disabled {
  opacity: .44;
  cursor: not-allowed;
}

.basemap-switcher-radio {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(255,255,255,0.46);
  border-radius: 999px;
}

.basemap-switcher-option.is-active .basemap-switcher-radio {
  border-color: #8ab4f8;
  background: radial-gradient(circle, #8ab4f8 0 42%, transparent 48%);
}

.basemap-switcher-label {
  min-width: 0;
  overflow: hidden;
  color: #f3f6f8;
  font-weight: 730;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.basemap-switcher-provider {
  color: #aeb8c4;
  font-size: 12px;
  font-weight: 650;
}

/* Offline-mirror control — same chrome as the Base switcher beside it. */
.offline-mirror { position: relative; flex: 0 0 auto; color: #e7edf4; font-size: 14px; }
.offline-mirror summary {
  min-height: 32px; padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.18); border-radius: 7px;
  background: #202124; font-weight: 700; list-style: none; cursor: pointer;
}
.offline-mirror summary::-webkit-details-marker { display: none; }
.offline-mirror[open] summary { border-color: rgba(255,255,255,0.36); background: #2b2c2f; }
.offline-mirror-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  width: min(360px, 92vw); max-height: min(78vh, 620px); overflow: auto;
  padding: 10px; border: 1px solid rgba(255,255,255,0.18); border-radius: 8px;
  background: rgba(16,16,16,0.97); box-shadow: 0 12px 26px rgba(0,0,0,0.34);
}

.landmax-inspector-map-popup .maplibregl-popup-content {
  width: min(520px, calc(100vw - 32px));
  padding: 14px 16px 16px;
}

.landmax-inspector-map-popup .maplibregl-popup-close-button {
  top: 6px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: #334155;
  line-height: 20px;
}

.landmax-inspector-map-popup .maplibregl-popup-close-button:hover {
  background: #e2e8f0;
}

.landmax-inspector-header {
  padding-right: 28px;
}

.landmax-inspector-popup h3 {
  margin: 0 0 4px;
  color: #111827;
  font-size: 15px;
  line-height: 1.22;
}

.landmax-inspector-popup p {
  margin: 0 0 8px;
  color: #526173;
  font-size: 12px;
}

.landmax-inspector-stack-list {
  display: grid;
  gap: 8px;
  max-height: min(560px, 68vh);
  overflow: auto;
  padding-right: 2px;
}

.landmax-inspector-layer-row {
  border: 1px solid #dbe3ec;
  border-radius: 8px;
  background: #fff;
}

.landmax-inspector-layer-summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
}

.landmax-inspector-layer-summary::-webkit-details-marker {
  display: none;
}

.landmax-inspector-toggle {
  position: relative;
  display: block;
  width: 30px;
  height: 18px;
  cursor: pointer;
}

.landmax-inspector-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.landmax-inspector-toggle span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background 0.14s ease;
}

.landmax-inspector-toggle span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.3);
  transition: transform 0.14s ease;
}

.landmax-inspector-toggle input:checked + span {
  background: #eab308;
}

.landmax-inspector-toggle input:checked + span::after {
  transform: translateX(12px);
}

.landmax-inspector-layer-main {
  min-width: 0;
}

.landmax-inspector-layer-main strong,
.landmax-inspector-layer-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landmax-inspector-layer-main strong {
  color: #111827;
  font-size: 13px;
  line-height: 1.24;
}

.landmax-inspector-layer-main small,
.landmax-inspector-geom {
  color: #64748b;
  font-size: 11px;
}

.landmax-inspector-geom {
  padding: 2px 6px;
  border-radius: 999px;
  background: #f1f5f9;
}

.landmax-inspector-popup table {
  width: 100%;
  border-collapse: collapse;
  color: #111827;
  font-size: 12px;
}

.landmax-inspector-layer-row table {
  margin: 0 10px 10px;
  width: calc(100% - 20px);
}

.landmax-inspector-popup th,
.landmax-inspector-popup td {
  padding: 4px 0;
  border-top: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.landmax-inspector-popup th {
  width: 42%;
  padding-right: 10px;
  color: #475569;
  font-weight: 750;
}

.landmax-inspector-more {
  margin-top: 8px !important;
}

.center-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(255,255,255,0.78);
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(13,24,32,0.72),
    0 1px 7px rgba(0,0,0,0.35);
  pointer-events: none;
  z-index: 5;
}

.center-crosshair::before,
.center-crosshair::after {
  content: '';
  position: absolute;
  background: rgba(7, 18, 27, 0.82);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.72);
}

.center-crosshair::before {
  top: -7px; bottom: -7px; left: 50%;
  width: 2px; margin-left: -1px;
}

.center-crosshair::after {
  left: -7px; right: -7px; top: 50%;
  height: 2px; margin-top: -1px;
}

.details-panel-toggle {
  position: absolute;
  top: 50%;
  right: 12px;
  z-index: 6;
  display: grid;
  place-items: center;
  width: 34px;
  height: 44px;
  margin-top: -22px;
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 8px;
  color: #e8eaed;
  background: rgba(16,16,16,0.86);
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.details-panel-toggle:hover {
  border-color: rgba(255,255,255,0.40);
  background: rgba(32,33,36,0.94);
}

.details-panel-toggle:focus-visible {
  outline: 2px solid #8dd8ff;
  outline-offset: 2px;
}

.brand {
  color: #f1f3f4;
  font-size: 18px;
  font-weight: 760;
  text-decoration: none;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  color: #bdc1c6;
  font-size: 15px;
  white-space: nowrap;
}

.breadcrumbs a {
  color: #8ab4f8;
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: #d2e3fc;
}

.breadcrumbs span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-status {
  padding: 5px 10px;
  border: 1px solid rgba(138, 180, 248, 0.38);
  border-radius: 8px;
  color: #d2e3fc;
  background: rgba(32,33,36,0.92);
  font-size: 14px;
  white-space: nowrap;
}

.route-status.error {
  border-color: rgba(252, 165, 165, 0.36);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.30);
}

.app-layout {
  display: flex;
  min-height: 0;
  --details-width: 420px;
}

.map-pane {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

#app-map {
  /* The map fills its position:relative .map-pane cell. maplibre-gl.css owns the
     internal positioning (.maplibregl-map overflow:hidden + relative, canvas and
     popup position:absolute), so nothing inside #app-map is ever in normal flow —
     the popup can't inflate the grid. (The "popup grows the layout" saga was the
     dev server serving maplibre-gl.css as octet-stream → browser rejected it under
     nosniff → no maplibre CSS. Fixed in vite.config.mjs + _headers, c5e2ba209.) */
  width: 100%;
  height: 100%;
}

.layout-splitter {
  flex: 0 0 9px;
  width: 9px;
  cursor: col-resize;
  background: #151515;
  border-left: 1px solid rgba(255,255,255,0.10);
  border-right: 1px solid rgba(255,255,255,0.10);
}

.layout-splitter:hover,
.layout-splitter.dragging {
  background: #303134;
}

.details-panel {
  display: flex;
  flex: 0 0 var(--details-width);
  flex-direction: column;
  min-width: 340px;
  max-width: min(680px, 52vw);
  min-height: 0;
  color: #e8eaed;
  background: #101010;
  border-left: 1px solid rgba(255,255,255,0.14);
  overflow: auto;
}

.app-layout.details-collapsed .layout-splitter,
.app-layout.details-collapsed .details-panel {
  display: none;
}

/* Sidebar tabs (Place / Storage) */
.details-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.details-tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #9fb0bf;
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  padding: 8px 12px;
  cursor: pointer;
}
.details-tab:hover { color: #e8eaed; }
.details-tab.is-active {
  color: #f8fafc;
  border-bottom-color: #8ab4f8;
}
.details-tabpanel { display: block; }
.details-tabpanel[hidden] { display: none; }

/* Storage / debug panel */
.settings-panel { display: grid; gap: 12px; padding: 16px 18px 0; }
.settings-section {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.settings-section-title {
  margin: 0;
  color: #cdd6df;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.settings-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #aebdcc;
  font-size: 12px;
  font-weight: 650;
}
.settings-grid input {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 6px;
  color: #f3f6f8;
  background: #202124;
  font-size: 13px;
}
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-btn {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 6px;
  color: #e7eef2;
  background: #22303a;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.settings-btn:hover { background: #2b3d49; }
.settings-status { min-height: 18px; color: #9fb0bf; font-size: 12px; }

.storage-panel { display: grid; gap: 16px; padding: 16px 18px; }
.storage-section { display: grid; gap: 8px; }
.storage-section-title {
  margin: 0;
  color: #cdd6df;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.storage-status { color: #c2ccd4; font-size: 13px; line-height: 1.4; }
.storage-status[data-state="ok"] { color: #9fe0b4; }
.storage-status[data-state="bad"] { color: #f6a8a0; }
.storage-status[data-state="idle"] { color: #c9b88a; }
.storage-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.storage-btn {
  appearance: none;
  background: #22303a;
  color: #e7eef2;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 6px;
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.storage-btn:hover { background: #2b3d49; }
.storage-btn:disabled { opacity: 0.5; cursor: default; }
.storage-btn-danger { background: #3a2222; border-color: rgba(246,168,160,0.3); }
.storage-btn-danger:hover { background: #4a2a2a; }
.storage-stores { display: grid; gap: 10px; }
.storage-store {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  background: #161616;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
}
.storage-store-name { color: #f3f6f8; font-weight: 650; font-size: 13px; }
.storage-store-meta { color: #9fb0bf; font-size: 12px; }
.storage-store-path { color: #6b7c8a; font-size: 11px; font-family: ui-monospace, monospace; overflow-wrap: anywhere; }
.storage-zooms { color: #8ea1b1; font-size: 11px; font-family: ui-monospace, monospace; }
.storage-empty { color: #8ea1b1; font-size: 13px; }

.app-footer {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--lm-gew-footer-height);
  padding: 0 16px;
  border-top: 1px solid rgba(255,255,255,0.14);
  color: #d7d9dd;
  background: #101010;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.app-footer-brand {
  color: #f1f3f4;
  font-weight: 700;
}

.details-header {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}

.app-search {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 12px 18px;
  background: #101010;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.app-search-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.16);
  background: #202124;
  color: #f1f3f4;
  font-size: 14px;
  font-weight: 540;
  outline: none;
  transition: border-color 120ms ease, background 120ms ease;
}
.app-search-input::placeholder { color: #6b7c8a; }
.app-search-input:focus {
  border-color: rgba(138,180,248,0.72);
  background: #2b2c2f;
}
.app-search-results {
  margin-top: 6px;
  max-height: 320px;
  overflow: auto;
  border-radius: 8px;
  background: #151515;
  border: 1px solid rgba(255,255,255,0.14);
  display: grid;
}
.app-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: #e9eef4;
  text-align: left;
  font-size: 13px;
  cursor: pointer;
}
.app-search-row:last-child { border-bottom: none; }
.app-search-row:hover { background: rgba(159,220,190,0.10); }
.app-search-row-name { color: #f3f6f8; font-weight: 600; }
.app-search-row-kicker { color: #8ea1b1; font-size: 12px; }
.app-search-empty {
  padding: 8px 12px;
  color: #8ea1b1;
  font-size: 13px;
}

.route-kicker {
  margin: 0 0 5px;
  color: #9fb0bf;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
}

.details-header h1 {
  margin: 0;
  overflow-wrap: anywhere;
  color: #f8fafc;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
}

.route-content {
  display: grid;
  gap: 18px;
  padding: 18px;
}

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

.section h2 {
  margin: 0;
  color: #b9c7d6;
  font-size: 14px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.section p {
  margin: 0;
  color: #d7e0e9;
  font-size: 15px;
  line-height: 1.45;
}

.maplibregl-ctrl.maplibregl-ctrl-group {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 8px;
  background: #202124;
  box-shadow: 0 8px 22px rgba(0,0,0,0.28);
}

.maplibregl-ctrl-group button {
  width: 32px;
  height: 32px;
  background-color: #202124;
}

.maplibregl-ctrl-group button .maplibregl-ctrl-icon {
  filter: invert(1) grayscale(1) brightness(1.35);
}

.maplibregl-ctrl.maplibregl-ctrl-group button:not(:disabled):hover {
  background-color: #2b2c2f;
}

.maplibregl-ctrl-group button + button {
  border-top-color: rgba(255,255,255,0.12);
}

.maplibregl-ctrl.maplibregl-ctrl-attrib {
  color: #e8eaed !important;
  background-color: rgba(16,16,16,0.88) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.28);
}

.maplibregl-ctrl.maplibregl-ctrl-attrib a {
  color: #e8eaed !important;
}

.maplibregl-ctrl-attrib-button {
  background-color: rgba(232,234,237,0.18);
}

.maplibregl-popup.landmax-popup .maplibregl-popup-content {
  padding: 12px 14px;
  border-radius: 10px;
  color: #0d1820;
  background: #f5f7fa;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(0,0,0,0.32);
  cursor: grab;
  user-select: none;
}

.maplibregl-popup.landmax-popup .maplibregl-popup-content.dragging {
  cursor: grabbing;
}

.maplibregl-popup.landmax-popup .maplibregl-popup-content a,
.maplibregl-popup.landmax-popup .maplibregl-popup-content button {
  cursor: pointer;
}

.maplibregl-popup.landmax-popup .popup-kicker {
  margin-bottom: 6px;
  color: #4a5969;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.maplibregl-popup.landmax-popup .popup-headline {
  font-size: 15px;
  font-weight: 700;
  color: #0d1820;
  line-height: 1.25;
  margin-bottom: 2px;
}

.maplibregl-popup.landmax-popup .popup-subhead {
  font-size: 11px;
  color: #6b7785;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.maplibregl-popup.landmax-popup .popup-source {
  margin-top: 6px;
  color: #5c6978;
  font-size: 12px;
  line-height: 1.35;
}

.maplibregl-popup.landmax-popup .popup-actions {
  margin-top: 10px;
}

.maplibregl-popup.landmax-popup .popup-action {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(37,99,235,0.22);
  border-radius: 6px;
  color: #1244a5;
  background: rgba(37,99,235,0.08);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
}

.maplibregl-popup.landmax-popup .popup-action:hover {
  color: #0b2f75;
  background: rgba(37,99,235,0.14);
  border-color: rgba(37,99,235,0.34);
}

/* Property record card (civic-label click → assessment record) */
.maplibregl-popup.landmax-popup .popup-property .popup-kicker {
  margin: 2px 0 8px;
  text-transform: none;
  letter-spacing: 0.01em;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
}
.maplibregl-popup.landmax-popup .popup-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 4px 0;
  border-top: 1px solid #eef1f4;
  font-size: 12px;
}
.maplibregl-popup.landmax-popup .popup-row-k { color: #6b7785; }
.maplibregl-popup.landmax-popup .popup-row-v { color: #0d1820; font-weight: 600; text-align: right; }

.maplibregl-popup.landmax-popup .popup-kicker {
  margin-top: 0;
}

.empty {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: #aab7c5;
  background: rgba(255,255,255,0.035);
  font-size: 15px;
  line-height: 1.45;
}

.fade-in {
  animation: fade-in 180ms ease-out;
}

@keyframes fade-in {
  from { opacity: 0.72; }
  to { opacity: 1; }
}

@media (max-width: 860px) {
  .app-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .breadcrumbs {
    grid-column: 1 / -1;
    order: 3;
  }

  .app-layout {
    flex-direction: column;
  }

  .layout-splitter {
    display: none;
  }

  .map-pane {
    min-height: 48vh;
  }

  .details-panel {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    border-top: 1px solid rgba(255,255,255,0.09);
    border-left: none;
  }
}
