:root {
  color-scheme: light;
  --ink: #13211f;
  --ink-soft: #2e403b;
  --muted: #5d6d68;
  --surface: #f6f8f5;
  --surface-strong: #ffffff;
  --surface-muted: #f0f4f0;
  --line: #d8e1dc;
  --line-soft: #edf2ee;
  --brand: #234d4a;
  --brand-strong: #173936;
  --brand-soft: #dcece8;
  --accent: #8f5d33;
  --success: #2f6f4e;
  --warning: #9b6a24;
  --danger: #a43b35;
  --hover-bg: #f4f8f5;
  --selected-bg: #edf6f2;
  --focus-ring: rgb(35 77 74 / 32%);
  --panel-bg: rgb(252 254 251 / 98%);
  --panel-bg-strong: rgb(255 255 255 / 96%);
  --shadow-sm: 0 1px 3px rgb(20 35 32 / 8%);
  --shadow-md: 0 8px 22px rgb(20 35 32 / 10%);
  --shadow-lg: 0 16px 42px rgb(20 35 32 / 16%);
  --radius-sm: 6px;
  --radius-md: 6px;
  --target-sm: 38px;
  --target-md: 44px;
  --target-touch: 48px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --header-height: calc(46px + var(--safe-top));
  --left-panel-width: 428px;
  --right-panel-width: 400px;
  --panel-rail-width: 30px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #e3e8e3;
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  overflow: hidden;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 13.5px;
  font-weight: 650;
  line-height: 1.15;
}

h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.app-shell {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #dfe5df;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #dfe5df;
}

.map-layer-drop-target {
  position: absolute;
  z-index: 15;
  top: var(--header-height);
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  background: rgb(218 224 222 / 82%);
  transition: opacity 120ms ease-out, visibility 120ms ease-out;
}

.map-layer-drop-target.is-active {
  visibility: visible;
  opacity: 1;
}

.map-layer-drop-content {
  display: grid;
  place-items: center;
  justify-items: center;
  gap: 8px;
  color: #40534c;
  font-size: 12px;
  font-weight: 650;
}

.map-layer-drop-orbit {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  opacity: .68;
}

.map-layer-drop-orbit img {
  display: block;
  width: 100%;
  height: 100%;
}

.map-layer-drop-target.is-drop-ready .map-layer-drop-content {
  color: var(--brand-strong);
}

.map-layer-drop-target.is-drop-ready .map-layer-drop-orbit {
  opacity: 1;
}

body.is-dragging-catalogue-layer {
  user-select: none;
}

@media (prefers-reduced-motion: reduce) {
  .map-layer-drop-target {
    transition: none;
  }
}

.map-logo-watermark {
  position: absolute;
  z-index: 11;
  top: calc(var(--header-height) + 12px);
  right: calc(min(var(--right-panel-width), 42vw) + 16px);
  display: grid;
  width: 98px;
  height: 32px;
  place-items: center;
  padding: 5px 8px;
  border: 1px solid rgb(20 35 32 / 5%);
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 28%);
  opacity: .24;
  pointer-events: none;
}

.map-logo-watermark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.right-panel-collapsed .map-logo-watermark {
  right: calc(var(--panel-rail-width) + 16px);
}

.icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  stroke-width: 2;
}

.topbar {
  position: absolute;
  z-index: 30;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: auto;
  min-height: var(--header-height);
  padding: max(4px, var(--safe-top)) max(10px, var(--safe-right)) 4px max(10px, var(--safe-left));
  border: 0;
  border-bottom: 1px solid rgb(20 35 32 / 6%);
  border-radius: 0;
  color: var(--brand-strong);
  background: rgb(250 252 249 / 92%);
  box-shadow: 0 1px 2px rgb(20 35 32 / 4%);
}

.brand-block,
.topbar-actions,
.topbar-panel-controls,
.info-section-title,
.control-group,
.topbar-action,
.panel-action,
.basemap-control {
  display: flex;
  align-items: center;
}

.brand-block {
  min-width: 0;
  gap: 7px;
}

.brand-block > div {
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.brand-mark--orbits {
  width: 38px;
  height: 38px;
  padding: 2px;
}

.brand-mark .icon {
  width: 18px;
  height: 18px;
}

.brand-orbit-logo {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  color: var(--brand);
}

.brand-orbit-ring {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  opacity: var(--ring-opacity, .55);
  transform: rotate(var(--ring-start, 0deg));
  transform-box: view-box;
  transform-origin: 32px 32px;
  vector-effect: non-scaling-stroke;
  will-change: transform;
  animation: brand-orbit-spin var(--ring-speed, 14s) linear infinite;
}

.brand-orbit-ring--1 {
  --ring-speed: 18s;
  --ring-opacity: .58;
  --ring-start: 7deg;
}

.brand-orbit-ring--2 {
  --ring-speed: 23s;
  --ring-opacity: .48;
  --ring-start: -18deg;
  animation-direction: reverse;
}

.brand-orbit-ring--3 {
  --ring-speed: 14s;
  --ring-opacity: .45;
  --ring-start: 32deg;
}

.brand-orbit-ring--4 {
  --ring-speed: 27s;
  --ring-opacity: .38;
  --ring-start: -41deg;
  animation-direction: reverse;
}

.brand-orbit-ring--5 {
  --ring-speed: 11s;
  --ring-opacity: .36;
  --ring-start: 64deg;
}

.brand-orbit-ring--6 {
  --ring-speed: 16s;
  --ring-opacity: .42;
  --ring-start: -79deg;
  animation-direction: reverse;
}

.brand-orbit-ring--7 {
  --ring-speed: 9s;
  --ring-opacity: .5;
  --ring-start: 112deg;
}

.brand-block h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  flex: 0 0 auto;
  gap: 4px;
}

.topbar-panel-controls {
  gap: 0;
  margin-left: 1px;
  padding: 1px;
  border: 1px solid rgb(20 35 32 / 8%);
  border-radius: 999px;
  background: rgb(255 255 255 / 34%);
}

.topbar-panel-controls .topbar-action {
  min-height: 34px;
  border: 0;
  border-radius: 999px;
}

.topbar-panel-controls .topbar-action + .topbar-action {
  margin-left: 1px;
}

.topbar-action {
  min-height: 34px;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--brand-strong);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  transition: background 140ms ease-out, color 140ms ease-out;
}

.topbar-action:hover {
  background: rgb(235 244 239 / 68%);
}

.topbar-action[aria-pressed="true"] {
  background: rgb(237 246 242 / 72%);
}

.panel-toggle-action[aria-expanded="true"] {
  background: rgb(237 246 242 / 72%);
}

.panel-toggle-action[aria-expanded="false"] {
  opacity: .72;
}

.eyebrow,
.panel-kicker {
  margin: 0 0 3px;
  color: #cbd7d1;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.panel-kicker {
  color: var(--muted);
}

.panel-rail {
  position: absolute;
  z-index: 21;
  top: var(--header-height);
  bottom: 0;
  display: flex;
  width: var(--panel-rail-width);
  min-width: var(--panel-rail-width);
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  color: #314540;
  background: rgb(246 250 246 / 94%);
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 160ms ease-out, background 160ms ease-out, color 160ms ease-out;
}

.panel-rail--left {
  left: 0;
  border-right: 1px solid var(--line);
}

.panel-rail--right {
  right: 0;
  border-left: 1px solid var(--line);
}

.panel-rail span {
  display: block;
  color: inherit;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1;
  text-align: center;
  text-transform: none;
  white-space: nowrap;
  writing-mode: vertical-rl;
}

.panel-rail--left span {
  transform: rotate(180deg);
}

body.sidebar-collapsed .panel-rail--left,
body.right-panel-collapsed .panel-rail--right {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.panel-rail:hover {
  color: var(--brand-strong);
  background: rgb(237 246 242 / 98%);
}

.panel-rail:focus {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
}

.sidebar {
  position: absolute;
  z-index: 18;
  top: var(--header-height);
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: min(var(--left-panel-width), 42vw);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel-bg);
  box-shadow: none;
  transition: transform 180ms ease-out, opacity 180ms ease-out;
}

body.sidebar-collapsed .sidebar {
  transform: translateX(calc(-100% - 24px));
  opacity: 0;
  pointer-events: none;
}

.panel {
  min-height: 0;
  padding: 10px var(--space-3);
  border-bottom: 1px solid var(--line-soft);
}

.panel:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.layer-panel {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding-bottom: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 10px;
}

.info-section-title {
  gap: var(--space-2);
}

.panel-action {
  min-height: var(--target-md);
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
}

.panel-action--icon {
  justify-content: center;
  width: var(--target-md);
  min-width: var(--target-md);
  padding: 0;
}

.panel-action-label {
  display: none;
}

.panel-action:hover,
.map-toolbar button:hover,
.map-toolbar select:hover {
  background: var(--hover-bg);
}

.search-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.layer-discovery-summary {
  min-height: 16px;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.catalogue-add-hint {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 3px 0 10px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.25;
}

.catalogue-add-hint .icon {
  width: 12px;
  height: 12px;
  color: var(--brand);
}

.catalogue-add-hint-separator {
  width: 1px;
  height: 12px;
  margin: 0 3px;
  background: var(--line);
}

.layer-discovery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 8px;
}

.layer-discovery-filter {
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 10.5px;
  font-weight: 700;
}

.layer-discovery-filter:hover {
  color: var(--brand-strong);
  background: var(--hover-bg);
}

.layer-discovery-filter.is-active {
  border-color: #c6d8cd;
  color: var(--brand-strong);
  background: var(--selected-bg);
}

.search-field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  min-height: var(--target-md);
  margin-bottom: 8px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: rgb(255 255 255 / 78%);
}

.search-input {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
}

.metadata-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.metadata-metrics div {
  min-width: 0;
  padding: 6px 8px 6px 0;
  border: 0;
  border-right: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}

.metadata-metrics div:not(:first-child) {
  padding-left: 8px;
}

.metadata-metrics div:last-child {
  border-right: 0;
}

.metadata-metrics strong,
.metadata-metrics span {
  display: block;
}

.metadata-metrics strong {
  color: var(--brand);
  font-size: 14px;
  line-height: 1;
}

.metadata-metrics span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.15;
}

.search-input::placeholder {
  color: #66746f;
}

.search-input:focus {
  outline: 0;
}

.search-field:focus-within,
.catalogue-search:focus-within,
.catalogue-controls select:focus,
.catalogue-export:focus,
.catalogue-sort:focus,
.catalogue-open-layer:focus,
.upload-file:focus-within,
.upload-form input:focus,
.upload-form select:focus,
.upload-form textarea:focus,
.upload-submit:focus,
.aggregation-pill:focus,
.right-tab:focus,
.layer-export-button:focus,
.stack-visibility:focus,
.stack-remove:focus,
.layer-stack-clear:focus,
.layer-stack-item:focus,
.map-toolbar button:focus,
.map-toolbar select:focus,
.panel-action:focus,
.topbar-action:focus,
.icon-button:focus,
.layer-add-control:focus,
.layer-main:focus,
.layer-section-heading button:focus,
.layer-discovery-filter:focus,
.dataset-map-action:focus,
.dataset-details summary:focus {
  border-color: var(--brand);
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.layer-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding: 0 2px var(--space-3) 0;
}

.layer-section {
  display: grid;
  gap: 0;
}

.layer-section-heading {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--target-md);
  padding: 3px 0 5px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--brand);
  background: rgb(252 254 251 / 98%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.layer-section-heading button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--target-md);
  padding: 6px 8px 6px 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--brand);
  background: transparent;
  font-weight: 800;
}

.layer-section-heading button .icon {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease-out;
}

.layer-section.is-collapsed .layer-section-heading button .icon {
  transform: rotate(-90deg);
}

.layer-section-heading small {
  min-width: 22px;
  padding: 1px 5px;
  border: 0;
  border-radius: 999px;
  color: var(--ink-soft);
  background: #edf5ef;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.layer-section-description {
  margin: 5px 0 4px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.layer-row {
  position: relative;
  display: grid;
  grid-template-columns: var(--target-md) minmax(0, 1fr) 24px;
  align-items: stretch;
  gap: 8px;
  min-height: var(--target-touch);
  padding: 4px 6px 4px 0;
  border: 1px solid transparent;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  transition: background 140ms ease-out, border-color 140ms ease-out;
}

.layer-row:hover {
  background: var(--hover-bg);
}

.layer-row.is-selected {
  border-color: transparent;
  background: transparent;
}

.layer-row.is-active .layer-title {
  color: var(--brand-strong);
  font-weight: 750;
}

.layer-row.is-active {
  background: transparent;
}

.layer-row.is-active:hover {
  background: var(--hover-bg);
}

.layer-row.is-disabled {
  opacity: .62;
}

.layer-row--aggregation {
  grid-template-columns: var(--target-md) minmax(0, 1fr) 24px;
  grid-template-areas:
    "control main drag"
    "control pills pills";
  row-gap: 0;
  padding-top: 5px;
  padding-bottom: 8px;
}

.layer-row--aggregation .layer-add-control {
  grid-area: control;
}

.layer-row--aggregation .layer-main {
  grid-area: main;
  min-height: 27px;
  align-items: flex-end;
  padding: 0;
}

.layer-add-control {
  display: grid;
  align-self: center;
  min-width: var(--target-md);
  min-height: var(--target-md);
  width: var(--target-md);
  height: var(--target-md);
  place-items: center;
  padding: 0;
  border: 1px solid #cbd9d1;
  border-radius: var(--radius-sm);
  color: #53645e;
  background: transparent;
  cursor: pointer;
}

.layer-add-control:hover {
  border-color: #8faaa0;
  color: var(--brand);
  background: var(--hover-bg);
}

.layer-add-control.is-active {
  border-color: transparent;
  color: var(--brand-strong);
  cursor: pointer;
}

.layer-add-control.is-active .icon {
  stroke-width: 2.5;
}

.layer-add-control:disabled {
  cursor: default;
}

.layer-drag-handle {
  display: grid;
  align-self: center;
  width: 24px;
  height: var(--target-md);
  min-height: var(--target-md);
  place-items: center;
  color: #8a9892;
  cursor: grab;
  touch-action: none;
}

.layer-drag-handle:hover {
  color: var(--brand);
}

.layer-drag-handle:active {
  cursor: grabbing;
}

.layer-drag-handle .icon {
  width: 14px;
  height: 14px;
}

.layer-row--aggregation .layer-drag-handle {
  grid-area: drag;
}

.layer-main {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 2px;
  min-width: 0;
  min-height: var(--target-md);
  padding: 2px 0;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  text-align: left;
  color: inherit;
  background: transparent;
}

.layer-title {
  display: block;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.badge {
  min-width: 32px;
  align-self: start;
  padding: 2px 5px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #23392f;
  background: #e3efe5;
}

.badge[data-level="N0"],
.badge[data-level="N1"] {
  color: #244943;
  background: #e3efec;
}

.badge[data-level="N2"] {
  border-color: #b9d3bd;
  color: #254f31;
  background: #e4f2e5;
}

.badge[data-level="N3"] {
  border-color: #d2c492;
  color: #65470e;
  background: #f5edd0;
}

.badge[data-level="N4"] {
  border-color: #d4bdba;
  color: #743d38;
  background: #f4e6e3;
}

.aggregation-pills {
  grid-area: pills;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 3px;
  align-self: start;
  max-width: 100%;
  padding-bottom: 1px;
}

.aggregation-pill {
  position: relative;
  max-width: 100%;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #4d615b;
  background: transparent;
  font-size: 9.5px;
  font-weight: 750;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background 140ms ease-out, color 140ms ease-out, box-shadow 140ms ease-out;
}

.aggregation-pill::before {
  content: "";
  position: absolute;
  inset: -5px -3px;
}

.aggregation-pill:hover {
  color: var(--brand-strong);
  background: rgb(237 246 242 / 70%);
}

.aggregation-pill.is-current {
  color: var(--brand-strong);
  background: var(--selected-bg);
}

.aggregation-pill.is-active {
  color: #123b37;
  box-shadow: inset 0 0 0 1px rgb(35 77 74 / 14%);
}

.aggregation-pill:disabled {
  cursor: not-allowed;
  opacity: .54;
}

.empty-state {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.dataset-info {
  min-height: 0;
  height: auto;
  overflow-y: auto;
  padding: 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.dataset-card {
  display: grid;
  gap: 9px;
}

.dataset-card-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2);
  align-items: start;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--line-soft);
}

.dataset-level {
  min-width: 30px;
  align-self: start;
  padding: 2px 5px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  color: #244943;
  background: #e3efec;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
}

.dataset-card-header h3 {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.dataset-card-header p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  word-break: break-word;
}

.dataset-description {
  margin: -1px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.dataset-map-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: max-content;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  color: var(--brand-strong);
  background: transparent;
  font-size: 11px;
  font-weight: 700;
}

.dataset-map-action:hover {
  background: var(--hover-bg);
}

.dataset-map-action .icon {
  width: 14px;
  height: 14px;
}

.dataset-summary {
  padding-top: 8px;
  border-top: 1px solid var(--line-soft);
}

.dataset-details {
  border-top: 1px solid var(--line-soft);
  color: var(--ink-soft);
}

.dataset-details summary {
  min-height: 34px;
  padding: 8px 0;
  cursor: pointer;
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
}

.dataset-details[open] summary {
  border-bottom: 1px solid var(--line-soft);
}

.dataset-details dl {
  padding-top: 8px;
}

.dataset-info dl {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 6px 10px;
  margin: 0;
}

.dataset-info dt {
  color: var(--muted);
}

.dataset-info dd {
  margin: 0;
  word-break: break-word;
}

.map-toolbar {
  position: absolute;
  z-index: 20;
  right: calc(min(var(--right-panel-width), 42vw));
  bottom: 0;
  left: calc(min(var(--left-panel-width), 42vw));
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  max-width: none;
  min-height: calc(38px + var(--safe-bottom));
  padding: 3px var(--space-2) calc(3px + var(--safe-bottom));
  border: 0;
  border-top: 1px solid rgb(20 35 32 / 10%);
  border-radius: 0;
  background: rgb(252 254 251 / 90%);
  box-shadow: none;
}

body.sidebar-collapsed .map-toolbar {
  left: var(--panel-rail-width);
}

body.right-panel-collapsed .map-toolbar {
  right: var(--panel-rail-width);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 1px;
  padding-right: 2px;
  border-right: 0;
}

.control-group:last-of-type {
  border-right: 0;
}

.map-toolbar button,
.map-toolbar select,
.basemap-control {
  min-height: var(--target-sm);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.map-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: var(--target-sm);
  padding: 4px;
}

.map-toolbar button span:last-child:not([data-icon]) {
  display: none;
}

.map-toolbar button[aria-pressed="true"] {
  border-color: #b7c8bd;
  color: #102a2d;
  background: var(--selected-bg);
}

.map-toolbar button:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.map-toolbar button.is-exporting {
  color: var(--brand-strong);
  background: var(--selected-bg);
}

.basemap-control {
  gap: 3px;
  padding: 0 3px;
  border-color: var(--line-soft);
  background: rgb(255 255 255 / 58%);
}

.basemap-control > span {
  display: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.basemap-control select {
  min-height: var(--target-sm);
  width: 78px;
  padding: 0 2px;
  border: 0;
  background: transparent;
}

.right-panel {
  position: absolute;
  z-index: 22;
  top: var(--header-height);
  right: 0;
  bottom: 0;
  display: flex;
  width: min(var(--right-panel-width), 42vw);
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel-bg);
  box-shadow: none;
  transition: transform 180ms ease-out, opacity 180ms ease-out;
}

body.right-panel-collapsed .right-panel {
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
}

.right-panel-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
}

.right-panel-body {
  display: grid;
  flex: 1 1 auto;
  grid-template-rows: minmax(204px, 44%) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.layer-stack-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 7px;
  min-height: 0;
  padding: 10px var(--space-3);
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  pointer-events: auto;
}

.layer-stack-panel--right {
  overflow: hidden;
  background: #f7fbf8;
}

.layer-stack-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.layer-stack-header h2 {
  font-size: 13px;
}

.layer-stack-hint {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  max-width: 270px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 560;
  line-height: 1.25;
}

.layer-stack-hint .icon {
  width: 12px;
  height: 12px;
  margin-top: 1px;
  color: var(--brand);
  opacity: .68;
}

.sidebar-collapse-action {
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  color: var(--muted);
}

.sidebar-collapse-action:hover {
  color: var(--brand-strong);
}

.layer-stack-count {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--brand);
  background: var(--surface-muted);
  font-size: 12px;
  font-weight: 700;
}

.layer-stack-actions {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.layer-stack-action,
.layer-stack-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: transparent;
  font-size: 10.5px;
  font-weight: 620;
  white-space: nowrap;
}

.layer-stack-action:hover:not(:disabled),
.layer-stack-clear:hover:not(:disabled) {
  color: var(--brand-strong);
  background: rgb(237 246 242 / 82%);
}

.layer-stack-clear:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.layer-stack-action .icon,
.layer-stack-clear .icon {
  width: 13px;
  height: 13px;
}

.layer-export-button {
  flex: 0 0 auto;
}

.layer-export-button:hover:not(:disabled),
.layer-export-button[aria-expanded="true"] {
  color: var(--brand-strong);
  background: rgb(237 246 242 / 82%);
}

.layer-export-button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.layer-export-button.is-exporting {
  color: var(--brand-strong);
  background: var(--selected-bg);
}

.layer-export-button .icon {
  width: 13px;
  height: 13px;
}

.layer-export-menu {
  position: absolute;
  z-index: 36;
  bottom: calc(100% + 6px);
  left: 0;
  width: 184px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 98%);
  box-shadow: var(--shadow-md);
}

.layer-export-menu[hidden] {
  display: none;
}

.layer-export-menu-title {
  margin: 0 0 4px;
  padding: 2px 4px 5px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
}

.layer-export-menu button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  width: 100%;
  min-height: 36px;
  align-items: center;
  padding: 5px 7px;
  border: 0;
  border-radius: 5px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.layer-export-menu button:hover,
.layer-export-menu button:focus-visible {
  outline: 0;
  background: var(--hover-bg);
}

.layer-export-menu button strong {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-export-menu button span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.layer-stack-list {
  display: grid;
  align-content: start;
  gap: 0;
  max-height: min(300px, 31vh);
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.layer-stack-panel--right .layer-stack-list {
  max-height: none;
}

.layer-stack-empty {
  padding: 8px 9px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: #fbfdfb;
  font-size: 12px;
}

.layer-stack-dropzone {
  position: relative;
  z-index: 2;
  height: 6px;
  margin: 0;
  pointer-events: none;
}

.layer-stack-dropzone::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 40px;
  right: 18px;
  height: 1px;
  border-radius: 999px;
  background: transparent;
  opacity: 0;
  transform: translateY(-50%) scaleX(.96);
  transform-origin: center;
  transition: background 120ms ease-out, opacity 120ms ease-out, transform 120ms ease-out;
}

.layer-stack-list.is-dragging-stack .layer-stack-dropzone {
  z-index: 4;
  height: 16px;
  margin: -2px 0;
}

.layer-stack-dropzone.is-drop-target,
.layer-stack-list.is-dragging-stack .layer-stack-dropzone.is-drop-target {
  height: 18px;
  margin: -1px 0;
}

.layer-stack-dropzone.is-drop-target::before {
  height: 2px;
  background: var(--brand);
  opacity: .76;
  transform: translateY(-50%) scaleX(1);
}

.layer-stack-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px 30px;
  grid-template-areas:
    "grip text visibility remove"
    "grip pills pills pills";
  align-items: center;
  gap: 8px;
  row-gap: 5px;
  min-height: var(--target-touch);
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgb(255 255 255 / 68%);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.layer-stack-item:active,
.layer-stack-list.is-dragging-stack .layer-stack-item {
  cursor: grabbing;
}

.layer-stack-item:hover,
.layer-stack-item:focus-visible {
  background: var(--hover-bg);
}

.layer-stack-item.is-selected {
  background: var(--selected-bg);
}

.layer-stack-item.is-dragging {
  border-color: rgb(35 77 74 / 36%);
  background: rgb(237 246 242 / 76%);
  opacity: .58;
}

.layer-stack-item.is-dragging * {
  pointer-events: none;
}

.layer-stack-item.is-hidden .stack-layer-text {
  opacity: .54;
}

.layer-stack-item:has(.stack-aggregation-pills) {
  min-height: 88px;
}

.layer-stack-list.is-dragging-stack .layer-stack-item:not(.is-dragging) {
  z-index: 0;
  opacity: .76;
  pointer-events: none;
}

.stack-grip {
  display: grid;
  grid-area: grip;
  width: 30px;
  min-height: 38px;
  align-self: stretch;
  place-items: center;
  color: #6f817b;
  cursor: grab;
}

.stack-grip:hover,
.layer-stack-item:hover .stack-grip {
  color: var(--brand);
}

.stack-grip:active {
  cursor: grabbing;
}

.stack-grip .icon {
  width: 14px;
  height: 14px;
}

.stack-layer-text {
  display: grid;
  grid-area: text;
  min-width: 0;
  gap: 2px;
}

.stack-layer-text strong,
.stack-layer-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack-layer-text strong {
  font-size: 12px;
  line-height: 1.2;
}

.stack-layer-text small {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.15;
}

.stack-visibility,
.stack-remove {
  display: grid;
  width: 30px;
  height: 30px;
  min-width: 30px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.stack-visibility {
  grid-area: visibility;
}

.stack-remove {
  grid-area: remove;
}

.stack-visibility:hover,
.stack-remove:hover {
  color: var(--brand-strong);
  background: rgb(237 246 242 / 82%);
}

.stack-visibility[aria-pressed="false"] {
  color: #8b9893;
  opacity: .72;
}

.stack-visibility[aria-pressed="false"]:hover {
  opacity: 1;
}

.stack-visibility .icon,
.stack-remove .icon {
  width: 14px;
  height: 14px;
}

.stack-aggregation-pills {
  grid-area: pills;
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  min-width: 0;
  margin-top: 0;
}

.stack-aggregation-pill {
  min-height: 22px;
  padding: 3px 6px;
  cursor: pointer;
  font-size: 9px;
}

.stack-attribute-preview {
  min-height: 0;
  overflow: hidden;
  border-top: 0;
  padding-top: 0;
}

.stack-preview-head {
  display: grid;
  gap: 2px;
  margin-bottom: 7px;
}

.stack-preview-head span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.stack-preview-head strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack-preview-empty {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: #fbfdfb;
  font-size: 12px;
  line-height: 1.35;
}

.stack-preview-empty strong {
  color: var(--ink-soft);
  font-size: 12px;
}

.stack-preview-table-wrap {
  max-height: 176px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.stack-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  line-height: 1.25;
}

.stack-preview-table th,
.stack-preview-table td {
  max-width: 130px;
  padding: 5px 7px;
  border-bottom: 1px solid #e5ece8;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stack-preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  background: #f6f9f6;
  font-weight: 700;
}

.stack-preview-table tbody tr:hover {
  background: var(--brand-soft);
}

.right-tabs-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  min-width: 0;
  min-height: 0;
  padding: 10px var(--space-3);
  border-top: 0;
  overflow: hidden;
  pointer-events: auto;
}

.right-tabs {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.right-tab {
  position: relative;
  min-width: 0;
  min-height: var(--target-md);
  margin-bottom: -1px;
  padding: 7px 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.right-tab:hover {
  color: var(--brand-strong);
  background: rgb(237 246 242 / 54%);
}

.right-tab.is-active {
  border-color: var(--line);
  color: var(--brand-strong);
  background: var(--panel-bg);
}

.right-tab-panel {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-top: 10px;
}

.right-tab-panel[hidden] {
  display: none;
}

.feature-info,
.map-legend {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: rgb(255 255 255 / 78%);
  box-shadow: none;
}

.map-legend {
  justify-self: stretch;
  width: 100%;
  padding: 7px 9px;
}

.legend-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.legend-header span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.legend-header strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 11.5px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-strip {
  display: flex;
  height: 8px;
  overflow: hidden;
  border: 1px solid rgb(20 35 32 / 16%);
  border-radius: 999px;
}

.legend-strip i {
  flex: 1 1 0;
  min-width: 0;
  background: var(--bin-color);
}

.legend-markers {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
}

.legend-markers span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.legend-category {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.2;
}

.legend-category i {
  width: 9px;
  height: 9px;
  border: 1px solid rgb(20 35 32 / 14%);
  border-radius: 999px;
  background: var(--bin-color);
}

.legend-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.feature-info {
  max-height: 176px;
  overflow: auto;
  padding: 10px;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: auto;
}

.map-readout {
  position: static;
  z-index: auto;
  flex: 1 1 auto;
  min-width: 180px;
  height: auto;
  margin-left: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  color: rgb(70 82 78 / 82%);
  background: transparent;
  box-shadow: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.2;
  text-align: right;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgb(255 255 255 / 74%);
  white-space: nowrap;
  pointer-events: none;
}

.feature-info-title {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
}

.feature-info-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.feature-info-title strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.25;
}

.feature-info-table-wrap {
  max-height: 176px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.feature-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  line-height: 1.25;
}

.feature-info-table th,
.feature-info-table td {
  max-width: 154px;
  padding: 5px 7px;
  border-bottom: 1px solid #e5ece8;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}

.feature-info-table thead th {
  position: sticky;
  top: 0;
  color: var(--muted);
  background: #f7faf8;
  font-weight: 700;
  z-index: 1;
}

.feature-info-table tbody th {
  width: 42%;
  color: var(--muted);
  font-weight: 650;
}

.feature-info-table td {
  color: var(--ink);
}

.feature-info-table td.is-empty {
  color: transparent;
}

.feature-info-empty {
  color: var(--muted);
  font-weight: 600;
}

.loading-overlay {
  position: absolute;
  z-index: 16;
  top: var(--header-height);
  right: 0;
  left: 0;
  height: 3px;
  overflow: hidden;
  background: transparent;
  transition: opacity 140ms ease-out, visibility 140ms ease-out;
  pointer-events: none;
}

.loading-overlay.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loading-card {
  width: 100%;
  height: 3px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.loading-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.loading-card strong {
  display: block;
  font-size: 12px;
  line-height: 1.2;
}

.loading-label {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.2;
}

.loading-progress {
  position: relative;
  height: 3px;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

.loading-progress span {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 38%;
  border-radius: inherit;
  background: var(--brand);
  animation: loading-progress-slide 1.1s ease-in-out infinite;
}

.data-orbits {
  position: relative;
  flex: 0 0 auto;
  isolation: isolate;
  overflow: visible;
  border-radius: 50%;
}

.data-orbits--large {
  width: min(320px, 54vw);
  height: min(320px, 54vw);
}

.orbit-blob {
  position: absolute;
  top: calc((100% - var(--size)) / 2);
  left: calc((100% - var(--size)) / 2);
  width: var(--size);
  height: var(--size);
  border: 1px solid var(--stroke);
  border-radius: var(--shape);
  opacity: var(--opacity);
  transform: rotate(var(--angle)) scaleX(var(--sx)) scaleY(var(--sy));
  transform-origin: 50% 50%;
  animation: orbit-blob-spin var(--speed) linear infinite;
  pointer-events: none;
}

.data-orbits--large .orbit-blob {
  border-width: 1.35px;
}

.orbit-blob--1 {
  --size: 96%;
  --angle: 2deg;
  --spin: 360deg;
  --speed: 26s;
  --sx: 1;
  --sy: .88;
  --opacity: .72;
  --stroke: rgb(225 246 241 / 52%);
  --shape: 48% 52% 44% 56% / 55% 41% 59% 45%;
}

.orbit-blob--2 {
  --size: 86%;
  --angle: -28deg;
  --spin: -360deg;
  --speed: 34s;
  --sx: .82;
  --sy: 1.05;
  --opacity: .52;
  --stroke: rgb(187 222 214 / 45%);
  --shape: 55% 45% 51% 49% / 43% 58% 42% 57%;
}

.orbit-blob--3 {
  --size: 76%;
  --angle: 41deg;
  --spin: 360deg;
  --speed: 21s;
  --sx: 1.08;
  --sy: .74;
  --opacity: .48;
  --stroke: rgb(226 238 205 / 42%);
  --shape: 46% 54% 58% 42% / 60% 44% 56% 40%;
}

.orbit-blob--4 {
  --size: 66%;
  --angle: 74deg;
  --spin: -360deg;
  --speed: 29s;
  --sx: .73;
  --sy: 1.08;
  --opacity: .5;
  --stroke: rgb(151 200 191 / 46%);
  --shape: 58% 42% 47% 53% / 45% 55% 40% 60%;
}

.orbit-blob--5 {
  --size: 56%;
  --angle: -62deg;
  --spin: 360deg;
  --speed: 18s;
  --sx: 1.12;
  --sy: .82;
  --opacity: .38;
  --stroke: rgb(237 247 232 / 38%);
  --shape: 43% 57% 52% 48% / 49% 41% 59% 51%;
}

.orbit-blob--6 {
  --size: 44%;
  --angle: 18deg;
  --spin: -360deg;
  --speed: 23s;
  --sx: .88;
  --sy: 1.16;
  --opacity: .42;
  --stroke: rgb(196 224 216 / 38%);
  --shape: 52% 48% 40% 60% / 57% 43% 51% 49%;
}

.orbit-blob--7 {
  --size: 34%;
  --angle: -12deg;
  --spin: 360deg;
  --speed: 15s;
  --sx: 1.18;
  --sy: .78;
  --opacity: .46;
  --stroke: rgb(229 244 240 / 44%);
  --shape: 49% 51% 61% 39% / 42% 60% 40% 58%;
}

.catalogue-panel {
  position: absolute;
  z-index: 38;
  inset: 0;
  visibility: visible;
  pointer-events: none;
}

.catalogue-panel[aria-hidden="true"] {
  visibility: hidden;
}

.catalogue-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(20 35 32 / 34%);
  opacity: 1;
  transition: opacity 180ms ease-out;
  pointer-events: auto;
}

.catalogue-panel[aria-hidden="true"] .catalogue-backdrop {
  opacity: 0;
}

.catalogue-sheet {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  bottom: var(--space-3);
  left: var(--space-3);
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: var(--space-3);
  overflow: hidden;
  padding: var(--space-4);
  border: 1px solid rgb(20 35 32 / 10%);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: #fbfdfb;
  box-shadow: var(--shadow-lg);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease-out, transform 180ms ease-out;
  pointer-events: auto;
}

.catalogue-panel[aria-hidden="true"] .catalogue-sheet {
  opacity: 0;
  transform: translateY(10px);
}

.catalogue-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line-soft);
}

.catalogue-header h2 {
  font-size: 20px;
  line-height: 1.15;
}

.catalogue-header p:last-child {
  max-width: 78ch;
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.catalogue-controls {
  display: grid;
  grid-template-columns: minmax(280px, 2fr) repeat(4, minmax(128px, 1fr)) auto;
  gap: var(--space-2);
  align-items: end;
}

.catalogue-controls label {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.catalogue-controls label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.catalogue-search {
  display: flex !important;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--target-md);
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.catalogue-search input {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border: 0;
  color: var(--ink);
  background: transparent;
  font-size: 13px;
}

.catalogue-search input:focus {
  outline: 0;
}

.catalogue-controls select,
.catalogue-export {
  min-width: 0;
  min-height: var(--target-md);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: #ffffff;
  font-size: 12px;
  font-weight: 600;
}

.catalogue-controls select {
  width: 100%;
  padding: 0 9px;
}

.catalogue-export {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
}

.catalogue-statusline {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 30px;
  color: var(--muted);
  font-size: 12px;
}

.catalogue-statusline strong {
  color: var(--brand);
  font-size: 17px;
}

.catalogue-statusline span:last-child {
  margin-left: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}

.catalogue-table-wrap {
  position: relative;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.catalogue-table {
  width: 100%;
  min-width: 1220px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.catalogue-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: var(--target-md);
  border-bottom: 1px solid var(--line);
  background: #f1f6f1;
  color: var(--brand);
  text-align: left;
}

.catalogue-table th:nth-child(1) { width: 74px; }
.catalogue-table th:nth-child(2) { width: 160px; }
.catalogue-table th:nth-child(3) { width: 280px; }
.catalogue-table th:nth-child(4) { width: 170px; }
.catalogue-table th:nth-child(5) { width: 150px; }
.catalogue-table th:nth-child(6) { width: 145px; }
.catalogue-table th:nth-child(7) { width: 165px; }
.catalogue-table th:nth-child(8) { width: 112px; }

.catalogue-sort {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 100%;
  padding: 0 10px;
  border: 0;
  color: inherit;
  background: transparent;
  font-size: 11px;
  font-weight: 800;
}

.catalogue-sort .icon {
  width: 13px;
  height: 13px;
  opacity: .6;
}

.catalogue-sort.is-active {
  color: var(--brand-strong);
  background: #dfeae3;
}

.catalogue-sort.is-active[data-direction="desc"] .icon {
  transform: rotate(180deg);
}

.catalogue-table td {
  min-height: 40px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  vertical-align: top;
}

.catalogue-table tr:hover td {
  background: #f5f8f4;
}

.catalogue-action-cell {
  white-space: nowrap;
}

.catalogue-open-layer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--brand-strong);
  background: var(--selected-bg);
  font-size: 10.5px;
  font-weight: 750;
}

.catalogue-open-layer:hover {
  background: #dfeee3;
}

.catalogue-open-layer .icon {
  width: 14px;
  height: 14px;
}

.catalogue-table .catalogue-message {
  padding: 22px 18px;
  color: var(--muted);
  background: #ffffff;
  font-size: 13px;
}

.catalogue-table .catalogue-message--loading {
  color: var(--brand);
}

.catalogue-table .catalogue-message--error {
  color: #8f1d1d;
}

.catalogue-name-cell strong,
.catalogue-name-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.catalogue-name-cell strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.catalogue-name-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.upload-panel {
  position: absolute;
  z-index: 39;
  inset: 0;
  visibility: visible;
  pointer-events: none;
}

.upload-panel[aria-hidden="true"] {
  visibility: hidden;
}

.upload-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(20 35 32 / 34%);
  opacity: 1;
  transition: opacity 180ms ease-out;
  pointer-events: auto;
}

.upload-panel[aria-hidden="true"] .upload-backdrop {
  opacity: 0;
}

.upload-sheet {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  bottom: var(--space-3);
  left: var(--space-3);
  display: grid;
  grid-template-columns: minmax(280px, .74fr) minmax(560px, 1.26fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid rgb(20 35 32 / 10%);
  border-radius: var(--radius-md);
  color: var(--ink);
  background: #fbfdfb;
  box-shadow: var(--shadow-lg);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease-out, transform 180ms ease-out;
  pointer-events: auto;
}

.upload-panel[aria-hidden="true"] .upload-sheet {
  opacity: 0;
  transform: translateY(10px);
}

.upload-visual {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  min-width: 0;
  padding: clamp(28px, 4vw, 56px);
  color: #f8fbf8;
  background: linear-gradient(180deg, rgb(20 58 53 / 98%), rgb(18 63 59 / 97%));
}

.upload-visual-copy {
  max-width: 380px;
}

.upload-visual-copy h2 {
  margin-bottom: var(--space-2);
  color: #ffffff;
  font-size: 23px;
  line-height: 1.15;
  text-wrap: balance;
}

.upload-visual-copy p:last-child {
  margin: 0;
  color: #d9e5df;
  font-size: 14px;
  line-height: 1.55;
}

.upload-content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: var(--space-4);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: var(--space-6) clamp(28px, 3vw, 48px);
  background: #fbfdfb;
}

.upload-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-3);
  padding-bottom: 0;
  border-bottom: 0;
}

.upload-header h2 {
  font-size: 22px;
  line-height: 1.15;
}

.upload-header p:last-child {
  max-width: 62ch;
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

.upload-form {
  display: grid;
  gap: var(--space-3);
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.upload-guidance {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.upload-guidance div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.upload-guidance strong {
  color: var(--brand);
  font-size: 12px;
}

.upload-guidance span {
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.45;
}

.upload-notice {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, .8fr);
  gap: var(--space-3);
  align-items: start;
  padding: 12px;
  border: 1px solid #d6e4de;
  border-radius: var(--radius-md);
  color: #233d38;
  background: #eef7f3;
}

.upload-notice strong {
  display: block;
  margin-bottom: 4px;
  color: var(--brand-strong);
  font-size: 13px;
}

.upload-notice p {
  margin: 0;
  color: #334a45;
  font-size: 12.5px;
  line-height: 1.45;
}

.upload-file {
  position: relative;
  display: grid;
  gap: 6px;
  min-height: 104px;
  align-content: center;
  justify-items: center;
  padding: var(--space-3);
  border: 1px dashed #b5c4bd;
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  background: #ffffff;
  text-align: center;
}

.upload-file .icon {
  width: 22px;
  height: 22px;
  color: var(--brand);
}

.upload-file strong {
  color: var(--ink);
  font-size: 14px;
}

.upload-file small {
  max-width: 58ch;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.upload-file input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  opacity: 0;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.upload-form label:not(.upload-file) {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.upload-form label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.upload-form input,
.upload-form select,
.upload-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: #ffffff;
  font-size: 13px;
}

.upload-form input,
.upload-form select {
  min-height: var(--target-md);
  padding: 0 9px;
}

.upload-form textarea {
  min-height: 92px;
  padding: 9px;
  resize: vertical;
}

.upload-form .upload-file input {
  position: absolute;
  width: 1px;
  min-width: 0;
  height: 1px;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  opacity: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  pointer-events: none;
}

.upload-file:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(33 94 84 / 13%);
}

.upload-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--line-soft);
}

.upload-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.upload-status[data-tone="success"] {
  color: var(--success);
}

.upload-status[data-tone="error"] {
  color: var(--danger);
}

.upload-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--target-md);
  padding: 0 14px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-sm);
  color: #ffffff;
  background: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.upload-submit:hover {
  background: var(--brand-strong);
}

.upload-submit:disabled {
  cursor: wait;
  opacity: .62;
}

.info-panel {
  position: absolute;
  z-index: 35;
  inset: 0;
  visibility: visible;
  pointer-events: none;
}

.info-panel[aria-hidden="true"] {
  visibility: hidden;
}

.info-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgb(20 35 32 / 34%);
  opacity: 1;
  transition: opacity 180ms ease-out;
  pointer-events: auto;
}

.info-panel[aria-hidden="true"] .info-backdrop {
  opacity: 0;
}

.info-sheet {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  bottom: var(--space-3);
  left: var(--space-3);
  display: grid;
  grid-template-columns: minmax(300px, .76fr) minmax(540px, 1.24fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: var(--shadow-lg);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease-out, transform 180ms ease-out;
  pointer-events: auto;
}

.info-panel[aria-hidden="true"] .info-sheet {
  opacity: 0;
  transform: translateY(10px);
}

.info-visual {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  padding: clamp(28px, 4vw, 56px);
  color: #f8fbf8;
  background: linear-gradient(180deg, rgb(20 58 53 / 98%), rgb(18 63 59 / 97%));
}

.info-visual-copy {
  max-width: 360px;
}

.info-visual-copy h2 {
  margin-bottom: var(--space-2);
  color: #ffffff;
  font-size: 23px;
  line-height: 1.15;
  text-wrap: balance;
}

.info-visual-copy p:last-child {
  margin: 0;
  color: #d9e5df;
  font-size: 14px;
  line-height: 1.55;
}

.info-content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: start;
  gap: var(--space-4);
  min-width: 0;
  overflow-y: auto;
  padding: var(--space-6) clamp(28px, 3vw, 48px);
  background: #fbfdfb;
}

.info-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: 0;
}

.info-header h2 {
  font-size: 22px;
  line-height: 1.15;
}

.info-lede {
  max-width: 72ch;
  margin: var(--space-2) 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.icon-button {
  display: grid;
  width: var(--target-md);
  height: var(--target-md);
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface-strong);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: min-content;
  gap: var(--space-3);
  align-content: start;
}

.info-section {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: #ffffff;
}

.info-section--levels {
  grid-column: 1 / -1;
}

.info-section-title {
  color: var(--brand);
}

.info-section p,
.info-list,
.source-list {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.level-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-5);
  gap: var(--space-2);
}

.level-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}

.level-item:nth-child(-n + 2) {
  padding-top: 0;
  border-top: 0;
}

.level-item:last-child {
  grid-column: 1 / -1;
}

.level-item strong {
  display: grid;
  min-height: 34px;
  place-items: center;
  border: 1px solid rgb(35 77 74 / 14%);
  border-radius: var(--radius-sm);
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 12px;
}

.level-item span {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.5;
}

.info-list,
.source-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
}

.source-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--space-4);
}

.maplibregl-map {
  font: 12px/1.4 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.maplibregl-ctrl-top-right {
  top: calc(var(--header-height) + var(--space-3));
}

.maplibregl-ctrl-bottom-left {
  left: calc(min(var(--left-panel-width), 42vw) + var(--space-1));
  bottom: var(--space-2);
}

body.sidebar-collapsed .maplibregl-ctrl-bottom-left {
  left: calc(var(--panel-rail-width) + var(--space-2));
}

.maplibregl-ctrl-bottom-right {
  right: calc(min(var(--right-panel-width), 42vw) + var(--space-1));
  bottom: var(--space-2);
}

body.right-panel-collapsed .maplibregl-ctrl-bottom-right {
  right: calc(var(--panel-rail-width) + var(--space-2));
}

.maplibregl-ctrl-attrib {
  font-size: 10px;
}

@keyframes orbit-blob-spin {
  from {
    transform: rotate(var(--angle)) scaleX(var(--sx)) scaleY(var(--sy));
  }
  to {
    transform: rotate(calc(var(--angle) + var(--spin))) scaleX(var(--sx)) scaleY(var(--sy));
  }
}

@keyframes brand-orbit-spin {
  from {
    transform: rotate(var(--ring-start, 0deg));
  }
  to {
    transform: rotate(calc(var(--ring-start, 0deg) + 360deg));
  }
}

@keyframes loading-progress-slide {
  0% {
    transform: translateX(-120%);
  }
  55% {
    width: 46%;
  }
  100% {
    transform: translateX(280%);
  }
}

@media (max-width: 1180px) {
  .catalogue-controls {
    grid-template-columns: minmax(260px, 1.4fr) repeat(2, minmax(128px, 1fr)) auto;
  }

  .map-toolbar {
    flex-wrap: nowrap;
    justify-content: center;
  }
}

@media (max-width: 920px) {
  .brand-block h1,
  .topbar-action span:last-child {
    display: none;
  }

  .topbar-actions {
    gap: 5px;
  }

  .topbar-action {
    min-width: var(--target-md);
    min-height: var(--target-md);
    padding: 6px 8px;
  }

  .sidebar {
    width: min(390px, 48vw);
  }

  .right-panel {
    width: min(360px, 48vw);
  }

  .map-toolbar {
    left: min(390px, 48vw);
    right: min(360px, 48vw);
    justify-content: flex-start;
  }

  .map-readout {
    min-width: 140px;
  }

  body.right-panel-collapsed .map-toolbar {
    right: var(--panel-rail-width);
  }

  body.sidebar-collapsed .map-toolbar {
    left: var(--panel-rail-width);
  }

  body:not(.sidebar-collapsed) .map-toolbar {
    display: none;
  }

  .maplibregl-ctrl-bottom-right {
    right: calc(min(360px, 48vw) + var(--space-1));
  }

  body.right-panel-collapsed .maplibregl-ctrl-bottom-right {
    right: calc(var(--panel-rail-width) + var(--space-2));
  }

  .catalogue-sheet {
    padding: var(--space-3);
  }

  .catalogue-controls {
    grid-template-columns: 1fr 1fr;
  }

  .catalogue-search {
    grid-column: 1 / -1;
  }

  .catalogue-export {
    width: 100%;
  }

  .upload-sheet {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .upload-visual {
    min-height: 280px;
    padding: var(--space-5);
  }

  .upload-content {
    padding: var(--space-5);
  }

  .upload-notice {
    grid-template-columns: 1fr;
  }

  .upload-guidance,
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .info-sheet {
    grid-template-columns: 1fr;
  }

  .info-visual {
    min-height: 300px;
    padding: var(--space-5);
  }

  .info-content {
    padding: var(--space-5);
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .info-section--levels {
    grid-row: auto;
  }

  .level-list {
    grid-template-columns: 1fr;
  }

  .level-item:nth-child(2) {
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
  }

  .level-item:last-child {
    grid-column: auto;
  }

  .source-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: calc(56px + var(--safe-top));
    --panel-rail-width: 44px;
  }

  .topbar {
    min-height: var(--header-height);
    gap: var(--space-2);
    padding: max(6px, var(--safe-top)) max(var(--space-2), var(--safe-right)) 6px max(var(--space-2), var(--safe-left));
  }

  .topbar-action span:last-child {
    display: none;
  }

  .topbar-actions {
    gap: 5px;
  }

  .topbar-action {
    min-width: var(--target-md);
    min-height: var(--target-md);
    padding: 6px 8px;
  }

  .topbar-panel-controls .topbar-action {
    min-height: var(--target-md);
  }

  .panel-action--icon,
  .icon-button {
    width: var(--target-touch);
    min-width: var(--target-touch);
    height: var(--target-touch);
  }

  .panel-action--icon {
    width: auto;
    padding: 0 10px;
  }

  .panel-action-label {
    display: inline;
  }

  .right-tab,
  .upload-submit,
  .catalogue-controls select,
  .catalogue-export,
  .catalogue-search,
  .search-field {
    min-height: var(--target-touch);
  }

  .search-input {
    min-height: calc(var(--target-touch) - 2px);
  }

  .layer-section-heading button,
  .layer-add-control,
  .layer-main,
  .layer-discovery-filter,
  .aggregation-pill,
  .layer-stack-action,
  .layer-stack-clear,
  .layer-export-menu button,
  .map-toolbar button,
  .map-toolbar select,
  .basemap-control {
    min-height: var(--target-touch);
  }

  .layer-stack-action,
  .layer-stack-clear,
  .dataset-map-action,
  .catalogue-open-layer,
  .stack-visibility,
  .stack-remove {
    min-width: var(--target-touch);
  }

  .layer-stack-item {
    grid-template-columns: var(--target-touch) minmax(0, 1fr) var(--target-touch) var(--target-touch);
  }

  .stack-grip {
    width: var(--target-touch);
    min-height: var(--target-touch);
  }

  .stack-visibility,
  .stack-remove {
    width: var(--target-touch);
    height: var(--target-touch);
  }

  .layer-stack-item:has(.stack-aggregation-pills) {
    min-height: 108px;
  }

  .stack-aggregation-pill {
    min-height: 30px;
    padding: 4px 7px;
    font-size: 9px;
  }

  .map-toolbar button {
    min-width: var(--target-touch);
  }

  .sidebar {
    top: var(--header-height);
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
  }

  .right-panel {
    top: var(--header-height);
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
  }

  .map-toolbar {
    right: 0;
    bottom: 0;
    left: 0;
    max-width: none;
    justify-content: flex-start;
  }

  body.sidebar-collapsed .map-toolbar {
    left: var(--panel-rail-width);
  }

  body.right-panel-collapsed .map-toolbar {
    right: var(--panel-rail-width);
  }

  .map-readout {
    min-width: 0;
    font-size: 10px;
  }

  .layer-stack-list {
    max-height: 180px;
  }

  .map-toolbar button span:last-child:not([data-icon]),
  .basemap-control > span {
    display: none;
  }

  body:not(.sidebar-collapsed) .map-toolbar,
  body:not(.sidebar-collapsed) .right-panel,
  body:not(.sidebar-collapsed) .map-readout,
  body:not(.right-panel-collapsed) .map-readout,
  body:not(.right-panel-collapsed) .map-toolbar {
    display: none;
  }

  .info-sheet {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 0;
  }

  .info-visual {
    min-height: 250px;
  }

  .info-content {
    padding: var(--space-4);
  }

  .catalogue-sheet {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    border-radius: 0;
  }

  .catalogue-header {
    gap: var(--space-2);
  }

  .catalogue-header h2 {
    font-size: 18px;
  }

  .catalogue-header p:last-child {
    display: none;
  }

  .catalogue-controls {
    grid-template-columns: 1fr;
  }

  .catalogue-statusline {
    flex-wrap: wrap;
  }

  .catalogue-statusline span:last-child {
    width: 100%;
    margin-left: 0;
  }

  .upload-sheet {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    max-height: none;
    border-radius: 0;
    transform: none;
  }

  .upload-panel[aria-hidden="true"] .upload-sheet {
    transform: translateY(10px);
  }

  .upload-header {
    gap: var(--space-2);
  }

  .upload-header h2 {
    font-size: 18px;
  }

  .upload-header p:last-child {
    display: block;
    font-size: 12px;
  }

  .upload-visual {
    min-height: 230px;
    padding: var(--space-4);
  }

  .upload-visual-copy h2 {
    font-size: 20px;
  }

  .upload-visual-copy p:last-child {
    font-size: 13px;
  }

  .upload-content {
    padding: var(--space-4);
  }

  .upload-actions {
    display: grid;
  }

  .upload-submit {
    width: 100%;
  }

  .data-orbits--large {
    width: 190px;
    height: 190px;
  }
}

@media (max-width: 360px) {
  .brand-mark--orbits {
    width: 30px;
    height: 30px;
  }

  .topbar {
    gap: 4px;
  }

  .topbar-actions {
    gap: 4px;
  }

  .topbar-panel-controls {
    gap: 3px;
    margin-left: 0;
    padding-left: 4px;
  }
}

@media (max-height: 520px) and (min-width: 700px) {
  .catalogue-sheet,
  .upload-sheet {
    top: var(--space-2);
    right: var(--space-2);
    bottom: var(--space-2);
    left: var(--space-2);
    width: auto;
    max-height: none;
    padding: 10px var(--space-3);
    gap: var(--space-2);
    transform: none;
  }

  .upload-panel[aria-hidden="true"] .upload-sheet {
    transform: translateY(10px);
  }

  .catalogue-header,
  .upload-header {
    padding-bottom: var(--space-2);
  }

  .catalogue-header h2,
  .upload-header h2 {
    font-size: 18px;
  }

  .catalogue-header p:last-child,
  .upload-header p:last-child {
    display: none;
  }

  .upload-notice {
    padding: 10px;
  }

  .catalogue-controls {
    grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(92px, 1fr)) 76px;
    gap: 6px;
  }

  .catalogue-search {
    grid-column: auto;
  }

  .catalogue-controls label > span {
    font-size: 10.5px;
  }

  .catalogue-statusline {
    min-height: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .right-panel,
  .loading-overlay,
  .info-backdrop,
  .info-sheet {
    transition: none;
  }

  .catalogue-backdrop,
  .catalogue-sheet,
  .upload-backdrop,
  .upload-sheet {
    transition: none;
  }

  .orbit-blob {
    animation: none;
  }

  .brand-orbit-ring {
    animation: none;
    transform: rotate(var(--ring-start, 0deg));
  }

  .loading-progress span {
    width: 100%;
    animation: none;
  }
}
