/* Merry Little Christmas (Swisscontact kids party, 09.12.2026): all styles for
   index.html. Mobile only by design: one min-width: 769px rule swaps the whole
   page for the desktop notice. Palette: pine green, candy red, ornament gold. */

@font-face {
  font-family: 'Brain Melt';
  src: url('brain-melt.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  /* block, not swap: the loader covers the block period, so there is no re-flow */
  font-display: block;
}

:root {
  --vh: 1vh;
  --cream: #fffaf4;
  --paper: #ffffff;
  --red: #d64545;
  --red-deep: #b0353a;
  --green: #2f7d5b;
  --green-deep: #1f5e44;
  --pine-pale: #e7f2ec;
  --gold: #eebd4f;
  --gold-deep: #c98f22;
  --ice: #cfe3f0;
  --ink: #23463a;
  --ink-soft: #587a6d;
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --env-w: min(82vw, 330px);
}

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

html, body { overscroll-behavior-y: none; }

html {
  background-color: var(--cream);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: scrollbar-color 0.8s ease;
}
html.is-open { scrollbar-color: var(--green) var(--cream); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background-color: var(--cream); }
::-webkit-scrollbar-thumb { background-color: transparent; border-radius: 6px; transition: background-color 0.8s ease; }
html.is-open ::-webkit-scrollbar-thumb { background-color: var(--green); }

body {
  font-family: 'Brain Melt', 'Noto Sans Georgian', sans-serif;
  color: var(--ink);
  background-color: var(--cream);
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* JS-trapped scroll lock: never position:fixed / overflow:hidden on the document
   (Chrome iOS from a chat app then freezes a short viewport). See script.js 3. */
html.is-locked, body.is-locked { overscroll-behavior: none; touch-action: none; }

i, em { font-style: normal; }
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ── Loader ─────────────────────────────────────────────────────── */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  background-color: var(--cream);
  transition: opacity 0.6s ease;
}
.loader.is-hidden { opacity: 0; pointer-events: none; }
.loader__spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 5px solid var(--pine-pale);
  border-top-color: var(--red);
  border-right-color: var(--gold);
  animation: spin 0.9s linear infinite;
}
.loader__bar {
  width: 120px;
  height: 5px;
  border-radius: 5px;
  background-color: var(--pine-pale);
  overflow: hidden;
}
.loader__bar span {
  display: block;
  height: 100%;
  background-color: var(--green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease;
}
@keyframes spin { to { transform: rotate(360deg); } }

.desktop-notice { display: none; }

/* ── Intro ──────────────────────────────────────────────────────── */
.intro {
  position: fixed;
  inset: 0;
  z-index: 9000;
  overflow: hidden;
  background-color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.9s ease, transform 0.9s var(--ease-out);
}
.intro.is-leaving { opacity: 0; transform: scale(1.08); pointer-events: none; }
.intro.is-gone { display: none; }

/* One 130x96 tile of five wavy candy-cane lines. The layer is one tile taller
   than the screen and slides up by exactly one tile, so the loop is seamless. */
.intro__stripes {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: calc(100% + 96px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='130' height='96' fill='none' stroke-width='6' stroke-linecap='round'%3E%3Cpath stroke='%23d64545' d='M13 0q9 12 0 24t0 24t0 24t0 24'/%3E%3Cpath stroke='%23eebd4f' d='M39 0q9 12 0 24t0 24t0 24t0 24'/%3E%3Cpath stroke='%232f7d5b' d='M65 0q9 12 0 24t0 24t0 24t0 24'/%3E%3Cpath stroke='%23cfe3f0' d='M91 0q9 12 0 24t0 24t0 24t0 24'/%3E%3Cpath stroke='%23b0353a' d='M117 0q9 12 0 24t0 24t0 24t0 24'/%3E%3C/svg%3E");
  background-size: 130px 96px;
  opacity: 0.55;
  animation: stripes 7s linear infinite;
  animation-play-state: paused;
}
html.is-ready .intro__stripes { animation-play-state: running; }
@keyframes stripes { to { transform: translateY(-96px); } }

.intro__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: calc(var(--env-w) * 0.42);
}

/* Envelope: back, letter, front pocket and flap are stacked full-size boxes.
   Every clip-path polygon meets at the same centre line, so no gaps show. */
.env {
  position: relative;
  width: var(--env-w);
  outline: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px) scale(0.92);
  transition: opacity 0.7s ease, transform 0.9s var(--spring);
}
html.is-ready .env { opacity: 1; transform: none; }

.env__teddy {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 44px);
  width: 60%;
  z-index: 0;
  transform: translateX(-50%) translateY(65%);
  transform-origin: 50% 100%;
}
/* Pop and sway are chained, not a transition handing over to an animation:
   the pop ends on exactly the neutral pose the sway starts from, and the sway
   begins the moment the pop ends (0.35s delay + 1.1s), so there is no snap. */
html.is-ready .env__teddy {
  animation:
    teddy-pop 1.1s ease-out 0.35s both,
    teddy-sway 3.4s ease-in-out 1.45s infinite;
}
@keyframes teddy-pop {
  0% { transform: translateX(-50%) translateY(65%) scale(0.94, 1.04); }
  42% { transform: translateX(-50%) translateY(-9%) scale(0.97, 1.05); }
  62% { transform: translateX(-50%) translateY(3%) scale(1.05, 0.95); }
  80% { transform: translateX(-50%) translateY(-2%) rotate(-1.5deg) scale(1); }
  100% { transform: translateX(-50%) translateY(0) rotate(0deg) scale(1); }
}
@keyframes teddy-sway {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
  25% { transform: translateX(-50%) translateY(-4px) rotate(2.5deg); }
  75% { transform: translateX(-50%) translateY(-2px) rotate(-2.5deg); }
}
.env.is-open .env__teddy { animation: teddy-hop 0.9s var(--ease-out) forwards; }
@keyframes teddy-hop {
  0% { transform: translateX(-50%) scale(1, 1); }
  20% { transform: translateX(-50%) scale(1.06, 0.92) translateY(6px); }
  50% { transform: translateX(-50%) scale(0.96, 1.06) translateY(-38px); }
  100% { transform: translateX(-50%) translateY(0); }
}

.env__body {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 3 / 2;
  animation: env-float 4s ease-in-out infinite;
}
@keyframes env-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.env.is-open .env__body { animation: none; }

.env__back, .env__front, .env__flap, .env__flap-shade {
  position: absolute;
  inset: 0;
  border-radius: 8px;
}
.env__back { z-index: 1; background-color: var(--red-deep); box-shadow: 0 18px 40px rgba(120, 30, 34, 0.25); }
.env__front {
  z-index: 3;
  background-color: var(--red);
  background-image: linear-gradient(170deg, rgba(255, 255, 255, 0.12), rgba(120, 30, 34, 0.12));
  clip-path: polygon(0 0, 50% 56%, 100% 0, 100% 100%, 0 100%);
}

.env__letter {
  position: absolute;
  z-index: 2;
  left: 7%;
  right: 7%;
  bottom: 6px;
  height: 94%;
  padding: 10px 10px 0;
  border-radius: 6px;
  background-color: var(--paper);
  box-shadow: 0 6px 18px rgba(120, 30, 34, 0.18);
  transition: transform 1.4s var(--ease-out);
}
.env.is-rising .env__letter { transform: translateY(-74%); }
.env__letter::before {
  content: '';
  position: absolute;
  inset: 7px 7px 0;
  border: 2px dashed var(--gold);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}
/* Centred on the part of the paper a guest actually sees once it has risen:
   the sheet above the envelope plus the strip showing through the open V. */
.paper-name {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 40%;
  transform: translateY(-50%);
  text-align: center;
  font-weight: 400;
}
.paper-name .name__line { font-size: 34px; }
.paper-name .name__line--small { font-size: 21px; }
.paper-name.is-flown { visibility: hidden; }

/* Soft shadow under the closed flap so its edges read against the pocket
   (clip-path also clips box-shadow / drop-shadow, so it is its own layer) */
.env__flap-shade {
  z-index: 4;
  background-color: rgba(120, 30, 34, 0.3);
  clip-path: polygon(0 0, 100% 0, 50% 67%);
  transition: opacity 0.3s ease;
}
.env.is-open .env__flap-shade { opacity: 0; }

/* Flap: drops behind the letter (z 4 -> 1) exactly while it is edge-on at 90deg,
   via a delayed discrete z-index transition, so the swap never shows as a pop. */
.env__flap {
  z-index: 4;
  background-color: #e05a57;
  background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
  clip-path: polygon(0 0, 100% 0, 50% 62%);
  transform-origin: 50% 0;
  transform: perspective(900px) rotateX(0deg);
  transition: transform 1.1s cubic-bezier(0.45, 0, 0.2, 1), z-index 0s linear 0.5s, background-color 1.1s ease;
}
.env.is-open .env__flap { transform: perspective(900px) rotateX(180deg); z-index: 1; background-color: var(--red-deep); }
.env__flap-text {
  padding-top: 13%;
  text-align: center;
  font-size: 22px;
  color: var(--paper);
  transition: opacity 0.25s ease;
}
.env__flap-text b { font-weight: 400; }
.env__flap-text span { display: block; padding-top: 4px; font-size: 14px; opacity: 0.9; }
.env.is-open .env__flap-text { opacity: 0; }

.intro__hint {
  margin-top: 26px;
  padding: 8px 18px;
  border-radius: 999px;
  background-color: var(--paper);
  font-size: 17px;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(35, 70, 58, 0.12);
  opacity: 0;
  transition: opacity 0.6s ease 0.9s;
}
html.is-ready .intro__hint { opacity: 1; }
html.is-ready .intro__hint.is-hidden { opacity: 0; transition-delay: 0s; }
.dots i { display: inline-block; animation: dot 1.2s ease-in-out infinite; }
.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

/* ── Fixed UI ───────────────────────────────────────────────────── */
.music {
  position: fixed;
  z-index: 60;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--paper);
  box-shadow: 0 4px 14px rgba(35, 70, 58, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.6);
  transition: opacity 0.5s ease, transform 0.5s var(--spring);
}
.music.is-visible { opacity: 1; pointer-events: auto; transform: scale(1); }
.music:active { transform: scale(0.92); }
.music__note { font-size: 20px; color: var(--ink); }
.music__bars { display: none; gap: 3px; align-items: flex-end; height: 16px; }
.music__bars i { width: 3px; height: 100%; border-radius: 2px; background-color: var(--red); transform-origin: bottom; animation: bars 0.9s ease-in-out infinite; }
.music__bars i:nth-child(2) { background-color: var(--gold-deep); animation-delay: 0.2s; }
.music__bars i:nth-child(3) { background-color: var(--green); animation-delay: 0.4s; }
.music.playing .music__note { display: none; }
.music.playing .music__bars { display: flex; }
@keyframes bars { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }

/* Language switch: a two-segment pill. Top-right from the envelope screen on;
   once the music button appears beside it, it slides left to make room. */
.lang {
  position: fixed;
  z-index: 9200;
  top: 16px;
  right: 14px;
  display: flex;
  padding: 3px;
  border-radius: 999px;
  background-color: var(--paper);
  box-shadow: 0 4px 14px rgba(35, 70, 58, 0.16);
  opacity: 0;
  transition: opacity 0.6s ease 0.6s, right 0.5s var(--ease-out);
}
html.is-ready .lang { opacity: 1; }
html.is-open .lang { right: 66px; z-index: 60; }
.lang__btn {
  min-width: 36px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-soft);
  transition: background-color 0.25s ease, color 0.25s ease;
}
.lang__btn[aria-pressed='true'] { background-color: var(--green); color: var(--paper); }

/* Snow sits over the intro and behind the content; confetti tops everything */
.snow { position: fixed; inset: 0; z-index: 9100; pointer-events: none; width: 100%; height: 100%; }
.is-open .snow { z-index: 1; }
.confetti { position: fixed; inset: 0; z-index: 9500; pointer-events: none; width: 100%; height: 100%; }

/* ── Site ───────────────────────────────────────────────────────── */
.site { position: relative; z-index: 2; overflow: hidden; padding-bottom: 20px; }

.sticker { position: absolute; pointer-events: none; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.8s ease, transform 0.9s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

.title { font-size: 28px; font-weight: 400; text-align: center; color: var(--ink); }

/* The card: white with a scalloped pine edge, built from a dot grid peeking
   out around it (cheaper and crisper on phones than an SVG frame). */
.card-wrap {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: 64px 18px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
}
.vh-lock .card-wrap { min-height: calc(var(--vh) * 100); }

.card {
  position: relative;
  width: 100%;
  padding: 28px 16px 24px;
  z-index: 0;
  border-radius: 22px;
  text-align: center;
}
.card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 22px;
  background-color: var(--paper);
  border: 3px solid var(--green);
}
.card::before {
  content: '';
  position: absolute;
  inset: -11px;
  z-index: -1;
  border-radius: 30px;
  background-image: radial-gradient(circle, var(--green) 8.5px, transparent 9px);
  background-size: 18px 18px;
  background-position: center;
}

.sticker--holly { width: 62px; top: -38px; left: -18px; transform: rotate(-14deg); animation: wobble 4s ease-in-out infinite; }
.sticker--star { width: 42px; top: 17%; right: -16px; animation: twinkle 2.6s ease-in-out infinite; }
.sticker--flake { width: 36px; top: 24%; left: -16px; animation: spin-slow 14s linear infinite; }
/* tucked on the bottom-right corner, outside the address column and clear of the CTA */
.sticker--candy { width: 28px; bottom: -40px; right: -14px; transform: rotate(16deg); }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes wobble { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(-6deg); } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.16) rotate(18deg); } }

.card__kicker { font-size: 16px; color: var(--green); }

/* Little tree scene: the tree sways from its trunk, gift and gingerbread at its feet */
.tree { position: relative; width: 190px; height: 118px; margin: 10px auto 0; }
.tree__main {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 86px;
  margin-left: -43px;
  transform-origin: 50% 100%;
  animation: tree-sway 3.6s ease-in-out infinite;
}
.tree__gift { position: absolute; left: 8px; bottom: 0; width: 50px; transform: rotate(-8deg); }
.tree__ginger { position: absolute; right: 6px; bottom: 2px; width: 48px; transform-origin: 50% 100%; animation: ginger-hop 2.8s ease-in-out infinite; }
@keyframes tree-sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes ginger-hop {
  0%, 70%, 100% { transform: translateY(0) rotate(8deg); }
  80% { transform: translateY(-10px) rotate(-4deg); }
  90% { transform: translateY(0) rotate(8deg) scale(1.06, 0.94); }
}

/* The title, shared by the paper in the envelope and the hero: each letter has its
   own colour. Hero copies stay invisible until their flying twin lands
   (script.js 4), then do a jelly squash from the bottom. */
.name { font-weight: 400; padding-top: 10px; }
.name__big { display: block; }
.name__line { display: block; font-size: 54px; line-height: 1.05; white-space: nowrap; }
.name__line--small { font-size: 32px; line-height: 1.1; }
/* letters stand straight (no tilt) with a hair of space, so neighbours never touch */
.name__big i {
  --tilt: 0deg;
  display: inline-block;
  margin: 0 1px;
  transform: rotate(var(--tilt));
  transform-origin: 50% 85%;
  text-shadow: 0 4px 0 rgba(35, 70, 58, 0.13);
}
.card .name__big i { opacity: 0; }
.card .name__big i.is-landed { opacity: 1; animation: jelly 0.75s ease-out; }
@keyframes jelly {
  0% { transform: rotate(var(--tilt)) scale(1.32, 0.68); }
  28% { transform: rotate(var(--tilt)) scale(0.84, 1.2); }
  48% { transform: rotate(var(--tilt)) scale(1.12, 0.9); }
  68% { transform: rotate(var(--tilt)) scale(0.96, 1.05); }
  100% { transform: rotate(var(--tilt)) scale(1); }
}
/* the flying copies, above the fading intro and the confetti */
.flyer {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9600;
  pointer-events: none;
  font-family: 'Brain Melt', 'Noto Sans Georgian', sans-serif;
  line-height: 1.05;
  white-space: nowrap;
  will-change: transform;
}
.name__line i:nth-child(4n+1) { color: var(--red); }
.name__line i:nth-child(4n+2) { color: var(--green); }
.name__line i:nth-child(4n+3) { color: var(--gold-deep); }
.name__line i:nth-child(4n+4) { color: var(--red-deep); }
.name__line--small i { color: var(--ink-soft) !important; }

.card__sub { margin-top: 6px; font-size: 16px; color: var(--ink-soft); transition-delay: 1.6s; }

.when {
  display: grid;
  grid-template-columns: 1fr 1fr 1.25fr;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px dashed var(--pine-pale);
}
.when__col { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 4px; }
.when__col + .when__col { border-left: 2px dashed var(--pine-pale); }
.when__small { font-size: 13px; color: var(--ink-soft); }
.when__big { font-size: 32px; line-height: 1.15; }
.when__big--word { font-size: 15px; line-height: 1.3; padding: 4px 0 2px; color: var(--green-deep); }
.when__big--red { color: var(--red); }
.when__big--green { color: var(--green); }
.when__map {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  color: var(--red-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
/* Map pin drawn as a CSS mask (not a ↗ / 📍 character: iOS swaps those for emoji
   art that clashes with the card). Tinted with the link colour. */
.when__map::before {
  content: '';
  flex: none;
  width: 13px;
  height: 13px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Primary action of the hero: jumps to the form. Appears after the title lands. */
.cta {
  align-self: center;
  padding: 15px 30px;
  border-radius: 999px;
  background-color: var(--red);
  color: var(--paper);
  font-size: 18px;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(176, 53, 58, 0.28);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s ease 1.8s, transform 0.8s var(--spring) 1.8s, background-color 0.2s ease;
}
.is-open .cta { opacity: 1; transform: none; }
.cta:active { background-color: var(--red-deep); transform: scale(0.97); }

/* ── RSVP ───────────────────────────────────────────────────────── */
.rsvp { position: relative; padding: 110px 18px 40px; }
.rsvp__teddy {
  position: absolute;
  z-index: 0;
  width: 150px;
  top: 6px;
  right: 22px;
  transform: translateY(46px) rotate(6deg);
  transition: transform 0.9s var(--spring) 0.4s;
}
.rsvp.is-in .rsvp__teddy { transform: translateY(0) rotate(6deg); }

.rsvp__card {
  position: relative;
  z-index: 1;
  padding: 26px 18px 24px;
  border-radius: 22px;
  background-color: var(--pine-pale);
  border: 3px solid var(--green);
}
.rsvp__lead { margin-top: 4px; text-align: center; font-size: 15px; color: var(--ink-soft); }
.rsvp__lead b { font-weight: 400; color: var(--red-deep); }

.form { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.field { display: flex; flex-direction: column; gap: 7px; border: 0; min-width: 0; }
.field label, .field legend, .field__label { font-size: 15px; color: var(--ink); }
.field legend { padding: 0; margin-bottom: 7px; }
.field input[type='text'], .kid input, .kid select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 2px solid #b9d6c7;
  border-radius: 14px;
  background-color: var(--paper);
  color: var(--ink);
  /* 16px+ keeps iOS from zooming the page on focus */
  font: 16px 'Brain Melt', 'Noto Sans Georgian', sans-serif;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field input:focus, .kid input:focus, .kid select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(47, 125, 91, 0.18); }
.is-invalid { border-color: var(--red) !important; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice__opt { position: relative; }
.choice__opt input { position: absolute; opacity: 0; pointer-events: none; }
.choice__opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 6px 8px;
  border: 2px solid #b9d6c7;
  border-radius: 14px;
  background-color: var(--paper);
  font-size: 15px;
  text-align: center;
  color: var(--ink);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s var(--spring);
}
.choice__opt input:checked + span { background-color: var(--green); border-color: var(--green); color: var(--paper); }
.choice__opt input:focus-visible + span { box-shadow: 0 0 0 3px rgba(47, 125, 91, 0.25); }
.choice__opt:active span { transform: scale(0.97); }

/* Yes-only block collapses with the grid-rows trick so its height animates.
   The inner padding/negative margin keeps focus rings from being clipped. */
.form__yes {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.45s var(--ease-out), opacity 0.3s ease;
}
.form__yes.is-collapsed { grid-template-rows: 0fr; opacity: 0; }
.form__yes-in { min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 4px; margin: -4px; }

.field--row { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.field__label small { display: block; font-size: 12px; color: var(--ink-soft); }

.stepper { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background-color: var(--paper); border: 2px solid #b9d6c7; }
.stepper__btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--pine-pale);
  color: var(--green-deep);
  font-size: 22px;
  line-height: 1;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.stepper__btn:active { transform: scale(0.9); background-color: #cfe5d9; }
.stepper__btn:disabled { opacity: 0.35; }
.stepper__val { min-width: 30px; text-align: center; font-size: 22px; color: var(--ink); }

.kids { display: flex; flex-direction: column; gap: 10px; }
.kid {
  display: grid;
  grid-template-columns: 1fr 104px;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background-color: var(--paper);
  animation: kid-in 0.45s var(--spring);
}
.kid__title { grid-column: 1 / -1; font-size: 14px; color: var(--green); }
.kid__field { display: flex; flex-direction: column; gap: 5px; }
.kid__field label { font-size: 13px; color: var(--ink-soft); }
.kid select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%232f7d5b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}
@keyframes kid-in { from { opacity: 0; transform: translateY(-8px) scale(0.97); } to { opacity: 1; transform: none; } }

.form__status { min-height: 20px; font-size: 14px; text-align: center; color: var(--red-deep); }
.form__status:empty { display: none; }

.btn {
  height: 54px;
  border-radius: 999px;
  background-color: var(--red);
  color: var(--paper);
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(176, 53, 58, 0.25);
  transition: background-color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}
.btn:active { transform: scale(0.98); background-color: var(--red-deep); }
.btn:disabled { opacity: 0.6; }

.thanks { padding: 10px 0 4px; text-align: center; animation: kid-in 0.6s var(--spring); }
.thanks__gift { width: 84px; margin: 6px auto 8px; animation: gift-wiggle 3s ease-in-out infinite; }
.thanks__title { font-size: 28px; color: var(--red); }
.thanks__text { margin-top: 6px; font-size: 16px; line-height: 1.5; color: var(--ink); }
.thanks__again {
  margin-top: 16px;
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}
@keyframes gift-wiggle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(4deg) translateY(-4px); } }

.rsvp__closed { margin-top: 18px; text-align: center; font-size: 17px; line-height: 1.5; color: var(--ink); }

/* ── Footer ─────────────────────────────────────────────────────── */
.footer { padding: 24px 18px 34px; text-align: center; }
.footer__name { font-size: 24px; color: var(--green); }
.credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-family: sans-serif;
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.3;
  transition: opacity 0.3s ease;
}
.credit:hover, .credit:active { opacity: 0.7; }
/* The logo is tinted through a mask so it takes the site's pine ink */
.credit__logo {
  width: 18px;
  height: 18px;
  background-color: var(--ink);
  -webkit-mask: url('logo-vector.svg') center / contain no-repeat;
  mask: url('logo-vector.svg') center / contain no-repeat;
}

/* Hold every intro animation until the loader clears */
html.is-loading *, html.is-loading *::before, html.is-loading *::after { animation-play-state: paused !important; }

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

/* ── Desktop: notice only (this invitation is built for phones) ── */
@media (min-width: 769px) {
  .desktop-notice {
    position: fixed;
    inset: 0;
    z-index: 10100;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    background-color: var(--cream);
  }
  .desktop-notice__logo { width: 52px; opacity: 0.8; }
  .desktop-notice p { font-size: 18px; color: var(--ink); text-align: center; padding: 0 32px; }
  .intro, .site, .music, .loader, .snow, .lang { display: none; }
}
