/* =========================================================
   奶油粉甜系 · 手机端单页
   想换主题色，改下面 :root 里的变量即可
   ========================================================= */

:root {
  --cream: #FFF8F3;
  --cream-2: #FFEFE7;
  --pink: #F2789F;
  --pink-deep: #E05C87;
  --pink-soft: #FFD9E4;
  --pink-line: rgba(242, 120, 159, .18);
  --ink: #5A4247;
  --muted: #96797F;
  --white: #FFFFFF;
  --shadow: 0 14px 38px rgba(200, 110, 140, .13);
  --radius: 22px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --hand: "Xingkai SC", "STXingkai", "KaiTi", "Kaiti SC", var(--font);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background-color: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 固定背景层：iOS 上比 background-attachment: fixed 更稳 */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(900px 620px at 12% -6%, rgba(255, 214, 228, .75), transparent 60%),
    radial-gradient(780px 560px at 100% 18%, rgba(255, 232, 210, .68), transparent 58%),
    radial-gradient(700px 700px at 50% 110%, rgba(255, 220, 230, .5), transparent 60%);
}

body.is-locked,
body.lb-open { overflow: hidden; }

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

[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;
}

.gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(26px + env(safe-area-inset-top)) 24px calc(26px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #FFF8F3 0%, #FFF1EC 58%, #FFEAF0 100%);
  overflow-y: auto;
}

.gate-passed .gate { display: none; }

.gate.is-leaving {
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s;
}

.gate-card {
  width: 100%;
  max-width: 360px;
  margin: auto;
  padding: 34px 26px 28px;
  text-align: center;
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--pink-line);
  border-radius: 26px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.gate-eyebrow {
  margin: 0 0 12px;
  font-size: 9px;
  letter-spacing: .32em;
  color: var(--pink);
}

.gate-title {
  margin: 0;
  font-family: var(--hand);
  font-size: 31px;
  line-height: 1.3;
  letter-spacing: .06em;
  color: #4E3439;
}

.gate-sub {
  margin: 10px 0 0;
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--muted);
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.gate-input {
  width: 100%;
  padding: 13px 16px;
  font-family: var(--font);
  font-size: 16px;
  text-align: center;
  color: var(--ink);
  background: #FFF7F9;
  border: 1px solid var(--pink-line);
  border-radius: 14px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.gate-input::placeholder {
  color: #C4A9AF;
  letter-spacing: .06em;
}

.gate-input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(242, 120, 159, .12);
}

.gate-btn {
  padding: 13px 20px;
  font-size: 14px;
  letter-spacing: .14em;
  color: #FFF;
  background: linear-gradient(145deg, #F98BB0, #E85C89);
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(232, 92, 137, .28);
  transition: transform .2s ease;
}

.gate-btn:active { transform: scale(.97); }

.gate-error {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--pink-deep);
}

.gate-hint {
  margin: 4px 0 0;
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--muted);
}

.gate-card.is-error { animation: gateShake .4s ease; }

@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* ========================= 封面 ========================= */

.cover {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(28px + env(safe-area-inset-top)) 24px calc(22px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #FFF8F3 0%, #FFF1EC 58%, #FFEAF0 100%);
  overflow: hidden;
  transition: opacity .7s ease, transform .7s ease, visibility .7s;
}

.cover.is-open {
  opacity: 0;
  transform: scale(1.04);
  visibility: hidden;
}

.cover-blob {
  position: absolute;
  width: min(96vw, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #FFD9E4, rgba(255, 217, 228, 0) 70%);
  filter: blur(6px);
  animation: breathe 9s ease-in-out infinite;
}

.floating-hearts {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.floating-hearts span {
  position: absolute;
  bottom: -46px;
  color: rgba(242, 120, 159, .3);
  animation: floatUp linear infinite;
}

.cover-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.cover-to {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: .16em;
  color: var(--muted);
}

.cover-to span {
  color: var(--pink-deep);
  font-weight: 600;
  letter-spacing: .08em;
}

.cover-title {
  margin: 0;
  font-family: var(--hand);
  font-size: clamp(38px, 11vw, 52px);
  line-height: 1.28;
  letter-spacing: .05em;
  color: #4E3439;
  white-space: pre-line;
}

.cover-sub {
  margin: 12px 0 0;
  font-size: 14px;
  letter-spacing: .16em;
  color: var(--muted);
}

.seal {
  position: relative;
  width: 94px;
  height: 94px;
  margin-top: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #F98BB0, #E85C89);
  box-shadow: 0 16px 32px rgba(232, 92, 137, .35), inset 0 2px 6px rgba(255, 255, 255, .4);
  transition: transform .25s ease;
  animation: sealGlow 2.8s ease-in-out infinite;
}

.seal::before {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1px solid rgba(242, 120, 159, .38);
  animation: ringOut 2.8s ease-out infinite;
}

.seal:active { transform: scale(.94); }

.cover-hint {
  margin: 20px 0 0;
  font-size: 12px;
  letter-spacing: .2em;
  color: var(--muted);
  animation: fadeIn 1.8s ease .7s both;
}

.cover-foot {
  position: absolute;
  bottom: calc(22px + env(safe-area-inset-bottom));
  margin: 0;
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--muted);
  opacity: .85;
}

/* ========================= 通用 ========================= */

.main {
  max-width: 560px;
  margin: 0 auto;
  padding: 46px 0 30px;
}

.section { padding: 54px 22px 12px; }

.section + .section { padding-top: 50px; }

.eyebrow {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .34em;
  color: var(--pink);
  text-transform: uppercase;
}

.section-title {
  display: inline-block;
  margin: 0 0 4px;
  padding-bottom: 10px;
  font-size: 26px;
  line-height: 1.3;
  letter-spacing: .03em;
  color: #4E3439;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='68' height='6' viewBox='0 0 68 6'%3E%3Cpath d='M1 4c6-3 12-3 18 0s12 3 18 0 12-3 18 0 8 2 12 1' fill='none' stroke='%23F2789F' stroke-width='2' stroke-linecap='round' opacity='.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 68px 6px;
}

.section-lead {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .3, 1);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.photo-btn {
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--cream-2);
}

.photo-btn img { display: block; }

/* ========================= 天数 ========================= */

.days-card {
  position: relative;
  margin-top: 24px;
  padding: 30px 22px 26px;
  text-align: center;
  background: linear-gradient(160deg, #FFFFFF 0%, #FFF7F9 100%);
  border: 1px solid var(--pink-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.days-card::after {
  content: "";
  position: absolute;
  top: -60px;
  right: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFE3EC, rgba(255, 227, 236, 0) 70%);
}

.days-label {
  position: relative;
  margin: 0;
  font-size: 13px;
  letter-spacing: .16em;
  color: var(--muted);
}

.days-number {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin: 4px 0 10px;
  color: var(--pink-deep);
  font-weight: 700;
}

#dayCount {
  font-size: clamp(64px, 20vw, 88px);
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 6px 18px rgba(242, 120, 159, .18);
}

.days-unit {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .1em;
  color: var(--muted);
}

.days-since {
  position: relative;
  margin: 0;
  font-size: 12px;
  letter-spacing: .05em;
  color: var(--muted);
}

.anniv-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 12px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, .72);
  border: 1px dashed rgba(242, 120, 159, .32);
  border-radius: 18px;
}

.anniv-label {
  margin: 0 0 5px;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
}

.anniv-date {
  margin: 0;
  font-size: 13px;
  letter-spacing: .08em;
  color: #7D5A62;
}

.anniv-number {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--pink-deep);
  white-space: nowrap;
}

.anniv-number span {
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.anniv-number em {
  margin-left: 3px;
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* ========================= 第一次约会 ========================= */

.polaroids { margin-top: 24px; }

.polaroid {
  position: relative;
  margin: 0;
  padding: 10px 10px 14px;
  background: #FFF;
  border-radius: 4px;
  box-shadow: 0 14px 30px rgba(150, 90, 105, .16), 0 2px 4px rgba(150, 90, 105, .08);
  transform: rotate(var(--tilt, 0deg));
}

.polaroid::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  z-index: 2;
  width: 74px;
  height: 20px;
  background: rgba(255, 211, 223, .72);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
  transform: translateX(-50%) rotate(-2deg);
}

.polaroid--hero {
  padding-bottom: 44px;
}

.polaroid--hero .photo-btn {
  border-radius: 2px;
}

.polaroid--hero img {
  width: 100%;
  height: auto;
  max-height: 620px;
  object-fit: cover;
}

.polaroid--hero figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 13px;
  text-align: center;
  font-family: var(--hand);
  font-size: 14px;
  letter-spacing: .1em;
  color: #8A6A72;
}

.polaroid-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
  align-items: start;
}

.polaroid-pair .photo-btn {
  aspect-ratio: 4 / 5;
  border-radius: 2px;
}

.polaroid-pair img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.date-note {
  margin: 24px 0 0;
  text-align: center;
  font-family: var(--hand);
  font-size: 15px;
  line-height: 1.8;
  letter-spacing: .02em;
  color: #7A5A62;
}

/* ========================= 她的照片 ========================= */

.portrait-hero { margin-top: 24px; }

.portrait-hero .photo-btn {
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.portrait-hero img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 22%;
  border-radius: 20px;
}

.portrait-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.portrait-card {
  border-radius: 14px;
  overflow: hidden;
  background: var(--cream-2);
  box-shadow: 0 8px 18px rgba(200, 110, 140, .12);
}

.portrait-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 25%;
}

/* ========================= 她写的信 ========================= */

.letters {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 26px;
}

.letter-card {
  display: grid;
  grid-template-columns: minmax(0, 36%) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  min-width: 0;
  padding: 16px;
  background: #FFF;
  border: 1px solid var(--pink-line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.letter-card:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) minmax(0, 36%);
}

.letter-card:nth-child(even) .letter-snap { order: 2; }

.letter-snap {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: var(--cream-2);
}

.letter-snap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.letter-snap-hint {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 4px 8px;
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--pink-deep);
  background: rgba(255, 255, 255, .86);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.letter-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.letter-date {
  margin: 0 0 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  color: var(--pink);
}

.letter-quote {
  margin: 0;
  font-family: var(--hand);
  font-size: 16.5px;
  line-height: 1.9;
  letter-spacing: .02em;
  color: #59434A;
  text-wrap: balance;
}

.letter-note {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* ========================= 小纸条 ========================= */

.notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 26px;
  align-items: start;
}

.note-card {
  position: relative;
  margin: 0;
  padding: 8px 8px 14px;
  background: #FFF;
  border-radius: 8px;
  box-shadow: 0 12px 26px rgba(150, 90, 105, .14);
  transform: rotate(var(--tilt, 0deg));
}

.note-card::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  z-index: 2;
  width: 58px;
  height: 18px;
  background: rgba(255, 211, 223, .72);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  transform: translateX(-50%) rotate(1.5deg);
}

.note-photo {
  aspect-ratio: 4 / 5;
  border-radius: 4px;
}

.note-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.note-card figcaption {
  margin: 0;
  padding: 10px 4px 0;
  font-family: var(--hand);
  font-size: 12.5px;
  line-height: 1.7;
  text-align: center;
  color: #6B4E55;
  text-wrap: pretty;
}

/* ========================= 她写下的以后 ========================= */

.future-card {
  position: relative;
  margin-top: 24px;
  padding: 32px 24px 26px;
  background: linear-gradient(180deg, #FFFDFB, #FFF7F1);
  border: 1px solid #F3DFD7;
  border-radius: 6px 6px 22px 22px;
  box-shadow: 0 16px 40px rgba(180, 120, 130, .12);
}

.future-card::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 50%;
  width: 88px;
  height: 20px;
  background: rgba(255, 196, 214, .55);
  border-left: 1px dashed rgba(255, 255, 255, .8);
  border-right: 1px dashed rgba(255, 255, 255, .8);
  transform: translateX(-50%) rotate(-1.5deg);
}

.future-intro {
  margin: 0 0 18px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--muted);
}

.future-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.future-list li {
  position: relative;
  padding-left: 26px;
  font-family: var(--hand);
  font-size: 16.5px;
  line-height: 1.7;
  color: #5E464C;
  text-wrap: pretty;
}

.future-list li::before {
  content: "♥";
  position: absolute;
  left: 4px;
  top: 1px;
  font-size: 12px;
  color: var(--pink);
}

.future-closing {
  margin: 24px 0 0;
  text-align: right;
  font-family: var(--hand);
  font-size: 16px;
  letter-spacing: .04em;
  color: var(--pink-deep);
}

/* ========================= 朋友们的祝福 ========================= */

.friend-quotes {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 26px;
}

.friend-quote {
  margin: 0;
  padding: 20px 20px 18px;
  background: rgba(255, 255, 255, .78);
  border: 1px dashed rgba(242, 120, 159, .3);
  border-radius: 18px;
}

.friend-quote p {
  margin: 0;
  font-family: var(--hand);
  font-size: 16.5px;
  line-height: 1.85;
  color: #5E464C;
  text-wrap: pretty;
}

.friend-quote cite {
  display: block;
  margin-top: 9px;
  font-style: normal;
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--muted);
}

/* ========================= 页脚 ========================= */

.footer {
  padding: 70px 24px calc(56px + env(safe-area-inset-bottom));
  text-align: center;
}

.footer-eyebrow {
  margin: 0 0 12px;
  font-size: 10px;
  letter-spacing: .34em;
  color: var(--pink);
}

.footer-title {
  margin: 0;
  font-family: var(--hand);
  font-size: 38px;
  letter-spacing: .1em;
  color: #4E3439;
}

.footer-heart {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 22px auto 0;
  font-size: 24px;
  color: var(--pink);
  background: #FFF;
  border: 1px solid var(--pink-line);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(242, 120, 159, .18);
}

.footer-heart.tap { animation: tapPop .35s ease; }

.footer-hint {
  margin: 14px 0 0;
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
}

.footer-sign {
  margin: 22px 0 0;
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--muted);
}

/* ========================= 大图 ========================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(48, 26, 32, .94);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox img {
  max-width: 100%;
  max-height: 78vh;
  max-height: 78dvh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}

.lb-close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top));
  right: 14px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 26px;
  line-height: 1;
  color: #FFF;
  background: rgba(255, 255, 255, .12);
  border-radius: 50%;
}

.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  width: 44px;
  height: 60px;
  display: grid;
  place-items: center;
  font-size: 34px;
  line-height: 1;
  color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .14);
  border-radius: 12px;
  transform: translateY(-50%);
}

.lb-prev { left: 10px; }
.lb-next { right: 10px; }

.lb-hint {
  position: absolute;
  bottom: calc(46px + env(safe-area-inset-bottom));
  margin: 0;
  font-size: 10px;
  letter-spacing: .14em;
  color: rgba(255, 255, 255, .48);
}

.lb-counter {
  position: absolute;
  bottom: calc(20px + env(safe-area-inset-bottom));
  margin: 0;
  font-size: 12px;
  letter-spacing: .2em;
  color: rgba(255, 255, 255, .7);
}

/* ========================= 彩蛋弹窗 ========================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(48, 26, 32, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  width: 100%;
  max-width: 350px;
  padding: 30px 24px 24px;
  text-align: center;
  background: linear-gradient(170deg, #FFFFFF, #FFF6F2);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
  transform: translateY(12px) scale(.98);
  transition: transform .35s cubic-bezier(.2, .8, .3, 1);
}

.modal.is-open .modal-card { transform: none; }

.modal-eyebrow {
  margin: 0 0 14px;
  font-size: 9px;
  letter-spacing: .32em;
  color: var(--pink);
}

#secretText {
  margin: 0 0 24px;
  font-family: var(--hand);
  font-size: 16px;
  line-height: 1.95;
  color: #5A4247;
  white-space: pre-line;
}

.modal-close {
  padding: 11px 26px;
  font-size: 13px;
  letter-spacing: .1em;
  color: #FFF;
  background: linear-gradient(145deg, #F98BB0, #E85C89);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(232, 92, 137, .3);
}

/* ========================= 音乐按钮 ========================= */

.music-btn {
  position: fixed;
  right: 14px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 60;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--pink-deep);
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--pink-line);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(200, 110, 140, .18);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.music-btn svg {
  width: 20px;
  height: 20px;
}

.music-btn .icon-pause { display: none; }
.music-btn.is-playing .icon-music { display: none; }
.music-btn.is-playing .icon-pause { display: block; }

/* ========================= 飘落 / 绽放 ========================= */

.burst-heart {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  color: var(--pink);
  animation: burstUp 1.15s cubic-bezier(.15, .7, .3, 1) forwards;
}

.rain-heart {
  position: fixed;
  top: -6vh;
  z-index: 9998;
  pointer-events: none;
  color: var(--pink);
  animation: fallDown linear forwards;
}

/* ========================= 动画 ========================= */

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: .9; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes sealGlow {
  0%, 100% { box-shadow: 0 16px 32px rgba(232, 92, 137, .32), inset 0 2px 6px rgba(255, 255, 255, .4); }
  50% { box-shadow: 0 18px 44px rgba(232, 92, 137, .5), inset 0 2px 6px rgba(255, 255, 255, .4); }
}

@keyframes ringOut {
  0% { transform: scale(.92); opacity: .8; }
  70%, 100% { transform: scale(1.22); opacity: 0; }
}

@keyframes floatUp {
  0% { transform: translateY(0) rotate(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: .7; }
  100% { transform: translateY(-115vh) rotate(18deg); opacity: 0; }
}

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

@keyframes tapPop {
  0% { transform: scale(1); }
  40% { transform: scale(.86); }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes burstUp {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(0); }
  25% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx, 0px)), calc(-50% + var(--dy, -60px))) scale(1.1) rotate(var(--rot, 0deg));
  }
}

@keyframes fallDown {
  0% { transform: translateY(0) rotate(0); }
  100% { transform: translateY(116vh) rotate(200deg); }
}

/* ========================= 小屏微调 ========================= */

@media (max-width: 360px) {
  .section { padding-left: 18px; padding-right: 18px; }

  .letter-card,
  .letter-card:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .letter-card:nth-child(even) .letter-snap { order: 0; }

  .letter-snap { aspect-ratio: 16 / 10; }

  .notes-grid { gap: 12px; }

  .polaroid-pair { gap: 14px; }
}

/* ========================= 降低动效 ========================= */

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