:root {
  --red: #d4202c;
  --red-dark: #8e0b14;
  --gold: #d9a93a;
  --gold-light: #fff1b8;
  --brown: #5a3a22;
  --blue: #1f6fb5;
  --cream: #fffaf0;
  --mx: 0;
  --my: 0;
  --script: "Great Vibes", cursive;
  --script2: "Parisienne", cursive;
  --sans: "Quicksand", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  font-family: var(--sans);
  color: var(--brown);
  background: linear-gradient(180deg, #dcecf9 0%, #f4f9ff 45%, #ffffff 100%);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
body.locked { overflow: hidden; }
img { display: block; max-width: 100%; user-select: none; -webkit-user-drag: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

/* ---------- Nuvens ---------- */
.sky-clouds { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.sky-clouds span {
  position: absolute; width: 220px; height: 70px; border-radius: 100px;
  background: #fff; filter: blur(18px); opacity: .85;
  animation: drift 40s linear infinite;
}
.sky-clouds span:nth-child(1) { top: 12%; left: -30%; }
.sky-clouds span:nth-child(2) { top: 48%; left: -40%; animation-duration: 55s; animation-delay: -20s; transform: scale(1.4); }
.sky-clouds span:nth-child(3) { top: 75%; left: -30%; animation-duration: 48s; animation-delay: -35s; }
@keyframes drift { to { translate: 180vw 0; } }

/* ---------- Envelope ---------- */
.envelope-screen {
  --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .13 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px;
  background:
    radial-gradient(ellipse 60% 45% at 50% 52%, rgba(255, 246, 228, .95), rgba(255, 246, 228, 0) 70%),
    radial-gradient(ellipse at 50% 120%, #f3d9dc 0%, rgba(243, 217, 220, 0) 60%),
    linear-gradient(180deg, #d6e8f7 0%, #eef5fb 45%, #f8efe9 100%);
  transition: opacity .9s ease, transform .9s ease, filter .9s ease;
  overflow: hidden;
}
.envelope-screen::after { /* vinheta suave */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, transparent 55%, rgba(90, 40, 50, .14) 100%);
}

/* luzes desfocadas */
.bokeh span {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 236, 170, .9), rgba(255, 236, 170, 0) 70%);
  animation: bokeh 9s ease-in-out infinite;
}
.bokeh span:nth-child(1) { width: 120px; height: 120px; left: 8%;  top: 12%; }
.bokeh span:nth-child(2) { width: 70px;  height: 70px;  left: 78%; top: 9%;  animation-delay: -2s; }
.bokeh span:nth-child(3) { width: 160px; height: 160px; left: 70%; top: 70%; animation-delay: -4s; opacity: .7; }
.bokeh span:nth-child(4) { width: 60px;  height: 60px;  left: 15%; top: 78%; animation-delay: -6s; }
.bokeh span:nth-child(5) { width: 40px;  height: 40px;  left: 50%; top: 6%;  animation-delay: -1s; }
.bokeh span:nth-child(6) { width: 90px;  height: 90px;  left: 88%; top: 40%; animation-delay: -3s; background: radial-gradient(circle, rgba(255, 170, 180, .7), transparent 70%); }
.bokeh span:nth-child(7) { width: 100px; height: 100px; left: -2%; top: 45%; animation-delay: -5s; background: radial-gradient(circle, rgba(255, 170, 180, .6), transparent 70%); }
.bokeh span:nth-child(8) { width: 50px;  height: 50px;  left: 40%; top: 88%; animation-delay: -7s; }
@keyframes bokeh { 50% { transform: translate(14px, -18px) scale(1.15); opacity: .55; } }
.env-petals { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.envelope-screen.gone { opacity: 0; transform: scale(1.15); filter: blur(6px); pointer-events: none; }
.envelope-kicker {
  position: relative; z-index: 2;
  font-family: var(--script2); font-size: clamp(22px, 6vw, 30px); color: var(--gold);
  text-shadow: 0 1px 0 #fff, 0 2px 6px rgba(150,100,0,.25);
  text-align: center; padding: 0 24px;
  animation: fadeUp 1s ease both;
}
.envelope-hint {
  position: relative; z-index: 2;
  font-weight: 600; letter-spacing: .04em; color: var(--red-dark); font-size: 15px;
  display: flex; align-items: center; gap: 10px;
  animation: fadeUp 1s .4s ease both;
}
.tap-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(212,32,44,.6); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 14px rgba(212,32,44,0); } 100% { box-shadow: 0 0 0 0 rgba(212,32,44,0); } }

/* ---- Envelope 3D de papel ---- */
.envelope {
  --w: min(86vw, 400px);
  position: relative; z-index: 2;
  width: var(--w); height: calc(var(--w) * .68);
  perspective: 1100px;
  animation: envFloat 5s ease-in-out infinite, fadeUp 1s .2s ease both;
}
.envelope:focus-visible { outline: none; }
.envelope:focus-visible .seal { outline: 3px dashed var(--gold); outline-offset: 6px; }
@keyframes envFloat { 50% { translate: 0 -12px; } }
.envelope.open { animation: none; }

/* sombra na "mesa" */
.env-shadow {
  position: absolute; left: 8%; right: 8%; bottom: -16%; height: 22%; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(80, 20, 30, .38), rgba(80, 20, 30, 0) 70%);
  filter: blur(6px);
  animation: shadowPulse 5s ease-in-out infinite;
}
@keyframes shadowPulse { 50% { transform: scale(.9); opacity: .7; } }
.envelope.open .env-shadow { animation: none; }

/* corpo que inclina em 3D (mouse / giroscópio) */
.env-3d {
  position: absolute; inset: 0; display: block;
  transform-style: flat; perspective: 900px; perspective-origin: 50% 0%;
  transform: rotateX(calc(10deg + var(--my) * -10deg)) rotateY(calc(var(--mx) * 14deg));
  transition: transform .3s ease-out;
}
.envelope.open .env-3d { transform: rotateX(4deg) rotateY(0deg) translateY(12%); transition: transform 1s ease; }
.env-3d > span { position: absolute; display: block; }

/* parte de trás por dentro: forro estampado */
.env-back {
  inset: 0; border-radius: 8px;
  background:
    var(--paper),
    radial-gradient(circle at 50% 50%, rgba(212, 168, 64, .55) 1.6px, transparent 2.4px) 0 0 / 13px 13px,
    radial-gradient(circle at 50% 50%, rgba(212, 32, 44, .25) 1.4px, transparent 2.2px) 6.5px 6.5px / 13px 13px,
    linear-gradient(180deg, #fff6e6, #f3dfc0);
  box-shadow: inset 0 0 0 5px #a50e18, inset 0 0 0 6px rgba(255, 220, 150, .6), inset 0 18px 30px rgba(90, 30, 0, .25);
  z-index: 0;
}

/* cartinha */
.letter {
  left: 6%; right: 6%; top: 5%; height: 90%;
  border-radius: 6px;
  background: radial-gradient(ellipse at 50% 30%, #fffefa, #fbf3e2 70%, #f3e6cc);
  box-shadow: 0 2px 6px rgba(80, 40, 0, .22), inset 0 0 0 7px #fffdf7, inset 0 0 0 8px var(--gold), inset 0 0 0 11px #fffdf7, inset 0 0 0 12px rgba(217, 169, 58, .55);
  display: grid !important; place-items: center;
  z-index: 2; transform: translateY(0);
  transition: transform 1.1s cubic-bezier(.25, 1.1, .4, 1);
}
.envelope.letter-out .letter { transform: translateY(-60%); }
.letter-inner { display: flex; flex-direction: column; align-items: center; transform: translateY(-16%); }
.letter-kicker { font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #a07a2c; }
.letter-apple { width: 28px; height: 28px; margin-top: 4px; }
.letter-name { font-family: var(--script); font-size: clamp(38px, 10.5vw, 50px); white-space: nowrap; color: var(--red); line-height: 1; text-shadow: 0 2px 0 rgba(140, 10, 20, .15); }
.letter-age { font-family: var(--script2); color: #b8892a; font-size: 22px; }

/* bolsos da frente (com sombra nas dobras) */
.env-pockets {
  inset: 0; z-index: 3;
  filter: drop-shadow(0 -1px 1.5px rgba(60, 0, 5, .45)) drop-shadow(0 -4px 6px rgba(60, 0, 5, .18));
}
.env-pocket { position: absolute; inset: 0; border-radius: 8px; }
.env-pocket--left {
  background: var(--paper), linear-gradient(95deg, #c8202b 0%, #b0131d 60%, #9a0f18 100%);
  clip-path: polygon(0 0, 49% 55%, 0 100%);
}
.env-pocket--right {
  background: var(--paper), linear-gradient(265deg, #c8202b 0%, #b0131d 60%, #9a0f18 100%);
  clip-path: polygon(100% 0, 51% 55%, 100% 100%);
}
.env-pocket--bottom {
  background: var(--paper), linear-gradient(0deg, #c41a25 0%, #d9303a 70%, #e0414a 100%);
  clip-path: polygon(0 100%, 0 97%, 47% 50%, 50% 48.5%, 53% 50%, 100% 97%, 100% 100%);
}

.env-to {
  left: 0; right: 0; bottom: 8%;
  font-family: var(--script2); color: #ffe7a8; font-size: clamp(14px, 4vw, 17px);
  text-align: center; line-height: 1.25;
  text-shadow: 0 1px 0 rgba(90, 0, 5, .6);
  z-index: 4;
  transition: opacity .3s;
}
.envelope.open .env-to { opacity: 0; }

/* aba: frente vermelha, verso com forro */
.flap-shadow {
  inset: 0 0 auto 0; height: 60%;
  filter: blur(3px); opacity: .55;
  z-index: 5; transform: translateY(5px);
  transition: opacity .3s;
}
.flap-shadow span {
  position: absolute; inset: 0; background: #3a0004;
  clip-path: polygon(0 0, 100% 0, 54% 94%, 50% 100%, 46% 94%);
}
.envelope.open .flap-shadow { opacity: 0; }

.env-flap {
  inset: 0 0 auto 0; height: 60%;
  transform-style: preserve-3d;
  transform-origin: 50% 0;
  z-index: 6; transform: rotateX(0deg);
  transition: transform .9s cubic-bezier(.55, .05, .3, 1);
}
.flap-face {
  position: absolute; inset: 0;
  clip-path: polygon(0 0, 100% 0, 54% 94%, 50% 100%, 46% 94%);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 8px 8px 0 0;
}
.flap-face--front {
  background:
    var(--paper),
    linear-gradient(180deg, rgba(255, 220, 150, .5) 0 1.5px, transparent 1.5px),
    linear-gradient(180deg, #e3343f 0%, #c81e29 55%, #ad121c 100%);
}
.flap-face--back {
  transform: rotateX(180deg);
  background:
    var(--paper),
    radial-gradient(circle at 50% 50%, rgba(212, 168, 64, .6) 1.6px, transparent 2.4px) 0 0 / 13px 13px,
    radial-gradient(circle at 50% 50%, rgba(212, 32, 44, .3) 1.4px, transparent 2.2px) 6.5px 6.5px / 13px 13px,
    linear-gradient(0deg, #fff6e6, #ecd5b0);
}
.envelope.open .env-flap { transform: rotateX(180deg); }
.envelope.flap-behind .env-flap { z-index: 1; }

/* selo de cera dourado */
.seal {
  left: 50%; top: 60%;
  width: 74px; height: 74px; margin: -37px 0 0 -37px;
  border-radius: 48% 52% 45% 55% / 53% 46% 54% 47%;
  background: radial-gradient(circle at 35% 28%, #fff4c0 0%, #edc35a 28%, #c9922a 62%, #8c5b10 100%);
  box-shadow:
    0 3px 0 #7a4c0c,
    0 8px 14px rgba(70, 20, 0, .45),
    inset 0 -5px 9px rgba(110, 60, 0, .55),
    inset 0 4px 6px rgba(255, 255, 255, .55);
  display: grid !important; place-items: center;
  z-index: 7; transform: none;
  transition: transform .6s cubic-bezier(.5, -0.4, .6, 1), opacity .5s ease;
  cursor: pointer;
}
.seal-ring {
  position: absolute; inset: 9px; border-radius: 50%;
  box-shadow: inset 0 2px 3px rgba(110, 60, 0, .6), inset 0 -2px 2px rgba(255, 240, 190, .7), 0 1px 0 rgba(255, 240, 190, .6);
}
.seal svg { width: 34px; height: 34px; position: relative; filter: drop-shadow(0 1px 0 rgba(255, 240, 190, .8)) drop-shadow(0 -1px 1px rgba(90, 40, 0, .5)); }
.envelope:not(.open):hover .seal { transform: scale(1.06); }
.envelope.open .seal { transform: translateY(-30px) rotate(-20deg) scale(1.3); opacity: 0; }

/* brilho que acompanha a inclinação */
.env-gloss {
  inset: 0; border-radius: 8px; pointer-events: none;
  background: linear-gradient(calc(120deg + var(--mx) * 30deg), rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .22) 48%, rgba(255, 255, 255, 0) 62%);
  z-index: 8;
  mix-blend-mode: soft-light;
  transition: opacity .4s;
}
.envelope.open .env-gloss { opacity: 0; }

/* ---------- Cantos / decoração ---------- */
.corner { position: absolute; top: 0; width: clamp(110px, 30vw, 170px); pointer-events: none; z-index: 1; }
.corner--tl { left: 0; }
.corner--tr { right: 0; width: clamp(80px, 21vw, 120px); }

/* ---------- Convite ---------- */
.invite {
  position: fixed; inset: 0; overflow: hidden;
  opacity: 0; visibility: hidden;
  transition: opacity 1s ease;
}
.invite.show { opacity: 1; visibility: visible; }

.scene-wrap > .layer:not(.scene-layer) { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

.card {
  /* tamanho calculado no script.js para caber inteiro na tela */
  position: absolute; z-index: 1; left: 50%; top: 50%;
  width: var(--cw, 480px);
  transform: translate(-50%, -50%) scale(var(--s, 1));
  transform-origin: 50% 50%;
  padding: 34px 18px 0;
  display: flex; flex-direction: column; align-items: center;
  overflow: hidden;
}
/* ---------- Layout horizontal (computador / tablet deitado) ----------
   Ocupa a tela inteira: cenário à esquerda, convite à direita. */
.card.wide {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  grid-auto-rows: auto;
  justify-items: center; align-content: center;
  column-gap: 30px;
  padding: 56px 70px 0;
}
.card.wide > :not(.deco):not(.scene-wrap) { grid-column: 2; }
.card.wide .scene-wrap {
  grid-column: 1; grid-row: 1 / span 7; align-self: end;
  width: 112%; margin: 0 0 0 -12%;
}
.card.wide .actions { margin-bottom: 64px; max-width: 480px; }
.card.wide .scene {
  -webkit-mask-image: linear-gradient(to right, #000 91%, transparent 100%);
  mask-image: linear-gradient(to right, #000 91%, transparent 100%);
}
.card.wide::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 24%; z-index: 0;
  background: linear-gradient(180deg, rgba(181, 213, 133, 0), rgba(181, 213, 133, .55) 35%, #a9cb76 75%, #94b95e);
}
.card.wide .corner--tl { -webkit-mask-image: linear-gradient(to right, #000 70%, transparent); mask-image: linear-gradient(to right, #000 70%, transparent); }
.card.wide .corner--tr { -webkit-mask-image: linear-gradient(to left, #000 70%, transparent); mask-image: linear-gradient(to left, #000 70%, transparent); }
.card.wide .plaque-wrap { margin-top: 46px; }
.card.wide .plaque { width: 400px; }
.card.wide .name { font-size: 72px; }
.card.wide .age { font-size: 42px; }
.card.wide .plaque-apple { width: 76px; height: 76px; margin-left: -38px; top: -52px; }
.card.wide .plaque-bird { width: 86px; top: -58px; }
.card.wide .headline { font-size: 46px; white-space: nowrap; }
.card.wide .message { font-size: 21px; max-width: 520px; }
.card.wide .big-num { font-size: 82px; }
.card.wide .script-sub { font-size: 36px; }
.card.wide .when-apple { width: 96px; height: 96px; }
.card.wide .place { font-size: 62px; }
.card.wide .countdown { font-size: 14px; }
.card.wide .orb { width: 116px; }
.card.wide .action-label { font-size: 18px; }
.card.wide .corner--tl { width: 270px; }
.card.wide .corner--tr { width: 190px; }
.card.wide .branch--l1 { top: 34%; width: 150px; }
.card.wide .branch--l2, .card.wide .branch--l3 { display: none; }
.card.wide .branch--r { top: 46%; width: 110px; }
.card.wide .butterfly--1 { right: 9%; top: 20%; width: 76px; }

/* parallax */
.layer {
  transform: translate3d(calc(var(--mx) * var(--depth, 0) * 1px), calc(var(--my) * var(--depth, 0) * 1px), 0);
  transition: transform .25s ease-out;
}
.deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.deco .corner { position: absolute; }

.branch { position: absolute; }
.branch--l1 { left: -6px; top: 225px; width: 105px; }
.branch--l2 { left: -4px; top: 590px; width: 70px; }
.branch--l3 { left: -6px; top: 905px; width: 100px; }
.branch--r  { right: -4px; top: 640px; width: 78px; }
.butterfly--1 { position: absolute; right: 18px; top: 250px; width: 64px; animation: flutter 5s ease-in-out infinite; }
.bluebird-fly { position: absolute; right: 7%; top: -4%; width: 70px; z-index: 2; animation: hover 3.2s ease-in-out infinite; }

.sway   { transform-origin: 0 50%; animation: sway 6s ease-in-out infinite; }
.sway-r { transform-origin: 100% 50%; animation: sway 7s ease-in-out infinite reverse; }
.float-slow { animation: hover 7s ease-in-out infinite; }
.bob { animation: bob 2.8s ease-in-out infinite; }
@keyframes sway { 50% { rotate: 4deg; } }
@keyframes hover { 50% { translate: 0 -8px; } }
@keyframes bob { 50% { translate: 0 -6px; rotate: 6deg; } }
@keyframes flutter {
  0%, 100% { translate: 0 0; rotate: 0deg; scale: 1 1; }
  25% { translate: -14px -10px; rotate: -8deg; scale: .85 1; }
  50% { translate: -4px -18px; rotate: 4deg; scale: 1 1; }
  75% { translate: 10px -6px; rotate: 8deg; scale: .85 1; }
}

/* entrada */
.reveal { opacity: 0; transform: translateY(24px) scale(.97); }
.invite.show .reveal {
  animation: rise .9s cubic-bezier(.2, .9, .3, 1.2) forwards;
  animation-delay: calc(.35s + var(--d, 0) * .15s);
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }

/* placa */
.plaque-wrap { position: relative; z-index: 3; margin-top: 30px; perspective: 800px; }
.plaque {
  position: relative;
  width: min(74vw, 330px); aspect-ratio: 1.55;
  border-radius: 46% 46% 44% 44% / 40% 40% 52% 52%;
  background:
    radial-gradient(ellipse at 50% 30%, #f0303b 0%, #c4141f 45%, #860a12 100%);
  box-shadow:
    0 0 0 5px #fff4c4,
    0 0 0 9px var(--gold),
    0 0 0 11px #8a5c10,
    0 0 0 16px #fff,
    0 18px 30px rgba(120, 10, 20, .45),
    inset 0 -10px 24px rgba(60, 0, 5, .45),
    inset 0 10px 18px rgba(255, 160, 160, .35);
  display: grid; place-items: center;
  transform: rotateX(calc(var(--my) * -8deg)) rotateY(calc(var(--mx) * 10deg));
  transition: transform .25s ease-out;
  transform-style: preserve-3d;
}
.plaque::before {
  content: ""; position: absolute; inset: 12px;
  border-radius: inherit; border: 2px solid rgba(255, 225, 150, .65);
}
.plaque-inner { text-align: center; transform: translateZ(30px); }
.name {
  font-family: var(--script); font-weight: 400;
  font-size: clamp(44px, 12.5vw, 58px); white-space: nowrap; line-height: .95; color: #fff;
  text-shadow: 0 1px 0 #f3d9d9, 0 2px 0 #e7c3c3, 0 3px 0 #d6a5a5, 0 6px 10px rgba(60, 0, 0, .5);
}
.age {
  font-family: var(--script); font-size: clamp(28px, 8vw, 38px); color: #fff;
  margin-top: -6px; text-shadow: 0 3px 6px rgba(60,0,0,.5);
}
.plaque-apple {
  position: absolute; left: 50%; top: -42px; width: 64px; height: 64px; margin-left: -32px;
  filter: drop-shadow(0 6px 6px rgba(80, 0, 0, .35)); transform: translateZ(40px);
}
.plaque-bird { position: absolute; top: -48px; width: 72px; filter: drop-shadow(0 6px 6px rgba(0, 40, 90, .25)); animation: hover 3s ease-in-out infinite; }
.plaque-bird--l { left: -16px; transform: scaleX(-1); }
.plaque-bird--r { right: -16px; animation-delay: -1.5s; }
.shine {
  position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none;
}
.shine::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; width: 35%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg);
  animation: shine 5s 2s ease-in-out infinite;
}
@keyframes shine { 0% { left: -60%; } 30%, 100% { left: 130%; } }

/* textos */
.headline {
  position: relative; z-index: 2;
  margin-top: 30px; text-align: center;
  font-family: var(--script2); font-weight: 400;
  font-size: clamp(28px, 8.4vw, 40px); line-height: 1.1;
  background: linear-gradient(180deg, #f4d27a, #c48b1e 60%, #8f6110);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(255,255,255,.9)) drop-shadow(0 3px 3px rgba(120, 80, 0, .25));
}
.message {
  position: relative; z-index: 2;
  margin-top: 10px; text-align: center; font-weight: 600;
  font-size: clamp(16px, 4.6vw, 20px); line-height: 1.4; max-width: 400px;
}

.when { position: relative; z-index: 2; display: flex; align-items: center; gap: 6px; margin-top: 18px; }
.when-block { display: flex; flex-direction: column; align-items: center; }
.big-num {
  font-family: "Poppins", sans-serif; font-weight: 300;
  font-size: clamp(50px, 15vw, 72px); line-height: 1; letter-spacing: -.02em;
  color: #e8323d;
  text-shadow: 0 1px 0 #c8202a, 0 2px 0 #b71a24, 0 3px 0 #a3141d, 0 4px 0 #8e0b14, 0 8px 12px rgba(140, 10, 20, .3);
}
.script-sub { font-family: var(--script); font-size: clamp(24px, 7vw, 34px); color: var(--brown); margin-top: -8px; }
.when-apple { width: clamp(64px, 18vw, 90px); height: clamp(64px, 18vw, 90px); filter: drop-shadow(0 10px 8px rgba(120, 0, 0, .3)); }

.place {
  position: relative; z-index: 2; margin-top: 10px;
  font-family: var(--script2); font-size: clamp(40px, 12vw, 56px); color: var(--blue);
  text-shadow: 0 2px 0 #fff, 0 4px 8px rgba(31, 111, 181, .25);
}

/* contagem regressiva discreta */
.countdown {
  position: relative; z-index: 2; margin-top: 2px;
  display: flex; align-items: baseline; gap: 6px;
  font-size: 13px; font-weight: 600; letter-spacing: .03em;
  color: rgba(90, 58, 34, .7);
}
.countdown b { font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; margin-right: 1px; }
.cd-label { font-family: var(--script2); font-size: 18px; font-weight: 400; margin-right: 2px; }
.cd-sep { color: var(--gold); }
.countdown.done { font-family: var(--script2); font-size: 22px; color: var(--red); }

/* botões */
.actions {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  width: 100%; max-width: 420px; margin-top: 22px;
}
.action { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.orb {
  position: relative; width: clamp(84px, 24vw, 108px); aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #f04a52 0%, #d4202c 50%, #9e0e17 100%);
  box-shadow:
    0 0 0 5px #fff,
    0 0 0 7px rgba(212, 32, 44, .55),
    0 10px 0 2px #7a0911,
    0 18px 22px rgba(120, 10, 20, .35),
    inset 0 -8px 14px rgba(60, 0, 5, .35);
  transition: transform .2s ease, box-shadow .2s ease;
  animation: orbIdle 3.6s ease-in-out infinite;
}
.action:nth-child(2) .orb { animation-delay: -1.2s; }
.action:nth-child(3) .orb { animation-delay: -2.4s; }
@keyframes orbIdle { 50% { translate: 0 -4px; } }
.orb::before {
  content: ""; position: absolute; left: 16%; right: 16%; top: 7%; height: 40%;
  border-radius: 50%; background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,0));
}
.orb svg { width: 52%; height: 52%; position: relative; filter: drop-shadow(0 2px 2px rgba(80,0,0,.4)); }
.action:hover .orb { transform: translateY(-4px) scale(1.04); }
.action:active .orb {
  transform: translateY(8px);
  box-shadow: 0 0 0 5px #fff, 0 0 0 7px rgba(212, 32, 44, .55), 0 2px 0 2px #7a0911, 0 6px 10px rgba(120, 10, 20, .3), inset 0 -8px 14px rgba(60, 0, 5, .35);
}
.action:focus-visible { outline: none; }
.action:focus-visible .orb { outline: 3px dashed var(--gold); outline-offset: 8px; }
.action-label {
  color: #d4202c; font-weight: 700; font-size: clamp(14px, 3.9vw, 17px); line-height: 1.1; text-align: center;
  text-shadow: 0 1px 0 #fff;
}

/* cenário */
.scene-wrap { position: relative; width: calc(100% + 36px); margin-top: 26px; z-index: 1; }
.scene { width: 100%; filter: drop-shadow(0 -4px 10px rgba(0,0,0,.08)); }
.butterfly--2 { position: absolute; left: 22%; top: 12%; width: 48px; z-index: 2; animation: flutter 6s -2s ease-in-out infinite; }

/* partículas */
.particles { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.petal {
  position: absolute; top: -30px;
  width: 12px; height: 10px; border-radius: 70% 0 70% 0;
  background: linear-gradient(135deg, #ff6b74, #b3121b);
  opacity: .8;
  animation: fall linear infinite;
}
.sparkle {
  position: absolute; width: 6px; height: 6px; border-radius: 50%;
  background: radial-gradient(circle, #fff9d6, #f0c75a 60%, transparent 70%);
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes fall {
  0% { transform: translate(0, -5vh) rotate(0); }
  100% { transform: translate(var(--sx, 40px), 110vh) rotate(720deg); }
}
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1.3); } }

/* ---------- Modais ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 18px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(40, 10, 15, .45); backdrop-filter: blur(4px); animation: fadeIn .3s ease; }
.modal-card {
  position: relative; width: min(100%, 420px); max-height: 90svh; overflow: auto;
  background: var(--cream); border-radius: 24px; padding: 40px 22px 24px; text-align: center;
  box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--gold), 0 30px 60px rgba(60, 0, 10, .35);
  animation: pop .45s cubic-bezier(.2, 1.3, .4, 1);
}
.modal-apple { position: absolute; left: 50%; top: -26px; width: 52px; height: 52px; margin-left: -26px; filter: drop-shadow(0 4px 4px rgba(0,0,0,.25)); }
.modal-close { position: absolute; right: 10px; top: 8px; width: 38px; height: 38px; font-size: 28px; color: var(--red-dark); border-radius: 50%; }
.modal-close:hover { background: rgba(212, 32, 44, .08); }
.modal-card h3 { font-family: var(--script2); font-weight: 400; font-size: 36px; color: var(--red); line-height: 1.1; }
.modal-sub { margin-top: 6px; font-weight: 600; font-size: 15px; }
.modal-sub.small { font-size: 13px; opacity: .75; }
@keyframes pop { from { opacity: 0; transform: translateY(30px) scale(.9); } }
@keyframes fadeIn { from { opacity: 0; } }

.form { display: grid; gap: 12px; margin-top: 18px; text-align: left; }
.form label { display: grid; gap: 4px; font-weight: 700; font-size: 14px; }
.form small { font-weight: 500; opacity: .7; }
.form input[type="text"], .form input[type="number"], .form textarea {
  font: inherit; font-weight: 600; padding: 11px 14px; border-radius: 12px;
  border: 2px solid #f0dcc0; background: #fff; color: var(--brown); outline: none; resize: none;
}
.form input:focus, .form textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 169, 58, .2); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice label { display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: block; text-align: center; padding: 10px 6px; border-radius: 12px;
  border: 2px solid #f0dcc0; background: #fff; font-weight: 700; font-size: 14px; cursor: pointer;
  transition: all .2s;
}
.choice input:checked + span { border-color: var(--red); background: #fff0f0; color: var(--red); }
.choice input:focus-visible + span { outline: 2px dashed var(--gold); outline-offset: 2px; }
.form-error { color: var(--red); font-weight: 700; font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: 999px; font-weight: 700; text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(3px); }
.btn--primary { background: linear-gradient(180deg, #ea3440, #b3121b); color: #fff; box-shadow: 0 4px 0 #7a0911, 0 8px 16px rgba(120,10,20,.3); }
.btn--blue { background: linear-gradient(180deg, #3aa0f0, #1f6fb5); color: #fff; box-shadow: 0 4px 0 #154f82, 0 8px 16px rgba(20,70,130,.3); }
.btn--ghost { border: 2px solid var(--gold); color: var(--brown); background: #fff; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }

.thanks { margin-top: 16px; display: grid; gap: 12px; justify-items: center; font-weight: 600; }
.thanks-title { font-family: var(--script); font-size: 54px; color: var(--red); line-height: 1; }

.map-frame { margin-top: 14px; border-radius: 16px; overflow: hidden; aspect-ratio: 4 / 3; box-shadow: inset 0 0 0 2px #f0dcc0; background: #eef4f9; }
.map-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.gift-list { list-style: none; margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.gift-list li {
  display: flex; gap: 8px; align-items: center; padding: 9px 10px; font-size: 14px;
  background: #fff; border-radius: 14px; border: 2px solid #f6e6cc; font-weight: 600;
  opacity: 0; animation: rise .5s ease forwards; transform: translateY(10px);
}
.gift-list .gi { font-size: 26px; flex: none; }
.gift-list small { display: block; font-weight: 500; opacity: .7; font-size: 13px; }
.pix {
  margin-top: 18px; padding-top: 16px; border-top: 2px dashed #f0dcc0;
  display: grid; gap: 8px; justify-items: center; font-weight: 600;
}
.pix-title { font-family: var(--script2); font-weight: 400; font-size: 26px; color: var(--red); line-height: 1.1; }
.pix-sub { font-size: 13px; opacity: .75; }
.pix-qr {
  width: 190px; aspect-ratio: 1; padding: 10px; border-radius: 16px; background: #fff;
  box-shadow: 0 0 0 3px var(--gold), 0 10px 20px rgba(120, 80, 0, .18);
}
.pix-qr svg { width: 100%; height: 100%; display: block; }
.pix-key { font-size: 14px; word-break: break-all; }
.pix .btn-row { width: 100%; margin-top: 6px; }
.pix .btn { padding: 12px 10px; font-size: 14px; }
.route-hint { margin-top: 14px; font-size: 13px; font-weight: 600; opacity: .75; }
.route-hint + .btn-row { margin-top: 8px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  transform: translate(-50%, 40px); opacity: 0;
  background: #3a1d10; color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px;
  transition: all .3s ease; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* confete */
.confetti { position: fixed; z-index: 70; width: 9px; height: 14px; pointer-events: none; top: -20px; animation: confetti 2.4s ease-in forwards; }
@keyframes confetti { to { transform: translate(var(--cx), 110vh) rotate(var(--cr)); } }

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

/* ao abrir o envelope, os textos da tela saem de cena */
.envelope-kicker, .envelope-hint { transition: opacity .4s ease; }
.envelope-screen:has(.envelope.open) .envelope-kicker,
.envelope-screen:has(.envelope.open) .envelope-hint { opacity: 0; }

/* aviso educado sobre acompanhantes */
.notice {
  position: relative; z-index: 2;
  max-width: 340px; margin-top: 8px; text-align: center;
  font-size: 12px; font-weight: 600; line-height: 1.35; font-style: italic;
  color: rgba(90, 58, 34, .72);
}
.card.wide .notice { font-size: 13.5px; max-width: 440px; }
.form-note { font-size: 12px; font-weight: 600; font-style: italic; opacity: .75; text-align: center; }
.thanks-sub { font-family: var(--script2); font-size: 26px; color: var(--red); }
.btn[disabled] { opacity: .65; pointer-events: none; }

/* Pix: só a chave para copiar */
.pix-card {
  width: 100%; display: grid; gap: 2px; justify-items: center;
  padding: 12px 14px; border-radius: 14px; background: #fff;
  border: 2px dashed var(--gold);
}
.pix-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.pix-card .pix-key { font-size: 22px; color: var(--red); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.pix .pix-btn { width: 100%; margin-top: 4px; font-size: 15px; padding: 13px 16px; }
