/* ========== 心动相遇 - 全局样式 ========== */
:root {
  --primary: #5B8DEF;
  --primary-dark: #4A7CD4;
  --primary-light: #E8F0FE;
  --secondary: #6C5CE7;
  --accent: #A8C8FF;
  --bg: #F5F8FC;
  --bg-card: #FFFFFF;
  --text: #2D3436;
  --text-secondary: #636E72;
  --text-light: #B2BEC3;
  --border: #E0E7F0;
  --success: #00B894;
  --warning: #FDCB6E;
  --danger: #E17055;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  max-width: 100vw;
  overflow-x: hidden;
}

/* 页面容器 */
.page-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 80px;
  position: relative;
}

/* 顶部导航 */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.top-bar-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.top-bar-back {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  font-size: 1.2rem;
}

/* 底部导航栏 */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 8px 0 env(safe-area-inset-bottom, 8px);
  border-top: 1px solid var(--border);
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.68rem;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
}

.nav-item.active { color: var(--primary); }

.nav-item .nav-icon {
  font-size: 1.4rem;
  transition: transform 0.2s;
}

.nav-item.active .nav-icon { transform: scale(1.1); }

/* 卡片 */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  margin: 12px 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  border: none;
  font-family: var(--font);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 4px 15px rgba(232,93,117,0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(232,93,117,0.45);
}

.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover { background: var(--primary-light); }

.btn-block { width: 100%; }

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 36px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* 表单 */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--primary);
  margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 4px;
}

.form-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 4px;
}

/* 标签选择器 */
.tag-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-item {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.tag-item.selected {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 500;
}

/* 照片上传 */
.photo-upload-area {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.photo-upload-box {
  width: 90px; height: 90px;
  border: 2px dashed #D0D5DD;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  background: #F9FAFB;
}

.photo-upload-box:hover { border-color: #8EBBF0; background: #F4F8FF; }

.photo-upload-box img {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0; left: 0;
}

.photo-upload-box .delete-photo {
  position: absolute;
  top: 2px; right: 2px;
  width: 22px; height: 22px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  cursor: pointer;
  border: none;
}

.photo-upload-box .photo-lock {
  position: absolute;
  top: 2px; right: 2px;
  width: 22px; height: 22px;
  background: var(--primary, #6C5CE7);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  border: none;
}

/* 认证页照片单行 */
.auth-photo-row {
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 6px;
  align-items: flex-start;
}
.auth-photo-row .photo-upload-box {
  width: 90px; height: 90px;
  flex: 0 0 90px;
  border: 2px dashed #C5D9F8;
  background: #F4F8FF;
  border-radius: 14px;
}
.auth-photo-row .photo-wrapper {
  flex: 0 0 auto;
}

/* 照片标签 —— 位于照片盒子外部下方 */
.photo-label-outside {
  text-align: center;
  font-size: 0.62rem;
  color: #4A7CD4;
  font-weight: 600;
  margin-top: 3px;
  white-space: nowrap;
  line-height: 1;
}
.photo-label-outside.avatar-label {
  color: #5B8DEF;
}

/* 照片包装器 —— 让标签与照片盒子对齐 */
.photo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 0 0 90px;
}

/* Toast提示 */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  animation: toastIn 0.3s ease;
  max-width: 90vw;
  text-align: center;
}

.toast-success { background: var(--success); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }
.toast-info { background: var(--secondary); color: #fff; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  flex-direction: column;
  gap: 16px;
}

/* 弹窗/模态框 */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
}

.modal-body { margin-bottom: 20px; font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; }

.modal-footer { display: flex; gap: 10px; }
.modal-footer .btn { flex: 1; }

/* 匹配卡片 */
.match-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 16px;
  border: 1px solid var(--border);
}

.match-card-photo {
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: linear-gradient(135deg, #fdf2f4, #f8e8eb);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 3rem;
}

.match-card-info {
  padding: 16px 20px;
}

.match-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.match-card-name {
  font-size: 1.2rem;
  font-weight: 700;
}

.match-card-score {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.match-card-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.match-tag {
  background: var(--bg);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.match-card-actions {
  display: flex;
  gap: 12px;
  padding: 0 20px 20px;
}

.match-card-actions .btn { flex: 1; }

/* ===== 信善明鉴 · badge/双卡片 ===== */
.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 600;
}
.auth-badge.verified {
  background: #E8F0FE;
  color: #5B8DEF;
}
.auth-badge.pending {
  background: #FFF0F3;
  color: #E6677D;
}

/* 工本费 + 感恩承诺 双卡片 */
.auth-dual-card {
  background: #fff;
  border-radius: 14px;
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: relative;
  border: 1.5px solid #EEF0F2;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.auth-dual-card:active {
  transform: scale(0.97);
  background: #F9FAFB;
}
.auth-dual-icon {
  font-size: 1.5rem;
  margin-bottom: 4px;
}
.auth-dual-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #2D3436;
  margin-bottom: 6px;
}

/* 双卡片右上角标签 */
.auth-corner-tag {
  position: absolute;
  top: 8px;
  right: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  white-space: nowrap;
  z-index: 2;
  background: #F8A5B5;
  color: #fff;
}

/* 反馈表单 是/否 切换 */
.feedback-yn {
  display: inline-block;
  padding: 6px 20px;
  border-radius: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  background: #F0F2F5;
  color: #636E72;
  transition: all 0.2s;
}
.feedback-yn.yes {
  background: #E6F9F1;
  color: #00B894;
}
.feedback-yn.no {
  background: #FFF0F0;
  color: #E17055;
}

/* 页面内独立样式 */
.page { display: none; }
.page.active { display: block; }

/* 响应式 */
@media (max-width: 480px) {
  .card { margin: 10px 12px; padding: 16px; }
  .match-card-photo { height: 220px; }
}

/* ========== 支付弹窗（紧凑版） ========== */
.pay-modal-overlay {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 16px;
}

.pay-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  overflow: hidden;
  animation: modalSlideUp 0.3s ease;
  padding: 0;
}

.pay-header {
  position: relative;
  background: linear-gradient(135deg, #5B8DEF 0%, #4A7CD4 50%, #8FB8FF 100%);
  color: #fff;
  padding: 14px 20px 16px;
  text-align: center;
  overflow: hidden;
}

.pay-header::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.12);
  border-radius: 50%;
}

.pay-header::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -20px;
  width: 90px; height: 90px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.pay-header-icon {
  font-size: 1.3rem;
  margin-bottom: 2px;
  position: relative;
  z-index: 1;
}

.pay-header-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
  position: relative;
  z-index: 1;
  letter-spacing: 0.5px;
}

.pay-header-sub {
  font-size: 0.7rem;
  opacity: 0.85;
  position: relative;
  z-index: 1;
}

.pay-close {
  position: absolute;
  top: 8px; right: 8px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-family: var(--font);
  padding: 0;
  transition: background 0.2s;
}

.pay-close:hover {
  background: rgba(255,255,255,0.35);
}

.pay-body {
  padding: 12px 20px 16px;
}

.pay-amount-box {
  text-align: center;
  padding: 6px 0 10px;
  border-bottom: 1px dashed #F0E6E8;
  margin-bottom: 14px;
}

.pay-amount-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.pay-amount {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  line-height: 1.1;
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

.pay-amount-tip {
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 4px;
}

.pay-state {
  text-align: center;
  padding: 8px 0 4px;
}

.pay-state-icon {
  font-size: 1.5rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
  font-weight: 700;
}

.pay-icon-success {
  background: #E6F9F1;
  color: var(--success);
  font-size: 1.6rem;
}

.pay-icon-warn {
  background: #FFF1EC;
  color: #E17055;
  font-size: 1.6rem;
}

.pay-state-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.pay-title-success { color: var(--success); }
.pay-title-warn { color: #E17055; }

.pay-state-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.pay-state-desc {
  color: var(--text-light);
  font-size: 0.75rem;
  margin-bottom: 12px;
}

.pay-spinner {
  display: inline-block;
  width: 32px; height: 32px;
  border: 3px solid #F0E6E8;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin: 4px auto 8px;
}

.pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}

.pay-btn-primary {
  background: linear-gradient(135deg, #07C160 0%, #00A854 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(7,193,96,0.3);
}

.pay-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(7,193,96,0.4);
}

.pay-btn-primary:active {
  transform: translateY(0);
}

.pay-btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  flex: 1;
}

.pay-btn-outline:hover {
  background: var(--primary-light);
}

.pay-btn-text {
  background: transparent;
  color: var(--text-light);
  flex: 1;
}

.pay-btn-text:hover {
  color: var(--text-secondary);
}

.pay-btn-icon {
  font-size: 1rem;
}

.pay-failed-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.pay-failed-actions .pay-btn {
  flex: 1;
}

.pay-footer-tip {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* 支付弹窗内的金额span样式重置（避免被全局样式影响） */
.pay-amount span { display: inline; }

/* ========== 资料登记页（卡片式分区布局） ========== */
.register-page {
  padding: 16px 16px 140px;
  background: #FBF5F6;
  min-height: calc(100vh - 60px);
}

/* 资料登记页常悬操作按钮条（位于底部导航之上，滚动时常驻） */
.register-action-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 64px;
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  display: flex;
  gap: 10px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  z-index: 105;
}

.register-action-bar .btn {
  flex: 1;
}

.register-header {
  text-align: center;
  margin-bottom: 20px;
}

.register-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.register-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-light);
}

.register-step span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.register-step.active {
  color: var(--primary);
  font-weight: 600;
}

.register-step.active span {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.register-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.register-subtitle {
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.5;
}

.register-avatar-section {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

.register-avatar {
  width: 110px;
  height: 140px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #FAFAFA;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}

.register-avatar:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.register-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.register-avatar-placeholder {
  font-size: 2.4rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.register-avatar-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

/* ========== 资料登记页 - 卡片式分区 ========== */

/* 卡片容器：白色圆角阴影卡片 */
.reg-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 16px;
  overflow: hidden;
}

/* 卡片标题：纯文本深色居中标题 */
.reg-card-title {
  background: transparent;
  color: #2D3436;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 16px 4px;
  text-align: center;
  border-bottom: 1px solid #F2EEEF;
}

/* 卡片副标题：淡色提示文字 */
.reg-card-subtitle {
  text-align: center;
  font-size: 0.72rem;
  color: #B2BEC3;
  padding: 2px 16px;
  line-height: 1.5;
}

/* 登记页头像区域 */
.reg-avatar-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 12px;
}

.reg-avatar-box {
  width: 100px;
  height: 100px;
  border: 2px dashed #E8E0E2;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #FAFAFA;
}

.reg-avatar-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.reg-avatar-placeholder {
  color: #B2BEC3;
}

.reg-avatar-action {
  margin-top: 8px;
  font-size: 0.78rem;
  color: #E6677D;
  cursor: pointer;
  text-decoration: underline;
}

/* 卡片内容区 */
.reg-card-body {
  padding: 6px 0;
}

/* 表单行：两列网格，短字段并排 */
.form-grid-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid #F5F0F1;
}

/* 长字段独占一行 */
.form-grid-row.full {
  grid-template-columns: 1fr;
}

/* 末行去底线 */
.form-grid-row:last-child {
  border-bottom: none;
}

/* 表单单元格 */
.form-cell {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 两列行中，左列加右边细线分隔 */
.form-grid-row:not(.full) .form-cell:first-child {
  border-right: 1px solid #F5F0F1;
}

/* 字段标签 */
.form-cell-label {
  font-size: 0.82rem;
  color: #636E72;
  font-weight: 600;
}

.form-cell-label .required {
  color: #E6677D;
  margin-left: 2px;
}

/* 输入框 / textarea：圆角填充样式 */
.form-cell-input,
.form-cell-textarea {
  width: 100%;
  border: 1.5px solid #E8E0E2;
  background: #FDF8F9;
  font-size: 0.9rem;
  color: var(--text);
  font-family: var(--font);
  padding: 10px 12px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.form-cell-input:focus,
.form-cell-textarea:focus {
  border-color: #F39CAE;
  background: #fff;
}

.form-cell-input::placeholder,
.form-cell-textarea::placeholder {
  color: #B2BEC3;
}

.form-cell-textarea {
  min-height: 80px;
  resize: vertical;
}

/* 登记页单选按钮组 */
.form-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-radio-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1.5px solid #E8E0E2;
  border-radius: 8px;
  background: #FDF8F9;
  font-size: 0.82rem;
  color: #636E72;
  cursor: pointer;
  transition: all 0.2s;
}

.form-radio-item:has(input:checked) {
  border-color: #E6677D;
  background: #FFF0F3;
  color: #E6677D;
  font-weight: 600;
}

.form-radio-item input[type="radio"] {
  accent-color: #E6677D;
}

/* select 同输入框风格 */
.form-cell select.form-cell-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23B2BEC3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

/* 地区选择器 / range 选择器触发区 */
.form-cell .region-picker-trigger,
.form-cell .range-picker-trigger {
  padding: 10px 12px;
  border: 1.5px solid #E8E0E2;
  background: #FDF8F9;
  border-radius: 10px;
  transition: border-color 0.2s;
}

.form-cell .region-picker-trigger:active,
.form-cell .range-picker-trigger:active {
  border-color: #F39CAE;
}

/* 标签选择器在卡片内 */
.form-cell .tag-selector {
  margin-top: 2px;
}

/* 网格内紧凑标签选择器 */
.grid-tags {
  display: flex; flex-wrap: wrap; gap: 4px;
}
.grid-tags .tag-item {
  padding: 3px 9px; font-size: 0.7rem; border-radius: 14px;
  border: 1.5px solid #E5E7EB; background: #F5F7FA; color: #4A5568;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
}
.grid-tags .tag-item.selected {
  background: #FFF0F3; border-color: #E6677D; color: #E6677D; font-weight: 700;
}

/* 照片上传区 - 卡片内专用 */
.reg-card .photo-upload-area {
  padding: 12px 16px;
}

.reg-card .photo-tip {
  padding: 0 16px 12px;
  font-size: 0.72rem;
  color: #636E72;
}

/* 登记页照片框正方形 1:1 */
.reg-card .photo-upload-box { aspect-ratio: 1 / 1; }

/* 旧版 section title 保留兼容（用于其他页面） */
.register-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 12px;
  padding-left: 10px;
  border-left: 3px solid var(--primary);
}

/* 保留旧版 form-grid（用于可能复用的场景） */
.form-grid {
  border-top: 1px solid var(--border);
}

.register-page .btn-block {
  border-radius: 24px;
}

@media (max-width: 480px) {
  .register-page { padding: 12px 12px 140px; background: #FBF5F6; }
  .reg-card { border-radius: 12px; margin-bottom: 12px; }
  .reg-card-title { font-size: 0.88rem; padding: 10px 14px; }
  .form-cell { padding: 12px 12px; }
  .form-cell-label { font-size: 0.78rem; }
  .form-cell-input, .form-cell-textarea { font-size: 0.86rem; padding: 8px 10px; }
}

/* ========== 省市区弹窗选择器 ========== */
.region-picker-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1100;
  animation: fadeIn 0.2s ease;
}

.region-picker-sheet {
  background: #fff;
  border-radius: 16px 16px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  animation: sheetSlideUp 0.28s ease;
  overflow: hidden;
}

@keyframes sheetSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}


.region-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #f0e0e5);
  flex-shrink: 0;
}

.region-picker-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text, #2d3436);
}

.region-picker-btn {
  background: none;
  border: none;
  font-size: 0.95rem;
  color: var(--text-secondary, #636e72);
  cursor: pointer;
  padding: 6px 10px;
  font-family: var(--font);
}

.region-picker-btn.primary {
  color: var(--primary, #E6677D);
  font-weight: 700;
}

.region-picker-breadcrumb {
  display: flex;
  align-items: center;
  padding: 12px 16px 4px;
  gap: 6px;
  border-bottom: 1px solid #f8f1f3;
  flex-shrink: 0;
  min-height: 44px;
}

.region-breadcrumb-item {
  font-size: 0.95rem;
  color: #b2bec3;
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: all 0.15s;
}

.region-breadcrumb-item.active {
  color: #E6677D;
  font-weight: 700;
  border-bottom: 2px solid #E6677D;
  border-radius: 0;
}

.region-breadcrumb-item:not(:empty):hover {
  color: #E6677D;
}

.region-breadcrumb-arrow {
  color: #dfe6e9;
  font-size: 0.95rem;
  display: none;
}

.region-breadcrumb-arrow.visible {
  display: inline;
}

.region-picker-grid {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
  -webkit-overflow-scrolling: touch;
}

.region-picker-grid::-webkit-scrollbar { display: none; }

.region-grid-item {
  min-width: 64px;
  padding: 6px 12px;
  border: 1px solid #f0e0e5;
  border-radius: 8px;
  background: #fff;
  color: #2d3436;
  font-size: 0.78rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  flex: 1 0 auto;
  max-width: 30%;
}

.region-grid-item:active {
  transform: scale(0.97);
}

.region-grid-item.selected {
  background: #fff5f7;
  border-color: #E6677D;
  color: #E6677D;
  font-weight: 600;
}

/* 类别已选数量角标 */
.tag-cnt {
  display: inline-block;
  min-width: 18px;
  margin-left: 4px;
  padding: 0 5px;
  font-size: 0.65rem;
  line-height: 17px;
  border-radius: 9px;
  background: #E6677D;
  color: #fff;
  text-align: center;
  vertical-align: middle;
}

/* ===== 标签弹窗：满屏底部面板（左侧类别纵向滑动 + 右侧标签纵向滑动） ===== */
.tp-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.45);
  z-index: 10000;
  display: flex; align-items: flex-end;
  animation: tpFadeIn 0.2s;
}
@keyframes tpFadeIn { from{opacity:0} to{opacity:1} }
.tp-sheet {
  width: 100%; max-height: 92vh;
  background: #fff;
  border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column;
  animation: tpSlideUp 0.25s ease-out;
}
@keyframes tpSlideUp { from{transform:translateY(100%)} to{transform:translateY(0)} }
.tp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid #F0F0F0; flex-shrink: 0;
}
.tp-cancel { font-size: 0.85rem; color: #999; cursor: pointer; padding: 4px 0; }
.tp-title { font-size: 0.95rem; font-weight: 700; color: #2D3436; }
.tp-done { font-size: 0.85rem; color: #E6677D; font-weight: 600; cursor: pointer; padding: 4px 0; }

/* 左右两列身体区域 */
.tp-body {
  display: flex; flex: 1; min-height: 0; overflow: hidden;
}

/* 左侧类别（纵向滚动） */
.tp-left {
  flex: 1; min-width: 0;
  background: #F8F9FB; border-right: 1px solid #EEE;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 6px 0;
}
.tp-cat-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 7px; font-size: 0.73rem; color: #666;
  cursor: pointer; transition: all 0.15s;
  border-left: 3px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.tp-cat-item:active { background: #EEE; }
.tp-cat-item.active {
  background: #FFF; border-left-color: #E6677D;
  color: #E6677D; font-weight: 700;
}
.tp-cat-item i {
  font-style: normal; font-size: 0.6rem;
  background: #E6677D; color: #fff; border-radius: 8px;
  padding: 1px 5px; min-width: 14px; text-align: center; line-height: 1.2;
}
.tp-cat-item:not(.active) i { background: #C0C0C0; }

/* 右侧标签区域（纵向单列，自然宽度不过宽） */
.tp-right {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
}
.tp-tag-tile {
  display: flex; align-items: center; padding: 8px 14px; position: relative;
  font-size: 0.78rem; border-radius: 18px; cursor: pointer;
  background: #F5F7FA; border: 1.5px solid #E5E7EB;
  color: #4A5568; font-weight: 500; transition: all 0.15s;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.tp-tag-tile:active { transform: scale(0.95); }
.tp-tag-tile.selected {
  background: #FFF0F3; border-color: #E6677D; color: #E6677D; font-weight: 700;
}
.tp-tag-tile.hard {
  background: #FFF0F0; border-color: #D63031; color: #D63031;
}
.tp-hard-badge {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  font-size: 0.58rem; line-height: 20px; text-align: center;
  background: linear-gradient(135deg,#FFE0E6,#FFBBC8); color: #D63031;
  font-weight: 700; cursor: pointer; transition: all 0.2s;
  user-select: none; -webkit-tap-highlight-color: transparent;
  border: 1.5px solid rgba(214,48,49,0.2);
  box-shadow: 0 1px 3px rgba(214,48,49,0.15);
}
.tp-hard-badge:hover {
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(214,48,49,0.25);
}
.tp-hard-badge.on {
  background: #D63031; color: #FFF;
  border-color: #D63031;
  box-shadow: 0 0 10px rgba(214,48,49,0.45), 0 0 20px rgba(214,48,49,0.2);
  animation: hardGlow 0.4s ease-out;
}
@keyframes hardGlow {
  0% { box-shadow: 0 0 0 rgba(214,48,49,0), 0 0 0 rgba(214,48,49,0); }
  50% { box-shadow: 0 0 16px rgba(214,48,49,0.6), 0 0 30px rgba(214,48,49,0.3); }
  100% { box-shadow: 0 0 10px rgba(214,48,49,0.45), 0 0 20px rgba(214,48,49,0.2); }
}

.region-grid-item.custom-input-trigger {
  color: #636E72;
  font-style: italic;
}

.region-grid-item.custom-input-trigger:active {
  background: #f8f9fa;
  border-color: #b2bec3;
}

/* 「全市」选项 - 推荐态 */
.region-grid-item.city-wide-option {
  background: linear-gradient(135deg, #f0faf5, #e8f5e9);
  border-color: #27ae60;
  color: #27ae60;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
}

.region-grid-item.city-wide-option.selected {
  background: linear-gradient(135deg, #d4efdf, #a9dfbf);
  border-color: #1e8449;
  color: #1e8449;
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.15);
}

.region-grid-item.city-wide-option:active {
  transform: scale(0.97);
  background: #a9dfbf;
}

/* ===== 弹窗选项列表通用样式 ===== */
.income-option,
.zodiac-option,
.popup-select-option,
.edu-option {
  padding: 12px 16px;
  border-bottom: 1px solid #F2F2F2;
  cursor: pointer;
  font-size: 0.92rem;
  color: #2D3436;
  transition: background 0.15s;
  user-select: none;
}
.income-option:hover,
.zodiac-option:hover,
.popup-select-option:hover,
.edu-option:hover {
  background: #FFF5F8;
}
.income-option.selected,
.zodiac-option.selected,
.popup-select-option.selected,
.edu-option.selected {
  background: #FFF0F5;
  color: #D92B6A;
  font-weight: 600;
}
.zodiac-option {
  text-align: center;
  border: 1px solid #F2F2F2;
  border-radius: 10px;
  padding: 10px 0;
}
.zodiac-option:hover {
  border-color: #D92B6A;
}
.zodiac-option.selected {
  border-color: #D92B6A;
}

/* ===== 信善明鉴 · 认证图标网格 ===== */
.auth-grid-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px 12px;
  margin: 10px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.auth-grid-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}
.auth-grid-row:last-child {
  margin-bottom: 0;
}
.auth-grid-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 14px 4px 12px;
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  width: 100%;
  border: 1.5px solid transparent;
  background: #F9FAFB;
}
.auth-grid-item:active {
  transform: scale(0.97);
}
.auth-icon-bg {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  transition: all 0.25s ease;
  background: #EEF0F2;
  border: 2px solid #E2E5E9;
}
.auth-icon {
  font-size: 1.6rem;
  line-height: 1;
  filter: grayscale(100%);
  opacity: 0.45;
  transition: all 0.25s ease;
}
/* 已认证 — 淡蓝风 */
.auth-grid-item.active {
  background: #F4F8FF;
  border-color: #C5D9F8;
}
.auth-grid-item.active .auth-icon-bg {
  background: linear-gradient(135deg, #E8F0FE, #D4E6FF);
  border-color: #8EBBF0;
  box-shadow: 0 3px 10px rgba(142, 187, 240, 0.22);
}
.auth-grid-item.active .auth-icon {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.06);
}
.auth-grid-label {
  font-size: 0.76rem;
  color: #8894A0;
  font-weight: 500;
  margin-bottom: 3px;
  transition: color 0.2s ease;
}
.auth-grid-item.active .auth-grid-label {
  color: #4A6FA5;
  font-weight: 600;
}
.auth-grid-status {
  font-size: 0.65rem;
  color: #B2BEC3;
  font-weight: 500;
  transition: color 0.2s ease;
}
.auth-grid-item.active .auth-grid-status {
  color: #8EBBF0;
  font-weight: 600;
}
/* 对勾 — 粉色 */
.auth-checkmark {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #F8A5B5;
  color: #fff;
  font-size: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.auth-grid-item.active .auth-checkmark {
  opacity: 1;
  transform: scale(1);
}
.auth-row-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2D3436;
}
/* 小屏适配 */
@media (max-width: 360px) {
  .auth-icon-bg { width: 46px; height: 46px; }
  .auth-icon { font-size: 1.4rem; }
  .auth-grid-label { font-size: 0.7rem; }
  .auth-grid-item { padding: 12px 2px 10px; }
}

/* 手机认证弹窗 */
#phoneAuthModal .modal-body {
  padding: 0 6px;
}

#phoneAuthModal .form-input {
  border: 1px solid #E8ECEF;
  border-radius: 10px;
  padding: 12px;
  font-size: 0.95rem;
  background: #FAFBFC;
}

#phoneAuthModal .modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding-top: 10px;
}

/* ========== 首页仪表盘统计 — 统一底色面板 ========== */
.dash-stat-row {
  display: flex; align-items: center; justify-content: center;
  height: 130px; padding: 0 14px; gap: 0;
}
.dash-stat-cell {
  flex: 1; text-align: center; min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 6px;
}
.dash-stat-label {
  font-size: 0.78rem; color: #7B8794; font-weight: 600;
  white-space: nowrap; line-height: 1.2; letter-spacing: 0.3px;
}
.dash-stat-value {
  font-size: 1.35rem; font-weight: 800; color: #1E1E2E;
  line-height: 1.2; display: flex; align-items: baseline;
  justify-content: center; gap: 2px;
}
.dash-male { color: #4FACFE; }
.dash-female { color: #F5576C; }
.dash-slash { color: #CBD5E0; font-weight: 400; font-size: 0.9rem; margin: 0 1px; }
.dash-stat-divider {
  width: 1px; height: 36px; flex-shrink: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(108,92,231,0.15) 50%, transparent 100%);
  margin: 0 6px;
}

/* ========== 标签满屏选择器 ========== */
.tag-entry-btn {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  background: #F9FAFB;
  border: 1.5px dashed #D1D5DB;
  border-radius: 10px;
  cursor: pointer;
  color: #636E72;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.tag-entry-btn:active {
  background: #EEF0F3;
  border-color: #5B8DEF;
  color: #5B8DEF;
}

/* ========== AI 一键登记折叠区 ========== */
.ai-parse-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.ai-parse-card .form-cell-textarea {
  width: 100%;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  font-size: 0.78rem;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
}
.ai-parse-card .form-cell-textarea:focus {
  border-color: #667eea;
  outline: none;
  box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}
.ai-tag-chip {
  transition: transform 0.15s, opacity 0.15s;
}
.ai-tag-chip:hover {
  transform: scale(1.05);
  opacity: 0.85;
}

/* ========== 表单回填动画 ========== */
.ai-highlight-field {
  animation: aiHighlight 1.5s ease;
}
@keyframes aiHighlight {
  0% { background: rgba(102,126,234,0.15); }
  100% { background: transparent; }
}
