:root {
  --accent-rgb: 208,174,104;
  --accent-light-rgb: 239,215,157;
  --ink: #07131f;
  --ink-soft: #0b1d2b;
  --petrol: #0b5155;
  --petrol-light: #1d7775;
  --gold: #d0ae68;
  --gold-light: #efd79d;
  --gold-deep: #a67e3c;
  --berry: #8e335e;
  --ivory: #fbf8ef;
  --white: #fff;
  --muted: rgba(239, 244, 242, 0.67);
  --line: rgba(218, 190, 127, 0.22);
  --panel: rgba(9, 27, 39, 0.72);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.2, 1.3, 0.35, 1);
  color-scheme: dark;
}

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

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--ink);
  color: var(--ivory);
  font-family: Inter, "Avenir Next", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
  font: inherit;
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

[hidden],
.hidden {
  display: none !important;
}

.ambient-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% -20%, rgba(25, 91, 91, 0.3), transparent 42%),
    linear-gradient(155deg, #06111d 0%, #091b28 48%, #07131f 100%);
}

.ambient-orb {
  position: absolute;
  width: min(54rem, 72vw);
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  transform: translate3d(0, 0, 0);
  animation: ambientDrift 18s ease-in-out infinite alternate;
}

.ambient-orb--petrol {
  top: -32%;
  left: -15%;
  background: #147e79;
}

.ambient-orb--gold {
  right: -28%;
  bottom: -45%;
  background: #9d7435;
  animation-delay: -6s;
}

.ambient-orb--berry {
  width: min(38rem, 55vw);
  top: 42%;
  left: 38%;
  background: #812c58;
  opacity: 0.12;
  animation-delay: -12s;
}

body[data-variant="male"] .ambient-orb--petrol {
  opacity: .3;
  background: #1c80a0;
}

body[data-variant="female"] .ambient-orb--berry {
  opacity: .25;
  background: #b33f71;
}

body[data-variant="female"] .reveal-gate {
  background:
    radial-gradient(circle at 50% 52%, rgba(151, 44, 91, .2), transparent 34%),
    linear-gradient(145deg, rgba(5, 16, 27, .98), rgba(35, 10, 29, .97));
}

body[data-variant="female"] .celebration-mark {
  border-color: rgba(210, 112, 151, .35);
  box-shadow: 0 0 38px rgba(179, 63, 113, .13);
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(circle at center, #000, transparent 82%);
}

.ambient-noise {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  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='.9'/%3E%3C/svg%3E");
  pointer-events: none;
}

@keyframes ambientDrift {
  to { transform: translate3d(8%, 5%, 0) scale(1.12); }
}

#particles-canvas,
.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#particles-canvas { z-index: 1; }
.confetti-canvas { z-index: 5000; }

.eyebrow,
.card-eyebrow {
  color: var(--gold-light);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Personal reveal gate */
.reveal-gate {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 6rem 1.5rem 3rem;
  background:
    radial-gradient(circle at 50% 52%, rgba(21, 102, 100, 0.18), transparent 33%),
    linear-gradient(145deg, rgba(5, 16, 27, .98), rgba(7, 27, 37, .97));
  isolation: isolate;
}

.reveal-gate::before,
.reveal-gate::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  pointer-events: none;
}

.reveal-gate::before {
  background: conic-gradient(from 90deg at 50% 50%, transparent 0 18%, rgba(var(--accent-rgb), .045) 21%, transparent 24% 43%, rgba(31, 119, 117, .06) 48%, transparent 53% 100%);
  animation: gateTurn 26s linear infinite;
}

.reveal-gate::after {
  background-image: radial-gradient(circle, rgba(var(--accent-light-rgb), .44) 0 1px, transparent 1.8px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, #000 0, transparent 65%);
  opacity: .36;
  animation: gateStars 8s ease-in-out infinite alternate;
}

@keyframes gateTurn { to { transform: rotate(360deg); } }
@keyframes gateStars { to { opacity: .7; transform: scale(1.035); } }

.reveal-gate__brand {
  position: absolute;
  top: clamp(1.5rem, 5vh, 3rem);
  left: 50%;
  width: clamp(155px, 19vw, 220px);
  height: auto;
  transform: translateX(-50%);
  filter: brightness(0) invert(1);
  opacity: .62;
}

.reveal-gate__halo {
  position: absolute;
  top: 51%;
  left: 50%;
  width: min(42rem, 86vw);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(var(--accent-rgb), .08);
  border-radius: 50%;
  box-shadow:
    0 0 0 5rem rgba(var(--accent-rgb), .018),
    0 0 0 10rem rgba(var(--accent-rgb), .012);
}

.reveal-gate__content {
  position: relative;
  z-index: 2;
  width: min(100%, 680px);
  text-align: center;
  animation: gateContentIn 1s var(--ease-out) both;
}

@keyframes gateContentIn {
  from { opacity: 0; transform: translateY(24px); }
}

.reveal-gate__title {
  margin-top: .7rem;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 9vw, 6.5rem);
  font-weight: 400;
  letter-spacing: -.055em;
  line-height: .95;
}

.reveal-gate__title span {
  display: inline;
  color: var(--gold-light);
  text-shadow: 0 0 40px rgba(var(--accent-rgb), .18);
}

.reveal-gate__copy {
  margin: 1.25rem auto 2.35rem;
  color: var(--muted);
  font-size: clamp(.95rem, 2vw, 1.08rem);
  letter-spacing: .02em;
}

.reveal-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  border: 0;
  background: none;
  color: var(--ivory);
  cursor: pointer;
}

.reveal-button:focus-visible {
  outline: none;
}

.reveal-button:focus-visible .reveal-orb__egg {
  filter:
    drop-shadow(0 22px 20px rgba(0,0,0,.4))
    drop-shadow(0 0 24px rgba(var(--accent-light-rgb),.5));
}

.reveal-orb {
  position: relative;
  display: block;
  width: clamp(170px, 23vw, 212px);
  aspect-ratio: 460 / 471;
  margin: 1.15rem 2rem 3.5rem;
  transition: transform .55s var(--ease-spring), filter .5s ease;
}

.reveal-orb::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 10% -8% 1%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-light-rgb),.38), rgba(var(--accent-rgb),.14) 43%, transparent 72%);
  filter: blur(11px);
  animation: eggGlow 2.6s ease-in-out infinite;
}

.reveal-orb::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: 12%;
  left: 27%;
  width: 12%;
  height: 29%;
  transform: rotate(23deg);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.42), transparent);
  filter: blur(3px);
  opacity: .35;
  pointer-events: none;
  animation: eggHighlight 2.9s ease-in-out infinite;
}

.reveal-button:hover .reveal-orb {
  transform: translateY(-7px) scale(1.045);
  filter: brightness(1.045);
}

.reveal-button:active .reveal-orb {
  transform: translateY(-2px) scale(.98);
}

.reveal-orb__egg {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 78%;
  filter:
    drop-shadow(0 20px 18px rgba(0,0,0,.38))
    drop-shadow(0 0 13px rgba(var(--accent-light-rgb),.22));
  animation: eggShake 3.25s ease-in-out infinite;
  transition: filter .35s ease;
}

.reveal-button:hover .reveal-orb__egg {
  filter:
    drop-shadow(0 24px 22px rgba(0,0,0,.42))
    drop-shadow(0 0 23px rgba(var(--accent-light-rgb),.46));
  animation-duration: .85s;
}

@keyframes eggShake {
  0%, 52%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  57% { transform: translate3d(-4px, 0, 0) rotate(-5.5deg); }
  62% { transform: translate3d(4px, -1px, 0) rotate(5deg); }
  67% { transform: translate3d(-3px, 0, 0) rotate(-4deg); }
  72% { transform: translate3d(3px, -1px, 0) rotate(3.5deg); }
  77% { transform: translate3d(-1px, 0, 0) rotate(-1.6deg); }
  82% { transform: translate3d(0, 0, 0) rotate(0); }
}

@keyframes eggGlow {
  0%, 100% { opacity: .5; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes eggHighlight {
  0%, 100% { opacity: .2; transform: translateX(-5px) rotate(23deg); }
  50% { opacity: .62; transform: translateX(7px) rotate(23deg); }
}

.reveal-orb__ring {
  position: absolute;
  z-index: 1;
  inset: -15px;
  border: 1px solid rgba(var(--accent-light-rgb), .22);
  border-radius: 50%;
  animation: ringPulse 2.8s ease-out infinite;
}

.reveal-orb__ring--two {
  inset: -31px;
  animation-delay: 1.4s;
}

@keyframes ringPulse {
  0% { opacity: 0; transform: scale(.82); }
  25% { opacity: .65; }
  100% { opacity: 0; transform: scale(1.18); }
}

.reveal-orb__spark {
  position: absolute;
  z-index: 4;
  width: 7px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gold-light);
  box-shadow: 0 0 16px var(--gold-light);
  animation: sparkFloat 3s ease-in-out infinite;
}

.reveal-orb__spark--one { top: 2%; left: 5%; }
.reveal-orb__spark--two { right: -7%; bottom: 21%; animation-delay: -1.4s; transform: scale(.65); }

@keyframes sparkFloat {
  50% { opacity: .35; transform: translateY(-8px) scale(.7); }
}

.reveal-button__label {
  position: relative;
  color: var(--ivory);
  font-size: clamp(1.02rem, 2.5vw, 1.18rem);
  font-weight: 800;
  letter-spacing: .075em;
  text-shadow: 0 0 18px rgba(var(--accent-light-rgb),.28), 0 2px 10px rgba(0,0,0,.45);
}

.reveal-button__label::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(.35);
  transition: transform .35s ease;
}

.reveal-button:hover .reveal-button__label::after { transform: scaleX(1); }

.reveal-button__hint {
  margin-top: .9rem;
  padding: .42rem .8rem;
  border: 1px solid rgba(var(--accent-light-rgb),.2);
  border-radius: 999px;
  background: rgba(var(--accent-rgb),.075);
  color: rgba(var(--accent-light-rgb),.82);
  box-shadow: 0 7px 24px rgba(0,0,0,.13), inset 0 1px 0 rgba(255,255,255,.04);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  animation: tapHintPulse 2.6s ease-in-out infinite;
}

@keyframes tapHintPulse {
  0%, 100% { opacity: .72; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

.reveal-gate__flash {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 50%;
  background: #fff7dd;
  box-shadow: 0 0 120px 80px rgba(var(--accent-light-rgb), .8);
  opacity: 0;
  pointer-events: none;
}

.reveal-gate.opening .reveal-gate__content {
  animation: gateContentOut 1.45s var(--ease-out) forwards;
}

.reveal-gate.opening .reveal-orb {
  animation: orbOpen 1.95s var(--ease-out) forwards;
}

.reveal-gate.opening .reveal-gate__flash {
  animation: gateFlash 2.35s .45s var(--ease-out) forwards;
}

.reveal-gate.opening {
  animation: gateLeave 1s 2.3s ease forwards;
}

@keyframes gateContentOut {
  35% { transform: scale(.96); opacity: 1; }
  100% { transform: scale(1.15); opacity: 0; }
}

@keyframes orbOpen {
  0% { transform: scale(1); }
  38% { transform: scale(.82); }
  100% { transform: scale(5.5); opacity: 0; }
}

@keyframes gateFlash {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(150); }
}

@keyframes gateLeave { to { opacity: 0; visibility: hidden; } }

/* Main greeting */
.main-container {
  --viewport-gap: clamp(.65rem, 2.2vmin, 2rem);
  position: relative;
  z-index: 10;
  display: grid;
  width: 100%;
  height: 100svh;
  height: 100dvh;
  min-height: 0;
  align-items: center;
  align-items: safe center;
  justify-items: center;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: var(--viewport-gap);
  perspective: 1400px;
  scrollbar-gutter: stable both-edges;
}

.birthday-card {
  position: relative;
  width: min(100%, 860px);
  overflow: hidden;
  padding: clamp(2.4rem, 6vw, 5.2rem) clamp(1.5rem, 7vw, 5.8rem) clamp(2.2rem, 5vw, 4rem);
  border: 1px solid rgba(218, 190, 127, .28);
  border-radius: clamp(1.5rem, 4vw, 2.5rem);
  background:
    linear-gradient(145deg, rgba(16, 46, 57, .76), rgba(7, 23, 35, .88)),
    rgba(9, 29, 39, .78);
  box-shadow:
    0 40px 110px rgba(0, 0, 0, .38),
    0 1px 0 rgba(255,255,255,.08) inset,
    0 0 90px rgba(25, 106, 102, .06);
  text-align: center;
  transform: translateY(54px) rotateX(6deg) scale(.96);
  opacity: 0;
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
}

.birthday-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border: 1px solid rgba(255,255,255,.035);
  border-radius: inherit;
  pointer-events: none;
}

.birthday-card__glow {
  position: absolute;
  top: -18rem;
  left: 50%;
  width: 36rem;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb),.14), transparent 66%);
  pointer-events: none;
}

.birthday-card__corner {
  position: absolute;
  width: 8rem;
  aspect-ratio: 1;
  border: solid rgba(var(--accent-rgb),.18);
  pointer-events: none;
}

.birthday-card__corner--top {
  top: 1.25rem;
  right: 1.25rem;
  border-width: 1px 1px 0 0;
  border-radius: 0 1.2rem 0 0;
}

.birthday-card__corner--bottom {
  bottom: 1.25rem;
  left: 1.25rem;
  border-width: 0 0 1px 1px;
  border-radius: 0 0 0 1.2rem;
}

.celebration-mark {
  position: relative;
  display: grid;
  width: 5.25rem;
  aspect-ratio: 1;
  place-items: center;
  margin: 0 auto 1.25rem;
  border: 1px solid rgba(var(--accent-rgb),.28);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, rgba(255,255,255,.09), rgba(var(--accent-rgb),.045));
  box-shadow: 0 0 35px rgba(var(--accent-rgb),.08);
}

.celebration-mark::before,
.celebration-mark::after {
  content: "";
  position: absolute;
  inset: -.55rem;
  border: 1px solid rgba(var(--accent-rgb),.08);
  border-radius: 50%;
}

.celebration-mark::after { inset: -1rem; opacity: .45; }

.celebration-mark svg {
  width: 68%;
  fill: none;
  stroke: var(--gold-light);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.celebration-mark .celebration-mark__soft { fill: rgba(var(--accent-rgb),.1); }
.celebration-mark .celebration-mark__flame { fill: var(--gold-light); stroke-width: .8; }

.celebration-mark--cake {
  width: clamp(9.5rem, 24vw, 12.5rem);
  aspect-ratio: auto;
  margin: -.65rem auto .9rem;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

body[data-variant="male"] .celebration-mark--cake,
body[data-variant="female"] .celebration-mark--cake {
  border-color: transparent;
  box-shadow: none;
}

.celebration-mark--cake::before {
  z-index: -1;
  inset: 16% 2% 3%;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb),.22), rgba(var(--accent-rgb),.06) 46%, transparent 72%);
  filter: blur(12px);
}

.celebration-mark--cake::after { display: none; }

.celebration-mark--cake img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 18px rgba(0,0,0,.3)) drop-shadow(0 0 14px rgba(var(--accent-light-rgb),.08));
  animation: cakeFloat 5s ease-in-out infinite;
}

@keyframes cakeFloat {
  0%, 100% { transform: translateY(0) rotate(-.35deg); }
  50% { transform: translateY(-5px) rotate(.35deg) scale(1.012); }
}

.card-eyebrow { margin-bottom: .85rem; }

.birthday-title {
  position: relative;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5.2vw, 3.65rem);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1.06;
}

.birthday-title > span:first-child { display: block; }

.birthday-title .name {
  display: inline-block;
  margin-top: .18em;
  color: var(--gold-light);
  font-size: 1.16em;
  font-style: italic;
  overflow-wrap: anywhere;
  text-shadow: 0 0 32px rgba(var(--accent-rgb),.17);
}

.title-mark {
  color: var(--gold-light);
  font-style: italic;
}

.gold-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .8rem;
  width: min(100%, 13rem);
  margin: clamp(1.5rem, 4vw, 2.25rem) auto;
}

.gold-divider span {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb),.55));
}

.gold-divider span:last-child { transform: scaleX(-1); }

.gold-divider svg {
  width: 1rem;
  fill: var(--gold);
  filter: drop-shadow(0 0 8px rgba(var(--accent-rgb),.4));
}

.birthday-subtitle {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: clamp(1.1rem, 3vw, 1.55rem) clamp(1.15rem, 4vw, 2.15rem);
  border: 1px solid rgba(var(--accent-light-rgb),.18);
  border-radius: clamp(1rem, 2.5vw, 1.35rem);
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb),.09), rgba(255,255,255,.025)),
    rgba(5,20,30,.22);
  box-shadow:
    0 18px 44px rgba(0,0,0,.13),
    inset 0 1px 0 rgba(255,255,255,.045);
  color: rgba(251,248,239,.94);
  font-size: clamp(1.08rem, 2.6vw, 1.32rem);
  font-weight: 440;
  letter-spacing: .008em;
  line-height: 1.68;
  text-wrap: pretty;
}

.birthday-subtitle::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18%;
  width: 64%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-light-rgb),.72), transparent);
  box-shadow: 0 0 14px rgba(var(--accent-rgb),.28);
}

.birthday-greeting {
  position: relative;
  display: inline-block;
  margin: 2rem auto .2rem;
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.03rem, 2.4vw, 1.22rem);
  font-style: italic;
  line-height: 1.6;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  margin-top: 2.4rem;
}

.surprise-btn,
.share-btn {
  position: relative;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  overflow: hidden;
  padding: .85rem 1.45rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: .83rem;
  font-weight: 700;
  letter-spacing: .035em;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.surprise-btn {
  border: 1px solid rgba(var(--accent-light-rgb),.6);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #11202b;
  box-shadow: 0 10px 30px rgba(var(--accent-rgb),.15);
}

.share-btn {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.035);
  color: rgba(244,246,241,.72);
}

.surprise-btn svg,
.share-btn svg {
  width: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.75;
}

.surprise-btn:hover,
.share-btn:hover {
  transform: translateY(-3px);
}

.surprise-btn:hover { box-shadow: 0 15px 38px rgba(var(--accent-rgb),.28); }
.share-btn:hover { border-color: rgba(var(--accent-rgb),.38); color: var(--gold-light); }

.btn-shine {
  position: absolute;
  top: -50%;
  left: -45%;
  width: 24%;
  height: 200%;
  transform: rotate(22deg);
  background: rgba(255,255,255,.38);
  filter: blur(7px);
  animation: buttonShine 4s ease-in-out infinite;
}

@keyframes buttonShine {
  0%, 60% { left: -45%; }
  90%, 100% { left: 125%; }
}

.experience-open .birthday-card {
  animation: cardReveal 1.15s .05s var(--ease-out) forwards;
}

.experience-open .celebration-mark,
.experience-open .card-eyebrow,
.experience-open .birthday-title,
.experience-open .gold-divider,
.experience-open .birthday-subtitle,
.experience-open .birthday-greeting,
.experience-open .card-actions {
  animation: detailReveal .8s var(--ease-out) both;
}

.experience-open .celebration-mark { animation-delay: .5s; }
.experience-open .card-eyebrow { animation-delay: .62s; }
.experience-open .birthday-title { animation-delay: .7s; }
.experience-open .gold-divider { animation-delay: .8s; }
.experience-open .birthday-subtitle { animation-delay: .88s; }
.experience-open .birthday-greeting { animation-delay: .96s; }
.experience-open .card-actions { animation-delay: 1.05s; }

@keyframes cardReveal { to { opacity: 1; transform: none; } }
@keyframes detailReveal {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

/* Celebration effects */
.floating-elements,
.wish-burst {
  position: fixed;
  inset: 0;
  z-index: 110;
  overflow: hidden;
  pointer-events: none;
}

.celebration-flight {
  position: fixed;
  inset: 0;
  z-index: 4900;
  overflow: hidden;
  pointer-events: none;
}

.celebration-flyer {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--fly-size, 110px);
  height: auto;
  max-height: 180px;
  object-fit: contain;
  opacity: 0;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .42));
  will-change: transform, opacity;
  animation: celebrationFly var(--fly-time, 6s) var(--fly-delay, 0s) cubic-bezier(.22,.7,.18,1) forwards;
}

.celebration-flyer--logo {
  width: var(--fly-size, 132px);
  max-height: 62px;
  filter: brightness(0) invert(1) drop-shadow(0 7px 14px rgba(0, 0, 0, .45)) drop-shadow(0 0 12px rgba(var(--accent-rgb), .24));
}

.celebration-flyer--bottle { max-height: 165px; }
.celebration-flyer--crate { max-height: 115px; }
.celebration-flyer--rose { max-height: 125px; }
.celebration-flyer--gift { max-height: 145px; }
.celebration-flyer--portrait { max-height: 150px; }
.celebration-flyer--landmark { max-height: 145px; }
.celebration-flyer--sport { max-height: 135px; }
.celebration-flyer--heart { max-height: 125px; }
.celebration-flyer--food { max-height: 150px; }
.celebration-flyer--mug { max-height: 140px; }

@keyframes celebrationFly {
  0% {
    opacity: 0;
    transform: translate3d(var(--fly-start-x), var(--fly-start-y), 0) rotate(var(--fly-rotate-start)) scale(.58);
  }
  9% { opacity: .96; }
  42% {
    opacity: 1;
    transform: translate3d(var(--fly-mid-x), var(--fly-mid-y), 0) rotate(var(--fly-rotate-mid)) scale(1.06);
  }
  84% { opacity: .9; }
  100% {
    opacity: 0;
    transform: translate3d(var(--fly-end-x), var(--fly-end-y), 0) rotate(var(--fly-rotate-end)) scale(.76);
  }
}

.floating-element {
  position: absolute;
  bottom: -4rem;
  display: block;
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(.8rem, 1.8vw, 1rem);
  font-style: italic;
  letter-spacing: .08em;
  opacity: 0;
  text-shadow: 0 3px 14px rgba(0,0,0,.45);
  animation: floatWish var(--float-time, 6s) linear forwards;
}

@keyframes floatWish {
  0% { opacity: 0; transform: translate3d(0,0,0) rotate(-3deg); }
  12% { opacity: .72; }
  82% { opacity: .45; }
  100% { opacity: 0; transform: translate3d(var(--drift, 30px), -110vh, 0) rotate(4deg); }
}

.wish-word {
  position: absolute;
  left: var(--x);
  top: var(--y);
  color: var(--gold-light);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(.82rem, 2vw, 1.1rem);
  font-style: italic;
  white-space: nowrap;
  text-shadow: 0 4px 20px rgba(0,0,0,.55);
  animation: wishWord 1.9s var(--ease-out) forwards;
}

@keyframes wishWord {
  0% { opacity: 0; transform: translate(-50%,-50%) scale(.55); }
  24% { opacity: .95; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1.08); }
}

/* Generator */
.generator-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(1.25rem, 5vh, 4rem) 1rem;
  background:
    radial-gradient(circle at 50% 0, rgba(22,105,101,.18), transparent 34rem),
    rgba(5, 16, 26, .96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: modalFade .35s ease both;
}

.generator-modal--nested { z-index: 3600; align-items: center; }

@keyframes modalFade { from { opacity: 0; } }

.generator-modal-card {
  position: relative;
  width: min(100%, 690px);
  overflow: hidden;
  padding: clamp(1.5rem, 5vw, 3rem);
  border: 1px solid rgba(218,190,127,.23);
  border-radius: clamp(1.4rem, 3vw, 2rem);
  background: linear-gradient(155deg, rgba(15,43,53,.94), rgba(7,24,35,.96));
  box-shadow: 0 40px 120px rgba(0,0,0,.48), 0 1px 0 rgba(255,255,255,.06) inset;
  animation: modalCardIn .65s var(--ease-out) both;
}

.generator-modal-card--compact { max-width: 540px; overflow: visible; }

@keyframes modalCardIn {
  from { opacity: 0; transform: translateY(26px) scale(.975); }
}

.generator-modal-accent {
  position: absolute;
  top: -13rem;
  left: 50%;
  width: 32rem;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--accent-rgb),.12), transparent 65%);
  pointer-events: none;
}

.generator-modal-header {
  position: relative;
  margin-bottom: 2rem;
  text-align: center;
}

.generator-modal-mark {
  display: grid;
  width: 3.5rem;
  aspect-ratio: 1;
  place-items: center;
  margin: 0 auto 1.1rem;
  border: 1px solid rgba(var(--accent-rgb),.35);
  border-radius: 50%;
  background: rgba(var(--accent-rgb),.06);
  color: var(--gold-light);
  font-size: 1.4rem;
}

.generator-modal-mark svg {
  width: 1.5rem;
  fill: none;
  stroke: var(--gold-light);
  stroke-linecap: round;
  stroke-width: 1.5;
}

.generator-modal-mark--egg {
  width: 4.15rem;
  aspect-ratio: auto;
  margin-bottom: .85rem;
  border: 0;
  border-radius: 0;
  background: none;
  filter: drop-shadow(0 9px 12px rgba(0,0,0,.3)) drop-shadow(0 0 12px rgba(var(--accent-light-rgb),.1));
}

.generator-modal-mark--egg img {
  display: block;
  width: 100%;
  height: auto;
  transform: rotate(-1.5deg);
}

.generator-modal-mark--magic { font-size: 1.6rem; }

.generator-modal-title {
  margin: .55rem auto .65rem;
  color: var(--ivory);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 5vw, 2.65rem);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.generator-modal-subtitle {
  max-width: 500px;
  margin: 0 auto;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.65;
}

.form-section {
  position: relative;
  padding: 1.35rem 0;
  border-top: 1px solid rgba(255,255,255,.07);
}

.form-section__heading {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  margin-bottom: 1.1rem;
}

.form-section__number {
  display: grid;
  flex: 0 0 2rem;
  height: 2rem;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb),.27);
  border-radius: 50%;
  color: var(--gold);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .06em;
}

.form-section__heading h2 {
  color: rgba(251,248,239,.9);
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: .025em;
}

.form-section__heading p {
  margin-top: .18rem;
  color: rgba(239,244,242,.42);
  font-size: .75rem;
  line-height: 1.4;
}

.form-toggle {
  display: flex;
  gap: .35rem;
  margin-bottom: .85rem;
  padding: .3rem;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: .9rem;
  background: rgba(0,0,0,.16);
}

.form-toggle-btn {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .7rem 1rem;
  border: 0;
  border-radius: .65rem;
  background: transparent;
  color: rgba(239,244,242,.52);
  cursor: pointer;
  font-size: .84rem;
  font-weight: 700;
  transition: .25s ease;
}

.form-toggle-btn:hover { color: var(--gold-light); }

.form-toggle-btn.active {
  background: linear-gradient(135deg, rgba(var(--accent-rgb),.95), rgba(var(--accent-light-rgb),.95));
  color: #13232e;
  box-shadow: 0 4px 18px rgba(var(--accent-rgb),.13);
}

.form-toggle-icon { font-size: .9rem; }

.variant-field {
  margin: 1rem 0;
}

.variant-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
}

.variant-toggle-btn {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: .65rem;
  padding: .72rem;
  border: 1px solid rgba(255,255,255,.085);
  border-radius: .85rem;
  background: rgba(255,255,255,.025);
  color: rgba(239,244,242,.62);
  cursor: pointer;
  text-align: left;
  transition: border-color .22s ease, background .22s ease, color .22s ease, transform .22s ease;
}

.variant-toggle-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb),.28);
  color: var(--ivory);
}

.variant-toggle-btn__icon {
  display: grid;
  flex: 0 0 2.2rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(var(--accent-rgb),.24);
  border-radius: 50%;
  color: var(--gold-light);
  background: rgba(var(--accent-rgb),.05);
}

.variant-toggle-btn__icon svg {
  width: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.variant-toggle-btn strong,
.variant-toggle-btn small {
  display: block;
}

.variant-toggle-btn strong {
  font-size: .78rem;
  font-weight: 750;
}

.variant-toggle-btn small {
  margin-top: .16rem;
  color: rgba(239,244,242,.34);
  font-size: .61rem;
  font-weight: 500;
  line-height: 1.25;
}

.variant-toggle-btn.active {
  border-color: rgba(var(--accent-rgb),.48);
  background: linear-gradient(145deg, rgba(var(--accent-rgb),.12), rgba(var(--accent-rgb),.045));
  color: var(--gold-light);
  box-shadow: 0 7px 24px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.06);
}

.variant-toggle-btn.active .variant-toggle-btn__icon {
  border-color: rgba(var(--accent-light-rgb),.6);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #11212c;
}

.effects-field {
  margin: .15rem 0 1rem;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 1rem;
  background: linear-gradient(145deg, rgba(255,255,255,.032), rgba(0,0,0,.08));
}

.effects-field__header {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem;
  border: 0;
  border-radius: 1rem;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.effects-field__header .field-label { margin-bottom: .22rem; }

.effects-field__header:disabled { cursor: default; }
.effects-field__header:hover:not(:disabled) { background: rgba(var(--accent-rgb),.045); }

#effects-summary {
  display: block;
  color: var(--muted);
  font-size: .66rem;
  line-height: 1.35;
}

.effects-field__chevron {
  flex: 0 0 1.1rem;
  width: 1.1rem;
  fill: none;
  stroke: var(--gold-light);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
}

.effects-field__header[aria-expanded="true"] .effects-field__chevron { transform: rotate(180deg); }
.effects-field__header:disabled .effects-field__chevron { opacity: .3; }

#effects-panel { padding: 0 .85rem .85rem; }

.effects-panel__intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .7rem;
}

.effects-panel__intro p {
  color: var(--muted);
  font-size: .66rem;
  line-height: 1.4;
}

.effects-clear {
  flex: 0 0 auto;
  padding: .38rem .56rem;
  border: 1px solid rgba(var(--accent-rgb),.2);
  border-radius: .55rem;
  background: rgba(var(--accent-rgb),.045);
  color: var(--gold-light);
  cursor: pointer;
  font-size: .66rem;
  font-weight: 700;
  transition: border-color .2s ease, background .2s ease, opacity .2s ease;
}

.effects-clear:hover:not(:disabled) {
  border-color: rgba(var(--accent-rgb),.45);
  background: rgba(var(--accent-rgb),.1);
}

.effects-clear:disabled {
  cursor: not-allowed;
  opacity: .35;
}

.effects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem;
  max-height: 23rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: .2rem;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-deep) transparent;
}

.effect-option {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 6.25rem;
  place-items: center;
  padding: .45rem .3rem .5rem;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: .75rem;
  background: rgba(3,14,23,.28);
  color: rgba(239,244,242,.52);
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease, opacity .2s ease;
}

.effect-option:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: rgba(var(--accent-rgb),.32);
  color: var(--ivory);
}

.effect-option:disabled {
  cursor: not-allowed;
  filter: grayscale(.5);
  opacity: .38;
}

.effect-option.active {
  border-color: rgba(var(--accent-light-rgb),.55);
  background: linear-gradient(145deg, rgba(var(--accent-rgb),.13), rgba(var(--accent-rgb),.045));
  color: var(--gold-light);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 7px 20px rgba(0,0,0,.12);
}

.effect-option__preview {
  display: grid;
  width: 100%;
  height: 3.65rem;
  place-items: center;
}

.effect-option__preview img {
  display: block;
  max-width: 3.8rem;
  max-height: 3.55rem;
  object-fit: contain;
  filter: drop-shadow(0 5px 5px rgba(0,0,0,.27));
}

.effect-option__label {
  max-width: 100%;
  font-size: .61rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.effect-option__check {
  position: absolute;
  top: .36rem;
  right: .36rem;
  display: grid;
  width: 1.05rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-light);
  color: #10212c;
  font-size: .65rem;
  font-weight: 900;
  opacity: 0;
  transform: scale(.65);
  transition: opacity .2s ease, transform .2s ease;
}

.effect-option.active .effect-option__check {
  opacity: 1;
  transform: scale(1);
}

.late-checkbox {
  display: flex;
  align-items: center;
  gap: .65rem;
  margin: .75rem 0 1rem;
  padding: .75rem .9rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: .8rem;
  background: rgba(255,255,255,.025);
  color: rgba(239,244,242,.68);
  cursor: pointer;
  font-size: .82rem;
  transition: border-color .2s ease, background .2s ease;
}

.late-checkbox input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.late-checkmark {
  position: relative;
  width: 1.15rem;
  aspect-ratio: 1;
  border: 1px solid rgba(var(--accent-rgb),.45);
  border-radius: .35rem;
  transition: .2s ease;
}

.late-checkbox input:focus-visible + .late-checkmark {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.late-checkbox input:checked + .late-checkmark {
  border-color: var(--gold);
  background: var(--gold);
}

.late-checkbox input:checked + .late-checkmark::after {
  content: "";
  position: absolute;
  top: .16rem;
  left: .35rem;
  width: .3rem;
  height: .55rem;
  transform: rotate(42deg);
  border: solid #10212c;
  border-width: 0 2px 2px 0;
}

.late-label { flex: 1; font-weight: 650; }
.late-hint { color: rgba(239,244,242,.34); font-size: .7rem; }

.late-checkbox:has(input:checked) {
  border-color: rgba(var(--accent-rgb),.28);
  background: rgba(var(--accent-rgb),.05);
}

.field-label,
.text-edit-header label {
  display: block;
  margin-bottom: .45rem;
  color: rgba(var(--accent-light-rgb),.78);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .05em;
}

.input-group {
  display: flex;
  gap: .55rem;
}

.input-group-sie .anrede-select { flex: 0 0 115px; }
.input-group-sie input { flex: 1; min-width: 0; }

input,
select,
.text-input,
.link-label-input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: .75rem;
  background: rgba(255,255,255,.045);
  color: var(--ivory);
  outline: none;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

input,
select { min-height: 47px; padding: .75rem .9rem; font-size: .86rem; }

input::placeholder,
.text-input::placeholder,
.link-label-input::placeholder { color: rgba(239,244,242,.25); }

input:focus,
select:focus,
.text-input:focus,
.link-label-input:focus {
  border-color: rgba(var(--accent-rgb),.65);
  background: rgba(255,255,255,.06);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.06);
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23d0ae68' stroke-width='1.5'/%3E%3C/svg%3E");
  background-position: right .75rem center;
  background-repeat: no-repeat;
  background-size: .9rem;
  padding-right: 2rem;
}

select option { background: var(--ink-soft); color: var(--ivory); }

.form-fields { animation: fieldIn .3s var(--ease-out) both; }
@keyframes fieldIn { from { opacity: 0; transform: translateY(-5px); } }

.text-edit-block {
  padding: .9rem;
  border: 1px solid rgba(255,255,255,.075);
  border-radius: 1rem;
  background: rgba(0,0,0,.12);
}

.text-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .6rem;
}

.text-edit-header label { margin: 0; }
.text-edit-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }

.text-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .38rem .58rem;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: .5rem;
  background: rgba(255,255,255,.035);
  color: rgba(239,244,242,.55);
  cursor: pointer;
  font-size: .68rem;
  font-weight: 650;
  transition: .2s ease;
}

.text-reset-btn--magic { color: var(--gold-light); }
.text-reset-btn:hover { border-color: rgba(var(--accent-rgb),.38); background: rgba(var(--accent-rgb),.06); color: var(--gold-light); }

.text-input {
  display: block;
  min-height: 124px;
  padding: .85rem;
  resize: vertical;
  font-size: .86rem;
  line-height: 1.62;
}

.text-hint {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .5rem;
  color: rgba(239,244,242,.35);
  font-size: .68rem;
  line-height: 1.5;
}

.text-hint--single { display: block; }

.signature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

.btn-generate,
.btn-copy,
.btn-preview,
.btn-whatsapp,
.btn-quiet {
  border-radius: .75rem;
  cursor: pointer;
  font-weight: 700;
  transition: transform .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease, background .2s ease;
}

.btn-generate {
  display: inline-flex;
  min-height: 47px;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .75rem 1.15rem;
  border: 1px solid rgba(var(--accent-light-rgb),.58);
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #10212c;
  font-size: .84rem;
}

.btn-generate svg {
  width: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.btn-generate:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(var(--accent-rgb),.2); }
.btn-generate:disabled { cursor: wait; filter: saturate(.5); opacity: .65; transform: none; }

.btn-generate-full {
  width: 100%;
  min-height: 54px;
  margin-top: 1rem;
  border-radius: .9rem;
  font-size: .9rem;
}

.link-result {
  display: none;
  margin-top: 1rem;
  padding: .8rem;
  border: 1px solid rgba(var(--accent-rgb),.2);
  border-radius: .9rem;
  background: rgba(var(--accent-rgb),.045);
}

.link-result.visible { display: block; animation: resultIn .4s var(--ease-out) both; }
@keyframes resultIn { from { opacity: 0; transform: translateY(7px); } }

.link-label-input {
  display: block;
  width: 100%;
  min-height: 5.5rem;
  padding: .7rem .8rem;
  resize: vertical;
  font-size: .8rem;
  line-height: 1.5;
}

.link-help {
  margin: .6rem 0;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.55;
}

.whatsapp-share {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(var(--accent-rgb),.18);
}

.whatsapp-share h2 { font-size: .86rem; }
.short-link-output { display: inline-block; color: var(--gold-light); font-size: .82rem; overflow-wrap: anywhere; }
#short-link-status:empty { display: none; }
#short-link-status.error { color: #f0a0a0; }

.whatsapp-preview { margin: .8rem 0; }
.whatsapp-preview summary { color: var(--gold-light); cursor: pointer; font-size: .72rem; }

.whatsapp-message {
  max-height: 14rem;
  overflow-y: auto;
  margin-top: .6rem;
  padding: .75rem;
  border-radius: .6rem;
  background: rgba(3,14,23,.35);
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.link-output {
  overflow: hidden;
  padding: .6rem .65rem .8rem;
  color: rgba(239,244,242,.78);
  font-size: .76rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.link-output a {
  color: var(--gold-light);
  text-decoration-color: rgba(var(--accent-light-rgb),.42);
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

.link-output a:hover { text-decoration-color: currentColor; }

.link-result__actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }

.btn-copy,
.btn-preview,
.btn-whatsapp {
  min-height: 42px;
  padding: .62rem .8rem;
  font-size: .75rem;
}

.btn-copy {
  border: 1px solid var(--gold);
  background: rgba(var(--accent-rgb),.1);
  color: var(--gold-light);
}

.btn-preview {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.035);
  color: rgba(239,244,242,.68);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(78,168,137,.5);
  background: rgba(78,168,137,.13);
  color: #a0e0c7;
  text-align: center;
  text-decoration: none;
}

.btn-whatsapp:hover { background: rgba(78,168,137,.23); }
a.btn-whatsapp:not([href]) { opacity: .4; pointer-events: none; }
.btn-whatsapp:disabled { opacity: .65; cursor: default; }

.btn-copy:hover,
.btn-preview:hover { transform: translateY(-1px); border-color: var(--gold); color: var(--gold-light); }
.btn-copy.copied { border-color: #4ea889; background: rgba(78,168,137,.16); color: #8bd7bd; }

.generator-modal-footer {
  margin-top: 1.3rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(255,255,255,.055);
  text-align: center;
}

.btn-quiet {
  border: 0;
  background: transparent;
  color: rgba(239,244,242,.42);
  font-size: .73rem;
  font-weight: 600;
}

.btn-quiet span { color: var(--gold); }
.btn-quiet:hover { color: var(--gold-light); }

.btn-quiet--bordered {
  min-height: 45px;
  padding: .68rem 1rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: .75rem;
  color: rgba(239,244,242,.62);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  display: grid;
  width: 2.3rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 50%;
  background: rgba(255,255,255,.035);
  color: rgba(239,244,242,.55);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.modal-close:hover { border-color: rgba(var(--accent-rgb),.35); color: var(--gold-light); }

.ki-status {
  min-height: 1.5rem;
  margin: .7rem 0;
  color: var(--gold-light);
  font-size: .75rem;
  line-height: 1.5;
}

.ki-status.error { color: #ef9d9d; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: .55rem;
  margin-top: .7rem;
}

body.modal-active,
body.reveal-active { overflow: hidden; }

.toast {
  position: fixed;
  right: 50%;
  bottom: 1.5rem;
  z-index: 6000;
  max-width: calc(100% - 2rem);
  padding: .72rem 1rem;
  border: 1px solid rgba(var(--accent-rgb),.28);
  border-radius: 999px;
  background: rgba(9,27,39,.92);
  box-shadow: 0 14px 38px rgba(0,0,0,.3);
  color: rgba(251,248,239,.88);
  font-size: .76rem;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 12px);
  transition: opacity .25s ease, transform .25s ease;
  backdrop-filter: blur(18px);
}

.toast.visible { opacity: 1; transform: translate(50%, 0); }

@media (max-width: 700px) {
  .birthday-card__corner { width: 5rem; }
  .signature-grid { grid-template-columns: 1fr; }
}

@media (max-height: 820px) and (min-width: 701px) {
  .birthday-card { padding-top: 2rem; padding-bottom: 1.8rem; }
  .celebration-mark--cake { width: 8.8rem; margin-bottom: .55rem; }
  .card-eyebrow { margin-bottom: .55rem; }
  .birthday-title { font-size: clamp(2rem, 5vw, 3rem); }
  .gold-divider { margin-top: 1.15rem; margin-bottom: 1.15rem; }
  .birthday-subtitle { padding: .9rem 1.4rem; font-size: 1.06rem; line-height: 1.52; }
  .birthday-greeting { margin-top: 1.1rem; line-height: 1.45; }
  .card-actions { margin-top: 1.4rem; }
}

@media (max-width: 480px) {
  .reveal-gate { padding-top: 5rem; }
  .reveal-gate__copy { margin-bottom: 1.35rem; }
  .birthday-card { padding: 1.55rem 1.25rem 1.7rem; }
  .celebration-mark--cake { width: 8.2rem; margin-bottom: .5rem; }
  .card-eyebrow { margin-bottom: .5rem; }
  .birthday-title { font-size: clamp(1.8rem, 8.3vw, 2.45rem); }
  .gold-divider { margin-top: 1rem; margin-bottom: 1rem; }
  .birthday-subtitle { padding: 1rem .95rem; font-size: 1.03rem; line-height: 1.58; }
  .birthday-greeting { margin-top: 1rem; line-height: 1.45; }
  .card-actions { align-items: stretch; flex-direction: column; margin-top: 1.25rem; }
  .surprise-btn, .share-btn { width: 100%; }
  .generator-modal { padding: .65rem; }
  .generator-modal-card { padding: 1.35rem 1rem; border-radius: 1.2rem; }
  .generator-modal-header { margin-bottom: 1.5rem; }
  .text-edit-header { align-items: flex-start; flex-direction: column; }
  .text-edit-actions { width: 100%; justify-content: flex-start; }
  .input-group-sie { flex-direction: column; }
  .input-group-sie .anrede-select { flex-basis: auto; }
  .variant-toggle { grid-template-columns: 1fr; }
  .effects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .late-hint { display: none; }
  .link-result__actions { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions > * { width: 100%; }
}

@media (max-height: 680px) and (min-width: 700px) {
  .reveal-gate { padding-top: 4rem; }
  .reveal-gate__brand { top: 1.25rem; width: 145px; }
  .reveal-gate__title { font-size: clamp(2.8rem, 8vh, 4.4rem); }
  .reveal-gate__copy { margin: .7rem auto 1.25rem; }
  .reveal-orb { width: 142px; margin-top: .75rem; margin-bottom: 2.2rem; }
}

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

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

  .ambient-orb { animation: none; }
  .reveal-orb__ring { display: none; }
}

/* App editor: one continuous workspace, with room for touch and desktop input. */
.editor-shell {
  padding: max(1.25rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1.25rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background: radial-gradient(ellipse at 15% 0, #17454b 0, transparent 52%), #081620;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overscroll-behavior-y: contain;
}
.editor-card {
  width: min(100%, 1000px);
  padding: 0;
  border-radius: 1.6rem;
  border-color: rgba(214,231,224,.14);
  background: linear-gradient(155deg, #102b35, #0b1e2b 75%);
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
}
.app-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 76px; padding: 1rem 1.7rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.app-brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--ivory); font-size: .9rem; text-decoration: none; white-space: nowrap; }
.app-brand strong { font-weight: 500; color: #bacbcb; }
.app-brand__symbol { color: var(--gold-light); font-size: 1.5rem; }
.app-preferences { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; min-width: 0; }
.mode-switch, .language-switch { display: inline-flex; gap: .2rem; padding: .25rem; border: 1px solid rgba(255,255,255,.12); border-radius: .8rem; background: rgba(0,0,0,.13); }
.mode-switch button, .language-switch button { min-height: 40px; padding: .5rem .7rem; border: 0; border-radius: .55rem; background: transparent; color: #a3b0cc; font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; white-space: nowrap; }
.mode-switch button[aria-pressed="true"], .language-switch button[aria-pressed="true"] { color: var(--gold-light); background: rgba(var(--accent-rgb),.14); }
.mode-switch button:hover, .language-switch button:hover { color: var(--ivory); }
.mode-switch button span { margin-right: .25rem; }
.language-switch button { padding-inline: .6rem; font-size: .72rem; }
#generator-title { white-space: pre-line; }
.app-install { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .6rem .85rem; border: 1px solid rgba(var(--accent-light-rgb),.3); border-radius: .75rem; background: rgba(var(--accent-light-rgb),.045); color: var(--gold-light); font-size: .8rem; font-weight: 600; cursor: pointer; }
.app-install:hover { background: rgba(var(--accent-light-rgb),.12); }
.app-install svg { width: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-mode { color: #97b9b1; font-size: .75rem; }
.app-notice { padding: .85rem 1.7rem; border-bottom: 1px solid rgba(var(--accent-light-rgb),.16); background: rgba(var(--accent-light-rgb),.06); color: var(--gold-light); font-size: .82rem; line-height: 1.55; }
.editor-layout { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 1rem; padding: 1.7rem; }
.editor-hero { grid-column: 1 / -1; margin: .4rem 0 1.1rem; padding-right: 155px; text-align: left; }
.editor-hero .eyebrow { font-size: .66rem; color: var(--gold-light); letter-spacing: .17em; }
.editor-hero .generator-modal-title { margin: .7rem 0 .8rem; font-size: clamp(2.15rem, 4.5vw, 3.2rem); line-height: 1.07; }
.editor-hero .generator-modal-subtitle { margin: 0; max-width: 450px; font-size: .88rem; }
.editor-hero .generator-modal-mark--egg { position: absolute; top: .6rem; right: .8rem; width: 110px; margin: 0; transform: rotate(8deg); }
.editor-layout > .form-section { margin: 0; padding: 1.2rem; border: 1px solid rgba(224,239,230,.1); border-radius: 1.1rem; background: rgba(4,16,25,.23); }
.editor-recipient { grid-column: 1; grid-row: 2 / 4; }
.editor-message { grid-column: 2; grid-row: 2; }
.editor-signature { grid-column: 2; grid-row: 3; }
.editor-actions { grid-column: 1 / -1; min-width: 0; }
.editor-card .form-section__heading { gap: .65rem; margin-bottom: 1.2rem; }
.editor-card .form-section__number { width: 1.85rem; flex-basis: 1.85rem; height: 1.85rem; border-radius: .55rem; background: rgba(var(--accent-light-rgb),.05); font-size: .65rem; }
.editor-card .form-section__heading h2 { font-size: .92rem; letter-spacing: 0; }
.editor-card .form-section__heading p { color: #91a9ae; font-size: .75rem; }
.editor-card .field-label { font-size: .73rem; letter-spacing: .01em; }
.editor-card .variant-toggle-btn { padding: .7rem .55rem; gap: .45rem; }
.editor-card .variant-toggle-btn__icon { flex-basis: 1.8rem; }
.editor-card .variant-toggle-btn small { font-size: .6rem; }
.editor-card .signature-grid { grid-template-columns: 1fr; gap: .85rem; }
.editor-card .text-edit-block { padding: .9rem; background: rgba(255,255,255,.015); }
.editor-card .text-edit-header { flex-direction: column; align-items: flex-start; gap: .65rem; }
.editor-card .text-edit-actions { width: 100%; }
.editor-card input, .editor-card select, .editor-card textarea, .generator-modal--nested input { font-size: 16px; }
.editor-card .text-input { min-height: 210px; line-height: 1.65; }
.editor-card .effects-field__header { padding: .8rem; }
.editor-card .effects-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.editor-card .effect-option__label { font-size: .66rem; }
.editor-card .effects-panel__intro { align-items: flex-start; }
.editor-card .late-label { font-size: .77rem; }
.editor-card .late-hint { display: none; }
.editor-card .btn-generate-full { min-height: 56px; margin-top: .25rem; font-size: .93rem; border-radius: .9rem; }
.editor-card .btn-copy, .editor-card .btn-preview, .editor-card .btn-whatsapp { min-height: 48px; font-size: .85rem; }
.editor-card .link-result { margin-top: 1rem; padding: 1.2rem; border-radius: 1rem; }
.editor-card .link-help { font-size: .77rem; }
.editor-card .generator-modal-footer { margin-top: 1.1rem; }
.editor-card .btn-quiet { min-height: 44px; }
.install-dialog { position: fixed; inset: 0; width: min(92vw, 520px); max-height: min(88svh, 760px); margin: auto; padding: 2rem; overflow-y: auto; border: 1px solid rgba(var(--accent-light-rgb),.25); border-radius: 1.3rem; background: #102a35; color: var(--ivory); box-shadow: 0 24px 100px #0008; }
.install-dialog::backdrop { background: rgba(3,12,20,.8); }
.install-symbol { display: block; margin-bottom: .9rem; color: var(--gold-light); font-size: 2rem; }
.install-dialog h2 { padding-right: 1rem; font-size: 1.5rem; letter-spacing: -.035em; }
.install-dialog p { margin: .8rem 0; color: #adbec1; font-size: .9rem; line-height: 1.6; }
.install-dialog section { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(255,255,255,.1); }
.install-dialog h3 { margin-bottom: .8rem; color: var(--gold-light); font-size: .95rem; }
.install-dialog ol { padding-left: 1.25rem; }
.install-dialog li { margin: .5rem 0; padding-left: .2rem; font-size: .88rem; line-height: 1.65; }
.install-dialog .modal-close { min-width: 44px; min-height: 44px; }
.toast { bottom: max(1.5rem, calc(env(safe-area-inset-bottom) + .7rem)); }
.reveal-gate { padding-left: max(1rem, env(safe-area-inset-left)); padding-right: max(1rem, env(safe-area-inset-right)); padding-bottom: max(2rem, env(safe-area-inset-bottom)); }

@media (max-width: 760px) {
  .editor-shell { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
  .editor-card { border-radius: 0; border: 0; min-height: 100svh; }
  .app-bar { padding: .8rem 1.15rem; min-height: 70px; }
  .app-brand { font-size: .81rem; gap: .4rem; }
  .app-install { font-size: .72rem; padding: .6rem; gap: .35rem; }
  .app-mode { font-size: .65rem; max-width: 100px; text-align: right; }
  .app-notice { padding: .85rem 1.15rem; }
  .editor-layout { grid-template-columns: minmax(0, 1fr); padding: 1.15rem; gap: .9rem; }
  .editor-hero { padding-right: 75px; margin: .6rem 0 .9rem; }
  .editor-hero .generator-modal-title { font-size: clamp(1.9rem, 7.3vw, 2.65rem); }
  .editor-hero .generator-modal-subtitle { font-size: .82rem; }
  .editor-hero .generator-modal-mark--egg { right: -.1rem; top: 1.5rem; width: 65px; }
  .editor-layout > .form-section { grid-column: 1; grid-row: auto; padding: 1.05rem; }
  .editor-card .variant-toggle { grid-template-columns: 1fr 1fr; }
  .editor-card .variant-toggle-btn small { display: none; }
  .editor-card .text-input { min-height: 170px; }
  .editor-card .link-result { padding: 1rem; }
  .editor-card .late-checkbox { padding: .75rem .6rem; gap: .5rem; }
  .editor-card .input-group-sie { flex-direction: row; }
  .editor-card .input-group-sie .anrede-select { flex-basis: 95px; }
  .editor-card .link-result__actions { grid-template-columns: 1fr; }
  .install-dialog { padding: 1.5rem; }
}

@media (display-mode: standalone) {
  .editor-shell { padding-top: env(safe-area-inset-top); }
}

/* Private palette: the shared ChatGBuetti blue, with a rose/burgundy accent for women. */
html[data-mode="private"] {
  --ink: #0a0e1a;
  --ink-soft: #101627;
  --petrol: #2563eb;
  --petrol-light: #6ea8ff;
  --gold: #6ea8ff;
  --gold-light: #c7dfff;
  --gold-deep: #2563eb;
  --berry: #a34468;
  --ivory: #e9edf6;
  --accent-rgb: 110,168,255;
  --accent-light-rgb: 199,223,255;
}
body[data-mode="private"] { --private-rose: transparent; }
body[data-mode="private"][data-variant="female"] { --private-rose: rgba(163,68,104,.22); }
body[data-mode="private"] .ambient-scene { background: radial-gradient(ellipse at 10% 10%, #182b54, transparent 65%), #0a0e1a; }
body[data-mode="private"] .ambient-orb--petrol { background: #2563eb; }
body[data-mode="private"] .ambient-orb--gold { background: #6ea8ff; }
body[data-mode="private"] .ambient-orb--berry { background: #244c92; }
body[data-mode="private"][data-variant="female"] .ambient-orb--berry { background: #a34468; opacity: .26; }
body[data-mode="private"] .editor-shell { background: radial-gradient(ellipse at 15% 0, #182b54, transparent 55%), #0a0e1a; }
body[data-mode="private"] .editor-card { background: radial-gradient(ellipse at 100% 30%, var(--private-rose), transparent 60%), linear-gradient(155deg, #15213a, #101627 75%); border-color: #22304f; }
body[data-mode="private"] .reveal-gate { background: radial-gradient(ellipse at 78% 60%, var(--private-rose), transparent 62%), radial-gradient(ellipse at 30% 30%, #162b53, transparent 70%), #0a0e1a; }
body[data-mode="private"] .reveal-gate__brand { display: none; }
body[data-mode="private"] .birthday-card { background: radial-gradient(ellipse at 100% 20%, var(--private-rose), transparent 70%), linear-gradient(145deg, #15213a, #101627); border-color: #3a4f7e; }
body[data-mode="private"] .install-dialog, body[data-mode="private"] .generator-modal-card--compact { background: #101627; }
body[data-mode="private"] .form-toggle-btn.active { background: linear-gradient(135deg, #6ea8ff, #c7dfff); }
body[data-mode="private"] .variant-toggle-btn.active { border-color: #6ea8ff; background: rgba(110,168,255,.12); }
body[data-mode="private"] .variant-toggle-btn[data-variant="female"].active { border-color: #da82a4; background: rgba(163,68,104,.15); }
body[data-mode="private"] .variant-toggle-btn[data-variant="female"] .variant-toggle-btn__icon { color: #e2a1bc; }
body[data-mode="private"] .editor-layout > .form-section { background: rgba(10,14,26,.28); }
body[data-mode="private"] .btn-generate { color: #fff; background: linear-gradient(135deg, #2563eb, #1d4ed8); border-color: #6ea8ff; }
body[data-mode="private"] input:focus, body[data-mode="private"] textarea:focus, body[data-mode="private"] select:focus { border-color: #6ea8ff; }
body[data-mode="private"] .toast { background: #182339; }
@media (max-width: 760px) {
  .app-bar { gap: .55rem; align-items: flex-start; }
  .app-preferences { gap: .5rem; }
  .mode-switch button { font-size: .75rem; padding-inline: .55rem; }
  .app-install { flex: 0 0 44px; width: 44px; padding: .6rem; }
  .app-install span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .app-mode { display: none; }
}
