/* ============================================
   米柚星球 · 全站样式
   改主题色：只改下面 :root 里的 --primary
   ============================================ */

:root {
  /* 主题色 · 粉色为主、橙黄辅助（小柚子专属配色）
     改主题色：只改下面这一组变量 */
  --primary:      #FF7FA8;  /* 主粉 · 暖粉樱花 */
  --primary-soft: #FFC9DC;  /* 浅粉 · 卡片底色 */
  --accent:       #FFB347;  /* 辅助橙黄 · 强调元素 */
  --accent-soft:  #FFE0A8;  /* 浅橙 · 装饰光晕 */
  --cream:        #FFF5F7;  /* 奶油粉 · 背景 */
  --text:         #5C3B4A;  /* 深玫红棕 · 正文 */
  --text-soft:    #9B7080;  /* 浅玫棕 · 副文本 */
  --lock:         #D8C8CE;  /* 灰粉 · 锁定卡片 */
  --shadow:       0 8px 24px rgba(255, 127, 168, 0.18);

  /* 字号 */
  --fs-huge:   clamp(48px, 12vw, 96px);
  --fs-large:  clamp(28px, 5vw, 40px);
  --fs-base:   clamp(15px, 3.5vw, 18px);
  --fs-small:  13px;

  /* 间距 */
  --gap-sm: 12px;
  --gap-md: 24px;
  --gap-lg: 48px;
}

/* ============================================
   字体：霞鹜文楷 CDN
   ============================================ */
@import url('https://chinese-fonts-cdn.deno.dev/packages/lxgwwenkai/dist/LXGWWenKai-Regular/result.css');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'LXGW WenKai', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--cream) 0%, var(--primary-soft) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body.is-shell-embedded .home,
body.is-shell-embedded .timeline,
body.is-shell-embedded .event-page,
body.is-shell-embedded .quiz,
body.is-shell-embedded .letter-page {
  padding-bottom: 130px;
}

body.is-shell-embedded .unlock-footer {
  padding-bottom: 120px;
}

button {
  font-family: inherit;
  border: none;
  cursor: pointer;
  background: none;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   首页 · index.html
   ============================================ */

.home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: var(--gap-lg) var(--gap-md);
  position: relative;
  z-index: 10;
}

/* ============================================
   背景 IP 贴纸装饰层（4 个角落 + 飘动小元素）
   ============================================ */

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

.sticker {
  position: absolute;
  width: 120px;
  height: 120px;
  opacity: 0.85;
  filter: saturate(0.9) drop-shadow(2px 3px 6px rgba(255, 127, 168, 0.25));
  animation: float-loose 6s ease-in-out infinite;
}

/* 4 个角落定位 + 各自旋转角度 + 动画相位错开 */
.sticker--tl { top: 5%;    left: 5%;    --r: -3deg; animation-delay: 0s; }
.sticker--tr { top: 8%;    right: 5%;   --r:  2deg; animation-delay: -1.5s; }
.sticker--bl { bottom: 12%; left: 5%;   --r:  3deg; animation-delay: -3s; }
.sticker--br { bottom: 8%; right: 5%;   --r: -2deg; animation-delay: -4.5s; }

/* 中等贴纸 (80px)，散布在边缘避开主角 */
.sticker--mid {
  width: 80px;
  height: 80px;
  opacity: 0.75;
  animation-duration: 7s;
}
.sticker--small {
  width: 64px;
  height: 64px;
  opacity: 0.65;
  animation-duration: 9s;
}

.sticker--m1 { top: 16%;   left: 22%;  --r: -5deg; animation-delay: -0.8s; }
.sticker--m2 { top: 19%;   right: 25%; --r:  4deg; animation-delay: -2.2s; }
.sticker--m3 { top: 55%;   left: 4%;   --r:  2deg; animation-delay: -1.2s; }
.sticker--m4 { top: 50%;   right: 4%;  --r: -4deg; animation-delay: -3.8s; }
.sticker--m5 { bottom: 25%; left: 22%; --r:  3deg; animation-delay: -2.8s; }
.sticker--m6 { bottom: 28%; right: 22%; --r: -3deg; animation-delay: -5.2s; }
.sticker--m7 { bottom: 4%; left: 45%;  --r:  2deg; animation-delay: -3.5s; }

@keyframes float-loose {
  0%, 100% { transform: translateY(0)     rotate(var(--r, 0deg)); }
  50%      { transform: translateY(-12px) rotate(calc(var(--r, 0deg) + 1deg)); }
}

/* IP 形象占位符（Day 3 替换为真实 PNG 后删除 placeholder 类） */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: white;
  border-radius: 24px;
  letter-spacing: 1px;
  text-align: center;
  border: 2px dashed rgba(255, 255, 255, 0.6);
}
.placeholder--pink   { background: linear-gradient(135deg, #FFB6D9, #FF7FA8); }
.placeholder--blue   { background: linear-gradient(135deg, #B6D6FF, #7FA8FF); }
.placeholder--orange { background: linear-gradient(135deg, #FFD8A8, #FFB347); }
.placeholder--purple { background: linear-gradient(135deg, #FFC9DC, #FF9DC4); }

/* 飘动小元素（CSS 纯装饰，永远在背景层） */
.floater {
  position: absolute;
  font-size: 28px;
  opacity: 0.7;
  animation: floater-drift 12s ease-in-out infinite;
  user-select: none;
}
.floater--1  { top:  8%; left: 38%; font-size: 22px; animation-delay: 0s;    }
.floater--2  { top: 12%; right: 18%; font-size: 20px; animation-delay: -1.5s; }
.floater--3  { top: 30%; left: 13%; font-size: 24px; animation-delay: -3s;   }
.floater--4  { top: 28%; right: 38%; font-size: 18px; animation-delay: -4.5s; }
.floater--5  { top: 42%; left: 30%; font-size: 22px; animation-delay: -6s;   }
.floater--6  { top: 45%; right: 28%; font-size: 19px; animation-delay: -7.5s; }
.floater--7  { top: 62%; left: 12%; font-size: 26px; animation-delay: -9s;   }
.floater--8  { top: 65%; right: 15%; font-size: 22px; animation-delay: -10.5s; }
.floater--9  { top: 78%; left: 30%; font-size: 24px; animation-delay: -1s;   }
.floater--10 { top: 82%; right: 35%; font-size: 20px; animation-delay: -3.5s; }
.floater--11 { top: 15%; left: 60%; font-size: 18px; animation-delay: -5s;   }
.floater--12 { top: 38%; left: 48%; font-size: 28px; opacity: 0.45; animation-delay: -6.5s; }
.floater--13 { top: 22%; right: 50%; font-size: 24px; opacity: 0.6; animation-delay: -8s;   }
.floater--14 { bottom: 18%; left: 50%; font-size: 22px; animation-delay: -2.5s; }
.floater--15 { top: 70%; left: 55%; font-size: 20px; animation-delay: -11s;  }
.floater--16 { top: 5%; left: 18%; font-size: 18px; animation-delay: -4s;   }

@keyframes floater-drift {
  0%, 100% { transform: translate(0, 0)       rotate(0deg);   opacity: 0.7; }
  25%      { transform: translate(15px, -20px) rotate(8deg);  opacity: 0.9; }
  50%      { transform: translate(-10px, -10px) rotate(-5deg); opacity: 0.6; }
  75%      { transform: translate(8px, -25px)  rotate(10deg); opacity: 0.85; }
}

.home__brand {
  margin-top: var(--gap-md);
  margin-bottom: var(--gap-sm);
  text-align: center;
  position: relative;
  z-index: 20;          /* 标题永远在主角上层，保险层级 */
}

.home__brand-tag {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  font-size: var(--fs-small);
  color: var(--text-soft);
  letter-spacing: 2px;
  backdrop-filter: blur(8px);
}

.home__brand-title {
  font-size: var(--fs-large);
  font-weight: 800;
  color: var(--primary);
  margin-top: var(--gap-sm);
  letter-spacing: 4px;
}

.home__brand-sub {
  font-size: var(--fs-small);
  color: var(--text-soft);
  margin-top: 8px;
  letter-spacing: 1px;
}

/* 米柚星球（中央 IP）· 粉色光晕作为"星球氛围"，懒羊羊作为主角 */
.planet {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%,
    #FFE3EC 0%,
    var(--primary) 55%,
    #E6588A 100%);
  box-shadow:
    0 0 60px rgba(255, 179, 71, 0.45),
    0 0 100px rgba(255, 127, 168, 0.35),
    inset -10px -10px 40px rgba(0, 0, 0, 0.08);
  animation: planet-float 4s ease-in-out infinite;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  z-index: 5;
  margin-top: 40px;       /* 主角与标题保持安全距离，浮动到最高也不碰字 */
}

/* 主角懒羊羊（Day 3 替换为 PNG，目前 emoji 占位） */
.planet__mascot {
  position: absolute;
  width: 220px;
  height: 220px;
  object-fit: contain;
  z-index: 6;
  animation: mascot-bob 3s ease-in-out infinite;
  filter: drop-shadow(2px 4px 8px rgba(0, 0, 0, 0.15));
}

.planet__mascot-fallback {
  font-size: 140px;
  z-index: 6;
  animation: mascot-bob 3s ease-in-out infinite;
  display: inline-block;
}

/* 王冠装饰 */
.planet__crown {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 56px;
  z-index: 7;
  animation: crown-bounce 2s ease-in-out infinite;
}

.planet::before,
.planet::after {
  content: '';
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  animation: orbit 8s linear infinite;
}

.planet::before {
  top: -20px;
  left: 50%;
  background: var(--accent);  /* 橙黄小卫星 */
  animation-delay: 0s;
}

.planet::after {
  bottom: -20px;
  right: 20%;
  background: var(--primary-soft);  /* 浅粉小卫星 */
  animation-delay: -4s;
}

@keyframes planet-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-15px); }
}

@keyframes mascot-bob {
  0%, 100% { transform: translateY(0)    rotate(-2deg); }
  50%      { transform: translateY(-8px) rotate(2deg); }
}

@keyframes crown-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0)    scale(1); }
  50%      { transform: translateX(-50%) translateY(-6px) scale(1.08); }
}

@keyframes orbit {
  0%   { transform: rotate(0deg) translateX(160px) rotate(0deg); }
  100% { transform: rotate(360deg) translateX(160px) rotate(-360deg); }
}

/* 倒计时 */
.countdown {
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  padding: var(--gap-md) var(--gap-lg);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  margin: var(--gap-md) 0;
}

.countdown__label {
  font-size: var(--fs-small);
  color: var(--text-soft);
  letter-spacing: 2px;
}

.countdown__numbers {
  margin-top: 8px;
  font-size: var(--fs-large);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1px;
}

.countdown__numbers span {
  font-size: var(--fs-huge);
  margin: 0 4px;
}

/* 数字仪表盘 · 6 张小卡片 */
.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: var(--gap-md) auto;
  padding: 0 var(--gap-md);
  z-index: 5;
  position: relative;
}

.stat {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  padding: 14px 10px;
  text-align: center;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  transition: transform 0.25s;
}
.stat:hover { transform: translateY(-3px); }

.stat__num {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 1px;
  line-height: 1;
}

.stat__unit {
  font-size: 13px;
  margin-left: 3px;
  color: var(--text-soft);
  font-weight: 500;
}

.stat__label {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 6px;
  letter-spacing: 1px;
}

/* 三入口按钮 */
.home__entries {
  display: flex;
  gap: var(--gap-md);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--gap-lg);
}

.entry-btn {
  padding: 14px 28px;
  background: var(--primary);
  color: white;
  border-radius: 999px;
  font-size: var(--fs-base);
  font-weight: 700;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.entry-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 159, 69, 0.35);
}

.entry-btn--ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--primary);
  backdrop-filter: blur(8px);
}

/* ============================================
   落花特效（effects.js 控制 DOM 生成）
   ============================================ */
.petal-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.petal {
  position: absolute;
  top: -40px;
  animation: petal-fall linear infinite;
  user-select: none;
  filter: drop-shadow(0 2px 4px rgba(255, 127, 168, 0.2));
}

@keyframes petal-fall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0;
  }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% {
    transform: translateY(110vh) rotate(540deg) translateX(60px);
    opacity: 0;
  }
}

/* ============================================
   隐藏彩蛋 · 弹出气泡 + 烟花
   ============================================ */
.easter-popup {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background: linear-gradient(135deg, #FFFFFF, var(--primary-soft));
  color: var(--text);
  padding: 16px 28px;
  border-radius: 999px;
  box-shadow: 0 12px 32px rgba(255, 127, 168, 0.4);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
}
.easter-popup--show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.fireworks-layer {
  position: fixed;
  inset: 0;
  background: rgba(255, 245, 247, 0.4);
  backdrop-filter: blur(2px);
  z-index: 9998;
  pointer-events: none;
  overflow: hidden;
  animation: fade-in-out 4s ease-in-out forwards;
}
@keyframes fade-in-out {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; }
}

.fireworks-text {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: clamp(28px, 6vw, 56px);
  font-weight: 800;
  color: #E91E63;
  text-shadow:
    0 0 20px rgba(255, 127, 168, 0.6),
    0 4px 16px rgba(255, 127, 168, 0.4);
  letter-spacing: 4px;
  animation: text-pop 4s ease-out forwards;
}
@keyframes text-pop {
  0%   { transform: translate(-50%, -50%) scale(0)   rotate(-10deg); }
  30%  { transform: translate(-50%, -50%) scale(1.2) rotate(5deg);   }
  50%  { transform: translate(-50%, -50%) scale(1.0) rotate(0deg);   }
  100% { transform: translate(-50%, -50%) scale(1.0) rotate(0deg);   }
}

.firework-heart {
  position: absolute;
  animation: heart-burst ease-out forwards;
  filter: drop-shadow(0 4px 8px rgba(255, 127, 168, 0.5));
}
@keyframes heart-burst {
  0%   { transform: scale(0)   translateY(0)    rotate(0deg);   opacity: 0; }
  20%  { transform: scale(1.4) translateY(-20px) rotate(15deg); opacity: 1; }
  100% { transform: scale(0.8) translateY(-120px) rotate(45deg); opacity: 0; }
}

/* ============================================
   unlock.html · 13 张卡片列表
   ============================================ */

.unlock-header {
  position: relative;
  z-index: 10;
  padding: var(--gap-md) var(--gap-md) var(--gap-sm);
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.back-btn {
  display: inline-block;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-soft);
  border-radius: 999px;
  font-size: var(--fs-small);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
  margin-bottom: var(--gap-md);
  transition: transform 0.2s;
}
.back-btn:hover { transform: translateX(-3px); }

.unlock-title {
  font-size: var(--fs-large);
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.unlock-progress {
  font-size: var(--fs-small);
  color: var(--text-soft);
  letter-spacing: 1px;
}
.unlock-progress span {
  color: var(--primary);
  font-weight: 800;
  font-size: 18px;
  margin: 0 4px;
}

.unlock-grid {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--gap-md);
  padding: var(--gap-md);
  max-width: 1100px;
  margin: 0 auto;
}

/* 单张卡片 */
.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px rgba(255, 127, 168, 0.28); }

.card__day-label {
  display: inline-block;
  background: var(--primary);
  color: white;
  font-weight: 800;
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.card__avatar {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-soft), var(--cream));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: inset 0 -6px 12px rgba(255, 127, 168, 0.18);
}
.card__avatar img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(1px 2px 4px rgba(0, 0, 0, 0.1));
}

.card__date {
  font-size: 13px;
  color: var(--text-soft);
  letter-spacing: 1px;
}

.card__title {
  font-size: 13px;
  color: var(--text);
  margin-top: 4px;
  font-weight: 600;
  line-height: 1.3;
  /* 限制最多 2 行 */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 状态：未解锁 */
.card--locked {
  background: rgba(220, 220, 220, 0.45);
  cursor: not-allowed;
}
.card--locked .card__day-label { background: var(--lock); }
.card--locked .card__avatar    { background: linear-gradient(135deg, #E8E0E3, #F2EDEF); }
.card--locked .card__avatar img { filter: grayscale(0.9) opacity(0.45); }
.card--locked .card__title     { color: var(--text-soft); }
.card--locked:hover            { transform: none; box-shadow: var(--shadow); }

.card__lock-overlay {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* 状态：今天 */
.card--grad {
  background: linear-gradient(135deg, #FFF5F7, #FFD8E4);
  border: 2px solid var(--primary);
  animation: card-glow 2.4s ease-in-out infinite;
}
.card--grad .card__day-label {
  background: var(--accent);
}
.card__today-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 1px;
}

@keyframes card-glow {
  0%, 100% { box-shadow: 0 8px 24px rgba(255, 127, 168, 0.25); }
  50%      { box-shadow: 0 8px 32px rgba(255, 179, 71, 0.5), 0 0 16px rgba(255, 127, 168, 0.3); }
}

/* 状态：已读 */
.card__read-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #66C28F;
  color: white;
  font-size: 11px;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(102, 194, 143, 0.4);
}

.unlock-footer {
  text-align: center;
  padding: var(--gap-lg) var(--gap-md);
  color: var(--text-soft);
  font-size: var(--fs-small);
  letter-spacing: 1px;
  position: relative;
  z-index: 10;
}

/* ============================================
   quiz.html · 通关问答
   ============================================ */
.quiz {
  position: relative;
  z-index: 10;
  max-width: 640px;
  margin: 0 auto;
  padding: var(--gap-md);
}
.quiz__header { text-align: center; margin-bottom: var(--gap-md); }
.quiz__title {
  font-size: var(--fs-large);
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: 2px;
}
.quiz__sub {
  font-size: var(--fs-small);
  color: var(--text-soft);
  line-height: 1.6;
}

.quiz__progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: var(--gap-md);
}
.quiz__progress-bar {
  flex: 1;
  height: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.quiz__progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.quiz__progress-text {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 600;
  letter-spacing: 1px;
}
.quiz__progress-text span:first-child {
  color: var(--primary);
  font-size: 18px;
  font-weight: 800;
}

.quiz__card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  padding: var(--gap-md);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.quiz__q-num {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-weight: 800;
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.quiz__q-text {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: var(--gap-md);
}

.quiz__options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz__option {
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 2px solid var(--primary-soft);
  border-radius: 14px;
  text-align: left;
  font-size: 15px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.quiz__option:hover:not(:disabled) {
  background: var(--primary-soft);
  transform: translateX(4px);
  border-color: var(--primary);
}
.quiz__option:disabled { cursor: not-allowed; opacity: 0.6; }

.quiz__option--correct {
  background: linear-gradient(135deg, #B5E6C3, #66C28F) !important;
  color: white !important;
  border-color: #66C28F !important;
  animation: correct-bounce 0.5s ease-out;
}
@keyframes correct-bounce {
  0%   { transform: scale(1);   }
  40%  { transform: scale(1.05); }
  100% { transform: scale(1);   }
}

.quiz__option--wrong {
  background: linear-gradient(135deg, #FFB6C1, #FF7F9C) !important;
  color: white !important;
  border-color: #FF7F9C !important;
  animation: wrong-shake 0.5s ease-out;
}
@keyframes wrong-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-6px); }
  75%      { transform: translateX(6px); }
}

.quiz__hint {
  margin-top: 16px;
  padding: 12px 16px;
  background: rgba(255, 220, 168, 0.5);
  border-radius: 12px;
  font-size: 14px;
  color: var(--text-soft);
}

.quiz__feedback { margin-top: 16px; text-align: center; font-size: 15px; font-weight: 600; }
.feedback-correct { color: #66C28F; }
.feedback-wrong   { color: #E91E63; }

/* 通关结果页 */
.quiz__result {
  text-align: center;
  padding: var(--gap-lg) var(--gap-md);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  animation: result-fadein 0.6s ease-out;
}
@keyframes result-fadein {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.quiz__result-trophy {
  font-size: 80px;
  margin-bottom: 16px;
  animation: trophy-dance 2s ease-in-out infinite;
}
@keyframes trophy-dance {
  0%, 100% { transform: rotate(-5deg) scale(1); }
  50%      { transform: rotate(5deg)  scale(1.1); }
}
.quiz__result-title {
  font-size: 28px;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: 2px;
}
.quiz__result-text {
  font-size: 16px;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 8px;
}
.quiz__result-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--gap-md);
  font-size: 17px;
  padding: 16px 32px;
}

/* ============================================
   时间轴 · unlock.html（异地恋星河）
   ============================================ */

.timeline {
  position: relative;
  z-index: 10;
  width: min(1460px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 12px 0 60px;
}
.timeline__backdrop {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 0;
}
.timeline__orbit {
  width: 200px;
  height: 100%;
  overflow: visible;
}
.timeline__glow {
  fill: none;
  stroke-width: 14;
  stroke: url(#orbitGlow);
  filter: url(#orbitBlur);
  opacity: 0.42;
}
.timeline__path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke: url(#orbitStroke);
}

@keyframes orbit-spark {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50%      { opacity: 1;    transform: scale(1.1); }
}

.tl-node {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
  align-items: start;
  margin-bottom: 18px;
}

.tl-node__dot {
  position: sticky;
  top: 92px;
  grid-column: 2 / 3;
  justify-self: center;
  margin-top: 72px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFF, var(--primary-soft));
  border: 3px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 14px rgba(255, 127, 168, 0.36);
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tl-node__dot span {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}
.tl-node__dot--final {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.96);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 22px rgba(255, 179, 71, 0.5);
  font-size: 16px;
}

.tl-card {
  width: 100%;
  color: inherit;
  text-decoration: none;
  display: grid;
  align-items: start;
  gap: 10px;
}
.tl-node--left .tl-card {
  grid-column: 1 / 3;
  grid-template-columns: minmax(0, 430px) 300px;
  margin-right: 18px;
  justify-self: end;
}
.tl-node--right .tl-card {
  grid-column: 2 / 4;
  grid-template-columns: 300px minmax(0, 430px);
  margin-left: 18px;
  justify-self: start;
}
.tl-card--text-only {
  max-width: 300px;
  display: block;
}
.tl-node--left .tl-card--text-only {
  justify-self: end;
}
.tl-node--right .tl-card--text-only {
  justify-self: start;
}
.tl-card__copy {
  position: relative;
  width: 100%;
  min-height: 0;
  padding: 16px 16px 42px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 34px rgba(255, 127, 168, 0.12);
  backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.tl-card__copy::before {
  content: '';
  position: absolute;
  inset: auto -48px -62px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 220, 0.7) 0%, rgba(255, 201, 220, 0) 72%);
}
.tl-card__copy::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.32), transparent 100%);
  pointer-events: none;
}
.tl-card:hover .tl-card__copy {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(255, 127, 168, 0.16);
}
.tl-node--left .tl-card__copy { order: 2; }
.tl-node--right .tl-card__copy { order: 1; }
.tl-card--text-only .tl-card__copy {
  width: 100%;
  min-height: 0;
}
.tl-card__meta {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.tl-card__date {
  font-size: 11px;
  color: var(--text-soft);
  letter-spacing: 1px;
}
.tl-card__title {
  position: relative;
  z-index: 2;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 6px;
}
.tl-card__body {
  position: relative;
  z-index: 2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.65;
  color: var(--text-soft);
}
.tl-card__read {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #66C28F;
  color: white;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(102, 194, 143, 0.25);
}
.tl-card__final-tag {
  position: absolute;
  top: 12px;
  left: 18px;
  z-index: 3;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
}
.tl-card__stamp {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 2;
  width: 30px;
  height: 30px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 14px 30px rgba(255, 127, 168, 0.14);
}
.tl-card__stamp img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.tl-card__cluster {
  position: relative;
  min-width: 0;
  display: grid;
  gap: 6px;
  grid-auto-flow: dense;
  align-content: start;
  align-items: stretch;
}
.tl-node--left .tl-card__cluster { order: 1; }
.tl-node--right .tl-card__cluster { order: 2; }
.tl-card__cluster--solo {
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: 92px;
}
.tl-card__cluster--pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 72px;
}
.tl-card__cluster--compact-3 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 44px;
}
.tl-card__cluster--compact-4 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 36px;
}
.tl-card__cluster--compact-5 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-auto-rows: 30px;
}
.tl-card__cluster--compact-6 {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: 26px;
}
.tl-card__cluster--manual {
  grid-template-columns: repeat(var(--layout-columns, 5), minmax(0, 1fr));
  grid-auto-rows: var(--layout-row-height, 42px);
  gap: var(--layout-gap, 6px);
}
.tl-shot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  padding: 5px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  grid-column: span var(--col-span, 1);
  grid-row: span var(--row-span, 1);
  box-shadow:
    0 10px 18px rgba(255, 127, 168, 0.12),
    0 6px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}
.tl-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 245, 247, 0.85));
}
.tl-card:hover .tl-shot {
  transform: translateY(-2px);
  box-shadow:
    0 16px 34px rgba(255, 127, 168, 0.18),
    0 10px 22px rgba(0, 0, 0, 0.08);
}
.tl-photo-more {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(78, 45, 58, 0.78);
  color: white;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(78, 45, 58, 0.22);
  backdrop-filter: blur(10px);
}
.photo-label {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 2;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  border-radius: 10px;
  background: rgba(40, 16, 28, 0.72);
  color: #fff;
  font-size: 10px;
  line-height: 1.25;
  word-break: break-all;
  pointer-events: none;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.14);
}
.photo-label--compact {
  left: 6px;
  bottom: 6px;
  font-size: 9px;
  padding: 3px 6px;
  border-radius: 8px;
}
.edit-mode .tl-shot,
.edit-mode .event-memory__frame {
  outline: 1px dashed rgba(255, 127, 168, 0.34);
  outline-offset: 2px;
}
.tl-node--final .tl-card__copy {
  background: linear-gradient(145deg, rgba(255, 246, 249, 0.95), rgba(255, 232, 242, 0.88));
  border: 1px solid rgba(255, 127, 168, 0.26);
}

/* day.html 事件相册页 */
.event-page {
  position: relative;
  z-index: 10;
  width: min(1400px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 24px 0 72px;
}
.event-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}
.event-nav a {
  padding: 12px 22px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-soft);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.event-nav a:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(255, 127, 168, 0.16);
}
.event-nav__spacer {
  width: 112px;
}

.event-legend {
  position: relative;
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 24px 26px 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: 0 24px 56px rgba(255, 127, 168, 0.14);
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.event-legend::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 201, 220, 0.86) 0%, rgba(255, 201, 220, 0) 70%);
}
.event-legend__date {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: var(--text-soft);
  letter-spacing: 2px;
  margin-bottom: 10px;
}
.event-legend__title {
  position: relative;
  z-index: 1;
  font-size: clamp(28px, 4vw, 38px);
  line-height: 1.26;
  margin-bottom: 12px;
  color: var(--primary);
}
.event-legend__body {
  position: relative;
  z-index: 1;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text);
}

.event-memory {
  width: min(1320px, 100%);
  margin: 0 auto;
  display: block;
  column-count: 4;
  column-gap: 14px;
}
.event-memory--solo {
  max-width: 760px;
  column-count: 1;
}
.event-memory--grid-2 {
  column-count: 2;
}
.event-memory--grid-3 {
  column-count: 3;
}
.event-memory--grid-4 {
  column-count: 4;
}
.event-memory--grid-5 {
  column-count: 5;
}
.event-memory--grid-6 {
  column-count: 6;
}
.event-memory--manual {
  display: grid;
  column-count: unset;
  column-gap: 0;
  gap: var(--layout-gap, 14px);
  grid-template-columns: repeat(var(--layout-columns, 4), minmax(0, 1fr));
  grid-auto-rows: var(--layout-row-height, 136px);
  grid-auto-flow: dense;
  align-items: stretch;
}
.event-memory__frame {
  position: relative;
  display: inline-block;
  width: 100%;
  height: auto;
  margin: 0 0 14px;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  break-inside: avoid;
}
.event-memory--manual .event-memory__frame {
  display: block;
  margin: 0;
  grid-column: span var(--col-span, 1);
  grid-row: span var(--row-span, 1);
}
.event-memory__paper {
  display: block;
  width: 100%;
  height: auto;
  padding: 8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow:
    0 16px 34px rgba(255, 127, 168, 0.16),
    0 8px 18px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(10px);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}
.event-memory__frame:hover .event-memory__paper {
  transform: translateY(-3px);
  box-shadow:
    0 20px 42px rgba(255, 127, 168, 0.2),
    0 10px 20px rgba(0, 0, 0, 0.07);
}
.event-memory__paper img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 245, 247, 0.9));
}
.event-memory--manual .event-memory__paper {
  height: 100%;
}
.event-memory--manual .event-memory__paper img {
  height: 100%;
  object-fit: cover;
}

.layout-editor {
  width: min(1320px, 100%);
  margin: 0 auto 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 38px rgba(255, 127, 168, 0.14);
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.layout-editor__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(255, 127, 168, 0.15), rgba(255, 179, 71, 0.14));
  color: var(--text);
}
.layout-editor__head span {
  font-size: 12px;
  color: var(--text-soft);
}
.layout-editor__body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px 18px;
}
.layout-editor__block {
  min-width: 0;
}
.layout-editor__label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-soft);
}
.layout-editor__code {
  margin: 0;
  max-height: 260px;
  overflow: auto;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 248, 250, 0.9);
  color: var(--text);
  font-size: 11px;
  line-height: 1.55;
}
.layout-editor__tips,
.layout-editor__list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 12px;
  line-height: 1.7;
}
.layout-editor__list {
  max-height: 260px;
  overflow: auto;
}
.layout-editor__list code,
.layout-editor__tips code {
  font-size: 11px;
}

.photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 124px;
  background: rgba(32, 13, 24, 0.72);
  backdrop-filter: blur(12px);
}
.photo-lightbox[hidden] {
  display: none;
}
.photo-lightbox__panel {
  position: relative;
  max-width: min(calc(100vw - 248px), 1100px);
  max-height: 86vh;
  padding: 18px;
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.24);
}
.photo-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: calc(86vh - 36px);
  object-fit: contain;
  border-radius: 22px;
  background: white;
}
.photo-lightbox__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  color: var(--primary);
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(255, 127, 168, 0.18);
}
.photo-lightbox__nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.48);
  color: rgba(255, 255, 255, 0.96);
  font-size: 54px;
  line-height: 0.86;
  text-shadow: 0 3px 12px rgba(78, 45, 58, 0.24);
  box-shadow:
    0 18px 42px rgba(32, 13, 24, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(14px);
  transform: translateY(-50%);
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}
.photo-lightbox__nav[hidden] {
  display: none;
}
.photo-lightbox__nav:hover {
  background: rgba(255, 127, 168, 0.34);
  box-shadow:
    0 22px 52px rgba(32, 13, 24, 0.26),
    0 0 0 8px rgba(255, 255, 255, 0.08);
  transform: translateY(-50%) scale(1.06);
}
.photo-lightbox__nav:active {
  transform: translateY(-50%) scale(0.96);
}
.photo-lightbox__nav--prev {
  left: -92px;
  padding-right: 4px;
}
.photo-lightbox__nav--next {
  right: -92px;
  padding-left: 4px;
}
body.lightbox-open {
  overflow: hidden;
}

/* ============================================
   移动端适配
   ============================================ */
@media (max-width: 480px) {
  .planet {
    width: 220px;
    height: 220px;
    font-size: 60px;
  }

  .planet__mascot {
    width: 180px;
    height: 180px;
  }

  .planet__mascot-fallback {
    font-size: 110px;
  }

  .planet__crown {
    top: -30px;
    font-size: 42px;
  }

  @keyframes orbit {
    0%   { transform: rotate(0deg) translateX(130px) rotate(0deg); }
    100% { transform: rotate(360deg) translateX(130px) rotate(-360deg); }
  }

  .countdown {
    padding: var(--gap-sm) var(--gap-md);
  }

  /* unlock 网格在手机上 3 列布局 */
  .unlock-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 12px;
  }
  .card { padding: 12px 4px; }
  .card__avatar { width: 64px; height: 64px; }
  .card__avatar img { width: 56px; height: 56px; }
  .card__day-label { font-size: 10px; padding: 2px 8px; }
  .card__title { font-size: 11px; }
  .card__date { font-size: 11px; }
  .sticker { width: 80px; height: 80px; }

  /* 时间轴手机端：保留气质，但把重叠层次收简 */
  .timeline {
    width: calc(100vw - 28px);
    padding: 18px 0 56px;
  }
  .timeline__backdrop {
    justify-content: flex-start;
    padding-left: 6px;
  }
  .timeline__orbit {
    width: 68px;
  }
  .tl-node {
    display: block;
    margin-bottom: 44px;
  }
  .tl-node--left,
  .tl-node--right {
    padding-left: 52px !important;
    padding-right: 0 !important;
  }
  .tl-node__dot {
    position: absolute;
    left: 26px;
    top: 96px;
    transform: translate(-50%, -50%);
  }
  .tl-card,
  .tl-card--text-only {
    width: 100%;
    min-height: 0;
    display: block;
    margin: 0;
  }
  .tl-card__copy {
    width: 100%;
    min-height: 0;
    padding: 18px 18px 54px;
    border-radius: 24px;
  }
  .tl-card__title {
    font-size: 18px;
  }
  .tl-card__cluster {
    width: 100%;
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .tl-card__cluster--pair,
  .tl-card__cluster--compact-3,
  .tl-card__cluster--compact-4,
  .tl-card__cluster--compact-5,
  .tl-card__cluster--compact-6,
  .tl-card__cluster--manual {
    grid-auto-rows: 132px;
  }
  .tl-shot {
    padding: 8px;
  }
  .event-page {
    width: calc(100vw - 28px);
    padding: 18px 0 52px;
  }
  .event-nav {
    gap: 10px;
    flex-wrap: wrap;
  }
  .event-nav__spacer {
    display: none;
  }
  .event-nav a {
    flex: 1 1 calc(50% - 6px);
    min-width: 130px;
    text-align: center;
    padding: 10px 14px;
  }
  .event-legend {
    padding: 22px 18px 24px;
    border-radius: 24px;
    margin-bottom: 20px;
  }
  .event-legend__title {
    font-size: 24px;
  }
  .event-legend__body {
    font-size: 15px;
    line-height: 1.85;
  }
  .event-memory,
  .event-memory--manual,
  .event-memory--grid-2,
  .event-memory--grid-3,
  .event-memory--grid-4,
  .event-memory--grid-5,
  .event-memory--grid-6 {
    column-count: 2;
    column-gap: 12px;
  }
  .event-memory--solo {
    column-count: 1;
  }
  .event-memory--manual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 180px;
    gap: 12px;
  }
  .event-memory__paper {
    padding: 8px;
    border-radius: 20px;
  }
  .layout-editor__body {
    grid-template-columns: 1fr;
  }
  .photo-lightbox {
    padding: 14px 58px;
  }
  .photo-lightbox__panel {
    width: 100%;
    max-width: none;
    padding: 12px;
    border-radius: 24px;
  }
  .photo-lightbox__image {
    max-height: calc(100vh - 60px);
    border-radius: 16px;
  }
  .photo-lightbox__nav {
    width: 42px;
    height: 42px;
    font-size: 34px;
    background: rgba(255, 255, 255, 0.24);
  }
  .photo-lightbox__nav--prev {
    left: -54px;
  }
  .photo-lightbox__nav--next {
    right: -54px;
  }

  .home__entries {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .entry-btn {
    width: 100%;
  }

  /* 贴纸缩小，避免遮挡主内容 */
  .sticker {
    width: 70px;
    height: 70px;
    opacity: 0.7;
  }

  .placeholder {
    font-size: 10px;
    border-radius: 16px;
  }

  /* 移动端只显示对角两个贴纸，另两个隐藏 */
  .sticker--tr,
  .sticker--bl {
    display: none;
  }

  /* 飘动元素缩小 */
  .floater {
    font-size: 20px;
  }

  .floater--2, .floater--6 {
    display: none;  /* 移动端少几个，避免太乱 */
  }
}

/* ============================================
   unlock.html · 展览墙式时间线重排
   ============================================ */

body:has(#timeline) {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.78) 0 14%, transparent 14% 100%),
    repeating-linear-gradient(90deg, rgba(92, 59, 74, 0.025) 0 1px, transparent 1px 78px),
    linear-gradient(135deg, #fff8f2 0%, #ffe6eb 42%, #ffd9c4 100%);
}

body:has(#timeline)::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(92, 59, 74, 0.08) 0 1px, transparent 1px 100%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
  background-size: 100% 100%, 100% 320px;
  opacity: 0.65;
}

body:has(#timeline) .stickers-bg {
  opacity: 0.34;
  filter: saturate(0.72);
}

body:has(#timeline) .floater {
  opacity: 0.28;
  filter: saturate(0.75) blur(0.15px);
}

body:has(#timeline) .unlock-header {
  width: min(1320px, calc(100vw - 72px));
  max-width: none;
  margin: 0 auto;
  padding: 34px 0 22px 116px;
  text-align: left;
}

body:has(#timeline) .back-btn {
  margin-bottom: 18px;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 12px 30px rgba(92, 59, 74, 0.08);
}

body:has(#timeline) .unlock-title {
  margin-bottom: 10px;
  color: #ff6f9c;
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: 0 18px 46px rgba(255, 111, 156, 0.2);
}

body:has(#timeline) .unlock-progress {
  max-width: 520px;
  color: #876072;
  font-size: 15px;
  line-height: 1.75;
  letter-spacing: 0;
}

body:has(#timeline) .timeline {
  width: min(1320px, calc(100vw - 72px));
  padding: 28px 0 108px;
}

body:has(#timeline) .timeline__backdrop {
  inset: 0 auto 0 0;
  width: 96px;
  justify-content: center;
}

body:has(#timeline) .timeline__orbit {
  width: 96px;
}

body:has(#timeline) .timeline__glow {
  stroke-width: 18;
  opacity: 0.32;
}

body:has(#timeline) .timeline__path {
  stroke-width: 4;
  opacity: 0.92;
}

body:has(#timeline) .tl-node {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 20px;
  min-height: 212px;
  margin-bottom: 28px;
}

body:has(#timeline) .tl-node__dot {
  position: relative;
  top: auto;
  grid-column: 1 / 2;
  margin-top: 74px;
  width: 22px;
  height: 22px;
  background: #fff9fb;
  border: 4px solid rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 7px rgba(255, 127, 168, 0.11),
    0 12px 24px rgba(255, 127, 168, 0.22);
}

body:has(#timeline) .tl-node__dot--final {
  width: 38px;
  height: 38px;
  margin-top: 56px;
}

body:has(#timeline) .tl-card,
body:has(#timeline) .tl-card--text-only {
  grid-column: 2 / 3;
  width: 100%;
  max-width: none;
  margin: 0;
  gap: 18px;
}

body:has(#timeline) .tl-card {
  position: relative;
  align-items: stretch;
  padding: 8px 0;
}

body:has(#timeline) .tl-node--left .tl-card {
  grid-template-columns: minmax(430px, 1.05fr) minmax(330px, 0.78fr);
  justify-self: stretch;
}

body:has(#timeline) .tl-node--right .tl-card {
  grid-template-columns: minmax(330px, 0.78fr) minmax(430px, 1.05fr);
  justify-self: stretch;
}

body:has(#timeline) .tl-card::before {
  content: '';
  position: absolute;
  inset: 4px 0;
  z-index: -1;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 247, 242, 0.42)),
    linear-gradient(90deg, rgba(255, 127, 168, 0.08), rgba(255, 179, 71, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 26px 70px rgba(92, 59, 74, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

body:has(#timeline) .tl-card--text-only {
  display: block;
  max-width: 760px;
}

body:has(#timeline) .tl-card--text-only::before {
  inset: 0;
}

body:has(#timeline) .tl-card__copy {
  min-height: 100%;
  padding: 24px 24px 58px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 250, 247, 0.68));
  border: 1px solid rgba(255, 255, 255, 0.86);
  box-shadow:
    0 18px 40px rgba(92, 59, 74, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body:has(#timeline) .tl-card__copy::before {
  display: none;
}

body:has(#timeline) .tl-card__copy::after {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.2), transparent 34%),
    repeating-linear-gradient(0deg, rgba(92, 59, 74, 0.03) 0 1px, transparent 1px 28px);
  opacity: 0.55;
}

body:has(#timeline) .tl-card__meta {
  margin-bottom: 12px;
}

body:has(#timeline) .tl-card__date {
  color: #9b6478;
  font-size: 12px;
  letter-spacing: 0.08em;
}

body:has(#timeline) .tl-card__title {
  margin-bottom: 10px;
  color: #4e2d3a;
  font-size: clamp(18px, 1.35vw, 24px);
  line-height: 1.38;
  letter-spacing: 0;
}

body:has(#timeline) .tl-card__body {
  color: #846071;
  font-size: 13px;
  line-height: 1.85;
  -webkit-line-clamp: 3;
}

body:has(#timeline) .tl-card__read {
  width: 26px;
  height: 26px;
  background: #ff9c5f;
  box-shadow: 0 10px 22px rgba(255, 156, 95, 0.25);
}

body:has(#timeline) .tl-card__stamp {
  right: 16px;
  bottom: 14px;
  width: 34px;
  height: 34px;
  border-radius: 14px;
}

body:has(#timeline) .tl-card__cluster {
  align-self: stretch;
  padding: 8px;
  border-radius: 28px;
}

body:has(#timeline) .tl-card__cluster--solo {
  grid-auto-rows: 184px;
}

body:has(#timeline) .tl-card__cluster--pair {
  grid-auto-rows: 118px;
}

body:has(#timeline) .tl-card__cluster--compact-3 {
  grid-auto-rows: 66px;
}

body:has(#timeline) .tl-card__cluster--compact-4 {
  grid-auto-rows: 54px;
}

body:has(#timeline) .tl-card__cluster--compact-5 {
  grid-auto-rows: 46px;
}

body:has(#timeline) .tl-card__cluster--compact-6 {
  grid-auto-rows: 40px;
}

body:has(#timeline) .tl-card__cluster--manual {
  grid-auto-rows: calc(var(--layout-row-height, 42px) * 1.32);
}

body:has(#timeline) .tl-shot {
  padding: 6px;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 16px 34px rgba(92, 59, 74, 0.12),
    0 8px 18px rgba(255, 127, 168, 0.1);
}

body:has(#timeline) .tl-shot img {
  border-radius: 11px;
  filter: saturate(1.04) contrast(1.02);
}

body:has(#timeline) .tl-card:hover .tl-card__copy,
body:has(#timeline) .tl-card:hover .tl-shot {
  transform: translateY(-4px);
}

body:has(#timeline) .tl-node--final .tl-card__copy {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 230, 218, 0.72));
  border-color: rgba(255, 179, 71, 0.36);
}

@media (max-width: 900px) {
  body:has(#timeline) .unlock-header {
    width: calc(100vw - 32px);
    padding: 28px 0 18px 56px;
  }

  body:has(#timeline) .unlock-title {
    max-width: 100%;
    font-size: clamp(30px, 7vw, 42px);
    line-height: 1.12;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  body:has(#timeline) .timeline {
    width: calc(100vw - 28px);
  }

  body:has(#timeline) .tl-node {
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    margin-bottom: 30px;
    padding: 0 !important;
  }

  body:has(#timeline) .timeline__backdrop {
    width: 46px;
    padding-left: 0;
  }

  body:has(#timeline) .timeline__orbit {
    width: 46px;
  }

  body:has(#timeline) .tl-node__dot {
    position: relative;
    left: auto;
    top: auto;
    margin-top: 96px;
    transform: none;
  }

  body:has(#timeline) .tl-card,
  body:has(#timeline) .tl-card--text-only {
    display: block;
    grid-column: 2 / 3;
    width: 100%;
  }

  body:has(#timeline) .tl-card__cluster {
    width: 100%;
    margin: 0 0 12px;
    padding: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body:has(#timeline) .tl-card__cluster--pair,
  body:has(#timeline) .tl-card__cluster--compact-3,
  body:has(#timeline) .tl-card__cluster--compact-4,
  body:has(#timeline) .tl-card__cluster--compact-5,
  body:has(#timeline) .tl-card__cluster--compact-6,
  body:has(#timeline) .tl-card__cluster--manual {
    grid-auto-rows: 112px;
  }

  body:has(#timeline) .tl-shot {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  body:has(#timeline) .tl-card__cluster .tl-shot:first-child {
    grid-column: 1 / -1 !important;
    grid-row: span 2 !important;
  }

  body:has(#timeline) .tl-card__cluster .tl-shot--landscape {
    grid-column: span 2 !important;
  }

  body:has(#timeline) .tl-card__cluster--cover .tl-shot,
  body:has(#timeline) .tl-card__cluster--cover .tl-shot--landscape {
    grid-column: 1 / -1 !important;
  }

  body:has(#timeline) .tl-card__cluster--cover .tl-shot {
    grid-row: span 1 !important;
  }

  body:has(#timeline) .tl-card__cluster--cover .tl-shot:first-child {
    grid-row: span 2 !important;
  }

  body:has(#timeline) .tl-card__copy {
    padding: 20px 18px 56px;
  }

  body:has(#timeline) .tl-photo-more {
    right: auto;
    left: 14px;
    bottom: 14px;
  }
}

@media (max-width: 520px) {
  body:has(#timeline) .unlock-header {
    width: calc(100vw - 24px);
    padding-left: 0;
    text-align: center;
  }

  body:has(#timeline) .unlock-progress {
    margin: 0 auto;
  }

  body:has(#timeline) .unlock-title {
    max-width: 100%;
    font-size: clamp(30px, 9vw, 36px);
    line-height: 1.12;
    overflow-wrap: anywhere;
    text-wrap: balance;
  }

  body:has(#timeline) .timeline {
    width: calc(100vw - 18px);
  }

  body:has(#timeline) .tl-node {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 6px;
  }

  body:has(#timeline) .timeline__backdrop {
    width: 34px;
  }

  body:has(#timeline) .timeline__orbit {
    width: 34px;
  }

  body:has(#timeline) .tl-card::before {
    border-radius: 24px;
  }

  body:has(#timeline) .tl-card__copy {
    border-radius: 22px;
  }

  body:has(#timeline) .tl-card__title {
    font-size: 18px;
  }
}

/* ============================================
   letter.html · 最终情书文字树
   ============================================ */

body:has(#letter-page) {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 179, 71, 0.24), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(122, 158, 103, 0.16), transparent 26%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.78) 0 13%, transparent 13% 100%),
    repeating-linear-gradient(90deg, rgba(92, 59, 74, 0.026) 0 1px, transparent 1px 82px),
    linear-gradient(135deg, #fffaf0 0%, #ffe7ef 46%, #ffd8bd 100%);
}

body:has(#letter-page)::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0)),
    radial-gradient(circle at 50% 96%, rgba(122, 158, 103, 0.16), transparent 32%);
}

body:has(#letter-page) .stickers-bg {
  opacity: 0.42;
  filter: saturate(0.82);
}

.letter-page {
  position: relative;
  z-index: 10;
  width: min(1040px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 30px 0 84px;
}

.letter-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.back-btn--soft {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.68);
}

.letter-stage {
  position: relative;
  overflow: hidden;
  min-height: min(880px, calc(100vh - 58px));
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(255, 247, 238, 0.66)),
    repeating-linear-gradient(0deg, rgba(92, 59, 74, 0.045) 0 1px, transparent 1px 38px);
  box-shadow: 0 24px 80px rgba(92, 59, 74, 0.13);
  backdrop-filter: blur(18px);
  transition: background 0.55s ease, box-shadow 0.55s ease;
}

.letter-stage::before,
.letter-stage::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
}

.letter-stage::before {
  width: 260px;
  height: 260px;
  right: -92px;
  top: -92px;
  background: radial-gradient(circle, rgba(255, 127, 168, 0.22), transparent 68%);
}

.letter-stage::after {
  width: 420px;
  height: 90px;
  left: 50%;
  bottom: 54px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(122, 158, 103, 0.18), transparent 72%);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.letter-stage.is-tree {
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 143, 178, 0.16), transparent 36%),
    linear-gradient(180deg, rgba(255, 253, 248, 0.86), rgba(255, 246, 232, 0.62));
  box-shadow: 0 30px 90px rgba(92, 59, 74, 0.16);
}

.letter-stage.is-tree::after {
  opacity: 1;
}

.letter-hero {
  position: relative;
  z-index: 2;
  padding: 34px 48px 4px;
  text-align: center;
}

.letter-hero__date {
  color: #9a6a58;
  font-size: 14px;
  font-weight: 700;
}

.letter-hero__title {
  margin-top: 8px;
  color: #e85f8d;
  font-family: 'Segoe Script', 'Brush Script MT', 'Palatino Linotype', Georgia, serif;
  font-size: clamp(50px, 7vw, 92px);
  line-height: 0.92;
  font-weight: 700;
  letter-spacing: 0;
  text-shadow:
    0 16px 38px rgba(232, 95, 141, 0.18),
    0 1px 0 rgba(255, 255, 255, 0.86);
}

.letter-hero__hint {
  margin: 14px auto 0;
  max-width: 520px;
  color: #876072;
  font-size: 14px;
  line-height: 1.7;
}

.letter-paper {
  position: relative;
  z-index: 2;
  width: min(760px, calc(100% - 72px));
  margin: 16px auto 48px;
  padding: 38px 42px 42px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 22px;
  background:
    linear-gradient(90deg, rgba(255, 127, 168, 0.12) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 251, 244, 0.82));
  background-size: 100% 100%, 100% 100%;
  box-shadow: 0 18px 46px rgba(92, 59, 74, 0.1);
  color: var(--text);
  cursor: pointer;
  transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

.letter-paper:not(.letter-paper--ready) {
  opacity: 0;
}

.letter-paper.is-tree {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  cursor: pointer;
}

.letter-paper__salutation,
.letter-paper__para,
.letter-paper__signature {
  font-size: clamp(16px, 2.8vw, 18px);
  line-height: 2.05;
  letter-spacing: 0;
}

.letter-paper__para {
  margin-top: 18px;
  text-indent: 2em;
}

.letter-paper__signature {
  margin-top: 30px;
  text-align: right;
  font-weight: 800;
}

.letter-paper__charms {
  position: absolute;
  left: 24px;
  top: auto;
  bottom: 24px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.letter-return-illustration {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5c7a, #ff8aa5);
  box-shadow: 0 14px 28px rgba(255, 92, 122, 0.28);
  color: #fff;
  font-size: 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.letter-return-illustration:hover {
  transform: translateY(-2px) rotate(-4deg);
  box-shadow: 0 16px 28px rgba(232, 95, 141, 0.2);
}

.letter-paper--ready .letter-char {
  position: absolute;
  display: inline-block;
  white-space: pre;
  text-indent: 0;
  transform-origin: 50% 58%;
  transition:
    transform 1.05s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.75s ease,
    opacity 0.45s ease;
  will-change: transform, color;
}

.letter-paper--instant .letter-char {
  transition: none !important;
}

.letter-paper.is-tree .letter-char {
  font-family: 'Comic Sans MS', 'LXGW WenKai', 'KaiTi', 'Microsoft YaHei', sans-serif;
  font-weight: 800;
  text-shadow: 0 5px 14px rgba(217, 62, 115, 0.18);
}

.letter-char--trigger {
  border-radius: 8px;
  color: #e85f8d;
  text-shadow: 0 6px 18px rgba(232, 95, 141, 0.16);
  cursor: pointer;
}

.letter-char--trigger::after {
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -0.16em;
  height: 0.2em;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 127, 168, 0.18), rgba(255, 179, 71, 0.2));
  pointer-events: none;
}

.letter-paper.is-tree .letter-char--trigger::after,
.letter-paper.is-tree .letter-paper__charms {
  display: none;
}

.letter-tree-space {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.letter-stage.is-tree .letter-tree-space {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .letter-paper--ready .letter-char,
  .letter-stage {
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 720px) {
  .letter-page {
    width: calc(100vw - 22px);
    padding-top: 18px;
  }

  .letter-nav {
    align-items: stretch;
  }

  .letter-nav .back-btn {
    padding: 9px 12px;
    font-size: 13px;
  }

  .letter-stage {
    border-radius: 22px;
  }

  .letter-hero {
    padding: 30px 18px 8px;
  }

  .letter-hero__title {
    font-size: clamp(30px, 10vw, 42px);
  }

  .letter-paper {
    width: calc(100% - 24px);
    margin: 12px auto 36px;
    padding: 26px 18px 32px;
    border-radius: 18px;
  }

  .letter-paper__charms {
    left: 18px;
    top: auto;
    bottom: 18px;
  }

  .letter-return-illustration {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .letter-paper__salutation,
  .letter-paper__para,
  .letter-paper__signature {
    font-size: 15px;
    line-height: 1.9;
  }

  .letter-paper__para {
    margin-top: 15px;
  }

}
