.download-page {
  overflow-x: clip;
}

.download-page .download-hero {
  width: min(100% - 40px, 1320px);
  min-height: calc(100svh - 68px);
  grid-template-columns: minmax(0, 0.88fr) minmax(500px, 1.04fr);
  gap: clamp(34px, 4.8vw, 78px);
  padding: clamp(70px, 8vw, 108px) 0 clamp(54px, 7vw, 88px);
}

.download-page .download-hero .page-hero {
  position: relative;
  z-index: 2;
}

.download-page .download-hero .page-hero h1 {
  max-width: 720px;
  font-size: clamp(4.2rem, 7vw, 7.1rem);
  letter-spacing: -0.055em;
}

.download-page .download-hero .page-hero > p:not(.story-label):not(.rating-note) {
  max-width: 700px;
  color: rgba(247, 247, 244, 0.64);
}

.download-page .rating-note {
  color: rgba(247, 247, 244, 0.72);
  font-weight: 650;
}

.app-store-proof {
  position: relative;
  display: block;
  min-width: 0;
  height: clamp(560px, 47vw, 680px);
  isolation: isolate;
  perspective: 1500px;
  touch-action: manipulation;
}

.app-store-proof:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 8px;
  border-radius: 32px;
}

.app-store-preview-card,
.app-store-rating-card {
  position: absolute;
  margin: 0;
  transform-style: preserve-3d;
  will-change: transform;
  transition:
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 320ms ease;
}

.app-store-preview-card {
  top: 1%;
  right: -2%;
  z-index: 1;
  width: clamp(310px, 29vw, 405px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.54);
  border-radius: clamp(26px, 2.4vw, 34px);
  background: #a8abb2;
  box-shadow:
    0 44px 92px rgba(0, 0, 0, 0.54),
    inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transform:
    translate3d(var(--proof-x, 0px), var(--proof-y, 0px), -24px)
    rotateX(var(--proof-tilt-x, 0deg))
    rotateY(var(--proof-tilt-y, 0deg))
    rotateZ(3.25deg);
}

.app-store-preview-card img {
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.app-store-rating-card {
  left: -4%;
  bottom: 9%;
  z-index: 2;
  width: clamp(440px, 39vw, 560px);
  padding: clamp(26px, 2.5vw, 38px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: clamp(26px, 2.5vw, 36px);
  background: linear-gradient(145deg, rgba(31, 32, 36, 0.97), rgba(8, 9, 11, 0.96));
  box-shadow:
    0 42px 88px rgba(0, 0, 0, 0.56),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  transform:
    translate3d(var(--proof-x, 0px), var(--proof-y, 0px), 46px)
    rotateX(var(--proof-tilt-x, 0deg))
    rotateY(var(--proof-tilt-y, 0deg))
    rotateZ(-2deg);
}

.app-store-proof.is-pressed .app-store-rating-card {
  transform:
    translate3d(var(--proof-x, 0px), calc(var(--proof-y, 0px) + 3px), 46px)
    rotateX(var(--proof-tilt-x, 0deg))
    rotateY(var(--proof-tilt-y, 0deg))
    rotateZ(-1.2deg)
    scale(0.992);
}

.app-store-rating-header {
  display: grid;
  grid-template-columns: clamp(94px, 9vw, 128px) minmax(0, 1fr);
  gap: clamp(20px, 2.2vw, 30px);
  align-items: center;
}

.app-store-icon {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 25%;
  background: #030303;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.035),
    0 14px 32px rgba(0, 0, 0, 0.36);
}

.app-store-icon img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.app-store-rating-header h2 {
  margin-bottom: 7px;
  color: #fff;
  font-size: clamp(1.72rem, 2.65vw, 2.55rem);
  font-weight: 760;
  letter-spacing: -0.035em;
  line-height: 1;
}

.app-store-rating-header p {
  margin-bottom: 0;
  color: rgba(247, 247, 244, 0.58);
  font-size: clamp(1.18rem, 1.9vw, 1.68rem);
  line-height: 1.32;
}

.app-store-rating-rule {
  height: 1px;
  margin: clamp(24px, 2.5vw, 34px) 0 clamp(18px, 2vw, 28px);
  background: rgba(255, 255, 255, 0.15);
}

.app-store-rating-score {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 42px);
}

.app-store-rating-score strong {
  color: #fff;
  font-size: clamp(3.25rem, 5.6vw, 5.1rem);
  font-weight: 520;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.app-store-stars {
  color: #fff;
  font-size: clamp(1.72rem, 3vw, 2.5rem);
  letter-spacing: 0.12em;
  line-height: 1;
  white-space: nowrap;
}

.app-store-rating-count {
  margin: 17px 0 0;
  color: rgba(247, 247, 244, 0.48);
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  line-height: 1;
}

@media (max-width: 1100px) {
  .download-page .download-hero {
    grid-template-columns: minmax(0, 0.82fr) minmax(430px, 1fr);
    gap: 30px;
  }

  .app-store-rating-card {
    left: -1%;
  }
}

@media (max-width: 980px) {
  .download-page .download-hero {
    width: min(100% - 40px, var(--max));
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .download-page .download-hero .page-hero {
    max-width: 760px;
  }

  .app-store-proof {
    width: min(100%, 760px);
    height: 650px;
    margin: 0 auto;
  }

  .app-store-preview-card {
    right: 2%;
    width: min(48vw, 360px);
  }

  .app-store-rating-card {
    left: 4%;
    bottom: 7%;
    width: min(72vw, 540px);
  }
}

@media (max-width: 720px) {
  .download-page .download-hero {
    width: min(100% - 28px, var(--max));
    gap: 10px;
    padding: 58px 0 52px;
  }

  .download-page .download-hero .page-hero h1 {
    font-size: clamp(3.05rem, 15vw, 4.6rem);
  }

  .app-store-proof {
    height: 540px;
    margin-top: 8px;
  }

  .app-store-preview-card {
    top: 3%;
    right: -1%;
    width: min(68vw, 292px);
    border-radius: 26px;
  }

  .app-store-rating-card {
    left: 0;
    bottom: 4%;
    width: min(94%, 405px);
    padding: 22px;
    border-radius: 27px;
  }

  .app-store-rating-header {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 17px;
  }

  .app-store-rating-header h2 {
    font-size: clamp(1.4rem, 6.4vw, 1.85rem);
  }

  .app-store-rating-header p {
    font-size: clamp(1rem, 4.7vw, 1.28rem);
  }

  .app-store-rating-rule {
    margin: 20px 0 18px;
  }

  .app-store-rating-score {
    gap: 16px;
  }

  .app-store-rating-score strong {
    font-size: clamp(3rem, 14vw, 4rem);
  }

  .app-store-stars {
    font-size: clamp(1.3rem, 6vw, 1.65rem);
    letter-spacing: 0.08em;
  }

  .app-store-rating-count {
    margin-top: 12px;
    font-size: 1.1rem;
  }
}

@media (max-width: 410px) {
  .app-store-proof {
    height: 500px;
  }

  .app-store-preview-card {
    width: 250px;
  }

  .app-store-rating-card {
    width: 96%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-store-preview-card,
  .app-store-rating-card {
    transition: none;
  }
}
