.locations-screen {
  width: 100%;
  max-width: 430px;
  height: 100%;
  padding-top: 54px;
  box-sizing: border-box;
  overflow: hidden;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  background: #000;
  z-index: 3;
  position: absolute;
  top: 0;
  left: 0;
}

.locations-header {
  align-self: stretch;
  padding: 3px 20px 8px;
  box-sizing: border-box;
}

.locations-title {
  color: #fff;
  font-size: 34px;
  font-weight: 600;
  line-height: 41px;
  letter-spacing: 0.4px;
}

.locations-grid {
  align-self: stretch;
  padding: 0 20px;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 10px;
}

.location-card {
  width: 100%;
  aspect-ratio: 190 / 122;
  padding: 12px;
  box-sizing: border-box;
  border: 0;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  background: none;
  color: #fff;
  text-align: left;
}

.location-card-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.location-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.08) 0%,
    rgba(0, 0, 0, 0.48) 100%
  );
}

.location-name,
.location-arrow {
  position: relative;
  z-index: 1;
}

.location-name {
  max-width: 130px;
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  line-height: 22px;
}

/* .location-arrow {
  display: flex;
  gap: 3px;
  align-items: center;
}

.location-arrow span {
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  transform: skewX(-24deg);
} */

.location-characters {
  position: absolute;
  z-index: 1;
  left: 7px;
  top: 5px;
  display: flex;
  align-items: center;
}

.location-notification {
  width: 18px;
  height: 18px;
  padding: 2px 5px;
  box-sizing: border-box;
  position: absolute;
  left: 88%;
  top: 3%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  border-radius: 999px;
  background: #ff383c;

  font-size: 12px;

  z-index: 1;
}

.location-character {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.location-character + .location-character {
  margin-left: -8px;
}

.cta {
  transition: 1s;
  box-shadow: 6px 6px 0 black;
  cursor: pointer;
  /* transform: skewX(-15deg); */
}

.cta * {
  cursor: pointer;
}

.cta:focus {
  outline: none;
}

.cta:hover {
  transition: 0.5s;
  box-shadow: 10px 10px 0 #fbc638;
}

.cta span {
  transition: 0.5s;
  margin-right: 0px;
  /* transform: skewX(15deg); */
}

.cta:hover span {
  transition: 0.5s;
  margin-right: 15px;
}

/**************SVG****************/

.cta span path.one {
  transition: 0.4s;
  transform: translateX(-60%);
}

.cta span path.two {
  transition: 0.5s;
  transform: translateX(-30%);
}

.cta:hover path.three {
  -webkit-animation: color_anim 1s infinite 0.2s;
  animation: color_anim 1s infinite 0.2s;
}

.cta:hover path.one {
  transform: translateX(0%);
  -webkit-animation: color_anim 1s infinite 0.6s;
  animation: color_anim 1s infinite 0.6s;
}

.cta:hover path.two {
  transform: translateX(0%);
  -webkit-animation: color_anim 1s infinite 0.4s;
  animation: color_anim 1s infinite 0.4s;
}

/* SVG animations */

@-webkit-keyframes color_anim {
  0% {
    fill: white;
  }
  50% {
    fill: #fbc638;
  }
  100% {
    fill: white;
  }
}

@keyframes color_anim {
  0% {
    fill: white;
  }
  50% {
    fill: #fbc638;
  }
  100% {
    fill: white;
  }
}

.location-svg {
  width: auto;
  height: 18.25px;
}

.cta.disabled,
.cta.disabled * {
  pointer-events: none !important;
}


.locations-screen:not(.hidden) {
  animation: locations-screen-enter 220ms cubic-bezier(0.2, 0.9, 0.2, 1);
}

@keyframes locations-screen-enter {
  from {
    opacity: 0;
    transform: scale(1.045);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}
.map-screen {
  transform: scale(1);
  filter: none;

  transition:
    transform 560ms cubic-bezier(0.2, 0.9, 0.2, 1),
    filter 560ms cubic-bezier(0.2, 0.9, 0.2, 1);

  will-change: transform, filter;
}

.map-screen-zooming {
  pointer-events: none;
}

/* Location Card */

.locations-screen:not(.hidden) .location-card {
  animation: location-card-enter 420ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
}

.locations-screen:not(.hidden) .location-card:nth-child(1) {
  animation-delay: 40ms;
}

.locations-screen:not(.hidden) .location-card:nth-child(2) {
  animation-delay: 70ms;
}

.locations-screen:not(.hidden) .location-card:nth-child(3) {
  animation-delay: 100ms;
}

.locations-screen:not(.hidden) .location-card:nth-child(4) {
  animation-delay: 130ms;
}

.locations-screen.leaving-location {
  animation: locations-screen-leave 180ms cubic-bezier(0.4, 0, 1, 1) both;
}

@keyframes location-card-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.map-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
}

.map-canvas {
  position: absolute;
  width: 700px;
  height: 1200px;

  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  background-size: 700px 1200px;
  background-position: center;
  background-repeat: no-repeat;
}

.map-canvas.map-day {
  --maps-city-name-primary: black;
  --maps-city-name-secondary: #a4a4a4;
  --maps-poi-park-text: #1ca00d;
  --maps-poi-school-text: #a35f31;
  --maps-poi-island-text: #4b4d4d;
}

.map-canvas.map-night {
  --maps-city-name-primary: white;
  --maps-city-name-secondary: #bec1c4;
  --maps-poi-park-text: #40b17f;
  --maps-poi-school-text: #bb8b72;
  --maps-poi-island-text: #c0cbd7;
}

.map-label {
  position: absolute;
  white-space: normal;
  pointer-events: none;
}

.map-city-primary {
  color: var(--maps-city-name-primary);
  font-size: 13px;
  font-weight: 590;
  line-height: 16px;
}

.map-city-secondary {
  color: var(--maps-city-name-secondary);
  font-size: 11px;
  font-weight: 590;
  line-height: 13px;
}

.map-city-large {
  font-size: 19px;
  font-weight: 700;
  line-height: 24px;
}

.map-poi-park {
  color: var(--maps-poi-park-text);
  font-size: 9px;
  font-weight: 700;
  line-height: 11px;
}

.map-poi-school {
  color: var(--maps-poi-school-text);
  font-size: 9px;
  font-weight: 700;
  line-height: 11px;
}

.map-night .map-node-title {
  color: white;
}

/* Modern phone map refactor ---------------------------------------------------
   Loaded after phone.css so map-owned marker, sheet, and reduced-motion styles
   live here instead of fighting the broader phone shell cascade. */
.phone-map-app.map-screen-container {
  --map-top-offset: calc(var(--phone-status-h, 54px) + 8px);
  --map-sheet-bg: rgba(255, 255, 255, 0.78);
  --map-sheet-border: rgba(255, 255, 255, 0.44);
  background: #dce6ef;
  overflow: hidden;
}

.phone-map-app.map-night {
  --map-sheet-bg: rgba(25, 28, 36, 0.78);
  --map-sheet-border: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.phone-map-bg.map-empty-background::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(10, 132, 255, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0));
}

.phone-map-app.map-night .phone-map-bg.map-empty-background::after {
  background:
    radial-gradient(circle at 74% 16%, rgba(142, 92, 255, 0.20), transparent 34%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.08));
}

.phone-map-top-controls {
  position: absolute;
  z-index: 5;
  inset-inline: 14px;
  top: var(--map-top-offset);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  pointer-events: none;
}

.phone-map-search-chip,
.phone-map-weather-chip {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.72);
  color: #111827;
  backdrop-filter: blur(22px) saturate(1.24);
  -webkit-backdrop-filter: blur(22px) saturate(1.24);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.phone-map-search-chip {
  padding: 0 14px;
  min-width: 0;
  font-size: 14px;
  font-weight: 680;
}

.phone-map-weather-chip {
  padding: 0 12px;
  border: 0;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.phone-map-app.map-night .phone-map-search-chip,
.phone-map-app.map-night .phone-map-weather-chip {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(17, 24, 39, 0.68);
  color: #ffffff;
}

.phone-map-search-icon,
.phone-map-weather-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: currentColor;
}

.phone-map-canvas.map-screen {
  position: relative;
  z-index: 1;
  overflow: hidden;
  contain: layout paint;
}

.phone-map-canvas.map-screen .map-background {
  z-index: 0;
}

.phone-map-marker.map-node-card {
  position: absolute;
  left: var(--marker-left);
  top: var(--marker-top);
  width: 86px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translate(-50%, -50%);
  z-index: 3;
  contain: layout paint;
  pointer-events: none;
}

.phone-map-marker.is-selected {
  z-index: 4;
}

.phone-map-marker.is-disabled {
  opacity: 0.48;
  filter: saturate(0.55);
}

.phone-map-avatar-stack.map-node-avatar-wrap {
  position: absolute;
  z-index: 3;
  top: -16px;
  left: 50%;
  width: auto;
  min-width: 0;
  transform: translateX(-50%);
  justify-content: center;
  pointer-events: none;
}

.phone-map-avatar.map-node-avatar,
.phone-map-avatar-more {
  width: 24px;
  height: 24px;
  margin-left: -7px;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  background: #111827;
  box-shadow: 0 5px 12px rgba(17, 24, 39, 0.18);
}

.phone-map-avatar.map-node-avatar:first-child,
.phone-map-avatar-more:first-child {
  margin-left: 0;
}

.phone-map-avatar-more {
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.phone-map-marker-main.map-node-main {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.phone-map-pin-button.map-node-image-and-notif {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  pointer-events: auto;
  cursor: pointer;
  outline: none;
}

.phone-map-pin.map-node-image {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 20px 20px 20px 9px;
  background: var(--marker-color, #1f2937) !important;
  background-image: none !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: auto;
  transform: rotate(-45deg);
  transform-origin: center;
  box-shadow:
    0 14px 24px rgba(17, 24, 39, 0.24),
    0 0 0 7px var(--marker-shadow, rgba(17, 24, 39, 0.14));
}

.phone-map-pin.map-node-image::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.08);
}

.phone-map-pin.map-node-image::after {
  content: "";
  position: absolute;
  inset: -10px;
  border: 2px solid var(--marker-color, #1f2937);
  border-radius: 26px 26px 26px 11px;
  opacity: 0;
  transform: scale(0.78);
  pointer-events: none;
}

.phone-map-pin.map-node-image.pulsing-once {
  animation: phone-map-pin-press 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.phone-map-pin.map-node-image.pulsing-once::after {
  animation: phone-map-pin-ring 420ms ease-out;
}

.phone-map-pin.map-node-image.selected-pulsing {
  animation: phone-map-pin-selected 2.4s ease-in-out infinite;
}

.phone-map-marker-label.map-node-title {
  max-width: 112px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: #111827;
  font-size: 12px;
  font-weight: 800;
  line-height: 14px;
  letter-spacing: -0.08px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.phone-map-app.map-night .phone-map-marker-label.map-node-title {
  background: rgba(17, 24, 39, 0.72);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.phone-map-badge.map-node-notification-badge {
  top: 0;
  right: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  background: #ff3b30;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  z-index: 4;
}

.phone-map-sheet.location-sheet {
  inset-inline: 10px;
  right: 10px;
  left: 10px;
  bottom: calc(var(--phone-safe-bottom, 101px) - 6px);
  width: auto;
  max-height: 335px;
  padding: 0 0 16px;
  border: 1px solid var(--map-sheet-border);
  border-radius: 30px 30px 22px 22px;
  background: var(--map-sheet-bg);
  color: #111827;
  backdrop-filter: blur(28px) saturate(1.24);
  -webkit-backdrop-filter: blur(28px) saturate(1.24);
  box-shadow: 0 -18px 48px rgba(17, 24, 39, 0.24);
  overflow: hidden;
  contain: layout paint;
}

.phone-map-app.map-night .phone-map-sheet.location-sheet {
  color: #ffffff;
}

.phone-map-sheet .sheet-glass {
  display: none;
}

.phone-map-sheet .sheet-header {
  padding: 10px 16px 8px;
}

.phone-map-sheet .sheet-title-row {
  align-items: flex-start;
}

.phone-map-sheet .sheet-title {
  color: currentColor;
  font-size: 22px;
  font-weight: 820;
  line-height: 27px;
  letter-spacing: -0.35px;
}

.phone-map-sheet-eyebrow {
  margin-bottom: 3px;
  color: var(--phone-blue, #0a84ff);
  font-size: 11px;
  font-weight: 900;
  line-height: 13px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.phone-map-sheet-subtitle {
  max-width: 280px;
  margin-top: 4px;
  color: rgba(60, 60, 67, 0.68);
  font-size: 13px;
  font-weight: 650;
  line-height: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone-map-app.map-night .phone-map-sheet-subtitle {
  color: rgba(255, 255, 255, 0.62);
}

.phone-map-sheet .sheet-handle {
  width: 46px;
  height: 5px;
  background: rgba(60, 60, 67, 0.24);
}

.phone-map-app.map-night .phone-map-sheet .sheet-handle {
  background: rgba(255, 255, 255, 0.28);
}

.phone-map-primary-action.location-button {
  min-height: 46px;
  padding-inline: 16px;
  border-radius: 18px;
  background: var(--phone-blue, #0a84ff);
  box-shadow: 0 10px 22px rgba(10, 132, 255, 0.24);
}

.phone-map-sheet-gallery.sheet-image-row {
  gap: 10px;
  padding: 0 16px 4px;
}

.phone-map-sheet-gallery .sheet-image {
  width: 112px;
  height: 82px;
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.phone-map-locations-screen.locations-screen {
  background: #f7f8fb;
  padding-top: var(--phone-status-h, 54px);
  padding-bottom: var(--phone-safe-bottom, 101px);
}

.phone-map-locations-grid.locations-grid {
  padding-inline: 14px;
  gap: 12px;
}

.phone-map-location-card.location-card {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.12);
}

@keyframes phone-map-pin-press {
  0% { transform: rotate(-45deg) scale(1); }
  35% { transform: rotate(-45deg) scale(0.88); }
  100% { transform: rotate(-45deg) scale(1); }
}

@keyframes phone-map-pin-ring {
  0% { opacity: 0.55; transform: scale(0.72); }
  100% { opacity: 0; transform: scale(1.72); }
}

@keyframes phone-map-pin-selected {
  0%, 100% { transform: rotate(-45deg) scale(1); }
  50% { transform: rotate(-45deg) scale(1.075); }
}

@media (prefers-reduced-motion: reduce) {
  .phone-map-pin.map-node-image,
  .phone-map-pin.map-node-image::after,
  .phone-map-canvas.map-screen,
  .phone-map-sheet.location-sheet {
    animation: none !important;
    transition-duration: 1ms !important;
  }
}
