/* ============================================
   Let It Go · Late Night Drop-off - 全局样式
   Late Night Convenience Store × Warm × Cozy
   ============================================ */

/* 防止双击缩放，替代 viewport user-scalable=no（WCAG 兼容） */
html {
  touch-action: manipulation;
}

:root {
  /* 深夜背景 */
  --bg-deep: #0F1219;
  --bg-mid: #161B25;
  --bg-light: #1C2230;

  /* 暖黄灯光 */
  --warm-amber: #E8A849;
  --warm-amber-glow: rgba(232, 168, 73, 0.5);
  --warm-amber-soft: rgba(232, 168, 73, 0.15);
  --warm-orange: #D4845A;
  --warm-orange-glow: rgba(212, 132, 90, 0.4);

  /* 辅助色 */
  --soft-green: #7ECEA0;
  --soft-green-glow: rgba(126, 206, 160, 0.4);
  --soft-pink: #D4829A;
  --soft-pink-glow: rgba(212, 130, 154, 0.4);
  --soft-blue: #7BA4CC;
  --soft-blue-glow: rgba(123, 164, 204, 0.4);

  /* 文字 */
  --text-primary: #F0E8DC;
  --text-secondary: #B8ADA0;
  --text-dim: #887E70;

  /* 玻璃卡片 */
  --glass-bg: rgba(15, 18, 25, 0.65);
  --glass-border: rgba(232, 168, 73, 0.12);
  --glass-border-active: rgba(232, 168, 73, 0.35);

  /* 暖光卡片 */
  --warm-card-bg: rgba(35, 30, 22, 0.8);
  --warm-card-border: rgba(232, 168, 73, 0.18);

  --danger: #D4626A;

  /* 情绪分类颜色条（状态卡三色条） */
  --bar-cat-工作: #F59E0B;
  --bar-cat-焦虑: #EF4444;
  --bar-cat-情感: #EC4899;
  --bar-cat-家庭: #8B5CF6;
  --bar-cat-健康: #10B981;
  --bar-cat-孤独: #3B82F6;
  --bar-cat-其他: #94A3B8;

  /* 圆角 */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* 字体 */
  --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;

  /* z-index 阶梯体系 */
  --z-bg: 10;
  --z-content: 20;
  --z-nav: 30;
  --z-decor-glow: 40;
  --z-modal: 60;
  --z-processing: 70;
  --z-particle: 80;
  --z-toast: 90;
  --z-crt-overlay: 95;

  /* ===== CRT 显示器效果变量 ===== */
  --crt-scanline-opacity: 0.12;
  --crt-scanline-size: 2px;
  --crt-noise-opacity: 0.035;
  --crt-rgb-shift: 0.4px;
  --crt-vignette-opacity: 0.3;
  --crt-vignette-size: 85%;
  --crt-flicker-intensity: 0.015;
  --crt-wobble-x: 0.6px;
  --crt-wobble-y: 0.4px;
  --crt-curve: 0.5%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-main);
  background: var(--bg-deep);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 隐藏滚动条 */
::-webkit-scrollbar { display: none; }
* { -ms-overflow-style: none; scrollbar-width: none; }

/* ============================================
   App容器
   ============================================ */
#app {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  margin: 0 auto;
  background-color: var(--bg-deep);
  overflow: hidden;
}

.bg-image-layer {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background: url('../assets/bg-konbini-v4.jpg') center/cover no-repeat;
  filter: brightness(0.55) saturate(0.8);
  opacity: 0.85;
  z-index: 0;
}

.bg-dim-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15,18,25,0.5) 0%, rgba(15,18,25,0.3) 40%, rgba(15,18,25,0.4) 100%);
  z-index: 1;
}

/* ============================================
   雨夜背景 Canvas
   ============================================ */
#rain-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-bg);
  opacity: 0.08;
}

/* ============================================
   暖光氛围效果
   ============================================ */
.warm-glow-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-decor-glow);
  background: radial-gradient(ellipse at 50% 20%, rgba(232, 168, 73, 0.04) 0%, transparent 60%);
}

.warm-glow-overlay::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(0deg, rgba(232, 168, 73, 0.03) 0%, transparent 100%);
  pointer-events: none;
}

/* ============================================
   暖光招牌
   ============================================ */
.neon-sign {
  position: relative;
  z-index: var(--z-nav);
  text-align: center;
  padding: 16px 20px 8px;
  padding-top: calc(16px + env(safe-area-inset-top));
}

.neon-sign-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--warm-amber);
  text-shadow:
    0 0 8px var(--warm-amber-glow),
    0 0 20px rgba(232, 168, 73, 0.3);
  animation: warm-glow 4s ease-in-out infinite;
  font-family: var(--font-main);
}

.neon-sign-sub {
  font-size: 9px;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-top: 2px;
  text-transform: uppercase;
}

.neon-sign-line {
  width: 40px;
  height: 2px;
  margin: 6px auto 0;
  background: linear-gradient(90deg, transparent, var(--warm-amber), transparent);
  box-shadow: 0 0 6px var(--warm-amber-glow);
  border-radius: 1px;
}

.neon-sign-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.neon-sign-badge {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1px;
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-pill);
}

@keyframes warm-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.88; }
}

/* ============================================
   主内容区
   ============================================ */
.content-area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-content);
  padding-top: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
}

/* Tab页面 */
.tab-page {
  display: none;
  padding: 0 20px;
  padding-top: calc(80px + env(safe-area-inset-top, 0px));
  padding-bottom: 120px;
  min-height: 100%;
  animation: fadeIn 0.4s ease-out;
}

.tab-page.active {
  display: block;
}

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

/* ============================================
   底部胶囊导航
   ============================================ */
.capsule-nav {
  position: absolute;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-nav);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: rgba(22, 27, 37, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(232, 168, 73, 0.15);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 16px rgba(232, 168, 73, 0.06);
}

.capsule-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  min-width: 60px;
  min-height: 56px;
}

.capsule-nav-item:active {
  transform: scale(0.92);
}

.capsule-nav-item.active {
  background: linear-gradient(135deg, var(--warm-amber), var(--warm-orange));
  color: #1A1510;
  box-shadow:
    0 0 12px var(--warm-amber-glow),
    0 4px 12px rgba(232, 168, 73, 0.25);
}

.capsule-nav-icon {
  font-size: 18px;
  line-height: 1;
  margin-bottom: 2px;
  flex: 1;
  text-align: center;
}

.capsule-nav-text {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1px;
  flex: 1;
  text-align: center;
}

/* ============================================
   玻璃卡片
   ============================================ */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  padding: 20px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.glass-card:active {
  transform: scale(0.98);
  border-color: var(--glass-border-active);
}

/* ============================================
   暖光按钮
   ============================================ */
.btn-neon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  font-family: var(--font-main);
}

.btn-neon:active {
  transform: scale(0.95);
}

.btn-neon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--warm-amber), var(--warm-orange));
  color: #1A1510;
  box-shadow:
    0 0 16px var(--warm-amber-glow),
    0 4px 16px rgba(232, 168, 73, 0.25);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s;
}

.btn-primary:not(:disabled):active::before {
  left: 100%;
}

.btn-secondary {
  background: rgba(28, 34, 48, 0.8);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
}

.btn-secondary:active {
  background: rgba(28, 34, 48, 1);
  border-color: var(--warm-amber);
}

.btn-green {
  background: linear-gradient(135deg, var(--soft-green), #5BAF82);
  color: #0F1A15;
  box-shadow:
    0 0 16px var(--soft-green-glow),
    0 4px 16px rgba(126, 206, 160, 0.25);
}

.btn-pink {
  background: linear-gradient(135deg, var(--soft-pink), #B86B80);
  color: #fff;
  box-shadow:
    0 0 16px var(--soft-pink-glow),
    0 4px 16px rgba(212, 130, 154, 0.25);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
  letter-spacing: 1px;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
}

.btn-ghost:active {
  color: var(--text-primary);
  border-color: var(--glass-border-active);
  background: rgba(255, 255, 255, 0.04);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
}

.btn-danger:active {
  background: rgba(239, 68, 68, 0.25);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

/* ============================================
   粒子粉碎Canvas
   ============================================ */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-particle);
}

/* ============================================
   Loading/Processing
   ============================================ */
.processing-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 18, 25, 0.92);
  backdrop-filter: blur(8px);
  z-index: var(--z-processing);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.processing-overlay.show {
  display: flex;
  animation: fadeIn 0.3s ease-out;
}

.processing-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(232,168,73,0.1);
  border-top-color: var(--warm-amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.processing-text {
  font-size: 14px;
  color: var(--warm-amber);
  letter-spacing: 3px;
  animation: text-pulse 1.5s ease-in-out infinite;
}

@keyframes text-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ============================================
   Toast提示
   ============================================ */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(28, 34, 48, 0.95);
  backdrop-filter: blur(12px);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  z-index: var(--z-toast);
  opacity: 0;
  transition: all 0.3s ease;
  border: 1px solid var(--glass-border);
  pointer-events: none;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   Utility
   ============================================ */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ============================================
   按钮 Loading 状态
   ============================================ */
.btn-neon.loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn-neon.loading::after {
  content: '';
  position: absolute;
  right: 14px;
  width: 14px;
  height: 14px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================
   屏幕阅读器专用隐藏 */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* 全局键盘焦点环（无障碍） */
:focus-visible {
  outline: 2px solid var(--warm-amber);
  outline-offset: 2px;
  box-shadow: 0 0 8px var(--warm-amber-glow);
}
button:focus-visible, .btn-neon:focus-visible, .capsule-nav-item:focus-visible {
  outline: 2px solid var(--warm-amber);
}

/* 减弱动画偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  #rain-canvas, .warm-glow-overlay { display: none; }
}

/* ============================================
   隐私声明弹窗
   ============================================ */
.privacy-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 18, 25, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.privacy-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.privacy-modal {
  background: linear-gradient(145deg, rgba(28, 34, 48, 0.95), rgba(15, 18, 25, 0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border-active);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  max-width: 340px;
  width: 100%;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(232, 168, 73, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: scale(0.92) translateY(10px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease;
  opacity: 0;
}

.privacy-modal-overlay.show .privacy-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.privacy-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(232, 168, 73, 0.1);
}

.privacy-modal-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 6px var(--warm-amber-glow));
}

.privacy-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--warm-amber);
  letter-spacing: 1px;
  text-shadow: 0 0 6px var(--warm-amber-glow);
}

.privacy-modal-body {
  margin-bottom: 22px;
}

.privacy-modal-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.privacy-modal-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-primary);
  line-height: 1.6;
}

.privacy-check {
  flex-shrink: 0;
  font-size: 14px;
  margin-top: 1px;
}

.privacy-modal-footer {
  display: flex;
  justify-content: center;
}

/* ============================================
   投递模式选择弹窗（掌柜问你）
   ============================================ */
.delivery-mode-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 18, 25, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.delivery-mode-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.delivery-mode-dialog {
  background: linear-gradient(145deg, rgba(28, 34, 48, 0.95), rgba(15, 18, 25, 0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border-active);
  border-radius: var(--radius-xl);
  padding: 24px 22px 20px;
  max-width: 340px;
  width: 100%;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(232, 168, 73, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease;
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.delivery-mode-overlay.show .delivery-mode-dialog {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* 对话气泡 */
.delivery-mode-bubble {
  position: relative;
  background: rgba(28, 34, 48, 0.9);
  border: 1px solid var(--glass-border-active);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  width: 100%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.dm-bubble-text {
  font-size: 14.5px;
  color: var(--text-primary);
  line-height: 1.7;
  text-align: center;
  font-weight: 500;
}

.dm-bubble-arrow {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--glass-border-active);
}

.dm-bubble-arrow::after {
  content: '';
  position: absolute;
  top: 1px;
  left: -7px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid rgba(28, 34, 48, 0.9);
}

/* 选项卡片组 */
.delivery-mode-cards {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}

.delivery-mode-card {
  flex: 1;
  background: rgba(28, 34, 48, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 18px 14px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.delivery-mode-card:hover {
  border-color: var(--warm-amber);
  background: rgba(232, 168, 73, 0.06);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(232, 168, 73, 0.12);
}

.delivery-mode-card:active {
  transform: translateY(0) scale(0.98);
}

.dm-card-icon {
  font-size: 32px;
  margin-bottom: 4px;
}

.dm-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.dm-card-desc {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  min-height: 32px;
}

.dm-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dm-meta-item {
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.dm-meta-icon {
  font-size: 12px;
}

.dm-meta-warn {
  color: var(--warm-orange);
  opacity: 0.9;
}

.dm-meta-ok {
  color: var(--soft-green);
  opacity: 0.9;
}

/* 指定星球选择 */
.delivery-planet-select {
  width: 100%;
  animation: fadeSlideIn 0.3s ease;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dm-planet-title {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 14px;
  letter-spacing: 0.5px;
}

.dm-planet-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dm-planet-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(28, 34, 48, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.25s ease;
}

.dm-planet-item:hover {
  border-color: var(--warm-amber);
  background: rgba(232, 168, 73, 0.06);
  transform: translateX(4px);
}

.dm-planet-item:active {
  transform: translateX(2px) scale(0.99);
}

.dm-planet-icon {
  font-size: 24px;
  width: 36px;
  text-align: center;
}

.dm-planet-name {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.dm-planet-back {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.dm-planet-back:hover {
  color: var(--text-secondary);
}

/* ============================================
   v3.0 D2 新增：手写信文字风格
   ============================================ */

/* 手写信基础风格 —— 打字机/手写信质感 */
.handwritten-text {
  font-family: Menlo, Monaco, Consolas, 'Courier New', 'SF Mono', monospace;
  color: #F5EFE0; /* 米白/奶白色，不是纯白 */
  letter-spacing: 0.5px;
  line-height: 1.8;
  font-size: 14px;
  /* 轻微墨迹不均效果：用 text-shadow 模拟墨色深浅变化 */
  text-shadow:
    0 0 0.3px rgba(245, 239, 224, 0.3),
    0.3px 0.3px 0 rgba(232, 168, 73, 0.08);
  word-break: break-word;
}

.handwritten-text p {
  margin-bottom: 1.2em; /* 段落之间空行更大 */
}

.handwritten-text p:last-child {
  margin-bottom: 0;
}

/* 手写信标题 */
.handwritten-title {
  font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
  color: var(--warm-amber);
  letter-spacing: 2px;
  font-size: 16px;
  font-weight: 600;
  text-shadow: 0 0 6px var(--warm-amber-glow);
}

/* 手写信署名 */
.handwritten-signature {
  font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
  color: var(--text-secondary);
  font-size: 12px;
  letter-spacing: 1px;
  text-align: right;
  margin-top: 24px;
  font-style: italic;
}

/* ============================================
   v3.0 D2 新增：进店仪式动画
   ============================================ */

/* 霓虹招牌渐亮动画 */
.neon-sign.entering .neon-sign-text {
  animation: neon-flicker-in 2s ease-out forwards;
  opacity: 0;
}

.neon-sign.entering .neon-sign-sub {
  animation: neon-fade-in 1.2s ease-out 0.8s forwards;
  opacity: 0;
}

.neon-sign.entering .neon-sign-line {
  animation: neon-line-glow 1s ease-out 1.2s forwards;
  opacity: 0;
}

.neon-sign.entering .neon-sign-badges {
  animation: neon-fade-in 1s ease-out 1.5s forwards;
  opacity: 0;
}

@keyframes neon-flicker-in {
  0% {
    opacity: 0;
    text-shadow: none;
  }
  20% {
    opacity: 0.3;
    text-shadow: 0 0 2px var(--warm-amber-glow);
  }
  30% {
    opacity: 0.1;
  }
  45% {
    opacity: 0.6;
    text-shadow:
      0 0 6px var(--warm-amber-glow),
      0 0 12px rgba(232, 168, 73, 0.2);
  }
  55% {
    opacity: 0.4;
  }
  70% {
    opacity: 0.85;
    text-shadow:
      0 0 8px var(--warm-amber-glow),
      0 0 20px rgba(232, 168, 73, 0.3);
  }
  85% {
    opacity: 0.75;
  }
  100% {
    opacity: 1;
    text-shadow:
      0 0 8px var(--warm-amber-glow),
      0 0 20px rgba(232, 168, 73, 0.3);
    animation: warm-glow 4s ease-in-out infinite;
  }
}

@keyframes neon-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes neon-line-glow {
  from { opacity: 0; width: 0; }
  to   { opacity: 1; width: 40px; }
}

/* 雨景渐入动画 */
#rain-canvas.entering {
  animation: rain-fade-in 2.5s ease-out forwards;
  opacity: 0;
}

@keyframes rain-fade-in {
  from { opacity: 0; }
  to   { opacity: 0.08; }
}

/* 整体页面渐入 */
.content-area.entering {
  animation: content-fade-in 1s ease-out 0.5s forwards;
  opacity: 0;
}

@keyframes content-fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   v3.0 D2 新增：未读红点（通用）
   ============================================ */

.unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow:
    0 0 6px rgba(239, 68, 68, 0.7),
    0 0 12px rgba(239, 68, 68, 0.4);
  animation: unread-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes unread-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      0 0 6px rgba(239, 68, 68, 0.7),
      0 0 12px rgba(239, 68, 68, 0.4);
  }
  50% {
    transform: scale(1.3);
    box-shadow:
      0 0 10px rgba(239, 68, 68, 0.9),
      0 0 20px rgba(239, 68, 68, 0.5);
  }
}

/* ============================================
   v3.0 D1 新增：首次体验相关样式
   ============================================ */

/* 首次访问双按钮模式 */
.first-visit-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.first-action-btn {
  flex: 1;
  font-size: 14px;
  padding: 14px 8px;
}

.first-visit-hint {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 10px;
  opacity: 0.7;
}

/* 首次开箱专属样式 */
.first-drop-shake {
  animation: first-drop-shake 0.15s ease-in-out infinite !important;
}

@keyframes first-drop-shake {
  0%, 100% { transform: rotate(-3deg) scale(1); }
  50% { transform: rotate(3deg) scale(1.02); }
}

.first-drop-opened {
  animation: first-drop-glow 1.5s ease-out;
}

@keyframes first-drop-glow {
  0% { filter: brightness(1); }
  30% { filter: brightness(1.8); }
  100% { filter: brightness(1); }
}

/* 首次开箱粒子 */
.first-drop-particle {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-particle);
  animation: first-drop-particle-fly 1.5s ease-out forwards;
  transform: translate(-50%, -50%);
}

@keyframes first-drop-particle-fly {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.3);
  }
}

/* 访客编号角标 */
.visitor-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
  border-radius: 20px;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(4px);
  z-index: 2;
}

.visitor-badge-icon {
  font-size: 11px;
}

/* 初见草专属掉落样式 */
.supply-plant-drop.is-exclusive {
  background: linear-gradient(135deg, rgba(126, 206, 160, 0.15) 0%, rgba(126, 206, 160, 0.05) 100%);
  border: 1px solid rgba(126, 206, 160, 0.3);
  animation: exclusive-glow 2s ease-in-out infinite;
}

@keyframes exclusive-glow {
  0%, 100% { box-shadow: 0 0 8px rgba(126, 206, 160, 0.2); }
  50% { box-shadow: 0 0 16px rgba(126, 206, 160, 0.4); }
}

/* ==================== 回收页回信卡片 ==================== */

#reply-container {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

.reply-card {
  background: rgba(28, 34, 48, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  backdrop-filter: blur(12px);
  animation: reply-card-in 0.4s ease-out;
}

@keyframes reply-card-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reply-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.reply-stranger-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.reply-stranger-info {
  flex: 1;
  min-width: 0;
}

.reply-stranger-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 2px;
}

.reply-stranger-title {
  font-size: 12px;
  color: var(--text-secondary);
}

.reply-prob-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  background: rgba(126, 206, 160, 0.15);
  color: var(--mint-green);
  font-weight: 500;
}

.reply-prob-warn {
  background: rgba(232, 168, 73, 0.15);
  color: var(--warm-amber);
}

.reply-card-body {
  margin-bottom: 16px;
}

.reply-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
}

/* 情绪命名高亮：第一句的柔和高亮效果 */
.emotion-naming-line {
  display: block;
  color: var(--warm-amber);
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  text-shadow: 0 0 12px rgba(232, 168, 73, 0.3);
}

/* ==================== 里程碑纪念效果 ==================== */

/* 里程碑回复卡片：特殊边框和光晕 */
.reply-card.is-milestone {
  border: 1.5px solid var(--warm-amber);
  box-shadow:
    0 0 20px rgba(232, 168, 73, 0.15),
    0 0 40px rgba(232, 168, 73, 0.08),
    inset 0 0 20px rgba(232, 168, 73, 0.05);
  animation: milestone-glow 3s ease-in-out infinite;
}

@keyframes milestone-glow {
  0%, 100% {
    box-shadow:
      0 0 20px rgba(232, 168, 73, 0.15),
      0 0 40px rgba(232, 168, 73, 0.08),
      inset 0 0 20px rgba(232, 168, 73, 0.05);
  }
  50% {
    box-shadow:
      0 0 30px rgba(232, 168, 73, 0.25),
      0 0 60px rgba(232, 168, 73, 0.12),
      inset 0 0 30px rgba(232, 168, 73, 0.08);
  }
}

/* 里程碑徽章 */
.milestone-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(232, 168, 73, 0.2) 0%, rgba(212, 132, 90, 0.15) 100%);
  border: 1px solid rgba(232, 168, 73, 0.4);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--warm-amber);
  margin-bottom: 14px;
  text-shadow: 0 0 8px rgba(232, 168, 73, 0.3);
}

.milestone-badge-icon {
  font-size: 14px;
}

/* 里程碑掉落提示样式 */
.reply-plant-drop.is-milestone {
  background: linear-gradient(135deg, rgba(232, 168, 73, 0.15) 0%, rgba(212, 132, 90, 0.1) 100%);
  border: 1px solid rgba(232, 168, 73, 0.3);
}

.reply-plant-drop.is-milestone .rpd-title {
  color: var(--warm-amber);
}

/* 里程碑庆祝粒子容器 */
.milestone-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.milestone-particle {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warm-amber);
  box-shadow: 0 0 6px var(--warm-amber-glow);
  animation: milestone-particle-float 3s ease-out forwards;
}

@keyframes milestone-particle-float {
  0% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(-80px) scale(0);
    opacity: 0;
  }
}

/* 植物掉落 */
.reply-plant-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(126, 206, 160, 0.08);
  border: 1px solid rgba(126, 206, 160, 0.2);
  margin-bottom: 16px;
}

.reply-plant-drop.is-rare {
  background: linear-gradient(135deg, rgba(180, 140, 220, 0.12) 0%, rgba(180, 140, 220, 0.05) 100%);
  border: 1px solid rgba(180, 140, 220, 0.3);
  animation: rare-glow 2s ease-in-out infinite;
}

.reply-plant-drop.is-exclusive {
  background: linear-gradient(135deg, rgba(126, 206, 160, 0.15) 0%, rgba(126, 206, 160, 0.05) 100%);
  border: 1px solid rgba(126, 206, 160, 0.3);
  animation: exclusive-glow 2s ease-in-out infinite;
}

.rpd-emoji {
  font-size: 32px;
  flex-shrink: 0;
}

.rpd-text {
  flex: 1;
  min-width: 0;
}

.rpd-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.rpd-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.reply-actions {
  display: flex;
  justify-content: center;
  padding-top: 4px;
  gap: 12px;
}

/* 随机投递回信 - 全屏蒙层弹窗 */
.reply-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 22, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: reply-modal-fade-in 0.3s ease-out;
}

@keyframes reply-modal-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.reply-modal {
  background: rgba(28, 34, 48, 0.95);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 28px 24px;
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: reply-modal-slide-up 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes reply-modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.reply-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.reply-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

.reply-modal .reply-card-header {
  margin-bottom: 18px;
  padding-bottom: 16px;
}

.reply-modal .reply-text {
  font-size: 16px;
  line-height: 1.8;
}

.reply-modal .reply-actions {
  padding-top: 8px;
}

/* 无回信状态 */
.reply-no-reply {
  text-align: center;
}

.reply-no-reply-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.7;
}

.reply-no-reply-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.reply-no-reply-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.reply-no-reply-tip {
  font-size: 12px;
  color: var(--warm-amber);
  padding: 10px 14px;
  background: rgba(232, 168, 73, 0.08);
  border-radius: var(--radius-md);
  margin: 16px 0;
  line-height: 1.5;
}

/* 待收信状态 */
.reply-pending {
  text-align: center;
}

.reply-pending-icon {
  font-size: 48px;
  margin-bottom: 12px;
  animation: float 2s ease-in-out infinite;
}

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

.reply-pending-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.reply-pending-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.reply-pending-countdown {
  font-size: 32px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: var(--warm-amber);
  letter-spacing: 2px;
  margin-bottom: 16px;
  text-shadow: 0 0 20px rgba(232, 168, 73, 0.3);
}

.reply-pending-tip {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

/* 深夜投信寄出状态 */
.late-night-delivered {
  text-align: center;
}

.lnd-icon {
  font-size: 56px;
  margin-bottom: 16px;
  animation: lnd-bounce 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(232, 168, 73, 0.2));
}

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

.lnd-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.lnd-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.lnd-desc strong {
  color: var(--warm-amber);
  font-weight: 600;
}

.lnd-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-style: italic;
  opacity: 0.8;
}

/* 按钮小号 */
.btn-sm {
  padding: 8px 20px;
  font-size: 13px;
}

/* ============================================
   CRT 显示器视觉拟真效果
   ============================================ */

/* CRT 全局覆盖层 - 扫描线 + 噪点 + 暗角 */
.crt-overlay-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-crt-overlay);
  opacity: 0;
  transition: opacity 0.5s ease;
  mix-blend-mode: multiply;
}

body.crt-effects .crt-overlay-layer {
  opacity: 1;
}

/* 扫描线 - 细密水平黑线 */
.crt-overlay-layer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, var(--crt-scanline-opacity)) 0px,
    rgba(0, 0, 0, var(--crt-scanline-opacity)) 1px,
    transparent 1px,
    transparent var(--crt-scanline-size)
  );
  pointer-events: none;
}

/* 屏幕噪点 - 用 SVG turbulence 生成的颗粒感 */
.crt-overlay-layer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  opacity: var(--crt-noise-opacity);
  pointer-events: none;
  animation: crt-noise-move 0.5s steps(4) infinite;
}

/* 噪点微移 - 模拟信号不稳定 */
@keyframes crt-noise-move {
  0%   { background-position: 0 0; }
  25%  { background-position: 32px 16px; }
  50%  { background-position: 16px 32px; }
  75%  { background-position: -16px 8px; }
  100% { background-position: 0 0; }
}

/* 边缘暗角 - 四角较暗中间较亮 */
.crt-vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: calc(var(--z-crt-overlay) + 1);
  opacity: 0;
  transition: opacity 0.5s ease;
  background: radial-gradient(
    ellipse at center,
    transparent 0%,
    transparent var(--crt-vignette-size),
    rgba(0, 0, 0, var(--crt-vignette-opacity)) 100%
  );
}

body.crt-effects .crt-vignette {
  opacity: 1;
}

/* RGB 色彩偏移 - 模拟 CRT 显像管三色分离 */
/* 对主要文字内容添加轻微的 RGB 分离 text-shadow */
body.crt-effects .neon-sign-text,
body.crt-effects .btn-neon,
body.crt-effects .capsule-nav-text,
body.crt-effects .handwritten-text,
body.crt-effects .reply-text,
body.crt-effects .dm-card-title,
body.crt-effects .privacy-modal-title {
  text-shadow:
    calc(var(--crt-rgb-shift) * -1) 0 rgba(255, 0, 0, 0.08),
    var(--crt-rgb-shift) 0 rgba(0, 255, 255, 0.08);
}

/* 整体画面微颤 - 模拟 CRT 不稳定性 */
/* 已移除：持续抖动影响阅读体验，保留静态效果即可
body.crt-effects #app {
  animation: crt-wobble 0.15s steps(2) infinite;
} */

@keyframes crt-wobble {
  0% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(calc(var(--crt-wobble-x) * 0.5), calc(var(--crt-wobble-y) * -0.3));
  }
  50% {
    transform: translate(calc(var(--crt-wobble-x) * -0.4), calc(var(--crt-wobble-y) * 0.6));
  }
  75% {
    transform: translate(calc(var(--crt-wobble-x) * 0.3), calc(var(--crt-wobble-y) * 0.2));
  }
  100% {
    transform: translate(0, 0);
  }
}

/* 整体亮度微闪 - 模拟 CRT 刷新率闪烁 */
/* 已移除：闪烁影响阅读体验
body.crt-effects #app::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, var(--crt-flicker-intensity));
  pointer-events: none;
  z-index: calc(var(--z-crt-overlay) + 2);
  animation: crt-flicker 0.08s steps(2) infinite alternate;
  mix-blend-mode: overlay;
} */

@keyframes crt-flicker {
  0%   { opacity: 0.2; }
  100% { opacity: 1; }
}

/* CRT 屏幕曲率 - 轻微的边缘变形感（用 inset box-shadow 模拟） */
body.crt-effects #app {
  box-shadow:
    inset 0 0 60px rgba(0, 0, 0, 0.15),
    inset 0 0 100px rgba(0, 0, 0, 0.1);
}

/* 减弱动画偏好 - 关闭 CRT 动态效果 */
@media (prefers-reduced-motion: reduce) {
  body.crt-effects .crt-overlay-layer::after {
    animation: none;
  }
  body.crt-effects #app {
    animation: none;
  }
  body.crt-effects #app::after {
    animation: none;
    opacity: 0.3;
  }
}

/* 移动端优化 - 降低效果强度以提升性能 */
@media (max-width: 480px) {
  :root {
    --crt-wobble-x: 0.3px;
    --crt-wobble-y: 0.2px;
    --crt-noise-opacity: 0.025;
  }
}

/* ============================================
   彩蛋1：空信彩蛋 - 温暖信纸风格
   ============================================ */

/* 全屏蒙层 */
.empty-letter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 8, 6, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: empty-letter-fade-in 0.5s ease-out;
}

.empty-letter-overlay.closing {
  animation: empty-letter-fade-out 0.4s ease-in forwards;
}

@keyframes empty-letter-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes empty-letter-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* 飘落光点容器 */
.empty-letter-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.elp-particle {
  position: absolute;
  top: -20px;
  background: radial-gradient(circle, var(--warm-amber) 0%, transparent 70%);
  border-radius: 50%;
  animation: elp-float-down linear infinite;
  filter: blur(1px);
}

@keyframes elp-float-down {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(100vh) translateX(20px);
    opacity: 0;
  }
}

/* 信纸卡片容器 */
.empty-letter-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  animation: empty-letter-card-in 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes empty-letter-card-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 温暖光晕 */
.empty-letter-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140%;
  height: 120%;
  background: radial-gradient(ellipse at center,
    rgba(232, 168, 73, 0.15) 0%,
    rgba(212, 132, 90, 0.08) 40%,
    transparent 70%);
  pointer-events: none;
  animation: empty-letter-glow-pulse 4s ease-in-out infinite;
}

@keyframes empty-letter-glow-pulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
}

/* 信纸主体 */
.empty-letter-paper {
  position: relative;
  background: linear-gradient(145deg,
    rgba(60, 48, 35, 0.95) 0%,
    rgba(45, 36, 28, 0.98) 50%,
    rgba(35, 28, 22, 0.98) 100%);
  border: 1px solid rgba(232, 168, 73, 0.25);
  border-radius: 8px;
  padding: 50px 30px 30px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(232, 168, 73, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

/* 信纸纹理 */
.empty-letter-paper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    repeating-linear-gradient(
      transparent,
      transparent 27px,
      rgba(232, 168, 73, 0.03) 27px,
      rgba(232, 168, 73, 0.03) 28px
    );
  pointer-events: none;
  border-radius: 8px;
}

/* 顶部蜡封 */
.empty-letter-wax {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  z-index: 2;
  animation: wax-seal-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
  filter: drop-shadow(0 4px 12px rgba(212, 132, 90, 0.4));
}

.empty-letter-wax svg {
  width: 100%;
  height: 100%;
}

@keyframes wax-seal-in {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(0) rotate(-30deg);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) scale(1) rotate(0);
  }
}

/* 信纸内容区 */
.empty-letter-body {
  position: relative;
  z-index: 1;
}

/* 装饰线 */
.empty-letter-deco-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 30px;
  opacity: 0;
  animation: deco-line-in 0.6s ease-out 0.5s forwards;
}

@keyframes deco-line-in {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.empty-letter-deco-line .deco-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--warm-amber);
  opacity: 0.5;
}

.empty-letter-deco-line .deco-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--warm-amber), transparent);
  opacity: 0.4;
}

.empty-letter-deco-line .deco-icon {
  font-size: 12px;
  color: var(--warm-amber);
  opacity: 0.6;
}

/* 空白区域 */
.empty-letter-blank {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  opacity: 0;
  animation: blank-area-in 0.8s ease-out 0.7s forwards;
}

@keyframes blank-area-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.blank-whisper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.blank-whisper .whisper-line {
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240, 232, 220, 0.2));
}

.blank-whisper .whisper-line:last-child {
  background: linear-gradient(90deg, rgba(240, 232, 220, 0.2), transparent);
}

.blank-whisper .whisper-text {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 2px;
  font-style: italic;
  opacity: 0.6;
}

/* 金句 */
.empty-letter-quote {
  text-align: center;
  padding: 10px 0 20px;
  opacity: 0;
  animation: quote-in 1s ease-out 1s forwards;
}

@keyframes quote-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.empty-letter-quote .quote-mark {
  font-size: 20px;
  color: var(--warm-amber);
  opacity: 0.6;
  font-family: Georgia, serif;
  line-height: 1;
}

.empty-letter-quote .quote-mark.left {
  margin-right: 4px;
  vertical-align: top;
}

.empty-letter-quote .quote-mark.right {
  margin-left: 4px;
  vertical-align: bottom;
}

.empty-letter-quote .quote-text {
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: 2px;
  line-height: 1.8;
  font-weight: 300;
}

/* 落款 */
.empty-letter-sign {
  text-align: right;
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
  opacity: 0;
  letter-spacing: 1px;
  padding-right: 10px;
  animation: sign-in 0.8s ease-out 1.5s forwards;
}

@keyframes sign-in {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* 植物解锁区域 */
.empty-letter-plant {
  margin-top: 20px;
  padding-top: 20px;
  opacity: 0;
  animation: plant-reveal 0.8s ease-out 2s forwards;
}

@keyframes plant-reveal {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.elp-divider {
  width: 60%;
  height: 1px;
  margin: 0 auto 16px;
  background: linear-gradient(90deg, transparent, rgba(232, 168, 73, 0.3), transparent);
}

.elp-content {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: rgba(240, 232, 220, 0.05);
  border-radius: var(--radius-md);
  border: 1px solid rgba(240, 232, 220, 0.1);
}

.elp-emoji {
  font-size: 32px;
  flex-shrink: 0;
  animation: elp-plant-bounce 2s ease-in-out infinite;
  filter: drop-shadow(0 0 8px rgba(240, 232, 220, 0.3));
}

@keyframes elp-plant-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.elp-text {
  flex: 1;
  min-width: 0;
}

.elp-title {
  font-size: 11px;
  color: var(--warm-amber);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.elp-name {
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 4px;
}

.elp-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* 底部按钮 */
.empty-letter-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
  opacity: 0;
  animation: actions-in 0.6s ease-out 1.8s forwards;
}

@keyframes actions-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.elp-btn {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-main);
}

.elp-btn:active {
  transform: scale(0.96);
}

.elp-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.elp-btn-ghost:active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.elp-btn-primary {
  background: linear-gradient(135deg, var(--warm-amber), var(--warm-orange));
  color: #1A1510;
  box-shadow:
    0 4px 12px rgba(232, 168, 73, 0.3),
    0 0 8px rgba(232, 168, 73, 0.2);
}

.elp-btn-primary:active {
  box-shadow:
    0 2px 6px rgba(232, 168, 73, 0.4),
    0 0 12px rgba(232, 168, 73, 0.3);
}

/* 减弱动画偏好 */
@media (prefers-reduced-motion: reduce) {
  .empty-letter-overlay,
  .empty-letter-card,
  .empty-letter-glow,
  .empty-letter-wax,
  .empty-letter-deco-line,
  .empty-letter-blank,
  .empty-letter-quote,
  .empty-letter-sign,
  .empty-letter-plant,
  .empty-letter-actions,
  .elp-emoji,
  .elp-particle {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================
   彩蛋2：深夜电台
   ============================================ */

.radio-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 15, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 20px;
}

.radio-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* 电台噪点背景 */
.radio-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  opacity: 0.04;
  pointer-events: none;
  animation: radio-noise-shift 0.3s steps(3) infinite;
}

@keyframes radio-noise-shift {
  0% { background-position: 0 0; }
  33% { background-position: 20px 10px; }
  66% { background-position: -10px 20px; }
  100% { background-position: 0 0; }
}

/* 调频显示 */
.radio-frequency {
  font-family: 'Courier New', 'SF Mono', monospace;
  font-size: 48px;
  font-weight: 700;
  color: var(--warm-amber);
  text-shadow:
    0 0 10px var(--warm-amber-glow),
    0 0 30px rgba(232, 168, 73, 0.3);
  letter-spacing: 4px;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.radio-frequency-label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

/* 旋转唱片/磁带 */
.radio-disc {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #1a1a1a 0%, #1a1a1a 15%, #2a2a2a 16%, #2a2a2a 17%, #111 18%, #111 100%);
  border: 3px solid rgba(232, 168, 73, 0.3);
  box-shadow:
    0 0 30px rgba(232, 168, 73, 0.15),
    inset 0 0 20px rgba(0, 0, 0, 0.5);
  position: relative;
  animation: radio-spin 8s linear infinite;
  margin-bottom: 40px;
  z-index: 1;
}

.radio-disc::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--warm-amber);
  box-shadow: 0 0 15px var(--warm-amber-glow);
}

.radio-disc::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #111;
}

@keyframes radio-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 电台金句 */
.radio-quote-container {
  max-width: 320px;
  text-align: center;
  margin-bottom: 40px;
  min-height: 80px;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.radio-quote {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.8;
  letter-spacing: 0.5px;
  animation: radio-quote-fade 0.6s ease-out;
}

@keyframes radio-quote-fade {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 电台按钮 */
.radio-buttons {
  display: flex;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.radio-btn {
  padding: 10px 24px;
  border: 1px solid rgba(232, 168, 73, 0.3);
  background: rgba(232, 168, 73, 0.08);
  color: var(--warm-amber);
  border-radius: var(--radius-pill);
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--font-main);
}

.radio-btn:hover {
  background: rgba(232, 168, 73, 0.15);
  border-color: var(--warm-amber);
  box-shadow: 0 0 12px rgba(232, 168, 73, 0.2);
}

.radio-btn:active {
  transform: scale(0.95);
}

.radio-btn-close {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.radio-btn-close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: none;
  color: var(--text-primary);
}

/* ============================================
   彩蛋3：Konami 秘籍 - 像素模式
   ============================================ */

/* 像素模式全局变量覆盖 */
body.pixel-mode {
  --pixel-font: 'Courier New', 'Courier', monospace;
  --pixel-bg: #0f380f;
  --pixel-bg-light: #306230;
  --pixel-mid: #8bac0f;
  --pixel-light: #9bbc0f;
  --pixel-text: #9bbc0f;
  --pixel-text-light: #9bbc0f;
}

/* 像素模式 - 全局字体和圆角 */
body.pixel-mode * {
  font-family: var(--pixel-font) !important;
  border-radius: 0 !important;
}

body.pixel-mode #app {
  background: var(--pixel-bg) !important;
}

/* 像素模式 - 背景替换 */
body.pixel-mode .bg-image-layer,
body.pixel-mode .bg-dim-layer,
body.pixel-mode #rain-canvas,
body.pixel-mode .warm-glow-overlay {
  display: none !important;
}

/* 像素模式 - 霓虹招牌 */
body.pixel-mode .neon-sign-text {
  color: var(--pixel-light) !important;
  text-shadow: 2px 2px 0 var(--pixel-bg), 4px 4px 0 rgba(0,0,0,0.3) !important;
  animation: none !important;
  letter-spacing: 2px !important;
}

body.pixel-mode .neon-sign-sub {
  color: var(--pixel-mid) !important;
  letter-spacing: 1px !important;
}

body.pixel-mode .neon-sign-line {
  background: var(--pixel-light) !important;
  box-shadow: none !important;
  height: 3px !important;
}

body.pixel-mode .neon-sign-badge {
  background: var(--pixel-bg-light) !important;
  border: 2px solid var(--pixel-mid) !important;
  color: var(--pixel-text) !important;
}

/* 像素模式 - 输入框 */
body.pixel-mode .recycle-input {
  background: var(--pixel-bg-light) !important;
  border: 3px solid var(--pixel-mid) !important;
  color: var(--pixel-text-light) !important;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.3) !important;
}

body.pixel-mode .recycle-input::placeholder {
  color: var(--pixel-mid) !important;
  opacity: 0.7;
}

/* 像素模式 - 按钮 */
body.pixel-mode .btn-neon {
  background: var(--pixel-mid) !important;
  color: var(--pixel-bg) !important;
  border: 3px solid var(--pixel-light) !important;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.4) !important;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.2) !important;
  letter-spacing: 1px !important;
}

body.pixel-mode .btn-neon:active {
  transform: translate(2px, 2px) !important;
  box-shadow: 2px 2px 0 rgba(0,0,0,0.4) !important;
}

body.pixel-mode .btn-neon::before {
  display: none !important;
}

/* 像素模式 - 导航 */
body.pixel-mode .capsule-nav {
  background: var(--pixel-bg-light) !important;
  border: 3px solid var(--pixel-mid) !important;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.3) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.pixel-mode .capsule-nav-item {
  color: var(--pixel-mid) !important;
}

body.pixel-mode .capsule-nav-item.active {
  background: var(--pixel-mid) !important;
  color: var(--pixel-bg) !important;
  box-shadow: none !important;
}

/* 像素模式 - 玻璃卡片 */
body.pixel-mode .glass-card,
body.pixel-mode .reply-card,
body.pixel-mode .reply-modal,
body.pixel-mode .privacy-modal,
body.pixel-mode .delivery-mode-dialog {
  background: var(--pixel-bg-light) !important;
  border: 3px solid var(--pixel-mid) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.3) !important;
}

/* 像素模式 - 文字颜色 */
body.pixel-mode .reply-text,
body.pixel-mode .handwritten-text,
body.pixel-mode .reply-stranger-name,
body.pixel-mode .privacy-modal-list li,
body.pixel-mode .dm-card-title {
  color: var(--pixel-text-light) !important;
}

body.pixel-mode .reply-stranger-title,
body.pixel-mode .text-secondary,
body.pixel-mode .rpd-desc,
body.pixel-mode .dm-card-desc {
  color: var(--pixel-mid) !important;
}

/* 像素模式 - Toast */
body.pixel-mode .toast {
  background: var(--pixel-bg-light) !important;
  border: 3px solid var(--pixel-light) !important;
  color: var(--pixel-text-light) !important;
  box-shadow: 4px 4px 0 rgba(0,0,0,0.4) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* 像素模式 - 植物掉落 */
body.pixel-mode .reply-plant-drop,
body.pixel-mode .supply-plant-drop {
  background: var(--pixel-bg-light) !important;
  border: 2px solid var(--pixel-mid) !important;
}

/* 像素模式 - CRT 效果关闭 */
body.pixel-mode .crt-overlay-layer,
body.pixel-mode .crt-vignette {
  display: none !important;
}

/* 像素模式 - 空状态 */
body.pixel-mode .empty-state-emoji {
  filter: grayscale(1) contrast(1.5);
}

/* 像素模式 - 输入计数器 */
body.pixel-mode .input-counter {
  color: var(--pixel-mid) !important;
}

/* 像素模式 - 骰子按钮 */
body.pixel-mode .dice-btn {
  background: var(--pixel-bg-light) !important;
  border: 2px solid var(--pixel-mid) !important;
}

/* 像素模式激活动画 */
@keyframes pixel-flash {
  0%, 100% { filter: none; }
  25% { filter: brightness(2) saturate(0); }
  50% { filter: brightness(0.5) hue-rotate(90deg); }
  75% { filter: brightness(1.5) invert(0.3); }
}

body.pixel-mode-activating #app {
  animation: pixel-flash 0.5s steps(4);
}

/* ============================================
   三段式投递动画（processing-overlay 升级）
   ============================================ */

/* 三段式阶段容器 */
.processing-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.processing-stage.active {
  opacity: 1;
}

.processing-stage-label {
  font-size: 14px;
  color: var(--warm-amber);
  letter-spacing: 4px;
  text-shadow: 0 0 10px var(--warm-amber-glow);
  font-family: var(--font-mono);
  margin-top: 24px;
  z-index: 2;
  position: relative;
}

/* 阶段1：信号发射 - 粒子飘散 */
.stage-signal-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stage-signal .processing-stage-label::before {
  content: '📡';
  margin-right: 8px;
}

/* 阶段2：情绪拆解 - 波形/频谱图 */
.stage-waveform-container {
  width: 220px;
  height: 100px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.waveform-canvas {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.waveform-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 168, 73, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 168, 73, 0.08) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid rgba(232, 168, 73, 0.15);
  border-radius: 8px;
}

.waveform-bars {
  position: absolute;
  bottom: 15%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 60%;
}

.waveform-bar {
  width: 6px;
  background: linear-gradient(180deg, var(--warm-amber), var(--warm-orange));
  border-radius: 3px 3px 0 0;
  box-shadow: 0 0 8px var(--warm-amber-glow);
  animation: waveform-pulse 0.6s ease-in-out infinite alternate;
}

@keyframes waveform-pulse {
  from { height: 20%; }
  to { height: 90%; }
}

/* 阶段3：掌柜接收 - 像素信箱 */
.stage-mailbox-container {
  position: relative;
  width: 140px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pixel-mailbox {
  position: relative;
  width: 80px;
  height: 90px;
  background: linear-gradient(180deg, #2a3040 0%, #1a1f2c 100%);
  border: 2px solid var(--warm-amber);
  border-radius: 6px 6px 4px 4px;
  box-shadow:
    0 0 20px rgba(232, 168, 73, 0.3),
    inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.pixel-mailbox::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 8px;
  background: #0a0d12;
  border: 1px solid rgba(232, 168, 73, 0.4);
  border-radius: 2px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.pixel-mailbox::after {
  content: '📮';
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  filter: drop-shadow(0 0 4px var(--warm-amber-glow));
}

/* 信封飞入动画 */
.flying-envelope {
  position: absolute;
  top: -20px;
  left: 50%;
  font-size: 28px;
  opacity: 0;
  transform: translateX(-50%) scale(0.3);
  animation: envelope-fly-in 1s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  filter: drop-shadow(0 0 8px var(--warm-amber-glow));
}

@keyframes envelope-fly-in {
  0% {
    top: -40px;
    opacity: 0;
    transform: translateX(-50%) scale(0.2) rotate(-10deg);
  }
  30% {
    opacity: 1;
  }
  70% {
    top: 10px;
    transform: translateX(-50%) scale(1) rotate(2deg);
  }
  100% {
    top: 18px;
    opacity: 0;
    transform: translateX(-50%) scale(0.8) rotate(0deg);
  }
}

/* 信箱接收闪烁 */
.pixel-mailbox.receiving {
  animation: mailbox-glow 0.4s ease-in-out 3;
}

@keyframes mailbox-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(232, 168, 73, 0.3);
  }
  50% {
    box-shadow:
      0 0 30px rgba(232, 168, 73, 0.6),
      0 0 50px rgba(232, 168, 73, 0.3);
  }
}

/* CRT 阶段效果强度变化 */
.processing-overlay.stage-1 {
  --crt-stage-shake: 0.5px;
}
.processing-overlay.stage-2 {
  --crt-stage-shake: 1.2px;
}
.processing-overlay.stage-3 {
  --crt-stage-shake: 0.3px;
}

/* 减弱动画偏好 - 简化投递动画 */
@media (prefers-reduced-motion: reduce) {
  .processing-stage {
    opacity: 1 !important;
  }
  .waveform-bar {
    animation: none;
    height: 60% !important;
  }
  .flying-envelope {
    animation: none;
    top: 18px;
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
  .pixel-mailbox.receiving {
    animation: none;
  }
}

/* ============================================
   体验偏好设置面板
   ============================================ */

.preferences-card {
  margin-top: 16px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.3s ease;
}

.preferences-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
}

.preferences-card-header:active {
  background: rgba(255, 255, 255, 0.03);
}

.preferences-icon {
  font-size: 18px;
  filter: drop-shadow(0 0 4px var(--warm-amber-glow));
}

.preferences-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 1px;
}

.preferences-toggle-arrow {
  font-size: 12px;
  color: var(--text-dim);
  transition: transform 0.3s ease;
}

.preferences-card.expanded .preferences-toggle-arrow {
  transform: rotate(180deg);
}

.preferences-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.preferences-card.expanded .preferences-card-body {
  max-height: 600px;
}

.preferences-list {
  padding: 4px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preference-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.preference-item:last-child {
  border-bottom: none;
}

.preference-info {
  flex: 1;
  min-width: 0;
}

.preference-name {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 2px;
}

.preference-desc {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* 开关控件 */
.switch-control {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.switch-control input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.switch-slider::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--text-dim);
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.switch-control input:checked + .switch-slider {
  background: rgba(232, 168, 73, 0.2);
  border-color: var(--warm-amber);
}

.switch-control input:checked + .switch-slider::before {
  transform: translateX(20px);
  background: var(--warm-amber);
  box-shadow: 0 0 8px var(--warm-amber-glow);
}

/* 分段控件 */
.segmented-control {
  display: flex;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-pill);
  padding: 2px;
  flex-shrink: 0;
  gap: 2px;
}

.segmented-btn {
  padding: 5px 10px;
  font-size: 11px;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-main);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.segmented-btn:active {
  transform: scale(0.95);
}

.segmented-btn.active {
  background: linear-gradient(135deg, var(--warm-amber), var(--warm-orange));
  color: #1A1510;
  font-weight: 600;
  box-shadow: 0 0 8px var(--warm-amber-glow);
}

/* 设置面板整体风格统一 */
.preferences-card .segmented-control {
  max-width: 180px;
}

/* 减弱动画偏好 - 关闭设置面板动画 */
@media (prefers-reduced-motion: reduce) {
  .preferences-card-body {
    transition: none;
  }
  .switch-slider,
  .switch-slider::before,
  .segmented-btn {
    transition: none;
  }
}

/* ============================================
   植物图鉴收集进度条
   ============================================ */
.collection-progress {
  margin: 14px 0 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, rgba(126, 206, 160, 0.08) 0%, rgba(232, 168, 73, 0.06) 100%);
  border: 1px solid rgba(126, 206, 160, 0.2);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
}

.collection-progress:active {
  transform: scale(0.98);
  border-color: rgba(126, 206, 160, 0.4);
}

.collection-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.collection-progress-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--soft-green);
  letter-spacing: 0.5px;
}

.collection-progress-count {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.collection-progress-count strong {
  color: var(--warm-amber);
  font-weight: 700;
}

.collection-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}

.collection-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--soft-green), var(--warm-amber));
  border-radius: 3px;
  box-shadow: 0 0 8px rgba(126, 206, 160, 0.5);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.collection-progress-hint {
  font-size: 10px;
  color: var(--text-dim);
  text-align: right;
  letter-spacing: 0.5px;
}

/* ============================================
   植物图鉴弹窗
   ============================================ */
.plant-dex-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 22, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 16px;
}

.plant-dex-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.plant-dex-modal {
  background: linear-gradient(145deg, rgba(28, 34, 48, 0.95), rgba(15, 18, 25, 0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border-active);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 380px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(232, 168, 73, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: scale(0.92) translateY(12px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease;
  opacity: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

.plant-dex-overlay.show .plant-dex-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.plant-dex-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 2;
}

.plant-dex-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.plant-dex-header {
  padding: 22px 20px 16px;
  border-bottom: 1px solid rgba(232, 168, 73, 0.08);
  flex-shrink: 0;
}

.plant-dex-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--warm-amber);
  letter-spacing: 1px;
  text-shadow: 0 0 8px var(--warm-amber-glow);
  margin-bottom: 12px;
}

.plant-dex-progress-section {
  background: rgba(126, 206, 160, 0.06);
  border: 1px solid rgba(126, 206, 160, 0.15);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.plant-dex-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.plant-dex-progress-info strong {
  color: var(--soft-green);
  font-size: 14px;
}

.plant-dex-progress-percent {
  font-family: var(--font-mono);
  color: var(--warm-amber);
  font-weight: 600;
}

.plant-dex-progress-bar {
  width: 100%;
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  overflow: hidden;
}

.plant-dex-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--soft-green), var(--warm-amber));
  border-radius: 3px;
  box-shadow: 0 0 6px rgba(126, 206, 160, 0.5);
  transition: width 0.6s ease;
}

.plant-dex-body {
  overflow-y: auto;
  padding: 16px 20px 20px;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.plant-dex-category {
  margin-bottom: 20px;
}

.plant-dex-category:last-child {
  margin-bottom: 0;
}

.plant-dex-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.plant-dex-category-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.plant-dex-category-count {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.plant-dex-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.plant-dex-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  transition: all 0.3s ease;
}

.plant-dex-unlocked {
  background: linear-gradient(145deg, rgba(28, 34, 48, 0.8), rgba(15, 18, 25, 0.8));
}

.plant-dex-locked {
  opacity: 0.5;
  background: rgba(15, 18, 25, 0.5);
}

.plant-dex-emoji {
  font-size: 28px;
  margin-bottom: 6px;
  display: block;
}

.plant-dex-unknown {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dim);
  filter: grayscale(1);
}

.plant-dex-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.plant-dex-locked .plant-dex-name {
  color: var(--text-dim);
}

.plant-dex-desc {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.4;
  margin-bottom: 6px;
  min-height: 28px;
}

.plant-dex-date {
  font-size: 9px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 0.3px;
}

/* 成就徽章网格 */
.milestone-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.milestone-badge {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 14px 10px;
  text-align: center;
  transition: all 0.3s ease;
}

.milestone-unlocked {
  background: linear-gradient(145deg, rgba(232, 168, 73, 0.1), rgba(212, 132, 90, 0.06));
  border-color: rgba(232, 168, 73, 0.25);
  box-shadow: 0 0 12px rgba(232, 168, 73, 0.1);
}

.milestone-locked {
  opacity: 0.4;
  filter: grayscale(0.6);
}

.milestone-emoji {
  font-size: 28px;
  margin-bottom: 6px;
  display: block;
}

.milestone-unlocked .milestone-emoji {
  filter: drop-shadow(0 0 6px var(--warm-amber-glow));
}

.milestone-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--warm-amber);
  margin-bottom: 4px;
}

.milestone-locked .milestone-title {
  color: var(--text-dim);
}

.milestone-desc {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ============================================
   成就解锁弹窗
   ============================================ */
.achievement-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 14, 22, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  padding: 20px;
}

.achievement-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.achievement-modal {
  background: linear-gradient(145deg, rgba(28, 34, 48, 0.95), rgba(15, 18, 25, 0.95));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(232, 168, 73, 0.3);
  border-radius: var(--radius-xl);
  padding: 36px 28px 28px;
  width: 100%;
  max-width: 300px;
  text-align: center;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 60px rgba(232, 168, 73, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: scale(0.8) translateY(20px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.4s ease;
  opacity: 0;
  position: relative;
  overflow: hidden;
}

.achievement-overlay.show .achievement-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.achievement-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(232, 168, 73, 0.25) 0%, transparent 70%);
  pointer-events: none;
  animation: achievement-glow-pulse 2s ease-in-out infinite;
}

@keyframes achievement-glow-pulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}

.achievement-badge-large {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  background: linear-gradient(145deg, rgba(232, 168, 73, 0.15), rgba(212, 132, 90, 0.08));
  border: 2px solid rgba(232, 168, 73, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 30px rgba(232, 168, 73, 0.3),
    inset 0 0 20px rgba(232, 168, 73, 0.1);
  animation: achievement-badge-float 2s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes achievement-badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.achievement-emoji {
  font-size: 40px;
  display: block;
  filter: drop-shadow(0 0 10px var(--warm-amber-glow));
}

.achievement-unlock-text {
  font-size: 12px;
  color: var(--soft-green);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.achievement-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--warm-amber);
  text-shadow: 0 0 12px var(--warm-amber-glow);
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.achievement-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.6;
}

.achievement-close-btn {
  min-width: 120px;
}

/* ============================================
   植物解锁发光脉冲效果
   ============================================ */
.plant-unlock-glow {
  animation: plant-unlock-pulse 1.5s ease-out;
}

@keyframes plant-unlock-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(126, 206, 160, 0.6);
    transform: scale(1);
  }
  25% {
    box-shadow: 0 0 20px 8px rgba(126, 206, 160, 0.4);
    transform: scale(1.05);
  }
  50% {
    box-shadow: 0 0 30px 12px rgba(232, 168, 73, 0.3);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(126, 206, 160, 0);
    transform: scale(1);
  }
}

/* 减弱动画偏好 - 图鉴和成就弹窗 */
@media (prefers-reduced-motion: reduce) {
  .plant-dex-modal,
  .achievement-modal {
    transition: none;
  }
  .achievement-glow {
    animation: none;
  }
  .achievement-badge-large {
    animation: none;
  }
  .plant-unlock-glow {
    animation: none;
  }
}

/* ============================================
   v3.0 D3 每周回顾信 - 入口卡片
   ============================================ */

.weekly-review-entry {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 16px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(232, 168, 73, 0.12) 0%, rgba(212, 132, 90, 0.08) 100%);
  border: 1px solid rgba(232, 168, 73, 0.25);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  animation: wre-enter 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.weekly-review-entry:active {
  transform: scale(0.97);
  background: linear-gradient(135deg, rgba(232, 168, 73, 0.18) 0%, rgba(212, 132, 90, 0.12) 100%);
}

@keyframes wre-enter {
  0% { opacity: 0; transform: translateY(-10px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.wre-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  animation: wre-bounce 2s ease-in-out infinite;
}

@keyframes wre-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.wre-content {
  flex: 1;
  min-width: 0;
}

.wre-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--warm-amber);
  letter-spacing: 1px;
  margin-bottom: 3px;
}

.wre-sub {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wre-arrow {
  font-size: 20px;
  color: var(--text-dim);
  flex-shrink: 0;
  transition: transform 0.3s;
}

.weekly-review-entry:active .wre-arrow {
  transform: translateX(3px);
}

/* ============================================
   v3.0 D3 每周回顾信 - 全屏弹窗
   ============================================ */

.weekly-review-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 8, 6, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  padding: 20px;
}

.weekly-review-overlay.show {
  opacity: 1;
  visibility: visible;
}

.weekly-review-overlay.closing {
  opacity: 0;
  visibility: hidden;
}

.weekly-review-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-size: 16px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.weekly-review-close:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.15);
}

.weekly-review-container {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  animation: wr-container-in 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes wr-container-in {
  0% { opacity: 0; transform: scale(0.9) translateY(30px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* 信纸外的光晕 */
.wr-glow {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(232, 168, 73, 0.2) 0%, transparent 65%);
  pointer-events: none;
  animation: wr-glow-pulse 4s ease-in-out infinite;
}

@keyframes wr-glow-pulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.1); }
}

/* 信纸主体 */
.wr-paper {
  position: relative;
  background: linear-gradient(180deg, #FDF6E9 0%, #F5ECD8 50%, #EFE2C7 100%);
  border-radius: 6px;
  padding: 28px 24px 24px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(232, 168, 73, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  overflow-y: auto;
  max-height: calc(85vh - 120px);
  /* 信纸纹理 */
  background-image:
    linear-gradient(180deg, #FDF6E9 0%, #F5ECD8 50%, #EFE2C7 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 28px,
      rgba(232, 168, 73, 0.06) 28px,
      rgba(232, 168, 73, 0.06) 29px
    );
  background-blend-mode: multiply;
}

/* 顶部装饰线 */
.wr-deco-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
  opacity: 0;
  animation: wr-fade-in 0.6s ease 0.2s forwards;
}

.wr-deco-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #C9A66B;
  flex-shrink: 0;
}

.wr-deco-line-inner {
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #C9A66B, transparent);
}

.wr-deco-icon {
  color: #C9A66B;
  font-size: 14px;
  flex-shrink: 0;
}

@keyframes wr-fade-in {
  0% { opacity: 0; transform: translateY(-5px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* 标题区 */
.wr-header {
  text-align: center;
  margin-bottom: 24px;
  opacity: 0;
  animation: wr-fade-in 0.6s ease 0.3s forwards;
}

.wr-week-label {
  font-size: 22px;
  font-weight: 700;
  color: #6B4F2A;
  letter-spacing: 4px;
  margin-bottom: 8px;
  font-family: var(--font-main);
}

.wr-date-range {
  font-size: 12px;
  color: #9B7E4E;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.wr-give-you {
  font-size: 11px;
  color: #B08D5C;
  letter-spacing: 3px;
  opacity: 0.8;
}

/* 信件正文 */
.wr-body {
  margin-bottom: 24px;
  opacity: 0;
  animation: wr-fade-in 0.8s ease 0.5s forwards;
}

.wr-paragraph {
  font-size: 15px;
  line-height: 2;
  color: #5C4A32;
  margin-bottom: 16px;
  text-align: justify;
  letter-spacing: 0.5px;
}

.wr-paragraph:last-child {
  margin-bottom: 0;
}

.wr-paragraph:first-child::first-letter {
  font-size: 22px;
  font-weight: 600;
  color: #8B6914;
  float: left;
  margin-right: 4px;
  line-height: 1.3;
}

/* 底部统计区 */
.wr-stats {
  margin-bottom: 20px;
  opacity: 0;
  animation: wr-fade-in 0.6s ease 0.7s forwards;
}

.wr-stats-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.wr-stats-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #C9A66B;
  opacity: 0.5;
  flex-shrink: 0;
}

.wr-stats-line {
  flex: 1;
  max-width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 166, 107, 0.4), transparent);
}

.wr-stats-text {
  font-size: 11px;
  color: #B08D5C;
  letter-spacing: 2px;
  flex-shrink: 0;
}

.wr-stats-content {
  text-align: center;
  font-size: 12px;
  color: #8B6914;
  line-height: 1.8;
}

.wr-stats-item {
  display: inline-block;
}

/* 签名 */
.wr-signature {
  text-align: right;
  margin-bottom: 4px;
  opacity: 0;
  animation: wr-fade-in 0.6s ease 0.9s forwards;
}

.wr-signature-text {
  font-size: 13px;
  color: #8B6914;
  font-style: italic;
  letter-spacing: 1px;
}

.wr-signature-emoji {
  margin-left: 6px;
  font-size: 16px;
}

/* 底部按钮区 */
.wr-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  opacity: 0;
  animation: wr-fade-in 0.6s ease 1.1s forwards;
}

.wr-btn {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-main);
}

.wr-btn:active {
  transform: scale(0.96);
}

.wr-btn-primary {
  background: linear-gradient(135deg, var(--warm-amber) 0%, var(--warm-orange) 100%);
  color: #2A1F0E;
  box-shadow: 0 4px 15px rgba(232, 168, 73, 0.3);
}

.wr-btn-primary:active {
  box-shadow: 0 2px 8px rgba(232, 168, 73, 0.2);
}

.wr-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.wr-btn-secondary:active {
  background: rgba(255, 255, 255, 0.12);
}

/* 减弱动画偏好 */
@media (prefers-reduced-motion: reduce) {
  .weekly-review-entry,
  .wre-icon,
  .weekly-review-container,
  .wr-glow,
  .wr-deco-line,
  .wr-header,
  .wr-body,
  .wr-stats,
  .wr-signature,
  .wr-actions {
    animation: none;
    opacity: 1;
  }
}

