:root {
  color-scheme: light;
  --bg: #fff7f3;
  --bg-deep: #ffece6;
  --ink: #4b2633;
  --ink-soft: #8a5d69;
  --ink-faint: #b08993;
  --rose: #ff6f91;
  --rose-deep: #e8516f;
  --peach: #ffa07f;
  --gold: #f2c387;
  --line: rgba(184, 108, 126, 0.16);
  --line-strong: rgba(184, 108, 126, 0.3);
  --card: rgba(255, 255, 255, 0.78);
  --rose-soft: rgba(255, 111, 145, 0.1);
  --success: #4caf8a;
  --danger: #e35d74;
  --font: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei",
    -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Songti SC", "STSong", "Noto Serif SC", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-card: 0 22px 48px -26px rgba(176, 88, 110, 0.42);
  --shadow-soft: 0 12px 30px -16px rgba(176, 88, 110, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.modal-open {
  overflow: hidden;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  background: rgba(255, 143, 174, 0.36);
  color: #5a2434;
}

:focus-visible {
  outline: 2px solid rgba(232, 81, 111, 0.7);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------ */
/* Backdrop                                                            */
/* ------------------------------------------------------------------ */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(80% 54% at 12% -6%, rgba(255, 205, 217, 0.9), transparent 62%),
    radial-gradient(70% 52% at 96% 6%, rgba(255, 226, 198, 0.82), transparent 58%),
    radial-gradient(72% 46% at 50% 108%, rgba(255, 206, 198, 0.72), transparent 62%),
    linear-gradient(180deg, #fffaf7 0%, #fff5f0 52%, #fff1ea 100%);
}

.blush {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.72;
  animation: blushDrift 22s ease-in-out infinite alternate;
}

.blush--one {
  width: 42vw;
  height: 42vw;
  min-width: 340px;
  min-height: 340px;
  top: -16vh;
  left: -10vw;
  background: rgba(255, 168, 190, 0.55);
}

.blush--two {
  width: 36vw;
  height: 36vw;
  min-width: 300px;
  min-height: 300px;
  right: -12vw;
  bottom: -16vh;
  background: rgba(255, 202, 158, 0.5);
  animation-delay: -7s;
  animation-duration: 26s;
}

.blush--three {
  width: 24vw;
  height: 24vw;
  min-width: 220px;
  min-height: 220px;
  top: 40%;
  right: 16%;
  background: rgba(255, 143, 174, 0.28);
  animation-delay: -13s;
  animation-duration: 30s;
}

.heart-float {
  position: absolute;
  color: #ff9fb6;
  font-size: 18px;
  opacity: 0.32;
  filter: blur(0.4px);
  animation: heartFloat 14s ease-in-out infinite;
  user-select: none;
}

.heart-float--one {
  top: 18%;
  left: 8%;
  font-size: 22px;
  animation-delay: -2s;
}

.heart-float--two {
  top: 62%;
  left: 16%;
  font-size: 13px;
  opacity: 0.24;
  animation-delay: -6s;
  animation-duration: 17s;
}

.heart-float--three {
  top: 28%;
  right: 10%;
  font-size: 16px;
  opacity: 0.28;
  animation-delay: -9s;
  animation-duration: 19s;
}

.heart-float--four {
  bottom: 22%;
  right: 20%;
  font-size: 11px;
  opacity: 0.22;
  animation-delay: -4s;
}

/* ------------------------------------------------------------------ */
/* Shared UI                                                           */
/* ------------------------------------------------------------------ */

.eyebrow {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rose-deep);
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
  transition:
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.25s var(--ease),
    box-shadow 0.25s var(--ease),
    opacity 0.25s var(--ease);
}

.btn:hover {
  border-color: var(--line-strong);
  background: #fffdfc;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, #ff8fae 0%, #ff6f91 48%, #ff9a72 100%);
  color: #fff;
  font-weight: 600;
  box-shadow:
    0 16px 32px -14px rgba(232, 81, 111, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.btn--primary:hover {
  background: linear-gradient(135deg, #ff9dba 0%, #ff7c9c 48%, #ffa982 100%);
  border-color: transparent;
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.5);
  box-shadow: none;
}

.btn--small {
  height: 34px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 104px;
  z-index: 200;
  max-width: calc(100vw - 40px);
  padding: 11px 18px;
  border-radius: 14px;
  border: 1px solid rgba(232, 81, 111, 0.22);
  background: rgba(255, 252, 250, 0.96);
  box-shadow: 0 20px 48px -18px rgba(166, 78, 100, 0.45);
  color: #5b2b3a;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition:
    opacity 0.3s var(--ease),
    transform 0.3s var(--ease);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

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

.toast.success {
  border-color: rgba(76, 175, 138, 0.34);
}

.toast.error {
  border-color: rgba(227, 93, 116, 0.42);
}

/* ------------------------------------------------------------------ */
/* Motion                                                              */
/* ------------------------------------------------------------------ */

@keyframes blushDrift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(2.4vw, 3vh, 0) scale(1.06);
  }
  100% {
    transform: translate3d(-1.6vw, -2vh, 0) scale(0.97);
  }
}

@keyframes heartFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-6deg);
    opacity: 0.24;
  }
  50% {
    transform: translateY(-16px) rotate(7deg);
    opacity: 0.42;
  }
}

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

@keyframes sheen {
  0%,
  58% {
    left: -60%;
  }
  100% {
    left: 130%;
  }
}

@keyframes heartbeat {
  0%,
  100% {
    transform: scale(1);
  }
  18% {
    transform: scale(1.08);
  }
  36% {
    transform: scale(0.99);
  }
  54% {
    transform: scale(1.05);
  }
  72% {
    transform: scale(1);
  }
}

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