.atlas-body {
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 58% 48%, rgba(53, 44, 29, .16), transparent 32%),
    radial-gradient(circle at 16% 84%, rgba(24, 40, 55, .18), transparent 28%),
    #090b0f;
}
.atlas-body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; opacity: .28;
  background-image: radial-gradient(circle, #f4efe5 0 .65px, transparent .8px);
  background-size: 83px 83px; background-position: 17px 31px;
}
.atlas-header { height: 88px; }
.atlas-back { color: var(--muted); font-size: 12px; text-decoration: none; transition: color .2s; }
.atlas-back:hover { color: var(--ink); }
.atlas-main {
  position: relative; z-index: 1; display: grid; width: 100%; height: 100dvh;
  grid-template-columns: minmax(235px, .62fr) minmax(440px, 1.5fr) minmax(270px, .72fr);
  gap: clamp(24px, 3vw, 56px); padding: clamp(108px, 12vh, 138px) clamp(30px, 5vw, 90px) clamp(28px, 4vh, 52px);
}
.atlas-copy { align-self: center; max-width: 390px; }
.atlas-copy h1 { margin-top: 24px; font-size: clamp(52px, 4.7vw, 88px); line-height: .91; }
.atlas-copy h1 em { color: var(--amber-soft); }
.atlas-copy > p:not(.eyebrow) { max-width: 360px; margin: 26px 0 32px; color: #9f9d96; font-family: Georgia, serif; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.55; }
.atlas-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; padding-top: 22px; border-top: 1px solid var(--line); }
.atlas-stats div { display: flex; min-width: 0; flex-direction: column; }
.atlas-stats strong { overflow: hidden; font-family: Georgia, serif; font-size: clamp(17px, 1.4vw, 23px); font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.atlas-stats span { margin-top: 5px; color: #5f605b; font-size: 7px; text-transform: uppercase; letter-spacing: .1em; }
.map-panel { position: relative; min-width: 0; min-height: 0; overflow: hidden; border: 1px solid var(--line); background: rgba(7,9,12,.48); box-shadow: inset 0 0 90px rgba(0,0,0,.35), 0 30px 110px rgba(0,0,0,.18); backdrop-filter: blur(6px); }
#distance-canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.map-legend { position: absolute; bottom: 18px; left: 20px; display: flex; align-items: center; gap: 13px; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; pointer-events: none; }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-legend i { width: 5px; height: 5px; border-radius: 50%; }
.map-legend .near { background: var(--amber-soft); box-shadow: 0 0 7px var(--amber); }
.map-legend .far { background: #657681; }
.map-legend small { color: #4d4f4c; font-size: 7px; }
.map-controls { position: absolute; top: 16px; right: 16px; display: grid; border: 1px solid var(--line); background: rgba(9,11,15,.8); }
.map-controls button { width: 34px; height: 33px; border: 0; border-bottom: 1px solid var(--line); color: var(--muted); background: transparent; cursor: pointer; }
.map-controls button:last-child { border: 0; }
.map-controls button:hover { color: var(--amber-soft); background: rgba(255,255,255,.04); }
.object-tooltip { position: absolute; z-index: 4; min-width: 190px; max-width: 250px; padding: 13px 15px; border: 1px solid rgba(231,167,76,.3); color: var(--ink); background: rgba(11,13,16,.94); box-shadow: 0 15px 45px rgba(0,0,0,.4); pointer-events: none; }
.object-tooltip strong { display: block; overflow: hidden; font-family: Georgia, serif; font-size: 17px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.object-tooltip span { display: block; margin-top: 5px; color: var(--amber-soft); font-size: 10px; }
.object-tooltip small { display: block; margin-top: 4px; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.atlas-loading { position: absolute; inset: 0; display: grid; place-content: center; color: var(--muted); background: #090b0f; text-align: center; transition: opacity .4s; }
.atlas-loading .scanner { width: 65px; height: 65px; }
.atlas-loading p { margin-top: 20px; font-family: Georgia, serif; font-size: 16px; }
.atlas-loading.loaded { opacity: 0; pointer-events: none; }
.catalog-panel { display: flex; min-width: 0; min-height: 0; padding: 22px 0 0; flex-direction: column; border-top: 1px solid var(--line); }
.catalog-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.catalog-head small { color: var(--amber); font-size: 8px; text-transform: uppercase; letter-spacing: .15em; }
.catalog-head h2 { margin-top: 7px; font-size: clamp(27px, 2.1vw, 36px); letter-spacing: -.035em; }
.catalog-head > span { padding-bottom: 3px; color: #666761; font-family: Georgia, serif; font-size: 16px; }
.catalog-search { position: relative; display: block; margin-bottom: 12px; }
.catalog-search input { width: 100%; height: 42px; padding: 0 38px 0 13px; border: 1px solid var(--line); color: var(--ink); background: rgba(255,255,255,.025); font-family: inherit; font-size: 12px; }
.catalog-search input:focus { border-color: rgba(231,167,76,.55); }
.catalog-search i { position: absolute; right: 13px; top: 10px; color: var(--muted); font-size: 18px; font-style: normal; pointer-events: none; }
.object-list { min-height: 0; margin: 0; padding: 0 5px 0 0; overflow-y: auto; list-style: none; scrollbar-color: #3d3e3a transparent; scrollbar-width: thin; }
.object-list li { border-bottom: 1px solid rgba(244,239,229,.075); }
.object-list button { display: grid; width: 100%; min-height: 45px; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 9px; padding: 0 4px; border: 0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.object-list button:hover, .object-list button.active { color: var(--amber-soft); background: rgba(231,167,76,.045); }
.object-list .rank { color: #555650; font-size: 8px; font-variant-numeric: tabular-nums; }
.object-list .name { overflow: hidden; font-family: Georgia, serif; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.object-list .distance { color: var(--muted); font-size: 8px; white-space: nowrap; }
.atlas-source { margin: 13px 0 0; color: #4f504c; font-size: 7px; line-height: 1.45; text-transform: uppercase; letter-spacing: .07em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 1100px) {
  .atlas-main { grid-template-columns: minmax(210px,.55fr) minmax(400px,1.4fr) minmax(245px,.65fr); gap: 22px; padding-inline: 26px; }
  .atlas-copy h1 { font-size: 55px; }
  .atlas-copy > p:not(.eyebrow) { font-size: 15px; }
}
@media (max-width: 900px) {
  .atlas-body { overflow-x: hidden; overflow-y: auto; }
  .atlas-header { position: relative; }
  .atlas-main { display: grid; width: calc(100% - 28px); height: auto; margin: auto; padding: 34px 0 60px; grid-template-columns: 1fr; gap: 44px; }
  .atlas-copy { max-width: 650px; }
  .atlas-copy h1 { font-size: clamp(54px, 13vw, 82px); }
  .atlas-copy > p:not(.eyebrow) { max-width: 520px; font-size: 17px; }
  .map-panel { width: 100%; height: min(76vw, 620px); min-height: 390px; }
  .catalog-panel { height: 600px; padding-top: 24px; }
  .object-list button { min-height: 49px; }
}
@media (max-width: 520px) {
  .atlas-back { font-size: 0; }
  .atlas-back::after { content: '← Search'; font-size: 12px; }
  .atlas-main { padding-top: 25px; gap: 36px; }
  .atlas-copy h1 { font-size: 53px; }
  .atlas-stats { gap: 7px; }
  .map-panel { height: 105vw; min-height: 360px; max-height: 510px; }
  .map-legend small { display: none; }
  .catalog-panel { height: 570px; }
}
