:root {
  --mist: #eef4fc;
  --mist-deep: #dfe9f8;
  --cloud: #f9fcff;
  --white: #ffffff;
  --ink: #243653;
  --ink-soft: #65758d;
  --navy: #263f6a;
  --navy-deep: #1b3052;
  --blue: #5578b1;
  --periwinkle: #91aad9;
  --blue-pale: #c9daf2;
  --blue-wash: #e4edfa;
  --petal: #aabde3;
  --yellow: #f0db9e;
  --line: rgba(43, 68, 106, 0.15);
  --shadow: 0 26px 75px rgba(39, 61, 95, 0.14);
  --serif: "STSong", "Songti SC", "SimSun", serif;
  --sans: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --script: "Segoe Script", "Brush Script MT", cursive;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 7% 15%, rgba(164, 188, 227, 0.24), transparent 22%),
    radial-gradient(circle at 93% 42%, rgba(197, 214, 239, 0.28), transparent 26%),
    var(--mist);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.svg-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

body.modal-open { overflow: hidden; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--blue); color: white; }

.page-grain {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
}

.floating-petals {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.floating-petal {
  position: absolute;
  color: rgba(99, 132, 186, 0.2);
  animation: floatPetal 11s linear infinite;
}

@keyframes floatPetal {
  0% { transform: translateY(18vh) rotate(0); opacity: 0; }
  15%, 85% { opacity: 1; }
  100% { transform: translateY(-110vh) rotate(45deg); opacity: 0; }
}

.section-shell,
.site-header,
.footer-message,
.footer-bottom {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  position: relative;
  z-index: 30;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.brand-flower {
  position: relative;
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--mist);
  font-family: Georgia, serif;
  font-size: 20px;
  line-height: 1;
  transform: rotate(-8deg);
}

.brand-flower::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--yellow);
}

.main-nav {
  display: flex;
  gap: 34px;
  margin-left: 70px;
}

.main-nav a {
  position: relative;
  padding-block: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.main-nav a::after {
  content: "";
  position: absolute;
  right: 100%;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: var(--blue);
  transition: right 240ms ease;
}

.main-nav a:hover::after { right: 0; }

.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
  font-size: 12px;
  transition: background 180ms ease, transform 180ms ease;
}

.profile-button:hover { background: white; transform: translateY(-1px); }

.profile-button-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px rgba(85, 120, 177, 0.12);
}

.hero {
  position: relative;
  min-height: 800px;
  display: grid;
  grid-template-columns: 0.94fr 1.06fr;
  align-items: center;
  gap: 70px;
  padding-block: 60px 105px;
}

.hero-copy { position: relative; z-index: 3; min-width: 0; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0 0 28px;
  color: var(--blue);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.eyebrow-line { width: 36px; height: 1px; background: var(--blue); }

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(55px, 6.2vw, 88px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.055em;
}

.hero h1 em,
.section-heading h2 em,
.wishes h2 em {
  color: var(--navy);
  font-style: normal;
  font-weight: 400;
}

.hero-description {
  max-width: 450px;
  margin: 27px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.9;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 50px;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.06em;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button-primary {
  padding: 0 23px;
  border-radius: 2px;
  background: var(--navy);
  color: var(--cloud);
  box-shadow: 0 13px 28px rgba(37, 62, 105, 0.2);
}

.button-primary:hover {
  background: var(--navy-deep);
  transform: translateY(-2px);
  box-shadow: 0 17px 35px rgba(37, 62, 105, 0.25);
}

.button-text {
  padding: 0 0 4px;
  border-bottom: 1px solid rgba(36, 54, 83, 0.32);
  background: none;
  color: var(--ink-soft);
}

.button-text:hover { color: var(--navy); border-color: var(--navy); }

.button-secondary {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
}

.hero-names {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 38px;
}

.name-pill {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 13px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.54);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.name-avatar {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  color: white;
  font-family: var(--serif);
  font-size: 12px;
}

.avatar-one { background: var(--navy); }
.avatar-two { background: #7691c3; }
.name-flower { color: var(--blue); font-size: 12px; }

.our-song {
  position: relative;
  max-width: 440px;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 3px 24px 3px 3px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
}

.music-disc {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, var(--cloud) 0 8%, transparent 9% 14%, var(--blue) 15% 18%, var(--navy) 19% 100%);
  color: white;
  cursor: pointer;
  font-size: 12px;
}

.music-disc::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.our-song.is-playing .music-disc { animation: discSpin 6s linear infinite; }
@keyframes discSpin { to { transform: rotate(360deg); } }

.our-song-copy { min-width: 0; display: grid; gap: 3px; }
.our-song-copy > span { color: var(--blue); font-size: 7px; letter-spacing: 0.14em; }
.our-song-copy strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.song-file-info {
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 8px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.song-edit-button {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 9px;
}

.music-embed {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 48px;
  padding-top: 4px;
  border-radius: 3px;
}

.music-embed audio { display: block; width: 100%; height: 42px; }

.hero-art {
  position: relative;
  min-height: 610px;
  display: grid;
  place-items: center;
}

.hydrangea-spray {
  position: absolute;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 14px 18px rgba(33, 61, 87, 0.16));
}

.hero-spray-left {
  z-index: 2;
  bottom: -24px;
  left: -86px;
  width: 270px;
  transform: rotate(-13deg);
}

.hero-spray-right {
  z-index: 2;
  top: -34px;
  right: -56px;
  width: 220px;
  opacity: 0.78;
  transform: rotate(20deg) scaleX(-1);
}

.section-spray {
  z-index: -1;
  opacity: 0.26;
}

.story-spray {
  top: 12px;
  right: -105px;
  width: 300px;
  transform: rotate(17deg);
}

.memories-spray {
  bottom: 40px;
  left: -120px;
  width: 310px;
  transform: rotate(-24deg);
}

.journey-spray {
  top: 145px;
  right: -125px;
  width: 330px;
  opacity: 0.2;
  transform: rotate(28deg);
}

.wishes-spray {
  right: -118px;
  bottom: 40px;
  width: 310px;
  opacity: 0.23;
  transform: rotate(-16deg);
}

.hero-bloom {
  position: absolute;
  z-index: 0;
  inset: 0;
  pointer-events: none;
}

.hero-bloom svg {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.hero-bloom .bloom { fill: #aabee3; opacity: 0.5; }
.hero-bloom .bloom-light { fill: #d6e4f7; opacity: 0.78; }
.hero-bloom .bloom-white { fill: #f9fbff; opacity: 0.88; }
.hero-bloom .bloom-deep { fill: #7596cc; opacity: 0.3; }

.flower-ring {
  position: absolute;
  border: 1px solid rgba(67, 99, 151, 0.16);
  border-radius: 50%;
}

.ring-one { width: 570px; height: 570px; animation: slowSpin 36s linear infinite; }
.ring-two { width: 665px; height: 400px; transform: rotate(-22deg); }

.flower-ring::after {
  content: "✿";
  position: absolute;
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: var(--mist);
  color: #8faad6;
  font-size: 15px;
}
.ring-one::after { top: 62px; right: 43px; }
.ring-two::after { bottom: 22px; left: 118px; }
@keyframes slowSpin { to { transform: rotate(360deg); } }

.art-card {
  position: relative;
  z-index: 3;
  width: 370px;
  padding: 12px 12px 0;
  border-radius: 190px 190px 8px 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  transform: rotate(2.2deg);
}

.art-card::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: -1;
  border: 1px solid rgba(67, 99, 151, 0.16);
  border-radius: inherit;
}

.art-sky {
  position: relative;
  height: 455px;
  overflow: hidden;
  border-radius: 180px 180px 2px 2px;
  background: #bfd2ee;
}

.garden-scene { width: 100%; height: 100%; }

.art-script {
  position: absolute;
  left: 30px;
  bottom: 28px;
  z-index: 5;
  color: #eef5ff;
  font-family: var(--script);
  font-size: 24px;
  transform: rotate(-5deg);
  text-shadow: 0 2px 9px rgba(27, 48, 84, 0.38);
}

.art-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 13px 18px;
}

.art-caption > div { display: grid; gap: 5px; }
.art-caption-label { color: var(--ink-soft); font-size: 8px; letter-spacing: 0.2em; }
.art-caption strong { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.art-date { color: var(--blue); font-size: 10px; }

.flower-badge {
  position: absolute;
  z-index: 6;
  top: 72px;
  left: 8%;
  display: grid;
  justify-items: center;
  width: 98px;
  height: 98px;
  place-content: center;
  border: 1px solid rgba(67, 99, 151, 0.25);
  border-radius: 50%;
  background: rgba(249, 252, 255, 0.86);
  color: var(--navy);
  box-shadow: 0 12px 32px rgba(58, 82, 121, 0.1);
  transform: rotate(-9deg);
  backdrop-filter: blur(8px);
}

.flower-badge::before {
  content: "✿";
  position: absolute;
  top: 9px;
  color: #7e9dce;
  font-size: 17px;
}
.flower-badge span { margin-top: 12px; font-size: 9px; letter-spacing: 0.12em; }
.flower-badge strong { font-family: var(--serif); font-size: 22px; line-height: 1.2; }
.flower-badge small { font-family: var(--sans); font-size: 9px; }

.note-card {
  position: absolute;
  z-index: 6;
  right: 0;
  bottom: 60px;
  width: 178px;
  padding: 27px 20px 19px;
  background: #e3edf9;
  box-shadow: 0 16px 42px rgba(45, 67, 101, 0.15);
  transform: rotate(5deg);
}

.note-card::after {
  content: "✿";
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: rgba(73, 104, 153, 0.16);
  font-size: 34px;
}

.note-pin {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--navy);
}

.note-card p { margin: 0 0 15px; font-family: var(--serif); font-size: 18px; line-height: 1.6; }
.note-card > span:last-child { color: var(--ink-soft); font-size: 8px; }

.scroll-cue {
  position: absolute;
  bottom: 25px;
  left: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: 0.15em;
  writing-mode: vertical-rl;
}

.scroll-cue-line {
  width: 1px;
  height: 42px;
  background: var(--line);
  animation: scrollPulse 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scrollPulse { 50% { transform: scaleY(0.45); opacity: 0.4; } }

.marquee {
  overflow: hidden;
  border-block: 1px solid rgba(35, 61, 101, 0.14);
  background: var(--navy);
  color: #dfe9fa;
}

.marquee-track {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 15px 0;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.13em;
  animation: marquee 32s linear infinite;
}

.marquee-track i { color: #a8c0e8; font-style: normal; font-size: 11px; }
@keyframes marquee { to { transform: translateX(-50%); } }

.floral-divider {
  width: min(1180px, calc(100% - 48px));
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 42px auto 0;
  color: rgba(85, 120, 177, 0.65);
}

.floral-divider span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line), transparent); }
.floral-divider i { font-family: Georgia, serif; font-size: 18px; font-style: normal; }
.floral-divider i:nth-child(even) { color: rgba(85, 120, 177, 0.35); transform: translateY(-5px); }
.floral-divider-alt { margin-top: 18px; }

.story {
  position: relative;
  isolation: isolate;
  padding-block: 120px 145px;
}

.hydrangea-cluster {
  position: absolute;
  z-index: -1;
  width: 230px;
  height: 190px;
  pointer-events: none;
  color: var(--petal);
  opacity: 0.42;
}

.hydrangea-cluster i {
  position: absolute;
  display: block;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 18%, #fbfdff 0 26%, transparent 27%),
    radial-gradient(circle at 82% 50%, #b6caeb 0 26%, transparent 27%),
    radial-gradient(circle at 50% 82%, #f4f8ff 0 26%, transparent 27%),
    radial-gradient(circle at 18% 50%, #cad9f1 0 26%, transparent 27%);
  filter: drop-shadow(0 6px 10px rgba(67, 99, 151, 0.07));
}

.hydrangea-cluster i::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--yellow);
  transform: translate(-50%, -50%);
}

.hydrangea-cluster i:nth-child(1) { top: 9px; left: 87px; }
.hydrangea-cluster i:nth-child(2) { top: 48px; left: 39px; }
.hydrangea-cluster i:nth-child(3) { top: 48px; left: 136px; }
.hydrangea-cluster i:nth-child(4) { top: 84px; left: 76px; width: 56px; height: 56px; }
.hydrangea-cluster i:nth-child(5) { top: 92px; left: 141px; }
.hydrangea-cluster i:nth-child(6) { top: 126px; left: 43px; }
.hydrangea-cluster i:nth-child(7) { top: 126px; left: 117px; }

.cluster-story {
  top: 15px;
  right: -70px;
  transform: rotate(13deg);
}

.cluster-memories {
  bottom: 105px;
  left: -105px;
  transform: rotate(-22deg) scale(0.92);
}

.cluster-journey {
  top: 105px;
  right: -80px;
  opacity: 0.25;
  transform: rotate(20deg) scale(1.1);
}

.cluster-wishes {
  right: -85px;
  bottom: 68px;
  opacity: 0.32;
  transform: rotate(-18deg) scale(1.05);
}
.section-heading { margin-bottom: 60px; }

.section-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.section-kicker {
  margin: 0 0 18px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.section-heading h2,
.wishes h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(41px, 5vw, 67px);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.045em;
}

.section-note {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.8;
  text-align: right;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 70px;
}

.story-copy { max-width: 495px; padding-top: 18px; }
.story-copy p { margin: 0 0 24px; color: var(--ink-soft); font-size: 14px; line-height: 2; }
.story-copy .story-lead { color: var(--ink); font-family: var(--serif); font-size: 24px; line-height: 1.8; }

.tiny-signature {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 44px;
  color: var(--blue);
  font-family: var(--serif);
  font-size: 13px;
}
.signature-line { width: 40px; height: 1px; background: rgba(67, 99, 151, 0.3); }

.days-card {
  position: relative;
  overflow: hidden;
  min-height: 345px;
  padding: 35px 38px;
  border-radius: 47% 47% 10px 10px / 34% 34% 10px 10px;
  background:
    radial-gradient(circle at 78% 16%, rgba(204, 224, 249, 0.3), transparent 24%),
    linear-gradient(145deg, #5b7bb0, #253f69);
  color: #eef5ff;
  box-shadow: 0 23px 58px rgba(33, 57, 94, 0.22);
}

.days-card::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(232, 242, 255, 0.15);
  border-radius: inherit;
}

.days-card::after {
  content: "✿";
  position: absolute;
  top: 76px;
  right: 34px;
  color: rgba(231, 241, 255, 0.1);
  font-family: Georgia, serif;
  font-size: 148px;
  line-height: 1;
  transform: rotate(-15deg);
}

.days-card-top,
.days-card-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 0.06em;
}

.live-dot { display: flex; align-items: center; gap: 7px; color: rgba(238, 245, 255, 0.72); }
.live-dot i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #bcd5fa;
  box-shadow: 0 0 0 4px rgba(188, 213, 250, 0.12);
  animation: livePulse 1.7s ease-in-out infinite;
}
@keyframes livePulse { 50% { box-shadow: 0 0 0 8px rgba(188, 213, 250, 0); } }

.big-days {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
  margin-top: 30px;
}

.big-days strong {
  font-family: var(--serif);
  font-size: 118px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.07em;
  font-variant-numeric: tabular-nums;
}

.big-days > span { color: rgba(238, 245, 255, 0.7); font-size: 13px; }

.live-time {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  color: rgba(238, 245, 255, 0.7);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.days-card-bottom {
  margin-top: 35px;
  padding-top: 17px;
  border-top: 1px solid rgba(238, 245, 255, 0.16);
  color: rgba(238, 245, 255, 0.65);
}
.days-card-bottom strong { color: #eef5ff; font-family: var(--serif); font-size: 13px; font-weight: 400; }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr) 1.35fr;
  margin-top: 78px;
  border-block: 1px solid var(--line);
}

.stat {
  min-height: 138px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 28px;
  border-right: 1px solid var(--line);
}
.stat:last-child { border-right: 0; }
.stat-number { font-family: var(--serif); font-size: 42px; line-height: 1.1; }
.stat-number sup { margin-left: 5px; color: var(--blue); font-family: var(--sans); font-size: 10px; }
.stat-label { margin-top: 9px; color: var(--ink-soft); font-size: 10px; letter-spacing: 0.08em; }
.stat-quote { position: relative; background: rgba(255, 255, 255, 0.35); }
.stat-quote p { margin: 0; color: var(--ink-soft); font-family: var(--serif); font-size: 13px; line-height: 1.8; }
.quote-mark {
  position: absolute;
  top: 13px;
  left: 18px;
  color: rgba(85, 120, 177, 0.25);
  font-family: Georgia, serif;
  font-size: 52px;
  line-height: 1;
}

.memories {
  position: relative;
  isolation: isolate;
  padding-block: 128px 125px;
  border-top: 1px solid var(--line);
}

.memories::before,
.journey::before,
.wishes::after {
  content: "✿";
  position: absolute;
  z-index: -1;
  color: rgba(149, 177, 218, 0.12);
  font-family: Georgia, serif;
  pointer-events: none;
}

.memories::before { top: 55px; left: -100px; font-size: 250px; transform: rotate(-20deg); }

.gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 24px;
  padding-top: 8px;
}

.polaroid {
  position: relative;
  min-width: 0;
  padding: 11px 11px 17px;
  background: #fbfdff;
  color: var(--ink);
  box-shadow: 0 16px 36px rgba(40, 64, 101, 0.13);
  transition: transform 300ms ease, box-shadow 300ms ease;
}

.polaroid::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  z-index: 4;
  width: 62px;
  height: 20px;
  background: rgba(194, 213, 239, 0.72);
  transform: translateX(-50%) rotate(-3deg);
}

.gallery .polaroid:nth-child(4n + 1) { transform: rotate(-3.2deg); }
.gallery .polaroid:nth-child(4n + 2) { margin-top: 34px; transform: rotate(2.2deg); }
.gallery .polaroid:nth-child(4n + 3) { margin-top: 3px; transform: rotate(-1.7deg); }
.gallery .polaroid:nth-child(4n) { margin-top: 43px; transform: rotate(3.2deg); }
.polaroid:hover { z-index: 5; transform: translateY(-8px) rotate(0); box-shadow: 0 26px 48px rgba(40, 64, 101, 0.18); }

.polaroid-photo-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  aspect-ratio: 0.86;
  background: var(--blue-pale);
  cursor: pointer;
}

.polaroid-photo-button > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.photo-delete {
  position: absolute;
  top: 17px;
  right: 17px;
  z-index: 8;
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(29, 48, 78, 0.72);
  color: white;
  cursor: pointer;
  font-size: 16px;
  opacity: 0;
  transition: opacity 180ms ease;
}
.polaroid:hover .photo-delete, .photo-delete:focus-visible { opacity: 1; }

.photo-placeholder {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
}

.placeholder-hydrangea {
  position: absolute;
  right: -18%;
  bottom: -12%;
  width: 82%;
  height: auto;
  opacity: 0.9;
  filter: drop-shadow(0 8px 12px rgba(31, 57, 84, 0.18));
}

.photo-replace {
  position: absolute;
  left: 50%;
  bottom: 17px;
  z-index: 6;
  width: max-content;
  max-width: calc(100% - 28px);
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(247, 251, 255, 0.92);
  color: var(--navy);
  font-size: 9px;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translate(-50%, 6px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(8px);
}
.polaroid:hover .photo-replace, .polaroid:focus-within .photo-replace { opacity: 1; transform: translate(-50%, 0); }

.polaroid-caption {
  display: block;
  overflow: hidden;
  margin: 15px 5px 6px;
  font-family: var(--serif);
  font-size: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.polaroid-date { display: block; margin-inline: 5px; color: #8494ab; font-size: 7px; letter-spacing: 0.1em; }

.art-beach { background: linear-gradient(#b9d1ef 0 52%, #82a4d6 52% 63%, #dbe9f7 63%); }
.placeholder-sun {
  position: absolute;
  top: 22%;
  left: 25%;
  width: 32%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f4e6bf;
  box-shadow: 0 0 36px rgba(244, 230, 191, 0.5);
}
.placeholder-wave {
  position: absolute;
  left: -10%;
  width: 120%;
  height: 20%;
  border-radius: 50%;
  border-top: 2px solid rgba(246, 251, 255, 0.62);
}
.wave-a { top: 61%; transform: rotate(-4deg); }
.wave-b { top: 71%; transform: rotate(3deg); }
.placeholder-people {
  position: absolute;
  bottom: 15%;
  left: 50%;
  color: var(--navy);
  font-family: Georgia, serif;
  font-size: 34px;
  transform: translateX(-50%) rotate(-5deg);
}

.art-night {
  background:
    radial-gradient(circle at 71% 25%, rgba(209, 227, 249, 0.2), transparent 23%),
    linear-gradient(#354d75, #5a729a 68%, #2d4266);
}
.night-moon {
  position: absolute;
  top: 18%;
  right: 20%;
  width: 23%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #f1e6c7;
  box-shadow: 0 0 30px rgba(241, 230, 199, 0.25);
}
.night-city {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 37%;
  background: #263956;
  clip-path: polygon(0 42%, 8% 42%, 8% 20%, 18% 20%, 18% 55%, 23% 55%, 23% 8%, 36% 8%, 36% 45%, 47% 45%, 47% 25%, 58% 25%, 58% 65%, 64% 65%, 64% 16%, 78% 16%, 78% 50%, 84% 50%, 84% 31%, 96% 31%, 96% 60%, 100% 60%, 100% 100%, 0 100%);
}
.night-stars { position: absolute; top: 18%; left: 15%; color: #e1edff; font-size: 12px; letter-spacing: 9px; }

.art-coffee {
  background:
    radial-gradient(circle at 30% 25%, rgba(239, 247, 255, 0.48), transparent 22%),
    linear-gradient(145deg, #6e89b9, #b9cde9);
}
.coffee-table {
  position: absolute;
  right: -15%;
  bottom: -16%;
  left: -15%;
  height: 60%;
  border-radius: 50% 50% 0 0;
  background: #49638d;
  transform: rotate(-3deg);
}
.coffee-cup {
  position: absolute;
  top: 45%;
  left: 50%;
  width: 38%;
  height: 25%;
  border-radius: 6px 6px 38px 38px;
  background: #edf4fe;
  transform: translateX(-50%);
  box-shadow: 0 10px 15px rgba(30, 50, 84, 0.16);
}
.coffee-cup::after {
  content: "";
  position: absolute;
  top: 24%;
  right: -17%;
  width: 23%;
  height: 38%;
  border: 5px solid #edf4fe;
  border-left: 0;
  border-radius: 0 30px 30px 0;
}
.coffee-cup i {
  position: absolute;
  top: -7%;
  right: 9%;
  left: 9%;
  height: 20%;
  border-radius: 50%;
  background: #506d9b;
}
.coffee-steam {
  position: absolute;
  top: 20%;
  left: 50%;
  color: rgba(241, 248, 255, 0.8);
  font-size: 25px;
  letter-spacing: 6px;
  transform: translateX(-50%);
}
.coffee-heart {
  position: absolute;
  top: 48%;
  left: 39%;
  color: #5774a2;
  font-size: 17px;
  transform: rotate(-12deg);
}

.art-rain { background: linear-gradient(#849ab9, #bac9de); }
.rain-cloud {
  position: absolute;
  top: 25%;
  left: 23%;
  width: 54%;
  height: 20%;
  border-radius: 999px;
  background: rgba(238, 245, 253, 0.7);
}
.rain-cloud::before, .rain-cloud::after { content: ""; position: absolute; border-radius: 50%; background: inherit; }
.rain-cloud::before { width: 42%; aspect-ratio: 1; left: 14%; bottom: 10%; }
.rain-cloud::after { width: 52%; aspect-ratio: 1; right: 8%; bottom: 16%; }
.rain-lines {
  position: absolute;
  inset: 42% 17% 10%;
  opacity: 0.3;
  background: repeating-linear-gradient(110deg, transparent 0 22px, #f0f5fc 23px 24px, transparent 25px 43px);
}
.rain-umbrella {
  position: absolute;
  top: 51%;
  left: 50%;
  color: #3e577f;
  font-family: Georgia, serif;
  font-size: 92px;
  line-height: 1;
  transform: translateX(-50%) rotate(180deg);
}

.gallery-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 68px;
}

.gallery-actions > span { color: var(--ink-soft); font-size: 9px; letter-spacing: 0.04em; }

.add-photo-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(85, 120, 177, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--navy);
  cursor: pointer;
  font-size: 11px;
  transition: background 180ms ease, transform 180ms ease;
}
.add-photo-button:hover { background: white; transform: translateY(-2px); }
.add-photo-button span { font-size: 18px; }

.love-note {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  align-items: center;
  gap: 24px;
  margin-top: 58px;
  padding: 26px 31px;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.3);
}
.love-note-label { display: flex; align-items: center; gap: 12px; color: var(--blue); font-size: 10px; letter-spacing: 0.12em; }
.pulse-ring { position: relative; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.pulse-ring::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  animation: pulseRing 1.8s ease-out infinite;
}
@keyframes pulseRing { to { transform: scale(1.7); opacity: 0; } }
.love-note p {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  transition: opacity 150ms ease, transform 150ms ease;
}
.love-note p.is-changing { opacity: 0; transform: translateY(4px); }
.round-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  transition: background 180ms ease, transform 250ms ease;
}
.round-button:hover { background: white; transform: rotate(90deg); }

.journey {
  position: relative;
  isolation: isolate;
  padding-block: 120px 140px;
  background:
    radial-gradient(circle at 100% 12%, rgba(166, 191, 229, 0.23), transparent 25%),
    linear-gradient(var(--mist-deep), #edf3fb);
  border-block: 1px solid var(--line);
}

.journey::before {
  top: 90px;
  right: -60px;
  font-size: 220px;
  transform: rotate(25deg);
}

.story-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin: -25px 0 42px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.story-toolbar p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.8; }
.story-add { flex: none; min-height: 44px; padding-inline: 18px; }

.story-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.story-card {
  position: relative;
  min-height: 250px;
  padding: 30px 32px 26px;
  overflow: hidden;
  border: 1px solid rgba(58, 87, 133, 0.12);
  border-radius: 2px 38px 2px 2px;
  background: rgba(250, 253, 255, 0.84);
  box-shadow: 0 15px 35px rgba(41, 64, 99, 0.07);
  transition: transform 220ms ease, box-shadow 220ms ease;
}
.story-card::before {
  content: "✿";
  position: absolute;
  top: -25px;
  right: 12px;
  color: rgba(104, 137, 188, 0.1);
  font-family: Georgia, serif;
  font-size: 110px;
}
.story-card:hover { transform: translateY(-4px); box-shadow: 0 22px 42px rgba(41, 64, 99, 0.11); }
.story-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.story-card-date { color: var(--blue); font-size: 9px; letter-spacing: 0.12em; }
.story-card-tag {
  padding: 4px 9px;
  border: 1px solid rgba(85, 120, 177, 0.22);
  border-radius: 999px;
  color: var(--blue);
  font-size: 8px;
  letter-spacing: 0.1em;
}
.story-card h3 { position: relative; z-index: 1; margin: 22px 0 11px; font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.4; }
.story-card p { position: relative; z-index: 1; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.95; white-space: pre-wrap; }
.story-card-actions { position: relative; z-index: 1; display: flex; gap: 16px; margin-top: 23px; }
.story-card-actions button {
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 9px;
}
.story-empty { grid-column: 1 / -1; padding: 70px 30px; border: 1px dashed var(--line); color: var(--ink-soft); text-align: center; }

.wishes {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 95px;
  padding-block: 125px 135px;
}

.wishes::after {
  right: -80px;
  bottom: 80px;
  font-size: 270px;
  transform: rotate(-18deg);
}

.wishes-intro { position: sticky; top: 40px; align-self: start; }
.wishes-intro > p:last-of-type { max-width: 360px; margin: 28px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 2; }

.edit-wishes-button {
  margin-top: 24px;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 1px solid rgba(85, 120, 177, 0.42);
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.06em;
}

.wish-list { border-top: 1px solid var(--line); }
.wish-item {
  display: grid;
  grid-template-columns: 25px 40px 1fr 34px;
  align-items: center;
  gap: 16px;
  min-height: 84px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.wish-item input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.wish-check {
  position: relative;
  width: 21px;
  height: 21px;
  border: 1px solid rgba(67, 99, 151, 0.4);
  border-radius: 50%;
  transition: background 180ms ease, border-color 180ms ease;
}
.wish-check::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: white;
  font-size: 11px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 180ms ease, transform 180ms ease;
}
.wish-item input:checked + .wish-check { border-color: var(--navy); background: var(--navy); }
.wish-item input:checked + .wish-check::after { opacity: 1; transform: scale(1); }
.wish-item input:focus-visible + .wish-check { outline: 2px solid var(--blue); outline-offset: 3px; }
.wish-number { color: #8e9cb0; font-size: 9px; }
.wish-text { font-family: var(--serif); font-size: 20px; }
.wish-item input:checked ~ .wish-text { color: #98a4b5; text-decoration: line-through; text-decoration-color: var(--blue); }
.wish-icon { color: var(--blue); font-family: Georgia, serif; font-size: 18px; text-align: center; }

.mini-letter {
  position: relative;
  grid-column: 2;
  overflow: hidden;
  margin-top: 25px;
  padding: 30px 35px 35px;
  background: #dce8f8;
  box-shadow: 0 20px 46px rgba(40, 63, 96, 0.1);
  transform: rotate(-0.7deg);
}
.mini-letter::before { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(58, 87, 133, 0.14); }
.mini-letter::after { content: "✿"; position: absolute; left: 12px; bottom: -25px; color: rgba(255, 255, 255, 0.5); font-size: 100px; }
.mini-letter-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 8px;
  letter-spacing: 0.14em;
}
.mini-letter-head button { padding: 0 0 3px; border: 0; border-bottom: 1px solid rgba(58, 87, 133, 0.35); background: transparent; cursor: pointer; font-size: 9px; }
.mini-letter p { position: relative; z-index: 1; margin: 34px 55px 27px 0; font-family: var(--serif); font-size: 24px; line-height: 1.7; }
.mini-letter-sign { position: relative; z-index: 1; color: var(--blue); font-family: var(--script); font-size: 15px; }
.mini-letter-stamp {
  position: absolute;
  right: 26px;
  bottom: 25px;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 1px dashed rgba(58, 87, 133, 0.45);
  border-radius: 50%;
  color: rgba(46, 73, 113, 0.68);
  font-size: 7px;
  line-height: 1.5;
  letter-spacing: 0.12em;
  text-align: center;
  transform: rotate(10deg);
}

.site-footer { background: var(--navy-deep); color: #e8f0fc; }
.footer-message { padding-block: 95px 80px; text-align: center; }
.footer-message > span { color: #9db8df; font-size: 9px; letter-spacing: 0.26em; }
.footer-message p { margin: 22px 0 0; font-family: var(--serif); font-size: clamp(42px, 6vw, 76px); line-height: 1.3; letter-spacing: -0.05em; }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 24px 28px;
  border-top: 1px solid rgba(232, 240, 252, 0.14);
  color: rgba(232, 240, 252, 0.55);
  font-size: 9px;
  letter-spacing: 0.08em;
}
.footer-bottom .brand { color: #e8f0fc; }
.footer-bottom .brand-flower { background: #e8f0fc; color: var(--navy); }

.modal {
  width: min(530px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  padding: 0;
  overflow: auto;
  border: 0;
  background: var(--cloud);
  color: var(--ink);
  box-shadow: 0 30px 100px rgba(26, 47, 79, 0.32);
}
.modal::backdrop { background: rgba(27, 46, 77, 0.56); backdrop-filter: blur(8px); }
.modal[open] { animation: modalIn 280ms ease both; }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

.profile-modal form,
.music-modal form,
.story-modal form,
.wishes-modal form { position: relative; padding: 48px 45px 40px; }

.modal-close {
  position: absolute;
  top: 17px;
  right: 17px;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 20px;
  font-weight: 300;
  line-height: 1;
}

.modal-kicker { margin: 0 0 13px; color: var(--blue); font-size: 9px; font-weight: 700; letter-spacing: 0.2em; }
.profile-modal h2,
.music-modal h2,
.story-modal h2,
.wishes-modal h2 { margin: 0; font-family: var(--serif); font-size: 35px; font-weight: 400; }
.modal-description { margin: 13px 0 30px; color: var(--ink-soft); font-size: 11px; line-height: 1.8; }

.field-row, .story-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.profile-modal label,
.music-modal label,
.story-modal label,
.wishes-modal label { display: grid; gap: 8px; margin-bottom: 17px; color: var(--ink-soft); font-size: 10px; letter-spacing: 0.06em; }

.profile-modal input,
.profile-modal textarea,
.music-modal input,
.story-modal input,
.story-modal textarea,
.wishes-modal textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 13px 14px;
  outline: none;
  background: white;
  color: var(--ink);
  font-size: 13px;
  resize: vertical;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.profile-modal input:focus,
.profile-modal textarea:focus,
.music-modal input:focus,
.story-modal input:focus,
.story-modal textarea:focus,
.wishes-modal textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(85, 120, 177, 0.1); }

.modal-submit { width: 100%; margin-top: 8px; }
.story-form-actions { display: flex; gap: 12px; margin-top: 8px; }
.story-form-actions .button { flex: 1; }

.music-modal input[type="file"] {
  padding: 10px;
  background: var(--blue-wash);
}

.current-song-info {
  margin: -12px 0 22px;
  padding: 11px 13px;
  border: 1px solid rgba(85, 120, 177, 0.16);
  border-radius: 3px;
  background: var(--blue-wash);
  color: var(--navy);
  font-size: 10px;
  line-height: 1.6;
}

.music-dialog-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.music-dialog-actions .button-primary { flex: 1; }

.music-dialog-actions .button-secondary {
  min-height: 50px;
  padding-inline: 16px;
  color: #8a6472;
}

.letter-modal { width: min(650px, calc(100% - 32px)); overflow: auto; background: transparent; box-shadow: none; }
.letter-paper {
  position: relative;
  min-height: 690px;
  padding: 68px 72px 62px;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent 55px, rgba(98, 128, 176, 0.17) 56px, transparent 57px),
    repeating-linear-gradient(#fbfdff 0 35px, #dbe3ee 36px, #fbfdff 37px);
  box-shadow: 0 30px 100px rgba(26, 47, 79, 0.36);
}
.letter-paper::before { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(58, 87, 133, 0.12); }
.letter-panel { position: relative; z-index: 1; }
.letter-panel[hidden] { display: none; }

.letter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: -12px 0 34px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(58, 87, 133, 0.14);
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: 0.05em;
}

.letter-toolbar-actions { display: flex; gap: 8px; }

.letter-toolbar-actions button,
.letter-back-button {
  padding: 6px 10px;
  border: 1px solid rgba(58, 87, 133, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--navy);
  cursor: pointer;
  font-size: 9px;
}

.letter-toolbar-actions button:hover,
.letter-back-button:hover { background: white; }

.letter-date { margin: 0 0 36px; color: #8492a7; font-family: var(--serif); font-size: 11px; text-align: right; }
.letter-salutation { margin: 0 0 24px; font-family: var(--serif); font-size: 20px; }
.letter-body { min-height: 290px; font-family: var(--serif); font-size: 16px; line-height: 2.3; }
.letter-body p { margin: 0 0 18px; }
.letter-ending { display: grid; justify-content: end; gap: 9px; margin-top: 35px; color: var(--ink-soft); font-family: var(--serif); font-size: 12px; text-align: right; }
.letter-ending strong { color: var(--blue); font-family: var(--script); font-size: 24px; font-weight: 400; }
.letter-seal {
  position: absolute;
  right: 68px;
  bottom: 53px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 2px solid rgba(74, 105, 153, 0.5);
  border-radius: 50%;
  color: rgba(74, 105, 153, 0.65);
  font-size: 23px;
  transform: rotate(-12deg);
}

.letter-panel-kicker {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.letter-edit-panel h2,
.letter-history-panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
}

.letter-edit-panel > p:not(.letter-panel-kicker) {
  margin: 13px 0 24px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.8;
}

.letter-edit-panel textarea {
  width: 100%;
  min-height: 330px;
  padding: 18px;
  border: 1px solid rgba(58, 87, 133, 0.18);
  border-radius: 3px;
  outline: none;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 2;
  resize: vertical;
}

.letter-edit-panel textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(85, 120, 177, 0.1);
}

.letter-panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.letter-delete-button {
  margin-right: auto;
  padding: 6px 0 4px;
  border: 0;
  border-bottom: 1px solid rgba(139, 78, 93, 0.3);
  background: transparent;
  color: #8b4e5d;
  cursor: pointer;
  font-size: 9px;
}

.letter-delete-button:disabled {
  border-color: transparent;
  color: #a7b0bd;
  cursor: not-allowed;
}

.letter-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.letter-history-list {
  display: grid;
  gap: 12px;
  max-height: 500px;
  overflow: auto;
  padding-right: 4px;
}

.letter-version-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 15px 17px;
  border: 1px solid rgba(58, 87, 133, 0.14);
  border-radius: 3px 18px 3px 3px;
  background: rgba(255, 255, 255, 0.62);
}

.letter-version-copy { min-width: 0; }

.letter-version-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.letter-version-current {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--blue-wash);
  color: var(--navy);
}

.letter-version-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 12px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.letter-version-view {
  padding: 6px 9px;
  border: 1px solid rgba(58, 87, 133, 0.18);
  border-radius: 999px;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  font-size: 8px;
  white-space: nowrap;
}

.letter-version-actions {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.letter-version-delete {
  padding: 2px 3px;
  border: 0;
  background: transparent;
  color: #8b4e5d;
  cursor: pointer;
  font-size: 8px;
}

.letter-history-empty {
  padding: 48px 20px;
  border: 1px dashed rgba(58, 87, 133, 0.2);
  color: var(--ink-soft);
  text-align: center;
}

.letter-history-empty strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

.letter-history-empty p {
  margin: 0;
  font-size: 10px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 100;
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 15px);
  transition: opacity 200ms ease, transform 200ms ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.gallery .polaroid:nth-child(2) { transition-delay: 80ms; }
.gallery .polaroid:nth-child(3) { transition-delay: 160ms; }
.gallery .polaroid:nth-child(4) { transition-delay: 240ms; }

.burst-flower {
  position: fixed;
  z-index: 200;
  color: var(--blue);
  pointer-events: none;
  will-change: transform, opacity;
}

@media (max-width: 1100px) {
  .main-nav { display: none; }
  .hero { gap: 20px; }
  .hero-spray-left { width: 235px; left: -64px; }
  .hero-spray-right { width: 190px; right: -42px; }
  .ring-one { width: 485px; height: 485px; }
  .ring-two { width: 555px; }
  .art-card { width: 330px; }
  .art-sky { height: 410px; }
  .note-card { right: 0; width: 158px; }
  .flower-badge { left: 2%; }
  .gallery { gap: 16px; }
  .polaroid { padding: 8px 8px 14px; }
  .polaroid-caption { font-size: 13px; }
  .wishes { gap: 55px; }
}

@media (max-width: 820px) {
  .section-shell, .site-header, .footer-message, .footer-bottom { width: min(100% - 32px, 680px); }
  .site-header { height: 76px; }
  .brand { font-size: 15px; }
  .profile-button { padding: 9px 12px; font-size: 10px; }
  .hero { grid-template-columns: 1fr; gap: 42px; padding-block: 60px 100px; }
  .hero-copy { max-width: 600px; }
  .hero h1 { font-size: clamp(42px, 10.7vw, 64px); }
  .hero-art { min-height: 520px; }
  .hero-spray-left { width: 210px; left: max(-36px, calc(50% - 295px)); bottom: -12px; }
  .hero-spray-right { width: 165px; right: max(-20px, calc(50% - 285px)); top: -12px; }
  .section-spray { opacity: 0.17; }
  .story-spray, .journey-spray, .wishes-spray { right: -90px; }
  .memories-spray { left: -95px; }
  .art-card { width: min(345px, 76vw); }
  .art-sky { height: min(430px, 98vw); }
  .ring-one { width: min(540px, 105vw); height: min(540px, 105vw); }
  .ring-two { width: min(600px, 115vw); }
  .note-card { right: max(0px, calc(50% - 250px)); bottom: 20px; }
  .flower-badge { top: 40px; left: max(0px, calc(50% - 250px)); }
  .scroll-cue { display: none; }
  .story { padding-block: 100px; }
  .story-grid { grid-template-columns: 1fr; gap: 45px; }
  .story-copy { max-width: 620px; }
  .days-card { min-height: 330px; border-radius: 190px 190px 10px 10px / 90px 90px 10px 10px; }
  .stat-row { grid-template-columns: repeat(3, 1fr); margin-top: 55px; }
  .stat-quote { grid-column: 1 / -1; min-height: 110px; border-top: 1px solid var(--line); }
  .stat:nth-child(3) { border-right: 0; }
  .memories { padding-block: 105px; }
  .gallery { grid-template-columns: 1fr 1fr; column-gap: 26px; row-gap: 38px; }
  .gallery .polaroid:nth-child(even) { margin-top: 30px; }
  .gallery .polaroid:nth-child(4n + 3) { margin-top: 0; }
  .polaroid-caption { white-space: normal; }
  .love-note { grid-template-columns: 1fr auto; gap: 12px 18px; margin-top: 56px; }
  .love-note-label { grid-column: 1 / -1; }
  .story-list { gap: 18px; }
  .wishes { grid-template-columns: 1fr; gap: 52px; padding-block: 105px; }
  .wishes-intro { position: static; }
  .mini-letter { grid-column: 1; }
}

@media (max-width: 540px) {
  .profile-button { width: 36px; height: 36px; justify-content: center; padding: 0; overflow: hidden; font-size: 0; }
  .profile-button-dot { width: 9px; height: 9px; flex: none; }
  .hero { padding-top: 46px; }
  .hero-description { font-size: 13px; }
  .hero-actions { align-items: stretch; flex-direction: column; gap: 5px; margin-top: 28px; }
  .hero-actions .button { min-height: 50px; justify-content: space-between; }
  .hero-names { margin-top: 30px; }
  .our-song { grid-template-columns: 40px 1fr; padding: 9px; }
  .song-edit-button { grid-column: 2; justify-self: start; }
  .music-embed { height: 80px; }
  .music-embed audio { height: 40px; }
  .hero-art { min-height: 450px; }
  .hero-spray-left { width: 155px; left: -20px; bottom: -5px; }
  .hero-spray-right { width: 122px; right: -8px; top: 0; }
  .section-spray { width: 220px !important; opacity: 0.15; }
  .art-card { width: min(295px, 76vw); padding: 9px 9px 0; }
  .art-sky { height: min(365px, 94vw); }
  .art-caption { padding: 12px 8px 13px; }
  .art-caption strong { font-size: 15px; }
  .note-card { right: -3px; bottom: 12px; width: 126px; padding: 19px 14px 13px; }
  .note-card p { font-size: 14px; }
  .flower-badge { top: 25px; left: 0; width: 75px; height: 75px; }
  .flower-badge::before { top: 5px; font-size: 14px; }
  .flower-badge span { margin-top: 12px; font-size: 8px; }
  .flower-badge strong { font-size: 18px; }
  .floral-divider { width: calc(100% - 32px); margin-top: 30px; gap: 8px; }
  .floral-divider i { font-size: 15px; }
  .section-heading { margin-bottom: 40px; }
  .section-heading h2, .wishes h2 { font-size: 39px; }
  .section-heading-row { display: block; }
  .section-note { margin-top: 18px; text-align: left; }
  .story-copy .story-lead { font-size: 21px; }
  .days-card { min-height: 310px; padding: 28px 24px; }
  .big-days strong { font-size: 90px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .stat { min-height: 116px; padding: 20px; }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3) { grid-column: 1 / -1; border-top: 1px solid var(--line); border-right: 0; }
  .stat-number { font-size: 35px; }
  .stat-quote { grid-column: 1 / -1; }
  .gallery { gap: 18px 12px; }
  .polaroid { padding: 6px 6px 11px; }
  .polaroid::before { top: -7px; width: 45px; height: 14px; }
  .gallery .polaroid:nth-child(even) { margin-top: 22px; }
  .polaroid-caption { margin: 10px 4px 4px; font-size: 11px; }
  .polaroid-date { margin-inline: 4px; font-size: 5px; }
  .photo-replace { display: none; }
  .photo-delete { opacity: 1; top: 10px; right: 10px; }
  .gallery-actions { align-items: flex-start; flex-direction: column; gap: 10px; margin-top: 48px; }
  .gallery-actions > span { margin-left: 5px; }
  .love-note { padding: 22px 15px; }
  .love-note p { font-size: 15px; }
  .journey { padding-block: 96px; }
  .story-toolbar { align-items: flex-start; flex-direction: column; gap: 18px; margin-top: -15px; }
  .story-add { width: 100%; justify-content: space-between; }
  .story-list { grid-template-columns: 1fr; }
  .story-card { min-height: 230px; padding: 26px 24px 23px; }
  .story-card h3 { font-size: 22px; }
  .wish-item { grid-template-columns: 25px 30px 1fr 24px; gap: 9px; }
  .wish-text { font-size: 16px; }
  .mini-letter { padding: 27px 22px 60px; }
  .mini-letter p { margin-right: 0; font-size: 20px; }
  .footer-message { padding-block: 70px 60px; }
  .footer-bottom { flex-wrap: wrap; gap: 16px; }
  .footer-bottom > span:nth-child(2) { order: 3; width: 100%; }
  .profile-modal form,
  .music-modal form,
  .story-modal form,
  .wishes-modal form { padding: 42px 23px 28px; }
  .field-row, .story-form-row { grid-template-columns: 1fr; gap: 0; }
  .story-form-actions { flex-direction: column-reverse; }
  .letter-paper { min-height: 560px; padding: 60px 34px 70px; background: repeating-linear-gradient(#fbfdff 0 35px, #dbe3ee 36px, #fbfdff 37px); }
  .letter-body { min-height: 260px; font-size: 15px; }
  .letter-seal { right: 38px; bottom: 42px; }
  .letter-toolbar { align-items: flex-start; flex-direction: column; margin-top: -5px; }
  .letter-toolbar-actions { flex-wrap: wrap; }
  .letter-edit-panel textarea { min-height: 300px; }
  .letter-panel-actions { flex-direction: column; }
  .letter-panel-actions .button { width: 100%; }
  .letter-delete-button { order: -1; align-self: flex-start; margin: 0 0 4px; }
  .letter-history-head { align-items: flex-start; flex-direction: column; }
  .letter-version-item { grid-template-columns: 1fr; }
  .letter-version-actions { justify-items: start; }
}

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