:root {
  --ink: #2a1730;
  --paper: #fffaf7;
  --pink: #ff70ae;
  --hot-pink: #f52d89;
  --lavender: #b99cff;
  --purple: #7a55e7;
  --peach: #ffae89;
  --yellow: #ffd760;
  --mint: #72dfc4;
  --outline: 2px solid var(--ink);
  --shadow: 6px 7px 0 rgba(42, 23, 48, 0.88);
  --soft-shadow: 0 22px 60px rgba(72, 31, 74, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(255, 255, 255, 0.8), transparent 28rem),
    linear-gradient(145deg, #fff1e8, #ffe8f2 38%, #eee8ff 70%, #fff4cb);
  font-family: "Nunito", "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

img {
  max-width: 100%;
}

.shell {
  width: min(1120px, calc(100% - 34px));
  margin-inline: auto;
}

.section {
  position: relative;
  padding: 92px 0;
}

.centered {
  text-align: center;
}

.eyebrow,
.breaking {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 8px 13px;
  color: var(--ink);
  background: var(--yellow);
  border: var(--outline);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

h1,
h2,
h3 {
  font-family: "Fredoka", "Trebuchet MS", sans-serif;
  line-height: 0.98;
}

h2 {
  max-width: 780px;
  margin: 0 auto 18px;
  font-size: clamp(2.15rem, 6vw, 4.5rem);
  letter-spacing: -0.045em;
}

p {
  line-height: 1.7;
}

.lead {
  max-width: 660px;
  margin: 0 auto;
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
}

.section-heading {
  margin-bottom: 44px;
}

.section-heading p {
  max-width: 620px;
  margin: 0;
  font-size: 1.08rem;
}

.section-heading.centered p {
  margin-inline: auto;
}

.button {
  min-height: 52px;
  padding: 14px 22px;
  border: var(--outline);
  border-radius: 16px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.035em;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.button:hover {
  transform: translate(-2px, -2px);
  filter: brightness(1.03);
}

.button:active {
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

.button-primary {
  background: var(--pink);
  box-shadow: var(--shadow);
}

.button-dark {
  color: #fff;
  background: var(--ink);
  box-shadow: 5px 6px 0 var(--pink);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 4px 5px 0 var(--ink);
}

#confettiCanvas {
  position: fixed;
  inset: 0;
  z-index: 50;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#sparkleLayer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.tap-sparkle {
  position: absolute;
  animation: tapSparkle 700ms ease-out forwards;
  color: var(--hot-pink);
  font-size: 20px;
}

.music-toggle {
  position: fixed;
  z-index: 60;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 13px;
  border: var(--outline);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 900;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.music-toggle[hidden] {
  display: none;
}

.music-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--hot-pink);
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding: 72px 0 76px;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.85), transparent 24%),
    radial-gradient(circle at 88% 18%, rgba(255, 214, 96, 0.68), transparent 27%),
    radial-gradient(circle at 86% 88%, rgba(185, 156, 255, 0.68), transparent 28%),
    linear-gradient(135deg, #ffb7cf, #ffcfac 45%, #e2d5ff);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: -1;
  height: 80px;
  background: var(--paper);
  clip-path: polygon(0 62%, 8% 45%, 20% 68%, 31% 38%, 42% 64%, 55% 32%, 66% 65%, 80% 40%, 91% 67%, 100% 42%, 100% 100%, 0 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  grid-template-areas:
    "heading photo"
    "details photo";
  column-gap: clamp(36px, 7vw, 90px);
  row-gap: 14px;
  align-items: center;
}

.hero-copy {
  display: contents;
}

.hero-heading {
  grid-area: heading;
  position: relative;
  z-index: 2;
  align-self: end;
}

.hero-details {
  grid-area: details;
  position: relative;
  z-index: 2;
  align-self: start;
}

.hero h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(4rem, 9vw, 8rem);
  letter-spacing: -0.065em;
  text-transform: uppercase;
  text-shadow: 4px 5px 0 rgba(255, 255, 255, 0.8);
}

.hero h1 span {
  display: block;
}

.hero h1 strong {
  display: block;
  color: #fff;
  -webkit-text-stroke: 2px var(--ink);
  text-shadow: 5px 6px 0 var(--ink);
}

.hero-age {
  margin: 24px 0 4px;
  font-family: "Fredoka", sans-serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 700;
}

.hero-note {
  max-width: 500px;
  margin: 6px 0 25px;
  font-size: 1.05rem;
}

.hero-copy small {
  display: block;
  margin-top: 17px;
  font-weight: 700;
}

.hero-photo-wrap {
  grid-area: photo;
  position: relative;
  width: min(100%, 430px);
  justify-self: center;
  transform: rotate(2.5deg);
}

.hero-photo {
  position: relative;
  margin: 0;
  padding: 12px 12px 50px;
  background: #fff;
  border: var(--outline);
  border-radius: 8px;
  box-shadow: 15px 17px 0 rgba(42, 23, 48, 0.9);
}

.hero-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border: 2px solid var(--ink);
  border-radius: 3px;
}

.hero-photo figcaption {
  position: absolute;
  right: 24px;
  bottom: 12px;
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  transform: rotate(-2deg);
}

.photo-badge {
  position: absolute;
  z-index: 2;
  top: -26px;
  right: -24px;
  display: grid;
  width: 90px;
  height: 90px;
  place-items: center;
  padding: 16px;
  border: var(--outline);
  border-radius: 50%;
  color: #fff;
  background: var(--hot-pink);
  box-shadow: 5px 6px 0 var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  transform: rotate(10deg);
}

.photo-doodle {
  position: absolute;
  z-index: 3;
  font-size: 3rem;
  font-weight: 900;
  animation: float 3.5s ease-in-out infinite;
}

.doodle-one {
  top: 20%;
  left: -36px;
  color: var(--yellow);
  -webkit-text-stroke: 2px var(--ink);
}

.doodle-two {
  right: -36px;
  bottom: 18%;
  color: var(--pink);
  -webkit-text-stroke: 2px var(--ink);
  animation-delay: -1.5s;
}

.blob {
  position: absolute;
  z-index: -1;
  width: 300px;
  aspect-ratio: 1;
  border: var(--outline);
  border-radius: 43% 57% 68% 32% / 44% 40% 60% 56%;
  opacity: 0.65;
  filter: blur(1px);
}

.blob-one {
  top: -110px;
  left: 33%;
  background: var(--mint);
  transform: rotate(20deg);
}

.blob-two {
  right: -160px;
  bottom: 8%;
  background: var(--pink);
}

.sticker {
  position: absolute;
  z-index: 1;
  font-size: 3rem;
  filter: drop-shadow(3px 4px 0 var(--ink));
}

.star-one {
  top: 17%;
  left: 3%;
  color: var(--yellow);
}

.ribbon {
  top: 12%;
  right: 44%;
}

.party-hat {
  left: 4%;
  bottom: 14%;
}

.floating {
  animation: float 4s ease-in-out infinite;
}

.balloon {
  position: absolute;
  display: grid;
  width: 74px;
  height: 88px;
  place-items: center;
  border: var(--outline);
  border-radius: 50% 50% 47% 47%;
  box-shadow: 4px 5px 0 var(--ink);
  font-family: "Fredoka", sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  animation: balloon 4.4s ease-in-out infinite;
}

.balloon::after {
  content: "";
  position: absolute;
  top: 88px;
  width: 1px;
  height: 110px;
  background: var(--ink);
}

.balloon-one {
  top: 14%;
  right: 2%;
  background: var(--yellow);
}

.balloon-two {
  left: 44%;
  bottom: 16%;
  width: 58px;
  height: 70px;
  background: var(--lavender);
  animation-delay: -1.7s;
}

.balloon-two::after {
  top: 70px;
}

.scroll-cue {
  position: absolute;
  bottom: 20px;
  left: 50%;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.scroll-cue i {
  position: relative;
  width: 22px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 20px;
}

.scroll-cue i::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 8px;
  width: 3px;
  height: 7px;
  border-radius: 5px;
  background: var(--ink);
  animation: scrollDot 1.5s infinite;
}

.party-section {
  background: var(--paper);
}

.party-section h2 {
  margin-top: 22px;
}

.party-wish {
  max-width: 720px;
  margin: 24px auto 0;
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  font-weight: 600;
  line-height: 1.65;
}

.cake-mini {
  position: relative;
  width: 150px;
  height: 142px;
  margin: 0 auto 18px;
  animation: cakeBounce 2.2s ease-in-out infinite;
}

.cake-mini > span {
  position: absolute;
  z-index: 2;
  top: -2px;
  left: 65px;
  font-size: 1.4rem;
}

.mini-candle {
  position: absolute;
  z-index: 1;
  top: 22px;
  left: 70px;
  width: 11px;
  height: 32px;
  border: 2px solid var(--ink);
  background: var(--pink);
}

.mini-cake {
  position: absolute;
  bottom: 0;
  width: 100%;
  font-size: 7rem;
  line-height: 1;
}

.status-pill {
  display: inline-block;
  margin: 0;
  padding: 9px 14px;
  border: var(--outline);
  border-radius: 999px;
  background: #d9fff5;
  box-shadow: 3px 3px 0 var(--ink);
  font-weight: 800;
}

#stats {
  background: linear-gradient(180deg, var(--paper), #f3ecff);
}

.stats-card {
  position: relative;
  padding: clamp(22px, 5vw, 48px);
  border: var(--outline);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--soft-shadow), var(--shadow);
  backdrop-filter: blur(16px);
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
  padding: 9px 17px 9px 9px;
  border: var(--outline);
  border-radius: 999px;
  background: #fff;
}

.profile-chip img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 50%;
}

.profile-chip b,
.profile-chip span {
  display: block;
}

.profile-chip span {
  margin-top: 2px;
  font-size: 0.8rem;
}

.stamp {
  position: absolute;
  top: 36px;
  right: 46px;
  padding: 10px;
  border: 4px double var(--hot-pink);
  border-radius: 8px;
  color: var(--hot-pink);
  font-family: "Fredoka", sans-serif;
  font-weight: 700;
  line-height: 0.95;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(8deg);
}

.stat-list {
  display: grid;
  gap: 22px;
}

.stat-row > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 8px;
}

.stat-row b {
  text-align: right;
}

.bar {
  height: 16px;
  padding: 2px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--pink), var(--purple), var(--mint));
  transition: width 1.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 35px;
}

.quick-facts p {
  margin: 0;
  padding: 17px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: #fff9dd;
  box-shadow: 3px 4px 0 var(--ink);
}

.quick-facts span,
.quick-facts b {
  display: block;
}

.quick-facts span {
  margin-bottom: 6px;
  font-size: 1.6rem;
}

.quick-facts b {
  margin-bottom: 3px;
}

.meter-section {
  background:
    linear-gradient(rgba(42, 23, 48, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 23, 48, 0.08) 1px, transparent 1px),
    var(--yellow);
  background-size: 24px 24px;
}

.meter-card {
  position: relative;
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(30px, 6vw, 62px);
  overflow: hidden;
  border: var(--outline);
  border-radius: 32px;
  background: #fff;
  box-shadow: 12px 14px 0 var(--ink);
  text-align: center;
}

.meter-card.error {
  animation: errorShake 380ms ease;
}

.meter-emoji {
  position: absolute;
  top: 14px;
  right: 20px;
  font-size: 3rem;
  transform: rotate(12deg);
}

.meter-track {
  height: 28px;
  margin: 32px 0 15px;
  padding: 3px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #fff1f7;
  overflow: hidden;
}

.meter-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: repeating-linear-gradient(45deg, var(--pink) 0 12px, var(--purple) 12px 24px);
  transition: width 180ms linear;
}

#meterNumber {
  display: block;
  margin-bottom: 24px;
  font-family: "Fredoka", sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

.meter-result {
  min-height: 28px;
  margin: 22px 0 0;
  font-weight: 800;
}

.error-experience {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  visibility: hidden;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 48, 96, 0.22), transparent 55%),
    rgba(15, 7, 19, 0.94);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.error-experience.show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.error-experience.glitching {
  animation: errorScreenShake 120ms linear 8;
}

.error-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background: repeating-linear-gradient(
    0deg,
    transparent 0 3px,
    rgba(255, 255, 255, 0.18) 3px 4px
  );
  animation: scanMove 5s linear infinite;
}

.error-terminal {
  position: relative;
  z-index: 3;
  width: min(620px, 100%);
  border: 3px solid #fff;
  border-radius: 12px;
  color: #fff;
  background: #201526;
  box-shadow:
    0 0 0 5px #f52d5e,
    14px 16px 0 rgba(0, 0, 0, 0.72),
    0 0 70px rgba(245, 45, 94, 0.5);
  transform: scale(0.82);
  transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.error-experience.show .error-terminal {
  transform: scale(1);
}

.error-window-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 10px 13px;
  border-bottom: 3px solid #fff;
  background: #f52d5e;
  font-family: "Fredoka", sans-serif;
  font-style: normal;
}

.error-window-bar > span {
  display: flex;
  gap: 5px;
}

.error-window-bar i {
  width: 10px;
  height: 10px;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #201526;
}

.error-window-bar b {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.error-window-bar em {
  justify-self: end;
  font-size: 1.2rem;
  font-style: normal;
  font-weight: 900;
}

.error-window-body {
  padding: clamp(24px, 6vw, 45px);
  text-align: center;
}

.warning-symbol {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  place-items: center;
  border: 4px solid #201526;
  border-radius: 18px;
  color: #201526;
  background: #ffd760;
  box-shadow: 5px 6px 0 #fff;
  font-family: "Fredoka", sans-serif;
  font-size: 3.2rem;
  font-weight: 800;
  transform: rotate(-4deg);
  animation: warningPulse 700ms ease-in-out infinite alternate;
}

.error-code {
  margin: 0 0 8px;
  color: #ff8dae;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.error-window-body h2 {
  margin: 0 auto 14px;
  font-size: clamp(2rem, 7vw, 3.8rem);
}

.error-window-body > p:not(.error-code) {
  max-width: 490px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.8);
}

.error-log {
  display: grid;
  gap: 7px;
  margin: 24px 0;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  font-family: Consolas, monospace;
  font-size: 0.75rem;
  text-align: left;
}

.error-log span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.error-log b {
  color: #ffd760;
  text-align: right;
}

.error-close {
  width: 100%;
  min-height: 50px;
  border: 2px solid #fff;
  border-radius: 10px;
  color: #201526;
  background: #fff;
  box-shadow: 4px 5px 0 #f52d5e;
  font-weight: 900;
  cursor: pointer;
}

.error-close:disabled {
  color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
  cursor: wait;
}

.fake-error-popup {
  position: absolute;
  z-index: 2;
  width: min(290px, 74vw);
  padding: 12px;
  border: 2px solid #fff;
  border-radius: 7px;
  color: #fff;
  background: #3a1830;
  box-shadow: 7px 8px 0 rgba(0, 0, 0, 0.65);
  font-size: 0.78rem;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.7);
  animation: fakePopup 280ms ease forwards;
}

.fake-error-popup b {
  display: block;
  margin-bottom: 4px;
  color: #ffd760;
  text-transform: uppercase;
}

.gallery-section {
  background: #ffeff5;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2.6vw, 30px);
  align-items: start;
}

.polaroid {
  position: relative;
  margin: 0;
  padding: 9px 9px 46px;
  border: var(--outline);
  border-radius: 5px;
  background: #fff;
  box-shadow: 7px 9px 0 var(--ink);
  cursor: pointer;
  transition: transform 240ms ease, box-shadow 240ms ease;
}

.polaroid:nth-child(odd) {
  transform: rotate(-3deg);
}

.polaroid:nth-child(even) {
  margin-top: 28px;
  transform: rotate(3.3deg);
}

.polaroid:hover {
  z-index: 3;
  box-shadow: 13px 16px 0 var(--ink);
  transform: rotate(0) translateY(-8px) scale(1.03);
}

.polaroid::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -14px;
  left: 50%;
  width: 65px;
  height: 25px;
  background: rgba(255, 213, 96, 0.72);
  transform: translateX(-50%) rotate(-3deg);
}

.polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 1px solid rgba(42, 23, 48, 0.25);
}

.polaroid figcaption {
  position: absolute;
  right: 10px;
  bottom: 10px;
  left: 10px;
  overflow: hidden;
  font-weight: 900;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.secret-photo {
  overflow: visible;
}

.photo-flip {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgba(42, 23, 48, 0.25);
  background: #ece5ef;
}

.secret-photo .photo-flip img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  transition: transform 300ms ease, filter 300ms ease;
}

.secret-number {
  position: absolute;
  z-index: 5;
  top: 16px;
  right: 16px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: "Fredoka", sans-serif;
  font-weight: 800;
  transition: transform 350ms ease, background 350ms ease;
}

.secret-teaser {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: 50%;
  display: grid;
  min-width: 78%;
  padding: 13px 15px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 4px 5px 0 var(--ink);
  text-align: center;
  transform: translate(-50%, -50%) rotate(-2deg);
  backdrop-filter: blur(5px);
  transition: opacity 250ms ease, transform 350ms ease;
  animation: secretNudge 2.1s ease-in-out infinite;
}

.secret-teaser b {
  font-family: "Fredoka", sans-serif;
  font-size: 1rem;
}

.secret-teaser small {
  margin-top: 3px;
  font-weight: 800;
}

.tap-hint {
  position: absolute;
  z-index: 4;
  right: 12px;
  bottom: 57px;
  left: 12px;
  padding: 7px 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--pink);
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 0.75rem;
  font-weight: 900;
  text-align: center;
  transition: opacity 250ms ease, transform 350ms ease;
}

.secret-photo:active .photo-normal {
  filter: brightness(1.08);
  transform: scale(0.97);
}

.gifts-section {
  background: linear-gradient(180deg, #ffeff5, #fff9db);
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.gift-card {
  padding: 24px 18px 20px;
  border: var(--outline);
  border-radius: 24px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 6px 7px 0 var(--ink);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease;
}

.gift-card:hover,
.gift-card.open {
  background: #fff;
  transform: translateY(-8px) rotate(-1deg);
}

.gift-card b,
.gift-card small {
  display: block;
}

.gift-card b {
  margin-top: 18px;
  font-family: "Fredoka", sans-serif;
  font-size: 1.25rem;
}

.gift-card small {
  margin-top: 4px;
}

.gift-visual {
  position: relative;
  display: block;
  width: 106px;
  height: 80px;
  margin-inline: auto;
  border: var(--outline);
  border-radius: 8px;
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gift-visual::before {
  content: "";
  position: absolute;
  top: -18px;
  left: -9px;
  width: 120px;
  height: 24px;
  border: var(--outline);
  border-radius: 6px;
  background: inherit;
  transition: transform 400ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gift-visual i,
.gift-visual i::after {
  position: absolute;
  content: "";
  background: var(--yellow);
}

.gift-visual i {
  top: -20px;
  left: 44px;
  width: 15px;
  height: 100px;
  border-right: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
}

.gift-visual i::after {
  top: 25px;
  left: -48px;
  width: 107px;
  height: 14px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
}

.gift-card.open .gift-visual::before {
  transform: translateY(-29px) rotate(-12deg);
}

.gift-card.open .gift-visual {
  filter: drop-shadow(0 0 16px rgba(255, 112, 174, 0.72));
}

.gift-visual.pink {
  background: var(--pink);
}

.gift-visual.yellow {
  background: var(--yellow);
}

.gift-visual.purple {
  background: var(--lavender);
}

.letter-section {
  padding: 120px 0;
  background:
    radial-gradient(circle at 20% 20%, #fff 0 2px, transparent 3px),
    linear-gradient(135deg, #dcd2ff, #ffc6dc);
  background-size: 35px 35px, auto;
}

.letter-card {
  position: relative;
  max-width: 820px;
  margin-inline: auto;
  padding: clamp(30px, 7vw, 74px);
  border: var(--outline);
  border-radius: 10px;
  background:
    linear-gradient(rgba(255, 112, 174, 0.08) 1px, transparent 1px),
    #fffdfa;
  background-size: 100% 31px;
  box-shadow: 14px 16px 0 var(--ink);
  transform: rotate(-1deg);
}

.letter-card::before {
  content: "✦";
  position: absolute;
  top: 28px;
  right: 34px;
  color: var(--pink);
  font-size: 3rem;
}

.letter-kicker {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
}

.letter-card h2 {
  margin: 0 0 34px;
  text-align: left;
}

.letter-card p {
  font-size: 1.08rem;
}

.letter-highlight {
  padding: 14px 18px;
  border-left: 5px solid var(--pink);
  background: #fff1c9;
  font-weight: 900;
}

.letter-card footer {
  margin-top: 38px;
  font-style: italic;
  line-height: 1.7;
}

.letter-card footer strong {
  display: block;
  font-family: "Fredoka", sans-serif;
  font-size: 1.2rem;
  font-style: normal;
}

.tape {
  position: absolute;
  width: 90px;
  height: 30px;
  background: rgba(255, 215, 96, 0.72);
}

.tape-left {
  top: -13px;
  left: 40px;
  transform: rotate(-8deg);
}

.tape-right {
  right: 38px;
  bottom: -12px;
  transform: rotate(-8deg);
}

.candle-section {
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.92), transparent 25rem),
    linear-gradient(150deg, #fff3b5, #ffbfd8 48%, #cfc2ff);
}

.birthday-cake {
  position: relative;
  width: 270px;
  height: 300px;
  margin: 40px auto 20px;
}

.flame {
  position: absolute;
  z-index: 5;
  top: 2px;
  left: 126px;
  width: 22px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 55% 45% 55% 45%;
  background: linear-gradient(#fff6a6, #ff8d29 58%, #ff4778);
  box-shadow: 0 0 22px #ffb13b;
  transform: rotate(5deg);
  animation: flicker 420ms ease-in-out infinite alternate;
  transform-origin: 50% 100%;
}

.candle-stick {
  position: absolute;
  z-index: 4;
  top: 36px;
  left: 112px;
  display: grid;
  width: 50px;
  height: 70px;
  place-items: center;
  border: var(--outline);
  border-radius: 8px 8px 2px 2px;
  background: repeating-linear-gradient(45deg, #fff 0 8px, var(--pink) 8px 16px);
  font-family: "Fredoka", sans-serif;
  font-size: 1.2rem;
  font-weight: 800;
}

.cake-layer {
  position: absolute;
  left: 20px;
  width: 230px;
  border: var(--outline);
  background: #ff95ba;
}

.cake-top {
  z-index: 3;
  top: 94px;
  height: 80px;
  border-radius: 50% 50% 15px 15px / 30% 30% 15px 15px;
  background: #fff7e6;
}

.cake-bottom {
  top: 130px;
  height: 118px;
  border-radius: 8px 8px 24px 24px;
  background:
    radial-gradient(circle at 30px 25px, var(--yellow) 0 6px, transparent 7px),
    radial-gradient(circle at 80px 58px, #fff 0 5px, transparent 6px),
    radial-gradient(circle at 150px 30px, var(--purple) 0 5px, transparent 6px),
    var(--pink);
  background-size: 100px 70px;
}

.icing {
  position: absolute;
  z-index: 4;
  top: 125px;
  left: 20px;
  width: 230px;
  height: 35px;
  background: #fff7e6;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 90% 55%, 82% 45%, 73% 75%, 65% 45%, 54% 65%, 45% 44%, 35% 74%, 25% 45%, 15% 62%, 0 48%);
}

.cake-plate {
  position: absolute;
  top: 244px;
  left: 0;
  width: 270px;
  height: 24px;
  border: var(--outline);
  border-radius: 50%;
  background: var(--lavender);
}

.smoke {
  position: absolute;
  z-index: 6;
  top: -8px;
  left: 119px;
  display: none;
  color: rgba(42, 23, 48, 0.5);
  font-size: 3rem;
  animation: smoke 1.5s ease-out forwards;
}

.birthday-cake.blown .flame {
  display: none;
}

.birthday-cake.blown .smoke {
  display: block;
}

.candle-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.mic-status {
  min-height: 28px;
  margin: 20px 0 0;
  font-weight: 800;
}

.final-message {
  display: none;
  max-width: 760px;
  margin: 38px auto 0;
  padding: 25px;
  border: var(--outline);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 8px 9px 0 var(--ink);
}

.final-message.show {
  display: block;
  animation: messagePop 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.final-message p {
  margin: 0;
  font-weight: 900;
}

.final-message h2 {
  margin: 25px auto 14px;
}

.final-message b {
  display: block;
  margin-bottom: 25px;
}

.photo-modal {
  position: fixed;
  inset: 0;
  width: min(92vw, 700px);
  max-height: 90vh;
  margin: auto;
  padding: 12px 12px 20px;
  overflow: visible;
  border: var(--outline);
  border-radius: 16px;
  background: #fff;
  box-shadow: 12px 14px 0 var(--ink);
}

.photo-modal::backdrop {
  background: rgba(42, 23, 48, 0.76);
  backdrop-filter: blur(7px);
}

.photo-modal img {
  display: block;
  max-height: 62vh;
  margin-inline: auto;
  object-fit: contain;
  border: 2px solid var(--ink);
  border-radius: 8px;
}

.photo-modal p {
  margin: 15px 48px 0 8px;
  font-weight: 900;
}

#closeModal {
  position: absolute;
  z-index: 3;
  top: -18px;
  right: -12px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: var(--outline);
  border-radius: 50%;
  color: #fff;
  background: var(--hot-pink);
  box-shadow: 3px 4px 0 var(--ink);
  font-size: 1.8rem;
  cursor: pointer;
}

.photo-modal .photo-close-button {
  position: static;
  display: block;
  width: 100%;
  height: auto;
  min-height: 50px;
  margin-top: 16px;
  border-radius: 14px;
  color: var(--ink);
  background: var(--pink);
  box-shadow: 4px 5px 0 var(--ink);
  font-size: 0.9rem;
}

.secret-loader {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(255, 255, 255, 0.18), transparent 28rem),
    rgba(42, 23, 48, 0.9);
  opacity: 0;
  pointer-events: none;
  transition: 220ms ease;
  backdrop-filter: blur(10px);
}

.secret-loader.show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.secret-loader-card {
  width: min(420px, 100%);
  padding: 28px;
  border: var(--outline);
  border-radius: 28px;
  background: linear-gradient(145deg, #fffdf6, #ffeaf3);
  box-shadow: 10px 12px 0 var(--ink);
  text-align: center;
  transform: scale(0.82) rotate(-2deg);
  transition: transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.secret-loader.show .secret-loader-card {
  transform: scale(1) rotate(0);
}

.secret-loader-card img {
  display: block;
  width: 142px;
  height: 142px;
  margin: 14px auto 8px;
  animation: curiousCat 800ms ease-in-out infinite alternate;
}

.loader-badge {
  display: inline-block;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  box-shadow: 2px 3px 0 var(--ink);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.secret-loader-card h2 {
  margin: 10px auto;
  font-size: clamp(2rem, 9vw, 3rem);
}

.secret-loader-card p {
  min-height: 28px;
  margin: 0 0 18px;
  font-weight: 700;
}

.secret-progress {
  height: 17px;
  padding: 2px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
}

.secret-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: repeating-linear-gradient(45deg, var(--pink) 0 10px, var(--purple) 10px 20px);
  transition: width 700ms cubic-bezier(0.22, 1, 0.36, 1);
}

.secret-loader-card small {
  display: block;
  margin-top: 12px;
  color: rgba(42, 23, 48, 0.6);
  font-size: 0.62rem;
}

.secret-loader-card a {
  color: inherit;
}

.gift-modal {
  position: fixed;
  inset: 0;
  width: min(92vw, 560px);
  max-height: min(88vh, 680px);
  margin: auto;
  padding: clamp(34px, 7vw, 58px);
  overflow: auto;
  border: var(--outline);
  border-radius: 28px;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 12%, #fff 0 5px, transparent 6px),
    radial-gradient(circle at 84% 18%, #ffd760 0 6px, transparent 7px),
    linear-gradient(145deg, #fffdf6, #ffeaf2 58%, #eee8ff);
  box-shadow: 12px 14px 0 var(--ink);
  text-align: center;
}

.gift-modal[open] {
  animation: giftModalIn 450ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gift-modal::backdrop {
  background: rgba(42, 23, 48, 0.72);
  backdrop-filter: blur(8px);
}

.gift-modal-ribbons::before,
.gift-modal-ribbons::after {
  content: "";
  position: absolute;
  z-index: -1;
  background: rgba(255, 112, 174, 0.16);
}

.gift-modal-ribbons::before {
  inset: 0 44% 0 auto;
  width: 46px;
}

.gift-modal-ribbons::after {
  top: 36%;
  right: 0;
  left: 0;
  height: 46px;
}

.gift-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: var(--outline);
  border-radius: 50%;
  color: var(--ink);
  background: #fff;
  box-shadow: 3px 4px 0 var(--ink);
  font-size: 1.7rem;
  cursor: pointer;
}

.gift-modal-icon {
  display: grid;
  width: 92px;
  height: 92px;
  margin: 0 auto 20px;
  place-items: center;
  border: var(--outline);
  border-radius: 28px;
  background: var(--yellow);
  box-shadow: 6px 7px 0 var(--ink);
  font-size: 3.3rem;
  transform: rotate(-4deg);
}

.gift-modal-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--hot-pink);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gift-modal h2 {
  margin-bottom: 18px;
  font-size: clamp(2.3rem, 8vw, 4rem);
}

.gift-modal p {
  margin: 0 auto 28px;
  font-size: clamp(1.02rem, 2.5vw, 1.2rem);
  line-height: 1.75;
}

.gift-modal .button {
  width: 100%;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 18px;
  bottom: 18px;
  max-width: min(390px, calc(100% - 36px));
  padding: 14px 18px;
  border: var(--outline);
  border-radius: 16px;
  background: #fff;
  box-shadow: 5px 6px 0 var(--ink);
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: 250ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

body.flash::after {
  content: "";
  position: fixed;
  z-index: 70;
  inset: 0;
  pointer-events: none;
  animation: screenFlash 800ms ease forwards;
}

@keyframes float {
  0%,
  100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-17px) rotate(5deg); }
}

@keyframes balloon {
  0%,
  100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-25px) rotate(4deg); }
}

@keyframes scrollDot {
  0% { opacity: 0; transform: translateY(0); }
  35% { opacity: 1; }
  100% { opacity: 0; transform: translateY(13px); }
}

@keyframes cakeBounce {
  0%,
  100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-11px) rotate(2deg); }
}

@keyframes flicker {
  from { transform: rotate(-7deg) scale(0.93); }
  to { transform: rotate(8deg) scale(1.05); }
}

@keyframes smoke {
  from { opacity: 0; transform: translateY(10px) scale(0.7); }
  20% { opacity: 0.8; }
  to { opacity: 0; transform: translate(20px, -60px) scale(1.4); }
}

@keyframes tapSparkle {
  from { opacity: 1; transform: translate(-50%, -50%) scale(0.5) rotate(0); }
  to { opacity: 0; transform: translate(-50%, -120%) scale(1.6) rotate(80deg); }
}

@keyframes errorShake {
  0%,
  100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(4px); }
}

@keyframes errorScreenShake {
  0%,
  100% { transform: translate(0); filter: none; }
  25% { transform: translate(-5px, 2px); filter: hue-rotate(40deg); }
  50% { transform: translate(5px, -2px); filter: contrast(1.45); }
  75% { transform: translate(-3px, -3px); filter: hue-rotate(-35deg); }
}

@keyframes scanMove {
  to { background-position: 0 100px; }
}

@keyframes warningPulse {
  from { transform: rotate(-4deg) scale(0.96); filter: brightness(0.9); }
  to { transform: rotate(4deg) scale(1.06); filter: brightness(1.18); }
}

@keyframes fakePopup {
  to { opacity: 1; transform: scale(1) rotate(var(--popup-rotation, 0deg)); }
}

@keyframes messagePop {
  from { opacity: 0; transform: scale(0.88) rotate(-2deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes giftModalIn {
  from { opacity: 0; transform: translateY(45px) scale(0.8) rotate(-3deg); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@keyframes secretNudge {
  0%,
  100% { transform: translate(-50%, -50%) rotate(-2deg) scale(1); }
  50% { transform: translate(-50%, -54%) rotate(1deg) scale(1.035); }
}

@keyframes curiousCat {
  from { transform: translateY(3px) rotate(-5deg); }
  to { transform: translateY(-7px) rotate(5deg); }
}

@keyframes screenFlash {
  0% { background: rgba(255, 255, 255, 0); }
  30% { background: rgba(255, 255, 255, 0.95); }
  100% { background: rgba(255, 255, 255, 0); }
}

@media (max-width: 800px) {
  .section {
    padding: 76px 0;
  }

  .hero {
    min-height: auto;
    padding: 78px 0 112px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "heading"
      "photo"
      "details";
    gap: 32px;
    text-align: center;
  }

  .hero h1 {
    font-size: clamp(3.3rem, 16vw, 5.8rem);
  }

  .hero-note {
    margin-inline: auto;
  }

  .hero-copy small {
    max-width: 310px;
    margin-inline: auto;
  }

  .hero-photo-wrap {
    width: min(80vw, 380px);
  }

  .ribbon {
    top: 48%;
    right: 4%;
  }

  .party-hat,
  .star-one {
    display: none;
  }

  .balloon-one {
    top: 45%;
    right: -18px;
  }

  .balloon-two {
    left: -13px;
    bottom: 10%;
  }

  .scroll-cue span {
    display: none;
  }

  .quick-facts,
  .gift-grid {
    grid-template-columns: 1fr;
  }

  .quick-facts {
    gap: 10px;
  }

  .quick-facts p {
    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: center;
    text-align: left;
  }

  .quick-facts p span {
    grid-row: span 2;
    margin: 0;
  }

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

  .letter-card {
    transform: none;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 24px, 1120px);
  }

  .hero h1 strong {
    -webkit-text-stroke-width: 1.5px;
    text-shadow: 3px 4px 0 var(--ink);
  }

  .hero-photo {
    box-shadow: 9px 11px 0 var(--ink);
  }

  .photo-badge {
    right: -16px;
    width: 76px;
    height: 76px;
    font-size: 1rem;
  }

  .stamp {
    position: relative;
    top: auto;
    right: auto;
    display: inline-block;
    margin-bottom: 24px;
  }

  .profile-chip {
    width: 100%;
    margin-bottom: 20px;
    text-align: left;
  }

  .stat-row > div:first-child {
    display: block;
  }

  .stat-row b {
    display: block;
    margin-top: 3px;
    text-align: left;
  }

  .gallery-grid {
    gap: 12px;
  }

  .polaroid {
    padding: 6px 6px 38px;
    box-shadow: 4px 5px 0 var(--ink);
  }

  .polaroid:nth-child(even) {
    margin-top: 18px;
  }

  .polaroid figcaption {
    font-size: 0.78rem;
  }

  .candle-actions {
    display: grid;
  }

  .music-toggle {
    top: 10px;
    right: 10px;
  }
}

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