/* ==========================================================================
   呆宅放空日記 ‧ 貓影慶生敘事 - CSS Design System
   Features: Fixed Background Image Scroll-Parallax Crossfade + Mobile Optimization
   ========================================================================== */

/* 1. CSS Custom Properties / Design Tokens */
:root {
  --bg-main: #F4F1EA;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-card-hover: rgba(255, 255, 255, 0.92);
  
  --color-primary: #5B7065;
  --color-primary-dark: #3F5046;
  --color-accent: #8C7462;
  --color-accent-light: #BDB0A4;
  --color-amber: #D9A05B;
  --color-pink: #F2C4CE;
  --color-pink-dark: #E2A0AE;
  
  --color-text: #2B2D2F;
  --color-text-muted: #5C6266;
  --color-border: rgba(140, 116, 98, 0.15);

  --font-serif: 'Noto Serif TC', serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(43, 45, 47, 0.04);
  --shadow-md: 0 12px 32px rgba(91, 112, 101, 0.12);
  --shadow-lg: 0 24px 48px rgba(43, 45, 47, 0.18);
  --glass-border: 1px solid rgba(255, 255, 255, 0.75);

  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Global Resets & Layout */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-main);
  color: var(--color-text);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  padding-bottom: 70px; /* Space for mobile bottom nav */
}

@media (min-width: 769px) {
  body { padding-bottom: 0; }
}

/* Fullscreen Dynamic Background Image Layers */
.fixed-bg-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  /* 底色：兩層圖交叉淡入淡出時，中間點兩層都不到全不透明，
     沒有底色就會透出頁面底色而閃一下。 */
  background-color: #E7E1D7;
  /* 提升為獨立合成層，避免滾動時整層跟著重繪 */
  transform: translateZ(0);
  backface-visibility: hidden;
}

.bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.2s cubic-bezier(0.25, 1, 0.5, 1), transform 10s ease-out;
}

.bg-layer.active {
  opacity: 1;
  transform: scale(1);
}

.bg-overlay-tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg, 
    rgba(244, 241, 234, 0.48) 0%, 
    rgba(244, 241, 234, 0.28) 35%, 
    rgba(244, 241, 234, 0.28) 65%, 
    rgba(244, 241, 234, 0.58) 100%
  );
  z-index: 1;
}

/* Canvas Overlay for Water Ripples */
#zen-ripple-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
}

h1, h2, h3, h4, .brand-title, .hero-heading, .section-title {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.7), 0 1px 3px rgba(255, 255, 255, 0.5);
}

/* Glass Card & Utility Styles */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.glass-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-full);
  box-shadow: 0 4px 16px rgba(43, 45, 47, 0.1);
  font-size: 0.875rem;
  font-weight: 600;
  color: #2F3E36;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.6; }
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* 3. Header Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: rgba(244, 241, 234, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(140, 116, 98, 0.12);
  padding: 12px 0;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-paw {
  font-size: 1.4rem;
  transform: rotate(-10deg);
  display: inline-block;
  animation: paw-bounce 3s infinite ease-in-out;
}

@keyframes paw-bounce {
  0%, 100% { transform: rotate(-10deg) translateY(0); }
  50% { transform: rotate(-5deg) translateY(-4px); }
}

.brand-title {
  font-size: 1.1rem;
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  gap: 6px;
}

.nav-link {
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-primary-dark);
  background: rgba(91, 112, 101, 0.12);
}

.nav-link.highlight {
  color: var(--color-accent);
  background: rgba(217, 160, 91, 0.18);
  font-weight: 600;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 950;
}

.mobile-menu-btn .bar {
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* 4. Hero Section & Custom Video Player */
.section {
  padding: 70px 0;
  position: relative;
}

.hero-section {
  text-align: center;
  padding-top: 30px;
}

.hero-heading {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  margin: 16px auto 12px;
  color: #1A1C1E;
  line-height: 1.3;
  font-weight: 700;
  text-shadow: 
    0 1px 2px rgba(255, 255, 255, 0.95), 
    0 2px 14px rgba(255, 255, 255, 0.85),
    0 4px 20px rgba(244, 241, 234, 0.7);
}

.hero-desc {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: #35383B;
  font-weight: 500;
  margin: 0 auto 32px;
  text-shadow: 
    0 1px 2px rgba(255, 255, 255, 0.95),
    0 2px 10px rgba(255, 255, 255, 0.8);
}

/* Video Frame Styling */
.video-container-outer {
  position: relative;
  max-width: 920px;
  margin: 0 auto;
}

.video-ambient-glow {
  position: absolute;
  inset: -15px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle, rgba(217, 160, 91, 0.3) 0%, rgba(91, 112, 101, 0.2) 50%, transparent 80%);
  filter: blur(25px);
  z-index: 1;
  opacity: 0.7;
}

.video-window-frame {
  position: relative;
  z-index: 2;
  background: #1C1E20;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(30, 32, 35, 0.95);
}

.window-dots {
  display: flex;
  gap: 6px;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-close { background: #FF5F56; }
.dot-min { background: #FFBD2E; }
.dot-max { background: #27C93F; }

.window-title {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.65);
}

.btn-text-sm {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.btn-text-sm:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #FFF;
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-player-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-overlay-btn {
  position: absolute;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.video-overlay-btn:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.45);
}

.video-overlay-btn.hidden { display: none; }

.video-controls-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 10px 14px;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 15;
  color: #FFF;
}

.control-btn {
  background: transparent;
  border: none;
  color: #FFF;
  font-size: 1rem;
  cursor: pointer;
  padding: 4px;
}

.time-display {
  font-size: 0.75rem;
  font-family: monospace;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}

.progress-container {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  position: relative;
  cursor: pointer;
}

.progress-bar {
  height: 100%;
  width: 0;
  background: var(--color-amber);
  border-radius: 3px;
}

.volume-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}

.volume-range {
  width: 50px;
  accent-color: var(--color-amber);
  cursor: pointer;
}

/* 5. Photo Carousel (Couple Memories - Polaroid Style) */
.gallery-section {
  text-align: center;
}

.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  margin: 14px auto 8px;
  color: #1A1C1E;
  font-weight: 700;
  text-shadow: 
    0 1px 2px rgba(255, 255, 255, 0.95), 
    0 2px 14px rgba(255, 255, 255, 0.85),
    0 4px 20px rgba(244, 241, 234, 0.7);
}

.section-subtitle {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: #35383B;
  font-weight: 500;
  margin: 8px auto 32px;
  text-shadow: 
    0 1px 2px rgba(255, 255, 255, 0.95),
    0 2px 10px rgba(255, 255, 255, 0.8);
}

.carousel-viewport {
  position: relative;
  max-width: 900px;
  margin: 0 auto 20px;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-track {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 500px;
  position: relative;
  touch-action: pan-y;
}

.carousel-card.polaroid-style {
  position: absolute;
  width: 300px;
  background: #FFF;
  padding: 12px 12px 18px 12px;
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.5s ease, box-shadow 0.3s ease;
  cursor: pointer;
  user-select: none;
  border: 1px solid rgba(0,0,0,0.06);
}

.carousel-card.polaroid-style:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.18);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 2px;
  overflow: hidden;
  background: #EAE4D9;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card-tag {
  position: absolute;
  top: 8px; left: 8px;
  /* 相簿有 31 張卡片，每張都掛 backdrop-filter 會讓滾動時合成器爆掉（畫面閃爍）。
     這裡改用不透明度較高的實色，視覺幾乎一樣但不需要即時模糊背景。 */
  background: rgba(43, 45, 47, 0.88);
  color: #FFF;
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.card-content {
  padding: 12px 4px 4px;
  text-align: left;
}

.card-content h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
  font-family: var(--font-serif);
}

.card-content p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* 3D Card Positioning */
.carousel-card.active {
  transform: translateX(0) scale(1);
  opacity: 1;
  z-index: 10;
}

.carousel-card.prev-card {
  transform: translateX(-220px) scale(0.85) rotateY(12deg);
  opacity: 0.75;
  z-index: 5;
}

.carousel-card.next-card {
  transform: translateX(220px) scale(0.85) rotateY(-12deg);
  opacity: 0.75;
  z-index: 5;
}

.carousel-card.far-card {
  transform: scale(0.7);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: var(--glass-border);
  box-shadow: var(--shadow-sm);
  font-size: 1.4rem;
  color: var(--color-text);
  cursor: pointer;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-arrow.prev { left: 8px; }
.carousel-arrow.next { right: 8px; }

.carousel-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto 20px;
  padding: 0 12px;
}

.dot-btn {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(140, 116, 98, 0.35);
  cursor: pointer;
}

.dot-btn.active {
  width: 22px;
  border-radius: 5px;
  background: var(--color-primary);
}

.gallery-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.upload-tip {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* 6. Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #FFF;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(91, 112, 101, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(91, 112, 101, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(140, 116, 98, 0.25);
  color: var(--color-text);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}

/* 7. Itinerary Section */
.itinerary-section { padding-top: 30px; }

.timeline {
  position: relative;
  max-width: 720px;
  margin: 32px auto 0;
  padding-left: 10px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 29px; top: 20px; bottom: 20px;
  width: 2px;
  background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-amber) 100%);
  opacity: 0.4;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
}

.timeline-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #FFF;
  border: 2px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  z-index: 2;
  flex-shrink: 0;
}

.timeline-content {
  flex: 1;
  padding: 18px 20px;
  text-align: left;
}

.time-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  background: rgba(91, 112, 101, 0.12);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 6px;
}

.timeline-content h3 { font-size: 1.1rem; margin-bottom: 4px; }
.timeline-content p { font-size: 0.88rem; color: var(--color-text-muted); }

/* 8. Wish Candle Section */
.wish-card {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px;
  text-align: center;
}

.interactive-cake-container {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cake-illustration {
  position: relative;
  width: 240px; height: 180px;
}

.cake-img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.candle-flame {
  position: absolute;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  width: 16px; height: 24px;
  cursor: pointer;
}

.flame-inner {
  width: 100%; height: 100%;
  background: linear-gradient(180deg, #FFF 0%, #FFD000 40%, #FF5500 100%);
  border-radius: 50% 50% 35% 35%;
  animation: flame-flicker 0.15s infinite alternate ease-in-out;
}

.candle-flame.off { opacity: 0; pointer-events: none; }

@keyframes flame-flicker {
  0% { transform: scale(1) rotate(-1deg); }
  100% { transform: scale(1.08) rotate(1deg); }
}

.wish-controls { margin-top: 24px; }

/* 9. Modals & Lightbox */
.modal-overlay, .lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(43, 45, 47, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.hidden, .lightbox-overlay.hidden {
  opacity: 0; pointer-events: none;
}

.modal-card {
  position: relative;
  width: 100%; max-width: 500px;
  background: #FFF;
  padding: 28px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  /* 最高只到螢幕的 90%，超出的內容交給內部區塊滾動 */
  max-height: 90vh;
  max-height: 90dvh; /* 手機網址欄收放時比 vh 準確 */
  display: flex;
  flex-direction: column;
}

.modal-close, .lightbox-close {
  position: absolute; top: 14px; right: 16px;
  background: transparent; border: none;
  font-size: 1.8rem; color: var(--color-text-muted);
  cursor: pointer;
}

/* 防劇透確認視窗 */
.guard-card {
  max-width: 420px;
  text-align: center;
  padding: 34px 28px 28px;
}

.guard-icon {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 12px;
}

.guard-title {
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.guard-desc {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.guard-desc strong {
  color: var(--color-accent);
  font-weight: 700;
  white-space: nowrap;
}

.guard-question {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 22px;
}

.guard-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.letter-card {
  max-width: 560px;
  background: #FAF7F2;
  border: 2px solid var(--color-accent-light);
  font-family: var(--font-serif);
}

.letter-header {
  flex: 0 0 auto;
  border-bottom: 1px dashed rgba(140, 116, 98, 0.3);
  padding-bottom: 14px; margin-bottom: 18px;
  text-align: center;
}

/* 信件內文是唯一會滾動的區塊，抬頭與底部按鈕固定不動 */
.letter-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(140, 116, 98, 0.4) transparent;
}

.letter-body::-webkit-scrollbar { width: 6px; }
.letter-body::-webkit-scrollbar-track { background: transparent; }
.letter-body::-webkit-scrollbar-thumb {
  background: rgba(140, 116, 98, 0.35);
  border-radius: var(--radius-full);
}
.letter-body::-webkit-scrollbar-thumb:hover { background: rgba(140, 116, 98, 0.55); }

.letter-footer {
  flex: 0 0 auto;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px dashed rgba(140, 116, 98, 0.3);
  text-align: center;
}

.letter-stamp {
  font-size: 0.72rem;
  background: rgba(242, 196, 206, 0.45);
  color: var(--color-accent);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 6px;
}

.letter-body p {
  font-size: 0.95rem; line-height: 1.8;
  margin-bottom: 14px; color: #383A3C;
}

.letter-sign { text-align: right; font-weight: 600; margin-top: 20px; color: var(--color-accent); }

.lightbox-content img {
  max-width: 90vw; max-height: 70vh;
  border-radius: var(--radius-md);
  object-fit: contain;
}

.lightbox-caption { color: #FFF; margin-top: 12px; font-size: 0.95rem; font-family: var(--font-serif); }

.file-dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 20px; border: 2px dashed rgba(140, 116, 98, 0.3);
  border-radius: var(--radius-md); cursor: pointer;
  color: var(--color-text-muted);
}

.modal-divider { text-align: center; margin: 14px 0; position: relative; }
.modal-divider::before { content: ''; position: absolute; left: 0; top: 50%; width: 100%; height: 1px; background: rgba(0,0,0,0.1); }
.modal-divider span { position: relative; background: #FFF; padding: 0 10px; color: var(--color-text-muted); font-size: 0.8rem; }

.modal-input-group { display: flex; gap: 8px; }
.modal-input-group input[type="url"] { flex: 1; padding: 8px 12px; border: 1px solid rgba(140, 116, 98, 0.3); border-radius: var(--radius-sm); font-size: 0.88rem; }

/* 10. Corner Mascot Cat ("呆呆貓") */
.cat-mascot-container {
  position: fixed;
  bottom: 80px;
  right: 20px;
  z-index: 950;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

@media (min-width: 769px) {
  .cat-mascot-container { bottom: 24px; right: 28px; }
}

.cat-speech-bubble {
  background: #FFF;
  color: var(--color-text);
  padding: 6px 12px;
  border-radius: 12px 12px 2px 12px;
  font-size: 0.78rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 6px;
  max-width: 180px;
  border: 1px solid rgba(140, 116, 98, 0.15);
}

/* 11. Mobile Bottom Quick Bar */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(140, 116, 98, 0.15);
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-nav .mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--color-text-muted);
  font-size: 0.72rem;
  gap: 2px;
}

.mobile-bottom-nav .mobile-nav-item.active {
  color: var(--color-primary-dark);
  font-weight: 600;
}

.mobile-bottom-nav .mobile-nav-item .icon { font-size: 1.1rem; }

/* 12. Responsive Breakpoints & Mobile Optimization */
@media (max-width: 768px) {
  .mobile-bottom-nav { display: flex; }
  .mobile-menu-btn { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: rgba(244, 241, 234, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid rgba(140, 116, 98, 0.15);
    box-shadow: var(--shadow-md);
  }

  .site-nav.open { display: flex; }

  .carousel-card.polaroid-style { width: 250px; }
  .carousel-card.prev-card { transform: translateX(-120px) scale(0.85); }
  .carousel-card.next-card { transform: translateX(120px) scale(0.85); }
  
  .timeline::before { left: 19px; }
  .timeline-item { gap: 12px; }
  .timeline-icon { width: 32px; height: 32px; font-size: 0.95rem; }
  .wish-card { padding: 28px 14px; }
}

.site-footer {
  text-align: center;
  padding: 32px 20px;
  background: rgba(244, 241, 234, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(140, 116, 98, 0.2);
  margin-top: 50px;
  color: #2F3336;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: 0 -4px 20px rgba(43, 45, 47, 0.05);
}

.footer-sub { font-size: 0.78rem; margin-top: 4px; color: #5C6266; }

/* 13. Multi-Page Navigation Cards & Spoiler Prevention */
.page-switch-container {
  max-width: 880px;
  margin: 40px auto 0;
}

.page-switch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.page-switch-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: var(--glass-border);
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: var(--color-text);
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-fast);
  overflow: hidden;
}

.page-switch-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(91, 112, 101, 0.4);
}

.page-switch-card.active-page {
  border: 2px solid var(--color-primary);
  background: rgba(255, 255, 255, 0.95);
}

.page-card-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.page-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 8px;
  align-self: flex-start;
}

.page-card-badge.badge-night {
  background: rgba(43, 45, 47, 0.1);
  color: #2B2D2F;
}

.page-card-badge.badge-day {
  background: rgba(217, 160, 91, 0.2);
  color: #8C541E;
}

.page-card-badge.badge-evening {
  background: rgba(140, 116, 98, 0.2);
  color: #5B3F2E;
}

.page-switch-card h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  color: var(--color-text);
}

.page-switch-card p {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.page-card-btn {
  margin-top: auto;
  align-self: flex-start;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Spoiler Overlay styling for Evening Itinerary */
.spoiler-container {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.spoiler-content {
  transition: filter 0.5s ease, opacity 0.5s ease;
}

.spoiler-content.blurred {
  filter: blur(12px);
  pointer-events: none;
  user-select: none;
  opacity: 0.4;
}

.spoiler-overlay-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 20px;
  background: rgba(30, 32, 38, 0.72);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  z-index: 100;
  border-radius: var(--radius-lg);
  color: #FFF;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.spoiler-overlay-card.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.spoiler-overlay-card h3 {
  font-size: 1.4rem;
  color: #FFF;
  margin-bottom: 10px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.spoiler-overlay-card p {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 480px;
  margin-bottom: 24px;
  line-height: 1.6;
}

.spoiler-unlock-btn {
  background: linear-gradient(135deg, var(--color-amber) 0%, #C48038 100%);
  color: #FFF;
  border: none;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(217, 160, 91, 0.4);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.spoiler-unlock-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 30px rgba(217, 160, 91, 0.6);
}

