:root {
  color-scheme: light;
  --ink: #311820;
  --muted: #73515d;
  --rose: #e94067;
  --rose-dark: #b92c4d;
  --rose-soft: #ff8caf;
  --peach: #ffd8c8;
  --cream: #fff9f0;
  --gold: #d59a35;
  --mint: #3a9a91;
  --shadow: rgba(90, 25, 45, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 234, 228, 0.58)),
    linear-gradient(160deg, #fff9f0 0%, #ffd7df 42%, #ffc8b5 100%);
}

button {
  font: inherit;
}

.name-panel {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(185, 44, 77, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 30px rgba(92, 20, 50, 0.12);
  backdrop-filter: blur(10px);
}

.name-panel label {
  display: grid;
  gap: 4px;
  color: var(--rose-dark);
  font-size: 12px;
  font-weight: 800;
}

.name-panel input {
  width: 86px;
  min-height: 32px;
  border: 1px solid rgba(185, 44, 77, 0.18);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  outline: none;
}

.name-panel input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(233, 64, 103, 0.14);
}

.name-panel.is-name-panel-hidden {
  display: none;
}

.site-shell {
  position: relative;
  min-height: 100vh;
}

.screen {
  position: absolute;
  inset: 0;
  min-height: 100vh;
  display: none;
  align-items: center;
  padding: 56px 24px;
  overflow-y: auto;
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  transition: opacity 420ms ease, transform 420ms ease;
}

.screen.is-active {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: page-in 520ms ease both;
}

.screen-inner {
  width: min(1040px, 100%);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.intro-screen::before,
.confession-screen::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.62), transparent 54%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px 24px);
  pointer-events: none;
}

.kicker,
.section-label {
  margin: 0 0 14px;
  color: var(--rose-dark);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  max-width: 800px;
  margin: 0;
  letter-spacing: 0;
  line-height: 1.12;
}

h1 {
  font-size: clamp(42px, 9vw, 82px);
}

h2 {
  font-size: clamp(28px, 5.6vw, 52px);
}

.hero-copy,
.letter-line,
.proposal p {
  max-width: 680px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.9;
}

.hero-copy {
  margin: 24px 0 0;
}

.primary-button,
.ghost-button {
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 24px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.primary-button {
  margin-top: 30px;
  color: #fff;
  background: linear-gradient(135deg, var(--rose), var(--rose-dark));
  box-shadow: 0 18px 38px var(--shadow);
  font-weight: 800;
}

.primary-button:hover,
.primary-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 24px 46px rgba(150, 31, 65, 0.22);
}

.ghost-button {
  position: relative;
  color: var(--rose-dark);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(185, 44, 77, 0.18);
  font-weight: 700;
}

.scroll-hint {
  position: absolute;
  left: 24px;
  bottom: 22px;
  color: rgba(49, 24, 32, 0.42);
  font-size: 12px;
  font-weight: 800;
}

.confession-screen {
  align-items: flex-start;
}

.confession-layout {
  padding: 26px 0 40px;
}

.letter-line {
  margin: 20px 0 0;
}

.reveal-item {
  opacity: 0;
  transform: translateY(18px);
}

.screen.is-active .reveal-item {
  animation: rise-in 700ms ease forwards;
}

.screen.is-active .reveal-item:nth-of-type(2),
.screen.is-active .reason-list .reveal-item:nth-child(2) {
  animation-delay: 130ms;
}

.screen.is-active .reveal-item:nth-of-type(3),
.screen.is-active .reason-list .reveal-item:nth-child(3) {
  animation-delay: 260ms;
}

.screen.is-active .reason-list .reveal-item:nth-child(4) {
  animation-delay: 390ms;
}

.stats-band {
  margin: 42px 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(185, 44, 77, 0.18);
  box-shadow: 0 18px 44px var(--shadow);
}

.stat {
  min-height: 128px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.stat strong {
  display: block;
  color: var(--rose-dark);
  font-size: 40px;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 700;
}

.reason-panel {
  max-width: 850px;
}

.reason-list {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.reason-list li {
  padding: 16px 18px;
  border-left: 4px solid var(--rose);
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  line-height: 1.75;
  border-radius: 0 8px 8px 0;
}

.proposal {
  margin-top: 42px;
  padding: 42px 0 0;
  text-align: center;
}

.proposal h2,
.proposal p {
  margin-left: auto;
  margin-right: auto;
}

.proposal-actions {
  min-height: 82px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  position: relative;
}

.proposal-actions .primary-button {
  margin-top: 0;
}

.rose-final-screen {
  overflow: hidden;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.88) 0 18%, transparent 38%),
    linear-gradient(145deg, #fff3f7 0%, #ffd4e2 48%, #ff9fc0 100%);
}

.rose-final-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.14) 0 3px, transparent 3px 28px);
  pointer-events: none;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.rose-garden {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
}

.rose-field {
  position: absolute;
  inset: 0;
}

.photo-rose {
  position: absolute;
  width: var(--size, 72px);
  height: calc(var(--size, 72px) * 1.43);
  left: var(--x);
  top: var(--y);
  opacity: var(--alpha, 0.9);
  background-image: url("assets/images/pink-rose.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 18px 22px rgba(158, 24, 67, 0.18));
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  animation: rose-drift var(--speed, 7s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.rose-field-back .photo-rose {
  opacity: var(--alpha, 0.48);
  filter: blur(0.2px) drop-shadow(0 14px 20px rgba(158, 24, 67, 0.12));
}

.garden-rose {
  position: absolute;
  width: var(--size, 72px);
  height: calc(var(--size, 72px) * 1.16);
  left: var(--x);
  top: var(--y);
  opacity: var(--alpha, 0.88);
  filter: drop-shadow(0 18px 22px rgba(158, 24, 67, 0.18));
  transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(var(--scale, 1));
  animation: rose-drift var(--speed, 7s) ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.rose-field-back .garden-rose {
  opacity: var(--alpha, 0.42);
  filter: blur(0.2px) drop-shadow(0 14px 20px rgba(158, 24, 67, 0.12));
}

.r1 { --x: 6%; --y: 8%; --size: 76px; --rot: -16deg; --delay: 0s; }
.r2 { --x: 18%; --y: 9%; --size: 54px; --rot: 10deg; --delay: .4s; }
.r3 { --x: 31%; --y: 8%; --size: 66px; --rot: -4deg; --delay: .8s; }
.r4 { --x: 45%; --y: 7%; --size: 52px; --rot: 18deg; --delay: 1.1s; }
.r5 { --x: 59%; --y: 8%; --size: 72px; --rot: -10deg; --delay: .2s; }
.r6 { --x: 74%; --y: 9%; --size: 58px; --rot: 12deg; --delay: 1.4s; }
.r7 { --x: 91%; --y: 8%; --size: 74px; --rot: 9deg; --delay: .9s; }
.r8 { --x: 5%; --y: 26%; --size: 68px; --rot: 13deg; --delay: .7s; }
.r9 { --x: 95%; --y: 25%; --size: 64px; --rot: -18deg; --delay: 1.6s; }
.r10 { --x: 8%; --y: 44%; --size: 58px; --rot: -8deg; --delay: 1.9s; }
.r11 { --x: 92%; --y: 45%; --size: 70px; --rot: 17deg; --delay: .3s; }
.r12 { --x: 5%; --y: 63%; --size: 73px; --rot: 8deg; --delay: 1.2s; }
.r13 { --x: 95%; --y: 64%; --size: 58px; --rot: -12deg; --delay: .6s; }
.r14 { --x: 7%; --y: 84%; --size: 70px; --rot: -18deg; --delay: 1s; }
.r15 { --x: 20%; --y: 91%; --size: 56px; --rot: 7deg; --delay: .1s; }
.r16 { --x: 34%; --y: 88%; --size: 76px; --rot: -5deg; --delay: 1.5s; }
.r17 { --x: 49%; --y: 93%; --size: 54px; --rot: 15deg; --delay: .8s; }
.r18 { --x: 64%; --y: 89%; --size: 74px; --rot: -16deg; --delay: 1.8s; }
.r19 { --x: 78%; --y: 92%; --size: 60px; --rot: 10deg; --delay: .5s; }
.r20 { --x: 94%; --y: 85%; --size: 78px; --rot: 16deg; --delay: 1.3s; }
.r21 { --x: 17%; --y: 28%; --size: 42px; --rot: 22deg; --alpha: .32; --delay: .2s; }
.r22 { --x: 82%; --y: 30%; --size: 44px; --rot: -20deg; --alpha: .3; --delay: 1s; }
.r23 { --x: 20%; --y: 68%; --size: 46px; --rot: -8deg; --alpha: .34; --delay: 1.4s; }
.r24 { --x: 80%; --y: 70%; --size: 48px; --rot: 15deg; --alpha: .34; --delay: .7s; }
.r25 { --x: 13%; --y: 16%; --size: 62px; --rot: 16deg; --delay: .5s; }
.r26 { --x: 88%; --y: 16%; --size: 62px; --rot: -15deg; --delay: 1s; }
.r27 { --x: 3%; --y: 35%; --size: 82px; --rot: -5deg; --delay: 1.5s; }
.r28 { --x: 97%; --y: 36%; --size: 80px; --rot: 8deg; --delay: .3s; }
.r29 { --x: 12%; --y: 55%; --size: 64px; --rot: -18deg; --delay: 1.8s; }
.r30 { --x: 88%; --y: 55%; --size: 64px; --rot: 20deg; --delay: .8s; }
.r31 { --x: 4%; --y: 74%; --size: 78px; --rot: 11deg; --delay: .1s; }
.r32 { --x: 96%; --y: 74%; --size: 78px; --rot: -9deg; --delay: 1.2s; }
.r33 { --x: 27%; --y: 95%; --size: 68px; --rot: 18deg; --delay: 1.6s; }
.r34 { --x: 73%; --y: 95%; --size: 68px; --rot: -18deg; --delay: .6s; }
.r35 { --x: 43%; --y: 15%; --size: 44px; --rot: 8deg; --alpha: .42; --delay: .4s; }
.r36 { --x: 57%; --y: 15%; --size: 44px; --rot: -8deg; --alpha: .42; --delay: 1.4s; }
.r37 { --x: 30%; --y: 31%; --size: 58px; --rot: -20deg; --alpha: .58; --delay: .3s; }
.r38 { --x: 38%; --y: 34%; --size: 48px; --rot: 13deg; --alpha: .46; --delay: 1.1s; }
.r39 { --x: 28%; --y: 45%; --size: 66px; --rot: 18deg; --alpha: .64; --delay: .8s; }
.r40 { --x: 39%; --y: 49%; --size: 44px; --rot: -12deg; --alpha: .42; --delay: 1.7s; }
.r41 { --x: 29%; --y: 60%; --size: 60px; --rot: -8deg; --alpha: .58; --delay: .2s; }
.r42 { --x: 37%; --y: 69%; --size: 74px; --rot: 16deg; --alpha: .66; --delay: 1.4s; }
.r43 { --x: 47%; --y: 73%; --size: 50px; --rot: -18deg; --alpha: .5; --delay: .5s; }
.r44 { --x: 55%; --y: 70%; --size: 62px; --rot: 9deg; --alpha: .46; --delay: 1.9s; }
.r45 { --x: 67%; --y: 32%; --size: 54px; --rot: 19deg; --alpha: .48; --delay: 1.2s; }
.r46 { --x: 75%; --y: 36%; --size: 72px; --rot: -14deg; --alpha: .65; --delay: .4s; }
.r47 { --x: 68%; --y: 48%; --size: 48px; --rot: -6deg; --alpha: .44; --delay: 1.5s; }
.r48 { --x: 78%; --y: 52%; --size: 62px; --rot: 17deg; --alpha: .62; --delay: .7s; }
.r49 { --x: 68%; --y: 63%; --size: 58px; --rot: -21deg; --alpha: .56; --delay: 1.8s; }
.r50 { --x: 76%; --y: 68%; --size: 72px; --rot: 11deg; --alpha: .64; --delay: .9s; }
.r51 { --x: 23%; --y: 36%; --size: 42px; --rot: 8deg; --alpha: .38; --delay: 1.1s; }
.r52 { --x: 83%; --y: 42%; --size: 44px; --rot: -18deg; --alpha: .4; --delay: .3s; }
.r53 { --x: 22%; --y: 75%; --size: 54px; --rot: 19deg; --alpha: .5; --delay: 1.3s; }
.r54 { --x: 82%; --y: 76%; --size: 54px; --rot: -12deg; --alpha: .5; --delay: .6s; }
.r55 { --x: 34%; --y: 78%; --size: 48px; --rot: -22deg; --alpha: .44; --delay: 1.6s; }
.r56 { --x: 64%; --y: 78%; --size: 48px; --rot: 18deg; --alpha: .44; --delay: .8s; }
.r57 { --x: 42%; --y: 26%; --size: 42px; --rot: 15deg; --alpha: .36; --delay: 1.9s; }
.r58 { --x: 58%; --y: 26%; --size: 42px; --rot: -15deg; --alpha: .36; --delay: .2s; }
.r59 { --x: 33%; --y: 56%; --size: 42px; --rot: 10deg; --alpha: .34; --delay: .7s; }
.r60 { --x: 73%; --y: 58%; --size: 42px; --rot: -10deg; --alpha: .34; --delay: 1.5s; }
.r61 { --x: 47%; --y: 86%; --size: 60px; --rot: 14deg; --alpha: .56; --delay: 1s; }
.r62 { --x: 56%; --y: 88%; --size: 52px; --rot: -17deg; --alpha: .5; --delay: .1s; }
.r63 { --x: 16%; --y: 50%; --size: 50px; --rot: -8deg; --alpha: .42; --delay: 1.7s; }
.r64 { --x: 86%; --y: 50%; --size: 50px; --rot: 8deg; --alpha: .42; --delay: .6s; }

.final-inner {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 112px);
  z-index: 3;
}

.heart-confession {
  width: min(560px, 78vw);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 36px 54px rgba(125, 17, 54, 0.24));
}

.heart-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.heart-shadow {
  fill: rgba(133, 17, 56, 0.22);
  transform: translateY(18px);
}

.heart-main {
  fill: url("#heartGradient");
}

.heart-highlight {
  fill: url("#heartGlow");
}

.heart-text {
  width: min(360px, 68vw);
  position: absolute;
  left: 50%;
  top: 43%;
  transform: translate(-50%, -50%);
  z-index: 2;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 16px rgba(92, 0, 35, 0.24);
}

.heart-text .section-label {
  color: #ffe7ae;
}

.heart-text h2 {
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(30px, 5.4vw, 52px);
}

.heart-text p {
  max-width: 230px;
  margin: 14px auto 0;
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.music-note {
  position: fixed;
  right: 18px;
  bottom: 16px;
  z-index: 8;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--rose-dark);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(105, 22, 50, 0.12);
}

.rose-frame {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.rose-frame-top,
.rose-frame-bottom {
  left: 3vw;
  right: 3vw;
  height: 110px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rose-frame-top {
  top: 10px;
}

.rose-frame-bottom {
  bottom: 10px;
}

.rose-frame-left,
.rose-frame-right {
  top: 90px;
  bottom: 90px;
  width: 96px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.rose-frame-left {
  left: 10px;
}

.rose-frame-right {
  right: 10px;
}

.rose {
  width: clamp(34px, 6vw, 70px);
  aspect-ratio: 1;
  position: relative;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #ffe8f0 0 11%, transparent 12%),
    conic-gradient(from 18deg, #ff75a1, #ffd3e1, #f04f86, #ffb3cb, #e83f79, #ff75a1);
  box-shadow: 0 10px 28px rgba(178, 30, 78, 0.2);
  animation: rose-sway 4.6s ease-in-out infinite;
}

.rose::before,
.rose::after {
  content: "";
  position: absolute;
  border-radius: 999px 999px 999px 0;
  background: rgba(58, 154, 145, 0.72);
  width: 42%;
  height: 20%;
  bottom: -8%;
}

.rose::before {
  left: 8%;
  transform: rotate(24deg);
}

.rose::after {
  right: 8%;
  transform: rotate(156deg);
}

.bloom-2,
.bloom-9,
.bloom-15 {
  transform: scale(0.78);
  animation-delay: 300ms;
}

.bloom-4,
.bloom-11,
.bloom-19 {
  transform: scale(1.1);
  animation-delay: 700ms;
}

.bloom-6,
.bloom-13,
.bloom-21 {
  animation-delay: 1100ms;
}

.floating-heart {
  position: fixed;
  inset: auto auto 0 0;
  z-index: 0;
  pointer-events: none;
}

.floating-heart::before,
.floating-heart::after {
  content: "♥";
  position: fixed;
  bottom: -40px;
  color: rgba(233, 64, 103, 0.24);
  font-size: 24px;
  animation: float-up 13s linear infinite;
}

.field-one::before {
  left: 12%;
  animation-delay: 0s;
}

.field-one::after {
  left: 82%;
  color: rgba(213, 154, 53, 0.24);
  animation-delay: 3s;
}

.field-two::before {
  left: 44%;
  font-size: 18px;
  animation-delay: 6s;
}

.field-two::after {
  left: 68%;
  color: rgba(58, 154, 145, 0.18);
  animation-delay: 9s;
}

.field-three::before {
  left: 26%;
  font-size: 30px;
  animation-delay: 11s;
}

.field-three::after {
  left: 92%;
  font-size: 16px;
  animation-delay: 13s;
}

.celebration-burst::before {
  content: "♥ ♥ ♥ ♥ ♥";
  position: fixed;
  left: 50%;
  top: 18%;
  z-index: 5;
  color: #fff;
  font-size: 34px;
  transform: translateX(-50%);
  animation: celebration 1200ms ease forwards;
  pointer-events: none;
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes float-up {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translate3d(40px, -112vh, 0) rotate(26deg);
    opacity: 0;
  }
}

@keyframes rise-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes rose-sway {
  0%,
  100% {
    translate: 0 0;
    rotate: -2deg;
  }
  50% {
    translate: 0 -8px;
    rotate: 3deg;
  }
}

@keyframes rose-drift {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

@keyframes celebration {
  0% {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.7);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -70px) scale(1.4);
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .name-panel {
    left: 12px;
    right: 12px;
    top: 12px;
    justify-content: center;
  }

  .screen {
    padding: 96px 18px 46px;
  }

  .hero-copy,
  .letter-line,
  .proposal p {
    font-size: 16px;
  }

  .stats-band {
    grid-template-columns: 1fr;
    margin: 34px 0;
  }

  .stat {
    min-height: 104px;
  }

  .proposal {
    margin-top: 28px;
    padding-top: 28px;
  }

  .proposal-actions {
    flex-direction: column;
  }

  .primary-button,
  .ghost-button {
    width: min(100%, 260px);
  }

  .heart-confession {
    width: min(430px, 92vw);
  }

  .heart-text {
    width: min(280px, 70vw);
  }

  .heart-text p {
    font-size: 14px;
  }

  .rose-frame-top,
  .rose-frame-bottom {
    height: 78px;
  }

  .rose-frame-left,
  .rose-frame-right {
    width: 54px;
    top: 72px;
    bottom: 72px;
  }
}
