/* ====================================================
   style.css  —  小琳生日网站样式
   Mobile-first | 深空蓝 + 暖金 配色
==================================================== */

/* ── CSS 变量 ── */
:root {
  --bg:         #080c20;
  --gold:       #f5c842;
  --gold-light: #ffe57f;
  --gold-glow:  rgba(245,200,66,0.35);
  --gold-dim:   rgba(245,200,66,0.15);
  --white:      #e8eaf6;
  --pink:       #ff6b9d;
  --purple:     #7c4dff;
  --cyan:       #80deea;
  --text:       #e8eaf6;

  --radius: 12px;
  --trans:  0.65s cubic-bezier(0.4,0,0.2,1);

  --f-orbitron: 'Orbitron', monospace;
  --f-mashan:   'Ma Shan Zheng', cursive;
  --f-xiaowei:  'ZCOOL XiaoWei', serif;
  --f-kuaile:   'ZCOOL KuaiLe', cursive;
  --f-liujian:  'Liu Jian Mao Cao', cursive;
  --f-dancing:  'Dancing Script', cursive;
  --f-serif:    'Noto Serif SC', serif;
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-serif);
  touch-action: none;
}

/* ── Font helpers ── */
.font-orbitron { font-family: var(--f-orbitron); }
.font-mashan   { font-family: var(--f-mashan); }
.font-xiaowei  { font-family: var(--f-xiaowei); }
.font-kuaile   { font-family: var(--f-kuaile); }
.font-liujian  { font-family: var(--f-liujian); }
.font-dancing  { font-family: var(--f-dancing); }


/* ════════════════════════════════════════════
   GLOBAL LAYERS
════════════════════════════════════════════ */

/* 星空 canvas */
#starfield-canvas {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
}

/* 飘落文字层 */
#float-layer {
  position: fixed; inset: 0; z-index: 100;
  pointer-events: none; overflow: hidden;
}

/* ── 5秒提示 ── */
.idle-hint {
  position: fixed; bottom: 28px; right: 20px; z-index: 200;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.5s, transform 0.5s;
  transform: translateY(8px);
  cursor: pointer;
}
.idle-hint.visible {
  opacity: 1; pointer-events: all; transform: translateY(0);
}
.hint-emoji { font-size: 26px; animation: hintPop 1.2s ease-in-out infinite; }
.hint-text  {
  font-family: var(--f-xiaowei); font-size: 12px;
  color: var(--gold); letter-spacing: 3px;
  animation: hintFade 1.2s ease-in-out infinite;
}
@keyframes hintPop  { 0%,100%{transform:scale(1) translateY(0)} 50%{transform:scale(1.15) translateY(-5px)} }
@keyframes hintFade { 0%,100%{opacity:.4} 50%{opacity:1} }

/* ── 音乐按钮 ── */
.music-btn {
  position: fixed; top: 14px; right: 14px; z-index: 200;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid rgba(245,200,66,.4);
  background: rgba(8,12,32,.75);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(8px);
  transition: border-color .3s, background .3s;
  color: var(--gold);
}
.music-btn:hover { border-color: var(--gold); background: var(--gold-dim); }
.music-btn svg { width: 18px; height: 18px; }

/* ── 预览徽章 & 导航 ── */
.preview-badge {
  position: fixed; top: 58px; right: 14px; z-index: 300;
  background: rgba(255,107,157,.15); border: 1px solid rgba(255,107,157,.5);
  border-radius: 8px; padding: 3px 10px;
  font-size: 11px; color: var(--pink); backdrop-filter: blur(4px);
}
.preview-nav {
  position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 300;
  display: flex; align-items: center; gap: 12px;
  background: rgba(8,12,32,.85); border: 1px solid var(--gold-dim);
  border-radius: 30px; padding: 6px 16px; backdrop-filter: blur(8px);
}
.pnav-btn {
  background: none; border: none; color: var(--gold);
  font-size: 16px; cursor: pointer; padding: 4px;
  transition: opacity .2s;
}
.pnav-btn:hover { opacity: .7; }
.page-indicator { font-family: var(--f-orbitron); font-size: 12px; color: var(--white); min-width: 36px; text-align: center; }


/* ════════════════════════════════════════════
   PAGE SYSTEM
════════════════════════════════════════════ */
#page-container {
  position: fixed; inset: 0; z-index: 10;
}

.page {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transform: translateX(100%);
  will-change: opacity, transform;
}
.page.active {
  opacity: 1; pointer-events: all; transform: translateX(0);
}
.page.exit-left {
  opacity: 0; transform: translateX(-60px);
  transition: opacity var(--trans), transform var(--trans);
}
.page.entering {
  transition: opacity var(--trans), transform var(--trans);
}

.page-inner {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; overflow: hidden;
}


/* ════════════════════════════════════════════
   PAGE 0 · COUNTDOWN
════════════════════════════════════════════ */
.page-0 { background: transparent; }

.countdown-wrap { text-align: center; z-index: 1; }

.cd-top-label {
  font-family: var(--f-xiaowei);
  font-size: clamp(14px, 4vw, 20px);
  color: var(--gold-light); letter-spacing: 6px;
  margin-bottom: 32px;
  text-shadow: 0 0 20px var(--gold-glow);
}

.cd-digits {
  display: flex; align-items: flex-start;
  justify-content: center; gap: clamp(4px,2vw,10px);
}

.cd-group { display: flex; flex-direction: column; align-items: center; gap: 6px; }

.cd-box {
  background: var(--gold-dim);
  border: 1px solid rgba(245,200,66,.35);
  border-radius: 10px;
  padding: clamp(10px,3vw,16px) clamp(12px,3.5vw,20px);
  min-width: clamp(58px,16vw,88px);
  box-shadow: 0 0 24px rgba(245,200,66,.12), inset 0 1px 0 rgba(255,255,255,.06);
  backdrop-filter: blur(6px);
  position: relative; overflow: hidden;
}
.cd-box::after {
  content: ''; position: absolute; top: 50%; left: 8px; right: 8px;
  height: 1px; background: rgba(245,200,66,.08);
}

.cd-val {
  display: block; line-height: 1;
  font-family: var(--f-orbitron); font-weight: 900;
  font-size: clamp(32px,10vw,58px);
  color: var(--gold);
  text-shadow: 0 0 20px var(--gold-glow), 0 0 50px rgba(245,200,66,.2);
  transition: all .12s ease;
}
.cd-val.flip { animation: numFlip .15s ease; }
@keyframes numFlip {
  0%  { transform: translateY(0); opacity: 1; }
  49% { transform: translateY(-8px); opacity: 0; }
  50% { transform: translateY(8px); opacity: 0; }
  100%{ transform: translateY(0); opacity: 1; }
}

.cd-unit {
  font-family: var(--f-xiaowei); font-size: clamp(11px,3vw,14px);
  color: rgba(245,200,66,.65); letter-spacing: 2px;
}

.cd-sep {
  font-family: var(--f-orbitron); font-size: clamp(24px,7vw,44px);
  color: var(--gold); margin-top: 8px;
  animation: sepBlink 1s step-end infinite;
}
@keyframes sepBlink { 0%,100%{opacity:.6} 50%{opacity:.1} }

.cd-date-label {
  margin-top: 32px;
  font-family: var(--f-xiaowei); font-size: clamp(12px,3vw,15px);
  color: rgba(245,200,66,.5); letter-spacing: 8px;
}


/* ════════════════════════════════════════════
   PAGE 1 · 今天
════════════════════════════════════════════ */
.page-1 {
  background: radial-gradient(ellipse at 50% 60%, #1e1040 0%, #080c20 65%);
}

.big-word {
  font-size: clamp(96px, 28vw, 200px);
  font-weight: 400; line-height: 1; color: var(--white);
  text-shadow: 0 0 50px rgba(124,77,255,.6), 0 0 100px rgba(124,77,255,.25);
  opacity: 0; transform: scale(.3) rotate(-6deg); filter: blur(12px);
  will-change: transform, opacity, filter;
}
.big-word.animate-in {
  animation: wordBoom .85s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes wordBoom {
  to { opacity:1; transform:scale(1) rotate(0deg); filter:blur(0); }
}


/* ════════════════════════════════════════════
   PAGE 2 · 是专属于你的节日！
════════════════════════════════════════════ */
.page-2 {
  background: radial-gradient(ellipse at 50% 80%, #1a0a22 0%, #080c20 60%);
}

.char-reveal {
  font-size: clamp(28px, 8.5vw, 54px);
  font-weight: 400; color: var(--white);
  text-align: center; line-height: 1.9;
  max-width: 92vw;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px;
}
.char-reveal span {
  display: inline-block;
  opacity: 0; transform: translateY(24px) rotate(4deg);
  transition: opacity .5s ease, transform .55s cubic-bezier(.34,1.56,.64,1);
  text-shadow: 0 0 30px rgba(255,107,157,.35);
}
.char-reveal.animate-in span { opacity: 1; transform: translateY(0) rotate(0deg); }


/* ════════════════════════════════════════════
   PAGE 3 · MC 像素画
════════════════════════════════════════════ */
.page-3 {
  background: #0e0e1a;
  background-image:
    linear-gradient(rgba(124,77,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,77,255,.05) 1px, transparent 1px);
  background-size: 32px 32px;
}

.pixel-scene {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px; padding: 16px;
}

.mc-center { text-align: center; }
.mc-placeholder {
  border: 2px solid rgba(245,200,66,.4);
  padding: 12px 24px; border-radius: 4px;
  background: rgba(0,0,0,.5); display: inline-block;
}
.mc-pixel-label { font-size: 28px; margin-bottom: 4px; }
.mc-skin-text {
  font-family: monospace; font-size: clamp(14px,4vw,20px);
  letter-spacing: 8px; color: var(--gold);
}
.mc-img { max-height: 120px; image-rendering: pixelated; }

.pixel-rain {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
}

.pixel-card {
  width: clamp(110px, 38vw, 172px); aspect-ratio: 1;
  border: 2px solid rgba(245,200,66,.3); border-radius: 4px;
  overflow: hidden; background: rgba(0,0,0,.6);
  position: relative;
  opacity: 0; transform: translateY(-120vh);
  image-rendering: pixelated;
}
.pixel-card.rain-in {
  animation: pixelDrop .75s cubic-bezier(.22,1,.36,1) forwards;
}
.pixel-card.rain-in:nth-child(2) { animation-delay: .18s; }
.pixel-card.rain-in:nth-child(3) { animation-delay: .36s; }
.pixel-card.rain-in:nth-child(4) { animation-delay: .54s; }

@keyframes pixelDrop {
  0%  { opacity:0; transform:translateY(-120vh); }
  80% { opacity:1; transform:translateY(6px); }
  100%{ opacity:1; transform:translateY(0); }
}
.pixel-card img {
  width: 100%; height: 100%; object-fit: cover;
  image-rendering: pixelated; display: block;
}
/* 图片加载失败时显示占位文字 */
.pixel-card img:not([src]), .pixel-card img[src=""] { display: none; }
.pixel-card-ph {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: monospace; font-size: 11px; color: rgba(245,200,66,.4);
}
.pixel-card img + .pixel-card-ph { display: none; }
.pixel-card:not(:has(img[src]))  .pixel-card-ph,
.pixel-card img[src=""] ~ .pixel-card-ph { display: flex; }


/* ════════════════════════════════════════════
   PAGE 4 · 美食记忆
════════════════════════════════════════════ */
.page-4 {
  background: linear-gradient(135deg, #1a0f10 0%, #0e0e1e 60%, #0a1022 100%);
}

.food-page {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 40px 16px 28px;
}

.food-header { text-align: center; }

.food-line1 {
  font-size: clamp(20px,5.5vw,34px); color: var(--white);
  margin-bottom: 8px;
  opacity: 0; transform: translateY(-18px);
  transition: opacity .6s ease, transform .6s ease;
}
.food-line2 {
  font-size: clamp(18px,5vw,30px); color: var(--pink);
  opacity: 0; transform: translateY(-18px);
  transition: opacity .6s ease .2s, transform .6s ease .2s;
}
.food-header.show .food-line1,
.food-header.show .food-line2 {
  opacity: 1; transform: translateY(0);
}

.food-gallery-wrap {
  flex: 1; width: 100%;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; overflow: hidden;
}
.food-hint {
  font-size: 11px; color: rgba(255,255,255,.35); letter-spacing: 2px;
}
.food-gallery {
  display: flex; gap: 12px; overflow-x: auto;
  width: 100%; padding: 12px 20px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
}
.food-gallery::-webkit-scrollbar { display: none; }

.food-card {
  flex: 0 0 clamp(220px,72vw,280px);
  scroll-snap-align: center;
  border-radius: 14px; overflow: hidden;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,107,157,.2);
  transition: transform .3s;
}
.food-card:active { transform: scale(.97); }
.food-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.food-card-caption {
  padding: 10px 14px;
  font-family: var(--f-liujian); font-size: clamp(14px,4vw,18px);
  color: var(--white); text-align: center;
}
.food-no-ph {
  width: 100%; text-align: center; padding: 24px;
  color: rgba(255,255,255,.28); font-size: 14px;
}

.food-footer {
  font-size: clamp(16px,4.5vw,22px); color: var(--gold-light);
  text-shadow: 0 0 12px var(--gold-glow);
}


/* ════════════════════════════════════════════
   PAGE 5 · 视频
════════════════════════════════════════════ */
.page-5 { background: #000; }

.video-page {
  width: 100%; max-width: 560px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: 16px;
}
.video-label {
  font-size: clamp(16px,4.5vw,24px); color: var(--gold);
  text-shadow: 0 0 12px var(--gold-glow);
}
.video-frame {
  width: 100%; aspect-ratio: 16/9;
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(245,200,66,.2);
  background: #0a0a0a;
}
.video-frame iframe { width: 100%; height: 100%; border: none; }
.video-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 8px;
  color: rgba(255,255,255,.3);
}
.video-ph-icon { font-size: 44px; }
.video-ph p { font-size: 14px; }
.video-ph small { font-size: 11px; opacity: .6; }


/* ════════════════════════════════════════════
   PAGE 6 · 切蛋糕
════════════════════════════════════════════ */
.page-6 {
  background: linear-gradient(180deg, #0a1022 0%, #150a22 100%);
  overflow: hidden;
}

.cake-page {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  padding: 12px 12px 6px; gap: 6px; overflow: hidden;
}

.cake-title {
  font-size: clamp(18px,5vw,26px); color: var(--gold);
  text-align: center; text-shadow: 0 0 10px var(--gold-glow);
  flex-shrink: 0;
}

.cake-area {
  position: relative; flex-shrink: 0; text-align: center;
}
#cake-canvas {
  display: block; touch-action: none; cursor: crosshair;
  border-radius: 8px; max-width: 100%;
}
.cake-instr {
  font-family: var(--f-kuaile); font-size: clamp(12px,3.5vw,15px);
  color: rgba(255,255,255,.75); margin-top: 4px; text-align: center;
  min-height: 20px;
}
.blow-btn {
  display: block; margin: 6px auto 0;
  padding: 9px 26px;
  background: linear-gradient(135deg, var(--gold), #e8a87c);
  border: none; border-radius: 30px;
  font-family: var(--f-kuaile); font-size: clamp(14px,4vw,18px);
  color: #1a0800; cursor: pointer;
  box-shadow: 0 4px 20px rgba(245,200,66,.3);
  transition: transform .15s, box-shadow .15s;
  touch-action: manipulation;
}
.blow-btn:active { transform: scale(.93); }

/* AI 角色舞台 */
.ai-stage {
  width: 100%; flex: 1;
  display: flex; justify-content: center; align-items: flex-start;
  gap: clamp(6px,2vw,12px); overflow: hidden;
  padding-top: 4px;
}

.ai-char {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; position: relative; flex-shrink: 0;
}

.ai-av {
  width: clamp(38px,9.5vw,52px); height: clamp(38px,9.5vw,52px);
  border-radius: 50%; border: 2px solid rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(16px,4vw,22px);
  transition: border-color .3s, box-shadow .3s, transform .1s;
  cursor: default;
}
.ai-av.hungry { animation: avHungry .55s ease-in-out infinite alternate; }
.ai-av.eating { animation: avEat .55s ease; }
@keyframes avHungry {
  from { transform: scale(1); border-color: rgba(255,255,255,.2); }
  to   { transform: scale(1.08); border-color: rgba(245,200,66,.65); box-shadow: 0 0 10px var(--gold-glow); }
}
@keyframes avEat {
  0%  { transform: scale(1); }
  30% { transform: scale(1.35) rotate(-5deg); }
  60% { transform: scale(.88) rotate(3deg); }
  100%{ transform: scale(1); }
}

.ai-name {
  font-family: var(--f-kuaile); font-size: clamp(9px,2.3vw,12px);
  color: rgba(255,255,255,.75); white-space: nowrap;
}

.ai-bubble {
  position: absolute; bottom: calc(100% + 6px);
  left: 50%; transform: translateX(-50%);
  background: rgba(15,18,40,.96);
  border: 1px solid rgba(245,200,66,.4);
  border-radius: 10px; padding: 7px 10px;
  font-size: clamp(10px,2.3vw,12px); color: var(--white);
  width: clamp(145px,43vw,215px); text-align: center; line-height: 1.55;
  opacity: 0; pointer-events: none; z-index: 50;
  backdrop-filter: blur(8px);
  transition: opacity .35s;
  white-space: pre-wrap; word-break: break-all;
}
.ai-bubble::after {
  content: ''; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(245,200,66,.4);
}
.ai-bubble.show { opacity: 1; }

/* drop-ready highlight */
.ai-char.drop-ready .ai-av {
  border-color: var(--gold);
  box-shadow: 0 0 16px var(--gold-glow);
  transform: scale(1.12);
}

/* 我的聊天窗口 */
.my-chat {
  display: none;
  width: 100%; max-width: 310px;
  background: rgba(12,18,40,.96);
  border: 1px solid rgba(245,200,66,.3);
  border-radius: var(--radius); overflow: hidden;
  margin: 0 auto; flex-shrink: 0;
  backdrop-filter: blur(12px);
  animation: chatIn .55s cubic-bezier(.34,1.56,.64,1);
}
@keyframes chatIn {
  from { opacity:0; transform:translateX(50px); }
  to   { opacity:1; transform:translateX(0); }
}
.chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  background: rgba(245,200,66,.07);
  border-bottom: 1px solid rgba(245,200,66,.13);
}
.chat-me-av {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold); color: #1a0800;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.chat-my-name { font-family: var(--f-kuaile); color: var(--gold); font-size: 14px; }
.chat-body { padding: 10px 14px; display: flex; flex-direction: column; gap: 7px; }

.chat-msg {
  display: inline-block;
  background: rgba(245,200,66,.12);
  border: 1px solid rgba(245,200,66,.18);
  border-radius: 8px 8px 2px 8px;
  padding: 8px 12px;
  font-family: var(--f-liujian);
  font-size: clamp(14px,3.8vw,17px);
  color: var(--white); align-self: flex-start; max-width: 100%;
  opacity: 0; transform: translateY(8px);
  transition: opacity .45s ease, transform .45s ease;
}
.chat-msg.show { opacity: 1; transform: translateY(0); }

/* 可拖动蛋糕块 */
.cake-piece {
  position: fixed; width: 54px; height: 54px;
  border-radius: 10px;
  background: linear-gradient(135deg, #8B6914, #c4941f);
  border: 2px solid rgba(245,200,66,.55);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; cursor: grab; z-index: 500;
  touch-action: none; user-select: none;
  box-shadow: 0 4px 18px rgba(0,0,0,.45);
  will-change: left, top;
  transition: transform .1s, box-shadow .1s;
}
.cake-piece.dragging {
  cursor: grabbing;
  transform: scale(1.12) rotate(3deg);
  box-shadow: 0 8px 30px rgba(0,0,0,.55);
  z-index: 600;
}
.cake-piece.tutorial-ghost {
  opacity: .38; pointer-events: none;
  animation: ghostHint 2.4s ease-in-out infinite;
}
@keyframes ghostHint {
  0%   { transform: translate(0,0) scale(1); }
  40%  { transform: translate(70px,-36px) scale(.95); }
  70%  { transform: translate(70px,-36px) scale(1.05); }
  100% { transform: translate(0,0) scale(1); }
}


/* ════════════════════════════════════════════
   PAGE 7 · 手写留言
════════════════════════════════════════════ */
.page-7 {
  background: linear-gradient(180deg, #0a0e22 0%, #100a1c 100%);
}

.hw-page {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 20px; padding: 24px 16px;
}

.hw-title {
  font-size: clamp(22px,6vw,34px); color: var(--gold-light);
  text-shadow: 0 0 16px var(--gold-glow);
}

.hw-wrap {
  width: 100%; max-width: 500px;
  border: 1px solid rgba(245,200,66,.2);
  border-radius: var(--radius); overflow: hidden;
  background: rgba(255,255,255,.018); padding: 16px;
}
#hw-svg { width: 100%; height: auto; }


/* ════════════════════════════════════════════
   PAGE 8 · 结尾
════════════════════════════════════════════ */
.page-8 { background: var(--bg); }

#fireworks-canvas {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
}

.ending-text {
  position: relative; z-index: 2;
  text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 10px;
}
.end-emoji {
  font-size: clamp(52px,14vw,80px);
  animation: emojiBounce 1.2s ease-in-out infinite;
}
@keyframes emojiBounce {
  0%,100%{ transform:scale(1) rotate(-3deg); }
  50%    { transform:scale(1.1) rotate(3deg); }
}

.end-line1 {
  font-size: clamp(44px,13vw,76px); color: var(--gold);
  text-shadow: 0 0 32px var(--gold-glow), 0 0 64px rgba(245,200,66,.18);
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s ease, transform .8s ease;
}
.end-line2 {
  font-size: clamp(30px,9vw,52px); color: var(--white);
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s ease .3s, transform .8s ease .3s;
}
.end-date {
  font-family: var(--f-orbitron); font-size: clamp(10px,2.8vw,14px);
  color: rgba(245,200,66,.45); letter-spacing: 5px; margin-top: 8px;
  opacity: 0;
  transition: opacity .8s ease .6s;
}
.page-8.show .end-line1,
.page-8.show .end-line2 { opacity:1; transform:translateY(0); }
.page-8.show .end-date  { opacity:1; }


/* ════════════════════════════════════════════
   FLOATING TEXT
════════════════════════════════════════════ */
.ft-item {
  position: absolute; pointer-events: none;
  white-space: nowrap;
  font-family: var(--f-liujian);
  font-size: clamp(16px,4.5vw,24px);
  display: flex; gap: 0;
  will-change: top, left, opacity, transform;
}
.ft-char {
  display: inline-block;
  opacity: 0; transform: translateY(-8px);
  color: var(--gold);
  text-shadow: 0 0 8px var(--gold-glow);
  transition: opacity .28s ease, transform .3s cubic-bezier(.34,1.56,.64,1);
}


/* ════════════════════════════════════════════
   MEDIA QUERY（小屏）
════════════════════════════════════════════ */
@media (max-width: 360px) {
  .cd-box { padding: 8px 10px; min-width: 50px; }
  .ai-stage { gap: 4px; }
}
@media (max-height: 680px) {
  .cd-top-label { margin-bottom: 18px; }
  .cd-date-label { margin-top: 18px; }
  .cake-page { padding: 8px 10px 4px; }
}
