/**
 * 相亲市场定位测评 · PRO 商业旗舰版
 * 轻奢高定美学与全主流移动端适配样式 (Luxury Theme & Mobile Responsive)
 */

:root {
  /* 奢华高定调色板 */
  --bg-primary: #FAF8F5;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #F5EFEB;
  --ink-primary: #2B2520;
  --ink-secondary: #6B6259;
  --ink-muted: #9E9388;
  --gold-primary: #C59B3F;
  --gold-glow: #E0C068;
  --gold-light: #F7EEDB;
  --border-light: rgba(197, 155, 63, 0.22);
  --border-subtle: #E8E1D7;
  --shadow-card: 0 4px 20px -2px rgba(43, 37, 32, 0.06), 0 2px 6px -1px rgba(43, 37, 32, 0.03);
  --shadow-gold: 0 4px 16px rgba(197, 155, 63, 0.25);
  --radius-card: 18px;
  --radius-pill: 9999px;
  --radius-btn: 14px;
}

/* 全局重置与移动端原生体验优化 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--bg-primary);
  color: var(--ink-primary);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  touch-action: manipulation;
}

/* 顶部与底部安全区 (适配 iPhone 15/16 灵动岛、刘海屏与手势黑条) */
.page-container {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom)) 18px;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* 顶部刊头 / 报刊杂志风 Header */
.masthead {
  text-align: center;
  padding: 24px 8px 18px 8px;
  position: relative;
}

.eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--gold-primary);
  background: var(--gold-light);
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.masthead h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.25;
  color: var(--ink-primary);
  margin-bottom: 10px;
}

.masthead .dek {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.6;
  max-width: 420px;
  margin: 0 auto 16px auto;
}

.byline-badges {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.byline-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

/* 优雅卡片通用样式 */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 22px 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--ink-primary);
}

.card p {
  font-size: 13.5px;
  color: var(--ink-secondary);
  line-height: 1.6;
}

/* 按钮通用 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: #FFFFFF;
  background: linear-gradient(135deg, #C59B3F 0%, #A87A26 100%);
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  box-shadow: var(--shadow-gold);
  transition: all 0.2s ease;
  user-select: none;
}

.btn:active {
  transform: scale(0.98);
  opacity: 0.92;
}

.btn:disabled {
  background: #D4CDBC;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn.ghost {
  background: transparent;
  color: var(--ink-secondary);
  border: 1px solid var(--border-subtle);
  box-shadow: none;
}

.btn.ghost:active {
  background: rgba(0, 0, 0, 0.04);
}

.btn.secondary {
  background: #2B2520;
  color: #FAF8F5;
  box-shadow: 0 4px 14px rgba(43, 37, 32, 0.2);
}

/* 输入框 */
.input-field {
  width: 100%;
  height: 48px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0 16px;
  font-size: 16px;
  background: #FCFBF9;
  color: var(--ink-primary);
  margin: 12px 0;
  outline: none;
  transition: border-color 0.2s;
}

.input-field:focus {
  border-color: var(--gold-primary);
  background: #FFFFFF;
}

/* 作答步骤列表 / 须知 */
.notice-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.notice-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.notice-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold-light);
  color: var(--gold-primary);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.notice-text b {
  display: block;
  font-size: 14px;
  color: var(--ink-primary);
  margin-bottom: 2px;
}

.notice-text span {
  font-size: 13px;
  color: var(--ink-muted);
}

/* 分界线 */
.section-rule {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0 16px 0;
}

.section-rule::before, .section-rule::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.section-rule span {
  padding: 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold-primary);
  text-transform: uppercase;
}

/* 性别选择大卡片 */
.gender-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0;
}

.gender-btn {
  background: #FFFFFF;
  border: 2px solid var(--border-subtle);
  border-radius: 16px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.22s ease;
}

.gender-btn .gender-icon {
  font-size: 38px;
}

.gender-btn .gender-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-primary);
}

.gender-btn .gender-desc {
  font-size: 12px;
  color: var(--ink-muted);
}

.gender-btn.active {
  border-color: var(--gold-primary);
  background: #FFFDF9;
  box-shadow: 0 4px 20px rgba(197, 155, 63, 0.18);
  transform: translateY(-2px);
}

.gender-btn.active .gender-title {
  color: var(--gold-primary);
}

/* 答题进度条 (Sticky 头部体验) */
.progress-bar-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 245, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 0 14px 0;
  margin-bottom: 14px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  margin-bottom: 6px;
}

.progress-track {
  width: 100%;
  height: 6px;
  background: #E8E1D7;
  border-radius: 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #C59B3F, #E0C068);
  border-radius: 6px;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 问题题目排版 */
.question-header {
  margin-bottom: 20px;
}

.question-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 6px;
}

.question-header .sub-note {
  font-size: 13.5px;
  color: var(--gold-primary);
  font-weight: 500;
}

/* 字段组 */
.field-block {
  margin-bottom: 22px;
}

.field-label {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-primary);
  margin-bottom: 10px;
}

.field-idx {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--gold-light);
  color: var(--gold-primary);
  font-size: 11px;
  font-weight: 800;
  margin-right: 8px;
}

/* 选项按钮栅格 (单选 / 多选) */
.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.options-grid.cols-2 {
  grid-template-columns: 1fr 1fr;
}

.option-btn {
  background: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  min-height: 48px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-primary);
  cursor: pointer;
  transition: all 0.18s ease;
  touch-action: manipulation;
}

.option-btn:active {
  transform: scale(0.985);
}

.option-btn .opt-tag {
  font-size: 11px;
  color: var(--ink-muted);
  background: #F4EFEA;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.option-btn.selected {
  border-color: var(--gold-primary);
  background: #FFFDF9;
  color: var(--gold-primary);
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(197, 155, 63, 0.12);
}

.option-btn .tick {
  display: none;
  color: var(--gold-primary);
  font-weight: 800;
  font-size: 14px;
  margin-left: 6px;
}

.option-btn.selected .tick {
  display: inline-block;
}

/* 滑块控件 (大触控 thumb, 实时反馈气泡) */
.slider-container {
  background: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: 14px;
  padding: 18px 16px;
}

.slider-feedback {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.slider-val-tag {
  font-size: 20px;
  font-weight: 800;
  color: var(--gold-primary);
}

.slider-pct-pill {
  font-size: 12px;
  font-weight: 600;
  color: #4F6F52;
  background: #EAF2EB;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.custom-range {
  -webkit-appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 6px;
  background: #E8E1D7;
  outline: none;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C59B3F, #A87A26);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(168, 122, 38, 0.45);
  border: 2.5px solid #FFFFFF;
  transition: transform 0.15s ease;
}

.custom-range::-webkit-slider-thumb:active {
  transform: scale(1.18);
}

.slider-bounds {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink-muted);
  margin-top: 8px;
}

/* 操作吸底栏 (Sticky Bottom Actions) */
.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 40;
  background: rgba(250, 248, 245, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 0 max(16px, env(safe-area-inset-bottom)) 0;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-row {
  display: flex;
  gap: 10px;
}

.btn-row .btn {
  flex: 1;
}

/* ================== 结果报告页专属样式 ================== */

/* 核心判决与仪表盘 */
.verdict-box {
  text-align: center;
  padding: 16px 8px 10px 8px;
}

.tier-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
}

.tier-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--ink-primary);
  margin-bottom: 18px;
}

/* 环形流光仪表盘 */
.gauge-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0 16px 0;
}

.gauge-center {
  position: relative;
  width: 156px;
  height: 156px;
}

.gauge-text {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gauge-score-num {
  font-size: 46px;
  font-weight: 900;
  line-height: 1;
  color: var(--ink-primary);
  letter-spacing: -1px;
}

.gauge-score-cap {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-primary);
  letter-spacing: 1px;
  margin-top: 4px;
}

.tier-desc {
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.65;
  text-align: justify;
  margin-top: 10px;
}

/* 9维横向柱形图 */
.dims-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 12px 0;
}

.dim-row {
  display: grid;
  grid-template-columns: 68px 1fr 34px;
  align-items: center;
  gap: 10px;
}

.dim-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
}

.dim-bar-track {
  height: 8px;
  background: #E8E1D7;
  border-radius: 6px;
  overflow: hidden;
}

.dim-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.dim-val {
  font-size: 13px;
  font-weight: 700;
  text-align: right;
  color: var(--ink-primary);
}

/* 人设标签高光徽章 */
.persona-tags-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 12px 0;
}

.persona-tag-card {
  background: #FFFDF9;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.persona-tag-icon {
  font-size: 26px;
  flex-shrink: 0;
}

.persona-tag-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-primary);
}

.persona-tag-desc {
  font-size: 12.5px;
  color: var(--ink-secondary);
  line-height: 1.45;
}

/* 双画像对比清单 (理想型 vs 底线型) */
.dual-profiles-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 14px 0;
}

.profile-card {
  background: #FFFFFF;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 18px 16px;
  box-shadow: var(--shadow-card);
}

.profile-card.ideal {
  border-color: rgba(197, 155, 63, 0.4);
  background: linear-gradient(180deg, #FFFDF9 0%, #FFFFFF 100%);
}

.profile-card.base {
  border-color: rgba(107, 98, 89, 0.25);
}

.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.profile-header-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-primary);
}

.profile-header-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-primary);
}

.profile-item-row {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 8px;
  padding: 7px 0;
  font-size: 13px;
  border-bottom: 1px dashed rgba(232, 225, 215, 0.7);
}

.profile-item-row:last-child {
  border-bottom: none;
}

.profile-item-key {
  color: var(--ink-muted);
  font-weight: 500;
}

.profile-item-val {
  color: var(--ink-primary);
  font-weight: 600;
  text-align: right;
}

/* 避坑雷区指南卡片 */
.redflag-item {
  background: #FFF9F9;
  border-left: 4px solid #C2653A;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.redflag-title {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 700;
  color: #C2653A;
  margin-bottom: 4px;
}

.redflag-text {
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

/* 自我介绍文案生成器卡片 */
.bio-card-wrapper {
  background: #FFFDF9;
  border: 1.5px solid var(--border-light);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

.bio-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.bio-card-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-primary);
}

.bio-card-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-primary);
  background: var(--gold-light);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.bio-content-box {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  color: var(--ink-primary);
  white-space: pre-wrap;
  line-height: 1.6;
  margin: 10px 0;
  max-height: 220px;
  overflow-y: auto;
}

.bio-copy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 38px;
  border: 1px solid var(--gold-primary);
  background: #FFFDF9;
  color: var(--gold-primary);
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}

.bio-copy-btn:active {
  background: var(--gold-light);
}

/* 弹窗与遮罩 (好评有礼 & 长图保存) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: rgba(30, 25, 20, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-dialog {
  background: #FFFFFF;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px 20px;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  animation: modalPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-close {
  background: #F4EFEA;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  color: var(--ink-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Toast 提示浮条 */
.toast-bar {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(43, 37, 32, 0.92);
  color: #FFFFFF;
  font-size: 13.5px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  z-index: 200;
  pointer-events: none;
  animation: toastFade 0.3s ease;
}

/* 卖家品牌底部 */
.seller-footer {
  text-align: center;
  padding: 24px 10px 14px 10px;
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.8;
}

.seller-footer b {
  color: var(--ink-secondary);
}

/* 动效关键帧 */
@keyframes modalPop {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes toastFade {
  0% { opacity: 0; transform: translate(-50%, 10px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}
