: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;
}

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;
}

/* 顶栏 */
.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-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: var(--store-blue);
  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: var(--store-blue-pressed);
}

.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: 15px;
  font-weight: 700;
  margin-bottom: 2px;
}

.meta-cell span {
  font-size: 11px;
  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(16px + 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(92vh, 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;
  }
}

@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;
  }
}
