.lab-atlas {
  --atlas-primary: #c8102e;
  --atlas-secondary: #17233b;
  --atlas-accent: #f2b705;
  --atlas-surface: #fff;
  --atlas-bg: #f1f4f8;
  --atlas-text: #172033;
  --atlas-map: #dce3ea;
  --atlas-map-active: #c8102e;
  --atlas-radius: 22px;
  --atlas-font:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --atlas-base-size: 14px;
  --atlas-title-size: 42px;
  --atlas-max-width: 1440px;
  --atlas-map-height: 700px;
  --atlas-mobile-map-height: 500px;
  --atlas-right: 360px;
  --atlas-gap: 16px;
  --atlas-pattern-opacity: 0.72;
  --atlas-shadow: 0 20px 65px rgba(22, 34, 53, 0.14);
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: var(--atlas-max-width);
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--atlas-radius);
  background: var(--atlas-bg);
  color: var(--atlas-text);
  font-family: var(--atlas-font);
  font-size: var(--atlas-base-size);
  box-shadow: var(--atlas-shadow);
}
.lab-atlas * {
  box-sizing: border-box;
}
.lab-atlas button,
.lab-atlas input {
  font: inherit;
}
.atlas-topbar {
  min-height: 72px;
  padding: 12px 22px;
  background: var(--atlas-secondary);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 18px;
}
.atlas-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}
.atlas-brand img {
  max-height: 42px;
  max-width: 155px;
  object-fit: contain;
}
.atlas-brand-box {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 11px;
  border: 2px solid #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.06em;
}
.atlas-brand > span:last-child {
  display: flex;
  flex-direction: column;
}
.atlas-brand b {
  font-size: 16px;
}
.atlas-brand small {
  color: #aebbd0;
  font-size: 11px;
}
.atlas-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: #ffffff12;
  color: #c8d3e2;
  font-size: 11px;
}
.atlas-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f2b705;
  box-shadow: 0 0 0 4px #f2b70522;
}
.atlas-status.ready i {
  background: #42cf94;
  box-shadow: 0 0 0 4px #42cf9422;
}
.atlas-status.error i {
  background: #ef6670;
  box-shadow: 0 0 0 4px #ef667022;
}
.atlas-profile-switch {
  display: flex;
  padding: 3px;
  background: #0d1729;
  border-radius: 11px;
}
.atlas-profile-switch button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: #aab7cb;
  padding: 7px 13px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 11px;
}
.atlas-profile-switch button.active {
  background: #fff;
  color: var(--atlas-secondary);
  font-weight: 800;
}
.atlas-hero {
  position: relative;
  min-height: 210px;
  padding: 34px 220px 32px 34px;
  display: flex;
  align-items: center;
  background:
    radial-gradient(
      circle at 88% 15%,
      color-mix(in srgb, var(--atlas-primary) 16%, #fff),
      transparent 36%
    ),
    linear-gradient(120deg, #fff 0%, #fff 72%, #fff5f6 100%);
  border-bottom: 1px solid #dce2e9;
  overflow: hidden;
}
.atlas-hero-copy {
  width: 100%;
  max-width: 940px;
}
.atlas-kicker {
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 900;
  color: var(--atlas-primary);
}
.atlas-hero h2 {
  max-width: 820px;
  margin: 7px 0 9px;
  color: var(--atlas-secondary);
  font-size: clamp(28px, 3.1vw, var(--atlas-title-size));
  line-height: 1.03;
  letter-spacing: -0.045em;
}
.atlas-hero p {
  max-width: 760px;
  margin: 0;
  color: #647086;
  line-height: 1.55;
}
.atlas-hero-character {
  position: absolute;
  right: 38px;
  bottom: -12px;
  width: 150px;
  max-height: 205px;
  object-fit: contain;
  filter: drop-shadow(0 16px 20px rgba(23, 35, 59, 0.16));
  pointer-events: none;
}
.atlas-search-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.atlas-search-row form {
  width: min(420px, 100%);
}
.atlas-search-row form > label {
  display: block;
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 750;
  color: #526078;
}
.atlas-search-row form > div {
  display: flex;
}
.atlas-search-row input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  border: 1px solid #cfd7e1;
  border-right: 0;
  border-radius: 13px 0 0 13px;
  background: #fff;
  color: var(--atlas-text);
  outline: 0;
}
.atlas-search-row input:focus {
  border-color: var(--atlas-primary);
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--atlas-primary) 13%, transparent);
}
.atlas-search-row form button {
  min-width: 86px;
  height: 48px;
  border: 0;
  border-radius: 0 13px 13px 0;
  background: var(--atlas-secondary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.atlas-locate {
  height: 48px;
  border: 0;
  border-radius: 13px;
  background: var(--atlas-primary);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 17px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 20px
    color-mix(in srgb, var(--atlas-primary) 23%, transparent);
}
.atlas-locate span {
  font-size: 19px;
}
.atlas-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--atlas-right);
  gap: var(--atlas-gap);
  padding: var(--atlas-gap);
  align-items: start;
}
.atlas-map-card,
.atlas-results {
  background: var(--atlas-surface);
  border: 1px solid #dce2e8;
  border-radius: var(--atlas-radius);
  box-shadow: 0 8px 24px rgba(23, 35, 59, 0.05);
}
.atlas-map-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
}
.atlas-map-head {
  position: absolute;
  z-index: 4;
  top: 20px;
  left: 22px;
  max-width: min(560px, 64%);
  pointer-events: none;
}
.atlas-map-head h1 {
  margin: 5px 0 4px;
  color: var(--atlas-secondary);
  font-size: clamp(21px, 2vw, 31px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.atlas-map-head p {
  margin: 0;
  color: #68768b;
  font-size: 11px;
  line-height: 1.45;
}
.atlas-map-stage {
  position: relative;
  height: var(--atlas-map-height);
  overflow: hidden;
  background: radial-gradient(
    circle at 50% 45%,
    #fff 0,
    #f6f8fa 68%,
    #eef2f5 100%
  );
}
.atlas-map-stage svg {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.atlas-real-map {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: none;
  background: #dce3ea;
}
.atlas-map-engine-urban .atlas-real-map {
  display: block;
}
.atlas-map-stage svg.atlas-svg-fallback-hidden {
  visibility: hidden;
  pointer-events: none;
}
.atlas-real-map .leaflet-control-attribution {
  font-size: 9px;
}
.atlas-leaflet-site,
.atlas-leaflet-event,
.atlas-leaflet-presence {
  border: 0;
  background: transparent;
}
.atlas-leaflet-site span {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 11px 11px 11px 3px;
  background: var(--atlas-primary);
  color: #fff;
  font-weight: 900;
  box-shadow: 0 7px 18px #17233b55;
  transform: rotate(-6deg);
}
.atlas-leaflet-event,
.atlas-leaflet-presence {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 7px 18px #17233b45;
}
.atlas-leaflet-event {
  background: var(--atlas-layer-culture, #6f42c1);
}
.atlas-leaflet-presence {
  background: var(--atlas-layer-presence, #087b70);
}
.atlas-leaflet-event span {
  font-size: 16px;
}
.atlas-leaflet-event b,
.atlas-leaflet-presence b {
  font-size: 11px;
}
.atlas-map-popup {
  width: 190px;
  display: grid;
  gap: 5px;
}
.atlas-map-popup img {
  width: 100%;
  height: 95px;
  object-fit: cover;
  border-radius: 8px;
}
.atlas-map-popup b {
  color: var(--atlas-secondary);
  font-size: 14px;
}
.atlas-map-popup small {
  color: #68768b;
}
.atlas-map-popup em {
  display: block;
  margin-top: 4px;
  color: #8a6570;
  font-size: 9px;
}
.atlas-map-mode-switch {
  position: absolute;
  z-index: 9;
  top: 18px;
  right: 72px;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 3px;
  padding: 3px;
  border: 1px solid #d9e0e7;
  border-radius: 12px;
  background: #f2f5f8;
  pointer-events: auto;
}
.atlas-map-mode-switch button {
  padding: 7px 11px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #647186;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.atlas-map-mode-switch button.active {
  background: #fff;
  color: var(--atlas-primary);
  box-shadow: 0 2px 8px #17233b18;
}
.atlas-monthly-intro {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--atlas-layer-culture, #6f42c1) 10%, #fff);
  color: var(--atlas-secondary);
  font-weight: 700;
}
.atlas-presence-details {
  margin-top: 10px;
}
.atlas-presence-details summary {
  margin-bottom: 9px;
  color: var(--atlas-secondary);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.atlas-map-actions {
  position: absolute;
  z-index: 8;
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.atlas-map-actions button {
  width: 40px;
  height: 40px;
  border: 1px solid #d7dee6;
  border-radius: 11px;
  background: #fff;
  color: #47536a;
  font-size: 17px;
  cursor: pointer;
  box-shadow: 0 4px 13px #18243a12;
}
.atlas-layer-dock {
  position: absolute;
  z-index: 7;
  left: 20px;
  right: 70px;
  top: 100px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  pointer-events: none;
}
.atlas-layer-dock button {
  min-height: 43px;
  padding: 7px 10px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
  background: #fffffff2;
  color: #536076;
  display: grid;
  grid-template-columns: 28px auto;
  column-gap: 7px;
  align-items: center;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 17px rgba(23, 35, 59, 0.08);
  pointer-events: auto;
  transition: 0.18s;
}
.atlas-layer-dock button > span {
  grid-row: 1/3;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef2f6;
  font-weight: 900;
}
.atlas-layer-dock button b {
  font-size: 10px;
}
.atlas-layer-dock button small {
  font-size: 8px;
  color: #8792a3;
}
.atlas-layer-dock button[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--atlas-primary) 42%, #fff);
  color: var(--atlas-secondary);
}
.atlas-layer-dock button[aria-pressed="true"] > span {
  background: var(--atlas-primary);
  color: #fff;
}
.atlas-map-foot {
  min-height: 46px;
  padding: 10px 15px;
  border-top: 1px solid #e2e6eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #7b8798;
  font-size: 10px;
}
.atlas-map-foot button {
  min-height: 34px;
  border: 0;
  background: transparent;
  color: var(--atlas-primary);
  font-weight: 750;
  cursor: pointer;
}
.atlas-district {
  fill: var(--atlas-map);
  stroke: #fff;
  stroke-width: 2.1;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition:
    fill 0.2s,
    opacity 0.2s,
    filter 0.2s;
}
.atlas-district:hover,
.atlas-district:focus {
  fill: color-mix(in srgb, var(--atlas-map-active) 45%, #fff);
  filter: drop-shadow(0 2px 4px #17233b38);
  outline: 0;
}
.atlas-district.has-site {
  fill: color-mix(
    in srgb,
    var(--atlas-layer-sites, #c8102e) 26%,
    var(--atlas-map)
  );
}
.atlas-district.site-pattern {
  fill-opacity: var(--atlas-pattern-opacity);
}
.atlas-district.selected {
  fill: var(--atlas-map-active);
  stroke: var(--atlas-secondary);
  stroke-width: 3;
}
.atlas-district.target-site {
  stroke: var(--atlas-accent);
  stroke-width: 5;
  filter: drop-shadow(
    0 0 7px color-mix(in srgb, var(--atlas-accent) 72%, transparent)
  );
}
.atlas-site-marker {
  cursor: pointer;
  filter: drop-shadow(0 4px 7px rgba(23, 35, 59, 0.28));
}
.atlas-site-marker .atlas-site-pulse {
  fill: color-mix(in srgb, var(--atlas-layer-sites, #c8102e) 18%, transparent);
  stroke: var(--atlas-layer-sites, #c8102e);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  animation: atlas-pulse 2.4s ease-out infinite;
}
.atlas-site-marker .atlas-site-core {
  fill: var(--atlas-layer-sites, #c8102e);
  stroke: #fff;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.atlas-site-marker text {
  fill: #fff;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}
.atlas-site-marker.target .atlas-site-core {
  fill: var(--atlas-accent);
  stroke: var(--atlas-secondary);
}
.atlas-culture-marker rect {
  fill: var(--atlas-layer-culture, #6f42c1);
  stroke: #fff;
  stroke-width: 2;
  rx: 7;
  vector-effect: non-scaling-stroke;
}
.atlas-culture-marker,
.atlas-presence-marker {
  cursor: pointer;
}
.atlas-culture-marker text {
  fill: #fff;
  font-size: 13px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: central;
}
.atlas-culture-marker line {
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.atlas-presence-marker circle {
  fill: var(--atlas-layer-presence, #087b70);
  stroke: #fff;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}
.atlas-presence-marker text {
  fill: #fff;
  font-size: 10px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: central;
}
.atlas-connection {
  fill: none;
  stroke: var(--atlas-layer-connection, #f2b705);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 12 8;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 2px 3px rgba(23, 35, 59, 0.25));
  animation: atlas-route 1.2s linear infinite;
}
.atlas-user-marker circle:first-child {
  fill: color-mix(in srgb, var(--atlas-primary) 18%, transparent);
  stroke: var(--atlas-primary);
  stroke-width: 2;
  animation: atlas-pulse 2s ease-out infinite;
}
.atlas-user-marker circle:last-child {
  fill: var(--atlas-primary);
  stroke: #fff;
  stroke-width: 3;
}
.atlas-user-marker text {
  fill: #fff;
  font-size: 10px;
  font-weight: 900;
  text-anchor: middle;
  dominant-baseline: central;
}
@keyframes atlas-route {
  to {
    stroke-dashoffset: -20;
  }
}
@keyframes atlas-pulse {
  0% {
    r: 10;
    opacity: 1;
  }
  70%,
  100% {
    r: 28;
    opacity: 0;
  }
}
.atlas-map-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #f8fafbe8;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  justify-content: center;
  color: #47546a;
  font-size: 12px;
  transition: 0.2s;
}
.atlas-map-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.atlas-spinner {
  width: 29px;
  height: 29px;
  border: 3px solid #d7dee6;
  border-top-color: var(--atlas-primary);
  border-radius: 50%;
  animation: atlas-spin 0.85s linear infinite;
}
@keyframes atlas-spin {
  to {
    transform: rotate(360deg);
  }
}
.atlas-tooltip {
  position: absolute;
  z-index: 12;
  display: none;
  max-width: 220px;
  pointer-events: none;
  background: #17233b;
  color: #fff;
  border-radius: 9px;
  padding: 8px 10px;
  font-size: 10px;
  box-shadow: 0 7px 18px #17233b33;
}
.atlas-results {
  min-height: calc(var(--atlas-map-height) + 47px);
  overflow: hidden;
}
.atlas-empty {
  min-height: calc(var(--atlas-map-height) + 45px);
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #8490a1;
}
.atlas-empty img {
  width: min(160px, 70%);
  max-height: 210px;
  object-fit: contain;
  margin-bottom: 13px;
}
.atlas-empty h3 {
  max-width: 280px;
  margin: 8px 0 6px;
  color: var(--atlas-secondary);
  font-size: 25px;
  line-height: 1.08;
}
.atlas-empty p {
  max-width: 280px;
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}
.atlas-result-head {
  position: relative;
  padding: 24px 22px;
  background: linear-gradient(
    135deg,
    var(--atlas-secondary),
    color-mix(in srgb, var(--atlas-secondary) 78%, #fff)
  );
  color: #fff;
  overflow: hidden;
}
.atlas-result-head.has-character {
  padding-right: 105px;
  min-height: 130px;
}
.atlas-result-head > img {
  position: absolute;
  right: 8px;
  bottom: -5px;
  width: 92px;
  max-height: 125px;
  object-fit: contain;
}
.atlas-result-head .atlas-kicker {
  color: var(--atlas-accent);
}
.atlas-result-head h2 {
  margin: 5px 0;
  font-size: 23px;
  line-height: 1.05;
}
.atlas-result-head p {
  margin: 0;
  color: #c4cede;
  font-size: 11px;
}
.atlas-results-body {
  padding: 18px;
  max-height: calc(var(--atlas-map-height) - 85px);
  overflow: auto;
}
.atlas-site-card {
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid #dce3ea;
  border-radius: 15px;
  background: #fff;
}
.atlas-site-card img {
  display: block;
  width: 100%;
  height: 170px;
  object-fit: cover;
}
.atlas-site-card-body {
  padding: 14px;
}
.atlas-site-card h3 {
  margin: 0 0 5px;
  color: var(--atlas-secondary);
  font-size: 18px;
}
.atlas-site-card p {
  margin: 4px 0;
  color: #6c788a;
  font-size: 11px;
  line-height: 1.45;
}
.atlas-site-card a,
.atlas-result-card a {
  display: inline-flex;
  margin-top: 9px;
  color: var(--atlas-primary);
  font-size: 10px;
  font-weight: 850;
  text-decoration: none;
}
.atlas-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.atlas-stat {
  padding: 12px;
  border: 1px solid #e0e5ea;
  border-radius: 11px;
  background: #fafbfc;
}
.atlas-stat b {
  display: block;
  color: var(--atlas-primary);
  font-size: 18px;
}
.atlas-stat span {
  font-size: 9px;
  color: #7b8798;
}
.atlas-section-title {
  margin: 18px 0 8px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #7d899a;
}
.atlas-result-card {
  margin-bottom: 8px;
  padding: 12px;
  border: 1px solid #dee4e9;
  border-left: 3px solid var(--atlas-primary);
  border-radius: 11px;
  background: #fff;
}
.atlas-result-card h4 {
  margin: 0 0 5px;
  color: #27354b;
  font-size: 13px;
}
.atlas-result-card p {
  margin: 4px 0;
  color: #6f7b8e;
  font-size: 11px;
  line-height: 1.45;
}
.atlas-result-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}
.atlas-result-card .meta span {
  padding: 4px 7px;
  border-radius: 999px;
  background: #f0f3f6;
  color: #687487;
  font-size: 9px;
}
.atlas-question,
.atlas-layer-note {
  margin-bottom: 8px;
  padding: 11px 12px;
  border: 1px solid #efda83;
  border-radius: 10px;
  background: #fff8dd;
  font-size: 11px;
  line-height: 1.45;
}
.atlas-layer-note.culture {
  border-color: #cdbdec;
  background: #f5f0ff;
}
.atlas-layer-note.presence {
  border-color: #aed9d3;
  background: #effaf8;
}
.atlas-layer-note.connection {
  border-color: #ecd36d;
  background: #fff8da;
}
.atlas-result-section.layer-hidden,
.atlas-result-card.layer-hidden {
  display: none;
}
.atlas-message {
  position: fixed;
  z-index: 99999;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  max-width: min(460px, calc(100vw - 30px));
  padding: 11px 16px;
  border-radius: 11px;
  background: #17233b;
  color: #fff;
  box-shadow: 0 12px 32px #17233b55;
  font-size: 12px;
  transition: 0.2s;
}
.atlas-message.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.atlas-message.error {
  background: #a92338;
}
.atlas-debug {
  margin: 0 16px 16px;
  padding: 12px;
  border-radius: 10px;
  background: #111b2e;
  color: #dce5f1;
}
.atlas-debug pre {
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 10px;
}
.atlas-mobile-layer-label {
  display: none;
}
.lab-atlas-unavailable {
  padding: 18px;
  border: 1px solid #e2b3b8;
  border-radius: 10px;
  background: #fff4f5;
  color: #842331;
}
@media (max-width: 980px) {
  .atlas-workspace {
    grid-template-columns: 1fr;
  }
  .atlas-results {
    min-height: 0;
  }
  .atlas-empty {
    min-height: 300px;
  }
  .atlas-results-body {
    max-height: none;
  }
  .atlas-map-stage {
    height: var(--atlas-mobile-map-height);
  }
  .atlas-layer-dock {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding: 2px 1px 5px;
    scrollbar-width: none;
  }
  .atlas-layer-dock::-webkit-scrollbar {
    display: none;
  }
  .atlas-layer-dock button {
    min-height: 46px;
  }
  .atlas-map-head {
    max-width: 70%;
  }
  .atlas-results {
    border-radius: var(--atlas-radius);
  }
  .atlas-result-head.has-character {
    min-height: 115px;
  }
  .atlas-mobile-layer-label {
    display: block;
    padding: 0 16px 12px;
    color: #738096;
    font-size: 10px;
  }
}
@media (max-width: 680px) {
  .lab-atlas {
    border-radius: 14px;
    box-shadow: none;
  }
  .atlas-topbar {
    padding: 11px 14px;
    flex-wrap: wrap;
  }
  .atlas-brand {
    min-width: 0;
  }
  .atlas-brand b {
    font-size: 14px;
  }
  .atlas-status {
    margin-left: auto;
  }
  .atlas-profile-switch {
    order: 3;
    width: 100%;
  }
  .atlas-profile-switch button {
    flex: 1;
    min-height: 40px;
  }
  .atlas-hero {
    min-height: 0;
    padding: 24px 20px 108px;
  }
  .atlas-hero h2 {
    font-size: 30px;
  }
  .atlas-hero p {
    font-size: 12px;
  }
  .atlas-hero-character {
    right: 18px;
    bottom: -8px;
    width: 92px;
    max-height: 112px;
  }
  .atlas-search-row {
    display: grid;
    align-items: stretch;
  }
  .atlas-search-row form {
    width: 100%;
  }
  .atlas-search-row input,
  .atlas-search-row form button,
  .atlas-locate {
    height: 50px;
  }
  .atlas-locate {
    justify-content: center;
    width: 100%;
  }
  .atlas-workspace {
    gap: 10px;
    padding: 10px;
  }
  .atlas-map-card {
    border-radius: 16px;
  }
  .atlas-map-stage {
    height: var(--atlas-mobile-map-height);
  }
  .atlas-map-head {
    top: 14px;
    left: 15px;
    max-width: 68%;
  }
  .atlas-map-head h1 {
    font-size: 20px;
  }
  .atlas-map-head p {
    display: none;
  }
  .atlas-map-actions {
    top: 12px;
    right: 12px;
  }
  .atlas-map-actions button {
    width: 42px;
    height: 42px;
  }
  .atlas-layer-dock button {
    grid-template-columns: 28px auto;
    padding: 7px 9px;
  }
  .atlas-layer-dock button small {
    display: none;
  }
  .atlas-map-foot {
    padding: 8px 11px;
  }
  .atlas-map-foot > span {
    max-width: 70%;
  }
  .atlas-empty {
    min-height: 280px;
    padding: 24px;
  }
  .atlas-empty img {
    width: 120px;
    max-height: 150px;
  }
  .atlas-results {
    border-radius: 16px;
  }
  .atlas-results-body {
    padding: 14px;
  }
  .atlas-site-card img {
    height: 190px;
  }
  .atlas-message {
    bottom: 14px;
  }
  .atlas-district {
    stroke-width: 2.8;
  }
}
@media (max-width: 420px) {
  .atlas-hero h2 {
    font-size: 27px;
  }
  .atlas-brand-box {
    font-size: 10px;
  }
  .atlas-status {
    width: 100%;
    margin: 0;
  }
  .atlas-map-stage {
    height: max(380px, var(--atlas-mobile-map-height));
  }
  .atlas-layer-dock button b {
    font-size: 9px;
  }
  .atlas-result-head h2 {
    font-size: 21px;
  }
}

/* 0.6.0 · Integración contractual Motor 2.0 */
.atlas-contract-group + .atlas-contract-group{margin-top:18px}.atlas-contract-group>h3{margin:0 0 10px;font-size:1rem;color:var(--atlas-secondary)}.atlas-result-card{overflow:hidden}.atlas-result-image{display:block;width:100%;max-height:180px;object-fit:cover}.atlas-result-card-body{padding:0}.atlas-result-benefit{font-weight:700}.atlas-result-explanation{font-size:.92em;opacity:.82}

/* 0.8.0 · Ajuste visual público: mapa prioritario, tabs inferiores y resultados */
.atlas-map-card{display:flex;flex-direction:column;min-width:0;background:var(--atlas-surface)}
.atlas-map-stage{order:1;min-height:560px}
.atlas-map-foot{order:2}
.atlas-layer-dock{order:3;position:static;inset:auto;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:0;border-top:1px solid rgba(30,75,154,.14);background:#fff;box-shadow:none;overflow:visible;z-index:4}
.atlas-layer-dock button{min-width:0;border:0;border-right:1px solid rgba(30,75,154,.12);border-radius:0;padding:14px 12px;display:grid;grid-template-columns:34px minmax(0,1fr);grid-template-rows:auto auto;text-align:left;background:#fff;color:var(--atlas-primary);box-shadow:none;transition:background .18s ease,color .18s ease,transform .18s ease}
.atlas-layer-dock button:last-child{border-right:0}
.atlas-layer-dock button>span{grid-row:1/3;width:30px;height:30px;border-radius:10px;background:rgba(30,75,154,.09);color:var(--atlas-primary)}
.atlas-layer-dock button b{font-size:12px;line-height:1.15;letter-spacing:0}
.atlas-layer-dock button small{font-size:9px;line-height:1.25;opacity:.68;white-space:normal}
.atlas-layer-dock button:hover{background:#f4f7fc;transform:none}
.atlas-layer-dock button[aria-pressed="true"]{background:var(--atlas-primary);color:#fff}
.atlas-layer-dock button[aria-pressed="true"]>span{background:rgba(255,255,255,.18);color:#fff}
.atlas-map-actions{top:18px;right:18px;gap:8px}
.atlas-map-actions button{box-shadow:0 8px 22px rgba(14,46,103,.14)}
.atlas-map-mode-switch{top:18px;right:78px}
.atlas-map-card:fullscreen,.atlas-map-card.is-fullscreen{width:100vw;height:100vh;max-width:none;border-radius:0;background:#eef3f8;padding:0}
.atlas-map-card:fullscreen .atlas-map-stage,.atlas-map-card.is-fullscreen .atlas-map-stage{flex:1;height:auto;min-height:0}
.atlas-map-card:fullscreen .atlas-map-foot,.atlas-map-card.is-fullscreen .atlas-map-foot{display:none}
.atlas-map-card:fullscreen .atlas-layer-dock,.atlas-map-card.is-fullscreen .atlas-layer-dock{grid-template-columns:repeat(4,minmax(150px,1fr))}
.atlas-map-card:fullscreen .atlas-map-actions,.atlas-map-card.is-fullscreen .atlas-map-actions{position:fixed;z-index:10002}
.atlas-map-card:fullscreen .atlas-map-mode-switch,.atlas-map-card.is-fullscreen .atlas-map-mode-switch{position:fixed;z-index:10002}

.atlas-result-head{padding:24px 26px 20px;min-height:126px;background:linear-gradient(135deg,var(--atlas-primary),#416bb5)}
.atlas-result-head.has-character{padding-right:116px}
.atlas-result-head h2{font-size:24px;line-height:1.08;margin-top:6px;color:#fff}
.atlas-result-head p{margin-top:7px;color:rgba(255,255,255,.84)}
.atlas-results-body{padding:18px;background:#f7f9fc}
.atlas-site-card{border:1px solid rgba(30,75,154,.13);box-shadow:0 8px 24px rgba(16,47,101,.07)}
.atlas-result-section{margin-top:16px;padding:16px;border:1px solid rgba(30,75,154,.12);border-radius:16px;background:#fff;box-shadow:0 6px 18px rgba(16,47,101,.05)}
.atlas-section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--atlas-primary)}
.atlas-contract-group+ .atlas-contract-group{margin-top:18px;padding-top:18px;border-top:1px solid rgba(30,75,154,.1)}
.atlas-contract-group>h3{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px;font-size:15px;color:var(--atlas-primary)}
.atlas-group-count{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:24px;padding:0 8px;border-radius:999px;background:var(--atlas-primary);color:#fff;font-size:11px}
.atlas-result-card{display:grid;grid-template-columns:minmax(0,1fr);gap:0;margin-top:10px;border:1px solid rgba(30,75,154,.11);border-radius:14px;background:#fff;box-shadow:none;transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease}
.atlas-result-card:hover{border-color:rgba(30,75,154,.3);box-shadow:0 8px 22px rgba(16,47,101,.08);transform:translateY(-1px)}
.atlas-result-card-body{padding:14px 15px}
.atlas-result-card h4{font-size:15px;line-height:1.25;color:var(--atlas-primary)}
.atlas-result-card p{font-size:12px;line-height:1.5;color:#536276}
.atlas-result-card .meta{gap:6px;margin-top:10px}
.atlas-result-card .meta span{background:#eef3fa;color:#31558f;border-radius:999px;padding:5px 8px}
.atlas-result-card a{display:inline-flex;margin-top:10px;color:var(--atlas-accent);font-weight:700}
.atlas-stat-grid{display:none}

@media (max-width:900px){
  .atlas-map-stage{min-height:var(--atlas-mobile-map-height)}
  .atlas-layer-dock{grid-template-columns:repeat(2,minmax(0,1fr))}
  .atlas-layer-dock button:nth-child(2){border-right:0}
  .atlas-layer-dock button:nth-child(-n+2){border-bottom:1px solid rgba(30,75,154,.12)}
  .atlas-map-mode-switch{right:72px}
}
@media (max-width:520px){
  .atlas-layer-dock{grid-template-columns:1fr 1fr}
  .atlas-layer-dock button{padding:11px 9px;grid-template-columns:28px minmax(0,1fr)}
  .atlas-layer-dock button>span{width:26px;height:26px}
  .atlas-layer-dock button small{display:none}
  .atlas-map-actions{top:10px;right:10px;gap:6px}
  .atlas-map-actions button{width:40px;height:40px}
  .atlas-map-mode-switch{top:10px;left:10px;right:auto}
  .atlas-results-body{padding:12px}
  .atlas-result-section{padding:13px;border-radius:14px}
}
