/* 下载页：白色 App Store 风格 */
body.dl-standalone,
.view-download {
  --blue: #007aff;
  --blue-bright: #0a84ff;
  --text: #1d1d1f;
  --muted: #8e8e93;
  --line: rgba(60, 60, 67, 0.12);
  --bg: #ffffff;
  --card: #f2f2f7;
  --max: 430px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.45;
}

body.dl-standalone {
  background: #ffffff;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-text-size-adjust: 100%;
}

html:has(body.dl-standalone),
html:has(body.is-download) {
  background: #ffffff;
}

body.is-download {
  background: #ffffff !important;
  color-scheme: light;
}

body.dl-standalone {
  color-scheme: light;
}

.view-download a,
body.dl-standalone a {
  color: inherit;
  text-decoration: none;
}

.view-download button,
body.dl-standalone button {
  font: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

body.dl-standalone .store {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: #ffffff;
  padding: 8px 0 36px;
  position: relative;
  box-sizing: border-box;
}

.view-download .store {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 0;
  background: none;
  padding: 0;
  box-shadow: none;
}

/* App 信息区 */
.app-hero {
  display: flex;
  gap: 14px;
  padding: 8px 16px 16px;
  align-items: flex-start;
}

.app-icon {
  width: 110px;
  height: 110px;
  border-radius: 24px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.app-meta {
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

.app-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 4px;
  color: #1d1d1f;
}

.app-tip {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 10px;
}

.app-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-install,
.btn-trust {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  min-width: 88px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-install {
  background: #007aff;
  color: #fff;
  border: none;
  box-shadow: none;
}

.btn-install:active,
.btn-trust:active {
  transform: scale(0.97);
  opacity: 0.85;
}

.btn-install.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

.btn-trust {
  background: rgba(0, 122, 255, 0.12);
  color: #007aff;
  border: none;
  box-shadow: none;
}

.btn-trust:active {
  background: rgba(0, 122, 255, 0.2);
}

.btn-trust .btn-ico {
  background: rgba(0, 122, 255, 0.18);
  color: #007aff;
}

.btn-ico {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-ico.outline {
  background: rgba(0, 122, 255, 0.18);
}

/* 指标行 */
.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin: 0 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.metric {
  text-align: center;
  padding: 0 6px;
  position: relative;
}

.metric:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 10%;
  height: 80%;
  width: 1px;
  background: var(--line);
}

.m-top {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 2px;
}

.m-mid {
  font-size: 22px;
  font-weight: 800;
  color: #1d1d1f;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-shadow: none;
}

.m-bot {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.m-stars {
  display: flex;
  justify-content: center;
  gap: 1px;
  margin-top: 3px;
}

.m-stars span {
  width: 9px;
  height: 9px;
  background: #ff9500;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* 安装提示 */
.hint-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 14px 16px 0;
  padding: 14px;
  border-radius: 14px;
  background: #f2f2f7;
  border: none;
}

.hint-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(0, 122, 255, 0.12);
  color: #007aff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.hint-icon svg path {
  stroke: #007aff;
}

.hint-content {
  flex: 1;
  min-width: 0;
}

.hint-title {
  font-size: 14px;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 4px;
  line-height: 1.35;
}

.hint-text {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* 区块 */
.block {
  padding: 18px 16px 4px;
}

.block-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: #1d1d1f;
}

.block-text {
  font-size: 14px;
  color: #3a3a3c;
  line-height: 1.55;
}

/* 评分汇总 */
.rating-summary {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.rs-left {
  width: 88px;
  flex-shrink: 0;
}

.rs-score {
  font-size: 56px;
  font-weight: 800;
  line-height: 1;
  color: #1d1d1f;
  letter-spacing: -0.04em;
  text-shadow: none;
}

.rs-out {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.rs-right {
  flex: 1;
  padding-top: 6px;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.bar-row span {
  width: 10px;
  font-size: 10px;
  color: var(--muted);
  text-align: right;
}

.bar-row i {
  flex: 1;
  height: 3px;
  border-radius: 999px;
  background: rgba(60, 60, 67, 0.12);
  position: relative;
  overflow: hidden;
}

.bar-row i::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--w);
  background: #8e8e93;
  border-radius: 999px;
}

.rs-count {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* 评论卡片 */
.review {
  background: #f2f2f7;
  border: none;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 8px;
}

.rv-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.rv-head strong {
  font-size: 14px;
  font-weight: 700;
  color: #1d1d1f;
}

.rv-date {
  font-size: 12px;
  color: var(--muted);
  flex-shrink: 0;
}

.rv-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.rv-stars {
  display: flex;
  gap: 1px;
}

.rv-stars span {
  width: 11px;
  height: 11px;
  background: #ff9500;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.rv-user {
  font-size: 12px;
  color: var(--muted);
}

.rv-body {
  font-size: 13px;
  color: #3a3a3c;
  line-height: 1.5;
}

@media (min-width: 480px) {
  body.dl-standalone {
    background: #f2f2f7;
  }

  body.dl-standalone .store,
  body.is-download .view-download {
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 12px 40px rgba(0, 0, 0, 0.08);
  }
}

/* 企业签名信任教程（浅色弹层，匹配白下载页） */
body.trust-open {
  overflow: hidden;
}

.trust-guide {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
}

.trust-guide.show {
  display: block;
}

.trust-guide-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.trust-guide-sheet {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  color: #1d1d1f;
}

.trust-guide-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  padding-right: 36px;
}

.trust-guide-badge {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 122, 255, 0.12);
  color: #007aff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-guide-title {
  font-size: 17px;
  font-weight: 800;
  color: #1d1d1f;
  line-height: 1.3;
  margin-bottom: 4px;
}

.trust-guide-sub {
  font-size: 12px;
  color: #8e8e93;
  line-height: 1.45;
  padding-right: 8px;
}

.trust-guide-x {
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f2f2f7;
  color: #8e8e93;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trust-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 14px;
  background: #f2f2f7;
  border: none;
}

.trust-step-ico {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(0, 122, 255, 0.12);
  color: #007aff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trust-step-body {
  flex: 1;
  min-width: 0;
}

.trust-step-num {
  font-size: 11px;
  font-weight: 700;
  color: #007aff;
  margin-bottom: 2px;
}

.trust-step-title {
  font-size: 14px;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 3px;
}

.trust-step-desc {
  font-size: 12px;
  color: #8e8e93;
  line-height: 1.5;
}

.trust-note {
  margin: 12px 2px 14px;
  font-size: 12px;
  color: #8e8e93;
  line-height: 1.5;
}

.trust-guide-ok {
  width: 100%;
  height: 46px;
  border: none;
  border-radius: 12px;
  background: #007aff;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
}

.trust-guide-ok:active {
  opacity: 0.9;
}

html[dir="rtl"] .trust-guide-sub {
  padding-right: 0;
  padding-left: 28px;
}

html[dir="rtl"] .trust-guide-x {
  right: auto;
  left: 0;
}

html[dir="rtl"] .trust-guide-head {
  padding-right: 0;
  padding-left: 36px;
}
