/* 八字合婚 · 粉白婚配表单主题 */
:root {
  --man: #8b1538;
  --woman: #a61e45;
  --pass: #2e8b57;
  --fail: #c41e3a;
  --wx-mu: #2e8b57;
  --wx-huo: #d64545;
  --wx-tu: #b8860b;
  --wx-jin: #c9a020;
  --wx-shui: #2b6cb0;
  --bg: #fff5f5;
  --panel: #ffffff;
  --input-bg: #fbebec;
  --border: rgba(139, 21, 56, 0.1);
  --accent: #8b1538;
  --accent-2: #a61e45;
  --accent-dark: #6d1028;
  --accent-rgb: 139, 21, 56;
  --text: #5c2030;
  --muted: #9a6875;
  --shadow: 0 4px 20px rgba(139, 21, 56, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.65;
  overflow-x: hidden;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(0.65rem, env(safe-area-inset-top)) 1rem 0.65rem;
  background: rgba(255, 245, 245, 0.92);
  border-bottom: 1px solid rgba(139, 21, 56, 0.08);
  backdrop-filter: blur(10px);
}

.link-back {
  position: absolute;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(139, 21, 56, 0.18);
  background: #fff;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
}
.link-back:hover {
  border-color: rgba(139, 21, 56, 0.35);
  background: #fff8f8;
}

.logo-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.page {
  max-width: 440px;
  margin: 0 auto;
  padding: 0.85rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
  min-width: 0;
}

.seal-note {
  text-align: center;
  font-size: 0.72rem;
  color: #9a8088;
  margin-bottom: 0.85rem;
  line-height: 1.5;
  padding: 0 0.25rem;
}

.form-panel { display: grid; gap: 0.75rem; }

.person-panel {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 0;
  border-radius: 20px;
  padding: 1rem 1.05rem 1.05rem;
  box-shadow: var(--shadow);
}
.person-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(139, 21, 56, 0.15) 12%, #8b1538 50%, rgba(139, 21, 56, 0.15) 88%, transparent 100%);
  pointer-events: none;
}

.person-man::before {
  background: linear-gradient(90deg, transparent 0%, rgba(139, 21, 56, 0.12) 12%, #8b1538 50%, rgba(139, 21, 56, 0.12) 88%, transparent 100%);
}
.person-woman::before {
  background: linear-gradient(90deg, transparent 0%, rgba(166, 30, 69, 0.12) 12%, #a61e45 50%, rgba(166, 30, 69, 0.12) 88%, transparent 100%);
}

.person-panel h2 {
  font-size: 0.98rem;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--accent);
  font-weight: 700;
}

.person-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: #f5b0bc;
  flex-shrink: 0;
}
.person-icon {
  font-size: 0.88rem;
  color: #fff;
  line-height: 1;
}
.person-woman .person-icon-wrap { background: #f5a8b8; }
.person-label { letter-spacing: 0.04em; }

.field-block { margin-bottom: 0.75rem; }
.field-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.65rem;
  margin-bottom: 0.42rem;
}
.field-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #7a4a55;
}
.calendar-toggle-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
}
.radio-label {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.76rem;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
}
.radio-label input {
  width: 0.92rem;
  height: 0.92rem;
  margin: 0;
  accent-color: var(--accent);
}
.radio-label input:checked + span {
  color: var(--accent);
  font-weight: 600;
}

.person-panel .birth-pick-btn {
  width: 100%;
  min-height: 44px;
  padding: 0.62rem 0.85rem;
  border: 0;
  border-radius: 12px;
  background: var(--input-bg);
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}
.person-panel .birth-pick-btn.placeholder {
  color: #b88896;
  font-weight: 400;
}
.person-panel .birth-pick-btn:hover {
  background: #f8dfe3;
}
.person-panel .birth-pick-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.12);
}

.field-row {
  display: grid;
  gap: 0.38rem;
}
.field-row label {
  font-size: 0.8rem;
  color: #7a4a55;
  font-weight: 700;
}
.person-panel .birth-hour-native {
  width: 100%;
  min-height: 44px;
  padding: 0.62rem 2.2rem 0.62rem 0.85rem;
  border: 0;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 500;
  background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%238b1538'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 0.65rem center / 1.1rem;
  color: var(--accent);
  appearance: none;
  -webkit-appearance: none;
}
.person-panel .birth-hour-native:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.12);
}

.actions { margin-top: 0.35rem; }
.btn {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, #a61e45, #8b1538);
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 21, 56, 0.24);
}
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.result-panel { margin-top: 1.2rem; display: grid; gap: 0.9rem; min-width: 0; }
.result-panel.hidden { display: none; }

.score-hero {
  background: linear-gradient(135deg, #fff5f0, #fff);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.score-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}
.score-grade {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0.25rem;
  color: var(--gold);
}
.score-sub { font-size: 0.8rem; color: var(--muted); margin-top: 0.35rem; }

.score-effort-hint {
  font-size: 0.78rem;
  line-height: 1.55;
  color: #9a5c20;
  margin: 0.35rem 0 0;
  padding: 0.35rem 0.5rem;
  background: rgba(212, 160, 60, 0.12);
  border-radius: 8px;
  border-left: 3px solid var(--gold);
}
.hero-effort { margin: 0.5rem auto 0; max-width: 28rem; text-align: left; }
.dim-effort { margin: 0.25rem 0 0.4rem; }
.rule-item .score-effort-hint { margin: 0.2rem 0 0.35rem; font-size: 0.72rem; }

.dual-charts { display: grid; gap: 0.75rem; }
@media (min-width: 720px) { .dual-charts { grid-template-columns: 1fr 1fr; } }

.mini-chart {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
  overflow-x: auto;
}
.mini-chart h3 {
  font-size: 0.85rem;
  margin-bottom: 0.55rem;
  color: var(--accent);
}
.mini-meta { font-size: 0.72rem; color: var(--muted); margin-bottom: 0.5rem; line-height: 1.5; }

.sizhu-mini {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.75rem;
}
.sizhu-mini th, .sizhu-mini td {
  border: 1px solid #f0d5cc;
  padding: 0.35rem 0.25rem;
  text-align: center;
  vertical-align: middle;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.sizhu-mini th { background: var(--panel-alt); color: var(--muted); font-weight: 600; }
.sizhu-mini .row-label {
  width: 2.4rem;
  text-align: left;
  padding-left: 0.4rem;
  white-space: nowrap;
  color: var(--muted);
}
.sizhu-mini tr.row-shensha td.cell-shensha {
  white-space: normal;
  vertical-align: top;
  text-align: center;
  font-size: 0.68rem;
  line-height: 1.45;
  padding: 0.35rem 0.2rem;
}
.shensha-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.12rem 0.2rem;
  justify-content: center;
  align-items: flex-start;
}
.shensha-tag {
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
  line-height: 1.35;
}
.gz-char { font-weight: 700; font-size: 0.95rem; }
.wx-木 { color: var(--wx-mu); }
.wx-火 { color: var(--wx-huo); }
.wx-土 { color: var(--wx-tu); }
.wx-金 { color: var(--wx-jin); }
.wx-水 { color: var(--wx-shui); }

.dim-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow);
}
.dim-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.dim-head h3 { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.dim-score {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--accent);
  white-space: nowrap;
}
.dim-desc { font-size: 0.75rem; color: var(--muted); margin-bottom: 0.55rem; }
.rule-list { list-style: none; display: grid; gap: 0.45rem; }
.rule-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.55rem;
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  background: var(--panel-alt);
  font-size: 0.78rem;
}
.rule-icon { font-size: 0.9rem; line-height: 1.4; }
.rule-item.pass .rule-icon::before { content: "✓"; color: var(--pass); }
.rule-item.fail .rule-icon::before { content: "✗"; color: var(--fail); }
.rule-name { font-weight: 700; }
.rule-desc { color: var(--muted); grid-column: 2; }

.ai-actions { margin-top: 0.25rem; }
.btn-ai {
  background: linear-gradient(135deg, #d4a84b, #c41e3a);
  color: #fff;
  box-shadow: 0 4px 14px rgba(196, 30, 58, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}
.btn-ai-badge {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.22);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}
.btn-ai:disabled { opacity: 0.55; cursor: not-allowed; }

.ai-result { margin-top: 0.25rem; min-width: 0; max-width: 100%; }
.ai-result.hidden { display: none; }
.ai-loading {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}
.ai-loading::before {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #f0d5cc;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -0.15rem;
  margin-right: 0.4rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

.thinking-box {
  margin-bottom: 0.65rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--thinking-panel-from), var(--thinking-panel-to));
  font-size: 0.8rem;
}
.thinking-box summary {
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--thinking-muted);
}
.thinking-body {
  padding: 0 0.75rem 0.65rem;
  color: var(--thinking-text);
  white-space: pre-wrap;
  max-height: 200px;
  overflow-y: auto;
}

.ai-output {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.05rem;
  font-size: 0.88rem;
  line-height: 1.75;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.ai-interpret-wrap,
.ai-interpret-output,
.ai-interpret-content {
  max-width: 100%;
  min-width: 0;
}
.ai-table-scroll {
  margin: 0.5rem 0;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #f0d5cc;
  border-radius: 8px;
  background: var(--panel-alt);
}
.ai-output h1, .ai-output h2, .ai-output h3 {
  font-size: 0.95rem;
  margin: 1rem 0 0.45rem;
  color: var(--accent);
}
.ai-output h1:first-child, .ai-output h2:first-child, .ai-output h3:first-child { margin-top: 0; }
.ai-output table,
.ai-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  margin: 0;
  table-layout: auto;
}
.ai-output th, .ai-output td,
.ai-table th, .ai-table td {
  border: 1px solid #f0d5cc;
  padding: 0.4rem 0.45rem;
  text-align: center;
  vertical-align: top;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 2.8em;
  max-width: 10em;
}
.ai-output th, .ai-table th { background: var(--panel-alt); font-weight: 600; }
.ai-output ul, .ai-output ol { padding-left: 1.2rem; margin: 0.35rem 0; }
.ai-output p { margin: 0.35rem 0; }

.site-footer {
  text-align: center;
  padding: 1.2rem 1rem 1.5rem;
  font-size: 0.72rem;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(1.2rem + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: 90vw;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(61, 32, 32, 0.9);
  color: #fff;
  font-size: 0.82rem;
  z-index: 100;
}
.toast.hidden { display: none; }

body.modal-open { overflow: hidden; }

/* AI 确认弹窗（与八字页同构，红金主题） */
.ai-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
}
.ai-confirm-modal.hidden { display: none; }
.ai-confirm-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #2a1414;
}
.ai-confirm-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  background: #fff;
  overflow: hidden;
}
.ai-confirm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  padding: max(0.85rem, env(safe-area-inset-top)) 1rem 0.85rem;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.18);
  background: linear-gradient(180deg, #fff, #fff5f0);
}
.ai-confirm-header h3 {
  margin: 0;
  font-size: 1.08rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.04em;
}
.ai-confirm-close {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  color: var(--accent-dark);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}
.ai-confirm-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.ai-confirm-body {
  flex: 1 1 auto;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.1rem 1.4rem;
  background:
    radial-gradient(ellipse 80% 42% at 50% 0%, rgba(var(--accent-rgb), 0.12), transparent 70%),
    radial-gradient(circle at 12% 88%, rgba(201, 162, 39, 0.08), transparent 32%),
    radial-gradient(circle at 88% 78%, rgba(196, 30, 58, 0.06), transparent 30%),
    linear-gradient(180deg, #fff8f5 0%, #fff0eb 48%, #ffe8e0 100%);
  -webkit-overflow-scrolling: touch;
}
.ai-confirm-stage {
  width: min(720px, 100%);
  margin: 0 auto;
}

.ai-confirm-content {
  margin: 0;
}

.confirm-dual {
  display: grid;
  gap: 0.65rem;
  align-items: stretch;
}
@media (min-width: 600px) {
  .confirm-dual {
    grid-template-columns: 1fr auto 1fr;
    gap: 0.55rem;
    align-items: start;
  }
}

.confirm-vs {
  display: grid;
  place-items: center;
  align-self: center;
  width: 2rem;
  height: 2rem;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, #e04555, #c41e3a);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(196, 30, 58, 0.28);
}
@media (max-width: 599px) {
  .confirm-vs {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
  }
}

.confirm-person {
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 14px;
  background: #fff;
  padding: 0.75rem 0.7rem 0.85rem;
  box-shadow: 0 8px 22px rgba(196, 30, 58, 0.07);
}
.confirm-person-man {
  border-top: 3px solid var(--man);
  background: linear-gradient(180deg, rgba(196, 30, 58, 0.05), #fff 38%);
}
.confirm-person-woman {
  border-top: 3px solid var(--woman);
  background: linear-gradient(180deg, rgba(224, 69, 85, 0.06), #fff 38%);
}

.confirm-person-head {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}
.confirm-person-head h4 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.06em;
}
.confirm-person-icon {
  font-size: 1rem;
  line-height: 1;
}
.confirm-person-man .confirm-person-icon { color: var(--man); }
.confirm-person-woman .confirm-person-icon { color: var(--woman); }

.confirm-birth {
  margin-bottom: 0.65rem;
  padding: 0.5rem 0.55rem;
  border-radius: 10px;
  background: rgba(255, 248, 245, 0.92);
  border: 1px solid rgba(var(--accent-rgb), 0.1);
}
.confirm-birth p {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--muted);
  word-break: break-word;
}
.confirm-birth p + p { margin-top: 0.2rem; }

.confirm-bazi {
  border: 1px solid rgba(var(--accent-rgb), 0.14);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel-alt);
}
.confirm-bazi-head,
.confirm-bazi-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.confirm-bazi-head span {
  padding: 0.35rem 0.2rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.12);
}
.confirm-bazi-head span + span {
  border-left: 1px solid rgba(var(--accent-rgb), 0.1);
}
.confirm-pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.55rem 0.15rem 0.65rem;
  background: #fff;
}
.confirm-pillar + .confirm-pillar {
  border-left: 1px solid rgba(var(--accent-rgb), 0.1);
}
.confirm-pillar .gz-char {
  font-size: 1.05rem;
  line-height: 1.15;
}

.ai-confirm-score {
  display: flex;
  align-items: baseline;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.45rem;
  margin-top: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.95), rgba(255, 245, 230, 0.9));
}
.confirm-score-label {
  font-size: 0.76rem;
  color: var(--muted);
}
.confirm-score-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.confirm-score-unit {
  font-size: 0.82rem;
  color: var(--accent);
  font-weight: 600;
}
.confirm-score-grade {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold);
}
.ai-confirm-hero {
  position: relative;
  width: 4.6rem;
  height: 4.6rem;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
}
.ai-confirm-hero-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  background: radial-gradient(circle at 35% 30%, #fff 0%, #ffe8e0 55%, #ffd5cc 100%);
  box-shadow: 0 10px 28px rgba(var(--accent-rgb), 0.16);
}
.ai-confirm-hero-mark {
  position: relative;
  z-index: 1;
  color: var(--accent-dark);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}
.ai-confirm-lead {
  margin: 0 0 1rem;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.65;
  text-align: center;
}
.ai-confirm-list {
  margin: 0;
  padding: 0;
  border: 1px solid rgba(var(--accent-rgb), 0.22);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(196, 30, 58, 0.08);
  overflow: hidden;
}
.ai-confirm-list > div {
  display: grid;
  grid-template-columns: 5.6em 1fr;
  gap: 0.4rem 0.85rem;
  align-items: center;
  padding: 0.78rem 0.95rem;
  border-top: 1px solid rgba(var(--accent-rgb), 0.12);
}
.ai-confirm-list > div:first-child { border-top: 0; }
.ai-confirm-list dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.ai-confirm-list dd {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
}
.ai-confirm-hint {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
  text-align: center;
}
.ai-confirm-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
}
.ai-confirm-steps li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.7rem 0.35rem 0.75rem;
  border: 1px solid rgba(var(--accent-rgb), 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
  text-align: center;
}
.ai-confirm-steps li span {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  background: #fff;
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
}
.ai-confirm-steps li.is-active {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: linear-gradient(180deg, #fff, #fff0eb);
  color: var(--accent-dark);
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.12);
}
.ai-confirm-steps li.is-active span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.ai-confirm-actions {
  display: flex;
  justify-content: stretch;
  gap: 0.55rem;
  flex: 0 0 auto;
  padding: 0.9rem 1rem max(0.95rem, env(safe-area-inset-bottom));
  border-top: 1px solid rgba(var(--accent-rgb), 0.16);
  background: linear-gradient(180deg, #fff, #fff5f0);
}
.ai-confirm-actions .btn {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
}
.ai-confirm-cancel {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
}
.ai-confirm-cancel:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}
.ai-confirm-ok {
  border: 1px solid var(--accent);
  color: #fff;
  background: linear-gradient(135deg, var(--accent-2), var(--accent) 55%, var(--accent-dark));
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.28);
}
@media (max-width: 720px) {
  .ai-confirm-body { min-height: 0; align-items: center; }
  .ai-confirm-stage { padding-bottom: 0.25rem; }
  .ai-confirm-hero { width: 5rem; height: 5rem; margin-bottom: 1.15rem; }
  .ai-confirm-lead { font-size: 0.95rem; }
  .ai-confirm-list > div { padding: 0.88rem 1rem; }
  .ai-confirm-list dd { font-size: 1.02rem; }
  .ai-confirm-steps { margin-top: 1.55rem; }
}
@media (min-width: 721px) {
  .ai-confirm-modal {
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
  }
  .ai-confirm-backdrop { background: rgba(42, 20, 20, 0.55); }
  .ai-confirm-panel {
    width: min(760px, 100%);
    height: auto;
    max-height: min(90vh, 820px);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(42, 20, 20, 0.28);
  }
  .ai-confirm-header { padding: 0.85rem 1rem; }
  .ai-confirm-body { padding: 1.15rem 1.15rem 1.25rem; align-items: stretch; }
  .ai-confirm-hero { width: 4.2rem; height: 4.2rem; margin-bottom: 0.9rem; }
  .ai-confirm-hero-mark { font-size: 1.35rem; }
  .ai-confirm-steps { margin-top: 1.15rem; }
  .ai-confirm-actions { padding: 0.85rem 1rem 1rem; }
  .ai-confirm-actions .btn { min-height: 42px; }
}

.hidden { display: none !important; }

/* 出生日期弹窗 · 合婚主题 */
.birth-picker-modal {
  --accent: #8b1538;
  --accent-dark: #6d1028;
  --accent-rgb: 139, 21, 56;
  --border: rgba(139, 21, 56, 0.14);
  --panel: #fff;
  --panel-alt: #fff5f7;
  --text: #5c2030;
  --muted: #9a6875;
}
