/* =============================================
   🎂 BIRTHDAY CELEBRATION SITE — STYLE SYSTEM
   v15: Clean Grid Layout, equal spacing & distributed dock
   ============================================= */

/* ── Design Tokens ── */
:root {
  --bg-deep: #0e0613;
  --plum-dark: #1b0d24;
  --plum-light: #3a1e4a;
  --rose-gold: #ffb5c5;
  --lavender: #d8b4fe;
  --gold: #ffd700;
  --gold-glow: rgba(255, 215, 0, 0.4);
  --pink-glow: rgba(255, 94, 151, 0.4);
  --pink-neon: #ff5e97;
  --white: #ffffff;
  --text-light: #f4ecf7;
  --text-muted: #bea6c5;
  --border-glass: rgba(255, 255, 255, 0.12);
  --bg-glass: rgba(26, 12, 36, 0.6);

  --font-title: 'Playfair Display', serif;
  --font-body: 'Outfit', sans-serif;
  --font-accent: 'Dancing Script', cursive;

  --shadow-premium: 0 15px 35px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 25px rgba(255, 94, 151, 0.35);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 50px;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

img,
.sticker,
.washi-tape,
.floating-emojis,
.aurora-glow {
  pointer-events: none;
}

/* ── Mascot image stickers blend mode ── */
.mascot-entrance,
.mascot-hero,
.mascot-gallery,
.mascot-letter,
.mascot-timeline,
.mascot-hero-photo,
.mascot-cake,
.mascot-side {
  mix-blend-mode: normal;
  background-color: transparent;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Sparkle Cursor Trail */
.sparkle-trail {
  position: fixed;
  pointer-events: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  z-index: 99999;
  animation: sparkle-fade 0.6s ease-out forwards;
  box-shadow: 0 0 6px var(--gold), 0 0 12px var(--gold);
}

@keyframes sparkle-fade {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(0) translateY(-20px);
  }
}

/* =============================================
   AURORA GLOWS (Immersive Shifting Backdrops)
   ============================================= */

.aurora-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  will-change: transform;
  transform: translateZ(0);
}

.glow-1 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #ff6b9d 0%, rgba(108, 92, 231, 0.3) 100%);
  top: -10%;
  left: -5%;
  animation: morph-aurora-1 12s ease infinite alternate;
}

.glow-2 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #a29bfe 0%, rgba(255, 120, 130, 0.3) 100%);
  bottom: -10%;
  right: -5%;
  animation: morph-aurora-2 12s ease infinite alternate;
}

.main-glow-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #ff5e97 0%, rgba(216, 180, 254, 0.2) 100%);
  top: 5%;
  right: -10%;
  animation: morph-aurora-1 15s ease infinite alternate;
}

.main-glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #c084fc 0%, rgba(255, 94, 151, 0.2) 100%);
  bottom: -10%;
  left: -10%;
  animation: morph-aurora-2 15s ease infinite alternate;
}

@keyframes morph-aurora-1 {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }

  100% {
    transform: translate(70px, 30px) scale(1.1) rotate(120deg);
  }
}

@keyframes morph-aurora-2 {
  0% {
    transform: translate(0, 0) scale(1.1) rotate(0deg);
  }

  100% {
    transform: translate(-70px, -30px) scale(0.9) rotate(-120deg);
  }
}

/* =============================================
   GIFT BOX ENTRANCE
   ============================================= */

.entrance-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, #1b0a24 0%, var(--bg-deep) 100%);
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

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

.gift-box-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}

.gift-box {
  position: relative;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gift-box:hover {
  transform: scale(1.08);
}

.gift-box:active {
  transform: scale(0.95);
}

.gift-box-body {
  width: 160px;
  height: 120px;
  background: linear-gradient(135deg, #e52d27, #b31217);
  border-radius: var(--radius-sm);
  position: relative;
  box-shadow: 0 15px 40px rgba(179, 18, 23, 0.35);
}

.gift-box-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 100%;
  background: linear-gradient(to right, #9e0e11, #5c0507);
}

.gift-box-body::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 100%;
  height: 28px;
  background: linear-gradient(to bottom, #9e0e11, #5c0507);
}

.gift-box-lid {
  width: 160px;
  height: 36px;
  background: linear-gradient(135deg, #ff4d4d, #c91818);
  border-radius: 6px 6px 0 0;
  position: relative;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.8s cubic-bezier(0.68, -0.6, 0.27, 1.6);
  transform-origin: center;
  z-index: 10;
  animation: lid-bounce 2.5s ease-in-out infinite;
}

.gift-box-lid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 100%;
  background: linear-gradient(to right, #9e0e11, #5c0507);
}

.gift-box.opened .gift-box-lid {
  animation: lid-fly-off 1s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

@keyframes lid-fly-off {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  30% { transform: translateY(-80px) rotate(15deg); opacity: 1; }
  100% { transform: translateY(-200px) translateX(100px) rotate(45deg) scale(0.6); opacity: 0; }
}

.gift-bow {
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 2.8rem;
  z-index: 2;
}

@keyframes lid-bounce {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.mascot-entrance {
  position: absolute;
  bottom: -15px;
  right: -80px;
  width: 110px;
  height: auto;
  animation: mascot-peek 3s ease-in-out infinite;
  z-index: 3;
}

@keyframes mascot-peek {

  0%,
  100% {
    transform: translateY(0) rotate(-4deg);
  }

  50% {
    transform: translateY(-10px) rotate(4deg);
  }
}

.entrance-text {
  margin-top: 35px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  z-index: 5;
  animation: pulse-text 2s ease-in-out infinite;
}

@keyframes pulse-text {

  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

.password-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
  margin-top: 10px;
}

.password-input-wrapper {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  align-items: center;
}

.cute-input {
  padding: 12px 20px;
  border-radius: 30px;
  border: 2px solid var(--border-glass);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-light);
  font-family: var(--font-body);
  font-size: 1.1rem;
  outline: none;
  transition: all 0.3s ease;
  width: 220px;
}

.cute-input:focus {
  border-color: var(--rose-gold);
  background: rgba(255,255,255,0.2);
}

.cute-input::placeholder {
  color: rgba(255,255,255,0.5);
}

.cute-btn {
  padding: 12px 24px;
  border-radius: 30px;
  border: none;
  background: linear-gradient(135deg, var(--rose-gold), var(--primary));
  color: #fff;
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 181, 197, 0.4);
}

.cute-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 181, 197, 0.6);
}

.password-error {
  color: #ff8fa3;
  font-family: var(--font-body);
  margin-top: 12px;
  font-size: 0.95rem;
  display: none;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.entrance-bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 94, 151, 0.12), transparent);
  animation: bubble-float 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bubble-float {

  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-35px) scale(1.08);
  }
}

.petal {
  position: absolute;
  width: 11px;
  height: 11px;
  background: radial-gradient(circle, #ffb6c1, #ff69b4);
  border-radius: 50% 0 50% 0;
  animation: petal-fall linear infinite;
  opacity: 0.45;
  pointer-events: none;
}

@keyframes petal-fall {
  0% {
    transform: translateY(-10vh) rotate(0deg) translateX(0);
    opacity: 0;
  }

  10% {
    opacity: 0.45;
  }

  100% {
    transform: translateY(110vh) rotate(720deg) translateX(80px);
    opacity: 0;
  }
}

/* =============================================
   MAIN CONTENT WRAPPER
   ============================================= */

#wrapper {
  display: none;
  width: 100%;
  height: 100%;
  position: relative;
  padding: 25px 20px 30px;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  z-index: 2;
}

#wrapper.show {
  display: flex;
}

.floating-emojis {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.floating-emoji {
  position: absolute;
  font-size: 1.1rem;
  animation: float-up-fast linear infinite;
  opacity: 0.25;
  will-change: transform;
  transform: translateZ(0);
}

@keyframes float-up-fast {
  0% {
    transform: translateY(105vh) rotate(0deg);
    opacity: 0;
  }

  10% {
    opacity: 0.25;
  }

  90% {
    opacity: 0.25;
  }

  100% {
    transform: translateY(-10vh) rotate(360deg);
    opacity: 0;
  }
}

/* Elegant flags banner */
.flag-birthday {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  z-index: 2;
}

.flag-banner {
  font-size: 1.1rem;
  letter-spacing: 4px;
  background: var(--plum-dark);
  padding: 4px 18px;
  border-bottom: 1.5px solid var(--border-glass);
  border-radius: 0 0 12px 12px;
  color: var(--text-muted);
}

.flag-banner.left {
  transform: rotate(-3deg) translate(-10px, -5px);
}

.flag-banner.right {
  transform: rotate(3deg) translate(10px, -5px);
}

/* Offset margins on large screens to accommodate the vertical left dock */
@media (min-width: 901px) {

  .scrapbook-header,
  .presentation-stage,
  .footer {
    margin-left: 90px;
    transition: margin-left 0.4s ease;
  }
}

/* =============================================
   ELEGANT HEADER
   ============================================= */

.scrapbook-header {
  text-align: center;
  margin-bottom: 15px;
  z-index: 10;
}

.happy-bday-title {
  font-family: var(--font-title);
  font-size: clamp(1.6rem, 3.6vw, 2.55rem);
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: -0.5px;
}

.accent-text {
  color: var(--rose-gold);
  position: relative;
  display: inline-block;
}



.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  color: var(--text-muted);
  margin-top: 4px;
  max-width: 650px;
}

/* =============================================
   PRESENTATION STAGE (The Active Cards)
   ============================================= */

.presentation-stage {
  flex: 1;
  width: 100%;
  max-width: 980px;
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.journey-section {
  display: none;
  width: 100%;
  height: 100%;
  animation: stage-reveal 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.journey-section.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

@keyframes stage-reveal {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(20px);
    filter: blur(6px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

.card-section-title {
  font-family: var(--font-title);
  font-size: clamp(1.3rem, 2.5vw, 1.7rem);
  color: var(--text-light);
  margin-bottom: 12px;
  font-weight: 600;
  text-align: center;
}

/* =============================================
   STEP 1 CARD: POLAROID TACTILE STACK
   ============================================= */

.stack-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
}

.stack-tip {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  animation: pulse-tip 2s infinite ease-in-out;
}

@keyframes pulse-tip {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

.polaroid-stack {
  position: relative;
  width: min(290px, 80vw);
  height: 380px;
  cursor: pointer;
}

.polaroid-stack .polaroid-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 10px 38px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-premium);
  transform-origin: center bottom;
  transform: rotate(var(--tilt)) translateY(calc(var(--i) * 4px)) scale(calc(1 - var(--i) * 0.025));
  z-index: calc(10 - var(--i));
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Sweeping active flip animation */
.polaroid-stack .polaroid-card.sweep {
  transform: translateX(160%) rotate(35deg) scale(1.05) translateY(-30px) !important;
  z-index: 20;
}

.polaroid-card .photo-slot {
  aspect-ratio: 4 / 5;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.polaroid-card .photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.photo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--rose-gold);
  opacity: 0.55;
}

.photo-placeholder .camera-icon {
  font-size: 2rem;
}

.polaroid-card .caption {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
  position: absolute;
  bottom: 12px;
  left: 15px;
  right: 60px; /* Leave space for Pikachu sticker on the right */
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.washi-tape {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 60px;
  height: 12px;
  background: rgba(255, 181, 197, 0.15);
  border-radius: 2px;
}

.sticker {
  position: absolute;
  font-size: 1.2rem;
  z-index: 5;
}

.sticker-tl {
  top: -6px;
  left: -6px;
}

.sticker-tr {
  top: -6px;
  right: -6px;
}

.sticker-bl {
  bottom: 32px;
  left: -5px;
}

.sticker-br {
  bottom: 32px;
  right: -5px;
}

/* Waving sticker positioned safely inside stack margins so overflow doesn't clip */
.mascot-gallery {
  position: absolute;
  bottom: 5px;
  right: -10px;
  width: 75px;
  z-index: 15;
}

/* =============================================
   STEP 2 CARD: LETTER & MAGIC ORACLE SPLIT
   ============================================= */

.letter-oracle-split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
  width: 100%;
  align-items: center;
}

.envelope-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  min-height: 380px;
}

/* Flat Morphing Envelope Card */
.envelope-card-wrapper {
  width: min(320px, 80vw);
  min-height: 220px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.envelope-closed {
  width: 100%;
  height: 210px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 20px;
  text-align: center;
  pointer-events: auto;
}

.envelope-closed:hover {
  transform: translateY(-6px) scale(1.03);
  border-color: rgba(255, 94, 151, 0.45);
  box-shadow: var(--shadow-glow);
}

.envelope-stamp {
  font-size: 2.2rem;
  margin-bottom: 5px;
}

.envelope-seal {
  font-size: 1.8rem;
  margin: 5px 0;
  animation: seal-pulse 2s infinite ease-in-out;
}

@keyframes seal-pulse {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 2px rgba(255, 94, 151, 0.2));
  }

  50% {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px rgba(255, 94, 151, 0.6));
  }
}

.envelope-closed h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 5px;
}

.envelope-closed p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Open notepad scroll card */
.letter-opened {
  display: none;
  width: 100%;
  max-height: 48vh;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-premium);
  border: 1px solid var(--border-glass);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  animation: letter-reveal 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

@keyframes letter-reveal {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.envelope-card-wrapper.opened .envelope-closed {
  display: none;
}

.envelope-card-wrapper.opened .letter-opened {
  display: block;
}

.letter-paper-header {
  display: flex;
  justify-content: flex-end;
  border-bottom: 1px dashed var(--border-glass);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.letter-back-btn {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--pink-neon);
  cursor: pointer;
  transition: opacity 0.2s ease;
  pointer-events: auto;
}

.letter-back-btn:hover {
  opacity: 0.8;
}

.letter-paper-body {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--text-light);
  line-height: 1.8;
  text-align: left;
}

.letter-paper-body .highlight {
  color: #ff5e97;
  font-weight: 600;
}

/* Relocated absolutely at bottom-right corner of relative envelope-container */
.mascot-letter {
  position: absolute;
  bottom: -35px;
  right: -20px;
  width: 80px;
  z-index: 15;
}

/* Magic Oracle Cards */
.oracle-container {
  perspective: 1000px;
  width: 100%;
  height: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.oracle-card {
  width: 270px;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.oracle-card.flipped {
  transform: rotateY(180deg);
}

.oracle-front,
.oracle-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-premium);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px;
  text-align: center;
}

.oracle-front {
  background: linear-gradient(135deg, var(--plum-dark), #2c123d);
}

.oracle-sphere {
  font-size: 3rem;
  margin-bottom: 10px;
  animation: float-sphere 3s ease-in-out infinite alternate;
}

@keyframes float-sphere {
  0% {
    transform: translateY(0) scale(1);
    filter: drop-shadow(0 0 10px rgba(216, 180, 254, 0.3));
  }

  100% {
    transform: translateY(-8px) scale(1.05);
    filter: drop-shadow(0 0 25px rgba(255, 94, 151, 0.5));
  }
}

.oracle-front h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--rose-gold);
  margin-bottom: 8px;
}

.oracle-front p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 20px;
}

.oracle-btn {
  background: linear-gradient(135deg, var(--pink-neon), var(--pink-deep));
  border: none;
  padding: 8px 22px;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 94, 151, 0.4);
  transition: all 0.3s ease;
  pointer-events: auto;
}

.oracle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 94, 151, 0.6);
}

.oracle-back {
  background: linear-gradient(135deg, #2c123d, var(--plum-dark));
  transform: rotateY(180deg);
  justify-content: space-between;
}

.oracle-star {
  font-size: 2.2rem;
  animation: spin-slow 8s linear infinite;
}

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

.blessing-quote {
  font-family: var(--font-accent);
  font-size: 1.25rem;
  color: var(--rose-gold);
  line-height: 1.6;
  margin: 15px 0;
}

.oracle-btn-reset {
  background: transparent;
  border: 1px solid var(--border-glass);
  padding: 6px 16px;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: auto;
}

.oracle-btn-reset:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
}

/* =============================================
   STEP 3 CARD: TIMELINE SCROLLER
   ============================================= */

.timeline-scroller {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  width: 100%;
  padding: 15px 5px 22px;
  scrollbar-width: none;
}

.timeline-scroller::-webkit-scrollbar {
  display: none;
}

.timeline-card {
  width: 215px;
  flex-shrink: 0;
  position: relative;
  perspective: 1000px;
  cursor: pointer;
}

.timeline-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.timeline-card.flipped .timeline-card-inner {
  transform: rotateY(180deg);
}

.timeline-card:hover .timeline-card-inner {
  transform: translateY(-8px);
}

.timeline-card.flipped:hover .timeline-card-inner {
  transform: translateY(-8px) rotateY(180deg);
}

.timeline-card-front, .timeline-card-back {
  width: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 12px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-premium);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-card-front {
  /* relative so it determines the height of the 3D container */
}

.timeline-card-back {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.timeline-card-back p {
  font-family: var(--font-accent);
  font-size: 1.25rem;
  color: var(--rose-gold);
  line-height: 1.6;
}

.timeline-card:hover .timeline-card-front,
.timeline-card:hover .timeline-card-back {
  background: rgba(45, 23, 61, 0.8);
  box-shadow: var(--shadow-glow);
  border-color: rgba(255, 94, 151, 0.4);
}

.timeline-card .photo-slot {
  aspect-ratio: 3 / 4;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timeline-card .photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.timeline-card .caption,
.gallery-side-card .caption,
.finale-photo-box .caption {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 10px;
  line-height: 1.4;
}

/* Mascot timeline positioned safely inside boundaries so scroller doesn't clip */
.mascot-timeline {
  position: absolute;
  bottom: 5px;
  right: 10px;
  width: 65px;
  z-index: 15;
}

/* =============================================
   STEP 4 CARD: WISH CAROUSEL & GALLERY
   ============================================= */

.wishes-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 25px;
  width: 100%;
  align-items: center;
}

.wish-carousel-container {
  width: 100%;
  height: 220px;
  position: relative;
}

.wish-carousel {
  width: 100%;
  height: 80%;
  position: relative;
  overflow: hidden;
}

.wish-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-premium);
  opacity: 0;
  transform: scale(0.9) translateX(100%);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.wish-card.active {
  opacity: 1;
  transform: scale(1) translateX(0);
}

.wish-card.prev {
  opacity: 0;
  transform: scale(0.9) translateX(-100%);
}



.wish-emoji {
  font-size: 2rem;
  margin-bottom: 4px;
}

.wish-text {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  text-align: center;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  line-height: 1.5;
}

.wish-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.wish-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rose-gold);
  opacity: 0.35;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.wish-dot.active {
  opacity: 1;
  background: var(--pink-neon);
  transform: scale(1.25);
}

.wishes-gallery-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.gallery-side-card {
  position: relative;
  perspective: 1000px;
  cursor: pointer;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-premium);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-side-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

.gallery-side-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.gallery-side-card.flipped .gallery-side-card-inner {
  transform: rotateY(180deg);
}

.gallery-side-card-front,
.gallery-side-card-back {
  position: relative;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 10px 18px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
}

.gallery-side-card-back {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  background: rgba(45, 23, 61, 0.8);
  border-color: rgba(255, 94, 151, 0.4);
}

.gallery-side-card-back p {
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
}

.gallery-side-card .photo-slot {
  aspect-ratio: 4 / 5;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-side-card .photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

/* Mascot stamp positioned safely at coordinates inside wrapper */
.mascot-hero-photo {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 60px;
  z-index: 15;
}

/* =============================================
   STEP 5 CARD: CAKE FINALE
   ============================================= */

.finale-panel {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 35px;
  align-items: center;
}

.finale-photo-box {
  position: relative;
  width: min(250px, 90vw);
  margin: 0 auto;
  perspective: 1000px;
  cursor: pointer;
}

.finale-photo-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.finale-photo-box.flipped .finale-photo-inner {
  transform: rotateY(180deg);
}

.finale-photo-box:hover .finale-photo-inner {
  transform: translateY(-6px);
}

.finale-photo-box.flipped:hover .finale-photo-inner {
  transform: translateY(-6px) rotateY(180deg);
}

.finale-photo-front, .finale-photo-back {
  width: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 10px 18px;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-premium);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.finale-photo-front {
  /* Determines height */
}

.finale-photo-back {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.finale-photo-back p {
  font-family: var(--font-accent);
  font-size: 1.0rem;
  color: var(--rose-gold);
  line-height: 1.6;
}

.finale-photo-box:hover .finale-photo-front,
.finale-photo-box:hover .finale-photo-back {
  background: rgba(45, 23, 61, 0.8);
  box-shadow: var(--shadow-glow);
  border-color: rgba(255, 94, 151, 0.4);
}

.finale-photo-box .photo-slot {
  aspect-ratio: 4 / 5;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.finale-photo-box .photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
}

.cake-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-premium);
  width: 100%;
}

.cake-tip {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.cake-container {
  position: relative;
  margin: 18px 0;
}

/* Center cake box and its candles relative stack flow */
.cake {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Pure block-flow candles layout wrapper. Center-aligned, no absolute overlapping issues. */
.candles {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: -3px;
  /* resting candles properly on top layer */
  z-index: 10;
  position: relative;
}

.candle {
  width: 5px;
  height: 24px;
  background: linear-gradient(135deg, #a29bfe, #ffeaa7);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.candle::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 8px;
  height: 9px;
  background: radial-gradient(ellipse, #ffd32a, #ff9800, transparent);
  border-radius: 50%;
  animation: flicker 0.3s ease-in-out infinite alternate;
}

.candle.blown::before {
  opacity: 0;
  animation: none;
}

.candle.blown::after {
  content: '';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  height: 10px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  animation: smoke-rise 1s ease-out forwards;
}

@keyframes flicker {
  0% {
    transform: translateX(-50%) rotate(-3deg);
  }

  100% {
    transform: translateX(-50%) rotate(3deg);
  }
}

@keyframes smoke-rise {
  0% {
    opacity: 0.6;
    transform: translateY(0);
  }

  100% {
    opacity: 0;
    transform: translateY(-12px) scale(1.4);
  }
}

.cake-layer {
  border-radius: var(--radius-sm);
  position: relative;
}

.cake-layer-1 {
  width: 110px;
  height: 32px;
  background: #ff85a2;
  z-index: 3;
}

.cake-layer-2 {
  width: 140px;
  height: 38px;
  background: #c084fc;
  z-index: 2;
}

.cake-layer-3 {
  width: 170px;
  height: 42px;
  background: #f87171;
  z-index: 1;
}

.cake-layer-2::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 10%;
  right: 10%;
  height: 10px;
  background: white;
  border-radius: 0 0 50% 50%;
  opacity: 0.6;
}

.cake-plate {
  width: 200px;
  height: 9px;
  background: #4a3753;
  border-radius: 50%;
  margin-top: -2px;
}

.blow-btn {
  background: linear-gradient(135deg, var(--gold), #fcd34d);
  border: none;
  padding: 10px 26px;
  border-radius: var(--radius-xl);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--gold-glow);
  color: #1e0927;
  transition: all 0.3s ease;
}

.blow-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.blow-btn.hidden {
  display: none;
}

.cake-message {
  font-family: var(--font-title);
  font-size: 1.0rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.8s ease;
}

.cake-message.visible {
  opacity: 1;
  transform: translateY(0);
}

.cake-sub-message {
  font-family: var(--font-accent);
  font-size: 1.25rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
  opacity: 0;
  transition: all 0.8s ease 0.3s;
}

.cake-sub-message.visible {
  opacity: 1;
}

/* Celebrating mascot stands absolutely next to the cake layers (on the left), completely out of bottom text bounds */
.mascot-cake {
  position: absolute;
  bottom: 0px;
  left: -80px;
  width: 75px;
  z-index: 15;
  transition: all 0.8s ease;
}

.mascot-cake.celebrating {
  animation: mascot-dance 0.5s ease-in-out infinite alternate;
}

@keyframes mascot-dance {
  0% {
    transform: rotate(-8deg);
  }

  100% {
    transform: rotate(8deg);
  }
}

/* =============================================
   VERTICAL DOCK (Desktop: Left side)
   ============================================= */

.journey-dock {
  position: fixed;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  width: 76px;
  transition: all 0.4s ease;
}

.dock-wrapper {
  background: rgba(25, 10, 36, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  padding: 22px 10px;
  border-radius: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  box-shadow: var(--shadow-premium);
}

.dock-item {
  background: transparent;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-muted);
  position: relative;
  width: 100%;
}

.dock-item:hover {
  transform: translateX(4px);
  color: var(--text-light);
}

.dock-icon {
  font-size: 1.45rem;
  transition: transform 0.3s ease;
}

.dock-label {
  font-size: 0.6rem;
  font-weight: 600;
  margin-top: 4px;
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.3s ease;
  position: absolute;
  left: 65px;
  background: var(--plum-dark);
  padding: 4px 8px;
  border-radius: 6px;
  color: var(--text-light);
  white-space: nowrap;
  border: 1px solid var(--border-glass);
  pointer-events: none;
}

.dock-item:hover .dock-label {
  opacity: 1;
  transform: translateX(0);
}

.dock-item.active {
  color: var(--pink-neon);
}

.dock-item.active .dock-icon {
  transform: scale(1.2);
}

/* Glowing active dot next to vertical icon */
.dock-item.active::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pink-neon);
  box-shadow: 0 0 8px var(--pink-neon);
}

/* =============================================
   MUSIC WIDGET & FOOTER
   ============================================= */

.music-widget {
  position: fixed;
  bottom: 25px;
  left: 30px;
  z-index: 9999;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(30, 14, 41, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-premium);
}

.music-widget.playing {
  animation: music-glow 2s ease-in-out infinite;
}

@keyframes music-glow {

  0%,
  100% {
    box-shadow: var(--shadow-premium);
  }

  50% {
    box-shadow: 0 0 25px rgba(255, 94, 151, 0.4);
  }
}

.music-icon {
  font-size: 1.2rem;
}

.music-widget.playing .music-icon {
  animation: spin 3s linear infinite;
}

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

.footer {
  text-align: center;
  opacity: 0.4;
  margin-top: 20px;
  width: 100%;
}

.footer-text {
  font-family: var(--font-body);
  font-size: 0.95rem;
}

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
}

/* =============================================
   RESPONSIVE DESIGN (Mobile adjustments)
   ============================================= */

@media (max-height: 700px) {
  #wrapper {
    padding-top: 15px;
  }

  .scrapbook-header {
    margin-bottom: 10px;
  }
}

@media (max-width: 900px) {

  /* Dock transitions to bottom horizontal floating dock */
  .journey-dock {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    top: auto;
    width: min(480px, 92vw);
    height: auto;
  }

  .dock-wrapper {
    flex-direction: row;
    padding: 8px;
    border-radius: var(--radius-xl);
    gap: 0;
    width: 100%;
    justify-content: space-around;
  }

  .dock-item {
    flex: 1;
    /* Center and distribute equally! */
    width: auto;
    padding: 6px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .dock-item:hover {
    transform: translateY(-4px);
  }

  /* Reset vertical indicator coordinates to clean mobile bottom center dots */
  .dock-item.active::after {
    bottom: -4px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    top: auto;
  }

  .dock-label {
    display: none !important;
  }

  .scrapbook-header,
  .presentation-stage,
  .footer {
    margin-left: 0 !important;
  }

  #wrapper {
    padding-bottom: 100px;
  }

  /* Support vertical scrolling on phone viewports to prevent layout cutoff */
  .presentation-stage {
    align-items: flex-start;
    overflow-y: auto;
    padding-bottom: 30px;
    scrollbar-width: none;
  }

  .presentation-stage::-webkit-scrollbar {
    display: none;
  }

  .journey-section.active {
    justify-content: flex-start;
    padding: 10px 5px;
    height: auto;
    min-height: 100%;
  }

  .letter-oracle-split {
    grid-template-columns: 1fr;
    gap: 25px;
    max-height: none;
    overflow-y: visible;
    padding-bottom: 15px;
  }

  .oracle-container {
    height: 280px;
  }

  .wishes-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .wishes-gallery-side {
    max-width: 460px;
    margin: 0 auto;
  }

  .finale-panel {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .polaroid-stack {
    width: min(250px, 75vw);
    height: 330px;
  }

  .polaroid-card .caption {
    font-size: 0.85rem;
  }

  .envelope-back {
    height: 130px;
  }

  .timeline-card {
    width: 165px;
  }

  .timeline-card .caption {
    font-size: 0.75rem;
  }

  .wish-carousel-container {
    height: 180px;
  }

  .wish-text {
    font-size: 0.95rem;
  }

  .mascot-gallery {
    width: 60px;
    bottom: 5px;
    right: -5px;
  }

  .mascot-timeline {
    width: 50px;
    bottom: 5px;
    right: 5px;
  }

  .mascot-hero-photo {
    width: 50px;
    top: 5px;
    right: 5px;
  }

  .mascot-cake {
    width: 60px;
    left: -60px;
    bottom: -5px;
  }
}

@media (max-width: 480px) {
  .gift-box-body {
    width: 110px;
    height: 85px;
  }

  .gift-box-lid {
    width: 110px;
    height: 26px;
  }

  .entrance-text {
    font-size: 0.95rem;
  }

  .mascot-entrance {
    width: 65px;
    right: -35px;
  }

  .envelope-back {
    height: 110px;
  }

  .letter-paper {
    padding: 12px 8px;
  }

  .letter-text {
    font-size: 0.8rem;
  }

  .cake-box .cake-container {
    transform: scale(0.85);
    margin: 10px 0;
  }

  .mascot-cake {
    left: -20px;
    bottom: 5px;
    width: 55px;
  }

  .finale-photo-box {
    width: 180px;
  }

  .mascot-letter {
    width: 60px;
    bottom: -30px;
    right: -10px;
  }

  .wishes-gallery-side {
    grid-template-columns: 1fr;
    max-width: 220px;
    margin: 0 auto;
  }

  .music-widget {
    bottom: auto;
    top: 15px;
    left: 15px;
    width: 38px;
    height: 38px;
  }
}