:root {
  --margin-left: 21px;
  --font-pingfang: "PingFang SC", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --theme: #007aff;
  --theme-soft: #007aff33;
  --text: #2d2e30;
  --muted: #8e8e93;
  --line: #e4e4e6;
}

@media screen and (max-width: 375px) {
  :root {
    --margin-left: 10px;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-pingfang);
  background: #fff;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

#root {
  min-height: 100vh;
  position: relative;
}

/* ===== App Store 主体 ===== */
.store-page {
  min-height: 100vh;
  padding-bottom: 40px;
}

.store-page--backdrop {
  filter: blur(1px);
  opacity: 0.35;
  pointer-events: none;
  user-select: none;
}

.store-sheet {
  max-width: 520px;
  margin: 0 auto;
}

.store-hero {
  display: flex;
  gap: 12px;
  padding: 24px var(--margin-left) 0;
  align-items: flex-start;
}

.store-icon {
  width: 90px;
  height: 90px;
  border-radius: 20px;
  border: 0.5px solid rgba(0, 0, 0, 0.15);
  object-fit: cover;
  flex-shrink: 0;
}

.store-name {
  margin: 0;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

.store-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.stars-svg {
  height: 18px;
  width: auto;
}

.store-badge {
  font-size: 12px;
  color: #007affaa;
  font-weight: 500;
}

.store-stats {
  display: flex;
  justify-content: space-between;
  padding: 12px var(--margin-left) 8px;
  gap: 8px;
  text-align: center;
}

.store-stats b {
  display: block;
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
}

.store-stats span {
  font-size: 12px;
  color: var(--muted);
}

.store-quick-actions {
  display: flex;
  justify-content: space-around;
  padding: 8px var(--margin-left) 4px;
  color: #007affaa;
  font-size: 12px;
  font-weight: 500;
}

.qa-icon {
  display: flex;
  width: 36px;
  height: 36px;
  margin: 0 auto 4px;
  border-radius: 18px;
  background: var(--theme-soft);
  align-items: center;
  justify-content: center;
  position: relative;
}

.qa-share::after,
.qa-dl::after,
.qa-info::after {
  content: "";
  width: 18px;
  height: 18px;
  background: var(--theme);
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  opacity: 0.85;
}

.qa-share::after {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92z'/%3E%3C/svg%3E");
}

.qa-dl::after {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/%3E%3C/svg%3E");
}

.qa-info::after {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}

.install-row {
  padding: 14px var(--margin-left) 0;
}

.btn-primary {
  width: 100%;
  height: 38px;
  border: none;
  border-radius: 19px;
  background: var(--theme);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-primary:disabled {
  opacity: 0.7;
}

.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-bottom-color: transparent;
  border-radius: 50%;
  animation: spin 0.5s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.install-disclaimer {
  margin: 10px var(--margin-left) 0;
  font-size: 12px;
  color: #898989;
  line-height: 1.4;
}

.block {
  padding: 22px var(--margin-left) 0;
}

.block h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 500;
}

.review-card {
  border-radius: 16px;
  background: #f8f8f8;
  padding: 18px 15px;
}

.review-head {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: linear-gradient(135deg, #46befa, #3aa6fa);
}

.review-user {
  font-size: 16px;
  font-weight: 500;
}

.review-stars {
  color: #ff9500;
  font-size: 12px;
}

.review-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.review-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.35;
  color: #303030;
}

.info-grid {
  display: grid;
  grid-template-columns: 106px 1fr;
  gap: 10px 12px;
  font-size: 16px;
  margin: 0;
}

.info-grid dt {
  margin: 0;
  color: #007affaa;
}

.info-grid dd {
  margin: 0;
  color: #303030;
  line-height: 1.35;
}

/* ===== 桌面二维码页（对标站 _w-fmCzdB） ===== */
.qr-simple {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #fff;
  text-align: center;
}

.qr-simple-logo {
  width: 96px;
  height: 96px;
  border-radius: 16%;
  border: 0.5px solid rgba(0, 0, 0, 0.2);
  object-fit: cover;
}

.qr-simple-logo--missing {
  background: #f0f0f0;
  border-radius: 16%;
}

.qr-simple-title {
  margin: 12px 0 24px;
  font-size: 18px;
  font-weight: 800;
  color: #000;
}

.qr-simple-code {
  display: block;
}

.qr-simple-hint {
  margin-top: 12px;
  font-size: 14px;
  color: #333;
  line-height: 1.5;
  max-width: 280px;
}

/* ===== 安装指引 ===== */
.guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.guide-panel {
  background: #fff;
  width: 100%;
  max-width: 520px;
  border-radius: 20px 20px 0 0;
  padding: 20px 20px 28px;
  max-height: 70vh;
  overflow: auto;
  animation: slideUp 0.3s ease;
}

.guide-close {
  float: right;
  border: none;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  color: #999;
  cursor: pointer;
}

.guide-panel h3 {
  margin: 0 0 12px;
  font-size: 20px;
}

.guide-steps {
  margin: 0;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.45;
  color: #303030;
}

.guide-foot {
  margin: 14px 0 0;
  font-size: 13px;
  color: #898989;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ===== 其它 ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(12px);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 3000;
  max-width: 90vw;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.toast.on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.debug-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #111;
  color: #0f0;
  font: 11px/1.4 ui-monospace, monospace;
  padding: 4px 8px;
  z-index: 9999;
}

.state-error {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.state-error .muted {
  color: var(--muted);
  font-size: 14px;
}

.state-error code {
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ===== 微信内引导页（对齐线上一级 _vo9Ucxrr / _phZaGNUH / _5Jdgid0t） ===== */
.wechat-guide {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background: #f5f5f5;
  overflow: hidden;
}

.wechat-body {
  margin-top: 23vh;
  padding: 0 16px 32px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
  font-size: 18px;
  font-weight: 600;
  color: #000;
  line-height: 1.45;
}

.wechat-step {
  margin: 0 0 14px;
  font-weight: 500;
}

.wechat-step--lead {
  margin-top: 8px;
}

.wechat-step strong,
.wechat-body strong {
  font-weight: 700;
  color: #000;
}

.wechat-dots {
  display: inline-block;
  padding: 0 4px;
  letter-spacing: 2px;
  color: #333;
}

.wechat-app-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 22px 0 16px;
  font-size: 17px;
  font-weight: 500;
}

.wechat-app-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 0.5px solid rgba(0, 0, 0, 0.15);
  object-fit: cover;
}

.wechat-tip {
  margin-top: 18px;
  font-size: 14px;
  font-weight: 400;
  color: #666;
  line-height: 1.5;
}

.wechat-service {
  display: inline-block;
  margin-top: 12px;
  font-size: 15px;
  color: var(--theme);
  text-decoration: none;
}

.wechat-banner {
  margin-top: 12px;
  border-radius: 12px;
  overflow: hidden;
}

.wechat-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.wechat-dl {
  margin-top: 16px;
}

.wechat-arrow {
  position: absolute;
  top: 12px;
  right: 8px;
  width: 100px;
  height: 100px;
  z-index: 2;
  background: no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M15 95 C40 30 75 15 105 8' fill='none' stroke='%23007aff' stroke-width='5' stroke-linecap='round'/%3E%3Cpath d='M105 8 L88 14 M105 8 L99 25' fill='none' stroke='%23007aff' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
  pointer-events: none;
  animation: wechat-arrow-pulse 1.6s ease-in-out infinite;
}

.wechat-arrow--home {
  right: 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath d='M20 100 C45 40 70 20 100 12' fill='none' stroke='%231aad19' stroke-width='5' stroke-linecap='round'/%3E%3Cpath d='M100 12 L84 18 M100 12 L94 28' fill='none' stroke='%231aad19' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E");
}

@keyframes wechat-arrow-pulse {
  0%,
  100% {
    opacity: 1;
    transform: translate(0, 0);
  }
  50% {
    opacity: 0.75;
    transform: translate(4px, -4px);
  }
}
