/* ---------------------------------------------------------------- */
/* 心动互选 · 共用设计系统                                            */
/* ---------------------------------------------------------------- */

:root {
  --ink: #2a171b;
  --ink-2: #4d353a;
  --muted: #8b7378;
  --line: rgba(77, 53, 58, 0.13);
  --line-strong: rgba(77, 53, 58, 0.22);
  --cream: #fdf6ef;
  --cream-2: #f7ece1;
  --paper: #fffcf8;
  --coral: #c93b52;
  --coral-strong: #a92c42;
  --coral-soft: #f3c9ce;
  --blush: #f9e3e3;
  --gold: #b0864a;
  --gold-soft: #e8d5b8;
  --ok: #2f7d5b;
  --ok-soft: #e2f0e8;
  --danger: #a3263c;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow-card: 0 30px 70px -40px rgba(74, 28, 38, 0.45), 0 2px 6px rgba(74, 28, 38, 0.05);
  --shadow-soft: 0 18px 40px -28px rgba(74, 28, 38, 0.4);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body.is-locked {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

.hidden,
[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* 背景氛围 ------------------------------------------------------- */

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, #fbe6e2 0%, rgba(251, 230, 226, 0) 55%),
    linear-gradient(180deg, #fdf6ef 0%, #fbf2ea 100%);
}

.ambient .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.ambient .orb-a {
  width: 360px;
  height: 360px;
  top: -150px;
  right: -110px;
  background: radial-gradient(circle at 35% 35%, rgba(244, 183, 188, 0.75), rgba(244, 183, 188, 0));
}

.ambient .orb-b {
  width: 300px;
  height: 300px;
  top: 34%;
  left: -160px;
  background: radial-gradient(circle at 60% 40%, rgba(235, 205, 166, 0.55), rgba(235, 205, 166, 0));
}

.ambient .orb-c {
  width: 420px;
  height: 420px;
  bottom: -240px;
  right: -120px;
  background: radial-gradient(circle at 45% 40%, rgba(243, 201, 206, 0.55), rgba(243, 201, 206, 0));
}

.ambient .ring {
  position: absolute;
  border: 1px solid rgba(201, 59, 82, 0.09);
  border-radius: 50%;
}

.ambient .ring-a {
  width: 520px;
  height: 520px;
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
}

.ambient .ring-b {
  width: 680px;
  height: 680px;
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
}

/* 顶部品牌 ------------------------------------------------------- */

.site-head {
  max-width: 1080px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(201, 59, 82, 0.32);
  border-radius: 50%;
  color: var(--coral);
  background: rgba(255, 255, 255, 0.45);
}

.brand-mark svg {
  width: 18px;
  height: 18px;
}

.brand-text strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.25;
}

.brand-text em {
  display: block;
  font-style: normal;
  font-size: 8px;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
}

.head-link {
  font-size: 12px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.head-link:hover {
  color: var(--coral);
  border-color: var(--coral);
}

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

.wrap {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px calc(44px + env(safe-area-inset-bottom, 0px));
}

.wrap--wide {
  max-width: 1120px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--coral);
}

.eyebrow--center {
  justify-content: center;
}

.eyebrow .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(201, 59, 82, 0.12);
  flex: none;
}

.hero {
  padding: clamp(36px, 9vw, 62px) 0 8px;
}

.hero h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: clamp(36px, 10.4vw, 52px);
  line-height: 1.18;
  letter-spacing: 0.01em;
}

.hero-lead {
  margin: 18px 0 0;
  max-width: 30em;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.85;
}

.mark {
  position: relative;
  color: var(--coral);
  white-space: nowrap;
}

.mark::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  bottom: 3px;
  height: 9px;
  z-index: -1;
  border-radius: 50% 60% 45% 55%;
  background: linear-gradient(90deg, rgba(201, 59, 82, 0.15), rgba(176, 134, 74, 0.24));
}

/* 卡片 ----------------------------------------------------------- */

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 252, 248, 0.92));
  border: 1px solid rgba(176, 134, 74, 0.22);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.card-pad {
  padding: 24px 22px;
}

.divider-dashed {
  height: 1px;
  border: 0;
  background-image: linear-gradient(90deg, rgba(176, 134, 74, 0.4) 55%, transparent 55%);
  background-size: 9px 1px;
  background-repeat: repeat-x;
  margin: 0;
}

/* 表单 ----------------------------------------------------------- */

.field {
  padding: 16px 0;
  border-bottom: 1px dashed rgba(176, 134, 74, 0.22);
}

.field:last-of-type {
  border-bottom: 0;
}

.field-label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.field-index {
  font-family: var(--font-serif);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.field-label small {
  margin-left: auto;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}

.number-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.number-box:focus-within {
  border-color: rgba(201, 59, 82, 0.55);
  box-shadow: 0 0 0 4px rgba(201, 59, 82, 0.08);
}

.number-box.is-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(163, 38, 60, 0.08);
}

.number-box .prefix {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--gold);
  line-height: 1;
}

.number-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}

.number-box input::placeholder {
  color: #cdb9b7;
  font-weight: 400;
  letter-spacing: 0.06em;
  font-size: 16px;
}

.number-box--heart .prefix {
  color: var(--coral);
  display: grid;
  place-items: center;
}

.number-box--heart .prefix svg {
  width: 20px;
  height: 20px;
}

.hint {
  margin: 8px 0 0;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--muted);
}

.hint.is-error {
  color: var(--danger);
}

.text-input {
  width: 100%;
  padding: 13px 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  font-size: 15px;
  outline: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-input:focus {
  border-color: rgba(201, 59, 82, 0.55);
  box-shadow: 0 0 0 4px rgba(201, 59, 82, 0.08);
}

.gender-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gender-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.gender-option svg {
  width: 16px;
  height: 16px;
  opacity: 0.65;
}

.gender-option[aria-checked="true"] {
  background: linear-gradient(135deg, #d2455c, #b4314a);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 24px -14px rgba(180, 49, 74, 0.7);
}

.gender-option[aria-checked="true"] svg {
  opacity: 1;
}

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

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
  -webkit-user-select: none;
  user-select: none;
}

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

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #d2455c, #b4314a);
  color: #fff;
  box-shadow: 0 16px 30px -16px rgba(180, 49, 74, 0.75);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 20px 36px -16px rgba(180, 49, 74, 0.85);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.65);
  border-color: var(--line-strong);
  color: var(--ink-2);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--coral);
  color: var(--coral);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-lg {
  width: 100%;
  padding: 17px 22px;
  border-radius: 16px;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12.5px;
}

.btn svg {
  flex: none;
}

.btn.is-loading {
  position: relative;
  color: transparent !important;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* 隐私说明、页脚 -------------------------------------------------- */

.privacy {
  margin: 14px 0 0;
  font-size: 11px;
  line-height: 1.75;
  color: var(--muted);
  text-align: center;
}

.page-foot {
  margin: 30px 0 0;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(139, 115, 120, 0.75);
}

/* 提示条 --------------------------------------------------------- */

.toast {
  position: fixed;
  top: calc(18px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 200;
  max-width: calc(100vw - 40px);
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff8f2;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 18px 40px -18px rgba(42, 23, 27, 0.6);
  transform: translate(-50%, -14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.is-error {
  background: #8e2438;
}

/* 对话框 --------------------------------------------------------- */

dialog {
  width: 100%;
  max-width: min(400px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(36, 18, 23, 0.46);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.dialog-card {
  padding: 26px 22px 22px;
  background: var(--paper);
  border: 1px solid rgba(176, 134, 74, 0.2);
  border-radius: 24px;
  box-shadow: 0 40px 100px -40px rgba(36, 18, 23, 0.6);
  animation: dialog-in 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.dialog-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.4;
}

.dialog-sub {
  margin: 0 0 18px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.7;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.dialog-actions .btn {
  flex: 1;
}

.summary-list {
  border: 1px dashed rgba(176, 134, 74, 0.4);
  border-radius: 16px;
  padding: 4px 16px;
  background: rgba(255, 252, 248, 0.8);
}

.summary-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px dashed rgba(176, 134, 74, 0.22);
}

.summary-list > div:last-child {
  border-bottom: 0;
}

.summary-list span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.summary-list b {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.dialog-warn {
  margin: 16px 0 0;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(201, 59, 82, 0.07);
  color: var(--coral-strong);
  font-size: 12px;
  line-height: 1.65;
}

/* 开关 ----------------------------------------------------------- */

.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 46px;
  height: 27px;
  flex: none;
}

.switch input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.switch .track {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(77, 53, 58, 0.18);
  transition: background 0.2s ease;
}

.switch .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(42, 23, 27, 0.25);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.switch input:checked + .track {
  background: var(--coral);
}

.switch input:checked + .track::after {
  transform: translateX(19px);
}

.switch input:focus-visible + .track {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}

/* 通用徽标 ------------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge-ok {
  background: var(--ok-soft);
  color: #1f6b4b;
}

.badge-wait {
  background: rgba(176, 134, 74, 0.12);
  color: #8a6330;
}

.badge-coral {
  background: rgba(201, 59, 82, 0.1);
  color: var(--coral-strong);
}

.badge-muted {
  background: rgba(77, 53, 58, 0.07);
  color: var(--muted);
}

/* 动效 ----------------------------------------------------------- */

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

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes pulse {
  0% {
    transform: scale(0.9);
    opacity: 0.65;
  }
  80%,
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@keyframes float-soft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-7px);
  }
}

@keyframes fall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
    opacity: 0;
  }
  8% {
    opacity: 0.9;
  }
  100% {
    transform: translate3d(var(--drift, 0px), 112vh, 0) rotate(var(--spin, 320deg));
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
