/* Mapply responsive finishing layer
   Loaded last so one predictable system controls mobile geometry. */

body.mapply-v4 .header-cta img {
  filter: none !important;
  object-fit: contain;
}

body.mapply-v4 .hero-copy-v4 h1,
body.mapply-v4 .section-heading h2 {
  text-wrap: balance;
}

/* Pull the complete hero message upward without changing its internal order. */
body.mapply-v4 .hero-v26 {
  padding-top: 14px !important;
}

body.mapply-v4 .hero-guide-faces-v4 i {
  flex: 0 0 auto;
  width: clamp(32px, 3vw, 44px);
  height: clamp(32px, 3vw, 44px);
  aspect-ratio: 1 / 1;
}

body.mapply-v4 .hero-guide-faces-v4 i > img:first-child {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* Keep the two platform identities prominent and immediately above the three
   business benefit cards. */
body.mapply-v4 .hero-platforms-v4 {
  gap: 12px;
  margin-top: 22px;
}

body.mapply-v4 .hero-platforms-v4 > span {
  min-width: 190px;
  min-height: 58px;
  padding: 10px 18px;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(17, 69, 132, .08);
}

body.mapply-v4 .hero-platforms-v4 img {
  width: auto;
  max-width: 100%;
  height: 34px;
}

body.mapply-v4 .hero-platforms-v4 + .hero-outcomes-v4 {
  margin-top: 14px;
}

/* The status copy sits on its own row, so changing names/statuses cannot
   resize or push the avatar, route, destination pin, or arrival dot. */
body.mapply-v4 .review-arrival-v4 {
  grid-template-columns: 48px minmax(96px, 1fr) 36px !important;
  grid-template-rows: auto auto;
  width: min(540px, calc(100% - 40px));
  min-height: 82px;
  border-radius: 22px;
}

body.mapply-v4 .review-arrival-v4 strong {
  grid-column: 1 / -1;
  grid-row: 2;
  display: block;
  width: 100%;
  min-height: 18px;
  text-align: center;
  white-space: normal !important;
}

body.mapply-v4 .review-arrival-track-v4 {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  min-width: 0;
}

body.mapply-v4 .review-arrival-destination-v4 {
  grid-column: 3;
  grid-row: 1;
}

body.mapply-v4 .review-arrival-guide-v4 {
  grid-column: 1;
  grid-row: 1;
}

/* Show each real screen once. */
body.mapply-v4 .screen-track {
  scroll-snap-type: x mandatory;
  overscroll-behavior-inline: contain;
}

body.mapply-v4 .app-screen-card {
  scroll-snap-align: center;
}

/* App gallery screens are requested before they enter the carousel viewport.
   Until decoding completes, show a clean light screen instead of the black
   device-shell fill. */
body.mapply-v4 .screen-gallery .device-frame {
  background: #f8fbff;
  box-shadow:
    inset 0 0 0 4px #121923,
    0 25px 42px rgba(12, 32, 63, .22),
    0 7px 18px rgba(12, 32, 63, .13);
}

body.mapply-v4 .screen-gallery .device-frame > img {
  display: block;
  opacity: 1;
  background: linear-gradient(180deg, #fff 0%, #f5f8ff 100%);
}

/* Real Local Guide example: reserve a stable vertical slot for every part of
   the story. The taller two-line arrival message can no longer collide with
   the Guide roster or the review card below it. */
body.mapply-v4 #network .network-review-stage-v3,
body.mapply-v4 #network .network-story-panel-v3 {
  min-height: 770px !important;
}

body.mapply-v4 #network .network-arrival-v4 {
  top: 222px !important;
}

body.mapply-v4 #network .network-guide-ring {
  top: 332px !important;
}

body.mapply-v4 #network .review-roster-label-v45 {
  top: 402px !important;
}

body.mapply-v4 #network .network-live-review-v3 {
  top: 432px !important;
}

@media (max-width: 720px) {
  html body.mapply-v4 .site-header[data-site-header],
  html body.mapply-v4 .site-header[data-site-header].is-scrolled {
    min-height: 48px !important;
  }

  html body.mapply-v4 .site-header[data-site-header] .header-inner,
  html body.mapply-v4 .site-header[data-site-header].is-scrolled .header-inner {
    min-height: 47px !important;
  }

  body.mapply-v4 .hero-v26 {
    overflow: hidden !important;
    padding: 10px 10px 18px !important;
  }

  body.mapply-v4 .hero-overview-v4 {
    gap: 8px !important;
  }

  body.mapply-v4 .hero-media-v4 {
    width: 100%;
    overflow: visible;
  }

  body.mapply-v4 .hero-phone-stage-v4 {
    width: min(100%, 400px) !important;
    height: 382px !important;
    margin-inline: auto !important;
  }

  body.mapply-v4 .hero-phone-stage-v4 .hero-phone-main {
    width: clamp(158px, 43vw, 172px) !important;
  }

  body.mapply-v4 .hero-phone-stage-v4 .hero-phone-left,
  body.mapply-v4 .hero-phone-stage-v4 .hero-phone-right {
    top: 48px !important;
    width: clamp(116px, 32vw, 130px) !important;
  }

  body.mapply-v4 .hero-phone-stage-v4 .hero-phone-left {
    left: 4px !important;
    transform: rotate(-5deg) translateZ(-20px) !important;
  }

  body.mapply-v4 .hero-phone-stage-v4 .hero-phone-right {
    right: 4px !important;
    transform: rotate(5deg) translateZ(-20px) !important;
  }

  body.mapply-v4 .hero-orbit-symbol-v43 {
    transform: scale(.82);
  }

  body.mapply-v4 .hero-network-kicker-v4 {
    grid-template-columns: 24px minmax(0, 1fr) 36px !important;
    gap: 7px !important;
    width: 100%;
    min-height: 54px;
    margin: 0;
    border-radius: 16px;
  }

  body.mapply-v4 .hero-network-kicker-v4 strong {
    font-size: clamp(.68rem, 3.1vw, .78rem) !important;
    line-height: 1.18;
  }

  body.mapply-v4 .hero-network-kicker-v4 small {
    font-size: clamp(.56rem, 2.55vw, .64rem) !important;
  }

  body.mapply-v4 .hero-copy-v4 h1 {
    margin-top: 14px !important;
    max-width: 100%;
    font-size: clamp(2rem, 9.5vw, 2.48rem) !important;
    letter-spacing: -.052em !important;
    line-height: 1.01 !important;
    text-wrap: pretty;
  }

  body.mapply-v4 .hero-copy-v4 > p {
    margin-top: 14px;
    font-size: clamp(.81rem, 3.55vw, .9rem) !important;
    line-height: 1.56;
  }

  body.mapply-v4 .hero-platforms-v4 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    margin-top: 17px !important;
  }

  body.mapply-v4 .hero-platforms-v4 > span {
    min-width: 0 !important;
    min-height: 52px !important;
    padding: 9px 10px !important;
    border-radius: 14px !important;
  }

  body.mapply-v4 .hero-platforms-v4 img {
    width: auto !important;
    max-width: 100% !important;
    height: 29px !important;
  }

  body.mapply-v4 .hero-outcomes-v4 {
    gap: 8px;
    margin-top: 11px !important;
  }

  body.mapply-v4 .hero-outcomes-v4 article {
    min-height: 70px;
  }

  body.mapply-v4 .hero-overview-v4 > .hero-guide-rail-v4 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    min-height: 0;
    padding: 13px !important;
  }

  body.mapply-v4 .hero-guide-faces-v4 {
    display: flex !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 7px !important;
    width: 100%;
    overflow: hidden;
  }

  body.mapply-v4 .hero-guide-faces-v4 i {
    width: clamp(31px, 9vw, 38px) !important;
    height: clamp(31px, 9vw, 38px) !important;
  }

  body.mapply-v4 .hero-guide-faces-v4 i:nth-child(n + 9) {
    display: none !important;
  }

  body.mapply-v4 .review-arrival-v4 {
    display: grid !important;
    grid-template-columns: 42px minmax(70px, 1fr) 31px !important;
    grid-template-rows: auto auto !important;
    gap: 7px 8px !important;
    width: calc(100% - 24px) !important;
    min-height: 80px !important;
    padding: 8px 10px !important;
    border-radius: 18px !important;
  }

  body.mapply-v4 .review-arrival-v4 strong {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    min-height: 17px;
    font-size: .64rem !important;
    line-height: 1.25;
    text-align: center !important;
  }

  body.mapply-v4 .review-arrival-guide-v4 {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  body.mapply-v4 .review-arrival-track-v4 {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  body.mapply-v4 .review-arrival-destination-v4 {
    grid-column: 3 !important;
    grid-row: 1 !important;
  }

  body.mapply-v4 .screen-gallery {
    margin-inline: -2px;
  }

  body.mapply-v4 .screen-track {
    gap: 12px;
    padding-inline: 12px;
  }

  body.mapply-v4 .app-screen-card {
    flex-basis: min(76vw, 286px);
  }

  body.mapply-v4 #network .network-review-stage-v3 {
    min-height: 735px !important;
  }

  body.mapply-v4 #network .network-story-panel-v3 {
    min-height: auto !important;
  }

  body.mapply-v4 #network .network-arrival-v4 {
    top: 196px !important;
  }

  body.mapply-v4 #network .network-guide-ring {
    top: 302px !important;
  }

  body.mapply-v4 #network .review-roster-label-v45 {
    top: 356px !important;
  }

  body.mapply-v4 #network .network-live-review-v3 {
    top: 393px !important;
  }

  /* Prevent scroll-triggered reveal delays from presenting blank sections. */
  body.mapply-v4 .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 390px) {
  body.mapply-v4 .hero-phone-stage-v4 {
    height: 366px !important;
  }

  body.mapply-v4 .hero-phone-stage-v4 .hero-phone-main {
    width: 154px !important;
  }

  body.mapply-v4 .hero-phone-stage-v4 .hero-phone-left,
  body.mapply-v4 .hero-phone-stage-v4 .hero-phone-right {
    width: 112px !important;
  }

  body.mapply-v4 .hero-copy-v4 h1 {
    font-size: clamp(1.86rem, 9.25vw, 2.18rem) !important;
  }

  body.mapply-v4 .hero-guide-faces-v4 i:nth-child(n + 8) {
    display: none !important;
  }
}

@media (max-width: 360px) {
  body.mapply-v4 .hero-phone-stage-v4 {
    height: 350px !important;
  }

  body.mapply-v4 .hero-phone-stage-v4 .hero-phone-main {
    width: 148px !important;
  }

  body.mapply-v4 .hero-phone-stage-v4 .hero-phone-left,
  body.mapply-v4 .hero-phone-stage-v4 .hero-phone-right {
    top: 50px !important;
    width: 104px !important;
  }

  body.mapply-v4 .hero-copy-v4 h1 {
    font-size: 1.78rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.mapply-v4 .review-arrival-track-v4 > i,
  body.mapply-v4 .hero-guide-faces-v4 i {
    animation: none !important;
  }
}
