/* ==========================================================================
   20-10 GIFT FOR KHÁNH • OPTION 1: SUNSET GLOW & PEACHY VIBE
   Palette: Warm Peach Coral, Sunset Rose, Soft Lilac Glow & Honey Gold
   ========================================================================== */

:root {
  /* Color Tokens - Sunset Glow */
  --bg-primary: #FFF5F0;
  --bg-secondary: #FFEBE3;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-inner: rgba(255, 255, 255, 0.72);
  
  --sunset-coral: #FF725E;
  --sunset-rose: #FF5376;
  --sunset-peach: #FFA07A;
  --sunset-gold: #FFB703;
  --sunset-amber: #FF9F1C;
  --sunset-lilac: #A370F7;

  --text-main: #2B1810;
  --text-body: #543932;
  --text-muted: #8F7068;
  
  --border-card: rgba(255, 114, 94, 0.28);
  --border-subtle: rgba(255, 114, 94, 0.16);

  --shadow-card: 0 18px 45px rgba(255, 83, 118, 0.16), 0 4px 15px rgba(0, 0, 0, 0.04);
  --shadow-floating: 0 12px 35px rgba(255, 114, 94, 0.25);
  --shadow-glow: 0 0 30px rgba(255, 114, 94, 0.35);

  /* Typography */
  --font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-sans: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-letter: 'Patrick Hand', 'Segoe Print', cursive;
  --font-script: 'Alex Brush', cursive;

  /* Viewport Height fallback */
  --app-height: 100vh;
}

@supports (height: 100dvh) {
  :root {
    --app-height: 100dvh;
  }
}

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

html {
  font-size: 16px;
  height: 100%;
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  background: radial-gradient(ellipse at 50% 15%, #FFF6F0 0%, #FFE9DF 45%, #FFDDD1 80%, #F5D3E5 100%);
  color: var(--text-main);
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: relative;
  line-height: 1.6;
  user-select: none;
  touch-action: manipulation;
}

button,
.btn-flower-shower,
.btn-primary-action,
.btn-claim-voucher,
.btn-reveal-all,
.btn-replay,
.blindbox-card,
.gift-3d-box,
.music-btn {
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ==========================================================================
   BACKGROUND CANVAS & SUNSET AURORA GLOW
   ========================================================================== */

#petal-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

.glow-top {
  top: -140px;
  right: -80px;
  width: 440px;
  height: 440px;
  background: radial-gradient(circle, rgba(255, 114, 94, 0.5) 0%, rgba(255, 160, 122, 0.35) 45%, rgba(255, 245, 240, 0) 70%);
  animation: pulseSunsetTop 8s ease-in-out infinite alternate;
}

.glow-bottom {
  bottom: -160px;
  left: -100px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(163, 112, 247, 0.35) 0%, rgba(255, 83, 118, 0.3) 50%, rgba(255, 245, 240, 0) 70%);
  animation: pulseSunsetBottom 10s ease-in-out infinite alternate;
}

@keyframes pulseSunsetTop {
  0% { transform: scale(1) translate(0, 0); opacity: 0.55; }
  100% { transform: scale(1.15) translate(-25px, 25px); opacity: 0.75; }
}

@keyframes pulseSunsetBottom {
  0% { transform: scale(1) translate(0, 0); opacity: 0.45; }
  100% { transform: scale(1.12) translate(25px, -20px); opacity: 0.65; }
}

/* ==========================================================================
   FLOATING MUSIC CONTROLLER (TOP RIGHT) - INTERACTIVE VINYL & EQUALIZER
   ========================================================================== */

.music-floating-container {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 100;
}

.music-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 3px 10px 3px 4px;
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid var(--border-card);
  border-radius: 22px;
  box-shadow: 0 4px 16px rgba(255, 83, 118, 0.18), 0 2px 6px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.music-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 22px rgba(255, 83, 118, 0.3);
  border-color: var(--sunset-rose);
}

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

/* Pulsing radar glow when playing */
.music-btn.playing {
  border-color: var(--sunset-rose);
  box-shadow: 0 4px 20px rgba(255, 83, 118, 0.35);
}

.music-btn.playing::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 26px;
  border: 1.5px solid rgba(255, 83, 118, 0.45);
  animation: musicRadarPulse 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  pointer-events: none;
}

@keyframes musicRadarPulse {
  0% { transform: scale(0.96); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 0.3; }
  100% { transform: scale(1.14); opacity: 0; }
}

/* Vinyl Disc */
.vinyl-disc {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #25140D 35%, #44221A 70%, #160A06 100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  animation: spinVinyl 4s linear infinite;
  animation-play-state: paused;
}

.music-btn.playing .vinyl-disc {
  animation-play-state: running;
}

.vinyl-disc::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.28);
}

.vinyl-center {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--sunset-amber);
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 0 5px var(--sunset-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: all 0.25s ease;
}

/* Play triangle in the center when paused */
.icon-play-triangle {
  display: block;
  width: 0;
  height: 0;
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-left: 5px solid #FFFFFF;
  margin-left: 1px;
  transition: opacity 0.2s ease;
}

.music-btn.playing .icon-play-triangle {
  opacity: 0;
  display: none;
}

.music-btn.playing .vinyl-center {
  background: #FF5376;
  box-shadow: 0 0 6px #FF5376;
}

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

/* Soundwave Equalizer Bars */
.music-wave-bars {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 15px;
  padding-bottom: 1px;
}

.wave-bar {
  width: 3px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 114, 94, 0.35);
  transition: height 0.25s ease, background 0.25s ease;
}

.music-btn.playing .wave-bar {
  background: linear-gradient(180deg, #FF725E 0%, #FF5376 100%);
}

.music-btn.playing .wave-bar.bar-1 {
  animation: waveBounce1 0.7s ease-in-out infinite alternate;
}
.music-btn.playing .wave-bar.bar-2 {
  animation: waveBounce2 0.5s ease-in-out infinite alternate 0.15s;
}
.music-btn.playing .wave-bar.bar-3 {
  animation: waveBounce3 0.6s ease-in-out infinite alternate 0.3s;
}
.music-btn.playing .wave-bar.bar-4 {
  animation: waveBounce4 0.75s ease-in-out infinite alternate 0.05s;
}

@keyframes waveBounce1 {
  0% { height: 4px; }
  100% { height: 13px; }
}

@keyframes waveBounce2 {
  0% { height: 6px; }
  100% { height: 15px; }
}

@keyframes waveBounce3 {
  0% { height: 5px; }
  100% { height: 14px; }
}

@keyframes waveBounce4 {
  0% { height: 3px; }
  100% { height: 11px; }
}

/* Floating Musical Notes */
.music-notes-flow {
  position: absolute;
  top: -4px;
  left: 10px;
  pointer-events: none;
}

.float-note {
  position: absolute;
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
}

.music-btn.playing .float-note.note-1 {
  color: #FF5376;
  animation: floatMusicNote 2.4s ease-out infinite;
}

.music-btn.playing .float-note.note-2 {
  color: #FFB703;
  animation: floatMusicNote 2.4s ease-out infinite 1.2s;
  left: 8px;
}

@keyframes floatMusicNote {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6) rotate(0deg);
  }
  30% {
    opacity: 0.9;
    transform: translate(-6px, -12px) scale(1) rotate(-15deg);
  }
  70% {
    opacity: 0.7;
    transform: translate(4px, -24px) scale(1.1) rotate(15deg);
  }
  100% {
    opacity: 0;
    transform: translate(-3px, -34px) scale(0.8) rotate(30deg);
  }
}

/* ==========================================================================
   APP VIEWPORT & JOURNEY CARD FRAME
   ========================================================================== */

.app-viewport {
  width: 100vw;
  height: var(--app-height);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 10;
  padding: 24px 16px 20px 16px;
}

.journey-card-frame {
  width: 100%;
  max-width: 540px;
  height: calc(var(--app-height) - 48px);
  max-height: 760px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   SCREENS BASE & TRANSITIONS
   ========================================================================== */

.screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  opacity: 0;
  transform: translateY(20px) scale(0.97);
  transition: opacity 0.45s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.screen.active {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.screen-content {
  width: 100%;
  height: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 28px;
  padding: clamp(20px, 4vw, 36px) clamp(18px, 4vw, 32px);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Custom warm scrollbar */
.screen-content::-webkit-scrollbar {
  width: 4px;
}
.screen-content::-webkit-scrollbar-thumb {
  background: rgba(255, 114, 94, 0.3);
  border-radius: 4px;
}

/* ==========================================================================
   SHARED UI PILLS & BUTTONS
   ========================================================================== */

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(255, 83, 118, 0.1);
  border: 1px solid rgba(255, 83, 118, 0.28);
  border-radius: 24px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--sunset-rose);
  letter-spacing: 0.4px;
  width: fit-content;
  margin: 0 auto;
}

.btn-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #FF5376 0%, #FF725E 50%, #FF9F1C 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  border-radius: 18px;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  box-shadow: 0 8px 25px rgba(255, 83, 118, 0.4);
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary-action::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: 0.6s;
}

.btn-primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 83, 118, 0.55);
  background: linear-gradient(135deg, #FF3D65 0%, #FF604B 50%, #FB8500 100%);
}

.btn-primary-action:hover::after {
  left: 140%;
}

.btn-primary-action:active {
  transform: translateY(1px);
}

/* ==========================================================================
   SCREEN 1: WELCOME & START JOURNEY
   ========================================================================== */

.welcome-content {
  text-align: center;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.hero-envelope-preview {
  position: relative;
  margin: 8px 0 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 3D Envelope Mockup Container */
.envelope-mockup {
  width: 210px;
  height: 135px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: floatEnvelope 4.5s ease-in-out infinite;
}

@keyframes floatEnvelope {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(1deg);
  }
}

/* Envelope Pocket Body */
.env-pocket {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 110px;
  background: linear-gradient(135deg, #FFF9F6 0%, #FFE9E0 100%);
  border-radius: 14px;
  border: 1.5px solid rgba(255, 114, 94, 0.28);
  box-shadow: 0 14px 35px rgba(255, 83, 118, 0.18), 0 3px 8px rgba(0, 0, 0, 0.04);
  z-index: 1;
}

/* Letter Paper peeking out */
.env-paper-peek {
  position: absolute;
  top: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 175px;
  height: 48px;
  background: #FFFFFF;
  border-radius: 8px 8px 0 0;
  border: 1px solid rgba(255, 183, 3, 0.35);
  border-bottom: none;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.03);
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6px 16px;
  gap: 4px;
}

.paper-line {
  height: 2.5px;
  background: rgba(255, 114, 94, 0.25);
  border-radius: 2px;
  width: 100%;
}

.paper-line.short {
  width: 60%;
}

/* Top Flap folded down into center */
.env-flap-top {
  position: absolute;
  top: 25px;
  left: 0;
  width: 100%;
  height: 65px;
  background: linear-gradient(180deg, #FFE8E0 0%, #FFD6C8 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  border-radius: 14px 14px 0 0;
  filter: drop-shadow(0 4px 6px rgba(255, 83, 118, 0.16));
  z-index: 3;
}

/* Delicate Botanical Sprig tucked behind the seal */
.env-botanical-sprig {
  position: absolute;
  top: 50px;
  left: calc(50% + 14px);
  font-size: 1.35rem;
  transform: rotate(32deg);
  z-index: 4;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  pointer-events: none;
  animation: swaySprig 4.5s ease-in-out infinite;
}

@keyframes swaySprig {
  0%, 100% { transform: rotate(32deg) scale(1); }
  50% { transform: rotate(37deg) scale(1.05); }
}

/* Wax Seal sitting centered right at flap tip */
.wax-seal-hero {
  position: absolute;
  top: 86px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFA07A 0%, #FF5376 60%, #D8224D 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(255, 83, 118, 0.45), 0 0 18px rgba(255, 160, 122, 0.35);
  border: 2.5px solid rgba(255, 255, 255, 0.85);
  z-index: 5;
}

.wax-seal-hero::before {
  content: '';
  position: absolute;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 83, 118, 0.45);
  animation: rotateSealRing 12s linear infinite;
}

.seal-initial {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: #FFFFFF;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.pulse-glow {
  animation: pulseSeal 2.8s ease-in-out infinite;
}

@keyframes pulseSeal {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 8px 24px rgba(255, 83, 118, 0.45);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.06);
    box-shadow: 0 12px 32px rgba(255, 83, 118, 0.65), 0 0 25px rgba(255, 160, 122, 0.5);
  }
}

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

.welcome-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 5.5vw, 2.4rem);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.highlight-name {
  background: linear-gradient(135deg, #FF3D65 0%, #FF725E 50%, #FF9F1C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  position: relative;
}

.welcome-desc {
  font-size: clamp(0.92rem, 2.6vw, 1.02rem);
  color: var(--text-body);
  line-height: 1.75;
  max-width: 420px;
}

.welcome-actions {
  width: 100%;
  max-width: 380px;
  margin-top: 6px;
}

.welcome-subhint {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   SCREEN 2: TYPEWRITER WISHES
   ========================================================================== */

.letter-content {
  --letter-ink: #674D62;
  --letter-accent: #865C72;
  gap: 14px;
}

.letter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--letter-accent);
  letter-spacing: 0.2px;
  margin: 0 auto;
}

.letter-badge i {
  width: 16px;
  height: 16px;
}

.typewriter-box {
  flex: 1;
  background: #FFFBF6;
  border: 1px solid #E8DADE;
  border-radius: 20px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.02);
  cursor: pointer;
}

.typewriter-box::-webkit-scrollbar {
  width: 4px;
}

.typewriter-box::-webkit-scrollbar-track {
  background: transparent;
}

.typewriter-box::-webkit-scrollbar-thumb {
  background: rgba(255, 114, 94, 0.28);
  border-radius: 4px;
}

.letter-head-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #EADDE1;
  padding-bottom: 6px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.date-chip {
  font-style: italic;
}

.recipient-chip {
  font-weight: 600;
  color: var(--letter-accent);
}

.typewriter-body {
  font-family: var(--font-letter);
  font-size: clamp(1.25rem, 4.5vw, 1.5rem);
  color: var(--letter-ink);
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: normal;
  white-space: pre-line;
  word-wrap: break-word;
}

.typewriter-text {
  display: inline;
}

.type-cursor {
  display: inline-block;
  color: var(--letter-accent);
  font-weight: 400;
  animation: blinkCursor 0.75s infinite;
  margin-left: 2px;
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.typewriter-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hidden-until-ready {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hidden-until-ready.show-button {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  animation: softBounce 1.5s ease-in-out infinite alternate;
}

@keyframes softBounce {
  from { transform: translateY(0); }
  to { transform: translateY(-4px); }
}

/* ==========================================================================
   SCREEN 3: 3D MYSTERY GIFT BOX & FIREWORKS
   ========================================================================== */

.gift-content {
  gap: 12px;
  align-items: center;
  text-align: center;
}

.gift-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.gift-screen-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4.5vw, 1.85rem);
  font-weight: 700;
  color: var(--text-main);
}

.gift-screen-subtitle {
  font-size: 0.85rem;
  color: var(--sunset-rose);
  font-weight: 500;
}

.gift-stage {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 240px;
}

/* 3D Box Construction */
.gift-3d-box {
  width: 125px;
  height: 125px;
  position: relative;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  animation: floatBox 3.5s ease-in-out infinite;
}

.gift-3d-box:hover {
  transform: scale(1.06);
}

@keyframes floatBox {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-10px) rotate(1.5deg);
  }
}

/* Base */
.box-base {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 90px;
  background: linear-gradient(135deg, #FF6B8B 0%, #FF5376 50%, #E8365B 100%);
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(232, 54, 91, 0.35);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Lid */
.box-lid {
  position: absolute;
  top: 10px;
  left: -8px;
  width: 141px;
  height: 35px;
  background: linear-gradient(135deg, #FF8A73 0%, #FF6B8B 100%);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.5);
  z-index: 5;
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
}

/* Ribbons */
.ribbon-band {
  position: absolute;
  background: linear-gradient(135deg, #FFE28A 0%, #FFB703 50%, #D48B00 100%);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.ribbon-band.lid-h {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 100%;
}

.ribbon-band.base-h {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 100%;
}

/* Gold Bow on Lid */
.ribbon-bow {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 22px;
}

.bow-knot {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #FFF3B3 0%, #FFB703 70%, #C47F00 100%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 3;
}

.bow-loop {
  position: absolute;
  top: 0;
  width: 22px;
  height: 18px;
  border: 4px solid #FFB703;
  border-radius: 50% 50% 30% 30%;
  background: linear-gradient(135deg, rgba(255, 240, 180, 0.95) 0%, rgba(255, 183, 3, 0.95) 100%);
}

.bow-loop.left {
  left: 0;
  transform: rotate(-25deg);
}

.bow-loop.right {
  right: 0;
  transform: rotate(25deg);
}

.box-shadow-ground {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  width: 105px;
  height: 14px;
  background: radial-gradient(ellipse at center, rgba(255, 83, 118, 0.35) 0%, rgba(0, 0, 0, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Gift Opened State */
.gift-3d-box.opened .box-lid {
  transform: translateY(-80px) rotate(-35deg) scale(0.9);
  opacity: 0;
}

.gift-3d-box.opened {
  animation: none;
  transform: scale(0.65) translateY(40px);
  opacity: 0;
  pointer-events: none;
}

/* ==========================================================================
   MINI BLIND BOX 20/10 (TÚI MÙ MAY MẮN)
   ========================================================================== */

.revealed-voucher {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7) translateY(40px);
  pointer-events: none;
  transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.revealed-voucher.revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.blindbox-wrapper {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-card);
  border-radius: 24px;
  padding: 16px 14px;
  box-shadow: 0 16px 45px rgba(255, 83, 118, 0.18), 0 2px 8px rgba(0, 0, 0, 0.04);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 100%;
  overflow-y: auto;
}

.blindbox-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dashed rgba(255, 114, 94, 0.25);
  padding-bottom: 8px;
}

.blindbox-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sunset-rose);
  letter-spacing: 0.5px;
}

.blindbox-tag i {
  width: 14px;
  height: 14px;
}

.blindbox-counter-badge {
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(255, 114, 94, 0.1);
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 500;
}

.blindbox-counter-badge strong {
  color: var(--sunset-rose);
  font-weight: 700;
}

.blindbox-instruction {
  font-size: 0.8rem;
  color: var(--text-body);
  margin: 0;
  font-weight: 500;
  text-align: center;
}

/* 3 Blind Box Grid */
.blindbox-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
}

.blindbox-card {
  perspective: 1000px;
  height: 226px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.25s ease;
}

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

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

.blindbox-side {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

/* Front Face: Sealed Foil Blind Bag */
.blindbox-front {
  justify-content: space-between;
  border: 1.5px solid;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: bagFloat 3.2s ease-in-out infinite;
}

.blindbox-card:nth-child(1) .blindbox-front { animation-delay: 0s; }
.blindbox-card:nth-child(2) .blindbox-front { animation-delay: 0.35s; }
.blindbox-card:nth-child(3) .blindbox-front { animation-delay: 0.7s; }

@keyframes bagFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.blindbox-card:hover .blindbox-front {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 10px 22px rgba(255, 83, 118, 0.22);
}

/* Bag Themes & Gradients */
.bag-sweet {
  background: linear-gradient(150deg, #FFF6F3 0%, #FFE7DF 100%);
  border-color: rgba(255, 114, 94, 0.45);
}

.bag-autumn {
  background: linear-gradient(150deg, #FFF9EE 0%, #FFEECB 100%);
  border-color: rgba(255, 183, 3, 0.45);
}

.bag-secret {
  background: linear-gradient(150deg, #FFF3F7 0%, #FFE2ED 100%);
  border-color: rgba(255, 83, 118, 0.45);
}

/* Tear Notch Header */
.bag-notch {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 6px 4px 6px;
  border-bottom: 1.5px dashed rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.55);
}

.notch-scissors {
  font-size: 0.72rem;
  line-height: 1;
}

.notch-line {
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(0,0,0,0.18) 0 3px, transparent 3px 6px);
}

.bag-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 4px;
  gap: 5px;
}

.bag-number-pill {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bag-sweet .bag-number-pill { color: #E0533C; }
.bag-autumn .bag-number-pill { color: #C47F00; }
.bag-secret .bag-number-pill { color: #D8224D; }

.bag-mystery-symbol {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  position: relative;
}

.q-mark {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 800;
  background: linear-gradient(135deg, #FF725E 0%, #FF5376 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: pulseQ 2s infinite ease-in-out;
}

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

.bag-theme {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-main);
}

.bag-action-chip {
  font-size: 0.68rem;
  font-weight: 600;
  color: #FFFFFF;
  background: linear-gradient(135deg, #FF725E 0%, #FF5376 100%);
  padding: 3px 9px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(255, 83, 118, 0.3);
  transition: transform 0.2s ease;
}

.blindbox-card:hover .bag-action-chip {
  transform: scale(1.06);
}

/* Back Face: Revealed Prize Card */
.blindbox-back {
  transform: rotateY(180deg);
  background: #FFFFFF;
  border: 1.5px solid;
  padding: 10px 7px;
  text-align: center;
  justify-content: space-between;
}

.back-sweet {
  border-color: #FFA07A;
  background: linear-gradient(180deg, #FFFFFF 65%, #FFF0EB 100%);
}

.photo-prize-preview {
  position: relative;
  width: 65px;
  height: 78px;
  padding: 4px 4px 11px;
  margin: 3px auto;
  background: white;
  border-radius: 5px;
  box-shadow: 0 4px 14px #e6a1ad55;
  transform: rotate(-7deg);
}

.photo-prize-preview img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 48%; border-radius: 2px; }
.photo-prize-preview span { position: absolute; right: -12px; top: -12px; color: #d39430; font-size: 30px; }

/* A glass photo prism in the top layer, above the gift cards and petals. */
.photo-dialog {
  --photo-size: min(76vw, 44dvh, 340px);
  --photo-depth: calc(var(--photo-size) * 0.288675);
  width: min(94vw, 540px);
  max-height: 94dvh;
  margin: auto;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #fff9;
  border-radius: 28px;
  color: #fff0f5;
  background: radial-gradient(ellipse at 15% 25%, #77366066, transparent 60%), radial-gradient(ellipse at 100% 80%, #4c3b7b88, transparent 60%), #20152f;
  box-shadow: 0 30px 100px #10091acc, 0 0 60px #c184c42b, inset 0 0 55px #ee9dd712;
}

.photo-dialog::backdrop { background: #120b20cf; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.photo-dialog-content { position: relative; text-align: center; padding: 32px 20px 24px; }
.photo-dialog[open] .photo-dialog-content { animation: photoEntrance .7s ease-out both; }
.photo-close {
  position: absolute; top: 10px; right: 12px; width: 44px; height: 44px;
  display: grid; place-items: center; border: 1px solid #d5b0c455; border-radius: 50%;
  background: #ffffff0d; color: #f6d4e8; font-size: 28px; cursor: pointer;
}
.photo-eyebrow { margin: 8px 35px 12px; color: #e2b78f; font: 600 10px/1.6 var(--font-sans); letter-spacing: 2px; }
.photo-dialog h2 { margin: 0; font-family: var(--font-display); font-size: clamp(22px, 5.5vw, 30px); line-height: 1.3; text-shadow: 0 0 24px #ffbfe366; }
.photo-intro { margin: 9px 0 0; font-size: 12px; color: #d0b4ce; }
.photo-scene {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: calc(var(--photo-size) * 1.45 + 55px);
  margin: 12px 0 0;
  perspective: 1100px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: grab;
}
.photo-scene::after {
  content: ''; position: absolute; bottom: 5px; left: 20%; right: 20%; height: 22px;
  border-radius: 50%; background: radial-gradient(ellipse, #e4a1e755, transparent 70%);
  pointer-events: none;
}
.photo-scene.is-dragging { cursor: grabbing; }
.photo-float {
  position: relative;
  width: var(--photo-size);
  height: calc(var(--photo-size) * 1.3);
  transform-style: preserve-3d;
  animation: photoLevitate 6s ease-in-out infinite;
}
.photo-prism {
  position: relative;
  width: var(--photo-size);
  height: calc(var(--photo-size) * 1.3);
  transform-style: preserve-3d;
  transform: translateZ(calc(-1 * var(--photo-depth))) rotateX(var(--tilt-x, 0deg)) rotateY(calc(var(--rotation, 0deg) + var(--tilt-y, 0deg)));
  transition: transform 850ms cubic-bezier(.22, .8, .25, 1);
}
.is-dragging .photo-prism { transition: none; }
.photo-face {
  position: absolute; inset: 0; margin: 0; padding: 9px 9px 30px;
  border: 1px solid #ffe6f1c9; border-radius: 15px;
  background: linear-gradient(135deg, #f9dcf3, #aa81ad 45%, #e3cefa);
  box-shadow: inset 0 0 0 3px #ffffff60, 0 0 18px #f6c9e965, 0 0 48px #ed9eda30;
  transform: rotateY(calc(var(--face) * 120deg)) translateZ(var(--photo-depth));
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
.photo-face img { display: block; width: 100%; height: 100%; object-fit: contain; background: #291c36; border-radius: 8px; pointer-events: none; }
.photo-face figcaption { position: absolute; bottom: 7px; left: 5px; right: 5px; font-size: 10px; color: #43283f; }
.photo-face::before {
  content: ''; position: absolute; inset: -2px; padding: 2px; border-radius: 17px; pointer-events: none;
  background: conic-gradient(from var(--photo-glow-angle), #ffdc9b, #ef9fff, #ffffff, #a4caff, #ffb4d8, #ffdc9b);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  animation: photoBorderFlow 7s linear infinite;
}
.photo-face::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--light-x, 20%) var(--light-y, 20%), #ffe4ff33, transparent 60%), linear-gradient(115deg, transparent 30%, #fff1 42%, #fff5 47%, transparent 58%);
  background-size: 300% 100%; animation: photoShimmer 5s ease-in-out infinite;
}
.photo-sparkles { position: absolute; inset: 0; pointer-events: none; }
.photo-sparkles span { position: absolute; color: #ffe1a6; text-shadow: 0 0 8px #fff9, 0 0 20px #f6b5ee; font-size: 23px; animation: photoTwinkle 3s ease-in-out infinite; }
.photo-sparkles span:nth-child(1) { left: 9%; top: 16%; }
.photo-sparkles span:nth-child(2) { right: 10%; top: 28%; animation-delay: -.8s; font-size: 15px; }
.photo-sparkles span:nth-child(3) { left: 14%; bottom: 18%; animation-delay: -1.7s; }
.photo-sparkles span:nth-child(4) { right: 14%; bottom: 12%; animation-delay: -2.1s; }
.photo-sparkles span:nth-child(5) { right: 25%; top: 1%; animation-delay: -1.3s; font-size: 13px; }
.photo-sparkles span:nth-child(6) { left: 6%; top: 50%; animation-delay: -.5s; font-size: 12px; }
.photo-controls { display: flex; align-items: center; justify-content: center; gap: 22px; position: relative; }
.photo-controls > button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #dfbed355; background: #ffffff0b; color: #f3d8e9; font-size: 22px; cursor: pointer; transition: background .2s, box-shadow .2s; }
.photo-controls > button:hover { background: #ffffff20; box-shadow: 0 0 20px #e5a5d033; }
.photo-dots { display: flex; gap: 0; }
.photo-dots button { display: grid; place-items: center; width: 30px; height: 44px; border: 0; background: transparent; cursor: pointer; }
.photo-dots button::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #806480; transition: background .2s, transform .2s; }
.photo-dots button[aria-pressed="true"]::after { background: #ffdfb6; box-shadow: 0 0 12px #ffcbe7; transform: scale(1.4); }
.photo-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 600px) {
  .photo-dialog { --photo-size: min(82vw, 44dvh, 360px); width: 98vw; max-height: 98dvh; border-radius: 22px; }
  .photo-dialog-content { padding: 22px 12px 14px; }
  .photo-eyebrow { margin-bottom: 8px; }
  .photo-dialog h2 { font-size: clamp(20px, 5.3vw, 28px); }
  .photo-scene { height: calc(var(--photo-size) * 1.3 + 55px); margin-top: 4px; }
  .photo-face { padding: 6px 6px 27px; }
}
.photo-dialog button:focus-visible, .photo-scene:focus-visible { outline: 2px solid #b272a0; outline-offset: 3px; }
@keyframes photoShimmer { 0%, 15% { background-position: 100% 0; } 65%, 100% { background-position: 0% 0; } }
@keyframes photoTwinkle { 0%, 100% { opacity: .3; transform: scale(.7) rotate(-12deg); } 50% { opacity: 1; transform: scale(1.15) rotate(10deg); } }
.photo-aura {
  position: absolute; width: 100%; height: 100%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at 35% 45%, #f984c942, transparent 55%), radial-gradient(ellipse at 65% 55%, #ae93ff55, transparent 55%);
  filter: blur(20px); animation: photoAurora 9s ease-in-out infinite alternate;
}
.photo-orbit {
  position: absolute; width: 92%; height: 60%; border: 1px solid #efb8ef40; border-radius: 50%;
  box-shadow: 0 0 12px #d9a6ff18, inset 0 0 12px #d9a6ff18; pointer-events: none;
}
.photo-orbit::before, .photo-orbit::after {
  content: ''; position: absolute; left: 15%; top: 12%; width: 5px; height: 5px; border-radius: 50%;
  background: #ffe3b6; box-shadow: 0 0 8px #fff, 0 0 18px #ffb8ea;
}
.photo-orbit::after { left: auto; top: auto; right: 15%; bottom: 12%; width: 3px; height: 3px; }
.photo-orbit-one { transform: rotate(-28deg) rotateX(56deg); animation: photoOrbitOne 12s ease-in-out infinite alternate; }
.photo-orbit-two { width: 86%; height: 76%; transform: rotate(38deg) rotateX(48deg); border-color: #e5ba8c33; animation: photoOrbitTwo 15s ease-in-out infinite alternate; }
.photo-floor {
  position: absolute; bottom: 11px; width: 82%; height: 45px; border-radius: 50%; pointer-events: none;
  border: 1px solid #f5ccf054; background: radial-gradient(ellipse, #ec92db38, #b998ff15 45%, transparent 70%);
  box-shadow: 0 0 25px #ec92db33, inset 0 0 18px #e8a3e52b;
  animation: photoFloorPulse 4s ease-in-out infinite;
}
.photo-reflection {
  position: absolute; left: calc(50% - var(--photo-size) / 2); top: calc(50% + var(--photo-size) * .65 + 4px);
  width: var(--photo-size); height: 48px; overflow: hidden; opacity: .25; pointer-events: none;
  mask-image: linear-gradient(#0009, transparent); -webkit-mask-image: linear-gradient(#0009, transparent);
  filter: blur(1px);
}
.photo-reflection img { width: 100%; height: calc(var(--photo-size) * 1.3); object-fit: contain; transform: scaleY(-1); }
.photo-dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
@property --photo-glow-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes photoBorderFlow { to { --photo-glow-angle: 360deg; } }
@keyframes photoLevitate { 0%, 100% { transform: translateY(3px) rotateZ(-1deg); } 50% { transform: translateY(-7px) rotateZ(1deg); } }
@keyframes photoAurora { from { transform: scale(.9) rotate(-15deg); opacity: .65; } to { transform: scale(1.15) rotate(20deg); opacity: 1; } }
@keyframes photoOrbitOne { to { transform: rotate(10deg) rotateX(65deg); } }
@keyframes photoOrbitTwo { to { transform: rotate(65deg) rotateX(35deg); } }
@keyframes photoFloorPulse { 50% { opacity: .5; transform: scaleX(.9); } }
@keyframes photoEntrance { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
.photo-dialog:not([open]) *, .photo-dialog:not([open]) *::before, .photo-dialog:not([open]) *::after { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .photo-dialog *, .photo-dialog *::before, .photo-dialog *::after { animation: none !important; }
  .photo-prism { transition-duration: 0.01ms; }
}

.invite-dialog {
  width: min(94vw, 470px); max-height: 94dvh; margin: auto; padding: 0;
  overflow-x: hidden; overflow-y: auto; border: 1px solid #fff8d9; border-radius: 26px;
  background: #fffcf3; color: #4e503b; box-shadow: 0 24px 90px #363c3066;
}
.invite-dialog::backdrop { background: #28332e9e; backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
.invite-content { position: relative; padding: 0 22px 22px; text-align: center; }
.invite-close { position: absolute; z-index: 2; top: 10px; right: 10px; width: 44px; height: 44px; border: 1px solid #ffffff88; border-radius: 50%; background: #ffffffc9; color: #5b684c; font-size: 26px; cursor: pointer; }
.invite-landscape { position: relative; height: 140px; margin: 0 -22px 22px; overflow: hidden; background: linear-gradient(#eef1df, #faf0c5); }
.invite-sun { position: absolute; width: 62px; height: 62px; border-radius: 50%; left: 22%; top: 23px; background: #f6ce78; box-shadow: 0 0 45px #f7db97; }
.invite-hill { position: absolute; width: 100%; height: 120px; border-radius: 55% 55% 0 0; }
.invite-hill-back { background: #aebf95; bottom: -53px; left: -24%; transform: rotate(8deg); }
.invite-hill-front { background: #809b70; bottom: -76px; right: -12%; transform: rotate(-12deg); }
.invite-flower { position: absolute; bottom: -6px; font-size: 44px; filter: drop-shadow(0 3px 3px #43513c22); transform-origin: bottom; animation: inviteFlowerSway 5s ease-in-out infinite alternate; }
.invite-flower:nth-of-type(4) { left: 8%; font-size: 34px; }
.invite-flower:nth-of-type(5) { left: 27%; bottom: -12px; animation-delay: -1s; }
.invite-flower:nth-of-type(6) { left: 49%; font-size: 32px; animation-delay: -2s; }
.invite-flower:nth-of-type(7) { right: 18%; bottom: -13px; font-size: 54px; animation-delay: -3s; }
.invite-flower:nth-of-type(8) { right: 2%; font-size: 30px; animation-delay: -4s; }
.invite-eyebrow { margin: 0 0 10px; font-size: 10px; font-weight: 600; letter-spacing: 1.5px; color: #8a7245; }
.invite-dialog h2 { margin: 0; font: 700 clamp(24px, 6vw, 30px)/1.35 var(--font-display); color: #485b3e; }
.invite-description { margin: 13px auto 0; max-width: 350px; font-size: 13px; line-height: 1.8; color: #73745c; }
.invite-playground { position: relative; height: clamp(210px, 29dvh, 245px); margin: 16px 0 0; border-radius: 20px; border: 1px dashed #ddce9b; background: radial-gradient(ellipse at 50% 20%, #f6e8b666, transparent 70%); }
.invite-yes, .invite-no, .invite-done { font-family: var(--font-sans); cursor: pointer; touch-action: manipulation; }
.invite-yes { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); max-width: calc(100% - 16px); min-height: 48px; padding: 12px 24px; border: 1px solid #d99b23; border-radius: 16px; background: linear-gradient(135deg, #f7d773, #efb94e); color: #553c17; font-size: 16px; font-weight: 700; box-shadow: 0 7px 20px #d5a03a33; transition: font-size .18s, padding .18s, box-shadow .18s; }
.invite-yes:hover { box-shadow: 0 8px 26px #d5a03a55; }
.invite-yes { width: max-content; white-space: nowrap; }
.invite-no { position: absolute; top: 138px; left: 50%; transform: translateX(-50%); min-height: 44px; padding: 10px 14px; white-space: nowrap; border: 1px solid #ded9c9; border-radius: 13px; background: #fffdf7; color: #817b69; font-size: 12px; transition: left .16s ease-out, top .16s ease-out; -webkit-tap-highlight-color: transparent; }
.invite-feedback { margin: 12px 0 0; min-height: 36px; font-size: 11px; line-height: 1.7; color: #8b7955; }
.invite-accepted { padding: 22px 0 0; }
.invite-accepted-flower { display: block; font-size: 46px; margin-bottom: 12px; }
.invite-accepted h3 { font-family: var(--font-display); font-size: 23px; color: #667e4d; }
.invite-accepted p { margin: 12px auto 20px; max-width: 330px; color: #73745c; font-size: 13px; line-height: 1.8; }
.invite-done { padding: 12px 22px; min-height: 44px; border-radius: 12px; border: 1px solid #a8b894; background: #eaf0df; color: #526840; font-size: 13px; font-weight: 600; }
.invite-dialog button:focus-visible { outline: 2px solid #7f9258; outline-offset: 3px; }
.invite-dialog [hidden] { display: none; }
@keyframes inviteFlowerSway { from { transform: rotate(-7deg); } to { transform: rotate(7deg); } }
@media (max-height: 700px) {
  .invite-landscape { height: 95px; margin-bottom: 14px; }
  .invite-description { line-height: 1.65; margin-top: 8px; }
  .invite-content { padding-bottom: 14px; }
  .invite-playground { height: 200px; margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .invite-flower { animation: none; }
  .invite-yes, .invite-no { transition: none; }
}

.back-autumn {
  border-color: #FFB703;
  background: linear-gradient(180deg, #FFFFFF 65%, #FFF9ED 100%);
}

.back-secret {
  border-color: #FF5376;
  background: linear-gradient(180deg, #FFFFFF 65%, #FFF2F7 100%);
}

.prize-opened-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  align-self: center;
}

.prize-opened-tag i {
  width: 11px;
  height: 11px;
}

.prize-emoji {
  font-size: 1.75rem;
  line-height: 1.1;
  margin: 1px 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.prize-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.prize-desc {
  font-size: 0.67rem;
  color: var(--text-body);
  line-height: 1.35;
  margin: 0;
}

.prize-validity {
  font-size: 0.61rem;
  color: var(--text-muted);
  font-style: italic;
  padding-top: 3px;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
}

/* Bottom Actions */
.blindbox-bottom-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 2px;
}

.btn-reveal-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 114, 94, 0.08);
  color: var(--sunset-rose);
  border: 1px dashed rgba(255, 83, 118, 0.4);
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-reveal-all:hover {
  background: rgba(255, 114, 94, 0.15);
  border-color: var(--sunset-rose);
  transform: translateY(-1px);
}

.btn-reveal-all i {
  width: 14px;
  height: 14px;
}

.btn-claim-voucher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.32);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-claim-voucher:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.42);
}

.btn-claim-voucher i {
  width: 16px;
  height: 16px;
}

/* Extra small mobile adjustments */
@media (max-width: 380px) {
  .blindbox-grid {
    gap: 5px;
  }
  .blindbox-card {
    height: 212px;
  }
  .bag-mystery-symbol {
    width: 40px;
    height: 40px;
  }
  .q-mark {
    font-size: 1.35rem;
  }
  .prize-emoji {
    font-size: 1.45rem;
  }
  .prize-title {
    font-size: 0.74rem;
  }
  .prize-desc {
    font-size: 0.63rem;
    line-height: 1.25;
  }
}

/* ==========================================================================
   SCREEN 4: FINAL INTERACTION & WARM CLOSING
   ========================================================================== */

.ending-content {
  text-align: center;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ending-flower-burst {
  font-size: 2.5rem;
  animation: pulseFlower 2s ease-in-out infinite alternate;
}

@keyframes pulseFlower {
  from { transform: scale(0.95); }
  to { transform: scale(1.1); filter: drop-shadow(0 0 12px rgba(255, 83, 118, 0.4)); }
}

.ending-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 4.5vw, 1.85rem);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

.ending-message {
  font-size: clamp(0.9rem, 2.5vw, 0.98rem);
  color: var(--text-body);
  line-height: 1.7;
  max-width: 440px;
}

.flower-interactive-box {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 14px;
}

.btn-flower-shower {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  background: linear-gradient(135deg, #FF725E 0%, #FF5376 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 14px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(255, 83, 118, 0.38);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.btn-flower-shower:active {
  transform: scale(0.95);
}

.btn-flower-shower i {
  width: 18px;
  height: 18px;
}

.flower-counter {
  font-size: 0.82rem;
  color: var(--sunset-rose);
  font-weight: 600;
}

.ending-signature {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sig-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.sig-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--sunset-rose);
}

.btn-replay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid rgba(255, 114, 94, 0.3);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-replay:hover {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-main);
  border-color: var(--sunset-rose);
}

.btn-replay i {
  width: 14px;
  height: 14px;
}

/* ==========================================================================
   TAP / CLICK FLOATING HEARTS & PARTICLES
   ========================================================================== */

.floating-particle {
  position: fixed;
  pointer-events: none;
  font-size: 1.35rem;
  z-index: 9999;
  animation: floatUpAndFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 6px rgba(255, 114, 94, 0.5));
}

@keyframes floatUpAndFade {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.6);
  }
  50% {
    opacity: 0.95;
    transform: translate(-50%, -100px) scale(1.25);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -140px) scale(1.5);
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN (PC, LAPTOP, TABLET, MOBILE)
   ========================================================================== */

/* Laptop & Desktop adjustments */
@media (min-width: 768px) {
  .journey-card-frame {
    max-width: 580px;
  }

  .screen-content {
    border-radius: 32px;
    padding: 38px 40px;
  }

  .welcome-desc {
    font-size: 1.05rem;
  }
  
  .typewriter-box {
    padding: 24px 26px;
  }

  .voucher-wrapper {
    padding: 22px 24px;
  }

  .benefit-item {
    padding: 10px 14px;
  }
}

/* Very Small Mobile Screens (iPhone SE / 360px) */
@media (max-height: 670px) {
  .app-viewport {
    padding-top: 50px;
    padding-bottom: 12px;
  }

  .journey-card-frame {
    height: calc(var(--app-height) - 64px);
  }

  .screen-content {
    padding: 16px 14px;
    gap: 8px;
    border-radius: 20px;
  }

  .welcome-content {
    gap: 10px;
  }

  .envelope-mockup {
    width: 175px;
    height: 115px;
  }

  .env-pocket {
    height: 92px;
  }

  .env-paper-peek {
    width: 145px;
    height: 38px;
  }

  .env-flap-top {
    height: 52px;
  }

  .wax-seal-hero {
    top: 72px;
    width: 56px;
    height: 56px;
  }
  
  .seal-initial {
    font-size: 1.35rem;
  }

  .gift-3d-box {
    width: 100px;
    height: 100px;
  }

  .box-base {
    height: 72px;
  }

  .box-lid {
    width: 116px;
    height: 28px;
    left: -8px;
  }

  .benefit-item {
    padding: 6px 10px;
  }

  .benefit-text strong {
    font-size: 0.78rem;
  }

  .benefit-text span {
    font-size: 0.7rem;
  }

  .typewriter-box {
    padding: 12px 14px;
  }

  .typewriter-body {
    font-size: 1.2rem;
    line-height: 1.6;
  }

  .letter-head-info {
    margin-bottom: 6px;
    padding-bottom: 4px;
  }
}
