*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue",
    Helvetica, "Microsoft YaHei", Arial, sans-serif;
  background: #f2f2f7;
  color: #1c1c1e;
  -webkit-font-smoothing: antialiased;
}

/* ===== 电脑端：白色全屏，居中大气 ===== */
.desktop-view {
  position: fixed; inset: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  overflow: auto;
}
.desktop-card {
  background: #fff;
  padding: 0;
  max-width: 520px;
  width: 100%;
  text-align: center;
}
.desktop-icon {
  width: 140px; height: 140px;
  border-radius: 32px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
}
.desktop-title {
  font-size: 32px; font-weight: 600; letter-spacing: 0.5px;
  margin: 28px 0 6px; color: #1c1c1e;
}
.desktop-sub { font-size: 14px; color: #8e8e93; margin: 0; letter-spacing: 0.3px; }
.qr-box {
  display: inline-block;
  margin-top: 40px;
  padding: 20px;
  background: #fff;
  border: 1px solid #ececef;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
#qrcode canvas, #qrcode img { display: block; }
#qrcode {
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#qrcode canvas {
  width: 220px !important;
  height: 220px !important;
}
.desktop-tip { margin: 24px 0 6px; font-size: 16px; font-weight: 500; color: #1c1c1e; }
.desktop-tip-sub { margin: 0; font-size: 13px; color: #8e8e93; }


/* ===== 手机端 ===== */
.page { padding-bottom: 40px; }
.header { background: #fff; padding: 24px 16px 20px; display: flex; gap: 16px; align-items: flex-start; }
.app-icon { width: 88px; height: 88px; border-radius: 20px; object-fit: cover; box-shadow: 0 1px 3px rgba(0,0,0,0.08); flex-shrink: 0; }
.header-info { flex: 1; min-width: 0; }
.app-name { font-size: 19px; font-weight: 600; margin: 0; line-height: 1.2; }
.app-vendor { font-size: 12px; color: #8e8e93; margin: 2px 0 0; }
.btn-install {
  margin-top: 12px;
  background: #007aff; color: #fff;
  border: none; border-radius: 999px;
  padding: 6px 20px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.btn-install:active { background: #0066d6; }
.install-hint { font-size: 11px; color: #8e8e93; margin: 8px 0 0; line-height: 1.4; }

.card { background: #fff; padding: 16px; margin-top: 8px; }
.section-title { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.section-title.nomargin { margin: 0; }
.paragraph { font-size: 13px; line-height: 1.7; color: #3a3a3c; margin: 0; }
.muted { font-size: 12px; color: #8e8e93; }
.row-between { display: flex; align-items: center; justify-content: space-between; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; }
.stat-bordered { border-left: 1px solid #e5e5ea; }
.stat-label { font-size: 11px; color: #8e8e93; margin: 0; }
.stat-value { font-size: 17px; font-weight: 600; margin: 4px 0; }
.stars { display: inline-flex; gap: 2px; justify-content: center; }
.stars-sm svg { width: 14px; height: 14px; }
.stars svg { width: 14px; height: 14px; }

.rating-row { display: flex; align-items: flex-end; gap: 16px; margin-top: 12px; }
.rating-big { font-size: 44px; font-weight: 700; line-height: 1; margin: 0; }
.rating-sub { font-size: 11px; color: #8e8e93; margin: 4px 0 0; }
.rating-sub.right { text-align: right; }
.rating-right { flex: 1; padding-bottom: 4px; text-align: right; }
.rating-right .stars { justify-content: flex-end; }

.review { margin-top: 20px; padding-top: 16px; border-top: 1px solid #e5e5ea; }
.review-head { display: flex; align-items: center; justify-content: space-between; }
.review-title { font-size: 14px; font-weight: 600; margin: 0; }
.review-date { font-size: 11px; color: #8e8e93; margin: 0; }
.review-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #8e8e93; margin-top: 4px; }
.review .paragraph { margin-top: 8px; }

.info-list { margin: 0; padding: 0; font-size: 13px; }
.info-list > div { display: flex; justify-content: space-between; padding: 10px 0; border-top: 1px solid #e5e5ea; }
.info-list > div:first-child { border-top: none; }
.info-list dt { color: #8e8e93; margin: 0; }
.info-list dd { margin: 0; color: #1c1c1e; text-align: right; }

.disclaimer { padding: 0 16px; margin: 16px 0 0; font-size: 11px; line-height: 1.6; color: #8e8e93; }

/* ===== Toast ===== */
.toast {
  position: fixed;
  left: 50%; top: 24px;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 100;
}

/* ===== iOS 引导弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; z-index: 200;
}
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%; max-width: 340px;
  overflow: hidden;
}
.modal-title { font-size: 17px; font-weight: 600; text-align: center; margin: 20px 20px 0; }
.modal-text { font-size: 14px; line-height: 1.6; color: #3a3a3c; margin: 12px 20px 0; }
.modal-steps { font-size: 13px; line-height: 1.8; color: #3a3a3c; margin: 12px 20px 0; padding-left: 20px; }
.modal-warn { font-size: 12px; color: #ff3b30; margin: 12px 20px 16px; }
.modal-btn {
  display: block; width: 100%;
  border: none; border-top: 1px solid #e5e5ea;
  background: #fff; padding: 14px 0;
  font-size: 16px; font-weight: 600; color: #007aff;
  cursor: pointer;
}
.modal-btn:active { background: #f2f2f7; }
