:root {
  --paper: #fffdf9;
  --cream: #fffaf4;
  --ink: #4f3e48;
  --muted: #776570;
  --rose: #e77798;
  --rose-dark: #c65b79;
  --pink: #ffdce8;
  --blue: #d9ecff;
  --blue-ink: #6688ae;
  --yellow: #fff0ad;
  --lilac: #e8e0ff;
  --mint: #dff3e6;
  --cork: #d4b184;
  --cork-dark: #b88c5d;
  --shadow: 0 18px 42px rgba(88, 63, 76, .13), 0 4px 12px rgba(88, 63, 76, .07);
  --soft-shadow: 0 8px 22px rgba(88, 63, 76, .10);
  --safe-top: max(14px, env(safe-area-inset-top));
  --safe-right: max(14px, env(safe-area-inset-right));
  --safe-bottom: max(14px, env(safe-area-inset-bottom));
  --safe-left: max(14px, env(safe-area-inset-left));
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-rounded, "SF Pro Rounded", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --hand: "Marker Felt", "Bradley Hand", "Segoe Print", cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--cream);
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 4%, rgba(255, 220, 232, .45), transparent 20rem),
    radial-gradient(circle at 88% 25%, rgba(217, 236, 255, .52), transparent 24rem),
    linear-gradient(180deg, #fffaf6 0%, #fff7f4 50%, #fffaf4 100%);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .17;
  background-image:
    repeating-linear-gradient(0deg, rgba(100, 76, 88, .035) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgba(100, 76, 88, .018) 0 1px, transparent 1px 7px),
    radial-gradient(circle, rgba(100, 76, 88, .05) .7px, transparent .8px);
  background-size: auto, auto, 14px 14px;
}

[hidden] {
  display: none !important;
}

button,
textarea,
input {
  font: inherit;
}

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

button:focus-visible,
textarea:focus-visible,
input:focus-visible,
.postit:focus-visible {
  outline: 3px solid #6d9ee8;
  outline-offset: 3px;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -.028em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 8vw, 5rem);
}

h2 {
  font-size: clamp(2rem, 6vw, 4.1rem);
}

p {
  font-size: clamp(1rem, 2.2vw, 1.16rem);
  line-height: 1.68;
  color: var(--muted);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.skip-link {
  position: fixed;
  top: -72px;
  left: var(--safe-left);
  z-index: 1200;
  padding: 10px 14px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--rose);
  border-radius: 14px;
  box-shadow: var(--soft-shadow);
  font-weight: 800;
}

.skip-link:focus {
  top: var(--safe-top);
}

.screen,
.story-section {
  position: relative;
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: calc(var(--safe-top) + 62px) clamp(18px, 5vw, 76px) calc(var(--safe-bottom) + 66px);
  isolation: isolate;
}

.paper-card {
  width: min(880px, 100%);
  padding: clamp(30px, 6vw, 54px);
  background: rgba(255, 253, 249, .97);
  border-radius: 12px 26px 16px 22px;
  box-shadow: var(--shadow);
  position: relative;
}

.paper-card::after {
  content: "";
  position: absolute;
  inset: 10px;
  pointer-events: none;
  border: 1px dashed rgba(199, 111, 139, .20);
  border-radius: inherit;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 13px;
  padding: 5px 9px 6px;
  color: var(--rose-dark);
  background: rgba(255, 255, 255, .64);
  border-radius: 7px 11px 7px 10px;
  box-shadow: 0 2px 0 rgba(92, 73, 83, .04);
  font-family: var(--hand);
  font-size: clamp(.98rem, 2.4vw, 1.22rem);
  font-weight: 700;
  line-height: 1.25;
  transform: rotate(-1.7deg);
}

.eyebrow::before {
  content: "♡ ";
}

.actions,
.composer-actions,
.cake-actions,
.final-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button,
.icon-button,
.progress-dot,
.color-pick,
.postit-action,
.candle {
  border: 0;
  cursor: pointer;
}

.button,
.icon-button {
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.button:hover,
.icon-button:hover {
  transform: translateY(-2px) rotate(-.35deg);
}

.button:active,
.icon-button:active {
  transform: translateY(0) scale(.98);
}

.button {
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 16px 20px 15px 19px;
  font-weight: 820;
}

.button-primary {
  color: #fff;
  background: linear-gradient(180deg, #ef8eaa, var(--rose));
  border: 2px solid rgba(255, 255, 255, .86);
  box-shadow: 0 4px 0 var(--rose-dark), 0 9px 18px rgba(189, 78, 112, .16);
}

.button-ghost {
  color: var(--ink);
  background: rgba(255, 252, 248, .95);
  border: 1px solid rgba(100, 77, 88, .13);
  box-shadow: 0 5px 14px rgba(95, 74, 84, .09);
}

.portal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow-y: auto;
  background:
    linear-gradient(rgba(255, 255, 255, .42), rgba(255, 255, 255, .42)),
    radial-gradient(circle at 10% 10%, #ffd6e3 0 2px, transparent 2.5px) 0 0 / 35px 35px,
    linear-gradient(145deg, #ffdfe9 0 36%, #f3e9ff 66%, #fff7e8 100%);
}

.portal::before,
.portal::after {
  position: absolute;
  pointer-events: none;
  font-family: var(--hand);
  opacity: .18;
}

.portal::before {
  content: "♡";
  left: 5vw;
  top: 8vh;
  color: #dc6684;
  font-size: clamp(5rem, 18vw, 11rem);
  transform: rotate(-14deg);
}

.portal::after {
  content: "✿";
  right: 5vw;
  bottom: 5vh;
  color: #6797cd;
  font-size: clamp(5rem, 16vw, 10rem);
  transform: rotate(14deg);
}

.portal-card {
  width: min(690px, 100%);
  margin: auto;
  padding: clamp(38px, 7vw, 60px) clamp(24px, 7vw, 58px) clamp(30px, 6vw, 46px);
  text-align: center;
  position: relative;
  z-index: 1;
  background: #fffdf9;
  border-radius: 12px 28px 18px 22px;
  box-shadow: 0 24px 55px rgba(101, 72, 87, .16), 0 4px 10px rgba(101, 72, 87, .08);
  transform: rotate(-.7deg);
}

.portal-card::before {
  content: "feito especialmente pra você ♡";
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  padding: 7px 18px 8px;
  background: var(--yellow);
  color: #775a67;
  clip-path: polygon(2% 9%, 100% 0, 96% 96%, 0 100%);
  font-family: var(--hand);
  font-size: .88rem;
  white-space: nowrap;
}

.portal-copy {
  max-width: 490px;
  margin: 18px auto 22px;
}


.button:disabled {
  cursor: wait;
  opacity: .62;
  transform: none !important;
  box-shadow: 0 3px 0 #cb5d7c, 0 6px 12px rgba(189, 78, 112, .12);
}

.audio-status {
  min-height: 1.25em;
  margin: 7px 0 0;
  color: #9d7484;
  font-size: .82rem;
  font-family: var(--hand);
}

.audio-status.is-ready {
  color: #6d846f;
}
.portal-note {
  margin: 16px 0 0;
  color: #9d7484;
  font-family: var(--hand);
  font-size: .9rem;
}

.sticker-rail {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: -9px auto 20px;
}

.sticker-rail span {
  display: inline-block;
  padding: 5px 10px 6px;
  border-radius: 8px 12px 7px 10px;
  color: #725761;
  background: var(--yellow);
  box-shadow: 0 2px 6px rgba(86, 65, 75, .05);
  font-family: var(--hand);
  font-size: .84rem;
  transform: rotate(-2deg);
}

.sticker-rail span:nth-child(2) {
  background: var(--blue);
  transform: rotate(1.7deg);
}

.sticker-rail span:nth-child(3) {
  background: var(--lilac);
  transform: rotate(-.5deg);
}

.envelope {
  width: 140px;
  height: 98px;
  margin: 8px auto 30px;
  position: relative;
  filter: drop-shadow(0 12px 18px rgba(111, 77, 93, .12));
  transform: rotate(1.4deg);
  animation: envelopePulse 2.8s ease-in-out infinite;
}

.envelope-body {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #fff8fa;
  border: 2px solid #dca4b5;
  border-radius: 8px;
  clip-path: polygon(0 0, 50% 60%, 100% 0, 100% 100%, 0 100%);
}

.envelope-flap {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: #f6c7d5;
  border: 2px solid #dca4b5;
  border-radius: 8px 8px 3px 3px;
  clip-path: polygon(0 0, 100% 0, 50% 62%);
  transform-origin: 50% 0;
  backface-visibility: hidden;
}

.envelope-seal {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 7;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--rose);
  border-radius: 50%;
  box-shadow: 0 3px 0 var(--rose-dark), 0 7px 13px rgba(180, 75, 107, .16);
  transform: translate(-50%, -50%);
}

.letter-peek {
  position: absolute;
  left: 50%;
  bottom: 10px;
  z-index: 2;
  width: 78%;
  height: 72px;
  display: grid;
  place-items: center;
  color: #b3627b;
  background:
    linear-gradient(90deg, transparent 0 12px, rgba(224, 108, 139, .12) 12px 14px, transparent 14px),
    repeating-linear-gradient(0deg, #fffdf8 0 14px, rgba(82, 128, 176, .10) 14px 15px);
  border: 1px solid rgba(111, 77, 93, .08);
  border-radius: 5px;
  box-shadow: 0 8px 15px rgba(111, 77, 93, .08);
  font-family: var(--hand);
  font-size: .78rem;
  opacity: 0;
  transform: translate(-50%, 30px) scale(.86);
}

.portal.is-opening {
  pointer-events: none;
  animation: portalAway 1.05s cubic-bezier(.2, .75, .2, 1) forwards;
}

.portal.is-opening .envelope {
  animation: envelopeLift .78s cubic-bezier(.2, .8, .2, 1) both;
}

.portal.is-opening .envelope-flap {
  animation: flapOpen .58s ease forwards;
}

.portal.is-opening .envelope-seal {
  animation: sealAway .28s ease forwards;
}

.portal.is-opening .letter-peek {
  animation: letterRise .74s .16s cubic-bezier(.2, .8, .2, 1) both;
}

.portal.is-returning {
  animation: portalReturn .6s cubic-bezier(.2, .75, .2, 1) both;
}

.birthday-countdown {
  width: fit-content;
  max-width: 94%;
  margin: 15px auto 0;
  padding: 7px 12px 8px;
  color: #735b66;
  background: #fff7c9;
  border-radius: 5px 9px 6px 8px;
  box-shadow: 0 4px 10px rgba(88, 66, 76, .05);
  font-family: var(--hand);
  font-size: clamp(.8rem, 2.6vw, .95rem);
  transform: rotate(-1deg);
}

.birthday-countdown:empty {
  display: none;
}

body.birthday-today .portal-card::before {
  content: "HOJE É 30.09 ♡";
  background: var(--pink);
}

body.birthday-today .birthday-countdown {
  color: #a8516d;
  background: var(--pink);
}

.top-controls {
  position: fixed;
  top: var(--safe-top);
  right: var(--safe-right);
  z-index: 800;
}

.icon-button {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--rose-dark);
  background: rgba(255, 252, 248, .94);
  border: 1px solid rgba(100, 77, 88, .12);
  border-radius: 50%;
  box-shadow: var(--soft-shadow);
  font-weight: 900;
}

.skip-intro {
  position: fixed;
  top: var(--safe-top);
  left: var(--safe-left);
  z-index: 800;
  font-size: .82rem;
}

.resume-auto {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 4px);
  z-index: 820;
  white-space: nowrap;
  transform: translateX(-50%);
}

.resume-auto:hover {
  transform: translateX(-50%) translateY(-2px);
}

.progress {
  position: fixed;
  top: 50%;
  right: max(7px, env(safe-area-inset-right));
  z-index: 760;
  display: grid;
  gap: 0;
  padding: 5px 2px;
  transform: translateY(-50%);
  background: rgba(255, 253, 248, .80);
  border: 1px solid rgba(102, 77, 90, .08);
  border-radius: 999px;
  box-shadow: 0 5px 14px rgba(97, 72, 84, .08);
}

.progress-dot {
  width: 36px;
  height: 36px;
  padding: 0;
  position: relative;
  background: transparent;
  border-radius: 50%;
}

.progress-dot::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 8px;
  height: 8px;
  background: #dfccd6;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform .22s ease, background .22s ease;
}

.progress-dot.is-active::before {
  background: var(--rose);
  transform: translate(-50%, -50%) scale(1.42);
}

#soundcloud-player {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 166px;
  height: 166px;
  opacity: .001;
  clip-path: inset(99%);
  pointer-events: none;
  border: 0;
  z-index: -1;
}

#intro {
  background:
    radial-gradient(circle at 85% 15%, rgba(232, 224, 255, .52), transparent 18rem),
    linear-gradient(180deg, #fff9f5, #fffdf9);
}

.intro-card {
  text-align: center;
  transform: rotate(.5deg);
}

.intro-card p:not(.eyebrow) {
  max-width: 620px;
  margin: 20px auto 24px;
}

.ruled-paper {
  background:
    linear-gradient(90deg, transparent 0 10.5%, rgba(232, 116, 145, .14) 10.5% 10.8%, transparent 10.8%),
    repeating-linear-gradient(0deg, #fffdf8 0 35px, rgba(92, 135, 177, .10) 35px 36px);
}

.personal-card {
  text-align: left;
  transform: rotate(-.45deg);
}

.personal-card::before {
  content: "lê com calma, tá? ♡";
  position: absolute;
  top: 17px;
  right: 28px;
  z-index: 2;
  color: #a46f81;
  font-family: var(--hand);
  font-size: .94rem;
  transform: rotate(3deg);
}

.torn-paper {
  clip-path: polygon(0 1%, 5% 0, 10% .7%, 17% 0, 24% .8%, 31% 0, 39% .6%, 48% .1%, 55% .8%, 63% 0, 70% .7%, 77% 0, 85% .9%, 92% .2%, 100% .8%, 99.6% 99%, 93% 99.7%, 86% 99.1%, 78% 100%, 69% 99.2%, 61% 99.8%, 52% 99%, 44% 99.8%, 35% 99.2%, 26% 100%, 17% 99.2%, 8% 99.8%, .4% 99%);
}

.personal-message {
  white-space: pre-line;
  color: #65545f;
}

.personal-card .actions {
  margin-top: 28px;
}

.story-section {
  overflow-x: clip;
  overflow-y: visible;
}

#parents {
  background: linear-gradient(180deg, #fffaf4, #fff5ec);
}

.story-soft-pink {
  background: linear-gradient(180deg, #fff5f8, #fff0f5);
}

.story-soft-blue {
  background: linear-gradient(180deg, #f7faff, #edf5ff);
}

.story-soft-yellow {
  background: linear-gradient(180deg, #fffcf0, #fff6d8);
}

.story-section::before,
.story-section::after {
  position: absolute;
  z-index: -1;
  pointer-events: none;
  font-family: var(--hand);
  opacity: .18;
}

.story-section::before {
  content: "♡";
  top: 8%;
  left: 5%;
  color: #dc7890;
  font-size: clamp(4rem, 10vw, 8rem);
  transform: rotate(-14deg);
}

.story-section::after {
  content: "✿";
  right: 6%;
  bottom: 8%;
  color: #87a9d4;
  font-size: clamp(3rem, 8vw, 6rem);
  transform: rotate(17deg);
}

.story-grid {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: clamp(40px, 7vw, 92px);
  align-items: center;
}

.story-grid-reverse .polaroid {
  order: 2;
}

.story-copy {
  width: min(560px, 100%);
  padding: clamp(25px, 4vw, 38px);
  position: relative;
  background: rgba(255, 253, 248, .95);
  border-radius: 12px 22px 14px 19px;
  box-shadow: 0 12px 28px rgba(93, 72, 82, .09);
  transform: rotate(.45deg);
}

.story-copy::before {
  content: "";
  position: absolute;
  width: 88px;
  height: 25px;
  top: -12px;
  left: 24px;
  background: rgba(255, 233, 168, .72);
  clip-path: polygon(3% 4%, 100% 0, 94% 100%, 0 92%);
  transform: rotate(-5deg);
}

.story-copy p:last-child {
  margin-bottom: 0;
}

.scrap-label {
  display: inline-block;
  margin-bottom: 11px;
  padding: 5px 9px 6px;
  color: #865f6e;
  background: var(--pink);
  border-radius: 7px 10px 6px 9px;
  box-shadow: 0 2px 5px rgba(89, 67, 77, .05);
  font-family: var(--hand);
  font-size: .95rem;
  font-weight: 700;
  transform: rotate(-2deg);
}

.label-yellow {
  color: #806453;
  background: var(--yellow);
  transform: rotate(1.4deg);
}

.label-blue {
  color: #5f7187;
  background: var(--blue);
}

.label-lilac {
  color: #71618d;
  background: var(--lilac);
  transform: rotate(1deg);
}

.polaroid {
  --tilt: -2deg;
  --depth: 0px;
  width: min(100%, 560px);
  margin: 0;
  padding: 12px 12px 56px;
  position: relative;
  justify-self: center;
  background: #fffdfa;
  border-radius: 3px 6px 4px 3px;
  box-shadow: 0 22px 44px rgba(75, 58, 67, .16), 0 3px 7px rgba(75, 58, 67, .09);
  transform: rotate(var(--tilt));
  transform-origin: center;
}

.tilt-left {
  --tilt: -3deg;
}

.tilt-right {
  --tilt: 2.5deg;
}

.tilt-left-small {
  --tilt: -2.1deg;
}

.tilt-right-small {
  --tilt: 1.9deg;
}

.polaroid.portrait {
  width: min(100%, 400px);
}

.polaroid img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(68vh, 720px);
  object-fit: cover;
  object-position: center;
  border-radius: 3px;
  background: #f3ece8;
  transform: translateY(var(--depth)) scale(1.004);
}

.polaroid.portrait img {
  max-height: min(72vh, 760px);
}

.polaroid figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 13px;
  text-align: center;
  color: #745d69;
  font-family: var(--hand);
  font-size: clamp(.98rem, 2.2vw, 1.18rem);
  transform: rotate(-.6deg);
}

.tape {
  position: absolute;
  top: -16px;
  left: 50%;
  z-index: 3;
  width: 126px;
  height: 32px;
  opacity: .91;
  clip-path: polygon(4% 8%, 100% 0, 97% 100%, 0 94%);
  transform: translateX(-50%) rotate(-3deg);
}

.tape-yellow {
  background: rgba(255, 233, 168, .90);
}

.tape-pink {
  background: rgba(244, 185, 201, .82);
  transform: translateX(-50%) rotate(2deg);
}

.tape-blue {
  background: rgba(207, 229, 255, .90);
  transform: translateX(-50%) rotate(-2deg);
}

.tape-lilac {
  background: rgba(221, 212, 255, .90);
  transform: translateX(-50%) rotate(3deg);
}

.photo-sticker {
  position: absolute;
  right: -17px;
  bottom: 18px;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #d46786;
  background: var(--pink);
  border: 3px solid #fffdfa;
  border-radius: 46% 54% 52% 48%;
  box-shadow: 0 6px 14px rgba(86, 64, 75, .11);
  font-family: var(--hand);
  font-size: 1.48rem;
  transform: rotate(10deg);
}

.sticker-flower {
  color: #b77e52;
  background: var(--yellow);
  transform: rotate(-9deg);
}

.sticker-star {
  color: #628ab7;
  background: var(--blue);
}

.sticker-age {
  color: #7f69aa;
  background: var(--lilac);
  font-size: 1rem;
  font-weight: 900;
}

.celebration {
  background:
    radial-gradient(circle at 17% 25%, rgba(255, 220, 232, .72) 0 48px, transparent 49px),
    radial-gradient(circle at 86% 17%, rgba(217, 236, 255, .78) 0 36px, transparent 37px),
    radial-gradient(circle at 79% 84%, rgba(255, 240, 173, .80) 0 46px, transparent 47px),
    #fffaf3;
}

.celebration-card {
  width: min(760px, 100%);
  text-align: center;
  transform: rotate(-.35deg);
}

.celebration-card p:not(.eyebrow) {
  max-width: 630px;
  margin: 18px auto 24px;
}

.age-badge {
  width: clamp(118px, 24vw, 172px);
  aspect-ratio: 1;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  color: #ca5f80;
  background: var(--pink);
  border-radius: 45% 55% 48% 52%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .90), 0 8px 18px rgba(193, 92, 124, .11);
  font-family: var(--hand);
  font-size: clamp(4.8rem, 16vw, 9rem);
  font-weight: 800;
  line-height: 1;
  transform: rotate(-5deg);
}

.birthday-special {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 219, 231, .55), transparent 18rem),
    radial-gradient(circle at 82% 74%, rgba(216, 235, 255, .62), transparent 20rem),
    #fff9f4;
}

.birthday-card {
  width: min(760px, 100%);
  text-align: center;
  transform: rotate(-.25deg);
}

.birthday-card > p:not(.eyebrow) {
  max-width: 620px;
  margin: 18px auto 24px;
}

.cake-stage {
  margin-top: 28px;
}

.cake {
  width: min(84vw, 390px);
  height: 325px;
  margin: 2px auto 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  filter: drop-shadow(0 18px 18px rgba(92, 64, 75, .10));
}

.candles {
  position: absolute;
  left: 50%;
  bottom: 186px;
  z-index: 8;
  width: 72%;
  height: 100px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2px;
  transform: translateX(-50%);
}

.candle {
  appearance: none;
  width: 10px;
  height: 56px;
  padding: 0;
  position: relative;
  background: repeating-linear-gradient(135deg, #f28aa8 0 6px, #fff6d2 6px 12px);
  border-radius: 4px 4px 2px 2px;
  box-shadow: inset 0 0 0 1px rgba(125, 74, 91, .08);
  transform-origin: 50% 100%;
}

.candle:nth-child(3n + 2) {
  background: repeating-linear-gradient(135deg, #8dbce8 0 6px, #f9fbff 6px 12px);
}

.candle:nth-child(3n) {
  background: repeating-linear-gradient(135deg, #b8a2dc 0 6px, #fff9d8 6px 12px);
}

.candle::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -20px;
  width: 12px;
  height: 18px;
  border-radius: 52% 48% 52% 48%;
  background: radial-gradient(circle at 50% 65%, #fff7b8 0 22%, #f2a33b 23% 55%, #e86f72 56% 100%);
  box-shadow: 0 0 12px rgba(242, 163, 59, .44);
  transform: translateX(-50%) rotate(4deg);
  animation: flameFlicker .85s ease-in-out infinite alternate;
}

.candle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 1px;
  height: 7px;
  background: #735b60;
}

.candle.out {
  cursor: default;
  opacity: .87;
  transform: translateY(2px) scale(.98);
}

.candle.out::before {
  opacity: 0;
  transform: translate(-50%, 7px) scale(.2);
  animation: none;
  transition: opacity .28s ease, transform .28s ease;
}

.candle.out::after {
  background: #aaa;
}

.cake-heart {
  position: absolute;
  bottom: 130px;
  z-index: 5;
  color: #d26e8c;
  font-family: var(--hand);
  font-size: 1.4rem;
}

.cake-layer {
  position: relative;
  z-index: 2;
  width: 78%;
  height: 68px;
  background: linear-gradient(180deg, #ffd9e5, #f4a9bd);
  border: 2px solid rgba(176, 91, 116, .08);
  border-radius: 18px 18px 10px 10px;
}

.cake-layer-top {
  z-index: 3;
  width: 68%;
  height: 74px;
  margin-bottom: -8px;
  background: linear-gradient(180deg, #fff2c7, #f7d98d);
}

.cake-layer::after {
  content: "";
  position: absolute;
  inset: 8px 10px auto;
  height: 12px;
  background: rgba(255, 255, 255, .45);
  border-radius: 999px;
}

.cake-plate {
  width: 90%;
  height: 16px;
  margin-top: -4px;
  background: var(--blue);
  border-radius: 50%;
  box-shadow: 0 6px 0 rgba(124, 157, 190, .10);
}

.candle-help {
  max-width: 520px;
  margin: 12px auto 15px;
}

.ending {
  min-height: 100svh;
  min-height: 100dvh;
  padding: calc(var(--safe-top) + 80px) clamp(14px, 4vw, 58px) calc(var(--safe-bottom) + 80px);
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 220, 232, .45), transparent 16rem),
    radial-gradient(circle at 89% 76%, rgba(217, 236, 255, .53), transparent 22rem),
    linear-gradient(180deg, #fffaf7, #fff5ee);
}

.ending-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  text-align: center;
}

.ending-copy {
  width: min(720px, 100%);
  margin: 0 auto 50px;
  transform: rotate(-.45deg);
}

.ending-copy p:not(.eyebrow) {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.ending-copy .future-line {
  margin-top: 22px;
  padding: 10px 14px;
  color: #765f6b;
  background: var(--yellow);
  clip-path: polygon(1% 3%, 99% 0, 97% 98%, 2% 100%);
  font-family: var(--hand);
  font-size: 1rem;
  transform: rotate(-.7deg);
}

.memory-wall {
  margin-top: 30px;
  padding: clamp(24px, 4vw, 34px);
  position: relative;
  text-align: left;
  background:
    radial-gradient(circle at 2px 2px, rgba(101, 72, 49, .16) 1.1px, transparent 1.2px) 0 0 / 18px 18px,
    linear-gradient(145deg, var(--cork), #dfc29d);
  border: 9px solid #ecd6bb;
  border-radius: 12px 22px 14px 20px;
  box-shadow: 0 22px 45px rgba(96, 70, 54, .15), inset 0 0 0 2px rgba(126, 88, 58, .08);
}

.memory-wall::before {
  content: "cantinho da Lara ♡";
  position: absolute;
  top: -25px;
  left: 34px;
  padding: 7px 17px 8px;
  color: #755d68;
  background: var(--yellow);
  clip-path: polygon(3% 8%, 100% 0, 96% 100%, 0 93%);
  font-family: var(--hand);
  font-weight: 700;
  transform: rotate(-4deg);
}

.memory-garland {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 8px;
  height: 28px;
  border-top: 1px solid rgba(98, 70, 52, .28);
  transform: rotate(-1deg);
  pointer-events: none;
}

.memory-garland i {
  position: absolute;
  top: -1px;
  width: 14px;
  height: 20px;
  background: #ffd7e4;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.memory-garland i:nth-child(1) { left: 8%; }
.memory-garland i:nth-child(2) { left: 22%; background: var(--yellow); }
.memory-garland i:nth-child(3) { left: 37%; background: var(--blue); }
.memory-garland i:nth-child(4) { left: 52%; background: var(--lilac); }
.memory-garland i:nth-child(5) { left: 67%; background: var(--mint); }
.memory-garland i:nth-child(6) { left: 81%; background: #ffd7e4; }
.memory-garland i:nth-child(7) { left: 94%; background: var(--yellow); }

.wall-head {
  padding-top: 20px;
}

.wall-head h3 {
  margin: 0 0 8px;
  color: #6b4f5a;
  font-family: var(--hand);
  font-size: clamp(1.7rem, 4vw, 2.65rem);
  transform: rotate(-1deg);
}

.wall-head p {
  max-width: 690px;
  margin: 0;
  color: #705c54;
  font-size: .96rem;
}

.composer {
  margin-top: 28px;
  padding: 18px;
  position: relative;
  display: grid;
  gap: 12px;
  background:
    linear-gradient(90deg, transparent 0 32px, rgba(224, 108, 139, .14) 32px 34px, transparent 34px),
    repeating-linear-gradient(0deg, #fffdf8 0 31px, rgba(82, 128, 176, .10) 31px 32px);
  border-radius: 7px 16px 8px 13px;
  box-shadow: 0 9px 18px rgba(92, 68, 54, .11);
  transform: rotate(-.2deg);
}

.composer::before {
  content: "escreve do seu jeitinho ♡";
  position: absolute;
  top: -13px;
  right: 18px;
  padding: 4px 9px 5px;
  color: #6c7182;
  background: var(--blue);
  font-family: var(--hand);
  font-size: .8rem;
  transform: rotate(2.5deg);
}

.composer textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  padding: 13px 13px 13px 25px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 8px;
  outline: none;
  font-family: var(--hand);
  font-size: 1.06rem;
  line-height: 1.5;
}

.composer textarea::placeholder {
  color: #a28e99;
}

.composer-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.file-label {
  min-height: 44px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  color: #66515d;
  background: #fffaf4;
  border: 1px solid rgba(91, 66, 81, .13);
  border-radius: 14px;
  box-shadow: 0 3px 8px rgba(91, 66, 81, .05);
  cursor: pointer;
  font-weight: 760;
}

#postit-photo {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.photo-status {
  color: #8c7682;
  font-size: .84rem;
}

.color-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.color-fieldset legend {
  margin-bottom: 7px;
  color: #7a665f;
  font-size: .82rem;
  font-weight: 700;
}

.color-picks {
  display: flex;
  gap: 8px;
}

.color-pick {
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, .92);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(91, 66, 81, .14);
  transition: transform .18s ease, box-shadow .18s ease;
}

.color-pick.is-selected {
  transform: scale(1.08);
  box-shadow: 0 0 0 3px rgba(223, 102, 128, .34);
}

.color-sun { background: #ffe9a8; }
.color-rose { background: #ffd1dc; }
.color-sky { background: #cfe4ff; }
.color-mint { background: #d2f0da; }

.composer-actions {
  justify-content: flex-start;
}

.status-line {
  min-height: 22px;
  margin: 0;
  color: #8a6a78;
  font-size: .84rem;
}

.postit-board {
  position: relative;
  min-height: 680px;
  margin-top: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 2px 2px, rgba(96, 68, 45, .17) 1.1px, transparent 1.2px) 0 0 / 17px 17px,
    linear-gradient(145deg, #d6b58d, #cfa97d);
  border-radius: 8px 14px 9px 13px;
  box-shadow: inset 0 0 22px rgba(90, 58, 35, .08);
  touch-action: pan-y;
}

.empty-wall {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #8e725f;
  font-family: var(--hand);
  font-size: 1.12rem;
}

.postit {
  --rotation: 0deg;
  position: absolute;
  width: 220px;
  min-height: 170px;
  padding: 25px 14px 12px;
  color: #544651;
  background: #ffe9a8;
  border-radius: 2px 3px 5px 2px;
  box-shadow: 0 10px 16px rgba(75, 57, 49, .16);
  cursor: grab;
  user-select: none;
  touch-action: none;
  transform: rotate(var(--rotation));
  transform-origin: 50% 18%;
}

.postit:active {
  cursor: grabbing;
}

.postit::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 74px;
  height: 23px;
  background: rgba(255, 255, 255, .52);
  clip-path: polygon(4% 7%, 100% 0, 95% 100%, 0 93%);
  transform: translateX(-50%) rotate(-2deg);
}

.postit::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  border-style: solid;
  border-width: 0 0 18px 18px;
  border-color: transparent transparent rgba(255, 255, 255, .28) transparent;
}

.postit[data-color="rose"] { background: #ffd1dc; }
.postit[data-color="sky"] { background: #cfe4ff; }
.postit[data-color="mint"] { background: #d2f0da; }

.postit-text {
  margin: 8px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--hand);
  font-size: 1rem;
  line-height: 1.42;
}

.postit-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  margin-top: 6px;
  object-fit: cover;
  background: rgba(0, 0, 0, .04);
  border: 5px solid rgba(255, 255, 255, .82);
  border-radius: 3px;
  pointer-events: none;
}

.postit-meta {
  margin-top: 8px;
  font-size: .68rem;
  opacity: .58;
}

.postit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 7px;
}

.postit-action {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #6d5661;
  background: rgba(255, 255, 255, .68);
  border-radius: 50%;
  font-weight: 900;
}

.privacy-note {
  margin: 13px 4px 0;
  color: #745f57;
  font-size: .79rem;
}

.final-actions {
  margin-top: 34px;
}

.tiny-footer {
  margin-top: 30px;
  color: #9b7585;
  font-family: var(--hand);
  font-size: .94rem;
}

.confetti-layer,
.heart-rain {
  position: fixed;
  inset: 0;
  z-index: 900;
  overflow: hidden;
  pointer-events: none;
}

.confetti-piece {
  position: absolute;
  top: -24px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  animation: confettiFall var(--duration) linear forwards;
}

.heart-rain-piece {
  position: absolute;
  top: -28px;
  color: #e67c9c;
  font-size: var(--size);
  opacity: .85;
  animation: heartRain var(--duration) linear forwards;
}

@keyframes envelopePulse {
  50% { transform: rotate(-.6deg) translateY(-2px) scale(1.025); }
}

@keyframes envelopeLift {
  0% { transform: rotate(1.4deg) translateY(0) scale(1); }
  55% { transform: rotate(-1deg) translateY(-7px) scale(1.03); }
  100% { transform: rotate(.3deg) translateY(-2px) scale(1.01); }
}

@keyframes flapOpen {
  to { transform: perspective(520px) rotateX(165deg); opacity: .62; }
}

@keyframes sealAway {
  to { transform: translate(-50%, -50%) scale(.68); opacity: 0; }
}

@keyframes letterRise {
  0% { opacity: 0; transform: translate(-50%, 30px) scale(.86) rotate(-2deg); }
  45% { opacity: 1; }
  100% { opacity: 1; transform: translate(-50%, -58px) scale(1) rotate(1deg); }
}

@keyframes portalAway {
  0%, 58% { opacity: 1; }
  100% { opacity: 0; visibility: hidden; transform: scale(1.012); }
}

@keyframes portalReturn {
  from { opacity: 0; transform: scale(1.014); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes paperIn {
  from { opacity: 0; transform: translateY(18px) rotate(-.7deg) scale(.985); }
  to { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
}

@keyframes photoDrop {
  from { opacity: 0; transform: translateY(28px) rotate(var(--tilt)) scale(.96); }
  to { opacity: 1; transform: translateY(0) rotate(var(--tilt)) scale(1); }
}

@keyframes softPop {
  0% { opacity: 0; transform: translateY(14px) scale(.96); }
  70% { opacity: 1; transform: translateY(-2px) scale(1.012); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes badgePop {
  0% { opacity: 0; transform: rotate(-9deg) scale(.5); }
  72% { opacity: 1; transform: rotate(-3deg) scale(1.07); }
  100% { opacity: 1; transform: rotate(-5deg) scale(1); }
}

@keyframes flameFlicker {
  from { transform: translateX(-50%) rotate(-4deg) scale(.94); }
  to { transform: translateX(-50%) rotate(5deg) scale(1.06); }
}

@keyframes cakeArrive {
  0% { opacity: 0; transform: translateY(28px) scale(.9) rotate(-1deg); }
  70% { opacity: 1; transform: translateY(-3px) scale(1.015) rotate(.3deg); }
  100% { opacity: 1; transform: none; }
}

@keyframes noteStick {
  0% { opacity: 0; transform: translateY(-30px) rotate(calc(var(--rotation) - 4deg)) scale(1.10); }
  68% { opacity: 1; transform: translateY(4px) rotate(calc(var(--rotation) + 1deg)) scale(.99); }
  100% { opacity: 1; transform: translateY(0) rotate(var(--rotation)) scale(1); }
}

@keyframes noteSettle {
  0% { transform: rotate(var(--rotation)) scale(1.02); }
  45% { transform: rotate(calc(var(--rotation) + 1.1deg)) scale(.994); }
  75% { transform: rotate(calc(var(--rotation) - .6deg)) scale(1.003); }
  100% { transform: rotate(var(--rotation)) scale(1); }
}

@keyframes confettiFall {
  to { transform: translate3d(var(--drift), 106vh, 0) rotate(var(--spin)); opacity: .06; }
}

@keyframes heartRain {
  to { transform: translate3d(var(--drift), 105vh, 0) rotate(var(--spin)); opacity: 0; }
}

.scene.is-visible .paper-card,
.ending.is-visible .ending-copy,
.ending.is-visible .memory-wall {
  animation: paperIn .72s cubic-bezier(.2, .8, .2, 1) both;
}

.story-section.is-visible .polaroid {
  animation: photoDrop .80s cubic-bezier(.2, .8, .2, 1) both;
}

.story-section.is-visible .story-copy {
  animation: paperIn .66s .10s cubic-bezier(.2, .8, .2, 1) both;
}

.story-section.is-visible .scrap-label,
.scene.is-visible .eyebrow {
  animation: softPop .50s .12s cubic-bezier(.2, .8, .2, 1) both;
}

.story-section.is-visible h2,
.scene.is-visible h2 {
  animation: softPop .60s .20s cubic-bezier(.2, .8, .2, 1) both;
}

.story-section.is-visible .story-copy > p:last-child,
.scene.is-visible .paper-card > p:not(.eyebrow) {
  animation: softPop .60s .30s cubic-bezier(.2, .8, .2, 1) both;
}

.celebration.is-visible .age-badge {
  animation: badgePop .68s .07s cubic-bezier(.2, .85, .2, 1) both;
}

.cake-stage.is-visible .cake {
  animation: cakeArrive .82s cubic-bezier(.2, .85, .2, 1) both;
}

.postit.is-new {
  animation: noteStick .68s cubic-bezier(.2, .85, .2, 1) both;
}

.postit.is-settling {
  animation: noteSettle .46s cubic-bezier(.2, .8, .2, 1);
}

@media (hover: hover) and (pointer: fine) {
  .polaroid {
    transition: transform .28s ease, box-shadow .28s ease;
  }

  .polaroid:hover {
    transform: translateY(-4px) rotate(calc(var(--tilt) * .72));
    box-shadow: 0 28px 50px rgba(75, 58, 67, .18), 0 5px 10px rgba(75, 58, 67, .08);
  }
}

@media (max-width: 860px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .story-grid-reverse .polaroid {
    order: initial;
  }

  .story-copy {
    width: min(92vw, 560px);
    margin: 0 auto;
    text-align: left;
  }

  .polaroid {
    width: min(86vw, 500px);
  }

  .polaroid.portrait {
    width: min(73vw, 360px);
  }

  .progress {
    right: 5px;
  }

  .postit-board {
    min-height: 720px;
  }
}

@media (max-width: 520px) {
  .screen,
  .story-section {
    padding-left: 15px;
    padding-right: 15px;
  }

  .portal-card {
    width: min(92vw, 450px);
    padding: 38px 18px 28px;
  }

  .portal-card::before {
    font-size: .81rem;
  }

  .envelope {
    width: 122px;
    height: 84px;
  }

  .sticker-rail {
    gap: 6px;
    margin-bottom: 18px;
  }

  .sticker-rail span {
    padding: 4px 8px 5px;
    font-size: .75rem;
  }

  .personal-card {
    padding: 50px 19px 29px;
  }

  .personal-card::before {
    top: 15px;
    right: 17px;
    font-size: .84rem;
  }

  .story-grid {
    gap: 26px;
  }

  .story-copy {
    padding: 24px 19px;
  }

  .story-copy h2 {
    font-size: clamp(2rem, 9vw, 3.1rem);
  }

  .polaroid {
    width: min(86vw, 390px);
    padding: 9px 9px 48px;
  }

  .polaroid.portrait {
    width: min(70vw, 320px);
  }

  .polaroid::after,
  .photo-sticker {
    right: -5px;
    width: 38px;
    height: 38px;
  }

  .cake {
    height: 290px;
  }

  .candles {
    width: 78%;
    bottom: 176px;
  }

  .candle {
    width: 8px;
    height: 49px;
  }

  .cake-layer-top {
    height: 66px;
  }

  .cake-layer-bottom {
    height: 62px;
  }

  .cake-heart {
    bottom: 121px;
  }

  .memory-wall {
    padding: 28px 10px 16px;
    border-width: 7px;
  }

  .memory-wall::before {
    left: 18px;
    font-size: .86rem;
  }

  .composer {
    padding: 14px 9px;
  }

  .composer::before {
    right: 8px;
  }

  .composer-row {
    align-items: flex-start;
  }

  .postit {
    width: 168px;
    min-height: 148px;
    padding: 22px 11px 10px;
  }

  .postit-board {
    min-height: 760px;
  }

  .skip-intro {
    max-width: 132px;
  }
}

@media (max-height: 700px) and (min-width: 700px) {
  .portal {
    place-items: start center;
  }

  .portal-card {
    margin-top: 48px;
    margin-bottom: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }

  .confetti-layer,
  .heart-rain {
    display: none !important;
  }

  .polaroid img {
    transform: none !important;
  }
}
