:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --page: #f5f5f7;
  --surface: #ffffff;
  --text: #111114;
  --muted: #8e8e93;
  --hairline: #e5e5ea;
  --blue: #007aff;
  --blue-active: #0066d8;
  --bar: #8e8e93;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.08);
}

.store-page {
  padding: 22px 24px 0;
}

.app-hero {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 18px;
  padding: 4px 0 22px;
}

.app-icon {
  width: 118px;
  height: 118px;
  border-radius: 26px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.16);
}

.app-summary {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

h1,
h2,
p,
dl {
  margin: 0;
}

h1 {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 25px;
  line-height: 1.18;
  font-weight: 730;
  letter-spacing: 0;
}

.age-badge {
  flex: 0 0 auto;
  height: 22px;
  padding: 0 7px;
  border: 1px solid var(--muted);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 20px;
}

.rank {
  margin-top: 6px;
  color: var(--muted);
  font-size: 16px;
}

.install-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
}

.install-button {
  min-width: 138px;
  height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 16px;
  font-weight: 700;
  line-height: 40px;
  text-align: center;
  transition: background-color 160ms ease, transform 160ms ease;
}

.install-button:active {
  background: var(--blue-active);
  transform: scale(0.98);
}

.help-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 21px;
  font-weight: 800;
  cursor: pointer;
}

.metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-top: 24px;
}

.metric {
  min-width: 0;
  color: var(--muted);
}

.metric:nth-child(2) {
  text-align: center;
}

.metric:nth-child(3) {
  text-align: right;
}

.metric strong {
  display: block;
  color: var(--muted);
  font-size: 23px;
  line-height: 1.1;
  font-weight: 800;
}

.metric small {
  position: relative;
  top: -5px;
  font-size: 18px;
}

.metric span {
  display: block;
  margin-top: 3px;
  color: #d1d1d6;
  font-size: 13px;
  font-weight: 650;
}

.stars {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0;
  white-space: nowrap;
}

.section-block {
  padding: 22px 0;
  border-top: 1px solid var(--hairline);
}

.section-block h2 {
  margin-bottom: 16px;
  font-size: 25px;
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: 0;
}

.review-grid {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 24px;
  align-items: start;
}

.score-card {
  text-align: center;
}

.score-card strong {
  display: block;
  color: #4c4c50;
  font-size: 70px;
  line-height: 0.92;
  font-weight: 750;
}

.score-card span,
.rating-bars p {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.rating-bars {
  padding-top: 6px;
}

.rating-row {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 7px;
}

.rating-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: right;
}

.rating-row span::after {
  content: " ★";
  font-size: 10px;
}

.rating-row i {
  position: relative;
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--hairline);
}

.rating-row i::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--value);
  border-radius: inherit;
  background: var(--bar);
}

.rating-bars p {
  margin-top: 7px;
  text-align: right;
}

.version {
  color: #333338;
  font-size: 18px;
}

.info-block {
  padding-bottom: 16px;
}

.info-list > div {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--hairline);
}

.info-list > div:last-child {
  border-bottom: 0;
}

.info-list dt {
  min-width: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-list dd {
  margin: 0;
  color: #333338;
  font-size: 14px;
  line-height: 1.42;
  text-align: right;
}

.info-list a {
  color: var(--blue);
  font-weight: 650;
}

.disclaimer {
  padding: 13px 24px calc(16px + env(safe-area-inset-bottom));
  color: #a1a1a6;
  background: #eeeeef;
  line-height: 1.58;
}

.disclaimer strong {
  display: block;
  font-size: 13px;
}

.disclaimer p {
  margin-top: 2px;
  font-size: 12px;
  text-indent: 24px;
}

.modal,
.browser-tip {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
}

.modal.is-open,
.browser-tip.is-open {
  display: block;
}

.modal {
  background: rgba(0, 0, 0, 0.68);
}

.modal-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(86vw, 390px);
  max-height: 88vh;
  overflow: auto;
  transform: translate(-50%, -50%);
  border-radius: 16px;
  background: #fff;
  padding: 22px 22px 20px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.close-button {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #f2f2f7;
  cursor: pointer;
}

.close-button::before,
.close-button::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 9px;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #6e6e73;
}

.close-button::before {
  transform: rotate(45deg);
}

.close-button::after {
  transform: rotate(-45deg);
}

.modal-panel h2 {
  padding-right: 42px;
  font-size: 22px;
  letter-spacing: 0;
}

.guide-steps {
  position: relative;
  min-height: 342px;
  margin-top: 18px;
}

.guide-step {
  display: none;
  text-align: center;
}

.guide-step.active {
  display: block;
}

.phone-frame {
  position: relative;
  width: 190px;
  height: 270px;
  margin: 0 auto;
  border: 9px solid #1d1d1f;
  border-radius: 30px;
  background: #f5f5f7;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
}

.phone-dot {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 52px;
  height: 7px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #111114;
}

.phone-screen {
  position: absolute;
  inset: 24px 12px 12px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #eef6ff);
  color: #1d1d1f;
  font-size: 15px;
  font-weight: 700;
}

.settings-icon {
  width: 58px;
  height: 58px;
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 50%, #fff 0 16%, transparent 17%),
    conic-gradient(from 0deg, #8e8e93, #d1d1d6, #8e8e93);
}

.top-action {
  align-content: start;
  justify-content: end;
  padding: 16px;
  color: var(--blue);
}

.passcode {
  display: flex;
  gap: 13px;
}

.passcode span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #1d1d1f;
}

.install-final {
  align-content: end;
  padding: 18px;
  color: var(--blue);
}

.guide-step p {
  margin-top: 18px;
  color: var(--blue);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 650;
}

.step-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.step-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d6ecff;
  cursor: pointer;
}

.step-dots button.active {
  width: 22px;
  border-radius: 999px;
  background: #70bfff;
}

.profile-link {
  display: block;
  margin-top: 18px;
  color: #1da1ff;
  font-size: 14px;
  font-weight: 650;
  text-align: center;
}

.browser-tip {
  z-index: 60;
  background: rgba(0, 0, 0, 0.74);
}

.tip-arrow {
  position: absolute;
  top: 18px;
  right: 28px;
  width: 84px;
  height: 92px;
  border-top: 5px solid #fff;
  border-right: 5px solid #fff;
  border-radius: 0 28px 0 0;
}

.tip-arrow::after {
  content: "";
  position: absolute;
  top: -13px;
  right: -10px;
  width: 18px;
  height: 18px;
  border-top: 5px solid #fff;
  border-right: 5px solid #fff;
  transform: rotate(6deg);
}

.tip-card {
  position: absolute;
  top: 128px;
  right: 22px;
  left: 22px;
  padding: 18px;
  border-radius: 16px;
  background: #fff;
  color: #1d1d1f;
}

.tip-card strong {
  display: block;
  font-size: 20px;
}

.tip-card p {
  margin-top: 8px;
  color: #6e6e73;
  font-size: 15px;
  line-height: 1.45;
}

.tip-card button {
  width: 100%;
  height: 42px;
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 15px;
  font-weight: 750;
}

@media (max-width: 390px) {
  .store-page {
    padding-inline: 18px;
  }

  .app-hero {
    grid-template-columns: 104px 1fr;
    gap: 15px;
  }

  .app-icon {
    width: 104px;
    height: 104px;
    border-radius: 23px;
  }

  h1 {
    font-size: 23px;
  }

  .install-button {
    min-width: 126px;
    padding: 0 14px;
    font-size: 15px;
  }

  .review-grid {
    grid-template-columns: 94px 1fr;
    gap: 18px;
  }

  .score-card strong {
    font-size: 60px;
  }

  .info-list > div {
    grid-template-columns: 96px 1fr;
  }
}

@media (max-width: 340px) {
  .store-page {
    padding-inline: 18px;
  }

  .app-hero {
    grid-template-columns: 96px 1fr;
    gap: 13px;
  }

  .app-icon {
    width: 96px;
    height: 96px;
    border-radius: 21px;
  }

  h1 {
    font-size: 22px;
  }

  .install-row {
    gap: 8px;
  }

  .install-button {
    min-width: 116px;
    height: 38px;
    padding: 0 8px;
    font-size: 13px;
    line-height: 38px;
    white-space: nowrap;
  }

  .help-button {
    width: 38px;
    height: 38px;
  }
}

@media (min-width: 768px) {
  body {
    padding: 32px 0;
  }

  .page-shell {
    min-height: auto;
    border-radius: 28px;
    overflow: hidden;
  }
}
