body.atlas-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% -8%, rgba(27, 108, 83, .52), transparent 33rem),
    radial-gradient(circle at -5% 58%, rgba(15, 77, 63, .3), transparent 37rem),
    #04110d;
}

body.atlas-page::before {
  content: "";
  position: fixed;
  z-index: -2;
  inset: 0;
  pointer-events: none;
  opacity: .25;
  background-image:
    linear-gradient(rgba(103, 232, 175, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(103, 232, 175, .05) 1px, transparent 1px);
  background-size: 3rem 3rem;
  mask-image: linear-gradient(to bottom, #000, transparent 86%);
}

.atlas-header,
.atlas-shell,
.atlas-footer {
  width: min(92rem, calc(100% - 2.5rem));
}

.atlas-back-link {
  min-height: 2.8rem;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .6rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #b8d0c6;
  background: rgba(8, 27, 21, .82);
  font-size: .82rem;
  font-weight: 800;
  text-decoration: none;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.atlas-back-link:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: rgba(20, 58, 45, .74);
  transform: translateY(-1px);
}

.atlas-back-link svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.atlas-shell {
  margin-inline: auto;
  padding: 2.5rem 0 5rem;
}

.atlas-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 2rem;
  padding: 1.2rem .25rem 2rem;
}

.atlas-intro h1 {
  max-width: 13ch;
  margin: .55rem 0 .8rem;
  font-size: clamp(3rem, 7vw, 6.4rem);
  line-height: .92;
  letter-spacing: -.07em;
  text-wrap: balance;
}

.atlas-intro p:last-child {
  max-width: 42rem;
  margin: 0;
  color: #9fbbb0;
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.6;
}

.atlas-intro p strong { color: #dff5eb; }

.atlas-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .7rem 1rem;
  color: #718f83;
  font-size: .72rem;
  font-weight: 750;
}

.atlas-hint span {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

.atlas-hint kbd {
  min-width: 1.55rem;
  min-height: 1.55rem;
  display: inline-grid;
  place-items: center;
  padding: .15rem .35rem;
  border: 1px solid rgba(109, 235, 181, .2);
  border-bottom-color: rgba(109, 235, 181, .34);
  border-radius: .38rem;
  color: #a9c8bb;
  background: rgba(12, 39, 30, .86);
  box-shadow: 0 2px rgba(0, 0, 0, .28);
  font: inherit;
}

.atlas-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(107, 233, 179, .22);
  border-radius: 1.7rem;
  background: rgba(7, 26, 20, .92);
  box-shadow: 0 2rem 6rem rgba(0, 0, 0, .38), inset 0 1px rgba(225, 255, 241, .05);
}

.atlas-toolbar {
  min-height: 4.6rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 30, 23, .96);
}

.atlas-control-group {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.atlas-control,
.atlas-zoom-level,
.atlas-position {
  min-height: 2.9rem;
  border: 1px solid rgba(109, 235, 181, .17);
  border-radius: .82rem;
  background: rgba(2, 18, 13, .46);
}

.atlas-control {
  min-width: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .55rem .72rem;
  color: #b2cdc1;
  cursor: pointer;
  transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.atlas-control:hover:not(:disabled) {
  color: var(--green-bright);
  border-color: rgba(109, 235, 181, .39);
  background: rgba(38, 99, 73, .28);
  transform: translateY(-1px);
}

.atlas-control:disabled {
  cursor: not-allowed;
  opacity: .38;
}

.atlas-control svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.atlas-control-wide { padding-inline: .85rem; }

.atlas-zoom-level {
  min-width: 4.2rem;
  display: inline-grid;
  place-items: center;
  padding: .55rem .7rem;
  color: #dff4eb;
  font-size: .8rem;
  font-weight: 850;
}

.atlas-position {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-inline: auto;
  padding: .55rem .85rem;
  color: #729287;
  font-size: .72rem;
  font-weight: 720;
}

.fullscreen-exit-icon { display: none; }
.atlas-panel.is-fullscreen .fullscreen-enter-icon { display: none; }
.atlas-panel.is-fullscreen .fullscreen-exit-icon { display: block; }

.atlas-layers {
  display: grid;
  grid-template-columns: minmax(11rem, .62fr) minmax(0, 2.4fr);
  gap: .65rem 1rem;
  padding: .8rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 8% 20%, rgba(242, 201, 94, .09), transparent 28%),
    rgba(5, 24, 18, .96);
}

.atlas-layers-heading {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
  padding-inline: .25rem;
}

.atlas-layers-heading h2 {
  margin: 0;
  color: #e6f9f0;
  font-size: .88rem;
  letter-spacing: -.01em;
}

.atlas-layers-heading p {
  margin: .16rem 0 0;
  color: #77978a;
  font-size: .66rem;
  line-height: 1.35;
}

.atlas-layers-spark {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(242, 201, 94, .28);
  border-radius: .75rem;
  color: var(--gold);
  background: rgba(242, 201, 94, .08);
  box-shadow: 0 0 1.3rem rgba(242, 201, 94, .09);
  animation: atlas-layer-spark 3.6s ease-in-out infinite;
}

.atlas-layer-options {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.atlas-layer-option {
  position: relative;
  min-width: 0;
  min-height: 3.65rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .62rem;
  padding: .55rem .65rem;
  overflow: hidden;
  border: 1px solid rgba(116, 237, 186, .15);
  border-radius: .9rem;
  background: rgba(2, 15, 11, .52);
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease, transform .2s ease, opacity .2s ease;
}

.atlas-layer-option:hover:not(.is-unavailable) {
  border-color: rgba(116, 237, 186, .36);
  background: rgba(29, 79, 59, .28);
  transform: translateY(-1px);
}

.atlas-layer-option:focus-within {
  box-shadow: 0 0 0 2px var(--gold);
}

.atlas-layer-option.is-on {
  border-color: rgba(108, 238, 183, .31);
  background: linear-gradient(135deg, rgba(40, 112, 81, .3), rgba(7, 30, 22, .54));
}

.atlas-layer-option.is-loading,
.atlas-layer-option.is-unavailable {
  cursor: not-allowed;
  opacity: .52;
}

.atlas-layer-option input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: inherit;
}

.atlas-layer-icon {
  width: 2.15rem;
  height: 2.15rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(117, 237, 187, .17);
  border-radius: .7rem;
  color: #8ab7a5;
  background: rgba(93, 218, 164, .06);
  transition: color .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.atlas-layer-icon svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.atlas-layer-icon.is-base svg path { fill: currentColor; stroke-width: 1.2; }

.atlas-layer-option.is-on .atlas-layer-icon.is-base {
  color: #69edb5;
  border-color: rgba(105, 237, 181, .32);
  background: rgba(105, 237, 181, .1);
  box-shadow: 0 0 1rem rgba(105, 237, 181, .1);
}

.atlas-layer-option.is-on .atlas-layer-icon.is-discovery {
  color: var(--gold);
  border-color: rgba(242, 201, 94, .32);
  background: rgba(242, 201, 94, .09);
  box-shadow: 0 0 1rem rgba(242, 201, 94, .08);
}

.atlas-layer-option.is-on .atlas-layer-icon.is-fog {
  color: #79ddf1;
  border-color: rgba(121, 221, 241, .3);
  background: rgba(121, 221, 241, .08);
  box-shadow: 0 0 1rem rgba(121, 221, 241, .08);
}

.atlas-layer-copy {
  min-width: 0;
  display: block;
}

.atlas-layer-copy strong,
.atlas-layer-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.atlas-layer-copy strong {
  color: #cfe7dc;
  font-size: .74rem;
  line-height: 1.25;
}

.atlas-layer-copy small {
  margin-top: .18rem;
  color: #6f9284;
  font-size: .61rem;
}

.atlas-switch {
  position: relative;
  width: 1.9rem;
  height: 1.08rem;
  flex: 0 0 auto;
  border: 1px solid rgba(134, 180, 160, .24);
  border-radius: 999px;
  background: rgba(2, 12, 9, .76);
  transition: border-color .2s ease, background .2s ease;
}

.atlas-switch i {
  position: absolute;
  top: .16rem;
  left: .17rem;
  width: .66rem;
  height: .66rem;
  border-radius: 50%;
  background: #6f8d80;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .34);
  transition: translate .2s ease, background .2s ease;
}

.atlas-layer-option input:checked ~ .atlas-switch {
  border-color: rgba(105, 237, 181, .48);
  background: rgba(48, 161, 113, .35);
}

.atlas-layer-option input:checked ~ .atlas-switch i {
  translate: .78rem 0;
  background: #78f2bd;
}

.atlas-layers-status {
  grid-column: 2;
  margin: 0;
  padding-inline: .1rem;
  color: #729486;
  font-size: .62rem;
  line-height: 1.4;
}

.atlas-viewport {
  position: relative;
  height: clamp(32rem, 72vh, 55rem);
  min-height: 24rem;
  overflow: hidden;
  outline: none;
  cursor: grab;
  touch-action: none;
  user-select: none;
  background:
    radial-gradient(circle at center, rgba(18, 73, 57, .28), transparent 46%),
    linear-gradient(rgba(94, 217, 165, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 217, 165, .035) 1px, transparent 1px),
    #020b08;
  background-size: auto, 2rem 2rem, 2rem 2rem, auto;
}

.atlas-viewport:focus-visible {
  box-shadow: inset 0 0 0 3px var(--gold);
}

.atlas-viewport.is-dragging { cursor: grabbing; }

#map-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.atlas-panel.is-fullscreen,
.atlas-panel:fullscreen {
  --atlas-toolbar-height: 4.6rem;
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  border: 0;
  border-radius: 0;
  background: #020b08;
  display: flex;
  flex-direction: column;
}

.atlas-panel.is-fullscreen .atlas-viewport,
.atlas-panel:fullscreen .atlas-viewport {
  height: auto;
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
}

.atlas-panel.is-fullscreen .atlas-toolbar,
.atlas-panel.is-fullscreen .atlas-layers,
.atlas-panel:fullscreen .atlas-toolbar,
.atlas-panel:fullscreen .atlas-layers {
  flex: 0 0 auto;
}

.atlas-compass {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(126, 239, 193, .2);
  border-radius: 50%;
  color: rgba(202, 244, 225, .75);
  background: rgba(2, 15, 11, .64);
  box-shadow: 0 .5rem 1.4rem rgba(0, 0, 0, .28);
  backdrop-filter: blur(8px);
}

.atlas-compass span {
  position: absolute;
  top: .3rem;
  font-size: .55rem;
  font-weight: 900;
}

.atlas-compass i {
  width: 0;
  height: 0;
  margin-top: .25rem;
  border-right: .28rem solid transparent;
  border-bottom: .8rem solid var(--green);
  border-left: .28rem solid transparent;
  filter: drop-shadow(0 0 5px rgba(102, 235, 181, .5));
}

.atlas-loading,
.atlas-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
  background: rgba(2, 12, 9, .84);
  backdrop-filter: blur(6px);
}

.atlas-viewport.is-ready .atlas-loading { display: none; }
.atlas-loading[hidden] { display: none; }
.atlas-error[hidden] { display: none; }

.atlas-spinner {
  width: 3.1rem;
  height: 3.1rem;
  margin-bottom: 1rem;
  border: 2px solid rgba(107, 235, 181, .13);
  border-top-color: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 1.2rem rgba(102, 235, 181, .18);
  animation: atlas-spin 1s linear infinite;
}

.atlas-loading strong,
.atlas-error strong {
  font-size: 1.05rem;
}

.atlas-loading small {
  margin-top: .35rem;
  color: #78978a;
}

.atlas-error { color: #ffc2c8; }

.atlas-error-icon {
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  margin-bottom: .85rem;
  border: 1px solid rgba(255, 128, 143, .35);
  border-radius: 50%;
  background: rgba(115, 32, 45, .32);
  font-weight: 900;
}

.atlas-error p {
  margin: .35rem 0 1rem;
  color: #a88689;
}

.atlas-error button {
  min-height: 2.8rem;
  padding: .6rem 1rem;
  border: 1px solid rgba(255, 128, 143, .32);
  border-radius: .8rem;
  color: #ffe8ea;
  background: rgba(111, 37, 48, .5);
  cursor: pointer;
  font-weight: 800;
}

.atlas-attribution {
  position: absolute;
  right: .65rem;
  bottom: .65rem;
  padding: .35rem .5rem;
  border: 1px solid rgba(113, 230, 180, .12);
  border-radius: .5rem;
  color: rgba(183, 210, 198, .65);
  background: rgba(1, 10, 7, .68);
  font-size: .61rem;
  backdrop-filter: blur(6px);
}

.atlas-attribution a { color: rgba(138, 235, 195, .86); }

.atlas-notes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.atlas-notes article {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: var(--panel);
}

.atlas-note-icon {
  width: 2.7rem;
  height: 2.7rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: .85rem;
  color: var(--green);
  background: rgba(105, 235, 181, .08);
}

.atlas-note-icon.is-gold {
  color: var(--gold);
  background: rgba(242, 201, 94, .08);
}

.atlas-notes strong { display: block; }

.atlas-notes p {
  margin: .35rem 0 0;
  color: #779589;
  font-size: .8rem;
  line-height: 1.55;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes atlas-spin { to { rotate: 360deg; } }

@keyframes atlas-layer-spark {
  0%, 100% { transform: rotate(-4deg) scale(1); }
  50% { transform: rotate(4deg) scale(1.06); }
}

@media (max-width: 50rem) {
  .atlas-intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .atlas-hint { justify-content: flex-start; }
  .atlas-position { display: none; }
  .atlas-toolbar { justify-content: space-between; }
  .atlas-layers { grid-template-columns: 1fr; }
  .atlas-layers-status { grid-column: 1; }
  .atlas-notes { grid-template-columns: 1fr; }
}

@media (max-width: 38rem) {
  .atlas-header,
  .atlas-shell,
  .atlas-footer { width: min(100% - 1.25rem, 92rem); }

  .atlas-back-link {
    width: 2.8rem;
    justify-content: center;
    padding: 0;
  }

  .atlas-back-link span { display: none; }

  .atlas-shell { padding-top: 1rem; }
  .atlas-intro { padding-top: .7rem; }
  .atlas-intro h1 { font-size: clamp(2.8rem, 14vw, 4.25rem); }
  .atlas-hint { display: none; }

  .atlas-panel { border-radius: 1.25rem; }
  .atlas-toolbar { min-height: 4rem; padding: .55rem; }
  .atlas-layers { gap: .55rem; padding: .65rem; }
  .atlas-layers-heading p { display: none; }
  .atlas-layer-options {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .2rem;
    scroll-snap-type: x proximity;
    scrollbar-color: rgba(105, 237, 181, .26) transparent;
  }
  .atlas-layer-option {
    min-width: 12.2rem;
    min-height: 3.35rem;
    scroll-snap-align: start;
  }
  .atlas-control,
  .atlas-zoom-level { min-height: 2.65rem; }
  .atlas-control { min-width: 2.65rem; }
  .atlas-control-wide { width: 2.65rem; padding: 0; }
  .atlas-control-wide span { display: none; }
  .atlas-zoom-level { min-width: 3.5rem; }
  .atlas-viewport { height: min(67vh, 38rem); min-height: 29rem; }
  .atlas-panel.is-fullscreen,
  .atlas-panel:fullscreen {
    --atlas-toolbar-height: 4rem;
  }
  .atlas-panel.is-fullscreen .atlas-viewport,
  .atlas-panel:fullscreen .atlas-viewport {
    height: auto;
    min-height: 0;
  }
  .atlas-compass { width: 2.65rem; height: 2.65rem; }
  .atlas-notes article { padding: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .atlas-spinner,
  .atlas-layers-spark { animation: none !important; }
  .atlas-back-link,
  .atlas-control,
  .atlas-layer-option,
  .atlas-layer-icon,
  .atlas-switch,
  .atlas-switch i { transition: none; }
}
