/* ============================================
   我们的小宇宙 · 静态情侣站
   温暖浪漫风格 / 柔和粉色系 / 玻璃拟态
   ============================================ */

:root {
  --bg: #fff7f9;
  --bg-2: #ffeef3;
  --bg-3: #ffe3ec;
  --pink: #d9647a;
  --pink-deep: #b74560;
  --pink-soft: #f7c9d4;
  --pink-lighter: #fdeaf0;
  --ink: #4a2c38;
  --muted: #946e7c;
  --white: #ffffff;
  --shadow: 0 18px 50px rgba(190, 100, 130, 0.14);
  --shadow-soft: 0 10px 30px rgba(190, 100, 130, 0.10);
  --radius: 22px;
  --serif: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 动态背景层 ---------- */
#particleCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.ambient {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}
.ambient-1 {
  width: 380px; height: 380px;
  top: -120px; left: -100px;
  background: #ffc6d9;
  animation: float 14s ease-in-out infinite;
}
.ambient-2 {
  width: 420px; height: 420px;
  bottom: -160px; right: -120px;
  background: #ffd8c4;
  animation: float 18s ease-in-out infinite reverse;
}

.cursor-glow {
  position: fixed;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 170, 195, 0.28), transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.6s ease;
}
.cursor-glow.active { opacity: 1; }

main, .site-header, .site-footer { position: relative; z-index: 2; }

/* ---------- 导航 ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 5vw;
  background: rgba(255, 248, 250, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(217, 100, 122, 0.10);
  z-index: 50;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--pink-deep);
  text-decoration: none;
  letter-spacing: 1px;
}
.brand-heart { color: var(--pink); font-size: 17px; animation: heartbeat 1.8s ease-in-out infinite; }
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.5px;
  transition: color 0.25s ease;
}
.nav-links a:hover { color: var(--pink-deep); }
.nav-links a.active {
  color: var(--pink-deep);
  font-weight: 700;
}
.nav-links a.active::after {
  content: "";
  display: block;
  width: 18px; height: 2px;
  margin: 5px auto 0;
  border-radius: 2px;
  background: var(--pink);
}
.settings-btn {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid rgba(217, 100, 122, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  color: var(--pink-deep);
  cursor: pointer;
  transition: transform 0.3s ease, background 0.3s ease;
}
.settings-btn:hover { transform: rotate(35deg); background: var(--white); }

/* ---------- 首屏 ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 130px 24px 70px;
}
.hero-inner { max-width: 760px; width: 100%; }

.eyebrow {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  font-size: 11px;
  letter-spacing: 3.5px;
  color: var(--pink);
  font-weight: 700;
  margin: 0 0 26px;
}
.eyebrow-line { width: 34px; height: 1px; background: var(--pink-soft); }

.hero-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 600;
  margin: 0 0 20px;
  color: var(--ink);
  letter-spacing: 4px;
}

.timer {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 48px 24px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-bottom: 26px;
}
.timer-main { display: flex; align-items: baseline; gap: 10px; }
.timer-number {
  font-family: Georgia, serif;
  font-size: clamp(72px, 12vw, 118px);
  line-height: 1;
  font-weight: 700;
  color: var(--pink-deep);
  text-shadow: 0 6px 22px rgba(217, 100, 122, 0.22);
  font-variant-numeric: tabular-nums;
}
.timer-number.tick { animation: tick 0.35s ease; }
.timer-unit { font-family: var(--serif); font-size: 22px; color: var(--muted); }
.timer-sub {
  display: flex; align-items: center; gap: 12px;
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px dashed rgba(217, 100, 122, 0.25);
  width: 100%;
  justify-content: center;
}
.timer-cell { display: flex; align-items: baseline; gap: 4px; }
.cell-num {
  font-family: Georgia, serif;
  font-size: 26px; font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.cell-label { font-size: 12px; color: var(--muted); }
.colon { color: var(--pink-soft); font-size: 20px; font-weight: 700; margin: 0 2px; }

.couple-names {
  display: flex; align-items: center; justify-content: center; gap: 22px;
  font-family: var(--serif);
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.name-heart { color: var(--pink); font-size: 24px; animation: heartbeat 1.8s ease-in-out infinite; }
.since-line { color: var(--muted); font-size: 14px; letter-spacing: 1px; margin: 0 0 36px; }
.since-line span { color: var(--pink-deep); font-weight: 600; }

.scroll-cue {
  display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--muted); text-decoration: none; font-size: 11px; letter-spacing: 2px;
}
.scroll-arrow { font-size: 20px; color: var(--pink); animation: bounce 1.8s ease-in-out infinite; }

/* ---------- 首页入口卡片 ---------- */
.entry-section { max-width: 980px; margin: 0 auto; padding: 10px 24px 100px; }
.entry-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; max-width: 640px; margin: 0 auto; }
.entry-grid.single { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
.entry-card {
  display: block;
  text-decoration: none;
  padding: 30px 24px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  text-align: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.entry-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
  border-color: var(--pink-soft);
}
.entry-icon {
  display: inline-grid; place-items: center;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--pink-lighter);
  color: var(--pink);
  font-size: 25px;
  margin-bottom: 16px;
}
.entry-card h3 { font-family: var(--serif); font-size: 19px; margin: 0 0 8px; letter-spacing: 2px; }
.entry-card p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0 0 14px; }
.entry-more { color: var(--pink); font-size: 12px; letter-spacing: 2px; }

/* ---------- 内页页头 ---------- */
.page-header { padding: 155px 24px 10px; text-align: center; }
.page-header h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: 5px;
  margin: 0 0 12px;
}
.page-sub { color: var(--muted); font-size: 14px; letter-spacing: 1px; margin: 0; }
.page-names { color: var(--pink); font-size: 12px; letter-spacing: 3px; margin-top: 14px; }

/* ---------- 登录页 ---------- */
.login-page { min-height: 100vh; }
.login-wrap {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.login-card {
  width: 100%;
  max-width: 430px;
  padding: 46px 40px 34px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 28px;
  box-shadow: 0 24px 70px rgba(190, 100, 130, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
  animation: revealIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.login-brand {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--pink-deep);
  margin-bottom: 22px;
}
.login-brand span { color: var(--pink); animation: heartbeat 1.8s ease-in-out infinite; display: inline-block; }
.login-title { font-family: var(--serif); font-size: 32px; letter-spacing: 4px; margin: 0 0 10px; }
.login-subtitle { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0 0 30px; }

.login-field { display: block; text-align: left; margin-bottom: 18px; }
.login-field > span:first-child {
  display: block; font-size: 12px; color: var(--muted); letter-spacing: 1px; margin-bottom: 8px;
}
.login-field input {
  width: 100%; padding: 13px 16px;
  border: 1px solid #f0d9e0; border-radius: 13px;
  font-size: 14px; color: var(--ink); background: #fffafc;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.login-field input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(217, 100, 122, 0.12); }
.login-field input::placeholder { color: #c9a8b4; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 62px; }
.toggle-pass {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: none; background: none; color: var(--pink);
  font-size: 12px; cursor: pointer; padding: 6px 8px;
}
.toggle-pass:hover { color: var(--pink-deep); }

.login-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin: 4px 0 18px; flex-wrap: wrap;
}
.remember { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); cursor: pointer; }
.remember input { accent-color: var(--pink); width: 15px; height: 15px; cursor: pointer; }
.login-hint { font-size: 11px; color: var(--muted); }
.login-hint b { color: var(--pink-deep); }

.login-error {
  color: #c0395b; font-size: 12px; text-align: left;
  margin: 0 0 14px; min-height: 16px;
  opacity: 0; transition: opacity 0.25s ease;
}
.login-error.show { opacity: 1; }

.login-submit {
  width: 100%; padding: 14px;
  border: none; border-radius: 13px;
  background: linear-gradient(135deg, var(--pink), var(--pink-deep));
  color: white; font-size: 15px; letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(217, 100, 122, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.login-submit:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(217, 100, 122, 0.38); }
.login-submit span { margin-left: 6px; }
.login-foot { margin: 24px 0 0; color: var(--pink-soft); font-size: 11px; letter-spacing: 2px; }

/* 设置面板：账号安全区 */
.settings-divider { height: 1px; background: rgba(217, 100, 122, 0.14); margin: 22px 0 18px; }
.settings-section-title { font-size: 12px; color: var(--pink-deep); letter-spacing: 2px; font-weight: 700; margin: 0 0 14px; }
.logout-btn {
  width: 100%; margin-top: 12px; padding: 10px;
  border: 1px solid rgba(217, 100, 122, 0.3); border-radius: 11px;
  background: transparent; color: var(--pink-deep);
  font-size: 13px; cursor: pointer; letter-spacing: 1px;
  transition: background 0.25s ease;
}
.logout-btn:hover { background: var(--pink-lighter); }

/* ---------- 数字刮刮乐 ---------- */
.scratch-section { display: flex; flex-direction: column; gap: 52px; }
.zone-title {
  font-family: var(--serif); font-size: 21px; letter-spacing: 3px;
  color: var(--pink-deep); margin: 0 0 22px; text-align: center;
}
.zone-title small { font-family: var(--sans); font-size: 11px; color: var(--muted); letter-spacing: 1px; margin-left: 8px; font-weight: 400; }

/* 奖号区：小卡片，各自可刮开 */
.win-zone { text-align: center; }
.win-card-row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px; width: 100%; max-width: 440px; margin: 0 auto;
}
.win-card {
  min-width: 0; padding: 14px 12px 16px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-soft); position: relative; overflow: hidden;
}
.win-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.win-card.first::before { background: linear-gradient(90deg, #f7c948, #ff8f3f); }
.win-card.second::before { background: linear-gradient(90deg, #c9c9d6, #9aa6bd); }
.win-card.third::before { background: linear-gradient(90deg, #e8a56f, #c97f4a); }
.win-card-label { display: block; font-size: 12px; color: var(--muted); letter-spacing: 2px; margin-bottom: 10px; }
.win-card-reveal {
  position: relative; height: 66px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(135deg, #fff5f8, #ffe0ea);
  display: flex; align-items: center; justify-content: center;
}
.win-card-num {
  font-family: Georgia, serif; font-size: 38px; font-weight: 700; line-height: 1;
}
.win-card.first .win-card-num { color: #d9a01c; }
.win-card.second .win-card-num { color: #8492ab; }
.win-card.third .win-card-num { color: #bf7546; }
.win-card-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  cursor: crosshair; touch-action: none;
}

/* 刮奖区：一整块连续区域，8 个数字无分隔 */
.scratch-stage { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; }
.scratch-area {
  position: relative; width: min(680px, 94vw); height: 290px;
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.scratch-under {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  place-items: center;
  background: linear-gradient(135deg, #fff5f8, #ffe3ec);
  padding: 10px 18px;
}
.scratch-num {
  font-family: Georgia, serif; font-size: 44px; line-height: 1; font-weight: 700;
  color: var(--pink-deep); text-shadow: 0 5px 16px rgba(217, 100, 122, 0.18);
  text-align: center;
}
.scratch-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  cursor: crosshair; touch-action: none;
}
.scratch-tip { color: var(--muted); font-size: 12px; letter-spacing: 1px; margin: 20px 0 18px; }
.scratch-actions-wrap { position: relative; width: min(680px, 94vw); margin: 0 auto; }
.scratch-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.scratch-submit { min-width: 230px; }

/* 右下角记录入口 */
.records-btn {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: none; background: none; cursor: pointer;
  color: var(--pink-deep); padding: 4px;
}
.records-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(217, 100, 122, 0.28);
  box-shadow: var(--shadow-soft);
  font-size: 18px;
  transition: transform 0.3s ease, background 0.3s ease;
}
.records-btn:hover .records-icon { transform: translateY(-3px) scale(1.06); background: var(--white); }
.records-label { font-size: 11px; letter-spacing: 1px; }
/* 按钮文字容器：供脚本横向压缩用 */
.btn-fit { display: inline-block; white-space: nowrap; transform-origin: center; }

/* 记录弹层 */
.records-panel { max-width: 440px; }
.records-list { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow-y: auto; margin-top: 16px; }
.record-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; border-radius: 12px;
  background: var(--pink-lighter); font-size: 13px; color: var(--muted);
}
.record-row strong { color: var(--ink); font-weight: 600; }
.record-row.lv1 strong { color: #c98f10; }
.record-row.lv2 strong { color: #8492ab; }
.record-row.lv3 strong { color: #bf7546; }
.record-empty { text-align: center; color: var(--muted); font-size: 13px; padding: 22px 0; }
.records-foot { text-align: center; color: var(--pink); font-size: 11px; letter-spacing: 1px; margin: 18px 0 0; }

/* 奖品对照表 */
.prize-board { text-align: center; }
.prize-row {
  display: flex; align-items: center; gap: 18px; text-align: left;
  max-width: 720px; margin: 0 auto 6px; padding: 12px 24px;
  border-radius: 16px; background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.92); box-shadow: var(--shadow-soft);
}
.prize-level { flex: 0 0 110px; font-family: var(--serif); font-size: 16px; color: var(--ink); letter-spacing: 1px; }
.prize-medal { font-size: 18px; }
.prize-items { flex: 1; font-size: 13px; color: var(--muted); line-height: 1.9; }
.prize-row.first .prize-level { color: #c98f10; }
.prize-row.second .prize-level { color: #8492ab; }
.prize-row.third .prize-level { color: #bf7546; }

/* 结果弹层 + 特效 */
.scratch-result-panel { position: relative; text-align: center; overflow: hidden; transition: background 0.4s ease, box-shadow 0.4s ease; }
.scratch-result-panel.win {
  background: linear-gradient(160deg, #fffdf5, #fff0d6);
  box-shadow: 0 20px 70px rgba(230, 175, 60, 0.35);
  animation: resultPop 0.55s cubic-bezier(0.22, 1.4, 0.4, 1) both;
}
.scratch-result-panel.win.level-1 { box-shadow: 0 20px 80px rgba(240, 180, 40, 0.5); }
.scratch-result-panel.lose {
  background: linear-gradient(160deg, #f7f4f5, #ece5e8);
  animation: resultSink 0.6s ease both;
}
.scratch-result-deco { font-size: 48px; margin-bottom: 10px; }
.scratch-result-panel.win .scratch-result-deco { animation: decoBounce 1s ease infinite; }
.scratch-result-title { font-family: var(--serif); font-size: 25px; letter-spacing: 2px; margin: 0 0 12px; }
.scratch-result-panel.win .scratch-result-title { color: #c98f10; }
.scratch-result-panel.lose .scratch-result-title { color: #8d7a82; }
.scratch-result-text { color: var(--muted); font-size: 14px; line-height: 1.9; margin: 0; }

@keyframes resultPop {
  0% { opacity: 0; transform: scale(0.82) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes resultSink {
  0% { opacity: 0; transform: translateY(-18px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes decoBounce {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-9px) rotate(4deg); }
}

/* 撒花 */
.confetti-layer { position: fixed; inset: 0; pointer-events: none; z-index: 9999; overflow: hidden; }
.confetti-piece {
  position: absolute; top: -24px; width: 9px; height: 15px; border-radius: 2px; opacity: 0;
  animation-name: confettiFall; animation-timing-function: linear; animation-fill-mode: forwards;
}
@keyframes confettiFall {
  0% { opacity: 1; transform: translateY(0) rotate(0); }
  100% { opacity: 0; transform: translateY(105vh) rotate(760deg); }
}
/* ---------- 通用区块 ---------- */
.section { max-width: 1060px; margin: 0 auto; padding: 100px 24px; }
.section-heading { text-align: center; margin-bottom: 56px; }
.section-kicker {
  font-size: 11px; letter-spacing: 4px; color: var(--pink); font-weight: 700; margin: 0 0 12px;
}
.section-heading h2, .letter-card h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: 3px;
  margin: 0 0 12px;
}
.section-sub { color: var(--muted); font-size: 14px; margin: 0; letter-spacing: 0.5px; }

/* ---------- 我们的故事：情书 ---------- */
.story-page {
  background: linear-gradient(180deg, #fff6f4 0%, #ffeaee 26%, #ffe0e9 55%, #f9dcef 80%, #efe3fb 100%);
}
.ambient-3 {
  width: 340px; height: 340px; top: 22%; right: -150px;
  background: #ffd9a8; animation: float 16s ease-in-out infinite;
}
.ambient-4 {
  width: 380px; height: 380px; top: 58%; left: -170px;
  background: #d7bcff; animation: float 20s ease-in-out infinite reverse;
}
.ambient-5 {
  width: 260px; height: 260px; top: 82%; left: 40%;
  background: #ffe9a6; opacity: 0.4; animation: float 13s ease-in-out infinite 2s;
}

.love-letter {
  position: relative; max-width: 740px; margin: 0 auto;
  padding: 58px 56px 46px; border-radius: 30px; overflow: hidden;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(255, 236, 200, 0.5), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 246, 249, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 26px 80px rgba(190, 100, 130, 0.2), 0 0 0 8px rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.love-letter::before {
  content: ""; position: absolute; inset: 12px;
  border: 1px solid rgba(217, 100, 122, 0.2); border-radius: 21px;
  pointer-events: none;
}
/* 缓慢扫过的柔光 */
.ll-shimmer {
  position: absolute; top: -20%; bottom: -20%; left: -40%; width: 34%;
  background: linear-gradient(100deg, transparent, rgba(255, 236, 170, 0.32), rgba(255, 214, 228, 0.4), transparent);
  transform: skewX(-18deg); pointer-events: none;
  animation: llShimmer 7.5s ease-in-out infinite;
}
@keyframes llShimmer {
  0% { left: -45%; opacity: 0; }
  18% { opacity: 1; }
  60% { opacity: 0.85; }
  100% { left: 115%; opacity: 0; }
}

/* 逐段入场 */
.ll {
  opacity: 0; transform: translateY(26px); filter: blur(8px);
  transition: opacity 1s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1), filter 1s ease;
}
.ll.in { opacity: 1; transform: translateY(0); filter: blur(0); }

.ll-para {
  font-family: var(--serif);
  font-size: clamp(15px, 1.9vw, 18px);
  line-height: 2.15; letter-spacing: 1px;
  color: var(--ink); text-align: justify; text-indent: 2em;
  margin: 0 0 20px;
}
.ll-to {
  font-family: var(--serif); font-size: clamp(24px, 3.2vw, 34px); font-weight: 600;
  color: var(--pink-deep); text-align: center; letter-spacing: 8px;
  margin: 0 0 30px;
}
.ll-greet { text-indent: 0; }
.ll-deco { text-align: center; color: var(--pink); font-size: 13px; letter-spacing: 12px; margin: 30px 0 22px; text-indent: 0; }
.ll-deco.in { animation: heartbeat 2.4s ease-in-out infinite; }
.ll-sign {
  font-family: var(--serif); font-size: 20px; color: var(--pink-deep);
  text-align: right; letter-spacing: 2px; margin: 0;
}
.ll-sign.in { animation: signIn 1.2s cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes signIn {
  0% { opacity: 0; transform: translateY(14px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* 重点句：粉金渐变流光 */
.ll-hl {
  font-style: normal; font-weight: 700;
  background: linear-gradient(90deg, #e0557a, #e8923a, #c86bd6, #e0557a);
  background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: hlFlow 5s linear infinite;
}
@keyframes hlFlow { to { background-position: 260% 0; } }

/* ---------- 爱心特效 ---------- */
.hearts-layer { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.hearts-layer.back { z-index: 1; }   /* 持续飘落的爱心：在信纸后面，不挡字 */
.hearts-layer.front { z-index: 3; }  /* 点击炸开的爱心：在最上层 */
.float-heart {
  position: absolute; bottom: -36px; left: var(--x); font-size: var(--s); color: var(--c);
  line-height: 1; opacity: 0; will-change: transform, opacity;
  animation: heartRise var(--d) linear var(--delay, 0s) forwards;
  filter: drop-shadow(0 2px 8px rgba(233, 110, 150, 0.35));
}
@keyframes heartRise {
  0% { opacity: 0; transform: translate(0, 0) scale(0.5) rotate(0deg); }
  10% { opacity: var(--o); }
  80% { opacity: var(--o); }
  100% { opacity: 0; transform: translate(var(--dx), -108vh) scale(1.05) rotate(var(--rot)); }
}
.pop-heart {
  position: absolute; left: 0; top: 0; font-size: var(--s); color: var(--c); line-height: 1;
  will-change: transform, opacity;
  animation: heartPop 1.25s cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
}
@keyframes heartPop {
  0% { opacity: 0; transform: translate(var(--px), var(--py)) scale(0.2) rotate(0deg); }
  14% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(var(--px) + var(--dx)), calc(var(--py) - var(--dy))) scale(1.15) rotate(var(--rot)); }
}
@media (prefers-reduced-motion: reduce) {
  .hearts-layer, .ll-shimmer { display: none; }
  .ll { opacity: 1; transform: none; filter: none; }
}

/* ---------- 照片墙 ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.photo-frame {
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed rgba(217, 100, 122, 0.35);
  box-shadow: var(--shadow-soft);
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.photo-frame:hover {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: var(--shadow);
  border-color: var(--pink);
}
.photo-placeholder {
  height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(253, 234, 240, 0.7), rgba(255, 255, 255, 0.35));
  color: var(--pink);
  font-size: 14px;
  letter-spacing: 1px;
}
.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.photo-frame:hover img { transform: scale(1.06); }
.placeholder-icon { font-size: 34px; opacity: 0.75; margin-bottom: 4px; }
.photo-placeholder small { color: var(--muted); font-size: 11px; letter-spacing: 0.5px; }

/* ---------- 想对你说 ---------- */
.letter-section { padding-bottom: 120px; }
.letter-card {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
  padding: 70px 60px 60px;
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
}
.letter-card::before {
  content: "";
  position: absolute; inset: 10px;
  border: 1px solid rgba(217, 100, 122, 0.16);
  border-radius: 22px;
  pointer-events: none;
}
.letter-deco { color: var(--pink-soft); }
.letter-deco-top { font-size: 26px; margin-bottom: 18px; animation: heartbeat 2s ease-in-out infinite; }
.letter-deco-bottom { margin-top: 28px; font-size: 15px; letter-spacing: 10px; }
.letter-text {
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 19px);
  line-height: 2.2;
  color: var(--ink);
  margin: 28px auto 20px;
  max-width: 600px;
  min-height: 4.4em;
  letter-spacing: 1px;
}
.letter-text::after {
  content: "";
  display: inline-block;
  width: 2px; height: 1em;
  background: var(--pink);
  vertical-align: -0.15em;
  margin-left: 3px;
  animation: blink 1s steps(1) infinite;
}
.letter-text.done::after { display: none; }
.letter-sign { color: var(--pink); font-size: 14px; letter-spacing: 2px; font-family: var(--serif); }

/* ---------- 页脚 ---------- */
.site-footer {
  text-align: center;
  padding: 46px 20px 54px;
  color: var(--pink-deep);
  border-top: 1px solid rgba(217, 100, 122, 0.12);
  background: rgba(255, 255, 255, 0.25);
}
.site-footer p { margin: 0 0 8px; font-size: 14px; letter-spacing: 1px; }
.footer-small { color: var(--muted); font-size: 11px; letter-spacing: 2px; }

/* ---------- 设置面板 ---------- */
.settings-overlay {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(74, 44, 56, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: opacity 0.3s ease;
}
.settings-overlay.hidden { opacity: 0; pointer-events: none; }
.settings-panel {
  width: 100%; max-width: 420px;
  background: var(--white);
  border-radius: 24px;
  padding: 30px;
  box-shadow: 0 24px 70px rgba(74, 44, 56, 0.25);
  transform: translateY(0) scale(1);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.settings-overlay.hidden .settings-panel { transform: translateY(20px) scale(0.96); }
.settings-head { display: flex; align-items: center; justify-content: space-between; }
.settings-head h3 { font-family: var(--serif); font-size: 21px; margin: 0; letter-spacing: 1px; }
.close-btn {
  border: none; background: var(--pink-lighter); color: var(--pink-deep);
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 21px; line-height: 1; cursor: pointer;
}
.settings-hint { font-size: 12px; color: var(--muted); margin: 10px 0 22px; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; letter-spacing: 1px; }
.field input {
  width: 100%; padding: 11px 14px;
  border: 1px solid #f0d9e0; border-radius: 12px;
  font-size: 14px; color: var(--ink);
  background: #fffafb;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.field input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px rgba(217, 100, 122, 0.12); }
.settings-actions { display: flex; gap: 12px; margin-top: 24px; }
.btn {
  flex: 1; padding: 12px; border-radius: 12px;
  font-size: 14px; cursor: pointer; letter-spacing: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { border: none; background: var(--pink); color: white; box-shadow: 0 8px 20px rgba(217, 100, 122, 0.28); }
.btn-ghost { border: 1px solid #f0d9e0; background: white; color: var(--muted); }

/* ---------- 动画关键帧 ---------- */
@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.22); }
  30% { transform: scale(1); }
  45% { transform: scale(1.16); }
  60% { transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(25px, -20px); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(7px); opacity: 1; }
}
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 6px rgba(217, 100, 122, 0.12); }
  50% { box-shadow: 0 0 0 11px rgba(217, 100, 122, 0.04); }
}
@keyframes tick {
  0% { transform: scale(0.94); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- 滚动入场 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  animation: revealIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes revealIn {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .site-header { flex-wrap: wrap; gap: 12px; padding-bottom: 12px; }
  .nav-links {
    display: flex;
    order: 3;
    width: 100%;
    justify-content: center;
    gap: 20px;
    padding-top: 10px;
    border-top: 1px solid rgba(217, 100, 122, 0.12);
  }
  .nav-links a { font-size: 12px; }
  .entry-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .letter-card { padding: 54px 32px 44px; }
  .win-card { padding: 12px 10px 14px; }
  .win-card-reveal { height: 60px; }
  .scratch-area { height: 260px; }
  .scratch-num { font-size: 38px; }
}
@media (max-width: 600px) {
  .site-header { padding: 14px 5vw 12px; }
  .brand { font-size: 16px; }
  .nav-links { gap: 12px; }
  .nav-links a { font-size: 11px; }
  .entry-section { padding: 4px 16px 26px; }
  .entry-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .entry-grid.single { grid-template-columns: 1fr; }
  .entry-card { padding: 20px 14px; border-radius: 18px; }
  .entry-icon { width: 44px; height: 44px; font-size: 21px; margin-bottom: 10px; }
  .entry-card h3 { font-size: 16px; letter-spacing: 1px; margin-bottom: 6px; }
  .entry-card p { font-size: 11px; line-height: 1.6; margin-bottom: 10px; }
  .entry-more { font-size: 11px; letter-spacing: 1px; }
  .page-header { padding-top: 112px; }
  .page-names { margin-top: 10px; }
  .hero { padding: 110px 18px 42px; }
  .eyebrow { font-size: 9px; letter-spacing: 2px; gap: 8px; margin-bottom: 18px; }
  .eyebrow-line { width: 20px; }
  .since-line { line-height: 1.8; margin-bottom: 24px; }
  .timer { padding: 22px 26px; width: 100%; max-width: 340px; margin-bottom: 18px; }
  .timer-number { font-size: 76px; }
  .section { padding: 28px 20px; }
  .section-heading { margin-bottom: 28px; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .photo-frame { aspect-ratio: 1; }
  .letter-section { padding-bottom: 0; }
  .letter-card { padding: 34px 22px 30px; }
  .letter-card::before { inset: 6px; }
  .love-letter { padding: 40px 24px 32px; border-radius: 24px; }
  .love-letter::before { inset: 8px; border-radius: 17px; }
  .ll-para { font-size: 15px; line-height: 2.08; letter-spacing: 0.6px; margin-bottom: 16px; }
  .ll-to { letter-spacing: 6px; margin-bottom: 24px; }
  .ll-deco { margin: 24px 0 18px; }
  .ll-sign { font-size: 18px; }
  .letter-deco-bottom { margin-top: 18px; }
  .letter-text { margin: 18px auto 14px; line-height: 2; }
  .settings-panel { padding: 24px; }
  .site-footer { padding: 30px 20px 34px; }
  .win-card-row { gap: 8px; }
  .win-card { padding: 10px 6px 12px; border-radius: 14px; }
  .win-card-label { font-size: 11px; letter-spacing: 1px; margin-bottom: 7px; }
  .win-card-reveal { height: 52px; border-radius: 10px; }
  .win-card-num { font-size: 32px; }
  .scratch-section { gap: 22px; }
  .zone-title { font-size: 18px; margin-bottom: 14px; }
  .zone-title small { display: block; margin: 6px 0 0; }
  .scratch-area { width: 96vw; height: 240px; border-radius: 18px; }
  .scratch-under { padding: 8px; }
  .scratch-num { font-size: 30px; }
  .scratch-tip { margin: 14px 0 12px; }
  .scratch-actions-wrap { width: 96vw; padding-right: 50px; }
  .scratch-actions { flex-wrap: nowrap; align-items: stretch; gap: 8px; }
  /* 按钮文字：始终单行，字号随屏宽收缩，不够时由脚本横向压缩 */
  .scratch-actions .btn {
    min-width: 0; white-space: nowrap; overflow: hidden;
    font-size: clamp(10px, 4.2vw, 13px); letter-spacing: 0; line-height: 1.35;
    padding: 12px 6px;
  }
  .scratch-submit { min-width: 0; flex-grow: 1.5; }
  .records-btn { right: 0; }
  .records-icon { width: 34px; height: 34px; font-size: 16px; }
  .records-label { font-size: 10px; }
  .prize-row { flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 18px; }
  .prize-level { flex: none; }
  .prize-items { font-size: 12px; }
}

/* 减少动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}