.future-stores {
  --future-ink: #0d1423;
  --future-paper: #fbf7e9;
  --future-muted: #adb9cd;
  --future-accent: #f0bd79;
  display: block;
  overflow: clip;
  background: radial-gradient(ellipse at 73% 46%, #142540 0, var(--future-ink) 54%);
  color: var(--future-paper);
}

.future-stores__layout {
  display: grid;
  grid-template-columns: minmax(22rem, 0.8fr) minmax(0, 1.45fr);
  grid-template-rows: 1fr 1fr;
  column-gap: 2rem;
  max-width: 136rem;
  min-height: min(76rem, 85svh);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 8rem) clamp(2rem, 6vw, 8rem);
}

.future-stores__intro {
  grid-area: 1 / 1;
  align-self: end;
  padding-bottom: 3.2rem;
}

.future-stores__intro h1 {
  max-width: 7ch;
  margin: 0;
  color: inherit;
  font-size: clamp(5.6rem, 7vw, 11.5rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.future-stores__atlas {
  position: relative;
  grid-area: 1 / 2 / span 2;
  align-self: center;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 1;
  touch-action: none;
  touch-action: pinch-zoom;
}

.future-stores__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.future-stores__canvas:active {
  cursor: grabbing;
}

.future-stores__hint {
  position: absolute;
  bottom: 0;
  width: 100%;
  margin: 0;
  color: var(--future-muted);
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-align: center;
  pointer-events: none;
}

.future-stores__marker {
  position: absolute;
  top: 0;
  left: 0;
  width: 4.4rem;
  height: 4.4rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--future-paper);
  font: inherit;
  cursor: pointer;
}

.future-stores__marker::before {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 0.85rem;
  height: 0.85rem;
  transform: translate(-50%, -50%);
  border: 2px solid #141c2d;
  border-radius: 50%;
  background: var(--future-accent);
  box-shadow: 0 0 0 1px var(--future-accent), 0 0 16px var(--future-accent);
  content: '';
}

.future-stores__marker span {
  position: absolute;
  top: 50%;
  left: calc(50% + 1.05rem);
  width: max-content;
  max-width: 10rem;
  overflow: hidden;
  transform: translateY(-50%);
  padding: 0.24rem 0.7rem;
  border: 1px solid #45516a;
  border-radius: 0.4rem;
  background: #0f192a;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.future-stores__marker[data-label-side='left'] span {
  right: calc(50% + 1.05rem);
  left: auto;
}

.future-stores__marker:hover span,
.future-stores__marker:focus-visible span {
  border-color: var(--future-accent);
}

.future-stores__cities {
  grid-area: 2 / 1;
  align-self: start;
  max-width: 33rem;
  margin: 0;
  padding: 0;
  border-top: 1px solid #445169;
  list-style: none;
}

.future-stores__city {
  display: block;
  width: 100%;
  min-height: 6.4rem;
  padding: 1rem 0.4rem;
  border: 0;
  border-bottom: 1px solid #445169;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.future-stores__city-name,
.future-stores__region {
  display: block;
}

.future-stores__city-name {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.future-stores__region {
  color: var(--future-muted);
  font-size: 1.2rem;
  line-height: 1.5;
}

.future-stores__city:hover .future-stores__city-name {
  color: var(--future-accent);
}

.future-stores button:focus-visible {
  outline: 2px solid var(--future-accent);
  outline-offset: 3px;
}

.future-stores__dialog {
  position: fixed;
  inset: auto 0 clamp(1.2rem, 4vh, 3.6rem);
  width: min(74rem, calc(100% - 1.6rem));
  max-width: none;
  max-height: calc(100dvh - clamp(2.4rem, 8vh, 7.2rem));
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--future-ink);
}

.future-stores__dialog::backdrop {
  background: rgb(4 10 20 / 64%);
}

.future-stores__card {
  position: relative;
  max-height: inherit;
  overflow: auto;
  border: 1px solid #dad2be;
  border-radius: 1.2rem;
  background: radial-gradient(ellipse at 95% 1%, #eedbbb 0, transparent 56%), var(--future-paper);
  box-shadow: 0 1.5rem 5.5rem rgb(0 0 0 / 38%);
  transform-origin: center bottom;
}

.future-stores__dialog[open] .future-stores__card {
  animation: future-stores-card-enter 560ms cubic-bezier(0.17, 1, 0.3, 1) both;
}

.future-stores__card-image {
  aspect-ratio: 16 / 10;
  background: #172337;
}

.future-stores__card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.future-stores__card-body {
  padding: clamp(2.4rem, 5vw, 4rem);
}

.future-stores__card h2 {
  margin: 0;
  color: inherit;
  font-size: clamp(4rem, 9vw, 8rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.future-stores__card p {
  margin: 0.7rem 0 0;
  font-size: clamp(1.3rem, 2vw, 1.65rem);
}

.future-stores__card .future-stores__card-address {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgb(13 20 35 / 18%);
  font-size: 1.35rem;
  line-height: 1.4;
}

.future-stores__card-address a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.3rem;
}

.future-stores__close {
  position: absolute;
  z-index: 1;
  top: 1.2rem;
  right: 1.2rem;
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.65rem;
  line-height: 1;
  cursor: pointer;
}

.future-stores__close::before {
  position: absolute;
  inset: 0.6rem;
  border: 1px solid rgb(13 20 35 / 30%);
  border-radius: 50%;
  background: var(--future-paper);
  content: '';
}

.future-stores__close span {
  position: relative;
}

.future-stores button.future-stores__close:focus-visible {
  outline-color: var(--future-ink);
}

@keyframes future-stores-card-enter {
  from { opacity: 0; transform: perspective(90rem) translateY(110%) rotateX(27deg) scale(0.93); }
  to { opacity: 1; transform: perspective(90rem) translateY(0) rotateX(0) scale(1); }
}

html:has(.future-stores__dialog[open]) {
  overflow: hidden;
}

@media (max-width: 749px) {
  .future-stores__layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    min-height: 0;
    padding: 3.8rem 2rem 4.6rem;
  }

  .future-stores__intro,
  .future-stores__atlas,
  .future-stores__cities {
    grid-area: auto;
  }

  .future-stores__intro {
    padding-bottom: 0;
  }

  .future-stores__intro h1 {
    max-width: none;
    font-size: clamp(4.4rem, 9.7vw, 6.5rem);
  }

  .future-stores__atlas {
    width: min(100%, 49rem);
    margin: -0.5rem auto 1.8rem;
  }

  .future-stores__cities {
    width: 100%;
    max-width: 49rem;
    justify-self: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .future-stores__dialog[open] .future-stores__card {
    animation: none;
  }
}
