html[data-theme="dark"] .explorer-panel,
html[data-theme="dark"] .search-card { background:#10263d; border-color:#28445f; box-shadow:none; }
html[data-theme="dark"] .explorer-step { border-color:#28445f; }
html[data-theme="dark"] .explorer-step label,
html[data-theme="dark"] .selection-result strong,
html[data-theme="dark"] .search-card label { color:#edf5ff; }
html[data-theme="dark"] .explorer-step select,
html[data-theme="dark"] .search-card input,
html[data-theme="dark"] .search-result { background:#091c30; border-color:#34516e; color:#edf5ff; }
html[data-theme="dark"] .selection-result { background:#0d3153; }
html[data-theme="dark"] .selection-result p,
html[data-theme="dark"] .form-hint,
html[data-theme="dark"] .search-result p,
html[data-theme="dark"] .explorer-empty { color:#bfd0e0; }
html[data-theme="dark"] .explorer-search-section { background:#0b1d31; }
html[data-theme="dark"] .explorer-heading h2,
html[data-theme="dark"] .search-layout h2,
html[data-theme="dark"] .explorer-note h2 { color:#f1f6fb; }
html[data-theme="dark"] .explorer-heading>p,
html[data-theme="dark"] .search-layout>div>p:not(.section-kicker),
html[data-theme="dark"] .explorer-note p:not(.section-kicker) { color:#b9c9d9; }
html[data-theme="dark"] .explorer-note { background:#123b36; }
html[data-theme="dark"] .explorer-note .button-quiet { background:#77a985; color:#082415; border-color:#77a985; }

/* Metric cards are buttons: make their contrast explicit in both themes. */
.catalogue-metrics button {
  min-height: 76px;
  padding: 14px 10px;
  border: 1px solid rgba(183,219,255,.42);
  border-radius: 12px;
  background: rgba(9,51,88,.72);
  color: #ffffff;
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.catalogue-metrics button:hover,
.catalogue-metrics button:focus-visible {
  background: rgba(18,75,122,.88);
  box-shadow: 0 0 0 3px rgba(159,209,255,.22);
  outline: 0;
  transform: translateY(-1px);
}
.catalogue-metrics button strong,
.catalogue-metrics button span { display:block; }
.catalogue-metrics button strong { color:#fff; font:800 1.55rem Manrope,sans-serif; }
.catalogue-metrics button span { margin-top:2px; color:#e4f1ff; font-size:.78rem; }
html[data-theme="dark"] .catalogue-metrics button {
  border-color: #4b789e;
  background: #173e62;
  color: #fff;
}
html[data-theme="dark"] .catalogue-metrics button:hover,
html[data-theme="dark"] .catalogue-metrics button:focus-visible { background:#21567f; }

.map-canvas { position:relative; }
.map-loading {
  position:absolute;
  inset:0;
  z-index:500;
  display:grid;
  place-content:center;
  gap:8px;
  text-align:center;
  color:#18304d;
  background:linear-gradient(135deg,#e8f3fb,#d5ebf8);
  font-size:.86rem;
  font-weight:800;
}
.map-loading::before {
  content:"";
  width:24px;
  height:24px;
  margin:auto;
  border:3px solid #9dbfda;
  border-top-color:#0879ff;
  border-radius:50%;
  animation:map-loading-spin .8s linear infinite;
}
.map-canvas.is-ready .map-loading { display:none; }
@keyframes map-loading-spin { to { transform:rotate(360deg); } }
html[data-theme="dark"] .map-loading { background:linear-gradient(135deg,#102b48,#153f62); color:#edf5ff; }

.place-library { display:grid; grid-template-columns:170px 1fr; gap:18px; margin:22px 12px 8px; padding:18px; border:1px solid #cbdceb; border-radius:13px; background:#f6faff; }
.place-library h3 { margin:3px 0 0; color:#18304d; font:800 1.1rem Manrope,sans-serif; }
.place-library-items { display:flex; flex-wrap:wrap; gap:8px; align-content:flex-start; }
.place-library-item { display:inline-flex; gap:7px; align-items:center; max-width:100%; padding:8px 10px; border:1px solid #cbdceb; border-radius:9px; background:#fff; color:#174d85; font-size:.82rem; font-weight:800; text-decoration:none; }
.place-library-item small { overflow:hidden; max-width:120px; color:#59718a; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
html[data-theme="dark"] .place-library { border-color:#28445f; background:#10263d; }
html[data-theme="dark"] .place-library h3 { color:#edf5ff; }
html[data-theme="dark"] .place-library-item { border-color:#34516e; background:#091c30; color:#bfe1ff; }
html[data-theme="dark"] .place-library-item small { color:#b9c9d9; }
@media(max-width:650px){.place-library{grid-template-columns:1fr}}

.selection-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:13px; }
.selection-actions a, .selection-actions button { display:inline-flex; align-items:center; justify-content:center; min-height:34px; padding:7px 10px; border:1px solid #a9c7e4; border-radius:8px; background:#fff; color:#164b7e; font:800 .8rem Manrope,sans-serif; text-decoration:none; cursor:pointer; transition:transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease; }
.selection-actions a:first-child { border-color:#0879ff; background:#0879ff; color:#fff; }
.selection-actions a:hover, .selection-actions a:focus-visible, .selection-actions button:hover, .selection-actions button:focus-visible { border-color:#075fc4; background:#eaf4ff; color:#0c4d86; outline:0; transform:translateY(-1px); }
.selection-actions a:first-child:hover, .selection-actions a:first-child:focus-visible { background:#075fc4; color:#fff; }
html[data-theme="dark"] .selection-actions a, html[data-theme="dark"] .selection-actions button { border-color:#416887; background:#0a2036; color:#d8ebff; }
html[data-theme="dark"] .selection-actions a:first-child { border-color:#2c85ec; background:#0879ff; color:#fff; }
html[data-theme="dark"] .selection-actions a:hover, html[data-theme="dark"] .selection-actions a:focus-visible, html[data-theme="dark"] .selection-actions button:hover, html[data-theme="dark"] .selection-actions button:focus-visible { border-color:#77a985; background:#153d58; color:#fff; }
