/* ═══════════════════════════════════════════════
   Sofia's Birthday — kawaii pastel claymorphism
   ═══════════════════════════════════════════════ */

:root {
  color-scheme: light;

  /* palette */
  --bg: #FBE3EB;
  --bg-2: #F7CFDD;
  --surface: #FFFFFF;
  --surface-2: #FFF7FA;
  --ink: #4A3645;
  --ink-soft: #6F5767;
  --plum: #7A3B6E;
  --line: #4B3F45;
  --rose: #D6407A;
  --rose-600: #B52F63;
  --rose-200: #F9A8C0;
  --rose-100: #FDE3EC;
  --mint: #A8E6CF;
  --mint-100: #E2F7EE;
  --mint-ink: #17694C;
  --lav: #C9B6F2;
  --lav-100: #EFE9FC;
  --lav-ink: #5B3FA8;
  --sky: #A7D8F5;
  --butter: #FFE8A3;
  --peach: #FFC7A8;
  --danger: #B42346;

  /* shape + depth */
  --r-xl: 36px;
  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --clay: 0 22px 44px -18px rgba(122, 59, 110, .35), 0 8px 16px -8px rgba(122, 59, 110, .18),
          inset 0 -7px 0 rgba(122, 59, 110, .06), inset 0 3px 0 rgba(255, 255, 255, .95);
  --clay-sm: 0 10px 22px -12px rgba(122, 59, 110, .35), inset 0 -4px 0 rgba(122, 59, 110, .06), inset 0 2px 0 rgba(255, 255, 255, .9);

  /* type */
  --font-display: 'Fredoka', 'Nunito', system-ui, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --pattern: none;
}

html[lang="fa"] {
  --font-display: 'Baloo Bhaijaan 2', 'Vazirmatn', system-ui, sans-serif;
  --font-body: 'Vazirmatn', 'Tahoma', system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(rgba(255, 255, 255, .55) 2.5px, transparent 3px),
    radial-gradient(rgba(214, 64, 122, .10) 2px, transparent 2.5px);
  background-size: 34px 34px, 34px 34px;
  background-position: 0 0, 17px 17px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; }
a { color: var(--rose-600); }

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

.skip-link {
  position: absolute; inset-inline-start: 16px; top: -60px; z-index: 200;
  padding: 10px 18px; border-radius: 999px; background: var(--plum); color: #fff;
  text-decoration: none; font-weight: 700; transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--plum); outline-offset: 3px; border-radius: 12px; }
main:focus, .thanks:focus { outline: none; }

.icon { width: 1.25em; height: 1.25em; flex: none; }

.container { width: min(100% - 32px, 1080px); margin-inline: auto; }

/* optional Gemini pattern + soft colour blobs */
.bg-layer { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-layer::before {
  content: ""; position: absolute; inset: 0;
  background-image: var(--pattern); background-size: 420px; opacity: .22;
}
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.b1 { width: 420px; height: 420px; background: var(--lav); top: 30%; inset-inline-start: -160px; }
.b2 { width: 380px; height: 380px; background: var(--mint); top: 62%; inset-inline-end: -140px; opacity: .45; }
.b3 { width: 360px; height: 360px; background: var(--butter); top: 88%; inset-inline-start: 20%; opacity: .5; }

/* ───────── Buttons ───────── */
.btn {
  --btn-shadow: #EBC3D3;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border: 0; border-radius: 999px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform .18s var(--spring), box-shadow .18s var(--ease-out), background-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(4px); }
.btn-lg { min-height: 58px; padding: 0 32px; font-size: 1.15rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--rose); color: #fff;
  box-shadow: 0 6px 0 var(--rose-600), 0 16px 26px -10px rgba(214, 64, 122, .6);
}
.btn-primary:hover { background: #DE4C85; }
.btn-primary:active { box-shadow: 0 2px 0 var(--rose-600), 0 8px 16px -10px rgba(214, 64, 122, .6); }

.btn-soft {
  background: var(--surface); color: var(--plum);
  box-shadow: 0 5px 0 var(--btn-shadow), 0 14px 24px -14px rgba(122, 59, 110, .5);
}
.btn-soft:hover { background: var(--surface-2); }
.btn-soft:active { box-shadow: 0 1px 0 var(--btn-shadow); }

.btn-ghost { background: transparent; color: var(--plum); box-shadow: inset 0 0 0 2.5px #EBC3D3; }
.btn-ghost:hover { background: rgba(255, 255, 255, .6); }

.btn[disabled] { opacity: .6; cursor: progress; }
.btn-spinner {
  display: none; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
.btn.is-loading .btn-spinner { display: inline-block; }
.btn.is-loading .icon { display: none; }

.link-btn {
  background: none; border: 0; padding: 10px 14px; min-height: 44px;
  color: var(--ink-soft); font-weight: 700; text-decoration: underline; text-underline-offset: 4px;
  cursor: pointer;
}

.lang-pill {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 16px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .88); color: var(--plum);
  font-weight: 700; font-size: .95rem;
  box-shadow: var(--clay-sm);
  backdrop-filter: blur(8px);
  transition: transform .18s var(--spring);
}
.lang-pill:hover { transform: translateY(-2px); }
.lang-pill span { font-family: 'Vazirmatn', 'Nunito', sans-serif; }
.lang-fixed {
  position: fixed; z-index: 50;
  top: max(12px, env(safe-area-inset-top));
  inset-inline-end: max(12px, env(safe-area-inset-right));
}

/* ───────── Clay card ───────── */
.clay {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--clay);
}

/* ═════════ Envelope intro ═════════ */
.intro {
  position: fixed; inset: 0; z-index: 100;
  display: none; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  padding: 24px 16px;
  background:
    radial-gradient(circle at 50% 28%, #FFF3F7 0%, rgba(255, 243, 247, 0) 55%),
    linear-gradient(180deg, #FBE3EB, #F5C9D9);
}
.js .intro:not([hidden]) { display: flex; }
.intro.is-leaving { opacity: 0; visibility: hidden; transition: opacity .5s var(--ease-out) 1.05s, visibility 0s 1.6s; }

.intro-sparkles .sp { position: absolute; color: #fff; animation: twinkle 2.6s ease-in-out infinite; }
.sp1 { width: 34px; top: 12%; left: 14%; }
.sp2 { width: 22px; top: 20%; right: 16%; animation-delay: .6s !important; color: var(--butter) !important; }
.sp3 { width: 26px; bottom: 16%; left: 20%; animation-delay: 1.1s !important; }
.sp4 { width: 30px; bottom: 22%; right: 12%; animation-delay: 1.6s !important; }

.envelope {
  position: relative;
  width: min(86vw, 420px);
  aspect-ratio: 10 / 8;
  perspective: 1200px;
  animation: floaty 4s ease-in-out infinite;
}
.env-back, .env-pocket, .env-flap { position: absolute; inset: 0; border-radius: 22px; }
.env-back { background: #EF9DB8; box-shadow: 0 30px 50px -24px rgba(122, 59, 110, .55); }

.env-letter {
  position: absolute; inset-inline: 7%; top: 6%; height: 88%;
  z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding-top: 6%;
  border-radius: 16px;
  background: var(--surface);
  background-image: radial-gradient(var(--rose-100) 2px, transparent 2.5px);
  background-size: 18px 18px;
  box-shadow: 0 6px 16px -8px rgba(122, 59, 110, .45);
  transition: transform .7s var(--ease-out) .35s;
}
.env-letter .cat-art { width: 38%; }
.letter-line { margin: 4px 0 0; font-family: var(--font-display); font-weight: 700; color: var(--plum); font-size: clamp(1rem, 4.4vw, 1.3rem); }
.letter-age {
  margin: 0; font-family: 'Fredoka', 'Baloo Bhaijaan 2', sans-serif; font-weight: 700;
  font-size: clamp(1.6rem, 7vw, 2.2rem); line-height: 1; color: var(--rose);
}

.env-pocket {
  z-index: 3;
  background: linear-gradient(180deg, #F8C4D4, #F5B3C8);
  clip-path: polygon(0 0, 50% 49%, 100% 0, 100% 100%, 0 100%);
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 6%;
}
.env-address { margin: 0; display: flex; flex-direction: column; align-items: center; line-height: 1.25; text-align: center; }
.env-to { font-size: .9rem; color: var(--ink-soft); font-weight: 700; }
.env-name {
  font-family: var(--font-display); font-size: clamp(1.4rem, 6.4vw, 2rem); color: var(--plum);
  max-width: 70vw; overflow-wrap: anywhere;
}
.env-from { font-size: .82rem; color: var(--ink-soft); }

.env-flap {
  z-index: 4;
  height: 56%;
  background: linear-gradient(180deg, #F29BB6, #EE8EAC);
  clip-path: polygon(0 0, 100% 0, 50% 88%);
  border-radius: 22px 22px 0 0;
  transform-origin: top center;
  transition: transform .55s var(--ease-out), z-index 0s .28s;
}
.env-seal {
  position: absolute; z-index: 5;
  left: 50%; top: 49%;
  width: 68px; height: 68px; margin: -34px 0 0 -34px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #EE6A98, var(--rose) 60%, var(--rose-600));
  color: #FFE3EC;
  box-shadow: 0 6px 0 #9E2656, 0 14px 24px -8px rgba(122, 59, 110, .7), inset 0 2px 0 rgba(255, 255, 255, .35);
  transition: transform .25s var(--spring), opacity .25s;
  animation: pulse 2.2s ease-in-out infinite;
}
.env-seal:hover { transform: scale(1.06) rotate(-6deg); }
.seal-paw { width: 34px; height: 34px; }

.intro.is-open .envelope { animation: none; }
.intro.is-open .env-seal { transform: scale(.2); opacity: 0; animation: none; }
.intro.is-open .env-flap { transform: rotateX(180deg); z-index: 1; }
.intro.is-open .env-letter { transform: translateY(-48%); }

.intro-hint { margin: 0; text-align: center; color: var(--plum); font-weight: 700; }
.intro-actions { display: flex; gap: 12px; align-items: center; }

/* ═════════ Hero ═════════ */
.hero {
  position: relative;
  padding: 76px 16px 56px;
  text-align: center;
  isolation: isolate;
  overflow: clip;
}
.rainbow {
  position: absolute; z-index: -1;
  left: 50%; top: 150px;
  width: min(1200px, 190vw); aspect-ratio: 2 / 1;
  transform: translateX(-50%);
  border-radius: 999px 999px 0 0;
  background: radial-gradient(circle at 50% 100%,
    transparent 0 40%,
    #D9C8F7 40% 46%, #BFE3F8 46% 52%, #C4EEDB 52% 58%,
    #FFF0BD 58% 64%, #FFD6BF 64% 70%, #FBBFD2 70% 76%,
    transparent 76%);
  opacity: .9;
}
.cloud {
  position: absolute; bottom: 0; width: 22%; aspect-ratio: 2.2;
  background: #fff; border-radius: 999px;
  box-shadow: 0 10px 24px -14px rgba(122, 59, 110, .35);
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 55%; aspect-ratio: 1; left: 12%; bottom: 35%; }
.cloud::after { width: 42%; aspect-ratio: 1; right: 12%; bottom: 30%; }
.c-left { left: 7%; }
.c-right { right: 7%; }

.hero-sparkles .sp { position: absolute; color: #fff; animation: twinkle 3s ease-in-out infinite; }
.s1 { width: 42px; top: 70px; left: 10%; }
.s2 { width: 26px; top: 150px; right: 12%; color: var(--butter) !important; animation-delay: .8s !important; }
.s3 { width: 30px; top: 46%; left: 5%; animation-delay: 1.4s !important; }
.s4 { width: 22px; top: 38%; right: 6%; animation-delay: .3s !important; }
.s5 { width: 34px; top: 100px; right: 30%; animation-delay: 2s !important; }

.hero-inner { position: relative; max-width: 760px; margin-inline: auto; }

.hello {
  display: inline-block; margin: 0 0 10px; padding: 6px 18px;
  border-radius: 999px; background: rgba(255, 255, 255, .85);
  color: var(--rose-600); font-weight: 800; font-size: 1.05rem;
  box-shadow: var(--clay-sm);
}
.hero-title { margin: 0; font-family: var(--font-display); color: var(--plum); line-height: 1.05; }
.t-small { display: block; font-size: clamp(1.15rem, 3.8vw, 1.6rem); font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.t-big {
  display: block;
  font-size: clamp(2.7rem, 10.5vw, 5.4rem); font-weight: 800; letter-spacing: -.01em;
  text-shadow: 0 3px 0 #fff, 0 -2px 0 #fff, 3px 0 0 #fff, -3px 0 0 #fff, 0 12px 24px rgba(122, 59, 110, .25);
}
html[lang="fa"] .t-big { line-height: 1.3; letter-spacing: 0; }

.hero-stage { position: relative; margin: 8px auto 0; width: min(100%, 600px); }
.hero-art { margin: 0; }
.hero-art img, .hero-svg { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.hero-svg { aspect-ratio: 560 / 420; filter: drop-shadow(0 18px 20px rgba(122, 59, 110, .18)); }
.hero-cat-fly { animation: fly 5s ease-in-out infinite; transform-box: fill-box; }
.hero-stars path { animation: twinkle 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hero-stars path:nth-child(2n) { animation-delay: 1.2s; }
.flame { animation: flicker 1.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.cat-eye { animation: blink 5s infinite; transform-box: fill-box; transform-origin: center; }

.age-badge {
  position: absolute; z-index: 2;
  bottom: 3%; left: 0;
  width: clamp(92px, 22vw, 132px); aspect-ratio: 1;
  display: grid; place-content: center; text-align: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #fff 62%, transparent 63%),
    conic-gradient(from 0deg, var(--rose-200), var(--peach), var(--butter), var(--mint), var(--sky), var(--lav), var(--rose-200));
  box-shadow: 0 16px 26px -14px rgba(122, 59, 110, .6);
  transform: rotate(-8deg);
  animation: bob 3.4s ease-in-out infinite;
}
.age-num {
  display: block; font-family: 'Fredoka', 'Baloo Bhaijaan 2', sans-serif; font-weight: 700;
  font-size: clamp(2.6rem, 8vw, 3.8rem); line-height: .9; color: var(--rose);
  text-shadow: 0 3px 0 var(--rose-100);
}
.age-label { display: block; font-size: clamp(.72rem, 2.4vw, .85rem); font-weight: 800; color: var(--plum); margin-top: 2px; }

.sofia-frame {
  position: absolute; z-index: 2; margin: 0;
  top: 2%; left: 0;
  width: clamp(96px, 24vw, 150px); aspect-ratio: 1;
  padding: 6px; border-radius: 50%;
  background: conic-gradient(from 90deg, var(--rose-200), var(--lav), var(--sky), var(--mint), var(--butter), var(--rose-200));
  box-shadow: 0 16px 26px -14px rgba(122, 59, 110, .6);
}
.sofia-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 4px solid #fff; }

.turning {
  max-width: 34ch; margin: 10px auto 26px;
  font-size: clamp(1.05rem, 3.4vw, 1.25rem); font-weight: 700; color: var(--ink);
  text-wrap: balance;
}

/* ═════════ Details ═════════ */
.details { padding-block: 24px 40px; }
.detail-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
.detail {
  position: relative;
  padding: 26px 22px 24px;
  text-align: center;
}
.d-icon {
  display: grid; place-items: center;
  width: 60px; height: 60px; margin: -56px auto 12px;
  border-radius: 20px; color: var(--plum);
  box-shadow: 0 8px 0 rgba(122, 59, 110, .08), var(--clay-sm);
  transform: rotate(-6deg);
}
.d-icon .icon { width: 28px; height: 28px; }
.i-rose { background: var(--rose-200); }
.i-lav { background: var(--lav); }
.i-mint { background: var(--mint); }
.d-label { margin: 0; font-size: .95rem; font-weight: 800; color: var(--rose-600); }
.d-value { margin: 4px 0 2px; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.35; color: var(--plum); }
.d-sub { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.detail-grid .detail { margin-top: 34px; }
.map-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.map-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  background: var(--mint-100); color: var(--mint-ink);
  font-weight: 800; font-size: .92rem; text-decoration: none;
  box-shadow: inset 0 -3px 0 rgba(23, 105, 76, .12);
  transition: transform .18s var(--spring), background-color .18s;
}
.map-chip:hover { background: #D2F2E4; transform: translateY(-2px); }
.map-chip:active { transform: translateY(1px); }
.map-chip .icon { width: 16px; height: 16px; }

.countdown { margin-top: 26px; padding: 22px 18px 24px; text-align: center; }
.cd-title { margin: 0 0 14px; font-family: var(--font-display); font-size: 1.2rem; color: var(--plum); font-weight: 700; }
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 520px; margin-inline: auto; }
.cd-box {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 4px 10px; border-radius: var(--r-md);
  box-shadow: inset 0 -5px 0 rgba(122, 59, 110, .08);
}
.cd-box.c1 { background: var(--rose-100); }
.cd-box.c2 { background: var(--lav-100); }
.cd-box.c3 { background: var(--mint-100); }
.cd-box.c4 { background: #FFF6D9; }
.cd-num {
  font-family: 'Fredoka', 'Vazirmatn', sans-serif; font-weight: 700;
  font-size: clamp(1.7rem, 7vw, 2.4rem); line-height: 1.1; color: var(--plum);
  font-variant-numeric: tabular-nums;
}
.cd-unit { font-size: .85rem; font-weight: 700; color: var(--ink-soft); }
.cd-done { margin: 6px 0 0; font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--rose); }

.detail-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 26px; }

.event-note {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: fit-content; max-width: 100%; margin: 22px auto 0; padding: 10px 18px;
  border-radius: 999px; background: rgba(255, 255, 255, .7);
  color: var(--plum); font-weight: 700; text-align: center;
}
.event-note .icon { color: var(--rose); }

/* ═════════ Section heads ═════════ */
.section-head { text-align: center; margin-bottom: 26px; }
.section-title {
  margin: 0; font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2rem, 6.4vw, 3rem); line-height: 1.2; color: var(--plum);
  text-shadow: 0 3px 0 #fff;
}
.section-sub { margin: 6px 0 0; color: var(--ink-soft); font-weight: 600; }

/* ═════════ RSVP ═════════ */
.rsvp { padding-block: 48px 40px; scroll-margin-top: 16px; }
.rsvp-card { max-width: 640px; margin-inline: auto; padding: 26px 18px 24px; }

.choice { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 16px 10px 16px; text-align: center;
  border-radius: 24px; border: 3px solid transparent;
  background: var(--surface-2);
  box-shadow: var(--clay-sm);
  cursor: pointer;
  transition: transform .2s var(--spring), border-color .2s, background-color .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
}
.choice-card:hover { transform: translateY(-3px); }
.choice-card:active { transform: scale(.97); }
.choice-card input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.choice-card:has(input:focus-visible) { outline: 3px solid var(--plum); outline-offset: 3px; }
.choice-art { width: clamp(88px, 26vw, 128px); aspect-ratio: 1; display: grid; place-items: center; pointer-events: none; }
.choice-art img, .choice-art svg { width: 100%; height: auto; }
.choice-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1rem, 3.6vw, 1.15rem); line-height: 1.3; color: var(--plum); }
.choice-sub { font-size: .88rem; color: var(--ink-soft); line-height: 1.4; }
.choice-tick {
  position: absolute; top: 10px; inset-inline-end: 10px;
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: #fff; border: 2.5px solid #E6CCD7; color: transparent;
  transition: background-color .2s, border-color .2s, transform .25s var(--spring);
}
.choice-tick .icon { width: 18px; height: 18px; stroke-width: 3; }

.choice-card.yes.is-checked, .choice-card.yes:has(input:checked) { background: var(--mint-100); border-color: var(--mint-ink); }
.choice-card.no.is-checked, .choice-card.no:has(input:checked) { background: var(--lav-100); border-color: var(--lav-ink); }
.choice-card.yes.is-checked .choice-tick, .choice-card.yes:has(input:checked) .choice-tick { background: var(--mint-ink); border-color: var(--mint-ink); color: #fff; transform: scale(1.1); }
.choice-card.no.is-checked .choice-tick, .choice-card.no:has(input:checked) .choice-tick { background: var(--lav-ink); border-color: var(--lav-ink); color: #fff; transform: scale(1.1); }
.choice-card.is-checked .choice-art, .choice-card:has(input:checked) .choice-art { animation: pop .45s var(--spring); }

.field { margin-top: 22px; }
.field-label { display: block; margin-bottom: 8px; font-weight: 800; color: var(--plum); }
.req { color: var(--rose); }
.opt { font-weight: 600; color: var(--ink-soft); font-size: .9rem; }
.field input, .field textarea {
  width: 100%; min-height: 54px; padding: 14px 18px;
  border: 2.5px solid #EBCFDB; border-radius: 18px;
  background: #fff; font-size: 1.05rem; line-height: 1.5;
  transition: border-color .18s, box-shadow .18s;
}
.field textarea { min-height: 128px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: #A58E9C; }
/* dir="auto" makes empty fields LTR; keep placeholders in the page direction */
html[dir="rtl"] .field :placeholder-shown { direction: rtl; }
html[dir="ltr"] .field :placeholder-shown { direction: ltr; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--rose); box-shadow: 0 0 0 5px rgba(214, 64, 122, .16); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field-help { display: flex; justify-content: space-between; gap: 12px; margin-top: 6px; font-size: .88rem; color: var(--ink-soft); }
.counter { flex: none; font-variant-numeric: tabular-nums; }
.counter.is-near { color: var(--rose-600); font-weight: 700; }

.field-error {
  display: flex; align-items: center; gap: 6px;
  margin: 8px 0 0; color: var(--danger); font-weight: 700; font-size: .92rem;
}
.field-error[hidden] { display: none; }
.field-error::before {
  content: "!"; display: grid; place-items: center; flex: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--danger); color: #fff; font-size: .8rem; font-weight: 800;
}

.check {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  margin: 18px 0 22px; min-height: 44px; cursor: pointer; font-weight: 600;
}
.check input { position: absolute; opacity: 0; width: 26px; height: 26px; margin: 0; cursor: pointer; }
.check-box {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px; border-radius: 9px;
  border: 2.5px solid #E0BFCD; background: #fff; color: transparent;
  transition: background-color .18s, border-color .18s;
}
.check-box .icon { width: 16px; height: 16px; stroke-width: 3.2; }
.check input:checked + .check-box { background: var(--rose); border-color: var(--rose); color: #fff; }
.check input:focus-visible + .check-box { outline: 3px solid var(--plum); outline-offset: 3px; }

/* honeypot: no big offsets — they break RTL scroll origin */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }

.form-status { margin: 12px 0 0; min-height: 1.2em; text-align: center; font-weight: 700; color: var(--danger); }

/* thanks */
.thanks { text-align: center; padding: 6px 4px 4px; }
.thanks:focus { outline: none; }
.thanks-art { width: min(180px, 50vw); margin: 0 auto 6px; animation: pop .6s var(--spring); }
.thanks-title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 5.6vw, 2.1rem); color: var(--plum); }
.thanks-body { max-width: 42ch; margin: 8px auto 0; font-size: 1.08rem; }
.thanks-saved {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 14px 0 0; padding: 6px 16px; border-radius: 999px;
  font-weight: 800;
}
.thanks-saved.is-yes { background: var(--mint-100); color: var(--mint-ink); }
.thanks-saved.is-no { background: var(--lav-100); color: var(--lav-ink); }
.thanks-pending {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  max-width: 44ch; margin: 16px auto 0; padding: 10px 16px;
  border-radius: 18px; background: #FFF6D9; color: #6B5310; font-weight: 600; font-size: .95rem;
}
.thanks-pending[hidden], .thanks-saved[hidden] { display: none; }
.thanks-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 22px; }

/* ═════════ Memory wall ═════════ */
.wall { padding-block: 48px 40px; scroll-margin-top: 16px; }
.notes { columns: 1; column-gap: 20px; }
.note {
  --tilt: -1.2deg;
  --note-bg: #FFFFFF;
  position: relative;
  break-inside: avoid;
  margin: 0 0 22px; padding: 26px 20px 16px;
  border-radius: 22px;
  background: var(--note-bg);
  box-shadow: var(--clay-sm);
  transform: rotate(var(--tilt));
  transition: transform .25s var(--spring);
}
.note:hover { transform: rotate(0) translateY(-3px); }
.note::before {
  content: ""; position: absolute; top: -10px; left: 50%;
  width: 84px; height: 24px; margin-left: -42px;
  background: rgba(255, 255, 255, .7);
  border-radius: 6px; transform: rotate(-3deg);
  box-shadow: 0 2px 6px rgba(122, 59, 110, .12);
}
.note.n0 { --note-bg: #FFFFFF; --tilt: -1.2deg; }
.note.n1 { --note-bg: #FDE3EC; --tilt: 1deg; }
.note.n2 { --note-bg: #EFE9FC; --tilt: -.6deg; }
.note.n3 { --note-bg: #E2F7EE; --tilt: 1.4deg; }
.note.n4 { --note-bg: #FFF6D9; --tilt: -1.6deg; }
.note.is-new { animation: pop .6s var(--spring); }
.note-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 1.02rem; line-height: 1.75; }
.note-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 10px;
  border-top: 2px dashed rgba(122, 59, 110, .15);
  font-size: .9rem; color: var(--ink-soft);
}
.note-foot strong { color: var(--plum); font-weight: 800; }
.note-foot time { margin-inline-start: auto; }
.note-paw { width: 18px; height: 18px; color: var(--rose-200); }

.wall-empty { text-align: center; padding: 10px 0 20px; }
.wall-empty[hidden] { display: none; }
.empty-cat { width: 150px; margin: 0 auto 6px; opacity: .95; }
.wall-empty p { margin: 0 0 16px; font-weight: 700; color: var(--ink-soft); }

/* ═════════ Footer ═════════ */
.site-footer { padding: 30px 16px calc(40px + env(safe-area-inset-bottom)); text-align: center; color: var(--ink-soft); font-weight: 700; }
.site-footer p { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; }
.foot-paw, .foot-heart { width: 20px; height: 20px; color: var(--rose); }

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

/* ═════════ Reveal ═════════ */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }

/* ═════════ Keyframes ═════════ */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(.7) rotate(0); opacity: .55; } 50% { transform: scale(1.1) rotate(20deg); opacity: 1; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes bob { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(-4deg) translateY(-8px); } }
@keyframes fly { 0%, 100% { transform: translate(0, 0) rotate(0); } 50% { transform: translate(-8px, -12px) rotate(-3deg); } }
@keyframes flicker { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(.9, 1.12); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 6px 0 #9E2656, 0 14px 24px -8px rgba(122, 59, 110, .7), 0 0 0 0 rgba(214, 64, 122, .45); } 50% { box-shadow: 0 6px 0 #9E2656, 0 14px 24px -8px rgba(122, 59, 110, .7), 0 0 0 16px rgba(214, 64, 122, 0); } }
@keyframes pop { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* ═════════ Breakpoints ═════════ */
@media (min-width: 640px) {
  .notes { columns: 2; }
  .rsvp-card { padding: 34px 32px 30px; }
  .choice { gap: 18px; }
  .choice-card { padding: 20px 14px; }
}
@media (min-width: 768px) {
  .hero { padding-top: 90px; }
  .detail-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .countdown { padding: 26px 30px 30px; }
}
@media (min-width: 1024px) {
  .notes { columns: 3; }
  .rainbow { top: 120px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
