:root {
  --bg-page: #fdf6f7;
  --bg-card: #ffffff;
  --primary: #e85a71;
  --primary-dark: #d2445b;
  --primary-soft: #fff1f3;
  --primary-border: #f8b4c0;
  --text-main: #222222;
  --text-sub: #666666;
  --text-muted: #999999;
  --border: #e6e8ec;
  --input-bg: #fafbfc;
  --error: #e53935;
  --error-bg: #fff5f5;
  --radius-card: 18px;
  --radius-input: 12px;
  --shadow-card: 0 8px 28px rgba(232, 90, 113, 0.08);
}

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

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

.page-shell {
  width: 100%;
  max-width: 540px;
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: calc(36px + env(safe-area-inset-bottom));
}

/* 顶部横幅头图 */
.banner-wrap {
  width: 100%;
  background: linear-gradient(135deg, #fbd3d9 0%, #fce8e4 100%);
  overflow: hidden;
  line-height: 0;
}

.banner-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* 主内容区 */
.main-wrap {
  padding: 14px 14px 0;
  margin-top: -16px;
  position: relative;
  z-index: 2;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 22px 18px 24px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.card.fade-out {
  opacity: 0;
  transform: translateY(-8px);
}

.card.hidden {
  display: none;
}

.card-header {
  text-align: center;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px dashed #f2dce0;
}

.card-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: #1f1f1f;
  letter-spacing: 0.5px;
}

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

/* 表单字段 */
.field-group {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: #2b2b2b;
  margin-bottom: 8px;
}

.req {
  color: var(--error);
  margin-left: 3px;
  font-weight: 700;
}

.opt-tag {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.label-row .field-label {
  margin-bottom: 0;
}

.sync-btn {
  appearance: none;
  border: 1px solid var(--primary-border);
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 12.5px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.sync-btn:active {
  transform: scale(0.96);
  background: #ffe0e6;
}

.text-input,
.select-input,
.textarea-input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  background-color: var(--input-bg);
  color: var(--text-main);
  font-size: 15px;
  font-family: inherit;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.text-input,
.select-input {
  height: 46px;
}

.textarea-input {
  resize: vertical;
  min-height: 82px;
  line-height: 1.5;
}

.text-input::placeholder,
.textarea-input::placeholder {
  color: #b0b4bc;
  font-size: 14px;
}

.text-input:focus,
.select-input:focus,
.textarea-input:focus {
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(232, 90, 113, 0.12);
}

/* 自定义下拉箭头 */
.select-wrap {
  position: relative;
  width: 100%;
}

.select-input {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  cursor: pointer;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 13px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #8c929c;
  border-bottom: 2px solid #8c929c;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.double-select {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 单选按钮组 */
.radio-grid {
  display: grid;
  gap: 9px;
}

.radio-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.radio-grid.cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.radio-pill {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-input);
  background-color: var(--input-bg);
  color: #3a3a3a;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: all 0.18s ease;
}

.radio-pill.span-2 {
  grid-column: span 2;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.radio-pill:has(input:checked) {
  border-color: var(--primary);
  background-color: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(232, 90, 113, 0.12);
}

/* 联系方式分隔区 */
.section-divider {
  position: relative;
  text-align: center;
  margin: 24px 0 18px;
}

.section-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: #f0dfe2;
}

.section-divider span {
  position: relative;
  display: inline-block;
  padding: 0 12px;
  background: #ffffff;
  font-size: 12.5px;
  color: #a16b74;
  font-weight: 500;
}

/* 错误提示 */
.field-group.has-error .text-input,
.field-group.has-error .select-input,
.field-group.has-error .textarea-input {
  border-color: var(--error);
  background-color: var(--error-bg);
}

.field-group.has-error .radio-pill {
  border-color: #f3b3b2;
}

.error-msg {
  display: none;
  margin: 6px 2px 0;
  font-size: 12.5px;
  color: var(--error);
  line-height: 1.4;
}

.field-group.has-error .error-msg {
  display: block;
}

.submit-alert {
  display: none;
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--error-bg);
  border: 1px solid #f5c2c0;
  color: var(--error);
  font-size: 13.5px;
  text-align: center;
}

.submit-alert.visible {
  display: block;
}

/* 提交按钮 */
.submit-btn {
  width: 100%;
  height: 48px;
  margin-top: 6px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #f06d82 0%, #e14964 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(225, 73, 100, 0.3);
  transition: transform 0.15s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:active:not(:disabled) {
  transform: scale(0.985);
}

.submit-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2.2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.submit-btn.loading .btn-spinner {
  display: inline-block;
}

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

.privacy-note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* 成功页面 */
.success-card {
  text-align: center;
  padding: 44px 24px 46px;
  animation: fadeSlideIn 0.38s ease forwards;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.success-icon-wrap {
  margin-bottom: 18px;
}

.success-icon {
  width: 68px;
  height: 68px;
}

.success-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  color: #1f1f1f;
}

.success-desc {
  margin: 0 auto;
  max-width: 320px;
  font-size: 15px;
  color: #555555;
  line-height: 1.7;
}
