/* Tohfa (तोहफ़ा): a themed kids' party, wrapped as a present. Four skins chosen from the invitation's theme:
   jungle (explorer, safari...), space, ocean (sea, mermaid, pirate...) and carnival (the default big top).
   Opening: pull the ribbon tail; the bow slips, the ribbon falls, the lid pops off on a spring, a pop-up card
   rises with the name. Then: letter -> pass (scratch + countdown) -> route map (events) -> pack your kit -> RSVP.
   Lilita One (display), Andika (text, made for young readers), Kalam (Devanagari and handwriting). */

:root {
  --f-display: "Lilita One", "Arial Rounded MT Bold", Impact, sans-serif;
  --f-body: "Andika", "Trebuchet MS", system-ui, sans-serif;
  --f-hand: "Kalam", "Comic Sans MS", cursive;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --W: min(74vw, 300px, 37svh);
}

/* ---------- skins ---------- */
.tohfa--jungle {
  --bg: #f5f0dc; --bg-2: #e9e2c3; --paper: #fffbee; --ink: #1f3b2b; --ink-2: #4f6b55; --muted: #7d8a74;
  --accent: #e86a3a; --accent-2: #f2c14e; --accent-3: #2f7d4f;
  --wrap: radial-gradient(circle at 30% 30%, #f6a77f 0 5px, transparent 6px) 0 0 / 34px 34px, radial-gradient(circle at 70% 75%, #ffd27a 0 4px, transparent 5px) 0 0 / 34px 34px, #e86a3a;
  --ribbon: #2f7d4f; --ribbon-d: #215a39; --bag: #c98b4b; --head: #1f3b2b; --on-head: #fffbee;
}
.tohfa--space {
  --bg: #141842; --bg-2: #1c2157; --paper: #232a6b; --ink: #f3f1ff; --ink-2: #c7c3f2; --muted: #9a97cf;
  --accent: #ffd84d; --accent-2: #ff7ab6; --accent-3: #8fd3ff;
  --wrap: radial-gradient(circle at 25% 25%, #fff 0 1.6px, transparent 2.4px) 0 0 / 26px 26px, radial-gradient(circle at 70% 60%, #ffd84d 0 2.6px, transparent 3.4px) 0 0 / 38px 38px, linear-gradient(135deg, #6c4bd6, #4930a8);
  --ribbon: #ffd84d; --ribbon-d: #d9ae18; --bag: #6c4bd6; --head: #ffd84d; --on-head: #141842;
}
.tohfa--ocean {
  --bg: #e7f8fa; --bg-2: #d2f0f4; --paper: #ffffff; --ink: #0f3d4c; --ink-2: #3c6876; --muted: #6b8f99;
  --accent: #ff7a6b; --accent-2: #ffcf5c; --accent-3: #2ec4d6;
  --wrap: radial-gradient(20px 10px at 50% 0, transparent 70%, rgba(255, 255, 255, .5) 72% 86%, transparent 88%) 0 0 / 40px 22px, #157f99;
  --ribbon: #ff7a6b; --ribbon-d: #d65a4c; --bag: #ffcf5c; --head: #0f3d4c; --on-head: #e7f8fa;
}
.tohfa--carnival {
  --bg: #fdf0d5; --bg-2: #f8e2b5; --paper: #fffaf0; --ink: #3a1d1d; --ink-2: #6b3d3d; --muted: #93706a;
  --accent: #e63946; --accent-2: #ffd166; --accent-3: #06aed5;
  --wrap: repeating-linear-gradient(135deg, #e63946 0 16px, #fffaf0 16px 32px);
  --ribbon: #06aed5; --ribbon-d: #04809e; --bag: #e63946; --head: #3a1d1d; --on-head: #fdf0d5;
}
.tohfa {
  --fx-music-bg: var(--accent); --fx-music-ring: var(--accent-2); --fx-music-ink: #fff; --fx-bg: var(--paper);
}

html { scroll-behavior: smooth; }
html.shut, html.shut body { overflow: hidden; }
body { background: var(--bg); color: var(--ink); font: 400 18px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[lang="hi"] { font-family: var(--f-hand); }
.w { display: inline-block; white-space: nowrap; }

/* =================================================================== OPENING */

.gate {
  position: relative; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(48px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
}
.scene { position: absolute; inset: 0; z-index: -1; }
.scene__svg { width: 100%; height: 100%; display: block; }

.gate__ask { position: relative; z-index: 6; max-width: 420px; text-align: center; transition: opacity .5s, translate .5s var(--ease); }
.gate__to { display: inline-block; margin-bottom: 8px; padding: 3px 12px; border-radius: 6px; background: var(--paper); color: var(--ink); font: 700 16px/1.3 var(--f-body); }
.gate__title {
  font: 400 clamp(30px, 8.6vw, 44px)/1.05 var(--f-display); color: #fff; letter-spacing: .01em;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .25), 0 0 20px rgba(0, 0, 0, .15);
}
.gate__sub { margin-top: 8px; font: 700 20px/1.2 var(--f-hand); color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.tohfa--carnival .gate__title, .tohfa--carnival .gate__sub { color: var(--ink); text-shadow: 0 2px 0 rgba(255, 255, 255, .7); }
.gate.opened .gate__ask { opacity: 0; translate: 0 -20px; pointer-events: none; }

.gift { position: relative; z-index: 2; width: var(--W); height: calc(var(--W) * 1.62); margin-top: -18px; }

/* the box */
.box { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--W) * .84); }
.box::after {         /* its shadow on the floor */
  content: ""; position: absolute; left: -4%; right: -4%; bottom: -14px; height: 26px; border-radius: 50%; z-index: 0;
  background: radial-gradient(closest-side, rgba(0, 0, 0, .32), transparent);
}
.box__body {
  position: absolute; z-index: 3; left: 4%; right: 4%; bottom: 0; height: 77%; border-radius: 6px 6px 10px 10px; overflow: hidden;
  background: var(--wrap); box-shadow: inset -14px 0 0 rgba(0, 0, 0, .1), inset 0 10px 14px -8px rgba(0, 0, 0, .3), 0 14px 30px -10px rgba(0, 0, 0, .35);
}
.box__shine { position: absolute; left: 8%; top: 10%; bottom: 10%; width: 7%; border-radius: 6px; background: rgba(255, 255, 255, .22); }
.lid {
  position: absolute; z-index: 4; left: 0; right: 0; top: 0; height: 26%; border-radius: 7px; overflow: hidden;
  background: var(--wrap); box-shadow: inset -14px 0 0 rgba(0, 0, 0, .1), 0 7px 0 rgba(0, 0, 0, .14);
  transform-origin: 30% 100%;
}
.box__band { position: absolute; top: 0; bottom: 0; left: 50%; width: 15%; translate: -50% 0; background: var(--ribbon); box-shadow: inset -4px 0 0 var(--ribbon-d); transition: translate .5s var(--ease), opacity .4s; }
.bow { position: absolute; z-index: 5; left: 50%; bottom: calc(100% - 10px); width: 60%; translate: -50% 0; overflow: visible; }
.bow path, .bow ellipse { fill: var(--ribbon); }
.bow__knot { fill: var(--ribbon-d) !important; }
.bow__l, .bow__r { transform-box: fill-box; transition: transform .2s; }
.bow__l { transform-origin: 100% 70%; transform: scale(calc(1 - var(--pull, 0) * .45)) rotate(calc(var(--pull, 0) * 14deg)); }
.bow__r { transform-origin: 0% 70%; transform: scale(calc(1 - var(--pull, 0) * .45)) rotate(calc(var(--pull, 0) * -14deg)); }
.gate[data-phase="idle"] .bow { animation: wiggle 3.2s ease-in-out 1.5s infinite; }
@keyframes wiggle { 0%, 80%, 100% { rotate: 0deg; } 85% { rotate: -5deg; } 90% { rotate: 4deg; } 95% { rotate: -2deg; } }
.box__tag {
  position: absolute; z-index: 6; left: 2%; bottom: 14%; width: 42%; padding: 8px 10px 8px 18px; rotate: -6deg;
  background: var(--paper); color: var(--ink); border-radius: 4px 10px 10px 4px; clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
  font: 700 clamp(11px, 3.2vw, 14px)/1.25 var(--f-hand); box-shadow: 0 4px 0 rgba(0, 0, 0, .12);
}
.box__tag::before { content: ""; position: absolute; left: 6px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--bg-2); }

/* the ribbon tail: drag it down */
.tail {
  position: absolute; z-index: 7; left: calc(50% + 6px); top: calc(100% - var(--W) * .84 + 8px);
  width: 56px; height: calc(var(--W) * .7 + var(--pull, 0) * 110px); margin-left: -6px; padding: 0; border: 0; background: none;
  cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent; transform-origin: 6px 0; rotate: -16deg;
  user-select: none; -webkit-user-select: none;
}
.gate.is-pulling .tail { cursor: grabbing; }
.tail__ribbon { position: absolute; left: 0; top: 0; bottom: 26px; width: 13px; background: var(--ribbon); box-shadow: inset -3px 0 0 var(--ribbon-d); border-radius: 0 0 2px 2px; }
.tail__end { position: absolute; left: 0; bottom: 6px; width: 13px; height: 22px; background: var(--ribbon); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 70%, 0 100%); }
.tail__hint {
  position: absolute; left: 18px; bottom: 0; padding: 6px 12px; border-radius: 999px; rotate: 16deg;
  background: #fff; color: #222; font: 400 17px/1 var(--f-display); letter-spacing: .04em; box-shadow: 0 4px 0 rgba(0, 0, 0, .2);
  animation: tug 1.6s ease-in-out infinite;
}
.tail__hint::before { content: "↓ "; }
@keyframes tug { 50% { translate: 0 8px; } }
.gate:not([data-phase="idle"]) .tail__hint { animation: none; opacity: 0; transition: opacity .2s; }

/* the opening, in steps */
.gate.untie .bow__l { transform: translate(-60px, -30px) rotate(-60deg) scale(.4); opacity: 0; transition: transform .6s var(--ease), opacity .5s; }
.gate.untie .bow__r { transform: translate(60px, -30px) rotate(60deg) scale(.4); opacity: 0; transition: transform .6s var(--ease), opacity .5s; }
.gate.untie .bow__knot { opacity: 0; transition: opacity .3s; }
.gate.untie .tail { translate: 0 120vh; rotate: 30deg; transition: translate .9s cubic-bezier(.5, 0, .9, .5), rotate .9s; pointer-events: none; }
.gate.untie .box__band { translate: -50% 110%; opacity: 0; }
.gate.untie .lid .box__band { translate: -50% -110%; }
.gate.pop .lid { animation: lidpop 1.1s cubic-bezier(.3, .6, .4, 1) forwards; }
@keyframes lidpop {
  0% { transform: none; }
  12% { transform: translateY(8%) scaleY(.9); }
  45% { transform: translate(-30%, -260%) rotate(-28deg); }
  100% { transform: translate(-160%, 120%) rotate(-80deg); opacity: 0; }
}

/* the pop-up card */
.card {
  position: absolute; z-index: 2; left: 7%; right: 7%; bottom: calc(var(--W) * .34); height: calc(var(--W) * 1.26);
  padding: calc(var(--W) * .05) 12px 0; border-radius: 14px; text-align: center;
  background: var(--paper); color: var(--ink); box-shadow: 0 -6px 30px rgba(0, 0, 0, .22);
  border: 4px solid var(--accent-2);
  visibility: hidden; transform: translateY(80%) scale(.9);
}
.card::before {          /* a little pop-up hinge strip */
  content: ""; position: absolute; left: 10%; right: 10%; top: 8px; height: 6px; border-radius: 6px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 10px, transparent 10px 18px); opacity: .5;
}
.gate.opened .card { visibility: visible; transform: none; transition: transform 1s var(--spring); }
.card__kick { display: inline-block; margin-top: 8px; padding: 4px 12px; border-radius: 999px; background: var(--accent); color: #fff; font: 400 clamp(14px, 4.2vw, 18px)/1.2 var(--f-display); letter-spacing: .03em; }
.tohfa--space .card__kick { color: var(--on-head); }
.card__hi { margin-top: 6px; font: 700 clamp(18px, 5vw, 24px)/1.2 var(--f-hand); color: var(--ink-2); }
.card__name { margin: 2px 0 0; font: 400 clamp(46px, 15vw, 70px)/1 var(--f-display); color: var(--ink); letter-spacing: .01em; }
.card__age { margin-top: 2px; font: 700 clamp(18px, 5vw, 22px)/1.2 var(--f-hand); color: var(--ink-2); }
.card__age b { display: inline-grid; place-items: center; min-width: 1.8em; height: 1.8em; margin-left: 4px; padding: 0 .3em; border-radius: 999px; background: var(--accent-2); color: var(--head); font: 400 1.3em/1 var(--f-display); vertical-align: middle; }
.tohfa--space .card__age b { color: var(--on-head); }
.card__when { margin-top: 10px; font: 700 15px/1.35 var(--f-body); color: var(--ink-2); }
.card__when span { white-space: nowrap; }

.gate__more {
  position: relative; z-index: 6; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; margin-top: 26px; padding: 0 22px; border-radius: 999px;
  background: var(--head); color: var(--on-head); text-decoration: none; font: 400 17px/1 var(--f-display); letter-spacing: .03em;
  opacity: 0; pointer-events: none; box-shadow: 0 5px 0 rgba(0, 0, 0, .2);
}
.gate.opened .gate__more { opacity: 1; pointer-events: auto; transition: opacity .6s ease .9s; }
.gate__more span { animation: tug 1.5s ease-in-out infinite; }

.gate__skip {
  position: absolute; z-index: 8; left: calc(14px + env(safe-area-inset-left)); bottom: calc(14px + env(safe-area-inset-bottom));
  min-height: 44px; min-width: 60px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  border: 2px solid rgba(255, 255, 255, .8); background: rgba(0, 0, 0, .28); color: #fff; font: 700 14px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase;
}
html:not(.shut) .gate__skip { display: none; }
.gate.instant *, .gate.instant { transition: none !important; animation: none !important; }
.gate.instant.pop .lid, .gate.done .lid { opacity: 0; }

/* =================================================================== SECTIONS */

.sec { position: relative; padding: 80px 20px; }
.sec > * { max-width: 560px; margin-inline: auto; }
.eyebrow { font: 700 22px/1.2 var(--f-hand); color: var(--accent); }
.sec__title { margin: 6px 0 0; font: 400 clamp(36px, 10vw, 52px)/1.04 var(--f-display); letter-spacing: .005em; text-wrap: balance; }
.hl { color: var(--accent); }

/* --- letter --- */
.sec--letter { background: var(--bg); }
.letter {
  position: relative; padding: 32px 22px 28px; border-radius: 4px; background: var(--paper);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .05), 0 20px 40px -24px rgba(0, 0, 0, .4);
  border: 1px solid rgba(0, 0, 0, .06);
}
.letter::before {        /* airmail stripes */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  border: 7px solid transparent;
  border-image: repeating-linear-gradient(135deg, var(--accent) 0 12px, transparent 12px 20px, var(--accent-3) 20px 32px, transparent 32px 40px) 7;
}
.letter .sec__title { padding-right: 64px; font-size: clamp(30px, 8vw, 42px); }
.letter__msg { margin-top: 18px; font: 400 23px/1.45 var(--f-hand); color: var(--ink); }
.letter__sign { margin-top: 18px; font: 400 20px/1.4 var(--f-hand); color: var(--ink-2); }
.letter__sign b { font-weight: 700; color: var(--ink); }
.letter__bless { margin-top: 10px; font: italic 400 17px/1.5 var(--f-body); color: var(--muted); }
.letter__photo { display: block; width: 70%; margin: 18px auto 0; border-radius: 10px; border: 6px solid #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .2); rotate: 2deg; }
.stamp {
  position: absolute; top: 18px; right: 18px; display: grid; place-items: center; width: 62px; height: 72px;
  background: var(--accent-2) padding-box; color: var(--head); font: 400 32px/1 var(--f-display); rotate: 6deg;
  border: 5px dotted var(--paper); box-shadow: 0 0 0 1px rgba(0, 0, 0, .06), 0 3px 6px rgba(0, 0, 0, .12);
}
.stamp::after { content: ""; position: absolute; inset: 4px; border: 1.5px solid currentColor; opacity: .35; }
.tohfa--space .stamp { color: var(--on-head); }

/* --- the pass --- */
.sec--pass { background: var(--bg-2); text-align: center; }
.pass {
  position: relative; margin: 26px auto 0; max-width: 380px; padding: 0 0 18px; border-radius: 18px; overflow: hidden; text-align: left;
  background: var(--paper); box-shadow: 0 18px 36px -20px rgba(0, 0, 0, .5);
}
.pass__top { display: flex; justify-content: space-between; padding: 14px 18px; background: var(--head); color: var(--on-head); font: 400 16px/1 var(--f-display); letter-spacing: .06em; text-transform: uppercase; }
.pass__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 18px; border-bottom: 2px dashed rgba(127, 127, 127, .3); }
.pass small { display: block; font: 700 11px/1.4 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.pass__row b { font: 700 17px/1.3 var(--f-body); }
.pass .scratch { margin: 18px 18px 0; border-radius: 12px; }
.sd { display: flex; align-items: center; gap: 14px; min-height: 108px; padding: 12px 16px; border-radius: 12px; background: var(--bg-2); }
.sd__day { font: 400 70px/.9 var(--f-display); color: var(--accent); }
.sd__meta { display: flex; flex-direction: column; font: 700 15px/1.4 var(--f-body); color: var(--ink-2); }
.sd__meta b { font: 400 24px/1.1 var(--f-display); color: var(--ink); }
.pass__count { padding: 22px 18px 0; text-align: center; }
.count { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.count span { display: grid; gap: 2px; min-width: 64px; padding: 8px 4px; border-radius: 10px; background: var(--bg-2); font: 700 12px/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.count b { font: 400 30px/1 var(--f-display); color: var(--ink); }
.count__done { margin-top: 12px; font: 400 24px/1.2 var(--f-display); color: var(--accent); }
.scratch__hint { margin-top: 16px; font: 700 18px/1.3 var(--f-hand); color: var(--muted); }

/* --- the route --- */
.sec--route { background: var(--bg); }
.route { position: relative; list-style: none; margin: 30px auto 0; padding: 0 0 0 44px; }
.route::before {
  content: ""; position: absolute; left: 18px; top: 20px; bottom: 26px; width: 0;
  border-left: 4px dashed var(--accent);
}
.stop { position: relative; margin-bottom: 26px; }
.stop__pin {
  position: absolute; left: -44px; top: 4px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); color: #fff; font: 400 20px/1 var(--f-display); box-shadow: 0 4px 0 rgba(0, 0, 0, .18);
}
.stop__pin::after { content: ""; position: absolute; left: 50%; bottom: -8px; translate: -50% 0; border: 7px solid transparent; border-bottom: 0; border-top: 10px solid var(--accent); }
.stop__card { padding: 18px 18px 16px; border-radius: 16px; background: var(--paper); box-shadow: 0 14px 30px -20px rgba(0, 0, 0, .45); border: 1px solid rgba(127, 127, 127, .14); }
.stop__hi { font: 700 20px/1.2 var(--f-hand); color: var(--accent); }
.stop__name { margin: 2px 0 0; font: 400 28px/1.1 var(--f-display); }
.stop__when { margin-top: 8px; font: 700 17px/1.45 var(--f-body); }
.stop__where { margin-top: 6px; font: 400 17px/1.45 var(--f-body); color: var(--ink-2); }
.stop__where b { color: var(--ink); }
.stop__note { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--bg-2); font: 400 16px/1.5 var(--f-body); }
.stop__dress { margin-top: 8px; font: 400 16px/1.5 var(--f-body); }
.stop__dress small { font: 700 11px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.stop__links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 15px; border-radius: 12px; border: 2px solid var(--ink); text-decoration: none; font: 700 14px/1 var(--f-body); }
.btn--solid { background: var(--ink); color: var(--bg); }
.stop--x { display: flex; align-items: center; min-height: 44px; margin-bottom: 0; }
.stop--x .stop__pin { background: var(--head); color: var(--on-head); }
.stop--x .stop__pin::after { display: none; }
.stop__end { font: 700 22px/1.2 var(--f-hand); color: var(--accent); }

/* --- the kit --- */
.sec--kit { background: var(--bg-2); }
.kit__ask { margin-top: 8px; color: var(--ink-2); }
.kit__grid { display: grid; grid-template-columns: 110px 1fr; gap: 16px; align-items: center; margin-top: 22px; }
.bag { width: 110px; height: auto; overflow: visible; }
.bag__strap { stroke: var(--ink); }
.bag__body { fill: var(--bag); }
.bag__fill { fill: var(--accent-2); opacity: .55; transform: translateY(calc((1 - var(--packed, 0)) * 100%)); transform-box: fill-box; transition: transform .5s var(--spring); }
.bag__clip { fill: var(--ink); opacity: .6; }
.bag__n { font: 400 22px/1 var(--f-display); fill: #fff; }
.bag.gulp { animation: gulp .45s var(--spring); }
@keyframes gulp { 40% { transform: scale(1.08, .94); } }
.kit__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.item {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 8px 12px; border-radius: 12px; cursor: pointer; text-align: left;
  border: 2px solid rgba(127, 127, 127, .3); background: var(--paper); color: var(--ink); font: 700 16px/1.25 var(--f-body);
  transition: background .2s, border-color .2s, translate .2s;
}
.item__tick { flex: none; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--muted); position: relative; }
.item[aria-pressed="true"] { border-color: var(--accent-3); background: color-mix(in srgb, var(--accent-3) 14%, var(--paper)); }
.item[aria-pressed="true"] .item__tick { background: var(--accent-3); border-color: var(--accent-3); }
.item[aria-pressed="true"] .item__tick::after { content: ""; position: absolute; left: 6px; top: 1px; width: 6px; height: 12px; border: solid #fff; border-width: 0 3px 3px 0; rotate: 45deg; }
.item:active { translate: 0 2px; }
.kit__done { margin-top: 18px; padding: 12px 16px; border-radius: 14px; background: var(--head); color: var(--on-head); font: 400 22px/1.25 var(--f-display); text-align: center; animation: fxRise .6s var(--spring); }

/* --- gallery --- */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }

/* --- rsvp --- */
.sec--rsvp { text-align: center; padding-block: 96px; background: var(--bg); }
.rsvp__ask { margin-top: 10px; color: var(--ink-2); }
.go {
  display: inline-flex; align-items: center; min-height: 60px; margin-top: 26px; padding: 0 30px; border-radius: 18px;
  background: var(--accent); color: #fff; text-decoration: none; font: 400 24px/1 var(--f-display); letter-spacing: .02em;
  box-shadow: 0 6px 0 rgba(0, 0, 0, .25); transition: translate .12s, box-shadow .12s;
}
.tohfa--space .go { color: var(--on-head); }
.go:active { translate: 0 4px; box-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.rsvp__no { display: flex; justify-content: center; align-items: center; min-height: 44px; margin-top: 14px; color: var(--ink-2); font-size: 16px; text-underline-offset: 4px; }
.rsvp__tag { margin-top: 18px; font: 400 22px/1 var(--f-display); color: var(--accent); }

/* --- footer --- */
.foot { padding: 56px 20px calc(90px + env(safe-area-inset-bottom)); text-align: center; background: var(--head); color: var(--on-head); }
.foot__name { font: 400 34px/1.1 var(--f-display); }
.foot__hosts { margin-top: 6px; opacity: .85; font-size: 16px; }
.foot__cal { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 12px; margin-top: 14px; font: 700 15px/1 var(--f-body); }
.foot__cal a { display: inline-flex; align-items: center; min-height: 44px; }
.foot__music, .foot__credit { margin-top: 8px; font: 400 13px/1.5 var(--f-body); opacity: .75; }
.up { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; font: 700 13px/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; }

@media (min-width: 900px) {
  :root { --W: min(320px, 40svh); }
  .sec { padding-block: 110px; }
  .letter { padding: 44px 44px 36px; }
}
@media (prefers-reduced-motion: reduce) {
  .gate.opened .card { visibility: visible; transform: none; }
  .gate.pop .lid { opacity: 0; }
}

/* =================================================================== LINK-PREVIEW CARD */
.ogcard { font-family: var(--f-body); color: #fff; }
.og__scene { position: absolute; inset: 0; }
.og__scene .scene__svg { width: 100%; height: 100%; }
.og__gift { position: absolute; left: 80px; bottom: 70px; width: 380px; height: 330px; --W: 380px; }
.og__gift .box { height: 320px; }
.og__text {
  position: absolute; right: 50px; top: 50%; translate: 0 -50%; width: 640px; padding: 34px 40px; border-radius: 26px;
  background: var(--paper); color: var(--ink); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); border: 6px solid var(--accent-2);
}
.og__kick { display: inline-block; padding: 6px 18px; border-radius: 999px; background: var(--accent); color: #fff; font: 400 30px/1.2 var(--f-display); }
.tohfa--space .og__kick, .tohfa--space .og__age b { color: var(--on-head); }
.og__name { margin-top: 10px; font: 400 128px/1 var(--f-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.og__age { margin-top: 4px; font: 700 40px/1.2 var(--f-hand); color: var(--ink-2); }
.og__age b { display: inline-grid; place-items: center; min-width: 76px; height: 76px; border-radius: 999px; background: var(--accent-2); color: var(--head); font: 400 52px/1 var(--f-display); vertical-align: middle; }
.og__date { margin-top: 14px; font: 700 28px/1.25 var(--f-body); white-space: nowrap; }
.og__venue { margin-top: 4px; font: 400 26px/1.25 var(--f-body); color: var(--ink-2); }
