/* atlas.css — "Field atlas" section (#atlas). Loaded after flow.css.
   A real vector map: hairline borders, quiet land, one accent (--seq-metal)
   for the places I've been. No decoration that isn't cartography. */

#atlas {
  position: relative;
  padding: clamp(4.6rem, 7vw, 6rem) clamp(1.15rem, 5.4vw, 7vw) clamp(2.4rem, 5vw, 4rem);
  background: var(--night-3, #070b12);   /* no-JS fallback */
  color: var(--dark-ink);
  overflow: visible;
}
.flow-js #atlas { background: none; }
.atlas-inner { position: relative; z-index: 2; max-width: 1360px; margin: 0 auto; }

/* ── stage: the map (hover = pictures, double-click = viewer) ─────── */
.atlas-stage { min-width: 0; }
/* the whole map always fits the screen it is on */
.atlas-map { width: min(100%, calc((100vh - 118px) * 1.374)); min-width: min(100%, 320px); margin: 0 auto; }
.atlas-hint {
  max-width: 62ch;
  margin: clamp(.9rem, 1.6vw, 1.3rem) auto 0;
  text-align: center;
  font-family: var(--font-ui);
  font-size: clamp(.8rem, .76rem + .2vw, .9rem);
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .005em;
  color: rgba(228, 232, 240, .62);
  text-wrap: balance;
}
.atlas-hint em { font-style: normal; color: #e8d0a4; }
.atlas-hint__line { display: block; }
.atlas-hint__fine, .atlas-hint__touch { white-space: nowrap; }
.atlas-hint__touch { display: none; }
@media (hover: none) {
  .atlas-hint__fine { display: none; }
  .atlas-hint__touch { display: inline; }
}

.atlas-map {
  position: relative;
  aspect-ratio: 458.9 / 334;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .07);
  /* see-through, so the night sky behind the section shows inside the frame */
  background: linear-gradient(180deg, rgba(10, 15, 24, .5) 0%, rgba(8, 12, 20, .62) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  overflow: hidden;
  isolation: isolate;
}
.atlas-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.atlas-grid line { stroke: rgba(255, 255, 255, .028); stroke-width: 1; vector-effect: non-scaling-stroke; }

.atlas-land {
  fill: rgba(255, 255, 255, .026);
  stroke: rgba(255, 255, 255, .085);
  stroke-width: .6;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
}
.atlas-india { filter: drop-shadow(0 0 14px rgba(210, 186, 143, .13)); }
.atlas-state {
  fill: #151b27;
  stroke: rgba(226, 232, 244, .2);
  stroke-width: .6;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  transition: fill .25s ease;
}
.atlas-state:hover { fill: #202838; }

.atlas-land.is-marked,
.atlas-state.is-marked {
  fill: rgba(210, 186, 143, .34);
  stroke: rgba(232, 208, 164, .9);
  stroke-width: .9;
  cursor: pointer;
  transition: fill .3s ease, stroke .3s ease;
}
.atlas-land.is-marked:hover,
.atlas-state.is-marked:hover,
.atlas-land.is-marked.is-active,
.atlas-state.is-marked.is-active { fill: rgba(222, 196, 150, .78); stroke: #f3e2bf; }

.atlas-route {
  fill: none;
  stroke: rgba(232, 208, 164, .42);
  stroke-width: .9;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  pointer-events: none;
  transition: stroke-dashoffset 1.5s cubic-bezier(.3, .7, .2, 1), stroke .3s ease, stroke-width .3s ease;
  transition-delay: calc(.3s + var(--i, 0) * .07s), 0s, 0s;
}
#atlas.is-live .atlas-route { stroke-dashoffset: 0; }
.atlas-route.is-active { stroke: #f6e7c6; stroke-width: 1.5; }


/* ── pins and labels ─────────────────────────────────────────────── */
.atlas-pin {
  position: absolute;
  z-index: 3;
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: #fff7e6;
  box-shadow: 0 0 0 3px rgba(9, 13, 21, .9), 0 0 0 4px rgba(232, 208, 164, .75);
  cursor: pointer;
  transition: box-shadow .3s ease;
  -webkit-tap-highlight-color: transparent;
}
.atlas-pin::before { content: ''; position: absolute; inset: -17px; border-radius: 50%; }   /* hit area */
.atlas-pin::after {                                                                        /* slow ring on the home pin */
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(232, 208, 164, .8);
  opacity: 0;
  pointer-events: none;
}
#atlas.is-live .atlas-pin--home::after { animation: atlasPing 3.6s cubic-bezier(.2, .6, .3, 1) infinite; }
@keyframes atlasPing {
  0% { transform: scale(1); opacity: .8; }
  75%, 100% { transform: scale(3.2); opacity: 0; }
}
.atlas-pin:hover,
.atlas-pin.is-active { box-shadow: 0 0 0 3px rgba(9, 13, 21, .9), 0 0 0 5px #f3e2bf, 0 0 22px rgba(232, 208, 164, .6); }
.atlas-pin:focus-visible { outline: 2px solid #f3e2bf; outline-offset: 7px; }

.atlas-pin__tag {
  position: absolute;
  top: 50%;
  left: calc(100% + 13px);
  transform: translateY(-50%);
  font-family: var(--font-ui);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(240, 240, 248, .66);
  text-shadow: 0 0 10px #080c14, 0 0 4px #080c14;
  pointer-events: none;
  transition: color .3s ease;
}
.atlas-pin--left .atlas-pin__tag { left: auto; right: calc(100% + 13px); }
.atlas-pin:hover .atlas-pin__tag,
.atlas-pin.is-active .atlas-pin__tag { color: #fff; }
.atlas-pin.is-active { z-index: 4; }
/* states without a printed name: a smaller, quieter dot */
.atlas-pin--quiet { width: 6px; height: 6px; background: #f6e7c6; box-shadow: 0 0 0 2px rgba(9, 13, 21, .85), 0 0 0 3px rgba(232, 208, 164, .5); }
.atlas-pin--quiet::before { inset: -12px; }
.atlas-pin--quiet:hover,
.atlas-pin--quiet.is-active { box-shadow: 0 0 0 2px rgba(9, 13, 21, .9), 0 0 0 4px #f3e2bf, 0 0 18px rgba(232, 208, 164, .6); }

.atlas-map { -webkit-user-select: none; user-select: none; }

/* ── hover preview: a fan of the place's pictures ────────────────────
   Three portrait frames stacked on the pin that spread open like a hand
   of prints. No name, no text; the pictures are the label. */
.atlas-preview {
  --ox: 50%;
  position: absolute;
  z-index: 6;
  width: 236px;
  height: 196px;
  pointer-events: none;
  opacity: 0;
  transform-origin: var(--ox) 100%;
  transform: translateY(12px) scale(.9);
  transition: opacity .2s ease, transform .45s cubic-bezier(.2, .9, .25, 1.12);
}
.atlas-preview--below { transform-origin: var(--ox) 0; transform: translateY(-12px) scale(.9); }
.atlas-preview.is-on { opacity: 1; transform: none; }
.atlas-preview__fan { position: absolute; inset: 0; }
.atlas-preview--below .atlas-preview__fan { top: 0; }

.atlas-pv {
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 112px;
  height: 150px;
  margin-left: -56px;
  border-radius: 16px;
  overflow: hidden;
  background: #121826 center / cover no-repeat;
  box-shadow: 0 22px 44px rgba(0, 0, 0, .55), 0 4px 10px rgba(0, 0, 0, .35);
  transform: translateY(8px) scale(.94);
  transition: transform .55s cubic-bezier(.2, .9, .25, 1.15);
}
.atlas-preview--below .atlas-pv { bottom: auto; top: 12px; }
.atlas-pv::after {   /* hairline edge + a little sheen */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  background: linear-gradient(155deg, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 38%);
}
.atlas-pv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.atlas-preview.is-on .atlas-pv--0 { transform: translate(-60px, 6px) rotate(-10deg) scale(.88); transition-delay: .04s; }
.atlas-preview.is-on .atlas-pv--1 { transform: translateY(-6px); }
.atlas-preview.is-on .atlas-pv--2 { transform: translate(60px, 6px) rotate(10deg) scale(.88); transition-delay: .08s; }
.atlas-pv__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border-radius: 50%;
  background: rgba(10, 13, 20, .45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
}
.atlas-pv__play svg { width: 14px; height: 14px; margin-left: 2px; fill: #fff; }

/* single click: a small shuffle that says "once more" */
.atlas-preview.is-nudge .atlas-preview__fan { animation: atlasNudge .5s cubic-bezier(.3, .7, .3, 1); }
@keyframes atlasNudge {
  0%, 100% { transform: none; }
  30% { transform: translateY(-6px) scale(1.03); }
  60% { transform: translateY(1px) scale(.995); }
}

.atlas-preview__meta {
  position: absolute;
  left: 50%;
  bottom: -4px;
  z-index: 2;
  display: flex;
  gap: .7rem;
  padding: .32rem .7rem;
  border-radius: 999px;
  background: rgba(12, 16, 24, .72);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12), 0 8px 20px rgba(0, 0, 0, .35);
  transform: translateX(-50%);
  font-family: var(--font-ui);
  font-size: .68rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .9);
  white-space: nowrap;
}
.atlas-preview--below .atlas-preview__meta { bottom: auto; top: 168px; }
.atlas-preview__meta span { display: inline-flex; align-items: center; gap: .3rem; }
.atlas-preview__meta svg { width: 13px; height: 13px; fill: none; stroke: #e8d0a4; stroke-width: 1.7; stroke-linejoin: round; }
.atlas-preview__meta svg .fill { fill: #e8d0a4; stroke: none; }
@media (hover: none) { .atlas-preview { display: none; } }

/* ── viewer (opens on double-click) ───────────────────────────────────
   One place at a time. Name and close on top, the picture or film in the
   middle on a room lit by its own colours, a filmstrip at the bottom. */
.atlas-viewer {
  position: fixed;
  inset: 0;
  z-index: 20000;   /* above the nav (9000), below the custom cursor (99998+) */
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #05070b;
  color: #fff;
  opacity: 0;
  transition: opacity .4s ease;
  cursor: auto;
  overflow: hidden;
}
.atlas-viewer[hidden] { display: none; }
.atlas-viewer.is-open { opacity: 1; }
html.atlas-story-lock { overflow: hidden; }

.av-ambient { position: absolute; inset: 0; pointer-events: none; }
.av-ambient i {
  position: absolute;
  inset: -12%;
  background: center / cover no-repeat;
  filter: blur(80px) saturate(1.35) brightness(.4);
  transform: scale(1.1);
  opacity: 0;
  transition: opacity 1.1s ease;
}
.av-ambient i.is-on { opacity: 1; }
.av-ambient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 75% 70% at 50% 50%, rgba(5, 7, 11, 0) 0%, rgba(5, 7, 11, .7) 100%);
}

/* top bar */
.av-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(16px, 3vh, 30px) clamp(16px, 3.4vw, 44px) clamp(10px, 2vh, 20px);
  transform: translateY(-10px);
  opacity: 0;
  transition: transform .6s cubic-bezier(.2, .75, .2, 1) .08s, opacity .5s ease .08s;
}
.atlas-viewer.is-open .av-top { transform: none; opacity: 1; }
.av-title { display: flex; align-items: baseline; gap: 1rem; min-width: 0; }
.av-name {
  margin: 0;
  min-width: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.5vw, 2.35rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.av-count {
  flex: none;
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .14em;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .5);
}

/* glass buttons: close and the side arrows */
.av-close,
.av-nav {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .08);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 10px 30px rgba(0, 0, 0, .3);
  cursor: pointer;
  transition: background .25s ease, color .25s ease, transform .35s cubic-bezier(.2, .8, .2, 1.2), opacity .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.av-close svg,
.av-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s cubic-bezier(.2, .75, .2, 1); }
.av-close { flex: none; width: 46px; height: 46px; }
.av-close:hover { background: #f3e2bf; color: #10131a; }
.av-close:hover svg { transform: rotate(90deg); }
.av-close:active, .av-nav:active { transform: scale(.92); }
.av-close:focus-visible, .av-nav:focus-visible { outline: 2px solid #f3e2bf; outline-offset: 3px; }

/* stage */
.av-stage { position: relative; z-index: 1; min-height: 0; padding: 0 clamp(16px, 7vw, 124px); }
.av-track { position: relative; width: 100%; height: 100%; }
.av-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  display: grid;
  /* fixed tracks: Safari otherwise sizes an auto track to the photo's full
     pixel width, and wide photos spill off the right edge on phones */
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  place-items: center;
  container-type: size;
}
.av-slide > * { min-width: 0; min-height: 0; }
.av-slide.is-first { animation: avRise .7s cubic-bezier(.2, .75, .2, 1) both; }
.av-slide.from-next { animation: avFromNext .52s cubic-bezier(.2, .75, .2, 1) both; }
.av-slide.from-prev { animation: avFromPrev .52s cubic-bezier(.2, .75, .2, 1) both; }
.av-slide.to-prev { animation: avToPrev .5s cubic-bezier(.4, 0, .2, 1) both; pointer-events: none; }
.av-slide.to-next { animation: avToNext .5s cubic-bezier(.4, 0, .2, 1) both; pointer-events: none; }
@keyframes avRise { from { opacity: 0; transform: translateY(28px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes avFromNext { from { opacity: 0; transform: translateX(7%) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes avFromPrev { from { opacity: 0; transform: translateX(-7%) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes avToPrev { to { opacity: 0; transform: translateX(-5%) scale(.94); } }
@keyframes avToNext { to { opacity: 0; transform: translateX(5%) scale(.94); } }

.av-img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 20px;
  box-shadow: 0 40px 110px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06);
  opacity: 0;
  transition: opacity .5s ease;
  -webkit-user-drag: none;
}
.av-img.is-loaded { opacity: 1; }

.av-empty {
  position: relative;
  height: 100%;
  max-height: 100%;
  aspect-ratio: 3 / 4;
  max-width: 100%;
  border-radius: 22px;
  background: center / cover no-repeat;
  box-shadow: 0 40px 110px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .1);
  display: grid;
  place-items: end center;
  padding-bottom: clamp(1.4rem, 4vh, 2.4rem);
}
.av-empty__k {
  padding: .45rem .9rem;
  border-radius: 999px;
  background: rgba(8, 10, 16, .4);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  font-family: var(--font-ui);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .85);
}

.av-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 52px;
  height: 52px;
  margin-top: -26px;
}
.av-nav--prev { left: clamp(12px, 2.2vw, 36px); }
.av-nav--next { right: clamp(12px, 2.2vw, 36px); }
.av-nav:hover { background: rgba(255, 255, 255, .16); }
.av-nav--prev:hover svg { transform: translateX(-2px); }
.av-nav--next:hover svg { transform: translateX(2px); }
.av-nav:disabled { opacity: .18; cursor: default; pointer-events: none; }
.atlas-viewer.is-single .av-nav { display: none; }

/* filmstrip */
.av-strip {
  position: relative;
  z-index: 2;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  padding: clamp(14px, 2.4vh, 22px) 16px calc(clamp(16px, 3vh, 28px) + env(safe-area-inset-bottom, 0px));
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
  transform: translateY(14px);
  opacity: 0;
  transition: transform .6s cubic-bezier(.2, .75, .2, 1) .14s, opacity .5s ease .14s;
}
.av-strip::-webkit-scrollbar { display: none; }
.av-strip[hidden] { display: block; visibility: hidden; height: clamp(16px, 3vh, 28px); padding: 0; }
.atlas-viewer.is-open .av-strip { transform: none; opacity: 1; }
.av-strip__in { display: flex; gap: 10px; width: max-content; margin: 0 auto; padding: 4px 24px; }
.av-thumb {
  position: relative;
  flex: none;
  width: 54px;
  height: 70px;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: #151b27 center / cover no-repeat;
  opacity: .42;
  transform: scale(.92);
  cursor: pointer;
  transition: opacity .3s ease, transform .4s cubic-bezier(.2, .8, .2, 1.2), box-shadow .3s ease;
}
.av-thumb:hover { opacity: .8; transform: scale(.97); }
.av-thumb.is-on { opacity: 1; transform: none; box-shadow: 0 0 0 2px #05070b, 0 0 0 3.5px #e8d0a4, 0 10px 24px rgba(0, 0, 0, .45); }
.av-thumb:focus-visible { outline: 2px solid #f3e2bf; outline-offset: 4px; }
.av-thumb__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .35));
}
.av-thumb__play svg { width: 16px; height: 16px; fill: #fff; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .5)); }

/* ── film player ───────────────────────────────────────────────────── */
.avp {
  position: relative;
  aspect-ratio: var(--ar, 16 / 9);
  width: min(100cqw, calc(100cqh * var(--ar, 16 / 9)));
  max-height: 100cqh;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 40px 110px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .07);
  isolation: isolate;
  -webkit-user-select: none;
  user-select: none;
}
.avp video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; background: #000; cursor: pointer; }
.avp.is-idle, .avp.is-idle video { cursor: none; }
.avp svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.avp svg .fill { fill: currentColor; stroke: none; }

.avp-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, .55) 100%);
  transition: opacity .5s ease;
}
.avp.is-idle .avp-shade { opacity: 0; }
.avp.is-fresh .avp-shade { background: rgba(0, 0, 0, .22); }

/* big centre button: play before the first frame, replay at the end */
.avp-big {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), 0 20px 50px rgba(0, 0, 0, .4);
  cursor: pointer;
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .9, .25, 1.2), background .25s ease, color .25s ease;
}
.avp-big svg { width: 30px; height: 30px; }
.avp-big .i-play { margin-left: 4px; }
.avp-big .i-replay { display: none; stroke-width: 2; }
.avp.is-ended .avp-big .i-play { display: none; }
.avp.is-ended .avp-big .i-replay { display: block; }
.avp-big:hover { background: #f3e2bf; color: #10131a; transform: scale(1.06); }
.avp-big:focus-visible { outline: 2px solid #f3e2bf; outline-offset: 4px; }
.avp-big__ring {   /* a slow breathing halo */
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 1px solid rgba(243, 226, 191, .5);
  animation: avpHalo 2.8s cubic-bezier(.3, .6, .3, 1) infinite;
  pointer-events: none;
}
@keyframes avpHalo { 0% { transform: scale(.9); opacity: .9; } 80%, 100% { transform: scale(1.3); opacity: 0; } }
.avp:not(.is-paused) .avp-big,
.avp.is-paused:not(.is-fresh):not(.is-ended) .avp-big { opacity: 0; transform: scale(.8); pointer-events: none; }

/* buffering */
.avp-spin {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .16);
  border-top-color: #f3e2bf;
  opacity: 0;
  transition: opacity .25s ease;
  animation: avpSpin .9s linear infinite;
  pointer-events: none;
}
.avp.is-waiting:not(.is-paused) .avp-spin { opacity: 1; }
@keyframes avpSpin { to { transform: rotate(360deg); } }

/* play / pause flash on click */
.avp-flash {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
  border-radius: 50%;
  background: rgba(10, 13, 20, .45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  opacity: 0;
  pointer-events: none;
}
.avp-flash svg { width: 26px; height: 26px; }
.avp-flash.is-on { animation: avpFlash .6s ease-out; }
@keyframes avpFlash { 0% { opacity: .95; transform: scale(.85); } 100% { opacity: 0; transform: scale(1.25); } }

/* the floating control bar */
.avp-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 52px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(14, 18, 26, .5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  backdrop-filter: blur(20px) saturate(1.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), 0 14px 34px rgba(0, 0, 0, .35);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.avp.is-idle .avp-bar,
.avp.is-fresh .avp-bar { opacity: 0; transform: translateY(10px); pointer-events: none; }

.avp-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: rgba(255, 255, 255, .92);
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .25s cubic-bezier(.2, .8, .2, 1.3);
}
.avp-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.avp-btn:active { transform: scale(.9); }
.avp-btn:focus-visible { outline: 2px solid #f3e2bf; outline-offset: 1px; }
.avp-btn svg { width: 20px; height: 20px; }
.avp-play { width: 40px; height: 40px; background: #f3e2bf; color: #10131a; }
.avp-play:hover { background: #fff3da; color: #10131a; }
.avp-play svg { width: 18px; height: 18px; }
.avp-play .i-play { margin-left: 2px; }
.avp-play .i-pause, .avp:not(.is-paused) .avp-play .i-play { display: none; }
.avp:not(.is-paused) .avp-play .i-pause { display: block; }

.avp-time {
  flex: none;
  min-width: 2.9em;
  padding: 0 4px;
  font-family: var(--font-ui);
  font-size: .74rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .9);
  text-align: center;
}
.avp-time--dur { color: rgba(255, 255, 255, .5); }

.avp-scrub { position: relative; flex: 1; min-width: 60px; height: 32px; cursor: pointer; touch-action: none; }
.avp-scrub:focus-visible { outline: none; }
.avp-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .16);
  overflow: hidden;
  transition: height .2s ease, margin .2s ease;
}
.avp-scrub:hover .avp-rail, .avp.is-scrubbing .avp-rail, .avp-scrub:focus-visible .avp-rail { height: 6px; margin-top: -3px; }
.avp-buf, .avp-fill { position: absolute; inset: 0; transform: scaleX(0); transform-origin: 0 50%; }
.avp-buf { background: rgba(255, 255, 255, .22); }
.avp-fill { background: linear-gradient(90deg, #b8935a 0%, #e8d0a4 60%, #fff3da 100%); }
.avp-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff7e6;
  box-shadow: 0 0 0 4px rgba(243, 226, 191, .22), 0 2px 8px rgba(0, 0, 0, .4);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .2s cubic-bezier(.2, .8, .2, 1.3);
  pointer-events: none;
}
.avp-scrub:hover .avp-knob, .avp.is-scrubbing .avp-knob, .avp-scrub:focus-visible .avp-knob { transform: translate(-50%, -50%) scale(1); }
.avp-bubble {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  padding: .28rem .55rem;
  border-radius: 8px;
  background: rgba(250, 246, 238, .95);
  color: #10131a;
  font-family: var(--font-ui);
  font-size: .7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transform: translate(-50%, 4px);
  opacity: 0;
  transition: opacity .15s ease, transform .2s ease;
  pointer-events: none;
}
.avp-scrub:hover .avp-bubble, .avp.is-scrubbing .avp-bubble { opacity: 1; transform: translate(-50%, 0); }

.avp-rate {
  width: auto;
  min-width: 42px;
  height: 30px;
  padding: 0 .6rem;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: .72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.avp-rate.is-on { color: #f3e2bf; box-shadow: inset 0 0 0 1px rgba(243, 226, 191, .4); }

.avp-vol { flex: none; display: flex; align-items: center; }
.avp-mute .i-muted, .avp.is-muted .avp-mute .i-vol { display: none; }
.avp.is-muted .avp-mute .i-muted { display: block; }
.avp.is-low .avp-mute .w2 { opacity: 0; }
.avp-volr {
  --v: 100%;
  width: 0;
  height: 4px;
  margin: 0;
  border-radius: 4px;
  opacity: 0;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(90deg, #e8d0a4 var(--v), rgba(255, 255, 255, .2) var(--v));
  cursor: pointer;
  transition: width .3s cubic-bezier(.2, .8, .2, 1), opacity .2s ease, margin .3s ease;
}
.avp-vol:hover .avp-volr, .avp-vol:focus-within .avp-volr { width: 76px; opacity: 1; margin: 0 10px 0 4px; }
.avp-volr::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff7e6; box-shadow: 0 1px 6px rgba(0, 0, 0, .4); }
.avp-volr::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff7e6; }
.avp-volr:focus-visible { outline: 2px solid #f3e2bf; outline-offset: 4px; }

.avp-fs .i-unfull, .avp.is-full .avp-fs .i-full { display: none; }
.avp.is-full .avp-fs .i-unfull { display: block; }
.avp.is-full { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
.avp.is-full .avp-bar { left: 50%; right: auto; bottom: 28px; width: min(760px, calc(100% - 40px)); transform: translateX(-50%); }
.avp.is-full.is-idle .avp-bar { transform: translate(-50%, 10px); }

/* ── phones ───────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .av-top { padding-top: calc(14px + env(safe-area-inset-top, 0px)); }
  .av-close { width: 42px; height: 42px; }
  .av-stage { padding: 0 12px; }
  .av-nav { display: none; }
  .av-thumb { width: 44px; height: 58px; border-radius: 9px; }
  .avp, .av-img { border-radius: 16px; }
  .avp-bar { left: 8px; right: 8px; bottom: 8px; height: 46px; padding: 0 5px; gap: 2px; }
  .avp-time--dur, .avp-rate, .avp-volr { display: none; }
  .avp-big { width: 70px; height: 70px; margin: -35px 0 0 -35px; }
}
@media (max-width: 600px) {
  .atlas-map { border-radius: 16px; }
  .atlas-pin__tag { font-size: .56rem; letter-spacing: .1em; left: calc(100% + 9px); }
  .atlas-pin--left .atlas-pin__tag { right: calc(100% + 9px); }
  /* the map is ~340 px wide here: northern pins sit a few px apart */
  .atlas-pin { width: 7px; height: 7px; }
  .atlas-pin::before { inset: -9px; }
  .atlas-pin--quiet { width: 4px; height: 4px; box-shadow: 0 0 0 1.5px rgba(9, 13, 21, .85), 0 0 0 2.5px rgba(232, 208, 164, .5); }
  .atlas-pin--quiet::before { inset: -6px; }
}

@media (prefers-reduced-motion: reduce) {
  #atlas.is-live .atlas-pin--home::after { animation: none; }
  .atlas-route { transition: none; stroke-dashoffset: 0; }
  .atlas-preview, .atlas-pv, .atlas-viewer, .av-top, .av-strip, .av-ambient i { transition: none; }
  .av-slide, .avp-big__ring, .avp-flash.is-on, .atlas-preview.is-nudge .atlas-preview__fan { animation: none !important; }
}
