/* ============================================================
   iOS App Store landing page styles
   ============================================================ */

body {
  font-size: 14px;
  background: #fff;
  color: #1d1d1f;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- Placeholders (loading shimmer) ---- */
.placeholder-glow .placeholder {
  -webkit-animation: placeholder-glow 2s ease-in-out infinite;
  animation: placeholder-glow 2s ease-in-out infinite;
}

.placeholder {
  min-height: 1em;
  cursor: wait;
  background-color: currentColor;
  opacity: 0.5;
  border-radius: 4px;
}

@keyframes placeholder-glow {
  50% {
    opacity: 0.3;
  }
}

/* ---- Layout container ---- */
.ios-app-store {
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
}

/* ---- Local nav (back chevron + Search) ---- */
.ios-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.ios-nav__back {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #007aff;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.ios-nav__title {
  margin-left: 4px;
  font-size: 16px;
  color: #007aff;
  font-weight: 400;
}

/* ---- Product hero ---- */
.ios-hero {
  --hero-rgb: 210, 215, 220;
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 20px 16px 18px;
  gap: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(var(--hero-rgb), 0.38), rgba(var(--hero-rgb), 0.1) 64%, rgba(255, 255, 255, 0));
}

.ios-hero__icon {
  flex-shrink: 0;
  width: 120px;
  height: 120px;
  border-radius: 26px;
  overflow: hidden;
  background: #f0f0f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.ios-hero__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ios-hero__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-top: 2px;
}

.ios-hero__title {
  font-size: 20px;
  font-weight: 600;
  color: #1d1d1f;
  line-height: 1.25;
  margin: 0;
  word-break: break-word;
}

.ios-hero__subtitle {
  margin-top: 4px;
  font-size: 13px;
  color: #6e6e73;
  font-weight: 400;
  line-height: 1.3;
}

.ios-hero__availability {
  margin-top: 4px;
  font-size: 11px;
  color: #6e6e73;
  line-height: 1.25;
}

.ios-hero__actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ios-hero__cta {
  flex-shrink: 0;
}

.ios-hero__iap {
  width: 66px;
  font-size: 10px;
  color: #6e6e73;
  line-height: 1.15;
}

.ios-hero__share {
  width: 30px;
  height: 30px;
  margin-left: auto;
  padding: 5px;
  border: 0;
  border-radius: 50%;
  background: rgba(120, 120, 128, 0.14);
  color: #007aff;
  flex-shrink: 0;
}

.ios-hero__share svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- GET button (blue pill) ---- */
.ios-get-btn {
  min-width: 72px;
  height: 30px;
  padding: 0 18px;
  border: none;
  border-radius: 100px;
  background: #007aff;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.ios-get-btn:active {
  opacity: 0.75;
}

.ios-get-btn--sm {
  min-width: 64px;
  height: 34px;
  font-size: 14px;
  padding: 0 16px;
}

.ios-get-btn .button__label {
  display: inline-flex;
  align-items: center;
  color: #fff;
}

/* ---- App metadata strip ---- */
.ios-inforow {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 16px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ios-inforow::-webkit-scrollbar {
  display: none;
}

.ios-inforow__item {
  position: relative;
  flex: 0 0 104px;
  min-width: 0;
  text-align: center;
  padding: 0 12px;
  box-sizing: border-box;
}

.ios-inforow__item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 2px;
  right: 0;
  width: 1px;
  height: 38px;
  background: #e1e1e3;
}

.ios-inforow__value {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
  color: #6e6e73;
  line-height: 1.2;
}

.ios-inforow__value--text {
  font-size: 13px;
  padding-top: 1px;
}

.ios-inforow__stars {
  height: 12px;
  margin-top: 1px;
  color: #6e6e73;
  font-size: 8px;
  letter-spacing: -1px;
}

.ios-inforow__label {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: #8e8e93;
  line-height: 1.2;
}

/* ---- Screenshots ---- */
.ios-screenshots {
  padding: 8px 0 16px;
  border-top: 1px solid #e1e1e3;
}

.ios-screenshots__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}

.ios-screenshots__title {
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0;
}

.ios-screenshots__devices {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #6e6e73;
  font-size: 11px;
}

.ios-screenshots__devices svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

.ios-screenshots__list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 8px;
  list-style: none;
  scrollbar-width: none;
}

.ios-screenshots__list::-webkit-scrollbar {
  display: none;
}

.ios-screenshots__list li {
  flex-shrink: 0;
  width: clamp(154px, 43vw, 185px);
  height: auto;
}

.ios-screenshots__list li img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
}

/* ---- Section (bordered) ---- */
.ios-section {
  padding: 22px 16px;
  border-top: 1px solid #e1e1e3;
}

.ios-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ios-section__title {
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0;
}

/* ---- Description ---- */
.ios-description__body {
  position: relative;
}

.ios-description__text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 6;
  line-clamp: 6;
  font-size: 14px;
  color: #424245;
  line-height: 1.5;
  white-space: pre-line;
  margin: 0;
}

.ios-description__more {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 2px 0 2px 18px;
  border: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 28%);
  color: #007aff;
  font-size: 14px;
}

.ios-description__body.is-expanded .ios-description__text {
  display: block;
  overflow: visible;
}

.ios-description__body.is-expanded .ios-description__more {
  display: none;
}

.ios-section__chevron {
  color: #8e8e93;
  font-size: 28px;
  font-weight: 300;
  line-height: 17px;
}

/* ---- Ratings and reviews ---- */
.ios-ratings__summary {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  margin-bottom: 18px;
}

.ios-ratings__score {
  flex-shrink: 0;
  color: #6e6e73;
  text-align: center;
}

.ios-ratings__score strong {
  display: block;
  font-size: 48px;
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -2px;
}

.ios-ratings__score span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  font-weight: 600;
}

.ios-ratings__distribution {
  flex: 1;
  min-width: 0;
}

.ios-ratings__distribution > div {
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.ios-ratings__distribution > div span {
  width: 46px;
  color: #8e8e93;
  font-size: 7px;
  letter-spacing: -1px;
  text-align: right;
  white-space: nowrap;
}

.ios-ratings__distribution i {
  position: relative;
  display: block;
  flex: 1;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: #d1d1d6;
}

.ios-ratings__distribution b {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: #8e8e93;
}

.ios-ratings__distribution p {
  margin-top: 3px;
  color: #8e8e93;
  font-size: 10px;
  text-align: right;
}

.ios-ratings__cards {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px 3px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ios-ratings__cards::-webkit-scrollbar {
  display: none;
}

.ios-review-card {
  flex: 0 0 280px;
  padding: 14px;
  box-sizing: border-box;
  border-radius: 16px;
  background: #f2f2f7;
}

.ios-review-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ios-review-card__head strong {
  overflow: hidden;
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ios-review-card__head time {
  flex-shrink: 0;
  color: #8e8e93;
  font-size: 11px;
}

.ios-review-card__stars {
  margin-top: 5px;
  color: #ff9f0a;
  font-size: 12px;
  letter-spacing: -1px;
}

.ios-review-card > p {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 8px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  color: #424245;
  font-size: 12px;
  line-height: 1.45;
}

/* ---- What's New ---- */
.ios-whats-new__history {
  color: #007aff;
  font-size: 13px;
}

.ios-whats-new__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #8e8e93;
  font-size: 11px;
}

.ios-whats-new > p {
  margin-top: 10px;
  color: #424245;
  font-size: 13px;
  line-height: 1.45;
}

/* ---- App Privacy ---- */
.ios-privacy__details {
  background: none;
  border: none;
  color: #007aff;
  font-size: 15px;
  cursor: pointer;
  padding: 0;
}

.ios-privacy__intro {
  font-size: 13px;
  color: #424245;
  line-height: 1.45;
  margin: 0 0 16px;
}

.ios-privacy__cards {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ios-privacy__card {
  flex: 1 1 220px;
  border: 1px solid #e1e1e3;
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}

.ios-privacy__card-icon {
  color: #007aff;
  margin-bottom: 10px;
}

.ios-privacy__card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 6px;
}

.ios-privacy__card-desc {
  font-size: 12px;
  color: #6e6e73;
  line-height: 1.4;
  margin: 0 0 12px;
}

.ios-privacy__card-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ios-privacy__grid {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ios-privacy__grid-icon {
  color: #1d1d1f;
  display: flex;
}

.ios-privacy__grid-label {
  font-size: 13px;
  color: #1d1d1f;
  font-weight: 500;
}

.ios-privacy__learnmore {
  margin-top: 16px;
  font-size: 12px;
  color: #6e6e73;
  line-height: 1.4;
}

/* ---- Information list ---- */
.ios-info-list {
  margin: 0;
}

.ios-info-list__item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f2;
}

.ios-info-list__item:last-child {
  border-bottom: none;
}

.ios-info-list__term {
  flex-shrink: 0;
  width: 110px;
  font-size: 14px;
  color: #6e6e73;
  font-weight: 400;
}

.ios-info-list__def {
  flex: 1;
  font-size: 14px;
  color: #1d1d1f;
  font-weight: 400;
  margin: 0;
}

.ios-info-list__sub {
  margin: 0 0 6px;
}

.ios-info-list__sub:last-child {
  margin-bottom: 0;
}

.ios-info-list__sub-term {
  font-size: 14px;
  color: #1d1d1f;
  font-weight: 500;
  margin: 0 0 2px;
}

.ios-info-list__sub-def {
  font-size: 13px;
  color: #6e6e73;
  margin: 0;
}

.ios-info-list__def--copyright {
  color: #6e6e73;
}

/* ---- Age rating badge ---- */
.ios-age-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: #e8e8ed;
  color: #1d1d1f;
  font-size: 13px;
  font-weight: 600;
}

.ios-age-badge--sm {
  min-width: 28px;
  height: 18px;
  font-size: 11px;
}

/* ---- Footer links ---- */
.ios-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 22px 16px;
  border-top: 1px solid #e1e1e3;
}

.ios-links__item {
  font-size: 14px;
  color: #007aff;
  text-decoration: none;
}

.ios-links__item:active {
  opacity: 0.6;
}

/* ---- Legal footer ---- */
.legal-footer {
  padding: 24px 16px;
  background: #f5f5f7;
  color: #6e6e73;
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}

.legal-footer__line {
  margin: 0 0 8px;
}

.legal-footer__line:last-child {
  margin-bottom: 0;
}

/* ---- Responsive (desktop) ---- */
@media (min-width: 735px) {
  .ios-hero {
    padding: 28px 0 12px;
    gap: 22px;
  }

  .ios-hero__icon {
    width: 140px;
    height: 140px;
    border-radius: 30px;
  }

  .ios-hero__title {
    font-size: 24px;
  }

  .ios-section,
  .ios-screenshots,
  .ios-links {
    padding-left: 0;
    padding-right: 0;
  }

  .ios-screenshots__title {
    padding-left: 0;
    padding-right: 0;
  }

  .ios-screenshots__list {
    padding-left: 0;
    padding-right: 0;
  }

  .ios-inforow {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ---- App Store global footer (copyright + legal links) ---- */
.ios-global-footer {
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 16px calc(70px + env(safe-area-inset-bottom, 0px));
  font-size: 12px;
  color: #6e6e73;
  line-height: 1.4;
  border-top: 1px solid #e1e1e3;
}

.ios-global-footer__wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ios-global-footer__left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ios-global-footer__copyright-text {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.ios-global-footer__copyright-text span {
  white-space: nowrap;
}

.ios-global-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.ios-global-footer__legal-link {
  color: #424245;
  text-decoration: none;
  font-size: 12px;
}

.ios-global-footer__legal-link:hover {
  text-decoration: underline;
}

/* ---- iOS bottom tab bar (fixed) ---- */
.ios-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  height: calc(50px + env(safe-area-inset-bottom, 0px));
  padding: 4px 8px env(safe-area-inset-bottom, 0px);
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  box-sizing: border-box;
  background: rgba(248, 248, 248, 0.94);
  border-top: 1px solid rgba(60, 60, 67, 0.25);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

.ios-tabbar__item {
  flex: 0 0 20%;
  min-width: 0;
  height: 46px;
  padding: 1px 0 0;
  border: 0;
  background: transparent;
  color: #8e8e93;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  cursor: pointer;
}

.ios-tabbar__item svg {
  display: block;
  width: 27px;
  height: 27px;
  fill: currentColor;
}

.ios-tabbar__today rect:first-child,
.ios-tabbar__today path {
  fill: none;
  stroke: currentColor;
  stroke-width: 17;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ios-tabbar__today .ios-tabbar__today-block {
  fill: currentColor;
  stroke: none;
}

.ios-tabbar__arcade .ios-tabbar__arcade-cutout {
  fill: #f8f8f8;
}

.ios-tabbar__item span {
  font-size: 10px;
  font-weight: 500;
  line-height: 13px;
}

.ios-tabbar__item--active {
  color: #007aff;
}

/* ---- Dark appearance ---- */
html[data-bs-theme="dark"] body,
html[data-bs-theme="dark"] .ios-app-store {
  background: #000;
  color: #f5f5f7;
}

html[data-bs-theme="dark"] .ios-nav {
  background: rgba(18, 18, 18, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

html[data-bs-theme="dark"] .ios-hero {
  background: linear-gradient(135deg, rgba(var(--hero-rgb), 0.32), rgba(var(--hero-rgb), 0.1) 62%, #000);
}

html[data-bs-theme="dark"] .ios-hero__title,
html[data-bs-theme="dark"] .ios-inforow__value,
html[data-bs-theme="dark"] .ios-screenshots__title,
html[data-bs-theme="dark"] .ios-section__title,
html[data-bs-theme="dark"] .ios-privacy__card-title,
html[data-bs-theme="dark"] .ios-privacy__grid-label,
html[data-bs-theme="dark"] .ios-info-list__def,
html[data-bs-theme="dark"] .ios-info-list__sub-term,
html[data-bs-theme="dark"] .ios-review-card__head strong {
  color: #f5f5f7;
}

html[data-bs-theme="dark"] .ios-hero__subtitle,
html[data-bs-theme="dark"] .ios-hero__availability,
html[data-bs-theme="dark"] .ios-screenshots__devices,
html[data-bs-theme="dark"] .ios-description__text,
html[data-bs-theme="dark"] .ios-privacy__intro,
html[data-bs-theme="dark"] .ios-privacy__card-desc,
html[data-bs-theme="dark"] .ios-privacy__learnmore,
html[data-bs-theme="dark"] .ios-info-list__sub-def,
html[data-bs-theme="dark"] .ios-review-card > p,
html[data-bs-theme="dark"] .ios-whats-new > p {
  color: #aeaeb2;
}

html[data-bs-theme="dark"] .ios-section,
html[data-bs-theme="dark"] .ios-screenshots,
html[data-bs-theme="dark"] .ios-links,
html[data-bs-theme="dark"] .ios-global-footer {
  border-top-color: #38383a;
}

html[data-bs-theme="dark"] .ios-inforow__item:not(:last-child)::after,
html[data-bs-theme="dark"] .ios-info-list__item {
  border-color: #38383a;
}

html[data-bs-theme="dark"] .ios-inforow__item:not(:last-child)::after {
  background: #38383a;
}

html[data-bs-theme="dark"] .ios-description__more {
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), #000 28%);
}

html[data-bs-theme="dark"] .ios-review-card,
html[data-bs-theme="dark"] .ios-privacy__card {
  background: #1c1c1e;
  border-color: #38383a;
}

html[data-bs-theme="dark"] .ios-age-badge {
  background: #3a3a3c;
  color: #f5f5f7;
}

html[data-bs-theme="dark"] .ios-global-footer,
html[data-bs-theme="dark"] .legal-footer {
  background: #1c1c1e;
  color: #8e8e93;
}

html[data-bs-theme="dark"] .ios-global-footer__legal-link {
  color: #aeaeb2;
}

html[data-bs-theme="dark"] .ios-tabbar {
  background: rgba(28, 28, 30, 0.94);
  border-top-color: rgba(84, 84, 88, 0.65);
}

html[data-bs-theme="dark"] .ios-tabbar__arcade .ios-tabbar__arcade-cutout {
  fill: #1c1c1e;
}
