/* ==========================================================================
   SCRAPBOOK.CSS — Madam Ji's Official Digital Scrapbook (The Eternal Frame)
   A real-life promise fulfilled for Mayu (Manya) by Aayu 💛
   Palette: Plum #1A0F18, Blush Pink #F4A7B9, Warm Gold #FFD6BA, Cream #FFF8F5
   Fonts: Cormorant Garamond, Dancing Script, Lato, Playfair Display
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. Custom Variables & Root Scope for Scrapbook
   -------------------------------------------------------------------------- */
.scrapbook-section {
  position: relative;
  padding: clamp(3.5rem, 7vw, 5rem) clamp(1rem, 4vw, 2.5rem) clamp(4.5rem, 10vw, 7.5rem);
  background: radial-gradient(ellipse at 50% 15%, #2a1529 0%, #1a0f18 65%, #0f070e 100%);
  color: var(--cream, #fff8f5);
  overflow: hidden;
  isolation: isolate;
}

/* Ambient glow & backdrop stars */
.scrapbook-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(247, 231, 166, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 140px 90px, rgba(244, 167, 185, 0.35), transparent),
    radial-gradient(1px 1px at 280px 210px, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 420px 150px, rgba(247, 231, 166, 0.4), transparent);
  background-repeat: repeat;
  background-size: 450px 320px;
  opacity: 0.55;
  pointer-events: none;
  z-index: 0;
}

.scrapbook-container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   1. Header & Story Context
   -------------------------------------------------------------------------- */
.scrapbook-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto clamp(1.2rem, 3vw, 2.2rem);
  padding: 0 0.5rem;
}

.scrapbook-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(244, 167, 185, 0.12);
  border: 1px solid rgba(244, 167, 185, 0.28);
  border-radius: 6px;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--peach, #ffd6ba);
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 12px rgba(244, 167, 185, 0.15);
}

.scrapbook-title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: clamp(1.65rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 0.85rem;
  color: #fff8f5;
  background: linear-gradient(135deg, #fff8f5 0%, #ffd6ba 50%, #f7e7a6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Removed drop-shadow filter on text to avoid clipping bugs on Samsung Android browsers */
  text-shadow: 0 2px 14px rgba(247, 231, 166, 0.25);
}

.scrapbook-lead {
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: clamp(0.95rem, 2vw, 1.08rem);
  line-height: 1.65;
  color: rgba(255, 248, 245, 0.82);
  margin-bottom: 0.6rem;
}

.scrapbook-quote-pill {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 1.1rem;
  background: rgba(45, 27, 46, 0.75);
  border-left: 3px solid var(--rose, #f4a7b9);
  border-radius: 0 8px 8px 0;
  font-family: var(--font-script, 'Dancing Script', cursive);
  font-size: 1.15rem;
  color: var(--gold, #f7e7a6);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* --------------------------------------------------------------------------
   2. Ribbon Navigation Tabs (Quick Chapters - Removed)
   -------------------------------------------------------------------------- */
.scrapbook-bookmarks,
.scrapbook-tab {
  display: none !important;
}

/* --------------------------------------------------------------------------
   3. The Scrapbook Stage & 3D Album Layout
   -------------------------------------------------------------------------- */
.scrapbook-stage {
  perspective: 1800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto;
  width: 100%;
}

.scrapbook-album {
  position: relative;
  width: 100%;
  max-width: 1040px;
  min-height: clamp(620px, 80vh, 780px);
  border-radius: 20px;
  box-shadow:
    0 25px 60px -10px rgba(0, 0, 0, 0.85),
    0 12px 28px -5px rgba(244, 167, 185, 0.2),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  background: #1f0f1c;
  display: flex;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.3s ease;
}

/* Outer multi-layer page edge simulation */
.scrapbook-album::after {
  content: '';
  position: absolute;
  top: 10px;
  right: -8px;
  bottom: 10px;
  width: 12px;
  background: repeating-linear-gradient(
    to right,
    #eed8be,
    #eed8be 1px,
    #dfc6a9 1px,
    #dfc6a9 2px,
    #cbb295 2px,
    #cbb295 3px
  );
  border-radius: 0 6px 6px 0;
  box-shadow: 3px 0 6px rgba(0, 0, 0, 0.4);
  z-index: 1;
}

/* --------------------------------------------------------------------------
   4. Album Spine & Binder Rings
   -------------------------------------------------------------------------- */
.scrapbook-spine {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 44px;
  background: linear-gradient(90deg, #160a14 0%, #281425 45%, #180b16 100%);
  border-right: 2px solid rgba(0, 0, 0, 0.35);
  box-shadow: 4px 0 14px rgba(0, 0, 0, 0.45);
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  padding: 18px 0;
}

.spine-ring {
  width: 26px;
  height: 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffd97d 0%, #aa7b25 50%, #4a340b 100%);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.6),
    inset 0 1px 1px rgba(255, 255, 255, 0.6);
  position: relative;
}

.spine-ring::before,
.spine-ring::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #11070e;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.9);
}

.spine-ring::before { left: -3px; }
.spine-ring::after { right: -3px; }

/* --------------------------------------------------------------------------
   5. Page Container & 3D Turning Animations
   -------------------------------------------------------------------------- */
.scrapbook-pages-wrapper {
  position: relative;
  flex: 1;
  margin-left: 44px; /* offset for spine */
  min-height: clamp(620px, 80vh, 780px);
  display: flex;
  perspective: 1600px;
}

.scrapbook-page {
  position: absolute;
  inset: 0;
  padding: clamp(1.4rem, 4vw, 3rem);
  background: #fffdf9;
  color: #3b202e;
  border-radius: 0 16px 16px 0;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: rotateY(35deg) scale(0.97);
  transform-origin: left center;
  transition:
    transform 0.65s cubic-bezier(0.25, 1, 0.3, 1),
    opacity 0.5s ease,
    visibility 0.65s;
  box-shadow: inset 18px 0 25px -10px rgba(0, 0, 0, 0.12);
  overflow: hidden !important;
  scrollbar-width: none;
  touch-action: pan-x pinch-zoom;
  display: flex;
  flex-direction: column;
}

/* Delicate vintage scrollbars inside book pages */
.scrapbook-page::-webkit-scrollbar {
  width: 5px;
}

.scrapbook-page::-webkit-scrollbar-track {
  background: transparent;
}

.scrapbook-page::-webkit-scrollbar-thumb {
  background: rgba(184, 67, 93, 0.28);
  border-radius: 999px;
}

.scrapbook-page::-webkit-scrollbar-thumb:hover {
  background: rgba(184, 67, 93, 0.55);
}

/* Subtle vintage paper texture overlay */
.scrapbook-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 80% 10%, rgba(247, 231, 166, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 90%, rgba(244, 167, 185, 0.08) 0%, transparent 50%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.015) 0px, rgba(0, 0, 0, 0.015) 1px, transparent 1px, transparent 2px);
  pointer-events: none;
  z-index: 1;
}

/* Inner golden deckle border */
.scrapbook-page::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(197, 155, 39, 0.32);
  border-radius: 10px;
  pointer-events: none;
  z-index: 1;
}

.scrapbook-page.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: rotateY(0deg) scale(1);
  z-index: 5;
}

.scrapbook-page.is-flipped-prev {
  transform: rotateY(-60deg) scale(0.96);
  opacity: 0;
  visibility: hidden;
}

/* --------------------------------------------------------------------------
   6. Washi Tape, Pushpins & Paperclips (Realistic Scrapbook Accents)
   -------------------------------------------------------------------------- */
/* Ripped Washi Tape */
.washi-tape {
  position: absolute;
  height: 28px;
  z-index: 4;
  opacity: 0.88;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  clip-path: polygon(
    0% 0%, 4% 15%, 8% 2%, 12% 14%, 16% 0%, 20% 12%, 24% 0%,
    100% 0%, 96% 15%, 92% 3%, 88% 14%, 84% 0%, 80% 12%,
    100% 100%, 96% 85%, 92% 98%, 88% 86%, 84% 100%, 80% 88%,
    0% 100%, 4% 85%, 8% 97%, 12% 86%, 16% 100%, 20% 88%
  );
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.18) 0,
    rgba(255, 255, 255, 0.18) 3px,
    transparent 3px,
    transparent 8px
  );
}

.washi-pink {
  background-color: rgba(244, 167, 185, 0.85);
}

.washi-yellow {
  background-color: rgba(255, 226, 138, 0.85);
}

.washi-mint {
  background-color: rgba(175, 226, 212, 0.85);
}

.washi-top-left {
  top: -12px;
  left: -14px;
  width: 90px;
  transform: rotate(-18deg);
}

.washi-top-right {
  top: -12px;
  right: -14px;
  width: 90px;
  transform: rotate(18deg);
}

.washi-bottom-right {
  bottom: -12px;
  right: -14px;
  width: 90px;
  transform: rotate(-14deg);
}

.washi-bottom-left {
  bottom: -12px;
  left: -14px;
  width: 90px;
  transform: rotate(14deg);
}

.washi-center-top {
  top: -14px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 110px;
}

/* 3D Pushpin */
.pushpin {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff2be, #e5a93b 60%, #85550a 100%);
  box-shadow:
    0 4px 8px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.8);
  z-index: 5;
}

.pushpin::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff, #cfa043);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.pushpin-rose {
  background: radial-gradient(circle at 35% 30%, #ffe4eb, #f4829d 60%, #992843 100%);
}

.pushpin-rose::after {
  background: radial-gradient(circle at 30% 30%, #fff, #f4a7b9);
}

/* Realistic Paperclip */
.paperclip {
  position: absolute;
  width: 18px;
  height: 48px;
  border: 3.5px solid #d4af37;
  border-radius: 12px;
  box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.35);
  z-index: 6;
  background: transparent;
  pointer-events: none;
}

.paperclip::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 2px;
  right: 2px;
  bottom: 12px;
  border: 2.5px solid #d4af37;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

/* --------------------------------------------------------------------------
   7. Interactive Doodle Stickers (Bouncing & Sound on Tap)
   -------------------------------------------------------------------------- */
.sticker-doodle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  padding: 0.35rem 0.5rem;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid #3b202e;
  border-radius: 16px;
  box-shadow: 3px 3px 0 #3b202e, 0 6px 12px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  user-select: none;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.sticker-doodle:hover {
  transform: scale(1.18) rotate(6deg);
}

.sticker-doodle:active,
.sticker-doodle.is-bouncing {
  animation: stickerBounce 0.55s ease forwards;
}

@keyframes stickerBounce {
  0% { transform: scale(1); }
  25% { transform: scale(1.35) rotate(-12deg); }
  50% { transform: scale(0.9) rotate(8deg); }
  75% { transform: scale(1.15) rotate(-4deg); }
  100% { transform: scale(1) rotate(0deg); }
}

/* --------------------------------------------------------------------------
   8. Specific Page Layouts & Typography
   -------------------------------------------------------------------------- */

/* ----- [PAGE 0: COVER] ----- */
.page-cover {
  background: linear-gradient(135deg, #2b1325 0%, #1c0a18 45%, #240e20 100%) !important;
  color: #fff8f5 !important;
  text-align: center;
  align-items: center;
  justify-content: center;
  padding: clamp(0.6rem, 2vw, 1.8rem);
  border-radius: 0 16px 16px 0;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.65);
  border-right: 4px solid #caa243;
}

.cover-emboss-frame {
  position: relative;
  width: 100%;
  max-width: 600px;
  padding: clamp(0.75rem, 2.5vw, 1.6rem) clamp(0.65rem, 2vw, 1.4rem);
  border: 2px dashed rgba(247, 231, 166, 0.5);
  border-radius: 16px;
  background: radial-gradient(circle at center, rgba(61, 32, 64, 0.5) 0%, rgba(26, 15, 24, 0.8) 100%);
  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.7),
    0 8px 30px rgba(0, 0, 0, 0.5);
}

.cover-filigree {
  font-size: 1.8rem;
  color: var(--gold, #f7e7a6);
  margin-bottom: 0.6rem;
  opacity: 0.9;
  letter-spacing: 0.3em;
}

.cover-title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: clamp(2rem, 4.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  background: linear-gradient(180deg, #fff2cb 0%, #ffd6ba 50%, #d4af37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.4));
}

.cover-subtitle {
  font-family: var(--font-heading, 'Cormorant Garamond', serif);
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-style: italic;
  color: var(--peach, #ffd6ba);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.cover-dedication {
  font-family: var(--font-script, 'Dancing Script', cursive);
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  color: var(--gold, #f7e7a6);
  margin-bottom: 0.6rem;
  line-height: 1.35;
}

.cover-backstory-plaque {
  display: inline-block;
  padding: 0.55rem 1rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(247, 231, 166, 0.35);
  border-radius: 8px;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.85rem;
  color: rgba(255, 248, 245, 0.9);
  margin-bottom: 1rem;
  line-height: 1.45;
}

.cover-backstory-plaque em {
  color: var(--gold, #f7e7a6);
  font-family: var(--font-script, 'Dancing Script', cursive);
  font-size: 1.15rem;
  font-style: normal;
}

.cover-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffd6ba 0%, #f4a7b9 50%, #e5a93b 100%);
  border: 2px solid #fff2cb;
  color: #2a1122;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 6px 20px rgba(244, 167, 185, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.4);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cover-open-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 8px 28px rgba(244, 167, 185, 0.65),
    0 3px 8px rgba(0, 0, 0, 0.5);
  background: linear-gradient(135deg, #fff2cb 0%, #f7e7a6 50%, #ffd6ba 100%);
}

.cover-open-btn:active {
  transform: translateY(1px);
}

/* Ribbon hanging decoration */
.cover-ribbon {
  position: absolute;
  bottom: 6px;
  left: 36px;
  width: 20px;
  height: 48px;
  background: linear-gradient(180deg, #d44b6c 0%, #a02847 100%);
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.5);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  z-index: 8;
}

/* ----- [PAGE 1: SCHOOL CORRIDORS] ----- */
.page-school {
  background: #fbf7ee !important;
}

.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  border-bottom: 2px dashed rgba(59, 32, 46, 0.18);
  padding-bottom: 0.65rem;
  margin-bottom: clamp(0.9rem, 2.5vw, 1.4rem);
  position: relative;
  top: auto;
  background: transparent;
  z-index: 3;
}

.header-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.page-heading {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: clamp(1.2rem, 3.2vw, 1.85rem);
  font-weight: 700;
  color: #3b202e;
  line-height: 1.2;
  margin: 0;
}

.page-date-badge {
  display: inline-block;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.78rem;
  font-weight: 700;
  color: #7a465c;
  background: rgba(244, 167, 185, 0.25);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  border: 1px solid rgba(244, 167, 185, 0.4);
  width: fit-content;
  white-space: nowrap;
}

/* Quick Download Button inside page header */
.page-dl-quick {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  background: rgba(184, 67, 93, 0.12);
  border: 1px solid rgba(184, 67, 93, 0.35);
  color: #8c2540;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 2px 6px rgba(184, 67, 93, 0.1);
  white-space: nowrap;
  user-select: none;
  flex-shrink: 0;
}

.page-dl-quick:hover {
  background: #8c2540;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(140, 37, 64, 0.28);
}

.page-dl-quick:active {
  transform: scale(0.96);
}

.cover-action-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.cover-dl-quick {
  padding: 0.75rem 1.3rem;
  font-size: 0.9rem;
  border-radius: 8px;
  background: rgba(244, 167, 185, 0.25);
  border: 1px solid var(--gold, #f7e7a6);
  color: #3b202e;
}

.school-layout {
  display: grid;
  grid-template-columns: minmax(240px, 310px) 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

/* Scrapbook Polaroid Photo Frame */
.polaroid-frame {
  position: relative;
  background: #ffffff;
  padding: 12px 12px 34px 12px;
  border-radius: 4px;
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.1);
  transform: rotate(-2.5deg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: zoom-in;
}

.polaroid-frame:hover {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}

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

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

.scrapbook-polaroid .polaroid-caption {
  position: absolute;
  bottom: 8px;
  left: 12px;
  right: 12px;
  text-align: center;
  font-family: var(--font-script, 'Dancing Script', cursive);
  font-size: 1.15rem;
  color: #4a2b3d;
  font-weight: 700;
}

/* Single-Focus Layout: Clean, unscrollable, fits mobile & desktop gracefully */
.single-focus-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.4rem, 1.5vh, 0.75rem);
  width: 100%;
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

.photo-quote-plaque {
  padding: 0.42rem 0.85rem;
  border-radius: 8px;
  background: rgba(244, 167, 185, 0.12);
  border: 1px dashed rgba(184, 67, 93, 0.35);
  color: #432130;
  font-family: var(--font-handwritten, 'Caveat', cursive);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  line-height: 1.35;
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  text-align: center;
}

.full-note-card {
  position: relative;
  width: 100%;
  max-width: 580px;
  padding: clamp(0.75rem, 2.5vw, 1.4rem);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(220, 195, 175, 0.8);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  text-align: left;
}

/* Handwritten Note styling */
.scrapbook-note-card {
  position: relative;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(59, 32, 46, 0.12);
  border-radius: 12px;
  padding: clamp(1.2rem, 2.5vw, 1.8rem);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.handwritten-script {
  font-family: var(--font-script, 'Dancing Script', cursive);
  font-size: clamp(1.2rem, 2.3vw, 1.45rem);
  line-height: 1.6;
  color: #3b202e;
  margin-bottom: 1rem;
}

.sticker-shelf {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.sticker-shelf-label {
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8c5770;
  font-weight: 700;
  margin-right: 0.2rem;
}

/* ----- [PAGE 2: 27TH SEPTEMBER & FIRST DM] ----- */
.page-dm {
  background: #fffcf5 !important;
}

.dm-layout {
  display: grid;
  grid-template-columns: minmax(240px, 310px) 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.postal-stamp {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 80px;
  height: 80px;
  border: 2px dashed #b8435d;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.62rem;
  font-weight: 700;
  color: #b8435d;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transform: rotate(12deg);
  pointer-events: none;
  opacity: 0.85;
}

.postal-stamp strong {
  font-size: 0.82rem;
  color: #801831;
}

.dm-snippet-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: rgba(244, 167, 185, 0.15);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.2rem;
  border-left: 3px solid #b8435d;
}

.dm-bubble {
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.88rem;
  line-height: 1.4;
  max-width: 85%;
}

.dm-bubble-sent {
  align-self: flex-end;
  background: #3b202e;
  color: #fff8f5;
  border-bottom-right-radius: 2px;
}

.dm-bubble-received {
  align-self: flex-start;
  background: #ffffff;
  color: #3b202e;
  border-bottom-left-radius: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.dm-bubble-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.75;
  margin-bottom: 2px;
}

/* ----- [PAGE 3: THE REEL STORM] ----- */
.page-reels {
  background: #fbf5f7 !important;
}

.reels-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.reels-photo-composite {
  position: relative;
  width: 100%;
}

.reels-photo-main {
  position: relative;
  background: #fff;
  padding: 10px 10px 24px 10px;
  border-radius: 6px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  transform: rotate(-1.5deg);
  z-index: 2;
}

.reels-photo-secondary {
  position: absolute;
  right: -15px;
  bottom: -22px;
  width: 65%;
  background: #fff;
  padding: 6px 6px 18px 6px;
  border-radius: 4px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  transform: rotate(5deg);
  z-index: 3;
}

.highlighter-tape {
  display: inline-block;
  background: linear-gradient(100deg, rgba(255, 245, 140, 0.95) 0%, rgba(255, 235, 100, 0.9) 100%);
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
  font-family: var(--font-display, 'Playfair Display', serif);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: #2b1122;
  box-shadow: 0 3px 10px rgba(255, 226, 138, 0.4);
  transform: rotate(-1deg);
  margin-bottom: 1rem;
}

/* ----- [PAGE 4: MIDNIGHT SECRETS & ENDLESS TALKS] ----- */
.page-midnight {
  background: #fbf6f3 !important;
}

.midnight-layout {
  display: grid;
  grid-template-columns: minmax(240px, 310px) 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.retro-cassette-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2b1c28;
  color: #f7e7a6;
  border: 2px solid #52344c;
  border-radius: 10px;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  gap: 0.6rem;
}

.cassette-spool {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px dashed #d4af37;
  background: #190c17;
  flex-shrink: 0;
  animation: cassette-spin 4s linear infinite;
}

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

.cassette-label-wrap {
  display: flex;
  flex-direction: column;
  text-align: center;
  flex: 1;
}

.cassette-title {
  font-family: var(--font-mono, 'DM Mono', monospace);
  font-size: 0.76rem;
  font-weight: 700;
  color: #ffd6ba;
  letter-spacing: 0.04em;
}

.cassette-sub {
  font-family: var(--font-script, 'Dancing Script', cursive);
  font-size: 0.95rem;
  color: #f4a7b9;
}

/* ----- [PAGE 5: PRINCESS GALLERY] ----- */
.page-gallery {
  background: #fdfaf4 !important;
}

.gallery-grid-scrapbook {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.9rem, 2vw, 1.4rem);
  position: relative;
  z-index: 2;
  margin-bottom: 1.2rem;
}

.gallery-card-scrapbook {
  position: relative;
  background: #ffffff;
  padding: 8px 8px 24px 8px;
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: zoom-in;
}

.gallery-card-scrapbook:nth-child(1) { transform: rotate(-2deg); }
.gallery-card-scrapbook:nth-child(2) { transform: rotate(1.8deg); }
.gallery-card-scrapbook:nth-child(3) { transform: rotate(2deg); }
.gallery-card-scrapbook:nth-child(4) { transform: rotate(-1.5deg); }

.gallery-card-scrapbook:hover {
  transform: rotate(0deg) scale(1.04) !important;
  z-index: 5;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.25);
}

.gallery-card-scrapbook .polaroid-img-wrap {
  aspect-ratio: 16 / 10;
}

.gallery-card-scrapbook.is-portrait .polaroid-img-wrap {
  aspect-ratio: 9 / 12;
}

.gallery-mini-caption {
  position: absolute;
  bottom: 5px;
  left: 6px;
  right: 6px;
  text-align: center;
  font-family: var(--font-script, 'Dancing Script', cursive);
  font-size: 0.95rem;
  font-weight: 700;
  color: #4a2b3d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ----- [PAGE 6: INSIDE JOKES & MADAM JI'S RULES] ----- */
.page-jokes {
  background: #fdf8f0 !important;
}

.jokes-layout {
  display: grid;
  grid-template-columns: minmax(240px, 310px) 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.royal-decree-box {
  background: rgba(254, 246, 226, 0.92);
  border: 1px dashed #c49c3b;
  border-radius: 10px;
  padding: 0.75rem 0.95rem;
  margin-bottom: 0.9rem;
  box-shadow: 0 4px 12px rgba(196, 156, 59, 0.1);
}

.decree-header {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: #73500a;
  margin-bottom: 0.4rem;
  border-bottom: 1px solid rgba(196, 156, 59, 0.35);
  padding-bottom: 0.25rem;
}

.decree-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.8rem;
  line-height: 1.35;
  color: #4a3013;
}

.decree-list li strong {
  color: #8c5712;
}

/* ----- [PAGE 7: DREAMS & FUTURE MILESTONES] ----- */
.page-future {
  background: #f6f9fc !important;
}

.future-layout {
  display: grid;
  grid-template-columns: minmax(240px, 310px) 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: center;
  position: relative;
  z-index: 2;
  flex: 1;
}

.boarding-pass-badge {
  background: #ffffff;
  border: 2px dashed #6b8ea8;
  border-radius: 10px;
  padding: 0.7rem 0.95rem;
  margin-bottom: 0.9rem;
  box-shadow: 0 4px 14px rgba(107, 142, 168, 0.15);
  position: relative;
}

.pass-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #3b5a75;
  border-bottom: 1px solid rgba(107, 142, 168, 0.3);
  padding-bottom: 0.3rem;
  margin-bottom: 0.4rem;
}

.pass-details {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.78rem;
  color: #2b3e4f;
}

/* ----- [PAGE 8: THE ETERNAL PROMISE & INTERACTIVE SEAL] ----- */
.page-vow {
  background: linear-gradient(135deg, #fffdfa 0%, #fef8ee 100%) !important;
}

.vow-layout {
  display: grid;
  grid-template-columns: minmax(230px, 290px) 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
  position: relative;
  z-index: 2;
}

.vow-content-box {
  display: flex;
  flex-direction: column;
}

.vow-text {
  font-family: var(--font-heading, 'Cormorant Garamond', serif);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: #2b1122;
  margin-bottom: 1.2rem;
  position: relative;
  padding-left: 1rem;
  border-left: 3px solid #d4af37;
}

.vow-signature {
  font-family: var(--font-script, 'Dancing Script', cursive);
  font-size: 1.45rem;
  color: #7a203f;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Doodle Signature Canvas Section */
.doodle-box-container {
  background: #ffffff;
  border: 2px solid #e0cda7;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.06);
  position: relative;
}

.doodle-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.doodle-box-title {
  font-family: var(--font-script, 'Dancing Script', cursive);
  font-size: 1.15rem;
  font-weight: 700;
  color: #3b202e;
}

.doodle-toolbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.doodle-btn {
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(59, 32, 46, 0.2);
  background: #fdfaf4;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.76rem;
  font-weight: 600;
  color: #3b202e;
  cursor: pointer;
  transition: all 0.2s ease;
}

.doodle-btn:hover {
  background: #f4e8d0;
  border-color: #3b202e;
}

.doodle-btn.is-active-color {
  background: #3b202e;
  color: #fff;
}

.scrapbook-canvas-wrap {
  width: 100%;
  height: 160px;
  border: 1px dashed #d5b882;
  border-radius: 8px;
  background: #fffefb;
  position: relative;
  touch-action: none;
  cursor: crosshair;
}

#scrapbook-doodle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.canvas-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-script, 'Dancing Script', cursive);
  font-size: 1.1rem;
  color: rgba(59, 32, 46, 0.35);
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
  transition: opacity 0.3s ease;
}

.canvas-hint.is-hidden {
  opacity: 0;
}

/* --------------------------------------------------------------------------
   9. Scrapbook Bottom Controls & Floating Nav
   -------------------------------------------------------------------------- */
.scrapbook-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(0.35rem, 1.2vw, 0.75rem);
  margin-top: 1.4rem;
  margin-bottom: 2.8rem; /* Plentiful bottom clearance so floating BGM and scroll-to-top never clash! */
  width: 100%;
  max-width: 920px;
  padding: 0.5rem 0.95rem;
  background: rgba(26, 15, 24, 0.88);
  border: 1px solid rgba(244, 167, 185, 0.28);
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  position: relative;
  z-index: 20;
}

.scrapbook-actions-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: nowrap;
  justify-content: center;
}

.scrapbook-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.65rem 1.15rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(244, 167, 185, 0.3);
  color: #fff8f5;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  user-select: none;
  white-space: nowrap;
}

.scrapbook-nav-btn:hover:not(:disabled) {
  background: rgba(244, 167, 185, 0.25);
  border-color: var(--gold, #f7e7a6);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(244, 167, 185, 0.3);
}

.scrapbook-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.scrapbook-nav-btn:focus-visible {
  outline: 2px solid var(--gold, #f7e7a6);
  outline-offset: 3px;
}

.scrapbook-nav-btn .btn-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.scrapbook-nav-btn.prev-btn:hover:not(:disabled) .btn-arrow {
  transform: translateX(-3px);
}

.scrapbook-nav-btn.next-btn:hover:not(:disabled) .btn-arrow {
  transform: translateX(3px);
}

/* Complete Keepsake PDF Book Download Button */
.scrapbook-pdf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 1.15rem;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(244, 167, 185, 0.38), rgba(247, 231, 166, 0.38));
  border: 1.5px solid var(--gold, #f7e7a6);
  color: #fff;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 2px 12px rgba(247, 231, 166, 0.3);
  white-space: nowrap;
  user-select: none;
}

.scrapbook-pdf-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(244, 167, 185, 0.6), rgba(247, 231, 166, 0.6));
  transform: translateY(-2px);
  box-shadow: 0 4px 18px rgba(247, 231, 166, 0.5);
}

.scrapbook-pdf-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Single Page Keepsake Save Button */
.scrapbook-save-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 1.1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(244, 167, 185, 0.35);
  color: #fff8f5;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  user-select: none;
}

.scrapbook-save-btn:hover:not(:disabled) {
  background: rgba(244, 167, 185, 0.25);
  border-color: rgba(244, 167, 185, 0.6);
  color: #fff;
  transform: translateY(-2px);
}

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

/* Close Book Button in controls (Only shown in fullscreen mode) */
.scrapbook-close-btn {
  display: none;
  align-items: center;
  gap: 0.45rem;
  padding: 0.62rem 1.05rem;
  border-radius: 8px;
  background: rgba(244, 167, 185, 0.18);
  border: 1.5px solid rgba(244, 167, 185, 0.45);
  color: #fff;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
  user-select: none;
}

.scrapbook-stage.is-fullscreen .scrapbook-close-btn {
  display: inline-flex;
}

.scrapbook-close-btn:hover {
  background: rgba(244, 167, 185, 0.35);
  border-color: var(--gold, #f7e7a6);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(244, 167, 185, 0.4);
}

/* Fullscreen Header Bar (Clean, Sits Above the Album — Never Overlaps Content) */
.sb-fullscreen-header {
  display: none;
  width: 100%;
  max-width: 1100px;
  height: 40px;
  flex-shrink: 0;
  padding: 0 0.5rem;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  z-index: 1000003;
}

.scrapbook-stage.is-fullscreen .sb-fullscreen-header {
  display: flex !important;
}

.sb-fs-title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  font-weight: 700;
  color: var(--peach, #ffd6ba);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.02em;
}

.sb-fs-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.85rem;
  border-radius: 8px;
  background: rgba(244, 167, 185, 0.18);
  border: 1px solid rgba(244, 167, 185, 0.45);
  color: #fff;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
}

.sb-fs-close-btn:hover {
  background: rgba(244, 167, 185, 0.38);
  border-color: var(--gold, #f7e7a6);
  transform: translateY(-1px);
}

/* Fullscreen Theatre Album Mode (Stage is Fullscreen) */
.scrapbook-stage.is-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  margin: 0 !important;
  z-index: 999999 !important;
  background: radial-gradient(circle at 50% 30%, #291225 0%, #0e050e 100%) !important;
  padding: 0.4rem 0.6rem 0.5rem 0.6rem !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  align-items: center !important;
}

.scrapbook-stage.is-fullscreen .scrapbook-album {
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: min(1120px, 96vw) !important;
  height: auto !important;
  max-height: calc(100dvh - 110px) !important;
  min-height: 0 !important;
  margin: 0.15rem auto !important;
  box-shadow: 0 25px 85px rgba(0, 0, 0, 0.95), 0 0 40px rgba(244, 167, 185, 0.3) !important;
}

.scrapbook-stage.is-fullscreen .scrapbook-pages-wrapper {
  height: 100% !important;
  min-height: 0 !important;
}

.scrapbook-stage.is-fullscreen .scrapbook-controls {
  flex-shrink: 0 !important;
  width: 100% !important;
  max-width: 860px !important;
  margin: 0.2rem auto 0 auto !important;
  padding: 0.38rem 0.65rem !important;
}

.scrapbook-stage.is-fullscreen .scrapbook-hint {
  display: none !important;
}

.scrapbook-save-btn .save-icon {
  font-size: 0.95rem;
}

.scrapbook-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 110px;
}

.status-indicator {
  display: none !important;
}

.status-counter {
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--gold, #f7e7a6);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.scrapbook-hint {
  text-align: center;
  font-family: var(--font-body, 'Lato', sans-serif);
  font-size: 0.8rem;
  color: rgba(255, 248, 245, 0.45);
  margin-top: 0.8rem;
  margin-bottom: 3.5rem;
}

/* Floating Confetti Canvas */
#scrapbook-confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9999;
}

/* --------------------------------------------------------------------------
   10. Mobile Responsiveness & Touch Optimization
   -------------------------------------------------------------------------- */
@media (max-width: 820px) {
  .scrapbook-album {
    min-height: clamp(520px, 78vh, 650px);
  }

  .scrapbook-spine {
    width: 32px;
  }

  .spine-ring {
    width: 20px;
    height: 10px;
    transform: translateX(2px);
  }

  .scrapbook-pages-wrapper {
    margin-left: 32px;
    min-height: clamp(520px, 78vh, 650px);
  }

  .school-layout,
  .dm-layout,
  .reels-layout,
  .midnight-layout,
  .jokes-layout,
  .future-layout,
  .vow-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: start;
  }

  .polaroid-frame {
    max-width: min(230px, 60vw);
    margin: 0 auto;
    padding: 8px 8px 26px 8px;
  }

  .polaroid-img-wrap {
    max-height: clamp(150px, 25vh, 210px);
    aspect-ratio: 4 / 3;
  }

  .reels-photo-main {
    max-width: 230px;
    margin: 0 auto;
  }

  .reels-photo-secondary {
    width: 58%;
    right: 2%;
  }

  .gallery-grid-scrapbook {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.65rem;
    max-width: 320px;
    margin: 0 auto 1rem;
  }
}

@media (max-width: 580px) {
  .scrapbook-section {
    padding-left: clamp(0.5rem, 2.5vw, 0.85rem);
    padding-right: clamp(0.5rem, 2.5vw, 0.85rem);
  }

  .scrapbook-header {
    margin: 0 auto 0.75rem auto;
    padding: 0 0.25rem;
  }

  .scrapbook-tag {
    font-size: 0.72rem;
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.45rem;
  }

  .scrapbook-title {
    font-size: clamp(1.4rem, 5.2vw, 1.85rem);
    margin-bottom: 0.4rem;
  }

  .scrapbook-lead {
    font-size: 0.84rem;
    line-height: 1.45;
    margin-bottom: 0.45rem;
  }


  .scrapbook-album {
    border-radius: 14px;
    min-height: clamp(450px, 66vh, 560px);
    max-height: 80vh;
  }

  .scrapbook-album::after {
    display: none;
  }

  .scrapbook-spine {
    width: clamp(24px, 6vw, 30px);
    padding: 10px 0;
  }

  .spine-ring {
    width: clamp(18px, 4.5vw, 22px);
    height: clamp(8px, 2vw, 11px);
    border-radius: 4px;
    transform: translateX(3px);
  }

  .scrapbook-pages-wrapper {
    margin-left: clamp(24px, 6vw, 30px);
    min-height: clamp(450px, 66vh, 560px);
    max-height: 80vh;
  }

  .scrapbook-page {
    padding: 1rem 0.8rem 1.4rem 0.8rem;
    border-radius: 0 14px 14px 0;
  }

  .scrapbook-page::after {
    inset: 6px;
  }

  .polaroid-frame {
    max-width: min(200px, 56vw);
    padding: 7px 7px 22px 7px;
  }

  .polaroid-img-wrap {
    max-height: clamp(125px, 20vh, 160px);
  }

  .page-heading {
    font-size: clamp(1.12rem, 3.8vw, 1.42rem);
  }

  .page-date-badge {
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
  }

  .handwritten-script {
    font-size: clamp(0.98rem, 3.2vw, 1.18rem);
    line-height: 1.44;
    margin-bottom: 0.4rem;
  }

  .scrapbook-note-card {
    padding: 0.75rem 0.8rem;
    border-radius: 10px;
  }

  .sticker-shelf {
    margin-top: 0.35rem;
    justify-content: center;
    gap: 0.45rem;
  }

  .sticker-shelf-label {
    display: none;
  }

  .sticker-doodle {
    font-size: 1.25rem;
    padding: 0.15rem 0.35rem;
  }

  .gallery-grid-scrapbook {
    grid-template-columns: repeat(2, 1fr) !important;
    max-width: 290px;
    gap: 0.5rem;
    margin: 0 auto 0.8rem;
  }

  .gallery-card-scrapbook {
    padding: 6px 6px 20px 6px;
  }

  .gallery-mini-caption {
    font-size: 0.85rem;
    bottom: 3px;
  }

  .cover-emboss-frame {
    padding: 0.75rem 0.7rem;
  }

  .cover-title {
    font-size: clamp(1.3rem, 4.5vw, 1.8rem);
    margin-bottom: 0.2rem;
  }

  .cover-subtitle {
    font-size: 1rem;
    margin-bottom: 0.2rem;
  }

  .cover-dedication {
    font-size: 1.05rem;
    margin-bottom: 0.35rem;
  }

  .cover-backstory-plaque {
    font-size: 0.8rem;
    line-height: 1.35;
    padding: 0.45rem 0.65rem;
    margin: 0.45rem auto;
  }

  .cover-open-btn {
    padding: 0.7rem 1.4rem;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  .scrapbook-controls {
    margin-top: 0.8rem;
    margin-bottom: 2rem;
    padding: 0.4rem 0.55rem;
    border-radius: 10px;
    gap: 0.35rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .scrapbook-nav-btn {
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
  }

  .scrapbook-pdf-btn {
    padding: 0.42rem 0.7rem;
    font-size: 0.76rem;
    border-radius: 6px;
  }

  .status-indicator {
    font-size: 0.88rem;
  }

  .status-counter {
    font-size: 0.68rem;
    max-width: 95px;
  }

}

@media (max-width: 440px) {
  .scrapbook-pdf-btn .pdf-text {
    font-size: 0.72rem;
  }
  .scrapbook-close-btn .close-text {
    font-size: 0.72rem;
  }
  .scrapbook-save-btn .save-text {
    font-size: 0.72rem;
  }
}

@media (max-width: 380px) {
  .status-counter {
    display: none;
  }

  .scrapbook-nav-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.74rem;
    border-radius: 6px;
  }

  .scrapbook-pdf-btn,
  .scrapbook-close-btn {
    padding: 0.38rem 0.5rem;
    font-size: 0.72rem;
    border-radius: 6px;
  }

  .scrapbook-spine {
    width: 22px;
  }

  .scrapbook-pages-wrapper {
    margin-left: 22px;
  }

  .scrapbook-page {
    padding: 0.85rem 0.65rem 1.2rem 0.65rem;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .scrapbook-page {
    transition: opacity 0.3s ease;
    transform: none !important;
  }
  .sticker-doodle:hover,
  .polaroid-frame:hover,
  .gallery-card-scrapbook:hover {
    transform: none !important;
  }
}
