/* 3D map page (/market/3d-map): full-viewport immersive map with floating glass UI. Markup: partials/atlas/hero.php (full mode). */
.atx { --gl: rgba(255,255,255,.72); --gl-b: rgba(13,13,15,.08); --gl-fg: #0d0d0f; --gl-mut: #6c6c74; --gl-on: #0d0d0f; --gl-on-fg: #fff;
  position: relative; height: 100svh; min-height: 600px; overflow: hidden; color: var(--gl-fg); }
.atx.is-night { --gl: rgba(18,19,26,.72); --gl-b: rgba(255,255,255,.1); --gl-fg: #f4f2ee; --gl-mut: #a3a3ad; --gl-on: #fff; --gl-on-fg: #0d0d0f; background: #0e1016; }
.atx .at-map { z-index: 0; }
.atx-vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, rgba(241,240,236,.75) 0%, rgba(241,240,236,0) 26%), linear-gradient(0deg, rgba(241,240,236,.6) 0%, rgba(241,240,236,0) 22%); transition: opacity .6s; }
.atx.is-night .atx-vignette { background: linear-gradient(180deg, rgba(14,16,22,.85) 0%, rgba(14,16,22,0) 28%), linear-gradient(0deg, rgba(14,16,22,.7) 0%, rgba(14,16,22,0) 24%); }

.atx-card { background: var(--gl); -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--gl-b); border-radius: 22px; box-shadow: 0 24px 60px -30px rgba(13,13,15,.45); }
.atx-top { position: absolute; z-index: 4; top: calc(var(--hdr) + 24px); left: max(24px, env(safe-area-inset-left, 0px)); right: max(24px, env(safe-area-inset-right, 0px)); display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; pointer-events: none; }
.atx-top > * { pointer-events: auto; }
.atx-title { padding: 20px 24px; max-width: 460px; animation: atx-in .9s .2s cubic-bezier(.2,.8,.2,1) both; }
.atx-kick { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--gl-mut); }
.atx-live { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: atx-ping 1.8s infinite; }
.atx-h1 { margin: 0; font-size: clamp(30px, 3.4vw, 48px); line-height: 1; letter-spacing: -.04em; }
.atx-h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--red, #f43b2f); }
.atx-counts { display: flex; gap: 22px; margin-top: 16px; }
.atx-counts b { display: block; font-size: 22px; letter-spacing: -.03em; font-feature-settings: "tnum" 1; }
.atx-counts small { font-size: 12px; color: var(--gl-mut); font-weight: 600; }

.atx-search { position: relative; display: flex; align-items: center; gap: 10px; width: min(380px, 100%); padding: 0 16px; height: 54px; animation: atx-in .9s .35s cubic-bezier(.2,.8,.2,1) both; }
.atx-search svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; opacity: .6; }
.atx-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; color: inherit; font: inherit; font-size: 15px; outline: none; }
.atx-search input:focus, .atx-search input:focus-visible { outline: none; box-shadow: none; }
.atx-search input::placeholder { color: var(--gl-mut); }
.atx-search:focus-within { box-shadow: 0 0 0 2px var(--red, #f43b2f), 0 24px 60px -30px rgba(13,13,15,.45); }
.atx-sug { position: absolute; left: 0; right: 0; top: calc(100% + 8px); margin: 0; padding: 6px; list-style: none; border-radius: 18px; background: var(--gl); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid var(--gl-b); box-shadow: 0 24px 60px -24px rgba(13,13,15,.5); }
.atx-sug button { all: unset; box-sizing: border-box; display: grid; width: 100%; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.atx-sug button:hover, .atx-sug button:focus-visible { background: rgba(244,59,47,.1); }
.atx-sug span { font-weight: 700; font-size: 14px; } .atx-sug small { font-size: 12px; color: var(--gl-mut); }

.atx-filters { position: absolute; z-index: 4; left: max(24px, env(safe-area-inset-left, 0px)); bottom: 24px; display: flex; align-items: center; gap: 8px; padding: 8px; max-width: calc(100% - 420px); overflow-x: auto; scrollbar-width: none; animation: atx-up .9s .5s cubic-bezier(.2,.8,.2,1) both; }
.atx-seg { display: flex; gap: 2px; padding: 3px; border-radius: 14px; background: rgba(13,13,15,.05); }
.atx.is-night .atx-seg { background: rgba(255,255,255,.06); }
.atx-seg button { all: unset; display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 11px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: background .25s, color .25s, transform .15s; min-height: 20px; }
.atx-seg button:hover { background: rgba(13,13,15,.06); }
.atx-seg button:active { transform: scale(.96); }
.atx-seg button.is-on { background: var(--gl-on); color: var(--gl-on-fg); }
.atx-seg button:focus-visible { outline: 2px solid var(--red, #f43b2f); outline-offset: 1px; }
.atx-shown { margin: 0 6px 0 4px; font-size: 12.5px; color: var(--gl-mut); white-space: nowrap; }
.atx-shown b { color: var(--gl-fg); font-size: 15px; }

.atx-chips { position: absolute; z-index: 4; left: max(24px, env(safe-area-inset-left, 0px)); top: calc(var(--hdr) + 228px); max-height: calc(100svh - var(--hdr) - 430px); display: flex; flex-direction: column; gap: 6px; max-height: calc(100svh - var(--hdr) - 340px); overflow-y: auto; scrollbar-width: none; padding: 2px; animation: atx-in .9s .65s cubic-bezier(.2,.8,.2,1) both; }
.atx-chips::-webkit-scrollbar { display: none; }
.atx-chips button { all: unset; display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; background: var(--gl); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid var(--gl-b); transition: transform .2s, background .2s, color .2s; width: max-content; }
.atx-chips button b { min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: rgba(13,13,15,.07); font-size: 11px; }
.atx-chips button:hover, .atx-chips button:focus-visible { transform: translateX(4px); background: var(--gl-on); color: var(--gl-on-fg); }
.atx-chips button:hover b { background: var(--red, #f43b2f); color: #fff; }

.atx-legend { position: absolute; z-index: 4; right: max(24px, env(safe-area-inset-right, 0px)); bottom: 110px; padding: 14px 16px; display: grid; gap: 10px; min-width: 220px; font-size: 12.5px; font-weight: 600; animation: atx-up .9s .6s cubic-bezier(.2,.8,.2,1) both; }
.atx-leg__row { display: flex; align-items: center; gap: 12px; }
.atx-leg__row[hidden] { display: none; }
.atx-leg__h { display: inline-flex; align-items: flex-end; gap: 3px; height: 18px; }
.atx-leg__h i { width: 5px; border-radius: 2px; background: var(--gl-fg); }
.atx-leg__h i:nth-child(1) { height: 6px; } .atx-leg__h i:nth-child(2) { height: 11px; } .atx-leg__h i:nth-child(3) { height: 18px; background: var(--red, #f43b2f); }
.atx-leg__row span { display: inline-flex; align-items: center; gap: 6px; }
.atx-heatbar i { flex: 1; height: 8px; border-radius: 999px; background: linear-gradient(90deg, #2f80ed, #f2c94c, #f43b2f); min-width: 60px; }
.atx-heatbar span { font-size: 11px; color: var(--gl-mut); white-space: nowrap; }
.atx-toggles { display: flex; gap: 8px; }
.atx-tg { all: unset; display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 999px; border: 1px solid var(--gl-b); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.atx-tg span { width: 28px; height: 16px; border-radius: 999px; background: rgba(13,13,15,.15); position: relative; transition: background .25s; }
.atx-tg span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.atx-tg[aria-pressed="true"] span { background: var(--red, #f43b2f); }
.atx-tg[aria-pressed="true"] span::after { transform: translateX(12px); }
.atx-tg:focus-visible { outline: 2px solid var(--red, #f43b2f); outline-offset: 2px; }

.atx-sheet { position: absolute; z-index: 6; top: calc(var(--hdr) + 24px); right: max(24px, env(safe-area-inset-right, 0px)); bottom: 112px; width: 380px; display: flex; flex-direction: column; overflow: hidden; border-radius: 26px; background: var(--bg, #fff); color: var(--ink, #0d0d0f); box-shadow: 0 40px 90px -30px rgba(13,13,15,.6); animation: atx-sheet .55s cubic-bezier(.2,.8,.2,1) both; }
.atx-sheet[hidden] { display: none; }
.atx-sheet--c { bottom: auto; }
.atx-sheet__x { position: absolute; z-index: 2; top: 12px; right: 12px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(255,255,255,.92); color: #0d0d0f; font-size: 22px; line-height: 1; cursor: pointer; box-shadow: 0 6px 16px -6px rgba(0,0,0,.35); }
.atx-sheet__img { position: relative; aspect-ratio: 16 / 10; max-width: 100%; background: #ece9e5; flex: none; }
.atx-sheet__img img { width: 100%; height: 100%; object-fit: cover; }
.atx-sheet__tag { position: absolute; left: 14px; bottom: 14px; padding: 6px 10px; border-radius: 999px; background: rgba(13,13,15,.75); color: #fff; font-size: 11.5px; font-weight: 800; letter-spacing: .04em; }
.atx-sheet__b { padding: 20px 22px 22px; display: grid; gap: 8px; overflow-y: auto; }
.atx-sheet__loc { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted, #6c6c74); }
.atx-sheet__t { margin: 0; font-size: 19px; letter-spacing: -.02em; line-height: 1.25; }
.atx-sheet__p { margin: 2px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.atx-sheet__v { margin: 0; justify-self: start; padding: 6px 10px; border-radius: 999px; background: #e9f7ee; color: #12693a; font-size: 12.5px; font-weight: 800; }
.atx-sheet__dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 8px 0 4px; }
.atx-sheet__dl--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.atx-sheet__dl div { padding: 10px 12px; border-radius: 14px; background: #f4f2ee; min-width: 0; }
.atx-sheet__dl dt { font-size: 11px; font-weight: 700; color: var(--muted, #6c6c74); }
.atx-sheet__dl dd { margin: 2px 0 0; font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atx-sheet__btns { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.atx-sheet__btns .btn { flex: 1 1 140px; justify-content: center; }

.atx-hint { display: none; }
.atx .at-credit { right: 12px; bottom: 6px; z-index: 5; color: var(--gl-mut); opacity: .8; }
.atx .maplibregl-ctrl-bottom-right { bottom: 260px; right: 14px; }
.atx .maplibregl-ctrl-group { border-radius: 14px; overflow: hidden; box-shadow: 0 10px 30px -14px rgba(0,0,0,.4); }

@keyframes atx-in { from { opacity: 0; transform: translateY(-14px); } }
@keyframes atx-up { from { opacity: 0; transform: translateY(18px); } }
@keyframes atx-sheet { from { opacity: 0; transform: translateX(24px) scale(.98); } }
@keyframes atx-ping { 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

@media (max-width: 1100px) { .atx-chips { display: none; } }
@media (max-width: 760px) {
  .atx { height: 100svh; min-height: 560px; }
  .atx-kick { display: none; }
  .atx-top { top: calc(var(--hdr) + 10px); left: 12px; right: 12px; flex-direction: column; gap: 8px; }
  .atx-title { padding: 14px 16px; max-width: none; width: 100%; box-sizing: border-box; }
  .atx-h1 { font-size: 24px; }
  .atx-counts { gap: 14px; margin-top: 8px; } .atx-counts div { display: flex; align-items: baseline; gap: 5px; } .atx-counts b { font-size: 16px; } .atx-counts small { font-size: 11.5px; }
  .atx-search { width: 100%; height: 50px; box-sizing: border-box; }
  .atx-filters { left: 12px; right: 12px; translate: none; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); max-width: none; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .atx-filters::-webkit-scrollbar { display: none; }
  .atx-seg { flex: none; } .atx-seg button { padding: 11px 12px; }
  .atx-shown { display: none; }
  .atx-legend { right: 12px; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); min-width: 0; padding: 10px 12px; gap: 8px; }
  .atx-legend .atx-leg__row:first-child { display: none; }
  .atx-hint { display: none; }
  .atx .maplibregl-ctrl-bottom-right { display: none; }
  .atx-sheet { top: auto; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: 78%; border-radius: 26px 26px 0 0; animation-name: atx-sheet-up; }
  .atx-sheet::before { content: ""; position: absolute; z-index: 3; top: 8px; left: 50%; translate: -50% 0; width: 40px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.85); }
  .atx-sheet--c::before { background: rgba(13,13,15,.2); }
  .atx-sheet__img { aspect-ratio: 16 / 8; }
  .atx-sheet__btns .btn { min-height: 48px; }
  @keyframes atx-sheet-up { from { opacity: .6; transform: translateY(40%); } }
}
@media (prefers-reduced-motion: reduce) { .atx-title, .atx-search, .atx-filters, .atx-chips, .atx-legend, .atx-sheet, .atx-live { animation: none; } }
