/* ==========================================================================
   PERNIKAHAN ALDI & GANIA — STORYBOOK INVITATION SYSTEM
   Theme: A Love Story in an Enchanted Garden
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Primary Theme Palette */
  --green-primary: #8FB887;
  --pink-primary: #F6C6DE;
  
  /* Supporting Palette */
  --cream-bg: #FAF6EE;
  --parchment-paper: #F7F1E5;
  --ivory-card: #FFFDF9;
  --sage-soft: #D8E6D3;
  --forest-dark: #365338;
  --dusty-rose: #E5A9BC;
  
  /* Typography Colors */
  --text-main: #4A3E3D;
  --text-muted: #7A6C6B;
  --text-light: #9E8E8D;
  
  /* Accent Colors */
  --gold-accent: #D4AF37;
  --gold-soft: #E6C875;
  --shadow-warm: rgba(74, 62, 61, 0.12);
  --shadow-deep: rgba(54, 83, 56, 0.18);
  
  /* Typography Families */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-script: 'Great Vibes', cursive;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  
  /* Layout Spacing */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE STYLES
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: #2D3A2D; /* Rich outer background for storybook desktop viewing */
}

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--cream-bg);
  background-image: 
    radial-gradient(var(--pink-primary) 0.5px, transparent 0.5px),
    radial-gradient(var(--green-primary) 0.5px, var(--cream-bg) 0.5px);
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Body lock when cover overlay is open */
body.cover-active {
  overflow: hidden;
}

/* Canvas Particle Animation Layer */
#petal-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99;
}

/* Typography Helpers */
.font-serif { font-family: var(--font-serif); }
.font-script { font-family: var(--font-script); }

/* --------------------------------------------------------------------------
   3. STORYBOOK COVER OVERLAY (MODAL OPENER)
   -------------------------------------------------------------------------- */
.cover-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: linear-gradient(135deg, rgba(54, 83, 56, 0.95), rgba(74, 62, 61, 0.92)),
              url('../assets/illustrations/storybook-cover-bg.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  transition: opacity 0.8s ease, transform 0.8s ease, visibility 0.8s;
}

.cover-overlay.opened {
  opacity: 0;
  transform: scale(1.05);
  visibility: hidden;
  pointer-events: none;
}

.cover-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--ivory-card);
  background-image: radial-gradient(rgba(246, 198, 222, 0.2) 1px, transparent 0);
  background-size: 16px 16px;
  border: 3px double var(--green-primary);
  border-radius: var(--radius-lg);
  padding: 40px 24px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), inset 0 0 20px rgba(246, 198, 222, 0.3);
  animation: coverPulse 6s ease-in-out infinite alternate;
}

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

/* Frame Corner Decorations */
.cover-decor {
  position: absolute;
  font-size: 1.5rem;
  user-select: none;
}
.cover-decor.top-left { top: 12px; left: 14px; }
.cover-decor.top-right { top: 12px; right: 14px; }
.cover-decor.bottom-left { bottom: 12px; left: 14px; }
.cover-decor.bottom-right { bottom: 12px; right: 14px; }

.cover-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--forest-dark);
  letter-spacing: 1px;
}

.cover-title {
  font-size: 3.2rem;
  color: var(--forest-dark);
  line-height: 1.1;
  margin: 12px 0 8px;
  text-shadow: 1px 1px 2px rgba(246, 198, 222, 0.6);
}

.cover-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--green-primary);
  margin: 12px 0;
}
.cover-divider .line {
  height: 1px;
  width: 60px;
  background: linear-gradient(90deg, transparent, var(--green-primary), transparent);
}

.cover-tagline {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.cover-guest-box {
  background: var(--cream-bg);
  border: 1px dashed var(--green-primary);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.guest-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
}
.guest-name {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--forest-dark);
  margin-top: 4px;
}

.cover-date-badge {
  display: inline-block;
  background: var(--pink-primary);
  color: var(--forest-dark);
  font-family: var(--font-serif);
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 20px;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.btn-open-story {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--green-primary), var(--forest-dark));
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.05rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(54, 83, 56, 0.3);
  transition: var(--transition-smooth);
}
.btn-open-story:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(54, 83, 56, 0.4);
}
.btn-open-story:active {
  transform: translateY(1px);
}

/* --------------------------------------------------------------------------
   4. MAIN WRAPPER & STORYBOOK CONTAINER
   -------------------------------------------------------------------------- */
.storybook-wrapper {
  max-width: 480px; /* Perfect storybook mobile width */
  margin: 0 auto;
  background-color: var(--cream-bg);
  min-height: 100vh;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.25);
  position: relative;
  padding-bottom: 60px;
}

.storybook-header {
  text-align: center;
  padding: 30px 20px 10px;
}
.storybook-badge {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--forest-dark);
  border-bottom: 1px solid var(--green-primary);
  padding-bottom: 4px;
}

/* --------------------------------------------------------------------------
   5. REUSABLE STORYBOOK CHAPTER SECTIONS & PAPER CARDS
   -------------------------------------------------------------------------- */
.storybook-chapter {
  padding: 45px 20px;
  text-align: center;
  position: relative;
}

.chapter-badge {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--forest-dark);
  background: var(--pink-primary);
  padding: 4px 14px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.chapter-heading {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  color: var(--forest-dark);
  line-height: 1.2;
}

.chapter-subheading {
  font-size: 2rem;
  color: var(--green-primary);
  margin-top: -4px;
  margin-bottom: 24px;
}

/* Storybook Parchment Paper Card */
.paper-card {
  background: var(--ivory-card);
  background-image: linear-gradient(to bottom, rgba(247, 241, 229, 0.4), var(--ivory-card));
  border: 1px solid rgba(143, 184, 135, 0.35);
  border-radius: var(--radius-md);
  padding: 28px 22px;
  box-shadow: 0 8px 24px var(--shadow-warm);
  position: relative;
}

.paper-card::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px stroke rgba(246, 198, 222, 0.4);
  border-radius: calc(var(--radius-md) - 4px);
  pointer-events: none;
}

.story-hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--green-primary), transparent);
  margin: 20px 0;
}

/* --------------------------------------------------------------------------
   6. CHAPTER SPECIFIC STYLING
   -------------------------------------------------------------------------- */

/* Chapter I: Welcome */
.quote-text {
  font-size: 1.2rem;
  font-style: italic;
  color: var(--forest-dark);
  line-height: 1.6;
}
.quote-author {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
  font-weight: 500;
}
.welcome-narrative {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.7;
}

/* Chapter II: Couple */
.couple-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
}

.couple-card {
  width: 100%;
}

.portrait-frame {
  position: relative;
  width: 170px;
  height: 170px;
  margin: 0 auto 16px;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, var(--green-primary), var(--pink-primary));
  box-shadow: 0 10px 20px var(--shadow-warm);
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--ivory-card);
}

.person-name {
  font-size: 1.7rem;
  color: var(--forest-dark);
  margin-bottom: 8px;
}

.parent-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.couple-ampersand {
  font-size: 3.5rem;
  color: var(--pink-primary);
  line-height: 1;
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-primary {
  background: var(--forest-dark);
  color: #FFFFFF;
  border: none;
}
.btn-primary:hover {
  background: #253A26;
  transform: translateY(-2px);
}
.btn-secondary {
  background: var(--sage-soft);
  color: var(--forest-dark);
  border: 1px solid var(--green-primary);
}
.btn-secondary:hover {
  background: var(--green-primary);
  color: #FFFFFF;
}

/* Chapter III: Timeline */
.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}
.timeline-container::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: linear-gradient(to bottom, var(--green-primary), var(--pink-primary));
}
.timeline-item {
  display: flex;
  gap: 16px;
  text-align: left;
}
.timeline-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: var(--ivory-card);
  border: 2px solid var(--green-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 2;
  box-shadow: 0 4px 10px var(--shadow-warm);
}
.timeline-content {
  flex-grow: 1;
  padding: 18px;
}
.timeline-date {
  font-size: 1.4rem;
  color: var(--green-primary);
  display: block;
}
.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--forest-dark);
  margin: 4px 0 8px;
}
.timeline-content p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Chapter IV: Countdown */
.countdown-card {
  text-align: center;
}
.timer-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.time-box {
  background: var(--cream-bg);
  border: 1px solid var(--pink-primary);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  min-width: 68px;
}
.time-num {
  display: block;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--forest-dark);
  line-height: 1;
}
.time-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 4px;
}
.time-separator {
  font-size: 1.8rem;
  color: var(--green-primary);
  font-weight: 700;
}

/* Chapter V & VI: Event Cards */
.event-card {
  text-align: center;
}
.event-icon {
  font-size: 2.4rem;
  margin-bottom: 8px;
}
.event-title {
  font-size: 1.8rem;
  color: var(--forest-dark);
  margin-bottom: 16px;
}
.event-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  font-size: 0.92rem;
}
.detail-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-main);
}
.detail-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}
.dress-code {
  background: var(--cream-bg);
  padding: 10px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--pink-primary);
  font-size: 0.85rem;
}

/* Chapter VII: Venue Map */
.map-frame {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--green-primary);
  margin-bottom: 16px;
}
.venue-info h4 {
  font-size: 1.3rem;
  color: var(--forest-dark);
  margin-bottom: 4px;
}
.venue-info p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.map-btn {
  width: 100%;
}

/* Chapter VIII: Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 4/5;
  cursor: pointer;
  box-shadow: 0 6px 15px var(--shadow-warm);
  border: 2px solid var(--ivory-card);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}
.gallery-item:hover img {
  transform: scale(1.08);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(54, 83, 56, 0.4);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  padding: 20px;
}
.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}
.lightbox-content {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: var(--radius-sm);
  border: 2px solid var(--ivory-card);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #FFFFFF;
  font-size: 2.5rem;
  cursor: pointer;
}

/* Chapter IX: RSVP Form */
.rsvp-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.rsvp-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--forest-dark);
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--green-primary);
  border-radius: var(--radius-sm);
  background: var(--cream-bg);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.3s;
}
.form-input:focus {
  border-color: var(--forest-dark);
  box-shadow: 0 0 0 3px rgba(143, 184, 135, 0.3);
}
.radio-options {
  display: flex;
  gap: 10px;
}
.radio-card {
  flex: 1;
  cursor: pointer;
}
.radio-card input {
  display: none;
}
.radio-custom {
  display: block;
  text-align: center;
  padding: 10px 8px;
  border: 1px solid var(--green-primary);
  border-radius: var(--radius-sm);
  background: var(--cream-bg);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-main);
  transition: var(--transition-smooth);
}
.radio-card input:checked + .radio-custom {
  background: var(--green-primary);
  color: #FFFFFF;
  border-color: var(--forest-dark);
  font-weight: 600;
}
.btn-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
}

/* Chapter X: Wishes Guestbook */
.wishes-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}
.wish-item {
  background: var(--cream-bg);
  border-left: 3px solid var(--green-primary);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: left;
}
.wish-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.wish-author {
  font-size: 1.05rem;
  color: var(--forest-dark);
}
.wish-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}
.wish-badge.status-hadir {
  background: var(--sage-soft);
  color: var(--forest-dark);
}
.wish-badge.status-absen {
  background: #FCE4EC;
  color: #C2185B;
}
.wish-text {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.5;
}
.wish-time {
  display: block;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 6px;
}

/* Chapter XI: Gift */
.gift-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.bank-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}
.bank-card {
  background: var(--cream-bg);
  border: 1px solid var(--pink-primary);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: left;
}
.bank-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.bank-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}
.bank-logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--forest-dark);
}
.account-num {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--forest-dark);
  letter-spacing: 1px;
}
.account-name {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.btn-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  background: var(--ivory-card);
  border: 1px solid var(--green-primary);
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--forest-dark);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.btn-copy:hover {
  background: var(--green-primary);
  color: #FFFFFF;
}
.physical-gift-box {
  background: var(--cream-bg);
  border: 1px stroke var(--green-primary);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: left;
}
.physical-gift-box h4 {
  font-size: 1.1rem;
  color: var(--forest-dark);
  margin-bottom: 6px;
}
.physical-gift-box p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

/* Chapter XII: Closing */
.closing-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-main);
  margin-bottom: 16px;
}
.closing-thanks {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.sign-label {
  font-size: 0.85rem;
  color: var(--text-light);
}
.sign-names {
  font-size: 3.2rem;
  color: var(--forest-dark);
  line-height: 1.1;
  margin: 6px 0;
}
.sign-families {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}
.closing-ornament {
  margin-top: 24px;
  font-size: 1.1rem;
}

.storybook-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.78rem;
  color: var(--text-light);
}

/* --------------------------------------------------------------------------
   7. FLOATING MUSIC TOGGLE & NAV MENU
   -------------------------------------------------------------------------- */
.music-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 900;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--forest-dark);
  color: #FFFFFF;
  border: 2px solid var(--pink-primary);
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s;
}
.music-toggle.hidden {
  display: none;
}
.music-disc {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.music-icon {
  width: 22px;
  height: 22px;
}
.music-toggle.playing .music-icon {
  animation: discSpin 4s linear infinite;
}
@keyframes discSpin {
  100% { transform: rotate(360deg); }
}

/* Floating Chapter Bookmark Navigation */
.story-nav {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 900;
}
.story-nav.hidden {
  display: none;
}
.nav-toggle-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--ivory-card);
  border: 1px solid var(--green-primary);
  border-radius: 25px;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--forest-dark);
  box-shadow: 0 6px 18px var(--shadow-warm);
  cursor: pointer;
}
.nav-menu {
  position: absolute;
  bottom: 50px;
  left: 0;
  width: 200px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--ivory-card);
  border: 1px solid var(--green-primary);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px var(--shadow-deep);
  list-style: none;
  padding: 8px 0;
  display: none;
}
.nav-menu.open {
  display: block;
}
.nav-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 0.82rem;
  color: var(--text-main);
  text-decoration: none;
  transition: background 0.2s;
}
.nav-menu li a:hover {
  background: var(--sage-soft);
  color: var(--forest-dark);
}
.chapter-num {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--green-primary);
  width: 18px;
}

/* --------------------------------------------------------------------------
   8. TOAST NOTIFICATIONS
   -------------------------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--forest-dark);
  color: #FFFFFF;
  font-size: 0.85rem;
  padding: 10px 20px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  animation: toastFade 3s ease forwards;
}
@keyframes toastFade {
  0% { opacity: 0; transform: translateY(-10px); }
  15% { opacity: 1; transform: translateY(0); }
  85% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* --------------------------------------------------------------------------
   9. SCROLL REVEAL ANIMATIONS & ACCESSIBILITY
   -------------------------------------------------------------------------- */
.reveal-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal-section.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Responsive Scaling for Desktop Frame */
@media (min-width: 600px) {
  .storybook-wrapper {
    margin: 40px auto;
    border-radius: var(--radius-lg);
    border: 8px solid #3E5C38;
  }
}
