/* ========== STAGE 1 — Envelope greeting ========== */
.s1-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}
.s1-eyebrow {
  font-family: var(--font-hand);
  color: var(--rose-deep);
  font-size: 22px;
  margin-bottom: -8px;
}
.envelope {
  position: relative;
  width: min(86vw, 320px);
  aspect-ratio: 5 / 3.4;
  cursor: pointer;
  perspective: 900px;
  filter: drop-shadow(0 16px 28px rgba(193,162,184,0.32));
}
.envelope-svg { width: 100%; height: 100%; display: block; }
.env-flap {
  transform-origin: 50% 0%;
  transform-box: fill-box;
  transition: transform 1.0s cubic-bezier(0.55, 0, 0.4, 1);
}
.envelope.is-open .env-flap {
  transform: rotateX(180deg);
}
.env-letter {
  position: absolute;
  inset: 12% 8% 14%;
  background: var(--milk);
  border-radius: 8px;
  padding: 16px 18px 22px;
  box-shadow: inset 0 0 0 1px rgba(220,200,180,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: translateY(0) scale(0.95);
  opacity: 0;
  transition: transform 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s,
              opacity 0.6s ease 0.5s,
              inset 0.85s cubic-bezier(0.34, 1.56, 0.64, 1) 0.5s;
}
.envelope.is-open .env-letter {
  inset: -50% -10% -45%;
  transform: translateY(-10%) scale(1);
  opacity: 1;
  z-index: 10;
  box-shadow:
    inset 0 0 0 1px rgba(220,200,180,0.4),
    0 24px 48px rgba(74,63,85,0.22);
}
.env-letter-name {
  font-family: var(--font-hand);
  font-size: 30px;
  color: var(--rose-deep);
  line-height: 1;
}
.env-letter-sub {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 6px;
}
.env-letter-msg {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
  margin-top: 7px;
  line-height: 1.15;
}
.env-letter-sign {
  font-family: var(--font-hand);
  font-size: 15px;
  color: var(--ink-soft);
  margin-top: 10px;
  line-height: 1.35;
  text-align: center;
}
.env-tap-hint {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translateY(0);} 50% { transform: translateY(-4px);} }
.envelope.is-open ~ .env-tap-hint { display: none; }

.s1-cta { opacity: 0; pointer-events: none; transition: opacity 0.5s ease 1.4s; }
.envelope.is-open ~ .s1-cta { opacity: 1; pointer-events: auto; }

/* ========== STAGE 2 — Balloon memory ========== */
.s2-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  max-width: 480px;
}
.s2-balloon {
  width: 160px;
  animation: floaty 4.5s ease-in-out infinite;
}
@keyframes floaty {
  0%,100% { transform: translateY(0) rotate(-2deg); }
  50%     { transform: translateY(-12px) rotate(2deg); }
}
.s2-text {
  font-family: var(--font-hand);
  font-size: clamp(17px, 4.8vw, 26px);
  text-align: center;
  color: var(--ink);
  line-height: 1.3;
  text-wrap: balance;
  max-width: 320px;
  margin: 0 auto;
}
.s2-text-soft {
  font-size: clamp(15px, 4.2vw, 22px);
  color: var(--ink-soft);
}
.s2-emph {
  font-family: var(--font-display);
  font-size: clamp(18px, 5.4vw, 28px);
  color: var(--rose-deep);
  line-height: 1.2;
  text-align: center;
  text-wrap: balance;
  max-width: 320px;
  margin: 0 auto;
}

/* ========== STAGE 2 — Memory polaroids ========== */
.memory-stack {
  position: relative;
  width: min(80vw, 280px);
  margin: 4px auto 8px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: block;
  -webkit-tap-highlight-color: transparent;
}
.memory-stack::before,
.memory-stack::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #FFFBF6;
  box-shadow:
    0 2px 0 rgba(0,0,0,0.04),
    0 10px 22px rgba(74,63,85,0.18);
  border-radius: 2px;
  z-index: 0;
}
.memory-stack::before { transform: rotate(-5deg) translate(-4px, 6px); }
.memory-stack::after  { transform: rotate(4deg) translate(6px, 4px); }
.mem-polaroid {
  position: relative;
  width: 100%;
  background: #FFFBF6;
  padding: 14px 14px 18px;
  box-shadow:
    0 2px 0 rgba(0,0,0,0.05),
    0 14px 28px rgba(74,63,85,0.22),
    0 28px 48px rgba(74,63,85,0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 1;
  transform: rotate(-1.5deg);
  animation: memFloat 5s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.memory-stack.is-flipping .mem-polaroid {
  animation: memFlip 0.55s cubic-bezier(0.4, 0, 0.4, 1);
}
@keyframes memFlip {
  0%   { transform: rotate(-1.5deg) translate(0, 0); opacity: 1; }
  40%  { transform: rotate(28deg) translate(160%, 30px); opacity: 0; }
  41%  { transform: rotate(-18deg) translate(-160%, 40px); opacity: 0; }
  100% { transform: rotate(-1.5deg) translate(0, 0); opacity: 1; }
}
.mem-polaroid .mem-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  background-color: var(--ink-faint);
  filter: saturate(1.05) contrast(0.98);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
  transition: opacity 0.2s ease;
}
.memory-stack.is-flipping .mem-photo { opacity: 0.4; }
.mem-polaroid .mem-caption {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--ink);
  margin-top: 8px;
  line-height: 1;
}
.mem-counter {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: var(--font-hand);
  font-size: 15px;
  color: var(--ink-soft);
  background: rgba(255,255,255,0.85);
  padding: 2px 8px;
  border-radius: 999px;
  z-index: 4;
  pointer-events: none;
}
.mem-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
  position: relative;
  z-index: 1;
}
.mem-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  opacity: 0.4;
  transition: all 0.25s ease;
}
.mem-dot.is-active { background: var(--rose-deep); opacity: 1; transform: scale(1.4); }
.mem-hint {
  display: block;
  margin-top: 10px;
  font-family: var(--font-hand);
  font-size: 17px;
  color: var(--rose-deep);
  text-align: center;
  position: relative;
  z-index: 1;
  animation: hintPulse 1.4s ease-in-out infinite;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.04); }
}
@keyframes memFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -4px; }
}

/* ========== STAGE 3 — Wish map ========== */
.s3-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 520px;
  padding-top: 40px;
}
/* ----- Wish board (cork-board look) ----- */
.wish-board {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 8px auto 0;
  padding: 14px 10px 10px;
  border-radius: 14px;
  background:
    repeating-linear-gradient(45deg, rgba(168,107,74,0.06) 0 1px, transparent 1px 5px),
    linear-gradient(160deg, #F4DDC0 0%, #E8C9A4 100%);
  box-shadow:
    inset 0 0 0 1px rgba(168,107,74,0.35),
    inset 0 0 18px rgba(168,107,74,0.15),
    0 4px 14px rgba(168,107,74,0.18);
}
.wish-board-routes { display: none; }
.wish-board-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-hand);
  color: rgba(74,63,85,0.5);
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}
.wish-board-empty span {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  opacity: 0.85;
}
.wish-board-slots {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 8px;
  justify-content: center;
  align-items: flex-start;
  min-height: 90px;
  z-index: 1;
}
.wish-note {
  --rot: 0deg;
  --tx: 0px;
  --ty: 0px;
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 6px 6px;
  width: 76px;
  min-height: 56px;
  border-radius: 3px;
  background: linear-gradient(160deg, #FFF6D9 0%, #FCE9B6 100%);
  font-family: var(--font-hand);
  color: #4A3F55;
  text-align: center;
  cursor: pointer;
  transform: rotate(var(--rot)) translate(var(--tx), var(--ty));
  box-shadow: 0 4px 8px rgba(74,63,85,0.18), 0 1px 0 rgba(255,255,255,0.6) inset;
  transition: transform .18s ease;
}
.wish-note:hover { transform: rotate(0deg) translateY(-2px); }
.wish-note--rose     { background: linear-gradient(160deg,#FFE0E4 0%,#F9C4CB 100%); }
.wish-note--peach    { background: linear-gradient(160deg,#FFE3D3 0%,#FBC4A3 100%); }
.wish-note--mint     { background: linear-gradient(160deg,#E5F7E9 0%,#C5EBD0 100%); }
.wish-note--lavender { background: linear-gradient(160deg,#EFE2FF 0%,#D6BFFA 100%); }
.wish-note--cream    { background: linear-gradient(160deg,#FFF6D9 0%,#FCE9B6 100%); }
.wish-note-emoji { font-size: 20px; line-height: 1; }
.wish-note-text  { font-size: 12px; line-height: 1.1; font-weight: 600; }
.wish-note .pin {
  position: absolute;
  top: -5px; left: 50%;
  transform: translateX(-50%);
  width: 10px; height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #FFB7BF 0%, #DE9DA4 60%, #9F5860 100%);
  box-shadow: 0 1px 2px rgba(74,63,85,0.4);
}
.pin--rose     { background: radial-gradient(circle at 30% 30%,#FFB7BF 0%,#DE9DA4 60%,#9F5860 100%); }
.pin--peach    { background: radial-gradient(circle at 30% 30%,#FFD4B7 0%,#FBC4A3 60%,#A8704A 100%); }
.pin--mint     { background: radial-gradient(circle at 30% 30%,#C7EFCF 0%,#A6DDB8 60%,#5A8E6B 100%); }
.pin--lavender { background: radial-gradient(circle at 30% 30%,#E0CFFF 0%,#CDB4F0 60%,#7C5BB0 100%); }
.pin--cream    { background: radial-gradient(circle at 30% 30%,#FFF6D9 0%,#FBE39A 60%,#A07A20 100%); }

/* ----- Wish pool (chip rail) ----- */
.wish-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 14px 0 8px;
  max-width: 540px;
}
.wish-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1.5px solid rgba(74,63,85,0.18);
  border-radius: 999px;
  background: #FFFBF6;
  color: #4A3F55;
  font-family: var(--font-hand);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: transform .15s ease, opacity .2s ease, background .2s ease;
}
.wish-chip:hover { transform: translateY(-2px); }
.wish-chip-emoji { font-size: 20px; }
.wish-chip--rose     { background:#FFE0E4; border-color:#F2C2C7; }
.wish-chip--peach    { background:#FFE3D3; border-color:#FBC4A3; }
.wish-chip--mint     { background:#E5F7E9; border-color:#A6DDB8; }
.wish-chip--lavender { background:#EFE2FF; border-color:#CDB4F0; }
.wish-chip--cream    { background:#FFF6D9; border-color:#FCE9B6; }
.wish-chip.is-on-board {
  opacity: 0.4;
  text-decoration: line-through;
  text-decoration-color: rgba(74,63,85,0.4);
}

.wish-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(120px, auto);
  gap: 18px 14px;
  width: 100%;
}
/* center the lonely 5th card */
.wish-grid > .wish-card:nth-child(5) {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(60%, 220px);
}

.wish-card {
  --rot: 0deg;
  position: relative;
  background: var(--milk);
  border-radius: 6px;
  padding: 18px 10px 14px;
  min-height: 110px;
  text-align: center;
  font-family: var(--font-hand);
  font-size: 17px;
  font-weight: 400;
  color: var(--ink);
  border: none;
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.05),
    0 6px 14px rgba(74,63,85,0.18),
    0 14px 28px rgba(74,63,85,0.10);
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.22s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.18;
  transform: rotate(var(--rot));
}
.wish-card .wish-label { display: block; }
.wish-card .emoji { font-size: 28px; line-height: 1; }

/* sticky-note variant — slightly tinted square */
.wish-card--note            { background: linear-gradient(160deg, #FFF6D9 0%, #FCE9B6 100%); }
.wish-card--note.wish-card--mint { background: linear-gradient(160deg, #E5F7E9 0%, #C5EBD0 100%); }
.wish-card--note.wish-card--rose { background: linear-gradient(160deg, #FFE0E4 0%, #F9C4CB 100%); }

/* polaroid variant — white card with extra bottom space */
.wish-card--polaroid {
  background: #FFFBF6;
  padding: 10px 10px 18px;
  box-shadow:
    0 1px 0 rgba(0,0,0,0.06),
    0 8px 18px rgba(74,63,85,0.22),
    0 18px 36px rgba(74,63,85,0.10);
}
.polaroid-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 0.85;
  background-size: cover;
  background-position: center;
  background-color: var(--ink-faint);
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
  margin-bottom: 6px;
  filter: saturate(1.05) contrast(0.98);
}
.wish-card--polaroid .wish-label {
  font-family: var(--font-hand);
  font-size: 16px;
  color: var(--ink);
  margin-top: 2px;
}

/* hover lifts the card off the board */
.wish-card:hover {
  transform: rotate(0deg) translateY(-4px);
  box-shadow:
    0 2px 0 rgba(0,0,0,0.05),
    0 14px 24px rgba(74,63,85,0.22),
    0 26px 40px rgba(74,63,85,0.14);
  z-index: 2;
}

/* ----- pin (sticky-note variant) ----- */
.pin {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ffb3b3 0%, #d9534f 60%, #8e2c2c 100%);
  box-shadow:
    0 2px 4px rgba(0,0,0,0.35),
    inset -1px -1px 2px rgba(0,0,0,0.25),
    inset 2px 2px 3px rgba(255,255,255,0.55);
  z-index: 3;
}
.pin::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.7);
  filter: blur(0.5px);
}
.pin--mint  { background: radial-gradient(circle at 35% 30%, #c8f5d4 0%, #5fa97a 60%, #2e6b46 100%); }
.pin--peach { background: radial-gradient(circle at 35% 30%, #ffd8c2 0%, #d97a4a 60%, #8a3f1e 100%); }

/* ----- washi tape (polaroid variant) ----- */
.washi-strip {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  width: 70%;
  height: 18px;
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.45) 0 5px,
      rgba(255,255,255,0) 5px 10px),
    linear-gradient(180deg, #FBC4A3 0%, #F2C2C7 100%);
  opacity: 0.92;
  box-shadow: 0 2px 4px rgba(74,63,85,0.18);
  -webkit-mask-image:
    radial-gradient(circle at 4px 0,  transparent 2.5px, black 3px),
    radial-gradient(circle at 4px 18px, transparent 2.5px, black 3px),
    linear-gradient(black, black);
  -webkit-mask-composite: source-in;
  z-index: 3;
}
.washi-strip--lavender {
  background:
    repeating-linear-gradient(135deg,
      rgba(255,255,255,0.45) 0 5px,
      rgba(255,255,255,0) 5px 10px),
    linear-gradient(180deg, #E8D8FF 0%, #CDB4F0 100%);
  transform: translateX(-50%) rotate(5deg);
}

/* selected state — keeps it on the board, just highlighted with a glow */
.wish-card.is-selected {
  outline: 2.5px solid var(--rose-deep);
  outline-offset: 3px;
  box-shadow:
    0 0 0 6px rgba(242,194,199,0.35),
    0 14px 26px rgba(222,157,164,0.45),
    0 24px 40px rgba(74,63,85,0.18);
  transform: rotate(0deg) translateY(-3px) scale(1.03);
  z-index: 2;
}
.wish-card.is-selected::after {
  content: '✓';
  position: absolute;
  top: -10px;
  right: -10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--rose-deep);
  color: white;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(74,63,85,0.25);
  z-index: 4;
}
.wish-counter {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--ink-soft);
  margin-top: 8px;
}
.wish-counter strong { color: var(--rose-deep); }

/* Modal hook (stage 3) */
.hook-emoji { font-size: 38px; margin-bottom: 8px; display: block; }
.hook-title {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.15;
}
.hook-text {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--ink-soft);
  margin-bottom: 16px;
  line-height: 1.3;
}
.hook-privacy {
  font-size: 12px;
  color: var(--rose-deep);
  background: rgba(242, 194, 199, 0.18);
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
  line-height: 1.5;
  font-weight: 600;
}
.secret-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--lavender);
  border-radius: 14px;
  font-family: var(--font-hand);
  font-size: 20px;
  color: var(--ink);
  background: white;
  resize: none;
  outline: none;
  transition: border-color 0.2s ease;
  margin-bottom: 14px;
  line-height: 1.3;
}
.secret-textarea:focus { border-color: var(--rose); }
.secret-textarea::placeholder { color: var(--ink-faint); }

/* ========== STAGE 4 — Balloon release ========== */
.s4-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 480px;
  padding-top: 32px;
}
.balloon-input-card {
  width: 100%;
  background: var(--milk);
  border-radius: var(--r-soft);
  padding: 16px 16px 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255,255,255,0.6);
}
.balloon-textarea {
  width: 100%;
  padding: 8px 4px;
  border: none;
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--ink);
  background: transparent;
  resize: none;
  outline: none;
  line-height: 1.3;
}
.balloon-textarea::placeholder { color: var(--ink-faint); }
.balloon-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(181,173,189,0.3);
}
.char-count {
  font-size: 12px;
  color: var(--ink-faint);
  font-family: var(--font-body);
}
.s4-counter {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--ink-soft);
}
.s4-counter strong { color: var(--rose-deep); }
.s4-privacy {
  font-family: var(--font-hand);
  font-size: clamp(13px, 3.4vw, 16px);
  color: var(--ink-faint);
  text-align: center;
  margin-top: 14px;
  line-height: 1.35;
  text-wrap: pretty;
  max-width: 360px;
}

.balloon-sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  overflow: hidden;
}
.released-balloon {
  position: absolute;
  bottom: -240px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  animation: rise 6.5s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
@keyframes rise {
  0%   { transform: translate(-50%, 0)   rotate(0deg); opacity: 0; }
  10%  { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--sway, 40px)), -130vh) rotate(var(--rot, 6deg)); opacity: 0.4; }
}
.released-balloon .wish-text {
  font-family: var(--font-hand);
  font-size: 15px;
  fill: var(--ink);
}

/* ========== STAGE 5 — Wheel ========== */
.s5-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.wheel-stage {
  position: relative;
  width: min(86vw, 320px);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wheel-pointer {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  filter: drop-shadow(0 4px 6px rgba(74,63,85,0.25));
}
.wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 20px 50px rgba(193,162,184,0.32), inset 0 0 0 6px var(--milk);
  transition: transform 4.5s cubic-bezier(0.17, 0.67, 0.16, 1);
}
.wheel-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: var(--milk);
  border-radius: 50%;
  z-index: 2;
  box-shadow: 0 0 0 4px var(--rose), inset 0 2px 4px rgba(74,63,85,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.prediction-card {
  width: 100%;
  max-width: 420px;
  background: var(--milk);
  border-radius: var(--r-soft);
  padding: 22px 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,0.7);
  text-align: center;
  animation: modal-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.prediction-label {
  font-family: var(--font-hand);
  color: var(--rose-deep);
  font-size: 20px;
  margin-bottom: 8px;
}
.prediction-text {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  line-height: 1.25;
  margin-bottom: 16px;
  text-wrap: balance;
}
.prediction-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* ========== STAGE 6 — Cake with 35 candles ========== */
.s6-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 480px;
}
.cake-stage {
  position: relative;
  width: min(92vw, 360px);
  aspect-ratio: 1.1 / 1;
  margin-top: 8px;
}
.cake-svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 18px 28px rgba(193,162,184,0.28)); }
.candles-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.candle {
  position: absolute;
  width: 6px;
  transform: translate(-50%, -100%);
}
.candle-stick {
  width: 100%;
  height: 18px;
  background: linear-gradient(180deg, var(--lavender-deep), var(--lavender) 50%, var(--rose) 100%);
  border-radius: 2px;
  margin: 0 auto;
}
.candle:nth-child(3n) .candle-stick { background: linear-gradient(180deg, var(--mint-deep), var(--mint) 50%, var(--peach) 100%); }
.candle:nth-child(4n) .candle-stick { background: linear-gradient(180deg, var(--rose-deep), var(--rose) 50%, var(--peach) 100%); }
.candle:nth-child(5n) .candle-stick { background: linear-gradient(180deg, var(--gold), var(--peach) 50%, var(--cream) 100%); }
.candle-flame {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 9px;
  height: 13px;
  margin-left: -4.5px;
  margin-bottom: 1px;
  background: radial-gradient(ellipse 60% 80% at 50% 70%, #FFE066 0%, #FFA552 60%, transparent 75%);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  filter: blur(0.4px);
  animation: flicker 0.9s ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}
.candle-glow {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  margin-bottom: -6px;
  background: radial-gradient(circle, rgba(255,224,102,0.45) 0%, transparent 70%);
  pointer-events: none;
}
@keyframes flicker {
  0%   { transform: scaleY(1)   scaleX(1)   rotate(-3deg); opacity: 0.95; }
  100% { transform: scaleY(1.1) scaleX(0.9) rotate(3deg);  opacity: 1; }
}
.candle.is-out .candle-flame,
.candle.is-out .candle-glow { display: none; }
.candle.is-out .candle-stick { opacity: 0.55; }
.smoke {
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: 6px;
  height: 22px;
  margin-left: -3px;
  background: linear-gradient(180deg, transparent, rgba(180,170,190,0.5));
  border-radius: 50%;
  filter: blur(2.5px);
  animation: smokeUp 1.6s ease-out forwards;
  pointer-events: none;
}
@keyframes smokeUp {
  0%   { transform: translateY(0) scale(0.5); opacity: 0; }
  30%  { opacity: 0.8; }
  100% { transform: translateY(-50px) scale(1.5); opacity: 0; }
}
.cake-instr {
  font-family: var(--font-hand);
  font-size: 22px;
  color: var(--ink-soft);
  text-align: center;
  text-wrap: balance;
}
.cake-progress {
  font-family: var(--font-hand);
  font-size: 20px;
  color: var(--rose-deep);
}
.cake-blow-icon {
  font-size: 26px;
  display: inline-block;
  animation: blowHint 1.6s ease-in-out infinite;
  margin-right: 6px;
}
@keyframes blowHint {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2) translateX(-2px); }
}

/* ========== STAGE 7 — Finale ========== */
.s7-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 500px;
  z-index: 2;
  position: relative;
}
.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.s7-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 9vw, 44px);
  color: var(--ink);
  text-align: center;
  line-height: 1.1;
  text-wrap: balance;
  margin-bottom: 8px;
}
.s7-title em { color: var(--rose-deep); font-style: normal; }
.s7-body {
  background: var(--milk);
  border-radius: var(--r-soft);
  padding: 22px 22px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,0.6);
  text-align: center;
  width: 100%;
}
.s7-body p {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 12px;
  text-wrap: pretty;
}
.s7-body p:last-child { margin-bottom: 0; }
.s7-magic {
  font-family: var(--font-hand);
  font-size: 26px !important;
  color: var(--rose-deep) !important;
  line-height: 1.3 !important;
  margin-top: 8px;
}
.s7-magic strong {
  background: linear-gradient(180deg, transparent 70%, rgba(242,194,199,0.6) 70%);
  padding: 0 4px;
  font-weight: 700;
}
.fake-notif {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 12px 14px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 10px 30px rgba(74,63,85,0.18);
  border: 1px solid rgba(255,255,255,0.8);
  animation: notifSlide 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 1.5s both;
}
@keyframes notifSlide {
  0%   { transform: translateY(-30px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
.notif-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--mint), var(--mint-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.notif-body { text-align: left; flex: 1; min-width: 0; }
.notif-bank { font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.notif-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.notif-sub { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.s7-sign {
  font-family: var(--font-hand);
  font-size: 24px;
  color: var(--rose-deep);
  margin-top: 8px;
  text-align: center;
}
.s7-replay {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--rose-deep);
  background: white;
  border: 1.5px dashed var(--rose);
  border-radius: var(--r-pill);
  padding: 10px 26px;
  cursor: pointer;
  margin-top: 18px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.s7-replay::before { content: '↺'; font-size: 22px; line-height: 1; }
.s7-replay:hover {
  transform: translateY(-2px);
  background: var(--cream);
  box-shadow: 0 12px 26px rgba(193,162,184,0.28);
}
.s7-replay:active { transform: translateY(0); }
