/* ==========================================================================
   app.css — 手机号奇门测评系统
   设计原则：克制、专业、可信。不使用渐变、玻璃拟态、大圆角、过度动画。
   ========================================================================== */

:root {
  /* 主色：鼠尾草绿 */
  --primary: #6a8d6d;
  --primary-dark: #55735a;
  --primary-light: #eef3ee;
  --primary-lighter: #f7faf7;

  /* 语义色 */
  --danger: #b5654d;
  --danger-light: #faf0ec;
  --warn: #b8934d;
  --warn-light: #fbf6ec;

  /* 中性色 */
  --text: #2c312e;
  --text-sub: #6b716c;
  --text-muted: #9aa09b;
  --border: #e4e7e4;
  --border-strong: #d3d8d4;
  --bg: #f7f8f7;
  --surface: #ffffff;

  /* 布局 */
  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(44, 49, 46, 0.05);
  --shadow: 0 2px 8px rgba(44, 49, 46, 0.07);
  --shadow-lg: 0 8px 28px rgba(44, 49, 46, 0.1);

  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body { overflow-x: hidden; }

#app { min-height: 100vh; }

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 16px calc(40px + var(--safe-bottom));
}

/* ---------- 顶栏 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 12px;
  position: sticky;
  top: 0;
  background: rgba(247, 248, 247, 0.94);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.topbar.scrolled { border-bottom-color: var(--border); }

.topbar-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.topbar-back {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.topbar-back:active { background: var(--border); }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-subtitle {
  font-size: 13px;
  color: var(--text-sub);
  margin: 0 0 14px;
  line-height: 1.6;
}

.section-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin: 0 0 10px;
  font-weight: 600;
}

/* ---------- 首页 ---------- */
.hero {
  padding: 32px 0 20px;
  text-align: center;
}

.hero h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
  line-height: 1.35;
}

.hero p {
  color: var(--text-sub);
  font-size: 14px;
  margin: 0 0 4px;
}

.hero-meta {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.dot-sep { color: var(--border-strong); }

/* ---------- 表单 ---------- */
.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 8px;
}

.phone-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.2s;
}
.phone-input-wrap:focus-within { border-color: var(--primary); }
.phone-input-wrap.error { border-color: var(--danger); }

.phone-prefix {
  padding: 13px 12px;
  background: var(--primary-lighter);
  color: var(--text-sub);
  font-size: 15px;
  font-weight: 500;
  border-right: 1px solid var(--border);
  user-select: none;
}

.phone-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 12px;
  font-size: 18px;
  font-family: "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
  letter-spacing: 2px;
  background: transparent;
  color: var(--text);
  min-width: 0;
}
.phone-input::placeholder { color: var(--text-muted); letter-spacing: 1px; font-size: 15px; }

.field-hint {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 8px;
  min-height: 18px;
}
.field-hint.error { color: var(--danger); }

/* 人机验证 */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}
.captcha-q {
  flex: 1;
  font-size: 14px;
  color: var(--text);
  padding: 11px 14px;
  background: var(--primary-lighter);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-variant-numeric: tabular-nums;
}
.captcha-input {
  width: 88px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 11px 10px;
  font-size: 15px;
  text-align: center;
  outline: none;
  font-family: "SF Mono", Menlo, monospace;
}
.captcha-input:focus { border-color: var(--primary); }

/* ---------- 按钮 ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px 20px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
  letter-spacing: 1px;
}
.btn:active { background: var(--primary-dark); transform: scale(0.99); }
.btn:disabled { background: var(--border-strong); color: var(--text-muted); cursor: not-allowed; transform: none; }

.btn-lg { padding: 16px 20px; font-size: 17px; }
.btn-sm { padding: 10px 14px; font-size: 14px; letter-spacing: 0; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:active { background: var(--primary-light); }
.btn-ghost {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* 加载态 */
.btn.loading { position: relative; color: transparent; }
.btn.loading::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 提示条 ---------- */
.notice {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 14px;
}
.notice-error { background: var(--danger-light); color: #8f4a35; border: 1px solid #f0d9d1; }
.notice-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #dce7de; }
.notice-warn { background: var(--warn-light); color: #8a6d33; border: 1px solid #eee3cc; }

.disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: center;
  padding: 16px 8px 24px;
}

/* ---------- 总分卡 ---------- */
.score-hero {
  background: linear-gradient(180deg, var(--surface), var(--primary-lighter));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 20px 22px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}

.score-phone {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 14px;
  color: var(--text-sub);
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.score-value-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.score-value {
  font-size: 52px;
  font-weight: 700;
  line-height: 1;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}
.score-value.s-high { color: #4f7a58; }
.score-value.s-mid { color: var(--text-sub); }
.score-value.s-low { color: var(--danger); }

.score-max { font-size: 17px; color: var(--text-muted); font-weight: 500; }

.score-grade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--primary-dark);
  margin-bottom: 14px;
}
.score-grade.s-mid { background: #f0f1f0; color: var(--text-sub); }
.score-grade.s-low { background: var(--danger-light); color: #8f4a35; }

.score-desc {
  font-size: 14.5px;
  color: var(--text-sub);
  line-height: 1.75;
  max-width: 400px;
  margin: 0 auto;
}

/* 号码信息条 */
.meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.meta-chip {
  font-size: 12px;
  color: var(--text-sub);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- 亮点 / 短板 ---------- */
.sw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.sw-item {
  padding: 13px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.sw-item.good { background: var(--primary-lighter); border-color: #dce7de; }
.sw-item.bad { background: #fdf5f2; border-color: #f0ddd6; }
.sw-label { font-size: 12px; color: var(--text-sub); margin-bottom: 5px; }
.sw-name { font-size: 14.5px; font-weight: 600; margin-bottom: 3px; }
.sw-score { font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ---------- 图表 ---------- */
.chart-box {
  width: 100%;
  height: 260px;
  margin: 4px 0;
}
.chart-box.radar { height: 300px; }

.chart-legend {
  display: flex;
  gap: 14px;
  justify-content: center;
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.legend-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}

/* ---------- 维度详情 ---------- */
.dim-list { display: flex; flex-direction: column; gap: 10px; }

.dim-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.dim-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 15px;
  cursor: pointer;
  user-select: none;
}
.dim-head:active { background: var(--primary-lighter); }

.dim-left { display: flex; align-items: center; gap: 11px; min-width: 0; }

.dim-rank {
  width: 24px;
  height: 24px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dim-name { font-size: 15px; font-weight: 600; }
.dim-grade { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.dim-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.dim-score {
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--primary-dark);
  min-width: 34px;
  text-align: right;
}
.dim-score.s-mid { color: var(--text-sub); }
.dim-score.s-low { color: var(--danger); }

.dim-arrow {
  color: var(--text-muted);
  font-size: 11px;
  transition: transform 0.2s;
}
.dim-item.open .dim-arrow { transform: rotate(180deg); }

.dim-body {
  display: none;
  padding: 0 15px 15px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.dim-item.open .dim-body { display: block; }

.dim-summary {
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--text);
  margin: 0 0 14px;
  padding: 11px 13px;
  background: var(--primary-lighter);
  border-left: 2px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.dim-detail-list { margin: 0 0 14px; }
.dim-detail-item { margin-bottom: 11px; }
.dim-detail-item:last-child { margin-bottom: 0; }
.dim-detail-key {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 3px;
}
.dim-detail-val { font-size: 13.5px; color: var(--text-sub); line-height: 1.7; }

.dim-suggestion {
  font-size: 13.5px;
  line-height: 1.7;
  padding: 11px 13px;
  background: #fbfcfb;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
}
.dim-suggestion::before {
  content: '优化建议';
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

/* 维度内嵌条形进度 */
.dim-bar-track {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}
.dim-bar-fill { height: 100%; border-radius: 2px; transition: width 0.5s ease; }

/* ---------- 深度报告引导 ---------- */
.deep-cta {
  background: linear-gradient(165deg, #fdfcf9 0%, #f7f4ed 100%);
  border: 1px solid #e8e2d5;
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  margin-bottom: 14px;
  text-align: center;
}
.dark-mode .deep-cta { background: #f5f2ea; }

.deep-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: #9a7b3f;
  background: rgba(184, 147, 77, 0.12);
  border: 1px solid rgba(184, 147, 77, 0.25);
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.deep-cta h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
  line-height: 1.45;
}

.deep-cta-sub {
  font-size: 13.5px;
  color: var(--text-sub);
  margin: 0 0 18px;
  line-height: 1.7;
}

.feature-list {
  text-align: left;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.feature-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.feature-item:last-child { border-bottom: none; }
.feature-icon {
  width: 20px;
  height: 20px;
  border-radius: var(--radius);
  background: rgba(106, 141, 109, 0.14);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.feature-text { font-size: 14px; line-height: 1.6; }
.feature-title { font-weight: 600; }
.feature-desc { font-size: 13px; color: var(--text-sub); margin-top: 2px; }

/* 微信卡片 */
.wechat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
}

.wechat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.wechat-avatar {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 19px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.wechat-name { font-size: 15.5px; font-weight: 600; }
.wechat-role { font-size: 12.5px; color: var(--text-sub); margin-top: 2px; }

.wechat-qr {
  width: 100%;
  max-width: 200px;
  margin: 0 auto 16px;
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #fff;
}
.wechat-qr-empty {
  width: 100%;
  max-width: 180px;
  height: 180px;
  margin: 0 auto 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--primary-lighter);
}

.wechat-id-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-lighter);
  border: 1px solid #dce7de;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
}
.wechat-id-label { font-size: 12.5px; color: var(--text-sub); flex-shrink: 0; }
.wechat-id-value {
  font-family: "SF Mono", Menlo, monospace;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 2px;
  flex: 1;
}

.copy-hint {
  font-size: 13px;
  color: var(--text-sub);
  text-align: center;
  line-height: 1.7;
  margin: 10px 0 0;
}
.copy-hint strong { color: var(--primary-dark); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(84px + var(--safe-bottom));
  transform: translateX(-50%) translateY(12px);
  background: rgba(44, 49, 46, 0.94);
  color: #fff;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  max-width: 80vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 八星 ---------- */
.star-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.star-cell {
  text-align: center;
  padding: 11px 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.star-cell.good { background: var(--primary-lighter); border-color: #dce7de; }
.star-cell.bad { background: #fdf5f2; border-color: #f0ddd6; }
.star-name { font-size: 13px; font-weight: 600; }
.star-count { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.star-cell.good .star-count { color: var(--primary-dark); }
.star-cell.bad .star-count { color: var(--danger); }

.pair-list { display: flex; flex-direction: column; gap: 6px; }
.pair-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  background: #fbfcfb;
  font-size: 13px;
}
.pair-nums {
  font-family: "SF Mono", Menlo, monospace;
  font-weight: 700;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 4px;
  flex-shrink: 0;
}
.pair-pos { font-size: 11.5px; color: var(--text-muted); flex-shrink: 0; width: 44px; }
.pair-star { font-weight: 600; flex-shrink: 0; width: 42px; }
.pair-star.good { color: var(--primary-dark); }
.pair-star.bad { color: var(--danger); }
.pair-desc { color: var(--text-sub); font-size: 12.5px; flex: 1; min-width: 0; }
.pair-row.key { background: var(--primary-lighter); }

/* ---------- 五行 / 九宫 ---------- */
.wx-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}
.wx-cell {
  text-align: center;
  padding: 11px 2px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.wx-cell.missing { background: #fbfbfb; border-style: dashed; }
.wx-char { font-size: 16px; font-weight: 600; }
.wx-cell.missing .wx-char { color: var(--text-muted); }
.wx-count { font-size: 13px; color: var(--text-sub); font-variant-numeric: tabular-nums; margin-top: 3px; }
.wx-organ { font-size: 10.5px; color: var(--text-muted); margin-top: 1px; }

/* ---------- 月运 ---------- */
.month-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 8px;
}

.good-months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.gm-box {
  padding: 12px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.gm-box.best { background: var(--primary-lighter); border-color: #dce7de; }
.gm-box.worst { background: #fdf5f2; border-color: #f0ddd6; }
.gm-title { font-size: 12.5px; color: var(--text-sub); margin-bottom: 6px; }
.gm-months { font-size: 14.5px; font-weight: 600; line-height: 1.6; }

/* ---------- 建议列表 ---------- */
.advice-list { display: flex; flex-direction: column; gap: 10px; }
.advice-item {
  padding: 13px 14px;
  background: var(--primary-lighter);
  border: 1px solid #dce7de;
  border-radius: var(--radius);
}
.advice-title { font-size: 14px; font-weight: 600; color: var(--primary-dark); margin-bottom: 4px; }
.advice-text { font-size: 13.5px; color: var(--text-sub); line-height: 1.7; }

.tip-grid { display: flex; flex-direction: column; gap: 10px; }
.tip-item {
  padding: 12px 14px;
  background: #fbfcfb;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tip-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.tip-text { font-size: 13.5px; color: var(--text-sub); line-height: 1.7; }

/* ---------- 底部固定栏 ---------- */
.footer-actions {
  position: sticky;
  bottom: 0;
  background: rgba(247, 248, 247, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  padding: 12px 0 calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

/* ---------- 骨架屏 ---------- */
.skeleton {
  background: linear-gradient(90deg, #eef0ee 25%, #f6f7f6 50%, #eef0ee 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- 空态 ---------- */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-icon { font-size: 34px; margin-bottom: 12px; opacity: 0.5; }
.empty-text { font-size: 14px; }

/* ---------- 历史记录 ---------- */
.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 9px;
}
.history-left { min-width: 0; flex: 1; }
.history-phone { font-family: "SF Mono", Menlo, monospace; font-size: 15px; font-weight: 600; }
.history-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.history-score {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--primary-dark);
  flex-shrink: 0;
}

/* ---------- 响应式 ---------- */
@media (min-width: 640px) {
  .page { max-width: 600px; }
  .sw-grid { gap: 14px; }
}

@media (max-width: 360px) {
  body { font-size: 14px; }
  .score-value { font-size: 44px; }
  .star-grid { grid-template-columns: repeat(2, 1fr); }
  .wx-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 无障碍：尊重减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}