/* ═══════════════════════════════════════════════════════════════
   WHOLESOME LOVE JOURNEY FOR PENGUUUU — HIGH PERFORMANCE DESIGN SYSTEM
   Optimized for 60-120fps silky-smooth interactions on all devices
   ═══════════════════════════════════════════════════════════════ */

:root {
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-script: 'Caveat', cursive, sans-serif;

  /* Curated Romantic Color Palette */
  --bg-deep: #080611;
  --bg-gradient: radial-gradient(circle at 50% 10%, #240e22 0%, #0f081a 50%, #05040a 100%);
  
  --primary-pink: #ff5e8e;
  --primary-glow: rgba(255, 94, 142, 0.35);
  --sunflower-gold: #ffbe0b;
  --sunflower-glow: rgba(255, 190, 11, 0.35);
  --warm-rose: #ff758f;
  --lavender-soft: #c8b6ff;
  
  --text-main: #fcf9fc;
  --text-muted: #b8a9c2;
  --text-dim: #7d6f8a;

  /* Optimized Glassmorphism: lower blur radius, richer background for maximum rendering speed */
  --glass-bg: rgba(20, 12, 28, 0.82);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-hover: rgba(255, 190, 11, 0.4);
  --glass-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --radius-full: 9999px;

  --transition-fast: 0.18s ease-out;
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html, body {
  width: 100%;
  min-height: 100%;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  overflow-x: hidden;
  position: relative;
  line-height: 1.6;
}

body {
  background: var(--bg-gradient);
  background-attachment: fixed;
}

/* ════════════ LIGHTWEIGHT AMBIENT CSS PARTICLES (COMPOSITOR THREAD) ════════════ */
.ambient-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.floating-p {
  position: absolute;
  bottom: -40px;
  font-size: 1.4rem;
  opacity: 0.4;
  user-select: none;
  will-change: transform;
  animation: floatUpward linear infinite;
}

@keyframes floatUpward {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0;
  }
  15% {
    opacity: 0.5;
  }
  85% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-110vh) rotate(360deg);
    opacity: 0;
  }
}



/* Main Container */
#app-container {
  position: relative;
  z-index: 1;
  max-width: 740px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 18px 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* ════════════ STAGE TRANSITIONS ════════════ */
.stage-section {
  display: none;
  width: 100%;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s ease-out, transform 0.35s ease-out;
}

.stage-section.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  transform: translateY(0);
}

/* ════════════ GLASS CARDS (PERFORMANCE OPTIMIZED) ════════════ */
.glass-card {
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 5vw, 40px);
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow: hidden;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 190, 11, 0.5), rgba(255, 94, 142, 0.5), transparent);
}

/* ════════════ BADGES & TAGS ════════════ */
.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 94, 142, 0.12);
  border: 1px solid rgba(255, 94, 142, 0.25);
  border-radius: var(--radius-full);
  color: #ff9ebb;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 20px;
}

.card-badge.pulse-badge {
  background: rgba(255, 190, 11, 0.15);
  border-color: rgba(255, 190, 11, 0.4);
  color: var(--sunflower-gold);
}

/* ════════════ HERO CARD (STAGE 0) ════════════ */
.hero-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}

.hero-title .sub-lead {
  font-size: clamp(0.95rem, 3vw, 1.2rem);
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.hero-title .highlight-name {
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 7vw, 3.8rem);
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(135deg, #fff 20%, #ffe07a 60%, #ff85aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-title .pet-name {
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--warm-rose);
}

.hero-desc {
  font-size: clamp(0.98rem, 2.5vw, 1.12rem);
  color: var(--text-muted);
  max-width: 530px;
  margin-bottom: 26px;
  font-weight: 300;
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  margin-bottom: 30px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.86rem;
  color: #e2d9ec;
}

.meta-divider {
  color: var(--text-dim);
}

/* ════════════ BUTTONS & MICRO-INTERACTIONS ════════════ */
.glow-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 34px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.glow-btn.primary-btn {
  background: linear-gradient(135deg, #ff5e8e, #ffbe0b);
  color: #160716;
  box-shadow: 0 8px 24px var(--primary-glow);
}

.glow-btn.primary-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 190, 11, 0.45);
}

.glow-btn.primary-btn:active {
  transform: translateY(0);
}

.glow-btn.secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.glow-btn.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 190, 11, 0.4);
  transform: translateY(-2px);
}

/* ════════════ QUIZ CARDS (STAGES 1-5) ════════════ */
.quiz-card {
  display: flex;
  flex-direction: column;
}

.quiz-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  margin-bottom: 22px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff5e8e, #ffbe0b);
  border-radius: var(--radius-full);
  transition: width 0.4s ease-out;
}

.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.q-step {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.q-tag {
  font-size: 0.85rem;
  color: var(--sunflower-gold);
  font-weight: 500;
}

.q-title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin-bottom: 8px;
}

.q-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.quiz-opt {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-sans);
  text-align: left;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  outline: none;
}

.quiz-opt:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--glass-border-hover);
  transform: translateX(4px);
}

.quiz-opt:active {
  transform: translateX(2px) scale(0.99);
}

.opt-emoji {
  font-size: 1.7rem;
  flex-shrink: 0;
}

.opt-content {
  display: flex;
  flex-direction: column;
}

.opt-content strong {
  font-size: 1.02rem;
  font-weight: 600;
  color: #fff;
}

.opt-content small {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.quiz-opt.best-opt {
  background: linear-gradient(135deg, rgba(255, 94, 142, 0.08), rgba(255, 190, 11, 0.08));
  border-color: rgba(255, 190, 11, 0.35);
}

/* ════════════ RUNAWAY BUTTON (STAGE 5) ════════════ */
.runaway-card {
  text-align: center;
}

.runaway-container {
  position: relative;
  width: 100%;
  min-height: 250px;
  margin: 18px 0 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 24px;
  overflow: hidden;
}

.yes-promise-btn {
  font-size: 1.2rem;
  padding: 18px 38px;
  background: linear-gradient(135deg, #ff3377, #ffbe0b);
  color: #fff;
  z-index: 5;
  transition: transform 0.25s ease-out;
}

.no-runaway-btn {
  padding: 12px 28px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-full);
  color: #a79cb3;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  cursor: pointer;
  z-index: 10;
  transition: left 0.15s ease-out, top 0.15s ease-out;
  user-select: none;
}

.tease-text {
  font-size: 0.88rem;
  color: var(--text-dim);
  margin-top: 10px;
}

/* ════════════ STAGE 6: THE LOVE VAULT ════════════ */
.vault-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

.vault-header {
  text-align: center;
}

.vault-title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 700;
  background: linear-gradient(135deg, #fff, #ffe07a, #ff758f);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.vault-sub {
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* ── Interactive Wax-Sealed Envelope ── */
.envelope-wrapper {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
  margin-bottom: 24px;
  transition: margin-top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.envelope-wrapper.is-opened {
  margin-top: 20px;
  margin-bottom: 30px;
}

.love-envelope {
  position: relative;
  width: 100%;
  height: 300px;
  background: #250f22;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: height 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.love-envelope.opened {
  height: auto;
  min-height: 480px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  cursor: default;
}

.envelope-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #1c0a1b;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 190, 11, 0.2);
}

.envelope-letter {
  position: absolute;
  left: 5%;
  bottom: 10px;
  width: 90%;
  height: 85%;
  background: #fdfaf6;
  border-radius: 12px;
  color: #2b1b26;
  padding: 22px 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 2;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.love-envelope.opened .envelope-letter {
  position: relative;
  left: auto;
  bottom: auto;
  width: 92%;
  margin: 18px auto;
  height: auto;
  min-height: 380px;
  transform: none;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  z-index: 15;
  overflow: visible;
}

.letter-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.letter-date {
  font-size: 0.8rem;
  color: #8c7684;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.letter-heading {
  font-family: var(--font-serif);
  font-size: 1.45rem;
  color: #c9184a;
}

.letter-body {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #3b2c36;
}

.letter-sign {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: #c9184a;
  margin-top: 6px;
}

.envelope-front {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, #2f122a 0%, #250d21 100%);
  clip-path: polygon(0 100%, 100% 100%, 100% 45%, 50% 68%, 0 45%);
  -webkit-clip-path: polygon(0 100%, 100% 100%, 100% 45%, 50% 68%, 0 45%);
  z-index: 3;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.love-envelope.opened .envelope-front {
  opacity: 0.15;
}

.envelope-flap {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 140px;
  background: linear-gradient(180deg, #44183d 0%, #30102b 100%);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  -webkit-clip-path: polygon(0 0, 100% 0, 50% 100%);
  transform-origin: top center;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
  z-index: 4;
}

.love-envelope.opened .envelope-flap {
  transform: rotateX(180deg);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.wax-seal {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 66px;
  height: 66px;
  background: radial-gradient(circle, #ffbe0b 20%, #d48b00 80%, #996300 100%);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.love-envelope.opened .wax-seal {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.3);
  pointer-events: none;
}

.seal-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #4a2800;
  font-weight: 800;
  font-size: 0.9rem;
}

.envelope-instruction {
  margin-top: 16px;
  font-size: 0.92rem;
  color: var(--sunflower-gold);
  display: flex;
  align-items: center;
  gap: 6px;
}

.love-envelope.opened + .envelope-instruction {
  opacity: 0;
}

/* ── 2. Official Girlfriend Certificate ── */
.certificate-card {
  width: 100%;
  background: #fffefb;
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  color: #1a0e18;
}

.cert-border {
  border: 3px double #d4af37;
  border-radius: calc(var(--radius-lg) - 8px);
  padding: clamp(22px, 4vw, 38px);
  background: radial-gradient(circle at center, #ffffff 60%, #fdf8eb 100%);
  position: relative;
  text-align: center;
}

.cert-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}

.cert-icon-left, .cert-icon-right {
  font-size: 1.7rem;
}

.cert-pre {
  font-size: 0.72rem;
  letter-spacing: 2px;
  font-weight: 700;
  color: #9c7b23;
  text-transform: uppercase;
  display: block;
  margin-bottom: 3px;
}

.cert-title {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 700;
  color: #2b1126;
  line-height: 1.2;
}

.cert-body {
  font-size: 0.92rem;
  color: #6d5b68;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.cert-recipient {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 700;
  color: #b01948;
  margin-bottom: 14px;
}

.cert-declaration {
  max-width: 500px;
  margin: 0 auto 26px;
  font-size: 1.02rem;
  line-height: 1.7;
  color: #3b2835;
}

.cert-declaration strong {
  color: #8f1238;
}

.cert-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-top: 1px solid rgba(212, 175, 55, 0.3);
  padding-top: 20px;
  margin-top: 18px;
  flex-wrap: wrap;
  gap: 18px;
}

.gold-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #ffd166, #d4af37);
  color: #3b2800;
  font-weight: 800;
  font-size: 0.78rem;
  border-radius: var(--radius-full);
}

.cert-signatures {
  display: flex;
  gap: 32px;
  margin-left: auto;
}

.sig-block {
  text-align: center;
}

.sig-name {
  font-family: var(--font-script);
  font-size: 1.5rem;
  color: #b01948;
  display: block;
}

.sig-line {
  width: 120px;
  height: 1px;
  background: #3b2835;
  margin: 2px auto 4px;
}

.sig-block small {
  font-size: 0.75rem;
  color: #7d6b77;
  text-transform: uppercase;
}

/* ── 3. Endless Reasons Card Deck ── */
.reasons-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.reasons-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  color: #fff;
  margin: 6px 0;
}

.reasons-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.section-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sunflower-gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.reason-box {
  width: 100%;
  max-width: 520px;
  min-height: 140px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 190, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 22px 26px;
  margin-bottom: 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.2s ease-out;
}

.reason-quote-mark {
  font-family: var(--font-serif);
  font-size: 3.8rem;
  line-height: 1;
  color: rgba(255, 190, 11, 0.18);
  position: absolute;
  top: 8px;
  left: 16px;
}

.reason-content {
  font-size: clamp(1.02rem, 2.5vw, 1.2rem);
  font-weight: 500;
  line-height: 1.55;
  color: #fff;
  z-index: 1;
  margin-bottom: 10px;
}

.reason-index {
  font-size: 0.8rem;
  color: var(--sunflower-gold);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── 4. Virtual Hug Dispenser ── */
.hug-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hug-icon-wrapper {
  position: relative;
  width: 86px;
  height: 86px;
  margin-bottom: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-fast);
}

.hug-icon-wrapper:hover {
  transform: scale(1.08);
}

.hug-icon-wrapper:active {
  transform: scale(0.94);
}

.hug-emoji {
  font-size: 3.3rem;
  z-index: 2;
  user-select: none;
}

.hug-glow {
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255, 94, 142, 0.5) 0%, transparent 70%);
  border-radius: 50%;
}

.hug-card h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: #fff;
  margin-bottom: 6px;
}

.hug-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.hug-pill {
  display: inline-block;
  padding: 8px 18px;
  background: rgba(255, 94, 142, 0.14);
  border: 1px solid rgba(255, 94, 142, 0.3);
  border-radius: var(--radius-full);
  color: #ff9ebb;
  font-size: 0.92rem;
  font-weight: 600;
}

/* ── Footer ── */
.vault-footer {
  text-align: center;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.text-link {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.text-link:hover {
  color: #fff;
}

.final-love-note {
  font-size: 0.88rem;
  color: var(--text-dim);
}

/* ════════════ TOAST NOTIFICATIONS ════════════ */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
  pointer-events: none;
  width: 90%;
  max-width: 420px;
}

.toast {
  background: rgba(18, 10, 24, 0.94);
  border: 1px solid rgba(255, 190, 11, 0.35);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toastSlideUp 0.25s ease-out forwards;
  pointer-events: auto;
}

@keyframes toastSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast.toast-leave {
  animation: toastFadeOut 0.25s forwards ease-in;
}

@keyframes toastFadeOut {
  to { opacity: 0; transform: translateY(-8px); }
}

/* ════════════ RESPONSIVE ADAPTATIONS (MOBILE DOWN TO 320PX) ════════════ */
@media (max-width: 600px) {
  #app-container {
    padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(50px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }

  .glass-card {
    padding: 20px 14px;
    border-radius: var(--radius-md);
  }

  .hero-title .highlight-name {
    font-size: clamp(2rem, 9vw, 2.8rem);
  }

  .hero-meta {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-md);
  }

  .meta-divider {
    display: none;
  }

  .quiz-opt {
    padding: 13px 14px;
    gap: 12px;
  }

  .opt-emoji {
    font-size: 1.5rem;
  }

  .runaway-container {
    min-height: 250px;
    padding: 16px;
  }

  .yes-promise-btn {
    font-size: 1.05rem;
    padding: 15px 22px;
    width: 100%;
    max-width: 280px;
  }

  .love-envelope {
    height: 270px;
  }

  .love-envelope.opened {
    height: auto;
    min-height: 440px;
  }

  .envelope-wrapper {
    margin-top: 24px;
  }

  .envelope-wrapper.is-opened {
    margin-top: 14px;
    margin-bottom: 24px;
  }

  .love-envelope.opened .envelope-letter {
    transform: none;
    min-height: 340px;
    padding: 18px 15px;
    margin: 12px auto;
  }

  .cert-border {
    padding: 20px 14px;
  }

  .cert-footer {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .cert-signatures {
    margin-left: 0;
    width: 100%;
    justify-content: space-around;
  }

  .sig-line {
    width: clamp(80px, 26vw, 110px);
  }

  .toast-container {
    width: 92%;
    max-width: 360px;
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  .toast {
    padding: 11px 14px;
    font-size: 0.88rem;
  }
}
