/* ============================================================
   面部几何分析 —— 样式（浅色主题）
   ============================================================ */

:root {
  --bg: #f5f6fa;
  --bg-soft: #eef0f7;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e4e7ee;
  --border-strong: #d3d8e3;
  --text: #1e2233;
  --text-soft: #5a6175;
  --text-mute: #8b93a7;
  --accent: #4f46e5;
  --accent-soft: #eef0ff;
  --teal: #0d9488;
  --amber: #b45309;
  --amber-soft: #fef6e7;
  --red: #dc2626;
  --red-soft: #fdeeee;
  --green: #15803d;
  --green-soft: #ecfdf3;
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(24, 28, 44, 0.05);
  --shadow: 0 6px 20px -8px rgba(24, 28, 44, 0.14), 0 2px 6px rgba(24, 28, 44, 0.04);
  --shadow-lg: 0 24px 50px -30px rgba(24, 28, 44, 0.3);
}

* {
  box-sizing: border-box;
}

/* hidden 属性优先级最高：避免被 .spinner{display:flex} 之类规则覆盖 */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 0 60px;
  background:
    radial-gradient(1100px 460px at 12% -8%, #e7e9ff 0%, rgba(231, 233, 255, 0) 60%),
    radial-gradient(900px 420px at 92% 4%, #e2f6f3 0%, rgba(226, 246, 243, 0) 55%), var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Source Han Sans SC', sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

/* ---------------------------- 顶栏 ---------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(16px, 4vw, 40px);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--accent), #7c6cf5 60%, #22a3a3);
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  box-shadow: var(--shadow-sm);
}

.brand strong {
  display: block;
  font-size: 15.5px;
  letter-spacing: 0.01em;
}

.brand small {
  display: block;
  color: var(--text-mute);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-pill,
.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  white-space: nowrap;
}

.status-pill[data-tone='ready'] {
  color: var(--green);
  background: var(--green-soft);
  border-color: #cdeedb;
}

.status-pill[data-tone='loading'] {
  color: var(--amber);
  background: var(--amber-soft);
  border-color: #f3e3c3;
}

.status-pill[data-tone='error'] {
  color: var(--red);
  background: var(--red-soft);
  border-color: #f6d4d4;
}

.privacy-pill {
  color: var(--teal);
  background: #e9f7f5;
  border-color: #cbeae6;
}

/* ---------------------------- 功能区切换 ---------------------------- */

/* 两个功能（单人测量 / 双人比对）的切换控件（2026-10-14 改版）。
   旧版是顶栏右侧一个 `.pill` 小链接，藏在「模型状态」和「隐私标识」中间，
   既不在视觉动线上、对比度也低 —— 用户反馈「好多人注意不到」。
   新版规则：
     · 独占一行、居中、限宽，跟主体内容同一条中轴线；
     · 两个 tab 等宽，当前页整体高亮（受 aria-current="page" 驱动）；
     · 每个 tab 带一行说明，用户不用点进去就知道两个功能分别干什么。 */
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: min(620px, 100%);
  margin: 18px auto 0;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.mode-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 11px;
  text-decoration: none;
  color: var(--text-soft);
  transition: background 140ms ease, color 140ms ease;
}

.mode-tab:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.mode-tab[aria-current='page'] {
  background: linear-gradient(135deg, var(--accent-soft), #e6f5f3);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.16);
}

.mode-tab-icon {
  font-size: 20px;
  line-height: 1;
  flex: 0 0 auto;
}

.mode-tab-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mode-tab-text strong {
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.mode-tab-text small {
  color: var(--text-mute);
  font-size: 11.5px;
  line-height: 1.4;
}

.mode-tab[aria-current='page'] .mode-tab-text small {
  color: #6d63c9;
}

/* ---------------------------- 布局 ---------------------------- */

main {
  width: min(1080px, 100% - 32px);
  margin: 0 auto;
}

.hero {
  padding: 44px 0 26px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3.6vw, 34px);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.hero p {
  max-width: 720px;
  margin: 0 auto;
  color: var(--text-soft);
  font-size: 15px;
}

.panel {
  margin-bottom: 22px;
  padding: 24px clamp(16px, 3vw, 28px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel-head {
  margin-bottom: 18px;
}

.panel-head.spaced {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px dashed var(--border-strong);
}

.panel-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  font-size: 17.5px;
}

.step {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.panel-desc {
  margin: 0;
  color: var(--text-mute);
  font-size: 13.5px;
}

/* ---------------------------- 按钮 ---------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 11px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.16s ease, background 0.16s ease;
  user-select: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  box-shadow: 0 10px 22px -12px rgba(79, 70, 229, 0.85);
}

.btn-primary:hover {
  box-shadow: 0 14px 26px -12px rgba(79, 70, 229, 0.95);
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: #eef1f7;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13.5px;
}

.btn-icon {
  font-size: 16px;
}

/* ---------------------------- 采集区 ---------------------------- */

.capture-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.camera-area {
  margin-top: 18px;
}

.video-wrap {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0b1020;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}

.video-wrap video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transform: scaleX(-1); /* 前置摄像头镜像显示更自然 */
}

/* 取景引导框样式已移除（2026-10-16）。
   原因：用户实测反馈手机拍照时叠加的椭圆框 / 发际线 / 眼睛线显得杂乱、没用。
   它们本来就只是装饰（pointer-events:none，不参与任何测量），
   实时指引已由 #captureHint 的文字承担，所以整块删掉而不是隐藏 ——
   留在样式表里只会在下次有人搜 "guide" 时造成困惑。 */

.camera-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.hint {
  margin: 16px 0 0;
  color: var(--text-mute);
  font-size: 13px;
}

/* ---------------------------- 拍摄要点（2026-10-14） ----------------------------
   放在采集按钮**上方** —— 用户是先看再拍，写在按钮下面等于拍完才看见。
   用浅底 + 左侧色条把它和普通说明区分开：这几条直接决定测量能不能做准，
   不是可有可无的提示，所以要比 .hint 更醒目一点。 */
.shot-tips {
  margin: 18px 0 20px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.shot-tips-title {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.shot-tips-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-soft);
}

/* 每条的关键动作加粗，扫一眼就能抓到 —— 用户不会逐字读 */
.shot-tips-list strong {
  color: var(--text);
  font-weight: 700;
}

.error-bar {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--red-soft);
  border: 1px solid #f3d2d2;
  color: #a12020;
  font-size: 13.5px;
  font-weight: 500;
}

.notice-bar {
  margin-bottom: 18px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--amber-soft);
  border: 1px solid #f0e2c4;
  color: #8a5a10;
  font-size: 13px;
  line-height: 1.7;
}

.notice-bar p {
  margin: 0;
}

/* ---------------------------- 画布 ---------------------------- */

.canvas-wrap {
  position: relative;
  display: grid;
  place-items: center;
  padding: 14px;
  background: repeating-conic-gradient(#f1f3f8 0% 25%, #e9ecf4 0% 50%) 50% / 18px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 220px;
}

#previewCanvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

.spinner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(248, 250, 252, 0.86);
  backdrop-filter: blur(3px);
  border-radius: var(--radius);
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 600;
}

.spinner-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #dfe3ee;
  border-top-color: var(--accent);
  animation: spin 0.85s linear infinite;
}

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

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 16px 0 4px;
  color: var(--text-soft);
  font-size: 12.5px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend i {
  width: 14px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}

.legend .sw-third {
  background: #0ea5e9;
}

.legend .sw-eye {
  background: #f59e0b;
}

.legend .sw-cheek {
  background: #8b5cf6;
}

.legend .sw-jaw {
  background: #ec4899;
}

.legend .sw-tilt {
  background: #ef4444;
}

.legend .sw-lip {
  background: #14b8a6;
}

.legend .sw-point {
  background: #0f766e;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

/* ---------------------------- 参数卡片 ---------------------------- */

.param-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
}

.param-card {
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: linear-gradient(180deg, #fbfcfe, #f6f8fc);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.param-card header h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text-soft);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.param-primary {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.param-detail {
  margin-top: 2px;
  color: var(--text-mute);
  font-size: 12.5px;
}

.param-items {
  list-style: none;
  margin: 14px 0 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--border-strong);
  display: grid;
  gap: 8px;
}

.param-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}

.param-label {
  color: var(--text-soft);
  flex: 1;
}

.param-value {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.param-value[data-tone='warn'] {
  color: var(--amber);
}

.param-value[data-tone='ok'] {
  color: var(--green);
}

.param-value[data-tone='muted'] {
  color: var(--text-mute);
}

.param-note {
  color: var(--text-mute);
  font-size: 12px;
  min-width: 62px;
  text-align: right;
}

.param-card footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 11.5px;
}

/* ---------------------------- 结论 ---------------------------- */

.conclusion-list {
  display: grid;
  gap: 14px;
}

.conclusion {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.conclusion[data-rule='R1'] {
  border-left-color: #0ea5e9;
}

.conclusion[data-rule='R2'] {
  border-left-color: var(--teal);
}

.conclusion[data-rule='R3'] {
  border-left-color: #ef4444;
}

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

.conclusion-head h3 {
  margin: 0;
  font-size: 16.5px;
}

.conclusion-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.tag {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
}

.tag-muted {
  background: var(--surface-2);
  color: var(--text-mute);
}

.conclusion-text {
  margin: 0;
  color: #2f3446;
  font-size: 14.5px;
}

.conclusion-evidence {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.sub-title {
  margin: 32px 0 12px;
  font-size: 15px;
}

.hint-inline {
  margin-left: 8px;
  color: var(--text-mute);
  font-size: 12px;
  font-weight: 400;
}

.observation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.observation {
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.observation-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.observation-head strong {
  font-size: 13.5px;
}

.observation-head span {
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.observation p {
  margin: 0;
  color: var(--text-soft);
  font-size: 12.8px;
}

/* 规则轨迹样式（.rule-trace/.rule-list/.rule-item/.rule-id/.rule-status/.rule-detail）
   已于 2026-10-13 随「规则判定过程」区块一并移除 —— 该区块不再渲染，样式留着是死代码。
   注：.summary 保留，它被双人页的其它区块复用。 */

.summary {
  margin: 16px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.notice {
  margin: 8px 0 0;
  color: var(--text-mute);
  font-size: 12.5px;
}

.privacy-line {
  margin: 26px 0 0;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #e9f7f5, #eef0ff);
  border: 1px solid #cfe9e6;
  color: #0f5f59;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* ---------------------------- 页脚 ---------------------------- */

.footer {
  width: min(1080px, 100% - 32px);
  margin: 28px auto 0;
  color: var(--text-mute);
  font-size: 12.5px;
  text-align: center;
}

.footer code {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--bg-soft);
  color: var(--text-soft);
  font-size: 12px;
}

.footer-note {
  margin-top: 6px;
}

/* ---------------------------- 响应式 ---------------------------- */

@media (max-width: 720px) {
  body {
    font-size: 14.5px;
  }

  .topbar {
    flex-wrap: wrap;
  }

  /* 窄屏：说明文字会挤成蚂蚁字，直接只留标题，图标 + 两个功能名足够表意 */
  .mode-switch {
    margin-top: 14px;
    gap: 8px;
    padding: 5px;
  }

  .mode-tab {
    padding: 10px 8px;
    justify-content: center;
  }

  .mode-tab-text small {
    display: none;
  }

  .capture-actions .btn {
    flex: 1 1 auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ============================================================
   人脸信息「单独同意」弹层
   —— 法规要求单独同意，故独立成层，不与总协议捆绑
   ============================================================ */

.consent-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(24, 28, 44, 0.52);
  backdrop-filter: blur(2px);
}

.consent-card {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px 28px 22px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.consent-card h2 {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
}

.consent-card p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-soft);
}

.consent-list {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.consent-list li {
  position: relative;
  padding: 0 0 0 16px;
  margin-bottom: 8px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-soft);
}

.consent-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.consent-list strong,
.consent-card strong {
  color: var(--text);
  font-weight: 600;
}

.consent-note {
  font-size: 12.5px;
  color: var(--text-mute);
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 14px;
}

/* ============================================================
   隐私政策等文档页
   ============================================================ */

.doc-panel {
  max-width: 780px;
  margin: 0 auto;
}

.doc-body h3 {
  margin: 26px 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.doc-body h3:first-child {
  margin-top: 4px;
}

.doc-body p,
.doc-body li {
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-soft);
}

.doc-body p {
  margin: 0 0 10px;
}

.doc-body ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.doc-body li {
  margin-bottom: 6px;
}

.doc-body strong {
  color: var(--text);
  font-weight: 600;
}

/* 待填写占位：上线前必须替换，故用醒目底色便于检查 */
.doc-todo {
  display: inline-block;
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 13px;
}

@media (max-width: 560px) {
  .consent-card {
    padding: 22px 20px 18px;
  }

  .consent-actions .btn {
    flex: 1 1 auto;
  }
}


/* ---------------------------- 气质画像 ---------------------------- */

/* 三根几何气质轴的定性标签 + 一段总述。
   刻意不给任何数字 / 百分比 / 刻度尺 —— 这一层回答的是
   「这张脸给人的视觉印象」，与测量数值是两回事，混在一起会
   让人以为印象也能精确到小数点。 */
.temperament-card {
  padding: 18px;
  background: linear-gradient(180deg, #fbfcfe, #f4f7fd);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.temperament-axes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.temperament-axis {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.temperament-axis-label {
  font-size: 12px;
  color: var(--text-mute);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.temperament-axis-tier {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.temperament-summary {
  margin: 0;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--text-soft);
}

/* ============================================================
   单人页 → 双人比对的转化位（2026-10-14）
   单人免费引流，双人比对收费，这里是两条线之间的桥。
   ============================================================ */

.pair-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #eef0ff, #e6f5f3);
  border: 1px solid #dcdffb;
}

.pair-cta-text {
  min-width: 0;
}

.pair-cta-text strong {
  display: block;
  font-size: 15.5px;
  margin-bottom: 5px;
}

.pair-cta-text p {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.7;
}

/* 悬念句（2026-10-14）：印着用户自己的脸型，视觉上要比静态说明更醒目一点 */
.pair-cta-text #pairCtaHook {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 13.5px;
}

.pair-cta-text #pairCtaHook em {
  font-style: normal;
  font-weight: 700;
  color: var(--brand, #4f46e5);
}

.pair-cta-btn {
  flex: 0 0 auto;
  text-decoration: none;
}

@media (max-width: 720px) {
  .pair-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

/* ---------------------------- 广告位（免费版专用，2026-10-16） ----------------------------
   只由服务端下发 edition=free 且配了广告时才显示（见 client/pair.js 的 renderAds）。
   付费版与未接广告的免费版：元素带 hidden，不占任何空间。
   做成中性容器而不是写死某种联盟的样式 —— 换广告商不用改 CSS。 */
.ad-slot {
  width: min(1080px, 100% - 32px);
  margin: 24px auto 0;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  text-align: center;
  overflow: hidden;
}

/* 占位态（只开了开关、还没填广告代码）。
   2026-10-19：文案从一整句部署说明缩短为「广告」两个字，于是占位本身
   也不再需要「一块框」——大字号的虚线空框里写着两个字，比广告还像故障。
   这里把它收成一行极淡的细字，读者扫一眼知道「这里是广告位」就够了。 */
.ad-slot[data-ad-placeholder='1'] {
  width: auto;
  max-width: 320px;
  margin: 18px auto 0;
  padding: 6px 12px;
  border: 0;
  background: none;
  color: var(--text-mute);
  font-size: 11px;
  letter-spacing: 0.18em;
  opacity: 0.55;
}

/* 填入真实广告代码后去掉虚线框与内边距，避免和广告自身样式打架 */
.ad-slot:not([data-ad-placeholder='1']) {
  padding: 0;
  border: 0;
  background: none;
}
