:root {
  --warm-white: #f9f5f0;
  --blush: #f8edeb;
  --rose: #e8cfc1;
  --champagne: #d8b4a0;
  --cocoa: #3e3232;
  --serif: "Cormorant Garamond", serif;
  --script: "Dancing Script", cursive;
  --body: "Poppins", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--cocoa);
  font-family: var(--body);
  background: radial-gradient(circle at top left, #fff 0%, var(--warm-white) 35%, var(--blush) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.glass {
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(22px);
  box-shadow: 0 24px 70px rgba(62, 50, 50, 0.12);
}

.navbar {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 50;
  width: min(1120px, 92%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-radius: 999px;
  transform: translateX(-50%);
}

.logo {
  font-family: var(--script);
  font-size: 30px;
  font-weight: 700;
}

.nav-links {
  display: flex;
  gap: 18px;
  font-size: 13px;
  font-weight: 500;
}

.nav-links a {
  opacity: 0.78;
  transition: 0.3s;
}

.nav-links a:hover {
  color: #9f6a59;
  opacity: 1;
}

.cursor-glow {
  position: fixed;
  z-index: 0;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(216, 180, 160, 0.28), transparent 65%);
  transform: translate(-50%, -50%);
}

.floating-bg::before,
.floating-bg::after {
  content: "✦ ♥ ✧";
  position: fixed;
  z-index: 0;
  color: rgba(216, 180, 160, 0.35);
  font-size: 34px;
  animation: float 8s infinite ease-in-out;
}

.floating-bg::before {
  top: 18%;
  left: 7%;
}

.floating-bg::after {
  right: 8%;
  bottom: 18%;
  animation-delay: 2s;
}

.hero,
.page-section {
  min-height: 100vh;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  padding: 120px 9% 70px;
  background: linear-gradient(120deg, rgba(249, 245, 240, 0.78), rgba(248, 237, 235, 0.65)), var(--hero-image) center/cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 40%, rgba(255, 255, 255, 0.55), transparent 35%);
}

.hero-content,
.countdown-card {
  position: relative;
  z-index: 2;
}

.final-page h1 {
  font-size: clamp(42px, 6.2vw, 88px);
  line-height: 0.92;
  letter-spacing: -2px;
  max-width: 1250px;
  margin: 0 auto;
}

.script-text {
  margin-bottom: 8px;
  color: #a36f5c;
  font-family: var(--script);
  font-size: 30px;
}

.hero h1,
.sub-hero h1,
.final-page h1,
.cake-page h1 {
  font-family: var(--serif);
  font-size: clamp(62px, 9vw, 128px);
  font-weight: 600;
  line-height: 0.86;
  letter-spacing: -3px;
}

.hero h1 span {
  color: #8f5f51;
  font-style: italic;
}

.hero-desc {
  max-width: 560px;
  margin: 28px 0;
  font-size: 18px;
  line-height: 1.8;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  transition: 0.3s;
}

.primary {
  color: #fff;
  background: var(--cocoa);
  box-shadow: 0 20px 50px rgba(62, 50, 50, 0.22);
}

.ghost {
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(62, 50, 50, 0.1);
}

.btn:hover,
.cut-cake-btn:hover {
  transform: translateY(-4px);
}

.countdown-card {
  max-width: 420px;
  padding: 28px;
  border-radius: 32px;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.countdown div {
  padding: 18px 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.42);
  border-radius: 22px;
}

.countdown strong {
  font-family: var(--serif);
  font-size: 36px;
}

.countdown span {
  display: block;
  font-size: 12px;
}

.music-btn {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 60;
  width: 56px;
  height: 56px;
  color: #fff;
  font-size: 24px;
  background: var(--cocoa);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 18px 42px rgba(62, 50, 50, 0.25);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
}

.music-btn:hover { transform: translateY(-3px); }

/* Reasons-page music nudge: visible only at the top of the page. */
.music-hint {
  position: fixed;
  right: 94px;
  bottom: 42px;
  z-index: 59;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .28s ease, transform .28s ease;
}

.music-hint-text {
  padding: 10px 15px;
  border: 1px solid rgba(111, 88, 76, .18);
  border-radius: 999px;
  background: rgba(255, 252, 248, .92);
  box-shadow: 0 14px 34px rgba(62, 50, 50, .12);
  color: var(--cocoa);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.music-hint-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--cocoa);
  font-size: 28px;
  line-height: 1;
  animation: musicHintArrow 1.2s ease-in-out infinite;
}

.music-hint.hidden {
  opacity: 0;
  transform: translateY(10px);
}

@keyframes musicHintArrow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(4px, 4px); }
}

.music-btn.playing {
  animation: musicPulse 1.35s ease-in-out infinite;
  box-shadow: 0 0 0 8px rgba(198, 157, 122, 0.10), 0 18px 42px rgba(62, 50, 50, 0.25);
}

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

.sub-hero {
  padding: 150px 8% 55px;
  text-align: center;
}

.sub-hero p {
  max-width: 680px;
  margin: 10px auto 24px;
}

.masonry {
  columns: 3 260px;
  column-gap: 24px;
  padding: 30px 8%;
}

.polaroid {
  break-inside: avoid;
  margin-bottom: 24px;
  padding: 14px 14px 22px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 55px rgba(62, 50, 50, 0.14);
  transform: rotate(-1deg);
  transition: 0.35s;
}

.polaroid:nth-child(even) {
  transform: rotate(1.5deg);
}

.polaroid:hover {
  transform: translateY(-8px) rotate(0);
}

.photo {
  height: 260px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--rose), var(--champagne)) center/cover;
}
.photo video {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
  display: block;
}

.tall .photo {
  height: 390px;
}

.wide .photo {
  height: 230px;
}

.polaroid p {
  margin-top: 12px;
  font-family: var(--script);
  font-size: 25px;
}

.reason-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  padding: 20px 8% 90px;
}

.reason-card {
  height: 190px;
  perspective: 900px;
  cursor: pointer;
}

.reason-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: 0.7s;
  transform-style: preserve-3d;
}

.reason-card:hover .reason-inner,
.reason-card:focus-within .reason-inner {
  transform: rotateY(180deg);
}

.reason-front,
.reason-back {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  border-radius: 28px;
  backface-visibility: hidden;
  border: 1px solid rgba(62, 50, 50, 0.08);
  box-shadow: 0 18px 45px rgba(62, 50, 50, 0.11);
}

.reason-front {
  background: rgba(255, 255, 255, 0.5);
}

.reason-front h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 600;
}

.reason-back {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  transform: rotateY(180deg);
  padding: 24px 20px 22px;
}

.reason-back p {
  width: 100%;
  margin: 0;
  font-family: var(--script);
  font-size: 25px;
  line-height: 1.25;
}

.random-reason {
  max-width: 560px;
  margin: 22px auto 0;
  padding: 20px;
  border-radius: 28px;
}

.letter-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 50px;
  align-items: center;
  padding: 150px 9% 70px;
}

.envelope {
  position: relative;
  height: 260px;
  cursor: pointer;
}

.env-body {
  position: absolute;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 180px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--rose), #fff);
  box-shadow: 0 30px 70px rgba(62, 50, 50, 0.14);
}

.flap {
  position: absolute;
  top: 0;
  left: 8%;
  width: 84%;
  height: 160px;
  background: var(--champagne);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
  transform-origin: top;
  transition: 0.7s;
}

.envelope.open .flap {
  transform: rotateX(180deg);
}

.letter-paper {
  min-height: 500px;
  padding: 46px;
  background: #fffaf5;
  border-radius: 34px;
  box-shadow: 0 30px 80px rgba(62, 50, 50, 0.16);
}

.letter-paper h1 {
  font-family: var(--serif);
  font-size: 58px;
}

.letter-paper p:last-child {
  font-size: 17px;
  line-height: 2;
}

/* Letter voice-note player */
.voice-note {
  margin-top: 34px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  border: 1px solid rgba(159, 106, 89, 0.18);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: 0 18px 45px rgba(62, 50, 50, 0.08);
}

.letter-paper.opened .voice-note {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.voice-play-btn {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(159, 106, 89, 0.35);
  border-radius: 50%;
  background: #3e3232;
  color: #fffaf5;
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.voice-play-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(62, 50, 50, 0.2);
}

.voice-play-btn.playing {
  box-shadow: 0 0 0 6px rgba(159, 106, 89, 0.1);
}

.voice-wave-wrap {
  min-width: 0;
  flex: 1;
}

.voice-wave {
  --voice-progress: 0;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: default;
}

.voice-wave-bar {
  position: relative;
  flex: 1 1 0;
  height: var(--bar-height);
  min-width: 2px;
  border-radius: 999px;
  background: rgba(159, 106, 89, 0.22);
  overflow: hidden;
}

.voice-wave-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  width: calc(var(--voice-progress) * 100%);
  background: #9f6a59;
  border-radius: inherit;
}

.voice-time {
  margin-top: 4px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(62, 50, 50, 0.55);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
  .voice-note {
    gap: 12px;
    padding: 14px;
  }

  .voice-play-btn {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .voice-wave {
    gap: 2px;
  }
}

.night {
  color: #fff;
  background: radial-gradient(circle at top, #453636 0%, #191317 70%);
}

.cake-page,
.final-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 150px 8% 70px;
  text-align: center;
}

.final-page {
  background: linear-gradient(rgba(25, 19, 23, 0.45), rgba(25, 19, 23, 0.86)), var(--final-image) center/cover;
}

.cake-page h1,
.final-page h1 {
  max-width: 900px;
}


.cake-section {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 62vh;
  overflow: visible;
}

.cake-glow {
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 186, 0.34), transparent 68%);
  filter: blur(2px);
}

.cake-stage-text {
  position: relative;
  z-index: 8;
  margin: 18px auto 28px;
  max-width: 620px;
  padding: 14px 22px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  font-size: 14px;
}

.cake {
  position: relative;
  width: 390px;
  height: 330px;
  margin-bottom: 38px;
  overflow: visible;
}

.plate {
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 390px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.34);
  transform: translateX(-50%);
  box-shadow: 0 26px 45px rgba(0, 0, 0, 0.24);
}

.candles {
  position: absolute;
  top: 2px;
  left: 50%;
  z-index: 7;
  display: flex;
  gap: 28px;
  transform: translateX(-50%);
  transition: 0.85s ease;
}

.candle {
  position: relative;
  display: block;
  width: 13px;
  height: 58px;
  margin-top: 24px;
  border-radius: 8px;
  background: repeating-linear-gradient(45deg, #fff 0 7px, #f7a7b5 7px 14px);
  box-shadow: inset 0 -8px 12px rgba(0, 0, 0, 0.08);
}

.flame {
  position: absolute;
  top: -28px;
  left: 50%;
  width: 16px;
  height: 30px;
  border-radius: 50% 50% 45% 45%;
  background: radial-gradient(circle at 50% 65%, #fff7a8 0 24%, #ffd166 25% 56%, #ff7b00 57% 100%);
  transform: translateX(-50%);
  box-shadow: 0 0 18px #ffb347, 0 0 36px rgba(255, 179, 71, 0.72);
  animation: flicker 0.8s infinite alternate;
  transform-origin: bottom center;
  transition: 0.45s ease;
}

.smoke {
  position: absolute;
  top: -30px;
  left: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  opacity: 0;
  filter: blur(3px);
  transform: translateX(-50%) scale(0.3);
}

.cake.blow .flame {
  opacity: 0;
  transform: translateX(-50%) translateY(12px) scale(0.1) rotate(18deg);
  box-shadow: none;
}

.cake.blow .smoke {
  animation: smokeUp 1.45s ease-out forwards;
}

.cake.blow .candle:nth-child(2) .smoke {
  animation-delay: 0.15s;
}

.cake.blow .candle:nth-child(3) .smoke {
  animation-delay: 0.3s;
}

.cake-top,
.cake-middle,
.cake-bottom,
.cake-slice {
  position: absolute;
  left: 50%;
  border-radius: 22px;
  transform: translateX(-50%);
  transition: 0.9s cubic-bezier(0.22, 0.82, 0.22, 1);
}

.cake-top,
.cake-middle,
.cake-bottom {
  z-index: 3;
  box-shadow: 0 24px 42px rgba(0, 0, 0, 0.22);
  overflow: hidden;
}

.cake-top::after,
.cake-middle::after,
.cake-bottom::after {
  content: "";
  position: absolute;
  inset: 11px 18px auto;
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.cake-bottom {
  bottom: 24px;
  width: 330px;
  height: 92px;
  background: linear-gradient(135deg, #e8cfc1, #c8937a);
}

.cake-middle {
  bottom: 104px;
  width: 270px;
  height: 84px;
  background: linear-gradient(135deg, #f8edeb, #e7b7aa);
}

.cake-top {
  bottom: 176px;
  width: 210px;
  height: 74px;
  background: linear-gradient(135deg, #fff5f2, #f1c8bb);
}

.cut-line {
  position: absolute;
  left: 57%;
  bottom: 24px;
  z-index: 6;
  width: 3px;
  height: 228px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  opacity: 0;
  transform: rotate(10deg) scaleY(0);
  transform-origin: top;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.65);
}

.cake.knife-in .cut-line {
  opacity: 1;
  animation: cutTrace 0.75s ease-in-out forwards;
}

.cake-slice {
  z-index: 5;
  right: 20px;
  left: auto;
  bottom: 24px;
  width: 126px;
  height: 225px;
  border-radius: 18px 22px 20px 18px;
  background: linear-gradient(135deg, #fff5f2 0 30%, #f8edeb 30% 63%, #e8cfc1 63% 100%);
  clip-path: polygon(13% 0, 100% 13%, 78% 100%, 0 100%);
  opacity: 0;
  transform: translateX(-12px) rotate(0deg) scale(0.97);
  box-shadow: 0 28px 48px rgba(0, 0, 0, 0.25);
}

.cake-slice::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 62% 38%, rgba(195, 92, 92, 0.65) 0 4px, transparent 5px),
    radial-gradient(circle at 48% 72%, rgba(195, 92, 92, 0.55) 0 4px, transparent 5px);
}

.knife {
  position: absolute;
  top: 0;
  right: -170px;
  z-index: 9;
  width: 218px;
  height: 44px;
  opacity: 0;
  transform: translate(80px, -20px) rotate(-34deg);
  transform-origin: right center;
  transition: 1s cubic-bezier(0.22, 0.82, 0.22, 1);
}

.knife-blade {
  position: absolute;
  left: 0;
  top: 12px;
  width: 158px;
  height: 18px;
  border-radius: 999px 4px 4px 999px;
  background: linear-gradient(90deg, #ffffff, #d7d7d7 55%, #9e9e9e);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25);
}

.knife-blade::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 3px;
  width: 120px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
}

.knife-handle {
  position: absolute;
  right: 0;
  top: 5px;
  width: 68px;
  height: 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, #714948, #3e292d);
  box-shadow: inset 8px 0 10px rgba(255, 255, 255, 0.08), 0 12px 24px rgba(0, 0, 0, 0.28);
}

.cake.knife-in .knife {
  opacity: 1;
  transform: translate(-205px, 128px) rotate(-21deg);
}

.cake.sliced .knife {
  opacity: 0;
  transform: translate(-245px, 170px) rotate(-12deg);
}

.cake.sliced .cake-top,
.cake.sliced .cake-middle,
.cake.sliced .cake-bottom {
  clip-path: polygon(0 0, 62% 0, 52% 100%, 0 100%);
}

.cake.sliced .cake-slice {
  opacity: 1;
  transform: translate(78px, 34px) rotate(12deg) scale(1);
}

.cake.sliced .candles {
  transform: translateX(-83%) translateY(-4px) rotate(-5deg);
}

.cut-cake-btn {
  position: relative;
  z-index: 8;
  padding: 18px 40px;
  color: #3e3232;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.82);
  border: 0;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  transition: 0.4s;
}

.cut-cake-btn:hover {
  transform: translateY(-4px) scale(1.03);
}

.cut-cake-btn:disabled {
  cursor: default;
  opacity: 0.92;
  transform: none;
}

.cake-next-btn {
  position: relative;
  z-index: 8;
  margin-top: 0;
  padding: 18px 40px;
  color: #3e3232;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.82);
  border: 0;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
  transition: 0.4s;
}
.cake-next-btn:hover {
  transform: translateY(-4px) scale(1.03);
}

.cake-next-btn[hidden] {
  display: none;
}

@keyframes smokeUp {
  0% { opacity: 0; transform: translateX(-50%) translateY(0) scale(0.35); }
  20% { opacity: 0.8; }
  100% { opacity: 0; transform: translateX(-50%) translateY(-58px) scale(2.3); }
}

@keyframes cutTrace {
  0% { transform: rotate(10deg) scaleY(0); }
  100% { transform: rotate(10deg) scaleY(1); }
}

#confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.footer {
  padding: 35px;
  color: rgba(62, 50, 50, 0.68);
  text-align: center;
}

.night .footer {
  color: rgba(255, 255, 255, 0.65);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  animation: reveal 0.8s forwards;
}

.delay-1 {
  animation-delay: 0.18s;
}

.delay-2 {
  animation-delay: 0.34s;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes float {
  50% {
    transform: translateY(-26px) rotate(8deg);
  }
}

@keyframes flicker {
  to {
    transform: scale(1.15) translateY(-2px);
    opacity: 0.84;
  }
}

@media (max-width: 900px) {
  .hero,
  .letter-page {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .hero {
    padding-top: 145px;
  }

  .hero h1,
  .sub-hero h1,
  .final-page h1,
  .cake-page h1 {
    font-size: 64px;
  }

  .countdown {
    grid-template-columns: repeat(2, 1fr);
  }

  .cake {
    transform: scale(0.86);
  }
}


/* =========================================================
   RESPONSIVE FIXES
   Added to make the birthday website work nicely on laptops,
   tablets, mobile phones, and very small screens.
   ========================================================= */

html {
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
}

img,
video,
canvas {
  max-width: 100%;
}

main,
header,
section,
footer,
.navbar {
  position: relative;
}

.hero-content,
.countdown-card,
.sub-hero,
.masonry,
.reason-grid,
.letter-page,
.cake-page,
.final-page,
.footer {
  z-index: 1;
}

.navbar {
  gap: 14px;
}

.nav-links {
  min-width: 0;
}

.nav-links a {
  white-space: nowrap;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions .btn,
.final-page .btn,
.sub-hero .btn {
  margin-right: 0;
}

.countdown-card {
  width: 100%;
  justify-self: center;
}

.masonry {
  width: 100%;
}

.photo {
  overflow: hidden;
  background-position: center;
  background-size: cover;
}

.reason-card:focus .reason-inner {
  transform: rotateY(180deg);
}

.letter-paper,
.random-reason,
.countdown-card,
.polaroid,
.reason-front,
.reason-back {
  overflow-wrap: anywhere;
}

/* Laptop / small desktop */
@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr 0.9fr;
    gap: 36px;
    padding-inline: 6%;
  }

  .letter-page {
    gap: 34px;
    padding-inline: 6%;
  }

  .cake-page,
  .final-page {
    padding-inline: 6%;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .navbar {
    top: 14px;
    width: min(720px, 94%);
    align-items: center;
  }

  .nav-links {
    display: flex;
    gap: 12px;
    max-width: 70%;
    overflow-x: auto;
    padding: 6px 2px 7px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
  }

  .hero,
  .letter-page {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 36px;
    min-height: auto;
    padding: 145px 6% 70px;
    background-position: center top;
  }

  .hero h1,
  .sub-hero h1,
  .final-page h1,
  .cake-page h1 {
    font-size: clamp(52px, 12vw, 82px);
    letter-spacing: -2px;
  }

  .countdown {
    grid-template-columns: repeat(4, 1fr);
  }

  .sub-hero {
    padding: 135px 6% 45px;
  }

  .masonry {
    columns: 2 240px;
    padding-inline: 6%;
  }

  .reason-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    padding-inline: 6%;
  }

  .letter-page {
    min-height: auto;
    padding: 135px 6% 60px;
  }

  .envelope {
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
  }

  .letter-paper {
    min-height: 360px;
  }

  .cake-page,
  .final-page {
    min-height: auto;
    padding: 135px 6% 60px;
  }

  .cake-section {
    min-height: 560px;
  }

  .cake {
    transform: scale(0.86);
    transform-origin: center top;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .glass {
    backdrop-filter: blur(16px);
  }

  .navbar {
    top: 10px;
    width: 94%;
    flex-direction: column;
    justify-content: center;
    padding: 12px 14px;
    border-radius: 26px;
  }

  .logo {
    font-size: 28px;
    line-height: 1;
  }

  .nav-links {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
    font-size: 12px;
  }

  .cursor-glow {
    display: none;
  }

  .floating-bg::before,
  .floating-bg::after {
    font-size: 24px;
    opacity: 0.65;
  }

  .hero {
    min-height: 100svh;
    padding: 150px 5% 46px;
    text-align: center;
  }

  .script-text {
    font-size: 25px;
  }

  .hero h1,
  .sub-hero h1,
  .final-page h1,
  .cake-page h1 {
    font-size: clamp(44px, 15vw, 62px);
    line-height: 0.92;
    letter-spacing: -1.4px;
  }

  .hero-desc {
    margin: 22px auto;
    font-size: 15px;
    line-height: 1.75;
  }

  .hero-actions {
    justify-content: center;
  }

  .btn {
    width: min(100%, 280px);
    padding: 13px 20px;
  }

  .countdown-card {
    padding: 20px;
    border-radius: 26px;
  }

  .countdown {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .countdown div {
    padding: 14px 8px;
    border-radius: 18px;
  }

  .countdown strong {
    font-size: 31px;
  }

  .music-hint {
    right: 78px;
    bottom: 34px;
    gap: 4px;
  }

  .music-hint-text {
    padding: 8px 11px;
    font-size: 10px;
  }

  .music-hint-arrow {
    width: 24px;
    height: 24px;
    font-size: 23px;
  }

  .music-btn {
    right: 18px;
    bottom: 18px;
    width: 50px;
    height: 50px;
    font-size: 22px;
  }

  .sub-hero {
    padding: 145px 5% 35px;
  }

  .sub-hero p {
    font-size: 14px;
    line-height: 1.7;
  }

  .masonry {
    columns: 1;
    padding: 20px 5% 60px;
  }

  .polaroid {
    margin-bottom: 18px;
    border-radius: 22px;
    transform: none;
  }

  .polaroid:nth-child(even),
  .polaroid:hover {
    transform: none;
  }

  .photo,
  .wide .photo {
    height: 245px;
  }

  .tall .photo {
    height: 340px;
  }

  .reason-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px 5% 65px;
  }

  .reason-card {
    height: 172px;
  }

  .reason-front,
  .reason-back {
    border-radius: 24px;
  }

  .reason-back p,
  .polaroid p {
    font-size: 23px;
  }

  .random-reason {
    margin-top: 16px;
    padding: 16px;
    font-size: 14px;
  }

  .letter-page {
    padding: 145px 5% 45px;
    gap: 26px;
  }

  .envelope {
    height: 220px;
  }

  .env-body {
    height: 150px;
  }

  .flap {
    height: 135px;
  }

  .letter-paper {
    min-height: 330px;
    padding: 28px 22px;
    border-radius: 28px;
  }

  .letter-paper p:last-child {
    font-size: 15px;
    line-height: 1.9;
  }

  .cake-page,
  .final-page {
    padding: 145px 5% 48px;
  }

  .final-page p,
  .cake-page p {
    font-size: 14px;
    line-height: 1.7;
  }

  .cake-section {
    min-height: 500px;
    width: 100%;
  }

  .cake-glow {
    width: 320px;
    height: 320px;
  }

  .cake-stage-text {
    width: min(100%, 330px);
    margin-bottom: 12px;
    padding: 12px 16px;
    white-space: normal;
  }

  .cake {
    margin-bottom: -10px;
    transform: scale(0.72);
    transform-origin: center top;
  }

  .cut-cake-btn {
    width: min(100%, 310px);
    padding: 15px 22px;
    font-size: 16px;
  }

  .footer {
    padding: 25px 18px;
    font-size: 13px;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .navbar {
    width: 96%;
    padding-inline: 10px;
  }

  .nav-links a {
    padding: 7px 10px;
  }

  .hero,
  .sub-hero,
  .letter-page,
  .cake-page,
  .final-page {
    padding-inline: 4%;
  }

  .hero h1,
  .sub-hero h1,
  .final-page h1,
  .cake-page h1 {
    font-size: clamp(39px, 14vw, 50px);
  }

  .script-text {
    font-size: 23px;
  }

  .photo,
  .wide .photo {
    height: 220px;
  }

  .tall .photo {
    height: 300px;
  }

  .countdown strong {
    font-size: 28px;
  }

  .cake-section {
    min-height: 470px;
  }

  .cake {
    transform: scale(0.64);
    margin-bottom: -48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}


/* ===== Birthday entry experience ===== */
.birthday-entry { background: radial-gradient(circle at 50% 0%, #2a2927 0%, #171717 58%, #101010 100%); color: #f7f1e8; }
.birthday-entry .locked-nav { opacity: .78; }
.birthday-entry .locked-nav .nav-links { pointer-events: none; opacity: .22; }
.birthday-entry .music-btn { background: #f1e8db; color: #211f1c; }
.entry-main { position: relative; min-height: 100vh; overflow: hidden; }
.lock-screen { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; gap: 6vw; align-items: center; padding: 130px 9% 70px; position: relative; }
.lock-screen::before { content:""; position:absolute; inset:0; background: radial-gradient(circle at 50% 45%, rgba(222,191,157,.10), transparent 42%); pointer-events:none; }
.lock-copy, .countdown-card { position:relative; z-index:2; }
.birthday-entry .script-text { color:#cda883; }
.lock-copy h1 { font-family:var(--serif); font-size:clamp(68px,9vw,132px); line-height:.82; letter-spacing:-4px; font-weight:600; }
.lock-copy h1 span { color:#cda883; font-style:italic; }
.birthday-entry .hero-desc { color:#d7d0c8; max-width:590px; }
.birthday-entry .countdown-card { max-width:480px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); box-shadow:0 30px 100px rgba(0,0,0,.35); }
.birthday-entry .countdown div { background:rgba(255,255,255,.07); }
.birthday-entry .countdown strong { color:#f5eee4; }
.birthday-entry .countdown span { color:#bfb7ad; }
.unlock-note { margin-top:18px; text-align:center; color:#c6bdb3; font-family:var(--script); font-size:23px; }
.birthday-reveal { display:none; min-height:100vh; padding:145px 8% 80px; grid-template-columns:1fr 1fr; align-items:center; gap:4vw; position:relative; }
.birthday-reveal.visible { display:grid; animation:entryFade .9s ease both; }
.reveal-copy h2 { font-family:var(--serif); font-size:clamp(64px,8vw,116px); line-height:.84; letter-spacing:-3px; }
.reveal-copy h2 span { color:#cda883; font-style:italic; }
.reveal-copy p:last-child { max-width:510px; margin-top:28px; color:#d4ccc2; line-height:1.8; font-size:17px; }
.biryani-cake-wrap { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:520px; }
.cake-image-stage { position:relative; width:min(700px, 100%); aspect-ratio:660 / 385; display:flex; align-items:center; justify-content:center; filter:drop-shadow(0 30px 50px rgba(0,0,0,.45)); animation:cakeFloat 4s ease-in-out infinite; }
.approved-biryani-image { width:100%; height:100%; object-fit:contain; display:block; user-select:none; -webkit-user-drag:none; }
.candle-hotspot { position:absolute; left:50%; top:21%; width:58px; height:142px; transform:translate(-50%,-50%); background:transparent; border:0; border-radius:18px; cursor:pointer; outline:none; z-index:5; }
.candle-hotspot:focus-visible { box-shadow:0 0 0 3px rgba(238,195,139,.9); }
.candle-stick { position:absolute; left:50%; top:24px; width:15px; height:76px; transform:translateX(-50%); border-radius:7px 7px 5px 5px; background:repeating-linear-gradient(135deg, #fffaf0 0 9px, #eadbc6 9px 15px); box-shadow:inset -3px 0 5px rgba(82,55,38,.12), 0 5px 14px rgba(0,0,0,.18); }
.hotspot-flame { position:absolute; left:50%; top:-2px; width:18px; height:31px; transform:translateX(-50%); border-radius:55% 45% 60% 40%; background:radial-gradient(circle at 50% 70%,#fff2a4 0 25%,#f4a33a 48%,#d86627 70%,transparent 71%); animation:flameFlicker .55s ease-in-out infinite alternate; filter:drop-shadow(0 0 12px rgba(244,163,58,.7)); pointer-events:none; }
.candle-hotspot.extinguished .hotspot-flame { opacity:0; transform:translate(-50%,10px) scale(.5); animation:none; }
.smoke-overlay { position:absolute; left:50%; top:5%; width:34px; height:80px; transform:translateX(-50%); opacity:0; pointer-events:none; border-radius:50%; background:radial-gradient(ellipse at center, rgba(225,225,225,.35), transparent 65%); filter:blur(5px); }
.candle-hotspot.extinguished ~ .smoke-overlay { opacity:.55; animation:smokeRise 1.5s ease-out forwards; }
.candle-prompt { margin:16px 0 18px; color:#d1c5b7; font-family:var(--script); font-size:24px; text-align:center; }
.biryani-exclusive-note {
  position:absolute;
  right:-24px;
  bottom:7%;
  margin:0;
  color:#cda883;
  font-family:var(--script);
  font-size:20px;
  line-height:1.1;
  white-space:nowrap;
  transform:rotate(-4deg);
  text-shadow:0 8px 24px rgba(0,0,0,.3);
  pointer-events:none;
}

.reveal-button { opacity:.45; pointer-events:none; transition:.35s; }
.reveal-button.ready { opacity:1; pointer-events:auto; }
@keyframes flameFlicker{from{transform:translateX(-50%) rotate(-3deg) scale(.96)}to{transform:translateX(-50%) rotate(3deg) scale(1.04)}}
@keyframes smokeRise{from{opacity:.5;transform:translate(-50%,0) scale(.8)}to{opacity:0;transform:translate(-50%,-65px) scale(1.5)}}
@keyframes cakeFloat{0%,100%{transform:translateY(0) rotate(-.5deg)}50%{transform:translateY(-10px) rotate(.5deg)}}
@keyframes entryFade{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}
@media (max-width: 850px){
  .lock-screen,.birthday-reveal{grid-template-columns:1fr; padding:120px 7% 60px; text-align:center;}
  .lock-copy h1,.reveal-copy h2{font-size:clamp(58px,16vw,88px)}
  .lock-copy .hero-desc,.reveal-copy p:last-child{margin-left:auto;margin-right:auto}
  .countdown-card{margin:0 auto}
  .cake-image-stage{width:100%; margin:-20px 0;}
}

/* ===== Sketch reveal ===== */
.sketch-page {
  background: radial-gradient(circle at 50% 12%, #3b302f 0%, #211b1c 52%, #121112 100%);
  color: #f7f1e8;
}
.sketch-shell {
  width: min(980px, 90%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 150px 0 80px;
  text-align: center;
}
.sketch-intro {
  max-width: 820px;
  margin: 0 auto 42px;
}
.sketch-intro .script-text { color: #cda883; }
.sketch-intro h1 {
  font-family: var(--serif);
  font-size: clamp(58px, 8vw, 104px);
  line-height: .86;
  letter-spacing: -3px;
}
.sketch-intro h1 span { color:#cda883; font-style:italic; }
.sketch-note {
  max-width: 720px;
  margin: 28px auto 0;
  color: #d4ccc2;
  line-height: 1.75;
  font-size: 16px;
}
.sketch-card {
  width: min(760px, 100%);
  min-height: 560px;
  margin: 0 auto;
  padding: 28px;
  border-radius: 34px;
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.13);
  box-shadow: 0 35px 110px rgba(0,0,0,.38);
}
.sketch-placeholder {
  min-height: 500px;
  border: 1.5px dashed rgba(205,168,131,.42);
  border-radius: 24px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 8px;
  color:#d4ccc2;
  background:rgba(0,0,0,.12);
}
.sketch-placeholder-mark {
  font-size: 46px;
  color:#cda883;
  margin-bottom: 8px;
}
.sketch-placeholder p {
  margin:0;
  font-family:var(--serif);
  font-size:32px;
  color:#f7f1e8;
}
.sketch-placeholder span:last-child {
  color:#9f9186;
  font-size:13px;
}
.sketch-back { margin-top: 24px; color:#f7f1e8; background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.18); }

@media (max-width: 850px) {
  .biryani-exclusive-note {
    position:static;
    margin-top: -2px;
    font-size:18px;
    transform:rotate(-3deg);
  }
  .sketch-shell { padding-top: 125px; }
  .sketch-card { min-height: 440px; padding: 18px; }
  .sketch-placeholder { min-height: 400px; }
  .sketch-intro h1 { letter-spacing:-2px; }
  .cake-next-btn { width:min(100%,310px); padding:15px 22px; font-size:16px; }
}

/* ===== Quiz experience ===== */
.quiz-page {
  background: radial-gradient(circle at 50% 0%, #f7eee8 0%, #f4e9e4 42%, #eee0d9 100%);
}
.quiz-shell {
  width: min(1180px, 92%);
  margin: 0 auto;
  padding: 145px 0 90px;
}
.quiz-intro {
  max-width: 850px;
  margin: 0 auto 55px;
  text-align: center;
}
.quiz-intro h1 {
  font-family: var(--serif);
  font-size: clamp(58px, 8vw, 108px);
  line-height: .86;
  letter-spacing: -3px;
  font-weight: 600;
}
.quiz-intro h1 span { color: #9f6a59; font-style: italic; }
.quiz-intro > p:last-child { max-width: 650px; margin: 24px auto 0; line-height: 1.7; }
.quiz-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 36px;
  align-items: start;
}
.quiz-progress {
  position: sticky;
  top: 120px;
  padding: 24px 20px;
  border-radius: 28px;
}
.quiz-progress > .script-text { margin-bottom: 18px; text-align: center; }
.quiz-progress ol {
  position: relative;
  list-style: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  z-index: 1;
}
.quiz-progress .progress-line {
  position: absolute;
  left: 50%;
  top: 79px;
  bottom: 25px;
  width: 1px;
  background: rgba(62, 50, 50, .18);
  transform: translateX(-50%);
}
.quiz-progress li { position: relative; z-index: 2; }
.quiz-progress li a {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(62,50,50,.12);
  font-size: 11px;
  transition: .25s;
}
.quiz-progress li a:hover { transform: scale(1.1); }
.quiz-progress li.answered a { background: #3e3232; color: #fff; }
.quiz-form { display: grid; gap: 18px; }
.quiz-question {
  min-width: 0;
  padding: 25px;
  border: 1px solid rgba(62,50,50,.10);
  border-radius: 28px;
  background: rgba(255,255,255,.42);
  box-shadow: 0 18px 55px rgba(62,50,50,.07);
  transition: .3s;
}
.quiz-question.needs-answer { box-shadow: 0 0 0 3px rgba(159,106,89,.32), 0 18px 55px rgba(62,50,50,.07); }
.quiz-question legend {
  width: 100%;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.05;
}
.question-number { color: #9f6a59; font-family: var(--body); font-size: 12px; font-weight: 600; letter-spacing: 1px; padding-top: 6px; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid rgba(62,50,50,.12);
  border-radius: 17px;
  background: rgba(255,255,255,.48);
  cursor: pointer;
  transition: .25s;
  line-height: 1.45;
}
.quiz-option:hover { transform: translateY(-2px); border-color: rgba(159,106,89,.35); }
.quiz-option.selected { border-color: #9f6a59; background: rgba(159,106,89,.10); }
.quiz-option input { position: absolute; opacity: 0; pointer-events: none; }
.option-letter { flex: 0 0 30px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: rgba(62,50,50,.08); font-size: 12px; font-weight: 600; }
.quiz-submit { display: block; margin: 28px auto 0; }
.quiz-result { margin-top: 28px; padding: 45px 35px; border-radius: 32px; text-align: center; }
.quiz-score { margin: 8px 0 10px; font-family: var(--serif); font-size: clamp(70px, 10vw, 120px); line-height: .9; }
.quiz-result h2 { font-family: var(--serif); font-size: clamp(30px, 4vw, 48px); line-height: 1; }
.quiz-result > p:not(.script-text) { max-width: 620px; margin: 18px auto 0; line-height: 1.7; }
.quiz-result-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn.secondary { background: rgba(255,255,255,.42); border: 1px solid rgba(62,50,50,.16); color: var(--cocoa); }

/* ===== Secret realm ===== */
.secret-page {
  background: radial-gradient(circle at 50% 20%, #3b302f 0%, #211b1c 52%, #121112 100%);
  color: #f7f1e8;
}
.secret-shell { min-height: 100vh; display: grid; place-items: center; padding: 90px 7%; }
.secret-letter { width: min(760px, 100%); padding: clamp(40px, 7vw, 80px); border-radius: 36px; text-align: center; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); box-shadow: 0 35px 110px rgba(0,0,0,.38); }
.secret-letter .script-text { color: #cda883; }
.secret-letter h1 { font-family: var(--serif); font-size: clamp(64px, 9vw, 110px); line-height: .84; letter-spacing: -3px; }
.secret-letter h1 span { color: #cda883; font-style: italic; }
.secret-divider { margin: 30px 0; color: #cda883; font-size: 22px; }
.secret-copy { max-width: 560px; margin: 0 auto 30px; color: #d4ccc2; line-height: 1.8; }
.secret-copy p + p { margin-top: 12px; }
.secret-page .btn.secondary { color: #f7f1e8; background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); }

@media (max-width: 850px) {
  .quiz-layout { grid-template-columns: 1fr; }
  .quiz-progress { position: relative; top: auto; padding: 18px 20px; }
  .quiz-progress > .script-text { margin-bottom: 10px; }
  .quiz-progress .progress-line { left: 28px; right: 28px; top: 50%; bottom: auto; width: auto; height: 1px; transform: translateY(-50%); }
  .quiz-progress ol { flex-direction: row; justify-content: space-between; gap: 4px; }
  .quiz-progress li a { width: 26px; height: 26px; font-size: 10px; }
  .quiz-options { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .quiz-shell { width: 94%; padding-top: 125px; }
  .quiz-intro h1 { letter-spacing: -2px; }
  .quiz-question { padding: 20px; border-radius: 22px; }
  .quiz-question legend { gap: 10px; font-size: 26px; }
  .quiz-progress ol { overflow-x: auto; padding: 2px 0; }
  .quiz-progress li { flex: 0 0 auto; }
}

/* ===== Hafsa avatar celebration ===== */
.avatar-celebration {
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 4;
  width: 710px;
  pointer-events: none;
  transform: translate(-50%, calc(-50% - 56px));
  animation: avatarYay 2.2s ease-in-out infinite;
  filter: drop-shadow(0 18px 24px rgba(0,0,0,.30));
}

.avatar-celebration img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.avatar-sparkle {
  position: absolute;
  color: #e9c895;
  font-size: 18px;
  text-shadow: 0 0 14px rgba(233,200,149,.55);
  animation: avatarSparkle 1.7s ease-in-out infinite;
}

.sparkle-one { left: -18px; top: 28%; }
.sparkle-two { right: -18px; top: 42%; animation-delay: .45s; }
.sparkle-three { left: 50%; top: -16px; animation-delay: .85s; }

@keyframes avatarYay {
  0%, 100% { transform: translate(-50%, -50%) rotate(-1.5deg) translateY(0); }
  25% { transform: translate(-50%, -50%) rotate(1deg) translateY(-7px); }
  50% { transform: translate(-50%, -50%) rotate(-1deg) translateY(-16px); }
  75% { transform: translate(-50%, -50%) rotate(1.5deg) translateY(-7px); }
}

@keyframes avatarSparkle {
  0%, 100% { opacity: .2; transform: scale(.75) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(18deg); }
}

@media (max-width: 850px) {
  .avatar-celebration {
    width: 540px;
    top: 51%;
    transform: translate(-50%, calc(-50% - 43px));
  }
}

@media (max-width: 900px) {
  .letter-paper #typedLetter {
    font-size: 15px;
    line-height: 1.9;
  }
}


/* ===== V26 sketch gallery + final message sizing ===== */
.sketch-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
}

.sketch-frame {
  margin: 0;
  padding: 12px;
  border: 1.5px dashed rgba(205,168,131,.42);
  border-radius: 24px;
  background: rgba(0,0,0,.12);
  overflow: hidden;
}

.sketch-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

.final-page h1 {
  font-size: clamp(34px, 4vw, 58px) !important;
  line-height: 0.98;
  letter-spacing: -1.5px;
  max-width: 1200px;
}

@media (max-width: 850px) {
  .sketch-gallery {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .final-page h1 {
    font-size: clamp(30px, 8vw, 48px) !important;
    line-height: 0.98;
  }
}
