.atlas-page { width: min(94%, 1430px); }
.atlas-page .page-heading { padding-block: .85rem 0; margin-bottom: clamp(.9rem, 1.9vw, 1.65rem); }
.atlas-page .page-heading::after { display: none; }
.atlas-page .page-heading h1 { font-size: clamp(2.65rem, 6vw, 5.1rem); overflow-wrap: anywhere; }
.atlas-page .page-heading p { max-width: 87ch; margin-top: .48rem; }
.atlas {
  --map-height: clamp(420px, 63svh, 720px);
  --atlas-line: #60496f;
  --atlas-surface: #211830;
  --atlas-input: #150f24;
  --atlas-ink: #fff3f6;
  --atlas-soft: #d7c7df;
  --accent: var(--mint);
  --accent-ink: #142a2f;
  scroll-margin-top: 1rem;
}
.atlas-workbench {
  min-width: 0;
  padding: clamp(.52rem, 1.5vw, .95rem);
  border: 1px solid #6f527c;
  border-top: 3px solid transparent;
  border-radius: 1.25rem 1.25rem .55rem 1.25rem;
  background: linear-gradient(160deg, #332544, #231833 35%, #21192f) padding-box,
    var(--coastline) border-box;
  box-shadow: 0 20px 60px #0e091bb6;
}
.atlas-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) max-content max-content; gap: .55rem; }
.atlas-search {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: .6rem;
  padding: 0 .76rem;
  border: 1px solid var(--atlas-line);
  border-radius: .75rem;
  background: var(--atlas-input);
  color: var(--mint);
}
.atlas-search:focus-within { outline: 2px solid var(--mint); outline-offset: -2px; }
.atlas-search svg { flex: 0 0 auto; }
.atlas-search input[type="search"] {
  width: 100%; min-width: 0; min-height: 46px; padding: 0;
  background: transparent; border: 0; color: var(--atlas-ink); font-size: 1rem;
  outline: 0;
}
.atlas-search input::placeholder { color: #bcaecb; }
.atlas-control, .atlas-chip, .atlas-next, .atlas-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  min-height: 44px;
  padding: 0 .72rem;
  border: 1px solid var(--atlas-line);
  border-radius: .65rem;
  color: var(--atlas-ink);
  background: var(--atlas-surface);
  font-weight: 670;
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.atlas-control:not(:disabled):hover, .atlas-chip:not(:disabled):hover,
.atlas-next:not(:disabled):hover, .atlas-more:hover {
  border-color: var(--mint);
  color: var(--mint);
  background: #312843;
  box-shadow: 0 4px 16px #0a07168c;
  transform: translateY(-1px);
}
.atlas-control:disabled, .atlas-chip:disabled, .atlas-next:disabled { opacity: .56; cursor: default; }
.atlas-filter-button output {
  min-width: 1.55rem; padding: .08rem .23rem; border-radius: 5rem;
  background: var(--mint); color: #20192d; font-weight: 800;
}
.atlas-quick {
  display: flex; gap: .42rem; margin-block: .55rem .65rem; padding: .15rem 0 .35rem;
  overflow: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; scrollbar-color: #785b88 #21182e;
}
.atlas-chip { flex: 0 0 auto; min-height: 42px; border-radius: 12rem; white-space: nowrap; padding-inline: .78rem; text-decoration: none; }
.atlas-chip svg { color: var(--pin-color); flex: 0 0 auto; }
[data-atlas-category="safe"], [data-kind="safe"] { --pin-color: #ff8cb4; }
[data-atlas-category="garage"] { --pin-color: #75f3d9; }
[data-atlas-category="card"] { --pin-color: #ffd484; }
[data-atlas-category="waink"] { --pin-color: #b3e989; }
[data-atlas-category="drone"], [data-kind="drone"] { --pin-color: #a9bdff; }
[data-atlas-category="vehicle"] { --pin-color: #83e4f0; }
[data-atlas-category="treasure"] { --pin-color: #ffaf7b; }
[data-kind="range"] { --pin-color: #dcc6ff; }
[data-kind="landmark"] { --pin-color: #8af3d9; }
.atlas-chip[aria-current] { background: #343148; border-color: var(--pin-color, var(--mint)); color: #e7fff8; }
.atlas-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, .34fr); gap: .65rem; }
.atlas-stage {
  min-width: 0; height: var(--map-height);
  overflow: hidden; position: relative; isolation: isolate;
  border: 1px solid #765887; border-radius: .82rem .82rem .4rem .82rem;
  background: #0e1422;
}
.atlas-grade { position: absolute; pointer-events: none; overflow: hidden; }
.atlas-canvas {
  position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%;
  background: #0e1422; font: inherit; outline: none;
}
.atlas-canvas:focus-visible { outline: 2px solid var(--mint); outline-offset: -3px; }
.atlas-canvas img.leaflet-tile { max-width: none; }
.atlas-canvas .leaflet-tile-pane { filter: url("#atlas-vice-grade"); }
.atlas-map-controls { position: absolute; inset: .72rem .72rem auto auto; z-index: 2; display: grid; gap: .35rem; }
.atlas-map-controls .atlas-control {
  width: 44px; height: 44px; padding: 0; font-size: 1.35rem;
  background: #211832f4; color: #fff6f9; box-shadow: 0 4px 14px #110c24aa;
}
.atlas-map-cluster span {
  display: grid; place-items: center; width: 100%; height: 100%;
  border-radius: 50%; border: 2px solid var(--pin-color);
  color: #fff3f6; background: #22213bf0; font-weight: 800;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--pin-color) 20%, transparent), 0 5px 17px #091121bb;
  transition: scale .16s ease;
}
.atlas-map-cluster:hover span { scale: 1.13; }
.atlas-pin-body {
  display: grid; place-items: center; position: relative; width: 29px; height: 29px; margin: 1px auto;
  border: 1.5px solid var(--pin-color); border-radius: .51rem .51rem .32rem .51rem;
  color: var(--pin-color); background: #1d1732; box-shadow: 0 3px 11px #090713c9;
  transition: scale .16s ease, box-shadow .16s ease;
}
.atlas-pin-body::after {
  content: ''; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px;
  transform: translateX(-50%) rotate(45deg); background: inherit; border: solid var(--pin-color); border-width: 0 1.5px 1.5px 0;
}
.atlas-pin-body svg { width: 18px; height: 18px; }
.atlas-map-pin:hover .atlas-pin-body { scale: 1.14; box-shadow: 0 0 16px color-mix(in srgb, var(--pin-color) 45%, transparent); }
.atlas-map-found { opacity: .53; }
.atlas-map-selected .atlas-pin-body {
  width: 36px; height: 36px; border-color: #fff3f6; background: var(--pin-color); color: #29172c;
  box-shadow: 0 0 0 4px #ffb9cf43, 0 4px 24px #ff94bd88;
}
.atlas-map-selected .atlas-pin-body::after { border-color: #fff3f6; }
.atlas-map-selected svg { width: 23px; height: 23px; }
.atlas-load {
  position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center;
  gap: .75rem; padding: .7rem; text-align: center;
  color: #fff1f6; background: radial-gradient(ellipse at 42% 60%, #302243, #151226 75%);
}
.atlas-credit {
  position: absolute; z-index: 2; inset: auto auto .44rem .5rem;
  display: flex; flex-wrap: wrap; column-gap: .62rem;
  padding: .18rem .48rem; border: 1px solid #927aac45; border-radius: .43rem;
  background: #151228ec; color: #ded0e6; line-height: 1.45; font-size: 1rem;
}
.atlas-credit a { text-decoration-color: #b59cbe; }
.atlas-index {
  display: flex; flex-direction: column; min-width: 0; height: var(--map-height); overflow: hidden;
  border: 1px solid var(--atlas-line); border-radius: .82rem .82rem .4rem .82rem;
  background: linear-gradient(168deg, #2c2240, var(--atlas-surface) 48%);
}
.atlas-index-head { padding: .77rem .86rem .59rem; flex: 0 0 auto; border-bottom: 1px solid var(--atlas-line); }
.atlas-count { font: 700 clamp(1.7rem, 2.55vw, 2.35rem)/1.05 var(--display); overflow-wrap: anywhere; }
.atlas-index-head small { display: block; color: var(--atlas-soft); margin-block: .22rem .2rem; font-size: 1rem; }
.atlas-index-head progress { display: block; width: 100%; height: .46rem; accent-color: var(--mint); }
.atlas-next { width: 100%; margin-top: .63rem; background: #293447; text-align: left; }
.atlas-kind-link { display: block; margin-top: .46rem; color: var(--mint); }
.atlas-results, .atlas-point-group {
  margin: 0; padding: .42rem; list-style: none; min-height: 0; overflow-y: auto;
  scrollbar-color: #836793 #21182e; scrollbar-width: thin; overscroll-behavior: contain;
}
.atlas-result {
  display: flex; align-items: center; gap: .7rem;
  width: 100%; min-height: 48px; min-width: 0; padding: .5rem .55rem;
  border: 1px solid transparent; border-radius: .55rem; background: transparent;
  color: var(--atlas-ink); text-align: left; cursor: pointer;
  line-height: 1.34; transition: background .16s ease, border-color .16s ease;
}
.atlas-result-glyph { display: grid; place-content: center; width: 1.65rem; height: 1.65rem; flex: 0 0 auto; color: var(--pin-color); }
.atlas-result:hover, .atlas-result[aria-pressed="true"] { background: #382e4b; border-color: #8e739f; }
.atlas-result:focus-visible { outline-offset: -2px; }
.atlas-result strong, .atlas-result small { display: block; overflow-wrap: anywhere; }
.atlas-result strong { font-weight: 740; }
.atlas-result small { padding-top: .24rem; color: var(--atlas-soft); font-size: 1rem; }
.atlas-result.is-found .atlas-result-glyph { opacity: .52; }
.atlas-result.is-found strong { color: var(--atlas-soft); }
.atlas-empty { padding: .75rem .85rem; color: var(--atlas-soft); }
.atlas-more { flex: 0 0 auto; margin: .45rem; }
.atlas-dossier {
  position: absolute; z-index: 3; inset: auto auto 2.55rem .72rem;
  width: min(calc(100% - 1.44rem), 29rem); max-height: 60%; overflow: auto; overscroll-behavior: contain;
  padding: .79rem .89rem; border: 1px solid #a172a3; border-top: 2px solid var(--rose);
  border-radius: .9rem .9rem .45rem .9rem; background: #211831fa; box-shadow: 0 12px 37px #090719ba;
  scrollbar-color: #836793 #21182e; scrollbar-width: thin;
}
.atlas-dossier > .atlas-control { position: absolute; inset: .46rem .46rem auto auto; padding: 0; width: 44px; }
.atlas-dossier h2 {
  padding-right: 2.7rem; font-size: clamp(1.6rem, 2.5vw, 2.35rem); line-height: 1.05;
  text-wrap: pretty; overflow-wrap: anywhere;
}
.atlas-dossier h2:focus { outline: 0; }
.atlas-dossier-meta {
  display: flex; align-items: flex-start; gap: .45rem;
  padding-right: 2.75rem; margin-bottom: .29rem;
  color: var(--mint); font-weight: 680; overflow-wrap: anywhere;
}
.atlas-dossier-meta svg { color: var(--pin-color, var(--mint)); flex: 0 0 auto; margin-block: .16rem; }
.atlas-dossier-desc { margin-top: .52rem; color: var(--atlas-soft); overflow-wrap: anywhere; }
.atlas-dossier-actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin-top: .68rem; }
.atlas-dossier-actions .button { min-height: 44px; padding: .46rem .79rem; }
.atlas-dossier-actions .text-link { margin: .15rem .2rem; }
.atlas-code { display: flex; align-items: center; gap: .7rem; margin-top: .47rem; }
.atlas-code code { color: var(--rose); font-size: 1.4rem; letter-spacing: .08em; }
.atlas-code button {
  min-height: 44px; padding: 0 .58rem; background: transparent; color: var(--mint); cursor: pointer;
  border: 1px solid #8a688f; border-radius: .4rem;
}
.atlas-code button:hover { border-color: var(--mint); }
.atlas-point-sources { display: flex; flex-wrap: wrap; gap: .35rem .7rem; color: var(--atlas-soft); margin-top: .52rem; }
.atlas-point-sources a { overflow-wrap: anywhere; }
.atlas-point-sources:empty { display: none; }
.atlas-feedback:not(:empty) { margin-top: .35rem; color: var(--mint); }
.atlas-dossier.has-group .atlas-point-group { margin-top: .45rem; padding: 0; }
.atlas-filter-dialog {
  width: min(100% - 1.2rem, 32rem); max-height: min(94dvh, 37rem);
  color: var(--atlas-ink); background: #272039; border: 1px solid #92739f;
  border-top: 3px solid var(--rose); border-radius: .95rem; padding: 0;
}
.atlas-filter-dialog::backdrop, .atlas-full-dialog::backdrop { background: #0b0819c9; }
.atlas-filter-form { display: grid; gap: .8rem; padding: clamp(.85rem, 4vw, 1.2rem); }
.atlas-filter-form header { display: flex; align-items: flex-start; justify-content: space-between; gap: .55rem; }
.atlas-filter-form header p { margin-top: .4rem; color: var(--atlas-soft); }
.atlas-filter-form select { min-height: 46px; width: 100%; padding: .38rem .55rem; border: 1px solid var(--atlas-line); border-radius: .6rem; }
.atlas-switch { min-height: 44px; display: flex; align-items: center; gap: .65rem; cursor: pointer; }
.atlas-switch input { width: 1.2rem; height: 1.2rem; accent-color: var(--mint); }
.atlas-filter-form footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.atlas-full-dialog {
  --map-height: max(16rem, calc(100dvh - 8rem));
  width: 100%; height: 100%; max-width: none; max-height: none; margin: 0;
  padding: .45rem; border: 0; background: #1b1429; color: var(--atlas-ink);
}
.atlas-full-dialog .atlas-workbench { height: 100%; overflow: auto; }
body:has(.atlas-full-dialog[open]), body:has(.atlas-filter-dialog[open]) { overflow: hidden; }
.atlas-support { margin-block: clamp(1.65rem, 4.5vw, 3.25rem) 2rem; }
.atlas-shortcuts, .atlas-support-grid { display: grid; gap: .73rem; }
.atlas-shortcuts { grid-template-columns: repeat(4, minmax(0,1fr)); margin-block: .85rem 1.55rem; }
.atlas-shortcuts a, .atlas-support-grid article {
  min-width: 0; background: linear-gradient(145deg, #342441, #21172e);
  border: 1px solid #705075; border-radius: .85rem .85rem .38rem .85rem;
}
.atlas-shortcuts a {
  display: flex; align-items: center; gap: .58rem; min-height: 62px; padding: .6rem .72rem;
  text-decoration: none; font-weight: 730; overflow-wrap: anywhere; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.atlas-shortcuts a svg { flex: 0 0 auto; color: var(--pin-color); }
.atlas-shortcuts a:hover { transform: translateY(-3px); border-color: var(--pin-color); box-shadow: 0 9px 24px #0c0819; }
.atlas-support-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.atlas-support-grid article { padding: clamp(.85rem, 2.65vw, 1.45rem); }
.atlas-support-grid p { margin-top: .65rem; color: var(--muted); }
.atlas-support-grid a { color: var(--mint); }

.atlas-category-directory, .atlas-category-details, .atlas-category-related { margin-top: clamp(1.7rem, 4vw, 3rem); }
.atlas-category-grid { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); margin-top: .85rem; }
.atlas-category-grid section, .atlas-garage-notes article {
  min-width: 0; padding: .8rem; border-radius: .95rem .95rem .45rem .95rem; border: 1px solid #6f527c;
  background: linear-gradient(155deg, #322445, #20172d);
}
.atlas-category-grid h3 { margin-bottom: .5rem; }
.atlas-category-grid nav { display: grid; gap: .31rem; }
.atlas-category-card {
  display: grid; grid-template-columns: 1.3rem minmax(0, 1fr) max-content; align-items: center;
  gap: .55rem; min-height: 46px; padding: .39rem .54rem; color: var(--text);
  border: 1px solid #60496f; border-radius: .5rem; background: #241a35; text-decoration: none;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.atlas-category-card:hover { border-color: var(--pin-color, var(--mint)); background: #39284c; transform: translateY(-2px); }
.atlas-category-card svg { color: var(--pin-color, var(--mint)); }
.atlas-category-card span { overflow-wrap: anywhere; }
.atlas-category-card small { font-size: 1rem; color: var(--dim); }
.atlas-category-related nav, .atlas-garage-notes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: .7rem; margin-top: .79rem;
}
.atlas-garage-notes article p { color: var(--muted); margin-top: .42rem; }
.atlas-category-details header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .38rem 1rem; }
.atlas-category-details header p { color: var(--muted); }
.atlas-area-links { display: flex; flex-wrap: wrap; gap: .43rem; list-style: none; padding: 0; margin: .84rem 0; }
.atlas-area-links a {
  display: inline-flex; gap: .52rem; align-items: center; min-height: 44px;
  padding: .3rem .66rem; border: 1px solid #73557e; border-radius: .55rem; background: #2a1e3d; text-decoration: none;
}
.atlas-area-links a:hover { border-color: var(--mint); color: var(--mint); }
.atlas-area-links span { color: var(--mint); }
.atlas-location-table {
  --table-accent: #d3a0d4;
  margin-top: .8rem; border: 1px solid #72547d; border-radius: .9rem .9rem .48rem .9rem;
  background: #211830; overflow: hidden;
}
.atlas-location-table table { width: 100%; border-collapse: collapse; text-align: start; }
.atlas-location-table th, .atlas-location-table td { border-bottom: 1px solid #554261; padding: .65rem .77rem; text-align: start; }
.atlas-location-table thead th { background: #332543; color: var(--table-accent); font-weight: 700; }
.atlas-location-table tbody tr:last-child > * { border-bottom: 0; }
.atlas-location-table tbody th { width: 43%; font-weight: 700; }
.atlas-location-table th a { display: inline-flex; gap: .55rem; align-items: center; }
.atlas-location-table th a svg { flex: 0 0 auto; color: var(--table-accent); }
.atlas-location-table tr:hover { background: #322540; }
.atlas-category-guide { margin-top: .8rem; }
@media (max-width: 620px) {
  .atlas-location-table table, .atlas-location-table tbody { display: block; }
  .atlas-location-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .atlas-location-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .22rem .52rem; padding: .57rem .7rem; border-bottom: 1px solid #554261; }
  .atlas-location-table tbody tr:last-child { border-bottom: 0; }
  .atlas-location-table tbody th { width: auto; grid-column: 1 / -1; }
  .atlas-location-table tbody :is(th, td) { padding: .08rem 0; border: 0; overflow-wrap: anywhere; }
  .atlas-location-table tbody th a { min-height: 44px; }
  .atlas-location-table td::before { content: attr(data-label); display: block; color: var(--dim); font-size: .875rem; }
}
@media (max-width: 760px) {
  .atlas { --map-height: clamp(350px, 60svh, 590px); }
  .atlas-layout { grid-template-columns: minmax(0, 1fr); }
  .atlas-index { height: auto; max-height: 22.5rem; }
  .atlas-index-head { padding: .57rem .67rem .48rem; }
  .atlas-full-dialog { --map-height: max(17rem, calc(100dvh - 8rem)); }
  .atlas-full-dialog .atlas-index { max-height: 17rem; }
  .atlas-map-controls { inset: .48rem .48rem auto auto; }
  .atlas-control, .atlas-chip, .atlas-next, .atlas-more, .atlas-result small, .atlas-index-head small, .atlas-credit, .atlas-category-card small {
    font-size: max(.875rem, 14px);
  }
  .atlas-dossier { inset: auto .4rem 2.35rem; width: auto; max-height: 62%; }
  .atlas-shortcuts { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .atlas-support-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 380px) {
  .atlas-toolbar { gap: .34rem; }
  .atlas-search { gap: .34rem; padding-inline: .46rem; }
  .atlas-toolbar > .atlas-control { padding-inline: .46rem; }
  .atlas-toolbar > .atlas-control svg, .atlas-search > svg { width: 17px; }
  .atlas-dossier-actions .button { font-size: .875rem; padding-inline: .57rem; }
}
@media (prefers-reduced-motion: reduce) {
  .atlas *, .atlas-support *, .atlas-category-card { transition: none !important; scroll-behavior: auto !important; }
}

