/* ============================================================
   ROMANTIC BIRTHDAY SCRAPBOOK ALBUM (ST.PAGEFLIP ENGINE)
   Realistic Page Peel, Physical Mouse Drag Interactions & Leather Cover
   ============================================================ */

:root {
  /* Rich Book Binding Colors */
  --leather-deep: #2F0710;
  --leather-main: #4F1220;
  --leather-light: #721C30;
  --leather-border: rgba(212, 175, 55, 0.5);
  --gold-foil: #D4AF37;
  --gold-light: #F7E19A;
  --gold-glow: rgba(212, 175, 55, 0.4);

  /* Organic Paper & Scrapbook Surfaces */
  --paper-cream: #FCF9F4;
  --paper-aged: #F7EFE4;
  --paper-border: rgba(142, 14, 41, 0.08);

  /* Accents & Ink Colors */
  --ink-primary: #2C181D;
  --ink-soft: #634F55;
  --rose-primary: #8E0E29;
  --rose-soft: #C64F6D;
  --rose-blush: #FFDEE5;
  --shadow-polaroid: 0 6px 18px rgba(35, 10, 15, 0.15), 0 1px 3px rgba(0, 0, 0, 0.08);

  /* Typography with 100% Native Vietnamese Diacritics Support */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Be Vietnam Pro', -apple-system, sans-serif;
  --font-hand: 'Patrick Hand', 'Be Vietnam Pro', cursive, sans-serif;
  --font-script: 'Charm', 'Playfair Display', cursive, serif;
}

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

button *, a * {
  pointer-events: none;
}

html, body {
  width: 100%;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink-primary);
  background: #F4EAE4;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Room Glow Background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 215, 225, 0.5) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 80%, rgba(212, 175, 55, 0.18) 0%, transparent 50%),
    linear-gradient(135deg, #F5EBE6 0%, #EFE1DA 100%);
  pointer-events: none;
  z-index: 0;
}

/* Floating Rose Petals (Subtle & In Background) */
#petals-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* Confetti Container */
.confetti-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% { transform: translateY(0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg) scale(0.5); opacity: 0; }
}


/* ============================================================
   TOP BAR / QUICK STATUS & MUSIC
   ============================================================ */
.top-bar {
  position: relative;
  z-index: 100;
  max-width: 1040px;
  margin: 0 auto;
  padding: 14px 20px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 7px 16px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(90, 20, 35, 0.06);
  border: 1px solid rgba(142, 14, 41, 0.12);
}

.badge-heart {
  font-size: 0.95rem;
  animation: pulseBeat 1.8s ease-in-out infinite;
}

.badge-title {
  font-family: var(--font-serif);
  font-size: 0.88rem;
  font-style: italic;
  font-weight: 600;
  color: var(--rose-primary);
}

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

.music-pill-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(142, 14, 41, 0.15);
  color: var(--ink-primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(90, 20, 35, 0.06);
  transition: all 0.25s ease;
}

.music-pill-btn:hover {
  background: #FFFFFF;
  border-color: var(--rose-primary);
  transform: translateY(-1px);
}

.vinyl-mini {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #252525 0%, #111111 60%, #050505 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.music-pill-btn.playing .vinyl-mini {
  animation: spinRecord 2.8s linear infinite;
}

@keyframes spinRecord {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.vinyl-mini-center {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold-foil);
  border: 1px solid #FFFFFF;
}

.icon-round-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(142, 14, 41, 0.15);
  color: var(--rose-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(90, 20, 35, 0.06);
  transition: all 0.2s ease;
}

.icon-round-btn:hover {
  background: var(--rose-primary);
  color: #FFFFFF;
}


/* ============================================================
   THE REALISTIC BOOK STAGE & WRAPPER
   ============================================================ */
.album-stage {
  position: relative;
  z-index: 10;
  max-width: 1040px;
  width: 96%;
  margin: 28px auto 35px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Ambient Ground Shadows */
.book-ambient-shadow {
  position: absolute;
  top: 40px;
  width: 90%;
  height: 88%;
  background: rgba(45, 12, 18, 0.22);
  border-radius: 28px;
  filter: blur(28px);
  pointer-events: none;
  z-index: 1;
  transform: translateY(18px) scale(0.96);
}

.book-ground-shadow {
  position: absolute;
  bottom: 60px;
  width: 84%;
  height: 32px;
  background: rgba(30, 8, 12, 0.22);
  border-radius: 50%;
  filter: blur(14px);
  pointer-events: none;
  z-index: 1;
}

/* Book Outer Shell Container */
.book-wrapper {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 980px;
  padding: 10px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--leather-light) 0%, var(--leather-main) 50%, var(--leather-deep) 100%);
  box-shadow:
    0 24px 60px -10px rgba(45, 10, 18, 0.42),
    0 8px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.25),
    inset 0 -2px 5px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.3);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* ============================================================
   REALISTIC SINGLE-COVER CENTERING FOR FRONT (P0) & BACK (P9)
   Prevents phantom blank halves when book is closed in 2-page landscape
   ============================================================ */
@media (min-width: 769px) {
  /* FRONT COVER MODE (Page 0) */
  .book-wrapper.is-cover-front {
    transform: translateX(calc(-25% + 5px));
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .book-wrapper.is-cover-front .metal-corner,
  .book-wrapper.is-cover-front .bookmark-ribbon {
    display: none !important;
  }

  .book-wrapper.is-cover-front .flipbook {
    box-shadow: none !important;
    overflow: visible;
  }

  .book-wrapper.is-cover-front .book-cover-front {
    box-shadow:
      0 26px 65px -10px rgba(45, 10, 18, 0.48),
      0 10px 28px rgba(0, 0, 0, 0.28),
      inset 0 1px 1px rgba(255, 255, 255, 0.2),
      inset 0 -2px 6px rgba(0, 0, 0, 0.5) !important;
    border-radius: 4px 16px 16px 4px !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
  }

  /* Book spine depth highlight on the left edge of front cover */
  .book-wrapper.is-cover-front .book-cover-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.4) 0%, rgba(255, 255, 255, 0.08) 35%, rgba(0, 0, 0, 0.2) 75%, transparent 100%);
    pointer-events: none;
    z-index: 5;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
  }

  /* BACK COVER MODE (Page 9) */
  .book-wrapper.is-cover-back {
    transform: translateX(calc(25% - 5px));
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  .book-wrapper.is-cover-back .metal-corner,
  .book-wrapper.is-cover-back .bookmark-ribbon {
    display: none !important;
  }

  .book-wrapper.is-cover-back .flipbook {
    box-shadow: none !important;
    overflow: visible;
  }

  .book-wrapper.is-cover-back .book-cover-back {
    box-shadow:
      0 26px 65px -10px rgba(45, 10, 18, 0.48),
      0 10px 28px rgba(0, 0, 0, 0.28),
      inset 0 1px 1px rgba(255, 255, 255, 0.2),
      inset 0 -2px 6px rgba(0, 0, 0, 0.5) !important;
    border-radius: 16px 4px 4px 16px !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
  }

  /* Book spine depth highlight on the right edge of back cover */
  .book-wrapper.is-cover-back .book-cover-back::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 22px;
    height: 100%;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.4) 0%, rgba(255, 255, 255, 0.08) 35%, rgba(0, 0, 0, 0.2) 75%, transparent 100%);
    pointer-events: none;
    z-index: 5;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
  }

  /* OPEN SPREAD MODE (Pages 1 to 8) */
  .book-wrapper.is-open-spread {
    transform: translateX(0);
  }

  /* Ground ambient shadows adapt to single cover vs open 2-page spread */
  .album-stage.mode-cover-front .book-ambient-shadow,
  .album-stage.mode-cover-back .book-ambient-shadow {
    width: 48%;
    left: 26%;
    transition: width 0.55s ease, left 0.55s ease;
  }

  .album-stage.mode-cover-front .book-ground-shadow,
  .album-stage.mode-cover-back .book-ground-shadow {
    width: 44%;
    left: 28%;
    transition: width 0.55s ease, left 0.55s ease;
  }

  .album-stage .book-ambient-shadow,
  .album-stage .book-ground-shadow {
    transition: width 0.55s ease, left 0.55s ease;
  }
}


/* Brass Metal Corners */
.metal-corner {
  position: absolute;
  width: 32px;
  height: 32px;
  pointer-events: none;
  z-index: 30;
  border: 2px solid var(--gold-foil);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.metal-corner.corner-tl { top: 5px; left: 5px; border-right: none; border-bottom: none; border-top-left-radius: 14px; }
.metal-corner.corner-tr { top: 5px; right: 5px; border-left: none; border-bottom: none; border-top-right-radius: 14px; }
.metal-corner.corner-bl { bottom: 5px; left: 5px; border-right: none; border-top: none; border-bottom-left-radius: 14px; }
.metal-corner.corner-br { bottom: 5px; right: 5px; border-left: none; border-top: none; border-bottom-right-radius: 14px; }

/* Bookmark Ribbon Hanging Down */
.bookmark-ribbon {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 66px;
  background: linear-gradient(to bottom, #9E1A35 0%, #750B20 100%);
  border-radius: 0 0 3px 3px;
  box-shadow: 0 5px 12px rgba(0,0,0,0.35);
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 5px;
  cursor: pointer;
  transition: height 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bookmark-ribbon:hover {
  height: 76px;
}

.ribbon-charm {
  color: var(--gold-foil);
  font-size: 10px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}


/* ============================================================
   PAGEFLIP CONTAINER & BOOK PAGES
   ============================================================ */
.flipbook {
  position: relative;
  width: 100%;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.12);
}

/* Individual Book Page Styles */
.book-page {
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  background: var(--paper-cream);
  padding: 26px 28px 20px;
}

/* Hardcover Styles (Page 0 and Page 9) */
.book-cover {
  background: linear-gradient(135deg, #7A2135 0%, #521321 45%, #340913 100%);
  color: #FFFDF9;
  padding: 20px;
  box-shadow: inset 0 0 40px rgba(0,0,0,0.5);
}

.cover-inner-border {
  height: 100%;
  border: 2px solid var(--leather-border);
  outline: 1px dashed rgba(212, 175, 55, 0.3);
  outline-offset: -7px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 22px 18px 16px;
  text-align: center;
  background: radial-gradient(circle at 50% 45%, rgba(142, 14, 41, 0.3) 0%, transparent 70%);
}

.cover-filigree-top {
  color: var(--gold-foil);
  font-size: 1rem;
  letter-spacing: 0.4em;
  opacity: 0.85;
}

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

.cover-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--gold-light);
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.cover-title {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.15;
  color: #FFF;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.cover-title span {
  font-style: italic;
  font-family: var(--font-hand);
  font-size: 2.3rem;
  color: var(--gold-light);
  display: block;
}

.cover-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 60%;
  margin: 2px 0;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-foil), transparent);
}

.divider-heart {
  color: var(--gold-foil);
  font-size: 1rem;
}

.cover-name {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 600;
  font-style: italic;
  color: #FFF;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.cover-subtitle {
  font-family: var(--font-hand);
  font-size: 1.08rem;
  color: var(--gold-light);
  opacity: 0.9;
}


/* ============================================================
   COVER COMBINATION PADLOCK (VINTAGE BRASS LOCK)
   ============================================================ */
.cover-lock-card {
  position: relative;
  width: 90%;
  max-width: 290px;
  margin: 10px auto 4px;
  z-index: 25;
  pointer-events: auto !important;
  transition: transform 0.35s ease, opacity 0.4s ease;
}

.cover-lock-card.shake {
  animation: lockShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes lockShake {
  10%, 90% { transform: translate3d(-3px, 0, 0); }
  20%, 80% { transform: translate3d(5px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

.cover-lock-card.unlocked {
  transform: scale(1.08);
  opacity: 0;
  pointer-events: none !important;
}

/* Metal Shackle */
.lock-shackle {
  width: 68px;
  height: 38px;
  margin: 0 auto -8px;
  position: relative;
  z-index: 1;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shackle-curve {
  width: 100%;
  height: 100%;
  border: 7px solid #D4AF37;
  border-bottom: none;
  border-radius: 34px 34px 0 0;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.6), 0 2px 8px rgba(0,0,0,0.4);
  background: transparent;
}

.cover-lock-card.open .lock-shackle {
  transform: translateY(-16px) rotate(-15deg);
}

/* Padlock Body */
.lock-body-box {
  background: linear-gradient(135deg, #B8860B 0%, #D4AF37 50%, #8C6212 100%);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow:
    0 10px 25px rgba(0,0,0,0.5),
    inset 0 1px 2px rgba(255,255,255,0.7),
    inset 0 -2px 5px rgba(0,0,0,0.4);
  border: 1.5px solid #FDF0B0;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.lock-header-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.lock-gem {
  font-size: 0.9rem;
}

.lock-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #382408;
}

.lock-hint-text {
  font-size: 0.68rem;
  color: #4A300A;
  font-weight: 600;
  margin-bottom: 8px;
}

/* 4 Tumblers */
.tumblers-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.tumbler-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(40, 20, 5, 0.25);
  border-radius: 8px;
  padding: 3px 5px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.tumbler-arrow {
  background: none;
  border: none;
  color: #382005;
  font-size: 0.65rem;
  padding: 1px 6px;
  cursor: pointer;
  pointer-events: auto !important;
  transition: transform 0.15s, color 0.15s;
}

.tumbler-arrow:hover {
  color: #FFF;
  transform: scale(1.3);
}

.tumbler-val {
  width: 32px;
  height: 34px;
  background: #1C1108;
  color: #F7E19A;
  font-family: monospace;
  font-size: 1.35rem;
  font-weight: 700;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.8), 0 1px 1px rgba(255,255,255,0.2);
  border: 1px solid #744E11;
  user-select: none;
}

/* Unlock Action Button */
.unlock-action-btn {
  background: linear-gradient(135deg, #8E0E29 0%, #5E0518 100%);
  color: #FFF;
  border: 1px solid rgba(255, 215, 0, 0.5);
  padding: 7px 18px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  pointer-events: auto !important;
  box-shadow: 0 4px 12px rgba(90, 10, 20, 0.4);
  transition: all 0.2s ease;
}

.unlock-action-btn:hover {
  background: #A81B39;
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 16px rgba(90, 10, 20, 0.5);
}

.btn-lock-icon {
  font-size: 0.85rem;
}

.lock-feedback-msg {
  font-size: 0.7rem;
  font-weight: 600;
  color: #2D1405;
  margin-top: 4px;
  min-height: 14px;
}

.cover-drag-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--gold-light);
  background: rgba(0, 0, 0, 0.35);
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.25);
  animation: pulseBeat 2.5s ease-in-out infinite;
}

.hint-icon {
  font-size: 0.95rem;
}

/* Back Cover */
.book-cover-back {
  background: linear-gradient(135deg, #521321 0%, #340913 70%, #20040A 100%);
}

.back-cover-center {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.back-cover-monogram {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid var(--gold-foil);
  outline: 1px dashed rgba(212, 175, 55, 0.4);
  outline-offset: -5px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
  margin-bottom: 4px;
}

.monogram-circle span {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  font-style: italic;
  color: var(--gold-light);
}

.back-cover-seal-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  font-style: italic;
  color: var(--gold-light);
  letter-spacing: 0.08em;
}

.back-cover-quote {
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: #FFF;
  opacity: 0.9;
}

.back-cover-date {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  color: var(--gold-foil);
  font-family: monospace;
}


/* Cotton Rag Paper Pages */
.page-paper {
  background: var(--paper-cream);
  box-shadow: inset 0 0 25px rgba(120, 80, 50, 0.06);
}

.page-paper.page-left {
  background: linear-gradient(to right, #FCF9F4 0%, #FCF9F4 90%, #EFE5D9 100%);
  padding-right: 30px;
}

.page-paper.page-right {
  background: linear-gradient(to right, #EFE5D9 0%, #FFFDF9 10%, #FFFDF9 100%);
  padding-left: 30px;
}


/* ============================================================
   PAGE HEADER & TYPOGRAPHY REFINEMENTS
   ============================================================ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
}

.chapter-tag {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--rose-primary);
  display: block;
}

.chapter-quote {
  font-family: var(--font-hand);
  font-size: 1.12rem;
  color: var(--ink-soft);
  margin-top: 1px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--rose-primary);
  margin-top: 2px;
}

.pill-badge {
  font-size: 0.68rem;
  font-weight: 600;
  background: var(--rose-blush);
  color: var(--rose-primary);
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.pill-badge.gold {
  background: rgba(212, 175, 55, 0.18);
  color: #8C6D14;
}

.header-deco-icon {
  font-size: 1.25rem;
}

/* Page Footer */
.page-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed rgba(142, 14, 41, 0.1);
}

.page-note {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.page-num {
  font-family: var(--font-sans);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--rose-soft);
  letter-spacing: 0.08em;
}

.page-tag-name {
  font-size: 0.7rem;
  color: var(--ink-soft);
}

/* Authentic Washi Tape */
.washi-tape {
  position: absolute;
  padding: 3px 12px;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  font-weight: 700;
  color: rgba(90, 20, 35, 0.7);
  box-shadow: 0 2px 5px rgba(0,0,0,0.06);
  pointer-events: none;
  z-index: 10;
  clip-path: polygon(
    2% 0%, 98% 0%, 100% 20%, 98% 40%, 100% 60%, 98% 80%, 100% 100%,
    98% 100%, 2% 100%, 0% 80%, 2% 60%, 0% 40%, 2% 20%, 0% 0%
  );
}

.tape-top-left {
  top: -4px;
  left: 24px;
  background: rgba(255, 200, 215, 0.85);
  transform: rotate(-3deg);
}

.tape-top-right {
  top: -4px;
  right: 24px;
  background: rgba(255, 230, 175, 0.85);
  transform: rotate(3deg);
}

.tape-polaroid {
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(1deg);
  width: 70px;
  height: 18px;
  background: rgba(255, 210, 220, 0.85);
}

.tape-mini-pink {
  top: -6px;
  left: 14px;
  width: 44px;
  height: 16px;
  background: rgba(255, 200, 215, 0.85);
  transform: rotate(-5deg);
}

.tape-mini-gold {
  top: -6px;
  right: 14px;
  width: 44px;
  height: 16px;
  background: rgba(255, 230, 160, 0.85);
  transform: rotate(5deg);
}

/* Wax Seal Stamp */
.wax-seal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #A81B39 0%, #740820 70%, #4E0314 100%);
  box-shadow: 0 3px 8px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  transform: rotate(12deg);
  cursor: pointer;
}


/* ============================================================
   PAGE 1: PREFACE & HERO POLAROID
   ============================================================ */
.polaroid-frame {
  background: #FFFFFF;
  padding: 10px 10px 24px;
  border-radius: 2px;
  box-shadow: var(--shadow-polaroid);
  position: relative;
  transition: transform 0.3s ease;
}

.hero-polaroid {
  width: 250px;
  margin: 6px auto;
  transform: rotate(-1.5deg);
}

.hero-polaroid:hover {
  transform: rotate(0deg) scale(1.02);
}

.polaroid-img-box {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #EEE;
  position: relative;
  border-radius: 2px;
}

.polaroid-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-date-tag {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.55);
  color: #FFF;
  font-size: 0.65rem;
  padding: 2px 7px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.polaroid-text {
  margin-top: 8px;
  text-align: center;
}

.polaroid-title {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--ink-primary);
}

.preface-short-note {
  text-align: center;
  margin: 8px 14px 2px;
  font-family: var(--font-hand);
  font-size: 1.12rem;
  color: var(--ink-soft);
  line-height: 1.35;
}


/* ============================================================
   PAGE 2: LÁ THƯ TÌNH & DRAGGABLE PULL-OUT ENVELOPE
   ============================================================ */
.letter-stationery-card {
  background: #FFFDF9;
  border: 1px solid rgba(142, 14, 41, 0.1);
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  position: relative;
}

.handwritten-salutation {
  font-family: var(--font-hand);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--rose-primary);
  margin-bottom: 4px;
}

.handwritten-para {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.5;
  color: #3F2E33;
  margin-bottom: 6px;
}

.handwritten-signature {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--ink-primary);
  text-align: right;
  margin-top: 2px;
}

.handwritten-signature span {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--rose-primary);
}

/* Pullout Envelope Component */
.pullout-envelope-wrap {
  position: relative;
  width: 100%;
  margin-top: 14px;
  height: 120px;
  overflow: visible;
  pointer-events: auto !important;
}

.envelope-pocket {
  position: relative;
  width: 100%;
  height: 100%;
  background: #DFCFBD;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(45, 10, 20, 0.08);
  border: 1.5px solid rgba(142, 14, 41, 0.15);
  overflow: visible;
  clip-path: polygon(-20px -350px, calc(100% + 20px) -350px, calc(100% + 20px) 100%, -20px 100%);
}

/* The Sliding Letter Sheet */
.pullable-letter-sheet {
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  background: #FFFDF8;
  border-radius: 10px 10px 6px 6px;
  border: 1px solid rgba(142, 14, 41, 0.2);
  box-shadow: 0 -4px 15px rgba(0,0,0,0.12);
  transform: translateY(0);
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
  z-index: 5;
  user-select: none;
}

.pullable-letter-sheet.grabbing {
  cursor: grabbing;
  transition: none !important;
}

.letter-pull-tab {
  background: linear-gradient(135deg, var(--gold-foil) 0%, #B8860B 100%);
  color: #382005;
  padding: 6px 14px;
  border-radius: 8px 8px 0 0;
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  position: relative;
  margin-top: -26px; /* Tab peeks above pocket rim */
  cursor: grab;
  z-index: 15;
  box-shadow: 0 -2px 6px rgba(184, 134, 11, 0.35);
}

.pullable-letter-sheet.grabbing .letter-pull-tab {
  cursor: grabbing;
}

.tab-arrow {
  font-size: 0.7rem;
  animation: bounceUp 1.4s ease-in-out infinite alternate;
}

@keyframes bounceUp {
  from { transform: translateY(0); }
  to { transform: translateY(-3px); }
}

.letter-sheet-body {
  padding: 10px 14px 12px;
  text-align: center;
}

.sheet-wax-seal {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.sheet-title {
  font-family: var(--font-serif);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--rose-primary);
  margin-bottom: 4px;
}

.sheet-quote {
  font-family: var(--font-hand);
  font-size: 1.12rem;
  color: #4A3036;
  line-height: 1.36;
  margin-bottom: 6px;
}

.sheet-hint-down {
  font-size: 0.65rem;
  color: var(--ink-soft);
  font-weight: 600;
}

/* Front Pocket Fold (covers the entire pocket front, concealing the letter inside) */
.envelope-pocket-front {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, #F4EAE0 0%, #E8DCCB 50%, #DAC7B3 100%);
  border-radius: 11px;
  border-top: 2px solid #C9B29B;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.7), 0 -2px 6px rgba(0,0,0,0.04);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
  pointer-events: none;
}

.pocket-label-col {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pocket-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--rose-primary);
}

.pocket-drag-tag {
  font-size: 0.66rem;
  background: rgba(142, 14, 41, 0.1);
  color: var(--rose-primary);
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 600;
}


/* ============================================================
   PAGE 3: KHOẢNH KHẮC & TOSSABLE POLAROIDS
   ============================================================ */
.polaroid-toss-deck {
  position: relative;
  width: 100%;
  height: 335px;
  margin: 4px 0;
  pointer-events: auto !important;
}

.deck-drag-hint {
  text-align: center;
  margin-bottom: 8px;
}

.deck-drag-hint span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rose-primary);
  background: var(--rose-blush);
  padding: 3px 12px;
  border-radius: 999px;
  display: inline-block;
}

.polaroid-toss-card {
  position: absolute;
  top: 26px;
  left: 50%;
  width: 220px;
  background: #FFF;
  padding: 8px 8px 18px;
  border-radius: 2px;
  box-shadow: 0 10px 25px rgba(45, 10, 18, 0.16);
  transform: translateX(-50%) rotate(var(--initial-rot));
  transform-origin: center bottom;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: auto !important;
}

.polaroid-toss-card.dragging {
  cursor: grabbing;
  box-shadow: 0 18px 40px rgba(45, 10, 18, 0.28);
  transition: none !important;
}

.polaroid-toss-card.tossed {
  transition: transform 0.4s ease-out, opacity 0.4s ease-out !important;
  opacity: 0.3;
}

.square-ratio {
  aspect-ratio: 1 / 1;
}

.polaroid-toss-card[data-idx="0"] img { object-position: 62% 20%; }
.polaroid-toss-card[data-idx="1"] img { object-position: 68% 40%; }
.polaroid-toss-card[data-idx="2"] img { object-position: 50% 25%; }
.polaroid-toss-card[data-idx="3"] img { object-position: 88% 22%; }


.polaroid-caption-small {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--ink-primary);
  margin-top: 6px;
  text-align: center;
}

.polaroid-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding: 0 4px;
}

.meta-date {
  font-size: 0.65rem;
  color: var(--ink-soft);
  font-family: monospace;
}

.toss-tag {
  font-size: 0.62rem;
  color: var(--rose-soft);
  font-weight: 600;
}


/* ============================================================
   PAGE 4: HÀNH TRÌNH TÌNH YÊU & CUỐNG VÉ
   ============================================================ */
.days-counter-card {
  background: #FFFDF9;
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 10px;
  padding: 12px 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  margin-bottom: 12px;
}

.counter-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--rose-soft);
  display: block;
}

.counter-big-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 3px 0;
}

.counter-num {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--rose-primary);
  line-height: 1;
}

.counter-unit {
  font-family: var(--font-hand);
  font-size: 1.2rem;
  color: #B5651D;
}

.counter-sub {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--ink-soft);
}

/* ============================================================
   PAGE 4: BIG FLOWER BOUQUET DECORATION
   ============================================================ */
.page-bouquet-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 8px;
  position: relative;
}

.bouquet-img-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.big-bouquet-img {
  width: 100%;
  max-width: 220px;
  max-height: 205px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgba(142, 14, 41, 0.16));
  animation: bouquetFloat 5s ease-in-out infinite alternate;
  user-select: none;
  pointer-events: none;
}

@keyframes bouquetFloat {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(-5px) rotate(1deg);
  }
}

.bouquet-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.b-sparkle {
  position: absolute;
  font-size: 1.1rem;
  animation: sparkleTwinkle 2.8s ease-in-out infinite alternate;
}
.b-sparkle.s1 {
  top: 12%;
  left: 10%;
  animation-delay: 0.1s;
}
.b-sparkle.s2 {
  top: 18%;
  right: 12%;
  animation-delay: 0.9s;
}
.b-sparkle.s3 {
  bottom: 22%;
  left: 14%;
  animation-delay: 1.6s;
}

@keyframes sparkleTwinkle {
  0% { transform: scale(0.85) rotate(0deg); opacity: 0.45; }
  100% { transform: scale(1.3) rotate(18deg); opacity: 1; }
}

.bouquet-dedication-card {
  margin-top: 6px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(142, 14, 41, 0.14);
  border-radius: 12px;
  padding: 8px 14px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(90, 20, 35, 0.05);
  max-width: 380px;
}

.bouquet-tag-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--rose-blush);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--rose-primary);
  margin-bottom: 4px;
}

.bouquet-quote-text {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--ink-secondary);
  line-height: 1.4;
  margin: 0;
}



/* ============================================================
   PAGE 5: BÁNH KEM & THỔI NẾN BẰNG LƯỚT CHUỘT
   ============================================================ */
.book-cake-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 4px 0;
  pointer-events: auto !important;
}

.cake-visual-wrap {
  position: relative;
  width: 270px;
  aspect-ratio: 460 / 300;
  margin: 0 auto;
}

.book-cake-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(35, 10, 15, 0.14));
}

/* 5 Candle Flames on Cake */
.cake-flames-box {
  position: absolute;
  inset: 0;
}

.book-flame {
  position: absolute;
  width: 16px;
  height: 26px;
  transform: translate(-50%, -92%); /* Base of flame rests precisely on the candle wick */
  transform-origin: 50% 90%;
  cursor: pointer;
  pointer-events: auto !important;
  z-index: 20;
  transition: transform 0.25s ease, opacity 0.35s ease;
}

.flame-sparkle {
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 50% 85%, #FFFFFF 0%, #FFF3B0 25%, #FFA726 65%, #E65100 100%);
  border-radius: 50% 50% 35% 35% / 60% 60% 40% 40%;
  box-shadow: 0 0 10px rgba(255, 179, 0, 0.85), 0 -3px 8px rgba(255, 235, 59, 0.7);
  animation: flameFlicker 0.45s ease-in-out infinite alternate;
}

@keyframes flameFlicker {
  0% { transform: scale(1) rotate(-3deg); }
  100% { transform: scale(1.06, 0.96) rotate(3deg); }
}

.book-flame.blown {
  opacity: 0;
  transform: translate(-50%, -140%) scale(0.6) !important;
  filter: blur(4px) grayscale(100%);
  pointer-events: none !important;
}

/* Precise Mathematically Centered Coordinates on Cake Candle Wicks */
.flame-pos-1 { left: 19.13%; top: 9.3%; }
.flame-pos-2 { left: 34.13%; top: 14.7%; }
.flame-pos-3 { left: 49.24%; top: 18.0%; }
.flame-pos-4 { left: 64.57%; top: 14.7%; }
.flame-pos-5 { left: 79.57%; top: 9.3%; }

.cake-action-col {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wind-sweep-prompt {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--rose-primary);
  background: rgba(255, 222, 229, 0.8);
  padding: 4px 12px;
  border-radius: 999px;
}

.wind-icon {
  font-size: 0.9rem;
  animation: windWave 1.2s ease-in-out infinite alternate;
}

@keyframes windWave {
  from { transform: translateX(-2px); }
  to { transform: translateX(3px); }
}

.blow-candle-btn {
  background: var(--paper-cream);
  color: var(--rose-primary);
  border: 1px solid rgba(142, 14, 41, 0.2);
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  pointer-events: auto !important;
  transition: all 0.2s ease;
}

.blow-candle-btn:hover {
  background: #FFF;
  border-color: var(--rose-primary);
}

.wish-reveal-box {
  margin-top: 8px;
  background: #FFFDF5;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.12);
  animation: fadeInDown 0.5s ease;
}

.wish-reveal-box.hidden {
  display: none !important;
}

.wish-reveal-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rose-primary);
}

.wish-reveal-sub {
  font-family: var(--font-hand);
  font-size: 1.08rem;
  color: #B5651D;
  margin-top: 2px;
}


/* ============================================================
   PAGE 6: NHỮNG ĐIỀU ANH YÊU & HỘP QUÀ
   ============================================================ */
.sticky-notes-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 8px;
}

.love-sticky-note {
  border-radius: 6px;
  padding: 9px 12px 9px 24px;
  position: relative;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-family: var(--font-hand);
  font-size: 1.1rem;
  line-height: 1.3;
  color: #38242A;
  transition: transform 0.2s ease;
}

.love-sticky-note:hover {
  transform: rotate(0deg) scale(1.02);
}

.sticky-pin {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.8rem;
}

.sticky-pink { background: #FFE8ED; transform: rotate(-1.5deg); }
.sticky-cream { background: #FFF4DE; transform: rotate(1.2deg); }
.sticky-mint { background: #E8F5E9; transform: rotate(-0.8deg); }

/* Gift Clue Card */
.gift-box-clue-card {
  background: #F7EFE4;
  border-radius: 8px;
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.gift-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gift-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--rose-primary);
}

.gift-sub {
  font-size: 0.68rem;
  color: var(--ink-soft);
}

.gift-clue-btn {
  background: var(--gold-foil);
  color: #382500;
  border: none;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto !important;
  transition: all 0.2s;
}

.gift-clue-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.05);
}

.gift-clue-reveal {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(142, 14, 41, 0.15);
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--rose-primary);
}

.gift-clue-reveal.hidden {
  display: none !important;
}

/* Cute Memory Snapshot Card on Page 6 */
.love-cute-snapshot {
  position: relative;
  background: #FFFDF9;
  border: 1px solid rgba(142, 14, 41, 0.12);
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.tape-cute {
  top: -8px;
  right: 14px;
  background: rgba(255, 195, 205, 0.88);
}

.cute-snap-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cute-snap-thumb {
  width: 66px;
  height: 66px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  border: 2px solid #FFF;
}

.cute-snap-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 30%;
  display: block;
}

.cute-snap-info {
  flex: 1;
}

.cute-snap-tag {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--rose-primary);
  background: var(--rose-blush);
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 2px;
}

.cute-snap-text {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: #38242A;
  line-height: 1.25;
}



/* ============================================================
   PAGE 7: GIAI ĐIỆU & DRAGGABLE TONEARM TURNTABLE
   ============================================================ */
.book-turntable-station {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4px 0;
  pointer-events: auto !important;
}

.turntable-deck {
  position: relative;
  width: 240px;
  height: 160px;
  background: linear-gradient(135deg, #1A1A1A 0%, #2D2426 100%);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25), inset 0 1px 1px rgba(255,255,255,0.15);
  border: 1px solid rgba(212, 175, 55, 0.3);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  padding: 10px;
}

.book-vinyl-disc {
  width: 135px;
  height: 135px;
  border-radius: 50%;
  background: radial-gradient(circle, #252525 0%, #111111 60%, #050505 100%);
  box-shadow: 0 6px 16px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-left: 6px;
}

.book-vinyl-disc.spinning {
  animation: spinRecord 3.2s linear infinite;
}

.vinyl-groove-rings {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.08);
}

.vinyl-label-center {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #FFF;
  box-shadow: 0 0 6px rgba(0,0,0,0.4);
}

.vinyl-label-center img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 48%;
}

/* Interactive Metallic Tonearm */
.turntable-tonearm-assembly {
  position: absolute;
  top: 14px;
  right: 18px;
  width: 50px;
  height: 120px;
  pointer-events: auto !important;
}

.tonearm-base-pivot {
  position: absolute;
  top: 0;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #E0E0E0 0%, #9E9E9E 70%, #616161 100%);
  box-shadow: 0 2px 5px rgba(0,0,0,0.5);
  border: 1px solid #FFF;
}

.tonearm-lever {
  position: absolute;
  top: 10px;
  right: 16px;
  width: 12px;
  height: 105px;
  transform-origin: 6px 6px;
  transform: rotate(0deg);
  transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
  cursor: grab;
  user-select: none;
}

.tonearm-lever.grabbing {
  cursor: grabbing;
  transition: none !important;
}

.tonearm-lever.on-record {
  transform: rotate(26deg);
}

.tonearm-weight {
  position: absolute;
  top: -8px;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: #D4AF37;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.tonearm-rod {
  position: absolute;
  top: 4px;
  left: 5px;
  width: 3px;
  height: 90px;
  background: linear-gradient(to right, #EEEEEE, #CCCCCC, #999999);
  border-radius: 2px;
  box-shadow: 1px 2px 4px rgba(0,0,0,0.3);
}

.tonearm-cartridge {
  position: absolute;
  bottom: 0;
  left: -2px;
  width: 16px;
  height: 18px;
  background: #333333;
  border-radius: 2px;
  border: 1px solid #D4AF37;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2px;
}

.needle-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #FFD700;
  box-shadow: 0 0 4px #FFD700;
}

.tonearm-drag-hint {
  font-size: 0.7rem;
  color: var(--rose-primary);
  font-weight: 600;
  margin-bottom: 6px;
}

.vinyl-song-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--rose-primary);
}

.vinyl-artist {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.vinyl-eq-waves {
  display: flex;
  justify-content: center;
  gap: 3px;
  align-items: flex-end;
  height: 14px;
  margin: 6px 0 8px;
}

.vinyl-eq-waves span {
  width: 3px;
  background: var(--rose-soft);
  border-radius: 2px;
  height: 3px;
}

.vinyl-eq-waves.active span {
  animation: eqHop 0.5s ease-in-out infinite alternate;
}
.vinyl-eq-waves.active span:nth-child(1) { animation-delay: 0.1s; }
.vinyl-eq-waves.active span:nth-child(2) { animation-delay: 0.3s; }
.vinyl-eq-waves.active span:nth-child(3) { animation-delay: 0.2s; }
.vinyl-eq-waves.active span:nth-child(4) { animation-delay: 0.4s; }
.vinyl-eq-waves.active span:nth-child(5) { animation-delay: 0.15s; }
.vinyl-eq-waves.active span:nth-child(6) { animation-delay: 0.35s; }

@keyframes eqHop {
  0% { height: 3px; }
  100% { height: 14px; }
}

.vinyl-station-btn {
  background: var(--rose-primary);
  color: #FFF;
  border: none;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  pointer-events: auto !important;
  box-shadow: 0 4px 12px rgba(142, 14, 41, 0.22);
  transition: all 0.2s ease;
}

.vinyl-station-btn:hover {
  transform: scale(1.05);
}


/* ============================================================
   PAGE 8: KỶ NIỆM ĐONG ĐẦY & POLAROID MOSAIC
   ============================================================ */
.polaroid-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 6px;
}

.mosaic-item {
  background: #FFF;
  padding: 4px 4px 6px;
  border-radius: 3px;
  box-shadow: var(--shadow-polaroid);
  height: 140px;
  overflow: hidden;
  transition: transform 0.25s ease;
}

.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.mosaic-item.item-1 { transform: rotate(-2deg); }
.mosaic-item.item-2 { transform: rotate(1.5deg); }
.mosaic-item.item-3 { transform: rotate(1.8deg); }
.mosaic-item.item-4 { transform: rotate(-1.2deg); }

.mosaic-item.item-1 img { object-position: 56% 28%; }
.mosaic-item.item-2 img { object-position: 53% 32%; }
.mosaic-item.item-3 img { object-position: 45% 25%; }
.mosaic-item.item-4 img { object-position: 53% 25%; }

.mosaic-item:hover {
  transform: rotate(0deg) scale(1.06);
  z-index: 10;
}

.book-closing-card {
  background: #FFFDF9;
  border: 1px solid rgba(142, 14, 41, 0.1);
  border-radius: 8px;
  padding: 7px 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.closing-quote {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: #38242A;
  line-height: 1.25;
}

.closing-sign {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  color: var(--rose-primary);
  margin-top: 2px;
}


/* ============================================================
   PAGE NAVIGATION CONSOLE
   ============================================================ */
.book-nav-console {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 8px 20px;
  border-radius: 999px;
  box-shadow: 0 4px 18px rgba(90, 20, 35, 0.08);
  border: 1px solid rgba(142, 14, 41, 0.12);
  margin-top: 14px;
  z-index: 20;
}

.nav-arrow-btn {
  display: none;
}

.nav-center-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.spread-indicator-dots {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 2px;
}

.dot-btn {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(142, 14, 41, 0.22);
  cursor: pointer;
  padding: 0;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.dot-btn:hover {
  background: var(--rose-soft);
  transform: scale(1.35);
}

.dot-btn.active {
  background: var(--rose-primary);
  transform: scale(1.4);
  box-shadow: 0 0 8px rgba(142, 14, 41, 0.4);
}

.spread-counter-label {
  display: none;
}


/* ============================================================
   RESPONSIVE DESIGN (Tablets & Mobile)
   ============================================================ */
@media (max-width: 900px) {
  .album-stage {
    width: 98%;
    margin-top: 4px;
  }

  .bookmark-ribbon {
    display: none;
  }

  .top-bar {
    padding: 10px 12px;
    flex-direction: column;
    gap: 8px;
  }

  .book-nav-console {
    max-width: 92%;
    padding: 7px 12px;
  }
}

@media (max-width: 600px) {
  .cover-inner-border {
    padding: 12px 10px 8px;
  }
  .cover-title {
    font-size: 1.5rem;
  }
  .cover-title span {
    font-size: 1.75rem;
  }
  .cover-name {
    font-size: 1.25rem;
  }
  .cover-subtitle {
    font-size: 0.9rem;
  }
  .lock-body-box {
    padding: 8px 12px 10px;
  }
  .tumbler-item {
    width: 38px;
    height: 62px;
  }
  .unlock-action-btn {
    padding: 6px 14px;
    font-size: 0.78rem;
  }
  .cover-footer-note {
    margin-top: 4px;
  }
}

@keyframes pulseBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   PAGE FILLER WATERCOLOR DECORATIONS (Pages 1, 2, 3, 5, 6, 7)
   Natural hand-painted scrapbook elements with subtle shadow
   ============================================================ */
.page-deco-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  user-select: none;
  position: relative;
  z-index: 2;
}

.deco-img {
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(142, 14, 41, 0.08));
  transition: transform 0.4s ease;
}

/* Page 1: Pressed Rose Stem */
.deco-p1 {
  margin: 4px auto 0;
}
.deco-rose-img {
  max-width: 170px;
  max-height: 110px;
  opacity: 0.94;
  transform: rotate(-10deg);
}

/* Page 2: Pressed Rose Petals */
.deco-p2 {
  margin: 4px auto 0;
}
.deco-rose-petal {
  max-width: 140px;
  max-height: 80px;
  opacity: 0.92;
  transform: rotate(18deg);
}

/* Page 3: Vintage Polaroid Camera */
.deco-p3 {
  margin: 6px auto 2px;
}
.deco-camera-img {
  max-width: 130px;
  max-height: 95px;
  opacity: 0.94;
}

/* Page 5: Birthday Gift Box */
.deco-p5 {
  margin: 6px auto 2px;
}
.deco-gift-img {
  max-width: 135px;
  max-height: 95px;
  opacity: 0.95;
}

/* Page 6: Cute Teddy Bear with Heart */
.deco-p6 {
  margin: 6px auto 2px;
}
.deco-teddy-img {
  max-width: 120px;
  max-height: 95px;
  opacity: 0.96;
}

/* Page 7: Watercolor Music Garland */
.deco-p7 {
  margin: 8px auto 0;
  width: 100%;
}
.deco-music-img {
  width: 90%;
  max-width: 360px;
  max-height: 80px;
  opacity: 0.94;
}

/* Floating Navigation Switcher Pill for 20/10 */
.floating-nav-pill {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 99999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(255, 253, 249, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.55);
  border-radius: 999px;
  box-shadow: 0 4px 20px rgba(112, 58, 80, 0.16), 0 1px 3px rgba(0,0,0,0.06);
  color: #703A50;
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
}
.floating-nav-pill:hover {
  background: #FFFDF9;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(112, 58, 80, 0.25);
  border-color: #D4AF37;
  color: #9E1A35;
}
.floating-nav-pill .nav-pill-icon {
  font-size: 1.1rem;
  line-height: 1;
}

