:root {
  --bg: #f2f2f7;
  --card: #ffffff;
  --text: #0f1419;
  --muted: #536471;
  --border: #e1e8ed;
  --store-blue: #007aff;
  --store-blue-pressed: #0062cc;
  --star: #ff9500;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 52px;
  --dock-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* 允许正常滚动，但不把双击识别为页面缩放手势。 */
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--safe-bottom) + 16px);
}

a {
  color: inherit;
  touch-action: manipulation;
}

button {
  touch-action: manipulation;
}

/* 顶栏 */
.store-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: calc(var(--header-h) + var(--safe-top));
  padding-top: var(--safe-top);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(242, 242, 247, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--border);
}

.store-header__title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.store-header__badge {
  position: absolute;
  right: 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--store-blue);
  background: rgba(0, 122, 255, 0.12);
  padding: 4px 10px;
  border-radius: 999px;
}

.page {
  max-width: 680px;
  margin: 0 auto;
  padding: 16px 16px 24px;
}

/* 主卡片 */
.hero-card {
  background: var(--card);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 0.5px solid var(--border);
}

.hero-top {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.app-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  flex-shrink: 0;
  overflow: hidden;
  background: #000;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-text {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.app-name {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.app-sub {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--muted);
}

.rating-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--star);
}

.stars svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.download-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.download-actions .btn-get {
  margin-top: 0;
}

.btn-get--half {
  width: 100%;
}

.btn-get__icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.btn-get--ios {
  background: #1c1c1e;
}

.btn-get--ios:hover {
  background: #2c2c2e;
}

.download-actions [hidden] {
  display: none !important;
}

body.safari-tip-open {
  overflow: hidden;
}

.safari-tip[hidden] {
  display: none;
}

.safari-tip {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-top: calc(20px + env(safe-area-inset-top));
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.safari-tip__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.48);
}

.safari-tip__panel {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 390px;
  max-height: calc(100vh - 40px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 40px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 20px 20px;
  border-radius: 20px;
  color: #111;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  text-align: center;
}

.safari-tip__icon {
  display: grid;
  width: 50px;
  height: 50px;
  margin: 0 auto 14px;
  border-radius: 14px;
  place-items: center;
  color: #fff;
  background: transparent;
  object-fit: contain;
  font-size: 28px;
  font-weight: 700;
}

.safari-tip__panel h2 {
  margin: 0;
  font-size: 20px;
}

.safari-tip__panel > p {
  margin: 12px 0 16px;
  color: #666;
  font-size: 14px;
  line-height: 1.65;
}

.safari-tip__url {
  box-sizing: border-box;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  color: #555;
  background: #f7f7f7;
  font-size: 13px;
}

.safari-tip__panel .safari-tip__status {
  min-height: 20px;
  margin: 8px 0;
  color: #087af5;
  font-size: 13px;
}

.safari-tip__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.safari-tip__button {
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  color: #222;
  background: #ececec;
  font-size: 15px;
  font-weight: 650;
}

.safari-tip__button--primary {
  color: #fff;
  background: #087af5;
}

.download-dock__actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
  flex-shrink: 0;
}

.download-dock__actions .btn-get--compact {
  min-width: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.btn-get {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 18px;
  padding: 14px 20px;
  border: none;
  font-family: inherit;
  border-radius: 14px;
  background: #000;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}

.btn-get:hover {
  background: #242424;
}

.btn-get:active {
  transform: scale(0.98);
}

.btn-get__sub {
  display: block;
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 0.5px solid var(--border);
}

.meta-cell {
  text-align: center;
  padding: 8px 4px;
}

.meta-cell strong {
  display: block;
  /* 放大并加粗主要参数，便于移动端快速识别。 */
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 4px;
}

.meta-cell span {
  /* 次级说明同步增强，保持与主要参数清晰的视觉层级。 */
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* 安装步骤 */
.steps {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.step {
  background: var(--card);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  border: 0.5px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.step em {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
}

.step strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  margin-bottom: 2px;
}

.section {
  margin-top: 28px;
}

.section h2 {
  margin: 0 0 12px 4px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.shots {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.shots::-webkit-scrollbar {
  display: none;
}

.shot {
  flex: 0 0 168px;
  height: 364px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, #1a1a1a 0%, #3d3d3d 100%);
  scroll-snap-align: start;
  border: 0.5px solid var(--border);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.desc-card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  border: 0.5px solid var(--border);
  font-size: 15px;
  line-height: 1.55;
}

.desc-card p {
  margin: 0 0 12px;
}

.desc-card p:last-child {
  margin-bottom: 0;
}

.info-list {
  background: var(--card);
  border-radius: 16px;
  border: 0.5px solid var(--border);
  overflow: hidden;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  font-size: 15px;
  border-bottom: 0.5px solid var(--border);
}

.info-row:last-child {
  border-bottom: none;
}

.info-row span:first-child {
  color: var(--muted);
  flex-shrink: 0;
}

.info-row span:last-child {
  text-align: right;
  font-weight: 500;
}

.review {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 10px;
  border: 0.5px solid var(--border);
}

.review-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 14px;
}

.review-head strong {
  font-weight: 600;
}

.review-head time {
  color: var(--muted);
  font-size: 13px;
}

.review p {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #eff3f4;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.page-footer {
  margin-top: 32px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

/* 底部固定下载条 */
.download-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: 0.5px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
}

.download-dock__inner {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.dock-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  flex-shrink: 0;
}

.dock-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dock-meta {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.dock-meta strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-meta span {
  font-size: 12px;
  color: var(--muted);
}

.btn-get--compact {
  width: auto;
  margin: 0;
  padding: 10px 22px;
  border-radius: 999px;
  font-size: 15px;
  min-width: 88px;
}

body.ios-guide-open {
  overflow: hidden;
}

.ios-guide[hidden] {
  display: none !important;
}

.ios-guide {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  /* 为底部客服栏和安全区留出空间，避免教程确认按钮被遮挡。 */
  padding-bottom: calc(80px + var(--safe-bottom));
}

.ios-guide__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.ios-guide__panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  /* 限制弹窗高度，让教程内容滚动，确认按钮始终保留在可视区域。 */
  max-height: min(calc(100vh - 96px - var(--safe-bottom)), 820px);
  max-height: min(calc(100dvh - 96px - var(--safe-bottom)), 820px);
  overflow: hidden;
  background: var(--card);
  border-radius: 20px;
  padding: 18px 16px 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  border: 0.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ios-guide__header {
  flex-shrink: 0;
}

.ios-guide__title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ios-guide__intro {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

.ios-guide__scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-right: 2px;
  margin: 4px 0 0;
}

.ios-guide__step {
  margin: 0 0 20px;
  padding-bottom: 20px;
  border-bottom: 0.5px solid var(--border);
}

.ios-guide__step:last-child {
  margin-bottom: 4px;
  padding-bottom: 0;
  border-bottom: none;
}

.ios-guide__step-label {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ios-guide__figure {
  margin: 0 0 10px;
  border-radius: 14px;
  overflow: hidden;
  background: #f2f2f7;
  border: 0.5px solid var(--border);
}

.ios-guide__figure img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.ios-guide__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.ios-guide__close {
  flex-shrink: 0;
  margin-top: 0;
  width: 100%;
}

@media (min-width: 768px) {
  .ios-guide {
    align-items: center;
  }
}

/* X 落地页按参考图重排为轻量应用商店界面，保留原下载与 iOS 教程逻辑。 */
:root {
  --bg: #f7f7f5;
  --card: #ffffff;
  --text: #111111;
  --muted: #777777;
  --border: #e8e8e5;
  --header-h: 72px;
}

body {
  min-width: 280px;
  background: var(--bg);
}

.store-header {
  height: calc(var(--header-h) + var(--safe-top));
  padding: var(--safe-top) 20px 0;
  justify-content: space-between;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid #eeeeeb;
}

.store-header__title {
  position: absolute;
  left: 50%;
  font-size: 18px;
  font-weight: 700;
  transform: translateX(-50%);
}

.store-header__badge {
  display: none;
}

.store-header__action {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  border: 0;
  color: #171717;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.store-header__action svg {
  width: 26px;
  height: 26px;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.store-header__share svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
  stroke-width: 1.8;
}

.page {
  max-width: 620px;
  padding: 20px 14px 30px;
}

.hero-card {
  padding: 22px 18px 20px;
  border: 0;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 8px 26px rgba(21, 21, 21, .035);
}

.hero-top {
  align-items: center;
  gap: 17px;
}

.app-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .17);
}

.hero-text {
  padding-top: 0;
}

.app-name {
  margin-bottom: 5px;
  font-size: clamp(20px, 5.7vw, 25px);
  font-weight: 800;
  line-height: 1.2;
}

.app-sub {
  margin-bottom: 7px;
  color: #8a8a8a;
  font-size: 15px;
}

.rating-row {
  flex-wrap: nowrap;
  gap: 7px;
  font-size: 13px;
  white-space: nowrap;
}

.stars {
  gap: 0;
}

.stars svg {
  width: 16px;
  height: 16px;
}

.download-actions {
  flex-direction: row;
  gap: 12px;
  margin-top: 22px;
}

/* 两端下载入口统一放大触控区域，窄屏继续由下方规则适配。 */
.download-actions .btn-get {
  min-height: 64px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 19px;
}

/* 苹果与安卓下载均使用黑底白字，悬停时保持一致。 */
.btn-get--ios,
.btn-get--ios:hover,
.btn-get--android,
.btn-get--android:hover {
  border: 1.5px solid #000;
  color: #fff;
  background: #000;
}

.meta-grid {
  gap: 0;
  margin-top: 25px;
  padding-top: 18px;
  border-top: 1px solid #f0f0ed;
}

.meta-cell {
  position: relative;
  padding: 4px 6px 2px;
}

.meta-cell + .meta-cell::before {
  content: "";
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 1px;
  background: #eeeeeb;
}

.meta-cell strong {
  margin-bottom: 3px;
  color: #292929;
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.meta-cell span {
  color: #999;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

.section {
  margin-top: 32px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 13px;
  padding: 0 2px;
}

.section-title-row h2,
.section h2 {
  margin: 0;
  color: #171717;
  font-size: 24px;
  font-weight: 800;
}

.section-title-row > span {
  color: #9a9a9a;
  font-size: 13px;
  font-weight: 600;
}

.shots {
  gap: 10px;
  margin-right: -14px;
  padding-right: 14px;
}

.shot {
  width: auto;
  height: auto;
  flex: 0 0 min(72vw, 270px);
  aspect-ratio: 811 / 1760;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 7px 20px rgba(0, 0, 0, .11);
}

.desc-card,
.info-list,
.review {
  border-color: #e8e8e5;
  box-shadow: 0 5px 18px rgba(20, 20, 20, .035);
}

@media (max-width: 360px) {
  .store-header {
    padding-right: 12px;
    padding-left: 12px;
  }

  .page {
    padding-right: 10px;
    padding-left: 10px;
  }

  .hero-card {
    padding-right: 14px;
    padding-left: 14px;
  }

  .hero-top {
    gap: 12px;
  }

  .app-icon {
    width: 76px;
    height: 76px;
    border-radius: 17px;
  }

  .app-name {
    font-size: 19px;
  }

  .rating-row {
    gap: 4px;
    font-size: 11px;
  }

  .stars svg {
    width: 13px;
    height: 13px;
  }

  .download-actions {
    gap: 9px;
  }

  .download-actions .btn-get {
    min-height: 58px;
    font-size: 17px;
  }

  .meta-cell strong {
    font-size: 15px;
  }
}

@media (min-width: 768px) {
  .hero-card {
    padding: 28px 26px 24px;
  }

  .app-icon {
    width: 100px;
    height: 100px;
  }

  .app-name {
    font-size: 28px;
  }

  .shot {
    flex-basis: 290px;
    height: auto;
  }
}

@media (min-width: 768px) {
  body {
    padding-bottom: 32px;
  }

  .download-dock {
    display: none;
  }

  .hero-card {
    padding: 24px;
  }

  .app-icon {
    width: 100px;
    height: 100px;
    border-radius: 22px;
  }

  .app-name {
    font-size: 28px;
  }

  .shot {
    flex: 0 0 200px;
    height: 433px;
  }
}
