:root {
  --bg: #0b0d22;
  --bg2: #14102e;
  --card: rgba(255, 255, 255, .08);
  --card-hover: rgba(255, 255, 255, .14);
  --text: #fff5fb;
  --muted: #d1c4e6;
  --pink: #ff4fa3;
  --gold: #ffd166;
  --purple: #9b5cff;
  --cyan: #6ee7ff;
  --green: #50fa7b;
  --danger: #ff6b6b;
  --skin: #f5d6b8;
  --skin-shadow: #e8c4a0;
  --shadow-sm: 0 8px 32px rgba(0, 0, 0, .25);
  --shadow-md: 0 16px 48px rgba(0, 0, 0, .32);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, .38);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  --max: 1120px;
  --transition: .35s cubic-bezier(.22, 1, .36, 1);
  --bounce: .5s cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse at 20% 10%, rgba(255, 79, 163, .32), transparent 40%),
    radial-gradient(ellipse at 80% 5%, rgba(110, 231, 255, .22), transparent 36%),
    radial-gradient(ellipse at 50% 100%, rgba(255, 209, 102, .15), transparent 45%),
    linear-gradient(145deg, var(--bg), var(--bg2) 50%, #2a124c);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .6) 1px, transparent 1.2px),
    radial-gradient(circle, rgba(255, 255, 255, .25) 1px, transparent 1.2px);
  background-size: 50px 50px, 90px 90px;
  opacity: .25;
  animation: starDrift 24s linear infinite;
  z-index: -2;
}
body::after {
  content: '';
  position: fixed; inset: -30%;
  background: conic-gradient(from 180deg, transparent, rgba(255, 255, 255, .08), transparent, rgba(255, 79, 163, .1), transparent);
  filter: blur(60px);
  opacity: .4;
  animation: aurora 20s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: -3;
}
@keyframes starDrift { to { background-position: 50px 50px, 125px 135px; } }
@keyframes aurora {
  0% { transform: rotate(0deg) scale(1); }
  100% { transform: rotate(20deg) scale(1.1); }
}

a { color: inherit; text-decoration: none; }
button, a.button {
  border: 0;
  font: inherit;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
img { max-width: 100%; display: block; }

/* ===== LAYOUT (mobile-first base) ===== */
.page {
  width: min(var(--max), calc(100% - 20px));
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 14px 0 24px;
  display: flex;
  flex-direction: column;
}

/* ===== TOPBAR ===== */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, .07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 14px;
}
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  box-shadow: 0 6px 18px rgba(255, 79, 163, .28);
  font-size: 16px;
  flex-shrink: 0;
}
.brand span:last-child { display: none; }
.progress { display: none; }
.sound-btn {
  color: var(--text);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-full);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.sound-btn:active { background: rgba(255, 255, 255, .18); }

/* ===== PANELS ===== */
.panel {
  border: 1px solid rgba(255, 255, 255, .1);
  background: linear-gradient(180deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .05));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
}
.panel.pad { padding: 20px; }

/* ===== TYPOGRAPHY ===== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius-full);
  color: #fff;
  background: rgba(255, 255, 255, .08);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 8px;
}

h1 {
  font-size: clamp(30px, 14vw, 56px);
  line-height: .92;
  letter-spacing: -2px;
  margin: 10px 0 10px;
  font-weight: 850;
}
h1 .gradient, .gradient {
  background: linear-gradient(135deg, #fff, var(--gold), #ff91c8, var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

h2 {
  font-size: clamp(24px, 8vw, 40px);
  line-height: 1;
  margin: 0 0 10px;
  letter-spacing: -1.5px;
  font-weight: 800;
}
h3 {
  font-size: clamp(18px, 5vw, 24px);
  line-height: 1.15;
  font-weight: 700;
}
p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 14px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  width: 100%;
}
.button.primary {
  color: #1a0922;
  background: linear-gradient(135deg, var(--gold), #ff8bc6);
  box-shadow: 0 10px 32px rgba(255, 209, 102, .22);
}
.button.primary:active {
  transform: scale(.97);
}
.button.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
}
.button.ghost:active { background: rgba(255, 255, 255, .14); }

.button .shine {
  position: absolute;
  top: -50%; left: -60%;
  width: 40%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .18), transparent);
  transform: rotate(25deg);
  animation: shineMove 3s ease-in-out infinite;
}
@keyframes shineMove {
  0% { left: -60%; }
  100% { left: 120%; }
}

/* ===== HERO ===== */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 0 16px;
}
.hero-content { position: relative; z-index: 1; }

.floating-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.floating-elem {
  position: absolute;
  font-size: 22px;
  opacity: .4;
  animation: floatAround 6s ease-in-out infinite;
}
.floating-elem:nth-child(1) { top: 5%; left: 5%; }
.floating-elem:nth-child(2) { top: 10%; right: 8%; animation-delay: 1.2s; font-size: 16px; }
.floating-elem:nth-child(3) { bottom: 25%; left: 3%; animation-delay: 2.4s; font-size: 18px; }
.floating-elem:nth-child(4) { bottom: 8%; right: 5%; animation-delay: .6s; }
.floating-elem:nth-child(5) { top: 45%; left: 0; animation-delay: 1.8s; font-size: 14px; }

@keyframes floatAround {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-12px) rotate(5deg); }
  66% { transform: translateY(6px) rotate(-3deg); }
}

/* Photo Stack */
.birthday-card {
  min-height: 340px;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.photo-stack {
  position: relative;
  width: 90%;
  height: 320px;
  margin: auto;
}
.photo-card {
  position: absolute;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .08);
  box-shadow: var(--shadow-lg);
}
.photo-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.photo-card.main {
  width: 72%;
  height: 60%;
  left: 2%;
  top: 14%;
  transform: rotate(-3deg);
  animation: photoFloat 5s ease-in-out infinite;
  z-index: 2;
}
.photo-card.side {
  width: 56%;
  height: 44%;
  right: 0;
  bottom: 4%;
  transform: rotate(5deg);
  animation: photoFloat 5.5s ease-in-out infinite reverse;
  z-index: 1;
}
.photo-label {
  position: absolute;
  left: 50%;
  bottom: 2%;
  transform: translateX(-50%);
  z-index: 5;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  background: rgba(13, 16, 39, .78);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(12px);
  font-weight: 800;
  font-size: 11px;
  white-space: nowrap;
}
.photo-glow {
  position: absolute;
  inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 209, 102, .28), rgba(255, 79, 163, .12), transparent 65%);
  filter: blur(20px);
  animation: pulseGlow 3.5s ease-in-out infinite;
}
@keyframes photoFloat { 50% { translate: 0 -10px; } }
@keyframes pulseGlow { 50% { transform: scale(1.08); opacity: .65; } }

/* ===== FIND SURPRISE PAGE ===== */
.center-page {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 24px 0;
}
.game-card {
  width: 100%;
  padding: 16px;
}
.game-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.clue {
  color: var(--gold);
  font-weight: 700;
  font-size: 12px;
  background: rgba(255, 209, 102, .1);
  border: 1px solid rgba(255, 209, 102, .18);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  text-align: center;
  animation: cluePulse 2s ease-in-out infinite;
}
@keyframes cluePulse { 50% { box-shadow: 0 0 20px rgba(255, 209, 102, .08); } }

.find-zone {
  position: relative;
  height: 55vh;
  min-height: 400px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, .1);
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 209, 102, .15), transparent 20%),
    radial-gradient(circle at 70% 70%, rgba(110, 231, 255, .12), transparent 24%),
    linear-gradient(145deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
}
.find-zone .hint-text {
  position: absolute;
  left: 14px;
  bottom: 14px;
  color: rgba(255, 255, 255, .55);
  font-weight: 600;
  font-size: 11px;
}

.float-item {
  position: absolute;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 22px;
  user-select: none;
  cursor: pointer;
  transition: var(--transition);
  animation: softBob 4.5s ease-in-out infinite;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.float-item:active { transform: scale(.9); }
.float-item.wrong.pop { animation: wrongPop .35s ease; }

.key-item {
  position: absolute;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(255, 215, 0, .3), rgba(255, 180, 0, .15));
  border: 2px solid rgba(255, 215, 0, .28);
  box-shadow: 0 0 24px rgba(255, 215, 0, .1), inset 0 0 24px rgba(255, 215, 0, .05);
  font-size: 28px;
  cursor: pointer;
  animation: goldenGlow 1.8s ease-in-out infinite, softBob 3.5s ease-in-out infinite;
  will-change: transform;
  transition: var(--transition);
  touch-action: manipulation;
}
.key-item:active { transform: scale(.92); }
.key-item.found {
  animation: keyFound .8s cubic-bezier(.34, 1.56, .64, 1) forwards;
}
@keyframes goldenGlow {
  0%, 100% { box-shadow: 0 0 16px rgba(255, 215, 0, .08); }
  50% { box-shadow: 0 0 40px rgba(255, 215, 0, .2), 0 0 60px rgba(255, 215, 0, .08); }
}
@keyframes keyFound {
  0% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.4) rotate(15deg); }
  100% { transform: scale(0) rotate(30deg); opacity: 0; }
}
@keyframes softBob { 50% { translate: 0 -10px; } }
@keyframes wrongPop { 50% { transform: scale(.78) rotate(-8deg); } }

/* ===== MEMORIES PAGE ===== */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}
.memory-card {
  min-height: 160px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .07);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}
.memory-card:active { background: rgba(255, 255, 255, .11); }
.memory-card::before {
  content: '';
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 100px;
  background: radial-gradient(circle, rgba(255, 209, 102, .18), transparent 60%);
  pointer-events: none;
}
.memory-icon { font-size: 30px; margin-bottom: 2px; }
.memory-card h3 { font-size: 18px; margin: 8px 0 4px; }
.memory-card p { font-size: 13px; margin: 0; }

.letter {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .06));
  border: 1px solid rgba(255, 255, 255, .1);
}
.letter strong { color: var(--gold); }

.photo-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}
.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 260px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .07);
  box-shadow: var(--shadow-sm);
}
.gallery-card img {
  width: 100%; height: 100%;
  min-height: 260px;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}
.gallery-caption {
  position: absolute;
  left: 10px; right: 10px;
  bottom: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(13, 16, 39, .78);
  border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(12px);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

/* ===== SCROLL REVEAL ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left { opacity: 0; transform: translateX(-30px); transition: opacity .6s ease, transform .6s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-right { opacity: 0; transform: translateX(30px); transition: opacity .6s ease, transform .6s ease; }
.reveal-right.visible { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(.9); transition: opacity .6s ease, transform .6s ease; }
.reveal-scale.visible { opacity: 1; transform: scale(1); }

/* ===== CAKE ROOM ===== */
.cake-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 0;
}
.cake-stage {
  min-height: 400px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.lights-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 44%, transparent 0 22%, rgba(0, 0, 0, .02) 32%, rgba(0, 0, 0, .12) 100%);
  opacity: .08;
  pointer-events: none;
  transition: 1s ease;
}
.cake-stage.lights-off .lights-overlay {
  opacity: 1;
  background: radial-gradient(circle at 50% 48%, rgba(255, 214, 122, .28), rgba(0, 0, 0, .12) 25%, rgba(0, 0, 0, .78) 100%);
  animation: lightFlicker .5s steps(3, end) 3;
}
@keyframes lightFlicker {
  0%, 100% { filter: brightness(1); }
  45% { filter: brightness(.5); }
  70% { filter: brightness(1.3); }
}

.cake-wrap {
  position: relative;
  width: 85vw;
  max-width: 340px;
  aspect-ratio: 1/1.05;
  transform: translateY(30px) scale(.78);
  filter: blur(1px) saturate(.7);
  opacity: .5;
  transition: 1s cubic-bezier(.2, 1.4, .24, 1);
}
.cake-stage.revealed .cake-wrap {
  transform: translateY(0) scale(1);
  filter: blur(0) saturate(1.15);
  opacity: 1;
}

.plate {
  position: absolute;
  width: 85%; height: 44px;
  left: 7.5%; bottom: 38px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #ffd6e7);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .2);
}
.cake {
  position: absolute;
  left: 12%; bottom: 58px;
  width: 76%; height: 170px;
}
.layer {
  position: absolute; left: 0; width: 100%;
  border-radius: 22px 22px 14px 14px;
  box-shadow: inset 0 -12px rgba(0, 0, 0, .06);
}
.layer.one { height: 68px; bottom: 0; background: linear-gradient(180deg, #ff8bbd, #ff4fa3); }
.layer.two { height: 68px; bottom: 56px; background: linear-gradient(180deg, #fff1a9, #ffd166); }
.layer.three { height: 62px; bottom: 110px; background: linear-gradient(180deg, #ae7dff, #7b43e8); }
.icing {
  position: absolute; left: 0; top: -1px;
  width: 100%; height: 28px;
  border-radius: 22px 22px 50% 50%;
  background: linear-gradient(180deg, #fff, #ffe8f2);
}
.icing::before {
  content: ''; position: absolute;
  left: 8%; top: 16px;
  width: 18px; height: 34px;
  background: #fff3f7;
  border-radius: 0 0 14px 14px;
  box-shadow: 58px -2px 0 #fff3f7, 126px 6px 0 #fff3f7, 194px 0 0 #fff3f7;
}
.sprinkle {
  position: absolute;
  width: 6px; height: 3px;
  border-radius: var(--radius-full);
  background: #fff;
  transform: rotate(25deg);
  box-shadow: 34px 24px var(--cyan), 68px 10px var(--pink), 112px 28px var(--green), 170px 14px #fff, 208px 34px var(--cyan);
}

.candles {
  position: absolute;
  display: flex;
  gap: 24px;
  left: 50%; top: 10px;
  transform: translateX(-50%);
}
.candle {
  position: relative;
  width: 16px; height: 68px;
  border-radius: 6px 6px 3px 3px;
  background: repeating-linear-gradient(45deg, #fff 0 7px, var(--pink) 7px 14px);
  box-shadow: inset 0 -6px rgba(0, 0, 0, .08);
}
.candle:nth-child(2) { background: repeating-linear-gradient(45deg, #fff 0 7px, var(--cyan) 7px 14px); }
.candle:nth-child(3) { background: repeating-linear-gradient(45deg, #fff 0 7px, var(--gold) 7px 14px); }

.flame {
  position: absolute;
  left: 50%; top: -24px;
  width: 18px; height: 26px;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 72%, #fff 0 18%, var(--gold) 30%, #ff7a00 67%, transparent 70%);
  border-radius: 50% 50% 45% 45%;
  filter: drop-shadow(0 0 10px var(--gold));
  animation: flameAnim .9s ease-in-out infinite alternate;
  transform-origin: bottom center;
  will-change: transform;
}
@keyframes flameAnim {
  from { transform: translateX(-50%) rotate(-3deg) scale(.88); }
  to { transform: translateX(-50%) rotate(4deg) scale(1.08); }
}
.cake-stage.candles-out .flame {
  opacity: 0;
  transform: translateX(-50%) translateY(12px) scale(.08);
  transition: .6s ease;
}

.smoke {
  position: absolute;
  left: 50%; top: -22px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  opacity: 0;
}
.cake-stage.candles-out .smoke {
  animation: smokeRise 1.4s ease-out forwards;
}
@keyframes smokeRise {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.35); }
  20% { opacity: .5; }
  100% { opacity: 0; transform: translate(-50%, -70px) scale(2.8); }
}

.reveal-text {
  position: absolute;
  left: 50%; bottom: 12px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  text-align: center;
  width: 92%;
  transition: .8s ease .4s;
}
.cake-stage.revealed .reveal-text { opacity: 1; transform: translateX(-50%) translateY(0); }

.blow-btn {
  width: 100%;
  margin-top: 14px;
  min-height: 52px;
  font-size: 15px;
}
.meter {
  height: 8px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, .08);
  overflow: hidden;
  margin-top: 14px;
}
.meter span {
  display: block;
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--gold), var(--pink));
  transition: 1s ease;
}
.meter.done span { width: 100%; }

.wild {
  animation: wildShake .6s cubic-bezier(.36, .07, .19, .97) both;
}
@keyframes wildShake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-5px, 0, 0); }
  40%, 60% { transform: translate3d(5px, 0, 0); }
}

/* ===== FINAL WISH PAGE ===== */
.final-card {
  width: 100%;
  text-align: center;
  padding: 28px 18px;
}
.final-title {
  font-size: clamp(34px, 14vw, 60px);
  line-height: .85;
  letter-spacing: -3px;
  margin: 4px 0 14px;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 18px 0;
}
.badge {
  padding: 7px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}
.wish-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.wish {
  border-radius: var(--radius-md);
  padding: 14px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 13px;
}
.wish b { color: var(--gold); }

.final-photo {
  width: 55vw;
  max-width: 200px;
  aspect-ratio: 1;
  margin: 0 auto 14px;
  border-radius: 50%;
  padding: 5px;
  background: linear-gradient(135deg, var(--gold), var(--pink), var(--cyan));
  box-shadow: 0 16px 56px rgba(255, 79, 163, .22);
}
.final-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  border: 3px solid rgba(13, 16, 39, .78);
}

/* ===== BALLOONS ===== */
.balloon {
  position: fixed;
  bottom: -120px;
  width: 40px; height: 54px;
  border-radius: 50% 50% 45% 45%;
  background: linear-gradient(135deg, var(--pink), var(--gold));
  opacity: .6;
  animation: balloonUp 14s linear infinite;
  z-index: -1;
  pointer-events: none;
}
.balloon::after {
  content: '';
  position: absolute;
  left: 50%; top: 52px;
  width: 1px; height: 55px;
  background: rgba(255, 255, 255, .3);
}
@keyframes balloonUp {
  to { transform: translateY(-130vh) translateX(20px) rotate(14deg); }
}

/* ===== CONFETTI ===== */
#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(100px);
  background: rgba(21, 12, 36, .85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .14);
  padding: 12px 18px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
  z-index: 1001;
  font-weight: 700;
  font-size: 13px;
  transition: var(--bounce);
  pointer-events: none;
  width: 88%;
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== FOOTER ===== */
.footer-note {
  text-align: center;
  color: rgba(255, 255, 255, .45);
  font-size: 11px;
  padding: 12px 0 0;
  margin-top: auto;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* ===== TABLET (520px+) ===== */
@media (min-width: 520px) {
  .page { width: min(var(--max), calc(100% - 28px)); padding-top: 18px; }
  .topbar { padding: 10px 16px; }
  .brand { font-size: 15px; }
  .brand span:last-child { display: inline; }
  .progress { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); font-weight: 600; }
  .dot { width: 7px; height: 7px; border-radius: var(--radius-full); background: rgba(255, 255, 255, .16); transition: var(--transition); }
  .dot.active { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
  .panel.pad { padding: 24px; }
  .panel { border-radius: var(--radius-lg); }
  h1 { font-size: clamp(38px, 10vw, 66px); letter-spacing: -2.5px; }
  h2 { font-size: clamp(26px, 6vw, 44px); }
  p { font-size: 15px; }
  .eyebrow { font-size: 11px; padding: 5px 11px; }
  .actions { flex-direction: row; }
  .button { width: auto; min-height: 50px; padding: 0 22px; font-size: 14px; }
  .hero { padding: 30px 0 18px; gap: 20px; }
  .birthday-card { min-height: 380px; }
  .photo-stack { height: 370px; width: 95%; }
  .photo-card.main { width: 74%; height: 64%; }
  .photo-card.side { width: 60%; height: 48%; }
  .find-zone { min-height: 430px; }
  .float-item { width: 54px; height: 54px; font-size: 24px; }
  .key-item { font-size: 32px; }
  .timeline { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .photo-gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .gallery-card, .gallery-card img { min-height: 280px; }
  .cake-layout { gap: 20px; }
  .cake-stage { min-height: 450px; }
  .cake-wrap { max-width: 380px; }
  .final-card { padding: 32px 22px; }
  .final-title { font-size: clamp(40px, 12vw, 70px); }
  .wish-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .badge { font-size: 13px; padding: 8px 13px; }
  .toast { width: auto; font-size: 13px; }
}

/* ===== DESKTOP (880px+) ===== */
@media (min-width: 880px) {
  .page { width: min(var(--max), calc(100% - 32px)); padding: 24px 0 32px; }
  .topbar { padding: 12px 18px; border-radius: var(--radius-full); gap: 12px; }
  .brand { font-size: 15px; }
  .brand-mark { width: 36px; height: 36px; font-size: 18px; }
  .progress { font-size: 12px; gap: 6px; }
  .sound-btn { padding: 8px 14px; font-size: 13px; }
  .sound-btn:hover { background: rgba(255, 255, 255, .16); }
  .panel.pad { padding: 32px; }
  .panel { border-radius: var(--radius-xl); }
  h1 { font-size: clamp(48px, 8vw, 88px); letter-spacing: -3.5px; margin: 14px 0 16px; }
  h2 { font-size: clamp(32px, 5vw, 56px); letter-spacing: -2px; }
  p { font-size: 16px; }
  .eyebrow { font-size: 12px; padding: 6px 12px; margin-bottom: 10px; }
  .actions { gap: 14px; margin-top: 26px; }
  .button { min-height: 54px; padding: 0 26px; font-size: 15px; }
  .button.primary:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 20px 60px rgba(255, 79, 163, .3); }
  .button.ghost:hover { background: rgba(255, 255, 255, .14); transform: translateY(-2px); }

  .hero {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 32px;
    align-items: center;
    padding: 48px 0 24px;
  }
  .birthday-card { min-height: 500px; }
  .photo-stack { height: 460px; width: min(400px, 90%); }
  .photo-card.main { width: 76%; height: 68%; left: 4%; top: 12%; }
  .photo-card.side { width: 62%; height: 52%; }
  .photo-label { font-size: 13px; padding: 10px 16px; }
  .floating-elem { font-size: 28px; }
  .game-head { flex-direction: row; }
  .clue { font-size: 14px; padding: 10px 16px; }
  .find-zone { height: min(62vh, 560px); min-height: 430px; }
  .float-item { width: 62px; height: 62px; font-size: 28px; border-radius: var(--radius-md); }
  .float-item:hover { transform: scale(1.15) rotate(5deg); background: rgba(255, 255, 255, .12); }
  .key-item { font-size: 36px; }
  .timeline { grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 26px 0; }
  .memory-card { min-height: 210px; padding: 22px; }
  .memory-card:hover { transform: translateY(-6px); background: rgba(255, 255, 255, .11); }
  .memory-icon { font-size: 36px; }
  .memory-card h3 { font-size: 20px; margin: 10px 0 6px; }
  .memory-card p { font-size: 14px; }
  .letter { padding: 28px; }
  .photo-gallery { gap: 16px; margin: 26px 0; }
  .gallery-card, .gallery-card img { min-height: 340px; }
  .gallery-card:hover img { transform: scale(1.06); }
  .gallery-caption { font-size: 14px; padding: 12px 16px; left: 14px; right: 14px; bottom: 14px; }

  .cake-layout {
    display: grid;
    grid-template-columns: .9fr 1.1fr;
    gap: 28px;
    align-items: center;
    padding: 40px 0;
  }
  .cake-stage { min-height: 560px; }
  .cake-wrap { width: min(420px, 85vw); }
  .plate { height: 54px; bottom: 48px; }
  .cake { left: 12%; bottom: 72px; width: 76%; height: 200px; }
  .layer.one { height: 80px; }
  .layer.two { height: 80px; bottom: 66px; }
  .layer.three { height: 72px; bottom: 130px; }
  .icing::before {
    width: 22px; height: 40px;
    box-shadow: 70px -3px 0 #fff3f7, 148px 7px 0 #fff3f7, 228px 0 0 #fff3f7;
  }
  .candles { gap: 32px; }
  .candle { width: 20px; height: 82px; }
  .flame { width: 22px; height: 32px; top: -30px; }
  .blow-btn { min-height: 60px; font-size: 16px; }
  .meter { height: 10px; }

  .final-card { width: min(940px, 100%); padding: 40px 26px; }
  .final-title { font-size: clamp(52px, 10vw, 110px); letter-spacing: -5px; margin: 6px 0 18px; }
  .badges { gap: 10px; margin: 22px 0; }
  .badge { font-size: 14px; padding: 10px 14px; }
  .wish-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 26px; }
  .wish { padding: 18px; }
  .final-photo { width: min(260px, 70vw); padding: 6px; }

  .toast { font-size: 14px; padding: 14px 22px; bottom: 24px; }
  .footer-note { font-size: 12px; padding: 14px 0 0; }
}
