/* Nawala invitation skeleton. One structure for every theme.
   A theme kit (theme-<name>.css) supplies the tokens, the scenery (--plate and --fg per scene) and the ornaments.
   The invitation is a guided walk: one swipe, one step. Each step is one clear glass panel standing in the scenery,
   with the scenery's own moss and flowers in front of its base. Nawala flies from step to step, and a band of light
   carries every change of scene.
   Levels: html[data-lv="1|2|3"] (Dasar, Menengah, Maksimal) leaves out steps and blocks marked data-level above it.
   Speed rules: only transform and opacity move, no blur on phones, scenery loads one scene ahead. */

@font-face{font-family:"Fraunces";src:url("../assets/fonts/fraunces.woff2") format("woff2");font-weight:100 900;font-display:swap}
@font-face{font-family:"Jakarta";src:url("../assets/fonts/jakarta.woff2") format("woff2");font-weight:200 800;font-display:swap}

:root{
  /* defaults; a kit overrides what it needs */
  --ink:#1D241F; --deep:#0C1D13; --main:#16301F; --soft:#4F7A3A;
  --paper:#FBF6EA; --mist:#F4EFE2;
  --accent:#D8436B; --accent-soft:#F4A6C0; --accent-wash:#FBDCE6; --light:#F6C445;
  --display:"Fraunces",Georgia,serif;
  --body:"Jakarta",system-ui,-apple-system,"Segoe UI",sans-serif;
  --col:480px;
  --sh:100vh;            /* stage height; invite.js pins it in pixels so the keyboard cannot squeeze the scenery */
  --ease:cubic-bezier(.2,.8,.2,1);
  --spring:cubic-bezier(.3,1.35,.5,1);
  --bar:78px;            /* room kept for the bottom bar */
  --world:.5581;         /* scenery width / height (720 / 1290) */
}
@supports (height:100dvh){:root{--sh:100dvh}}

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;background:var(--deep)}
body{margin:0;color:var(--ink);font:400 1.0625rem/1.5 var(--body);-webkit-font-smoothing:antialiased;background:var(--deep)}
img,svg,video{display:block;max-width:100%}
h1,h2,h3,p,ul,ol,figure{margin:0}
ul,ol{padding:0;list-style:none}
a{color:inherit}
button,input,textarea{font:inherit;color:inherit}
h1,h2,h3{font-family:var(--display);font-weight:560;letter-spacing:-.02em;line-height:1.08;text-wrap:balance}
p{text-wrap:pretty}
:focus-visible{outline:3px solid var(--light);outline-offset:3px;border-radius:10px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
[hidden]{display:none!important}

html[data-lv="1"] [data-level="2"],html[data-lv="1"] [data-level="3"],html[data-lv="2"] [data-level="3"]{display:none!important}

.js,.js body{height:100%;overflow:hidden;overscroll-behavior:none}
@media (min-width:700px){
  body{background:var(--deep) var(--backdrop,none) 50% 50%/cover fixed}
  body::before{content:"";position:fixed;inset:0;background:var(--backdrop-veil,rgba(12,29,19,.74))}
}

/* ---------- Buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.55rem;text-align:center;line-height:1.2;min-height:50px;padding:.6rem 1.4rem;border-radius:999px;font-weight:650;font-size:1.0625rem;text-decoration:none;border:0;cursor:pointer;transition:transform .25s var(--spring),background-color .3s,box-shadow .3s;-webkit-tap-highlight-color:transparent}
.btn:active{transform:scale(.96)}
.btn svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.btn--main{color:var(--paper);background:var(--main);box-shadow:0 12px 26px -14px rgba(12,29,19,.9)}
.btn--seal{color:var(--main);background:var(--paper);box-shadow:0 0 0 2px var(--accent-soft),0 14px 30px -12px rgba(216,67,107,.75)}
.btn--glass{color:inherit;background:rgba(255,255,255,.2);box-shadow:inset 0 0 0 1.5px currentColor}
.btn--wide{width:100%}

/* ---------- The stage ---------- */
.stage{position:relative;max-width:var(--col);margin-inline:auto;background:var(--mist)}
.js .stage{position:fixed;top:0;left:50%;width:100%;height:var(--sh);transform:translateX(-50%);overflow:hidden;touch-action:none;background:var(--deep);--dir:1}
@media (min-width:700px){.js .stage{box-shadow:0 0 0 1px rgba(255,255,255,.08),0 40px 120px -20px rgba(0,0,0,.7)}}

/* scenery and its front layer share one box: as wide as needed to cover, standing on the bottom edge */
.worlds,.fronts{display:none}
.js .worlds,.js .fronts{display:block;position:absolute;inset:0;pointer-events:none}
.fit{position:absolute;left:50%;bottom:0;width:max(100%,calc(var(--sh) * var(--world)));aspect-ratio:720/1290;margin-left:calc(max(100%,calc(var(--sh) * var(--world))) / -2);opacity:0;will-change:transform,opacity;transition:transform 1.5s var(--ease)}
.fit.is-on{opacity:1}
.fade-scenes .fit{transition:transform 1.5s var(--ease),opacity .5s}
.world{transform-origin:50% 62%;transform:scale(var(--cam,1));background:var(--tone,var(--deep)) 50% 100%/100% 100% no-repeat}
.world.is-near{background-image:var(--plate)}
.world::after{content:"";position:absolute;inset:0;background:var(--shade,none)}
.front{transform-origin:50% 100%;transform:scale(var(--camf,1));background:50% 100%/100% auto no-repeat}
.front.is-near{background-image:var(--fg)}
.fronts{z-index:3}

/* little creatures, moved with transforms only, and only while their scene is showing */
.critters{position:absolute;inset:0;overflow:hidden}
.critters i{position:absolute;display:block}
.world:not(.is-on) .critters i,.world:not(.is-on) .critters i::before{animation-play-state:paused}

/* ---------- Steps ---------- */
.steps{position:relative;z-index:2}
.step{position:relative;padding:2rem 1rem;display:flex;flex-direction:column;gap:1rem}
.js .steps{position:absolute;inset:0;transition:transform .35s var(--ease)}
.js .step{position:absolute;inset:0;justify-content:flex-end;gap:.8rem;padding:calc(max(.8rem,env(safe-area-inset-top)) + 3.9rem) 1rem calc(var(--bar) + max(.7rem,env(safe-area-inset-bottom)) + .7rem);
  opacity:0;visibility:hidden;pointer-events:none;transform:translate3d(0,calc(var(--dir) * 54px),0);
  transition:opacity .4s ease,transform .75s var(--ease),visibility 0s .45s}
.js .step.is-on{opacity:1;visibility:visible;pointer-events:auto;transform:none;transition:opacity .55s ease .14s,transform .85s var(--ease) .14s,visibility 0s}
.js .step.is-out{opacity:0;transform:translate3d(0,calc(var(--dir) * -44px),0)}
/* what is inside a panel arrives line by line */
.js .pane > *{opacity:0;transform:translate3d(0,14px,0);transition:opacity .5s ease,transform .7s var(--ease)}
.js .step.is-on .pane > *{opacity:1;transform:none;transition-delay:calc(.26s + var(--i,0) * 70ms)}
.pane > :nth-child(2){--i:1}.pane > :nth-child(3){--i:2}.pane > :nth-child(4){--i:3}.pane > :nth-child(5){--i:4}.pane > :nth-child(6){--i:5}.pane > :nth-child(n+7){--i:6}

/* ---------- The panel: a clear acrylic sheet ----------
   Premium kits tint it to their world with --glass (light scenes), --glass-d (dim scenes) and --glass-rim (r,g,b).
   Exclusive kits replace it with a material of their own (see their theme files). */
.pane{position:relative;display:flex;flex-direction:column;gap:.75rem;min-height:0;padding:1.4rem 1.25rem calc(1.7rem + var(--sink,0px));border-radius:30px;color:var(--main);
  background:linear-gradient(168deg,rgba(var(--glass,255,255,255),.5),rgba(var(--glass,255,255,255),.32) 36%,rgba(var(--glass,255,255,255),.68));
  box-shadow:inset 0 0 0 1.5px rgba(var(--glass-rim,255,255,255),.72),inset 0 2px 0 rgba(255,255,255,.95),inset 0 -24px 40px -26px rgba(255,255,255,.5),0 30px 60px -34px rgba(12,29,19,.55);
  text-shadow:0 1px 12px rgba(255,255,255,.75)}
.pane::before{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:1!important;transform:none!important;
  background:linear-gradient(112deg,rgba(255,255,255,0) 22%,rgba(255,255,255,.26) 34%,rgba(255,255,255,0) 46%,rgba(255,255,255,0) 68%,rgba(255,255,255,.12) 76%,rgba(255,255,255,0) 84%)}
/* the sheet has no bottom edge: glass, border and sheen dissolve into the scenery before the moss in front of it begins,
   so nothing ends in a hard line (the mask is still, never animated) */
.js .pane{-webkit-mask-image:linear-gradient(180deg,#000 0,#000 calc(100% - var(--sink,0px) - 1.6rem),rgba(0,0,0,.35) calc(100% - var(--sink,0px) * .45 - .6rem),rgba(0,0,0,0) calc(100% - .15rem));
  mask-image:linear-gradient(180deg,#000 0,#000 calc(100% - var(--sink,0px) - 1.6rem),rgba(0,0,0,.35) calc(100% - var(--sink,0px) * .45 - .6rem),rgba(0,0,0,0) calc(100% - .15rem))}
.pane > *{position:relative}
.js .step > .pane,.js .person > .pane{flex:0 1 auto;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;scrollbar-width:none}
.js .pane::-webkit-scrollbar{display:none}
html:not(.js) .pane{color:var(--main);text-shadow:none;background:#fff;box-shadow:0 10px 30px -18px rgba(12,29,19,.5)}
.pane--center{text-align:center;align-items:center}
.pane h2{font-size:clamp(1.5rem,6.6vw,1.9rem)}
.pane h3{font-size:1.25rem}
.pane__seal{width:36px;height:36px;color:var(--accent);flex:none}
/* on dim scenery the sheet is clearer still and the writing is light */
[data-tone="dark"] .pane{color:var(--paper);background:linear-gradient(158deg,rgba(var(--glass-d,255,255,255),.2),rgba(var(--glass-d,255,255,255),.05) 46%,rgba(var(--glass-d,255,255,255),.13));
  box-shadow:inset 0 0 0 1.5px rgba(var(--glass-rim,255,255,255),.5),inset 0 2px 0 rgba(255,255,255,.8),inset 0 -24px 40px -26px rgba(255,255,255,.22),0 30px 60px -34px rgba(0,0,0,.8);
  text-shadow:0 1px 14px rgba(8,18,12,.85)}
[data-tone="dark"] .pane__seal{color:var(--accent-soft)}
@media (min-width:900px){.pane{-webkit-backdrop-filter:blur(7px) saturate(130%);backdrop-filter:blur(7px) saturate(130%)}}
.quiet{opacity:.86}
.small{font-size:.9375rem;line-height:1.45}
.scrolls{overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;-webkit-overflow-scrolling:touch;min-height:0}
.on-plate{text-align:center;color:var(--paper);text-shadow:0 2px 18px rgba(8,18,12,.7)}
[data-tone="light"] .on-plate{color:var(--main);text-shadow:0 1px 14px rgba(255,255,255,.8)}
[data-tone="dark"] .cover{color:var(--paper);text-shadow:0 2px 18px rgba(8,10,12,.75)}
[data-tone="dark"] .cover h1 i{color:var(--accent-soft)}

/* ---------- Opening: Nawala brings the letter with the guest's name ---------- */
.gate{display:none}
.js .gate{position:fixed;z-index:80;top:0;height:var(--sh);left:50%;width:100%;max-width:var(--col);transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;overflow:hidden;color:var(--gate-ink,var(--main));background:var(--mist);transition:opacity .8s ease}
.gate__plate{position:absolute;inset:0;background:var(--plate-gate) 50% 100%/cover no-repeat;transition:transform 1.6s var(--ease)}
.gate__film{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 100%;opacity:0;transition:opacity .45s}
.gate__shade{position:absolute;inset:0;background:var(--gate-shade,linear-gradient(180deg,rgba(244,239,226,.5) 0,rgba(244,239,226,0) 30%,rgba(12,29,19,0) 62%,rgba(12,29,19,.82) 100%));transition:opacity .6s}
.gate__head{position:relative;margin-top:max(9vh,calc(env(safe-area-inset-top) + 2.2rem));text-align:center;padding-inline:1.25rem;transition:opacity .5s,transform .7s var(--ease)}
.gate__head h1{font-size:clamp(2.6rem,12.5vw,3.5rem)}
.gate__head h1 i{font-style:normal;font-weight:380;color:var(--accent)}
.gate__head p{margin-top:.5rem;font-weight:600}
.gate__nw{position:absolute;left:0;right:0;top:50%;height:0;perspective:900px;transition:transform 1.5s cubic-bezier(.5,0,.7,.4),opacity .5s 1s}
.env{position:absolute;left:50%;top:0;width:min(124vw,560px);margin-left:calc(min(124vw,560px) / -2);aspect-ratio:720/395;transform:translateY(-58%);transform-style:preserve-3d;transition:transform .85s var(--ease),opacity .5s;animation:bob 4.2s ease-in-out infinite alternate}
.env__face{position:absolute;inset:0;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.env__face img{width:100%;height:auto;filter:drop-shadow(0 18px 20px rgba(12,29,19,.35))}
.env__face--seal{transform:rotateY(180deg)}
/* the address label sits on the body of the envelope (the body spans 26.4% to 73% of the picture's width) */
.env__label{position:absolute;left:29%;width:41.4%;top:54%;min-height:37%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.1rem;padding:.5rem .6rem;border-radius:6px;text-align:center;color:var(--main);background:#FFFDF7;box-shadow:inset 0 0 0 1.5px var(--accent-soft),0 6px 12px -8px rgba(12,29,19,.5);transform:rotate(-1.6deg)}
.env__label span{font-size:.8125rem;font-weight:600;line-height:1.2;color:var(--soft)}
.env__label b{font:560 1.3rem/1.12 var(--display);letter-spacing:-.015em;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.env__label b.is-long{font-size:1.05rem}
.gate__open{position:absolute;left:50%;top:0;width:min(84vw,400px);height:auto;margin-left:calc(min(84vw,400px) / -2);transform:translateY(-56%) scale(.86);opacity:0;transition:opacity .45s,transform .9s var(--spring);filter:drop-shadow(0 20px 24px rgba(12,29,19,.4))}
.gate__glow{position:absolute;left:50%;top:0;width:150vw;max-width:680px;aspect-ratio:1;transform:translate(-50%,-50%) scale(.4);opacity:0;border-radius:50%;background:radial-gradient(closest-side,rgba(255,255,255,.85),rgba(244,166,192,.55) 38%,rgba(244,166,192,0) 70%);transition:opacity .7s,transform 1.2s var(--ease)}
.hearts{position:absolute;left:50%;top:0;width:0;height:0}
.hearts i{position:absolute;left:0;top:0;width:22px;height:22px;margin:-11px;opacity:0;color:var(--accent)}
.hearts svg{width:100%;height:100%}
.gate__foot{position:relative;margin-top:auto;margin-bottom:max(7vh,calc(env(safe-area-inset-bottom) + 1.6rem));display:flex;flex-direction:column;align-items:center;gap:.9rem;padding-inline:1.25rem;text-align:center;color:var(--paper);transition:opacity .4s,transform .6s var(--ease)}
.gate__foot p{font-size:1rem;max-width:19rem}
.gate__skip{position:absolute;right:1rem;bottom:max(1.2rem,env(safe-area-inset-bottom));z-index:2;min-height:44px;padding:.4rem 1.1rem;border-radius:999px;border:0;cursor:pointer;font-weight:650;font-size:.9375rem;color:var(--paper);background:rgba(var(--bar-rgb,14,32,21),.6);opacity:0;pointer-events:none;transition:opacity .4s}
@keyframes bob{from{translate:0 -6px}to{translate:0 8px}}
@keyframes heart{0%{opacity:0;transform:translate(0,0) scale(.4)}18%{opacity:1}100%{opacity:0;transform:translate(var(--hx),var(--hy)) scale(var(--hs,1)) rotate(var(--hr,0deg))}}

.gate.is-turn .env{transform:translateY(-58%) rotateY(180deg)}
.gate.is-turn .gate__foot{opacity:0;transform:translateY(14px);pointer-events:none}
.gate.is-open .env{opacity:0;animation-play-state:paused}
.gate.is-open .gate__open{opacity:1;transform:translateY(-56%) scale(1)}
.gate.is-open .gate__glow{opacity:1;transform:translate(-50%,-50%) scale(1)}
.gate.is-open .hearts i{animation:heart 1.5s var(--ease) var(--hd,0s) both}
.gate.is-open .gate__head{opacity:0;transform:translateY(-12px)}
/* the film: Nawala flies ahead through the arch and the camera follows */
.gate.is-film .gate__film{opacity:1}
.gate.is-film .gate__shade{opacity:0}
.gate.is-film .gate__nw{transform:translate3d(0,-7vh,0) scale(.12);opacity:0}
.gate.is-film .gate__skip{opacity:1;pointer-events:auto}
.gate.is-gone{opacity:0;pointer-events:none}
.gate.is-zoom .gate__plate{transform:scale(1.5)}

/* ---------- Floating controls ---------- */
.tools{position:fixed;z-index:60;top:max(.8rem,env(safe-area-inset-top));left:50%;width:100%;max-width:var(--col);transform:translateX(-50%);display:flex;justify-content:space-between;align-items:flex-start;padding-inline:.8rem;pointer-events:none;opacity:0;transition:opacity .6s .3s}
.is-inside .tools{opacity:1}
.tools__group{display:flex;gap:.5rem;pointer-events:auto}
.tool{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;min-width:48px;height:48px;padding:0 .9rem;border-radius:999px;border:0;cursor:pointer;font-weight:700;font-size:.875rem;color:var(--paper);background:rgba(var(--bar-rgb,14,32,21),.82);box-shadow:inset 0 0 0 1px rgba(255,255,255,.16),0 8px 18px -10px rgba(0,0,0,.6);-webkit-tap-highlight-color:transparent;transition:transform .25s var(--spring)}
.tool:active{transform:scale(.93)}
.tool--round{padding:0;width:48px}
.tool--music .eq{display:flex;align-items:flex-end;gap:3px;height:18px}
.tool--music .eq i{width:3px;height:100%;border-radius:2px;background:currentColor;transform-origin:50% 100%;transform:scaleY(.25)}
.tool--music[aria-pressed="true"] .eq i{animation:eq .9s ease-in-out infinite alternate}
.tool--music[aria-pressed="true"] .eq i:nth-child(2){animation-delay:-.35s}
.tool--music[aria-pressed="true"] .eq i:nth-child(3){animation-delay:-.6s}
.tool--music[aria-pressed="false"]{color:rgba(251,246,234,.6)}
@keyframes eq{from{transform:scaleY(.25)}to{transform:scaleY(1)}}
/* how far along the walk */
.progress{position:absolute;z-index:6;left:0;right:0;top:0;height:3px;background:rgba(255,255,255,.22);opacity:0;transition:opacity .6s}
.is-inside .progress{opacity:1}
.progress i{display:block;height:100%;background:linear-gradient(90deg,var(--light),var(--accent-soft));transform-origin:0 50%;transform:scaleX(var(--at,0));transition:transform .8s var(--ease)}

/* ---------- The travelling Nawala ---------- */
.nw{display:none}
.js .nw{display:block;position:absolute;z-index:5;left:0;top:0;width:0;height:0;pointer-events:none;opacity:0;transform:translate3d(var(--x,50vw),0,0);transition:transform 1.05s cubic-bezier(.45,.05,.3,1),opacity .4s}
.is-inside .nw{opacity:1}
.nw.is-hidden{opacity:0}
.nw__lift{position:absolute;left:0;top:0;transform:translate3d(0,var(--y,40vh),0);transition:transform 1.05s cubic-bezier(.3,.6,.4,1.25)}
.nw__size{position:absolute;left:0;top:0;transform:scale(var(--s,1));transition:transform 1.05s var(--ease)}
.nw__fly,.nw__sit,.nw__open{position:absolute;left:-60px;bottom:0;width:120px;transition:opacity .25s}
.nw__fly{aspect-ratio:400/167;overflow:hidden;filter:drop-shadow(0 10px 10px rgba(12,29,19,.3))}
.nw__fly b{display:block;width:1200%;height:100%;background:var(--nw-flap) 0 0/100% 100% no-repeat;animation:flap .8s steps(12) infinite}
.nw__sit,.nw__open{height:auto;max-width:none;opacity:0;filter:drop-shadow(0 8px 8px rgba(12,29,19,.35))}
.nw__sit{left:-40px;width:80px}
.nw__open{left:-52px;width:104px}
.nw__bob{animation:drift 5s ease-in-out infinite alternate}
.nw.is-sat .nw__fly{opacity:0}
.nw.is-sat .nw__sit{opacity:1;animation:land .6s var(--spring)}
.nw.is-sat .nw__bob{animation:none}
.nw.is-love .nw__fly,.nw.is-love .nw__sit{opacity:0}
.nw.is-love .nw__open{opacity:1;animation:land .6s var(--spring)}
.nw.is-love .hearts{top:-60px}
.nw.is-love .hearts i{animation:heart 1.6s var(--ease) var(--hd,0s) both}
.nw .hearts{left:0}
@keyframes flap{to{transform:translate3d(-100%,0,0)}}
@keyframes drift{from{transform:translate3d(-6px,-5px,0) rotate(-3deg)}to{transform:translate3d(7px,6px,0) rotate(2deg)}}
@keyframes land{0%{transform:translate3d(0,-10px,0) scale(1.05,.95)}55%{transform:translate3d(0,2px,0) scale(.96,1.05)}100%{transform:none}}

/* ---------- The light that carries one scene into the next (same family as the home page's) ---------- */
.sweep{display:none}
.js .sweep{display:block;position:absolute;z-index:4;left:0;right:0;top:0;height:100%;pointer-events:none;visibility:hidden;will-change:transform;
  --r2:rgba(176,255,226,.26);--r3:rgba(255,170,214,.2)}
.sweep.is-run{visibility:visible;animation:sweep-up var(--sweep,1.6s) cubic-bezier(.45,.08,.55,.92) both}
.sweep.is-run.is-down{animation-name:sweep-down}
@keyframes sweep-up{from{transform:translate3d(0,156%,0)}to{transform:translate3d(0,-146%,0)}}
@keyframes sweep-down{from{transform:translate3d(0,-156%,0) scaleY(-1)}to{transform:translate3d(0,146%,0) scaleY(-1)}}
.sweep__body{position:absolute;inset:0;background:var(--veil)}
.sweep__tail{position:absolute;left:0;right:0;top:calc(100% - 1px);height:44%;background:linear-gradient(var(--veil),transparent)}
.sweep__head{position:absolute;left:0;right:0;bottom:calc(100% - 1px);height:54%}
/* not one perfect arch: three swells of different widths lean and breathe on their own clocks, like a lava lamp
   made of light. Glows (i) first, fills (s) on top in step, so only the outer edge shines, with a faint spectrum. */
.sweep__head i,.sweep__head s{position:absolute;bottom:0;left:var(--l);width:var(--w);height:var(--h);transform-origin:50% 100%;will-change:transform;animation:lava var(--t) ease-in-out infinite alternate;animation-delay:var(--d,0s)}
.sweep__head i{background:radial-gradient(ellipse 50% 100% at 50% 100%,transparent 38%,var(--rim) 50%,var(--r2) 53.5%,var(--g1) 58%,var(--r3) 65%,var(--g2) 77%,transparent 100%)}
.sweep__head s{background:radial-gradient(ellipse 50% 100% at 50% 100%,var(--veil) 0,var(--veil) 45%,transparent 51.5%)}
.sweep__head :nth-child(3n+1){--l:-70%;--w:240%;--h:68%;--t:2.3s}
.sweep__head :nth-child(3n+2){--l:-60%;--w:150%;--h:100%;--t:1.9s;--d:-.7s}
.sweep__head :nth-child(3n+3){--l:24%;--w:140%;--h:82%;--t:2.1s;--d:-1.4s}
.sweep__head b{position:absolute;left:-60%;bottom:0;width:220%;height:124%;transform-origin:50% 100%;opacity:0;
  background:radial-gradient(ellipse 50% 100% at 50% 100%,transparent 57%,rgba(150,200,255,.26) 60.5%,rgba(186,255,226,.24) 62.5%,rgba(255,236,160,.3) 64.5%,rgba(255,170,212,.2) 66.5%,transparent 71%);
  animation:ripple 1.5s ease-out infinite}
.sweep:not(.is-run) i,.sweep:not(.is-run) s,.sweep:not(.is-run) b{animation-play-state:paused}
@keyframes lava{0%{transform:translate3d(-5%,0,0) scale(1,.82)}50%{transform:translate3d(1%,0,0) scale(1.07,1.03)}100%{transform:translate3d(6%,0,0) scale(.95,1.16)}}
@keyframes ripple{0%{transform:scale(.84,.5);opacity:0}24%{opacity:.7}100%{transform:scale(1.1,1.18);opacity:0}}

/* ---------- Cover ---------- */
.cover{flex:1;display:flex;flex-direction:column;align-items:center;text-align:center;color:var(--main);min-height:0}
.js .step--cover{justify-content:flex-start;padding-top:max(11vh,calc(env(safe-area-inset-top) + 4.6rem))}
.cover h1{font-size:clamp(2.9rem,15vw,4.1rem);line-height:.98}
.cover h1 span{display:block}
.cover h1 i{display:block;font-style:normal;font-weight:360;font-size:.62em;line-height:1.1;color:var(--accent)}
.cover__date{margin-top:.9rem;font-weight:650;font-size:1.125rem}
.cover__to{margin-top:auto;display:flex;flex-direction:column;align-items:center;gap:.1rem;padding:.8rem 1.6rem;border-radius:22px}
.cover__to.pane{min-width:72%;gap:.1rem;padding:1rem 1.4rem calc(1.6rem + var(--sink,0px))}
.cover__to span{font-size:.9375rem;font-weight:600}
.cover__to b{font:560 1.35rem/1.15 var(--display);letter-spacing:-.015em;overflow-wrap:anywhere}
.cue{display:flex;align-items:center;justify-content:center;gap:.3rem;margin-top:.5rem;font-size:.9375rem;font-weight:650}
.cue svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;animation:cue 1.4s ease-in-out infinite alternate}
@keyframes cue{from{transform:translateY(4px)}to{transform:translateY(-4px)}}

/* ---------- Couple ---------- */
.person{display:flex;flex-direction:column;align-items:center;text-align:center;min-height:0}
.person > img{width:auto;height:clamp(150px,34vh,300px);margin-bottom:-1.6rem;position:relative;z-index:1;filter:drop-shadow(0 18px 18px rgba(12,29,19,.45));animation:bob 4.6s ease-in-out infinite alternate}
.person .pane{width:100%;padding-top:2.2rem}
.person h2{font-size:clamp(1.7rem,7.6vw,2.2rem)}
.verse{font:400 1.0625rem/1.5 var(--display)}
.verse-ref{font-weight:700}

/* ---------- The day ---------- */
.count{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem;width:100%}
.count div{display:flex;flex-direction:column;align-items:center;gap:.1rem;padding:.8rem .2rem .6rem;border-radius:18px;background:rgba(255,255,255,.12);box-shadow:inset 0 0 0 1px rgba(255,255,255,.4)}
.count b{font:560 clamp(1.6rem,8vw,2.1rem)/1 var(--display);font-variant-numeric:tabular-nums}
.count span{font-size:.875rem;font-weight:600}
.row{display:flex;gap:.8rem;align-items:flex-start;text-align:left}
.row svg{width:24px;height:24px;flex:none;margin-top:.1rem;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.row b{display:block;font-weight:700}
.swatches{display:flex;gap:.5rem;flex-wrap:wrap}
.swatches li{display:flex;align-items:center;gap:.45rem;padding:.3rem .8rem .3rem .35rem;border-radius:999px;background:rgba(255,255,255,.16);box-shadow:inset 0 0 0 1px rgba(255,255,255,.35);font-size:.9375rem;font-weight:600}
.swatches i{width:26px;height:26px;border-radius:50%;box-shadow:inset 0 0 0 1px rgba(255,255,255,.5)}
.rule{height:1px;width:100%;background:currentColor;opacity:.28;flex:none}

/* ---------- Story ---------- */
.story{position:relative;display:flex;flex-direction:column;gap:.8rem;padding-left:1.5rem;text-align:left}
.story::before{content:"";position:absolute;left:.38rem;top:.5rem;bottom:.5rem;width:2px;border-radius:2px;background:currentColor;opacity:.3}
.story li{position:relative}
.story li::before{content:"";position:absolute;left:-1.5rem;top:.4rem;width:.9rem;height:.9rem;border-radius:50%;background:var(--accent-soft);box-shadow:0 0 0 3px rgba(255,255,255,.35)}
.story b{font:560 1.2rem/1.2 var(--display)}
.story span{font-weight:700;font-size:.9375rem;margin-right:.5rem}
.story p{font-size:1rem;line-height:1.4}

/* ---------- Gallery: Nawala stands in for the couple ---------- */
.shot{position:relative;display:block;border:0;padding:0;overflow:hidden;background:var(--main) 50% 50%/cover no-repeat}
.shot img{position:absolute;height:auto;filter:drop-shadow(0 8px 10px rgba(12,29,19,.4))}
.shot::after{content:"";position:absolute;inset:0;background:var(--shot-veil,none);pointer-events:none}
.gallery{display:flex;flex-direction:column;gap:.6rem;min-height:0}
.gallery__big{flex:1 1 auto;width:100%;min-height:150px;max-height:46vh;aspect-ratio:4/4.4;border-radius:20px;box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.5)}
.thumbs{display:grid;grid-template-columns:repeat(6,1fr);gap:.4rem}
.thumbs .shot{aspect-ratio:1;border-radius:12px;cursor:pointer;opacity:.72;transition:opacity .3s,transform .3s var(--spring);-webkit-tap-highlight-color:transparent}
.thumbs .shot[aria-pressed="true"]{opacity:1;box-shadow:0 0 0 2px var(--paper)}
.thumbs .shot:active{transform:scale(.94)}

/* ---------- RSVP ---------- */
.form{display:flex;flex-direction:column;gap:.7rem}
.field{display:flex;flex-direction:column;gap:.3rem;text-align:left}
.field > span,.field > legend{font-weight:700;padding:0;font-size:1rem}
fieldset.field{border:0;margin:0;padding:0;min-width:0}
.field input[type="text"],.field textarea{width:100%;min-height:50px;padding:.65rem .95rem;border-radius:16px;border:1.5px solid rgba(22,48,31,.35);background:rgba(255,255,255,.9);color:var(--ink);font-size:1.0625rem;text-shadow:none}
.field textarea{min-height:76px;height:76px;resize:none}
.field input:focus,.field textarea:focus{outline:3px solid var(--accent-soft);outline-offset:1px;border-color:var(--accent);background:#fff}
.chips{display:grid;grid-template-columns:repeat(3,1fr);gap:.4rem}
.chips label{position:relative;display:flex}
.chips input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer}
.chips span{flex:1;display:flex;align-items:center;justify-content:center;text-align:center;min-height:50px;padding:.35rem .4rem;border-radius:16px;font-weight:650;font-size:1rem;line-height:1.15;background:rgba(255,255,255,.6);box-shadow:inset 0 0 0 1.5px rgba(22,48,31,.35);text-shadow:none;transition:background-color .25s,box-shadow .25s,color .25s}
.chips input:checked + span{background:var(--main);color:var(--paper);box-shadow:none}
.chips input:focus-visible + span{outline:3px solid var(--light);outline-offset:2px}
.headcount{display:flex;align-items:center;justify-content:space-between;gap:.8rem;text-align:left}
.headcount > span{font-weight:700;font-size:1rem}
.stepper{display:flex;align-items:center;gap:.6rem;flex:none}
.stepper button{width:46px;height:46px;border-radius:50%;border:0;cursor:pointer;font-size:1.4rem;font-weight:600;line-height:1;color:var(--main);background:rgba(255,255,255,.7);box-shadow:inset 0 0 0 1.5px rgba(22,48,31,.35)}
.stepper button:disabled{opacity:.4;cursor:default}
.stepper output{min-width:1.6rem;text-align:center;font:560 1.6rem/1 var(--display);font-variant-numeric:tabular-nums}
.form__err{color:#8E1836;font-weight:700}
.done{display:flex;flex-direction:column;align-items:center;gap:.7rem;text-align:center;padding-block:1rem}
.tick{width:72px;height:72px}
.tick circle{fill:var(--accent-wash)}
.tick path{fill:none;stroke:var(--accent);stroke-width:5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:48;stroke-dashoffset:48}
.done.is-on .tick{animation:pop .55s var(--spring) both}
.done.is-on .tick path{animation:draw .5s .3s ease-out forwards}
@keyframes pop{from{transform:scale(.3);opacity:0}to{transform:none;opacity:1}}
@keyframes draw{to{stroke-dashoffset:0}}

/* ---------- Wishes ---------- */
.wishes{display:flex;flex-direction:column;gap:.5rem;max-height:46vh;text-align:left}
.wish{padding:.75rem .95rem;border-radius:16px;background:rgba(255,255,255,.5);box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)}
.wish b{display:block;font-weight:700}
.wish p{font-size:1rem;line-height:1.4}
.wish.is-mine{background:rgba(251,220,230,.8)}
.tag{display:inline-block;margin-left:.3rem;padding:.05rem .5rem;border-radius:999px;font-size:.8125rem;font-weight:700;vertical-align:middle;background:rgba(255,255,255,.8)}

/* ---------- Gift ---------- */
.stack{display:flex;flex-direction:column;gap:.5rem}
.acct{display:flex;align-items:center;justify-content:space-between;gap:.8rem;padding:.75rem .95rem;border-radius:16px;text-align:left;background:rgba(255,255,255,.5);box-shadow:inset 0 0 0 1px rgba(255,255,255,.7)}
.acct div{min-width:0}
.acct b{display:block;font:560 1.25rem/1.25 var(--display);letter-spacing:.01em;font-variant-numeric:tabular-nums}
.acct span{display:block;font-size:.9375rem;line-height:1.3}
.copy{flex:none;min-height:44px;padding:.4rem 1rem;border-radius:999px;border:0;cursor:pointer;font-weight:700;font-size:.9375rem;color:var(--paper);background:var(--main);text-shadow:none}
.copy.is-ok{background:var(--accent)}

/* ---------- Closing ---------- */
.duo{display:flex;justify-content:center;align-items:flex-end;margin-bottom:-1.4rem;position:relative;z-index:1}
.duo img{width:auto;height:clamp(84px,17vh,150px);filter:drop-shadow(0 16px 16px rgba(12,29,19,.35))}
.duo img:first-child{margin-right:-4%;animation:hop 2.4s var(--ease) infinite}
.duo img:last-child{animation:hop 2.4s var(--ease) -1.2s infinite}
@keyframes hop{0%,55%,100%{transform:translateY(0)}25%{transform:translateY(-14px) rotate(-3deg)}40%{transform:translateY(0)}}
.madeby{display:inline-flex;align-items:center;gap:.5rem;min-height:44px;padding:.3rem 1rem .3rem .4rem;border-radius:999px;text-decoration:none;font-weight:650;font-size:.9375rem;color:var(--paper);background:rgba(var(--bar-rgb,14,32,21),.86);text-shadow:none}
.madeby img{width:34px;height:auto}

/* ---------- Next button and bottom bar ---------- */
.next{display:none}
.js .next{display:flex;position:absolute;z-index:6;right:1.3rem;bottom:calc(var(--bar) + max(.7rem,env(safe-area-inset-bottom)) + .95rem);width:44px;height:44px;align-items:center;justify-content:center;border-radius:50%;border:0;cursor:pointer;color:var(--main);background:var(--paper);box-shadow:0 0 0 2px var(--accent-soft),0 12px 24px -10px rgba(216,67,107,.7);opacity:0;transform:scale(.6);transition:opacity .4s,transform .5s var(--spring);-webkit-tap-highlight-color:transparent}
.is-inside .next{opacity:1;transform:none}
.next.is-last{opacity:0;transform:scale(.6);pointer-events:none}
.next svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.next:active{transform:scale(.92)}
.bar{display:none}
.js .bar{position:fixed;z-index:60;left:50%;bottom:max(.7rem,env(safe-area-inset-bottom));width:calc(100% - 1.4rem);max-width:calc(var(--col) - 1.4rem);transform:translate(-50%,160%);display:flex;justify-content:space-between;padding:.3rem;border-radius:24px;color:var(--paper);background:rgba(var(--bar-rgb,14,32,21),.9);box-shadow:inset 0 0 0 1px rgba(255,255,255,.16),0 16px 34px -14px rgba(0,0,0,.75);transition:transform .7s var(--ease) .4s}
.is-inside .bar{transform:translate(-50%,0)}
.bar a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.1rem;min-height:54px;border-radius:19px;text-decoration:none;font-size:.8125rem;font-weight:650;line-height:1.1;-webkit-tap-highlight-color:transparent;transition:background-color .3s,color .3s}
.bar svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.bar a.is-here{background:var(--paper);color:var(--main)}
@media (min-width:900px){
  .js .bar,.tool{-webkit-backdrop-filter:blur(16px) saturate(150%);backdrop-filter:blur(16px) saturate(150%)}
  .js .bar{background:rgba(var(--bar-rgb,14,32,21),.66)}
}

/* ---------- Review sheet (sample invitations only) ---------- */
dialog{border:0;padding:0;background:none;color:inherit;max-width:none;max-height:none}
dialog::backdrop{background:rgba(8,18,12,.8)}
.sheet{width:min(94vw,440px);margin:auto auto max(1rem,env(safe-area-inset-bottom));padding:1.4rem 1.2rem;border-radius:26px;color:var(--paper);background:rgba(var(--bar-rgb,14,32,21),.97);box-shadow:inset 0 0 0 1px rgba(255,255,255,.14)}
.sheet h2{font-size:1.5rem}
.sheet > * + *{margin-top:1rem}
.sheet .field > span{color:var(--paper)}
.seg{display:flex;gap:.4rem;flex-wrap:wrap}
.seg button{flex:1;min-height:48px;padding:.4rem .8rem;border-radius:14px;border:0;cursor:pointer;font-weight:650;white-space:nowrap;color:var(--paper);background:rgba(251,246,234,.12)}
.seg button[aria-pressed="true"]{background:var(--paper);color:var(--main)}

/* ---------- Short screens: tighten, never cut ---------- */
@media (max-height:700px){
  body{font-size:1rem}
  .pane{gap:.55rem;padding:1.05rem 1.05rem calc(1.5rem + var(--sink,0px));border-radius:26px}
  .js .step{gap:.6rem;padding-top:calc(max(.8rem,env(safe-area-inset-top)) + 3.6rem)}
  .field input[type="text"],.chips span{min-height:46px}
  .field textarea{min-height:58px;height:58px}
  .form{gap:.55rem}
  .btn{min-height:46px}
  .count div{padding:.6rem .2rem .5rem}
  .story{gap:.5rem}
  .wish,.acct{padding:.55rem .8rem}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition-duration:.01ms!important;transition-delay:0s!important}
}

#send[aria-busy="true"]{opacity:.6;pointer-events:none}

/* ---------- Journeys: how a world moves from one scene to the next ----------
   A kit names its journey in KITS (index.html): up, side, diagonal or hop. Without one, the light sweep above carries the change.
   Both pictures are on screen while they move; .seam covers the join so no hard edge crosses the screen.
   Only transform and opacity are animated. Under reduced motion none of this runs (invite.js swaps the scene at once). */
.fit.j-in,.fit.j-out{opacity:1;transition:none;animation:var(--jt,1.3s) cubic-bezier(.62,.03,.3,1) both}
.fit.j-in{--cam:1;--camf:1;z-index:2}
.fit.j-out{z-index:1}
.seam{display:none}
.js .seam{display:block;position:absolute;inset:0;z-index:4;pointer-events:none;visibility:hidden;overflow:hidden}
.seam.is-run{visibility:visible}
.seam__fit{position:absolute;left:50%;bottom:0;width:max(100%,calc(var(--sh) * var(--world)));aspect-ratio:720/1290;margin-left:calc(max(100%,calc(var(--sh) * var(--world))) / -2)}
.seam__fit i{position:absolute;inset:0;will-change:transform,opacity}
.seam s{display:none}
.seam.is-run .seam__fit i{animation:var(--jt,1.3s) cubic-bezier(.62,.03,.3,1) both}

/* up: climbing. The new scene comes down from above, the old one leaves below; a band of light rides on the join. */
[data-journey="up"] .j-out{animation-name:j-up-out}
[data-journey="up"] .j-in,[data-journey="up"] .seam.is-run .seam__fit i{animation-name:j-up-in}
@keyframes j-up-out{to{transform:translate3d(0,calc(var(--dir,1) * 100%),0) scale(var(--cam,1))}}
@keyframes j-up-in{from{transform:translate3d(0,calc(var(--dir,1) * -100%),0) scale(var(--cam,1))}}
[data-journey="up"] .seam__fit i::before{content:"";position:absolute;left:-10%;right:-10%;height:76%;top:calc(50% + var(--dir,1) * 50% - 38%);
  background:linear-gradient(180deg,transparent 0,var(--g2) 16%,var(--g1) 30%,var(--veil) 43%,var(--veil) 57%,var(--g1) 70%,var(--g2) 84%,transparent 100%)}

/* side: an old film reel. Scenes pass sideways as frames; the dark frame line rides on the join and the perforations run along the edges. */
[data-journey="side"] .j-out{animation-name:j-side-out}
[data-journey="side"] .j-in,[data-journey="side"] .seam.is-run .seam__fit i{animation-name:j-side-in}
@keyframes j-side-out{to{transform:translate3d(calc(var(--dir,1) * -100%),0,0) scale(var(--cam,1))}}
@keyframes j-side-in{from{transform:translate3d(calc(var(--dir,1) * 100%),0,0) scale(var(--cam,1))}}
[data-journey="side"] .seam__fit i::before{content:"";position:absolute;top:-6%;bottom:-6%;width:44px;left:calc(50% - var(--dir,1) * 50% - 22px);
  background:linear-gradient(90deg,rgba(10,7,5,0) 0,rgba(10,7,5,.92) 20%,#0A0705 34%,#0A0705 66%,rgba(10,7,5,.92) 80%,rgba(10,7,5,0) 100%)}
[data-journey="side"] .seam s{display:block;position:absolute;left:-60%;width:220%;height:30px;opacity:0;will-change:transform,opacity;
  background:#0A0705 radial-gradient(closest-side,rgba(255,244,222,.82) 0,rgba(255,244,222,.82) 72%,rgba(255,244,222,0) 100%) 0 50%/30px 16px repeat-x}
[data-journey="side"] .seam s:nth-of-type(1){top:0}
[data-journey="side"] .seam s:nth-of-type(2){bottom:0}
[data-journey="side"] .seam.is-run s{animation:j-reel var(--jt,1.3s) cubic-bezier(.62,.03,.3,1) both}
@keyframes j-reel{0%{opacity:0;transform:translate3d(calc(var(--dir,1) * 24%),0,0)}18%,82%{opacity:.92}100%{opacity:0;transform:translate3d(calc(var(--dir,1) * -24%),0,0)}}
[data-journey="side"] .step{transform:translate3d(calc(var(--dir) * 54px),0,0)}
[data-journey="side"] .step.is-on{transform:none}
[data-journey="side"] .step.is-out{transform:translate3d(calc(var(--dir) * -44px),0,0)}

/* diagonal: gliding across and upward. The new scene drifts in from the upper right over the old one; a slanting band of light crosses. */
[data-journey="diagonal"] .j-out{animation-name:j-diag-out}
[data-journey="diagonal"] .j-in{animation-name:j-diag-in}
@keyframes j-diag-out{to{transform:translate3d(calc(var(--dir,1) * -5.5%),calc(var(--dir,1) * 5.5%),0) scale(calc(var(--cam,1) * 1.16))}}
@keyframes j-diag-in{from{opacity:0;transform:translate3d(calc(var(--dir,1) * 5.5%),calc(var(--dir,1) * -5.5%),0) scale(1.16)}45%{opacity:1}}
[data-journey="diagonal"] .seam.is-run .seam__fit i{animation-name:j-diag-seam}
[data-journey="diagonal"] .seam__fit i{inset:-40%;background:linear-gradient(to bottom left,transparent 28%,var(--g2) 40%,var(--rim) 50%,var(--g2) 60%,transparent 72%)}
@keyframes j-diag-seam{0%{opacity:0;transform:translate3d(calc(var(--dir,1) * 55%),calc(var(--dir,1) * -55%),0)}30%,60%{opacity:.8}100%{opacity:0;transform:translate3d(calc(var(--dir,1) * -55%),calc(var(--dir,1) * 55%),0)}}
[data-journey="diagonal"] .step{transform:translate3d(calc(var(--dir) * 38px),calc(var(--dir) * -38px),0)}
[data-journey="diagonal"] .step.is-on{transform:none}
[data-journey="diagonal"] .step.is-out{transform:translate3d(calc(var(--dir) * -30px),calc(var(--dir) * 30px),0)}

/* hop: a jump to another place. The old scene rushes closer, the new one lands; a ring of light opens where Nawala took off. */
[data-journey="hop"] .j-out{animation-name:j-hop-out}
[data-journey="hop"] .j-in{animation-name:j-hop-in}
@keyframes j-hop-out{to{transform:scale(calc(var(--cam,1) * 1.24))}}
@keyframes j-hop-in{0%{opacity:0;transform:scale(1.32)}50%{opacity:1}100%{transform:scale(1)}}
[data-journey="hop"] .seam.is-run .seam__fit i{animation-name:j-hop-ring}
[data-journey="hop"] .seam__fit i{inset:auto;left:50%;top:50%;width:120%;aspect-ratio:1;margin:-60% 0 0 -60%;border-radius:50%;
  background:radial-gradient(closest-side,rgba(255,255,255,0) 52%,rgba(255,255,255,.7) 66%,var(--accent-soft) 74%,rgba(244,166,192,0) 92%)}
@keyframes j-hop-ring{0%{opacity:0;transform:scale(.08)}18%{opacity:.9}100%{opacity:0;transform:scale(1.9)}}

/* ---------- The map (kits with places): tap a place, or keep walking in order ---------- */
/* the picture keeps its own shape (pins are placed in shares of it) and never grows taller than about half the screen */
.map{position:relative;margin:.2rem auto 0;width:min(100%,calc(var(--sh) * .325))}
.map img{display:block;width:100%;height:auto;aspect-ratio:3/4;border-radius:18px;box-shadow:0 14px 30px -18px rgba(0,0,0,.6)}
.map__pin{position:absolute;left:var(--x);top:var(--y);transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:.05rem;min-width:44px;min-height:44px;
  padding:.38rem .7rem .42rem;border:0;border-radius:16px;cursor:pointer;font:inherit;line-height:1.1;text-align:center;color:var(--main);background:rgba(255,255,255,.9);box-shadow:0 8px 18px -8px rgba(0,0,0,.55)}
.map__pin b{font:600 1.0625rem/1.1 var(--display);letter-spacing:-.01em;white-space:nowrap}
.map__pin small{font-size:.875rem;font-weight:600;opacity:.82;white-space:nowrap}
.map__pin i{position:absolute;left:50%;top:-7px;width:16px;height:16px;margin-left:-8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px #fff;transition:background .3s}
.map__pin.is-seen i{background:var(--soft)}
.map__pin--here{cursor:default;background:var(--main);color:var(--paper)}
.map__pin--here i{background:var(--light)}
.map__pin:active{transform:translate(-50%,-50%) scale(.96)}
.tool svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}

/* drop: rise to the sky picture, then fall onto the next place (Kyoto). --px and --py: the place's point in the sky picture */
.fit.j-rise,.fit.j-fall,.fit.j-leave,.fit.j-land{opacity:1;transition:none}
.world.j-rise,.world.j-fall{z-index:1}
.fit.j-leave,.fit.j-land{z-index:2}
.world.j-rise{animation:j-rise .8s cubic-bezier(.35,0,.25,1) both}
.world.j-fall{animation:j-fall .95s cubic-bezier(.55,0,.75,.4) both}
.fit.j-leave{animation:j-leave .8s cubic-bezier(.35,0,.25,1) both}
.fit.j-land{animation:j-land .95s cubic-bezier(.2,.6,.3,1) both}
@keyframes j-rise{from{transform:translate3d(calc(-2.4 * (var(--px,.5) - .5) * 100%),calc(-2.4 * (var(--py,.5) - .5) * 100%),0) scale(3.4)}to{transform:none}}
@keyframes j-fall{from{transform:none}to{transform:translate3d(calc(-2.4 * (var(--px,.5) - .5) * 100%),calc(-2.4 * (var(--py,.5) - .5) * 100%),0) scale(3.4)}}
@keyframes j-leave{from{opacity:1;transform:none}60%{opacity:0}to{opacity:0;transform:scale(.55)}}
@keyframes j-land{0%,52%{opacity:0;transform:scale(1.45)}100%{opacity:1;transform:none}}

/* ---------- Openings and closings per world (owner, 21 Nov 2026: the same letter opening every time grows dull) ----------
   KITS sets data-open and data-close on <html>. The timing stays the engine's (tap, turn at 0 ms, open at 900 ms, film at 2300 ms);
   only what the letter does in those moments changes. Transform and opacity only. Without a value: the flip and the hop. */

/* spin (Istana Awan): the letter rises and turns twice on the light, then opens in a wide burst */
[data-open="spin"] .gate.is-turn .env{transition:transform 1.1s cubic-bezier(.3,0,.2,1);transform:translateY(-92%) rotateY(720deg) scale(.82)}
[data-open="spin"] .gate.is-open .gate__glow{transform:translate(-50%,-50%) scale(1.5)}
[data-open="spin"] .gate__open{transform:translateY(-80%) scale(.4) rotate(-12deg)}
/* fold (Teater Tua): the address side drops like a curtain, and the open letter rises from below like the first act */
[data-open="fold"] .env{transform-origin:50% 0}
[data-open="fold"] .gate.is-turn .env{transition:transform .8s cubic-bezier(.6,0,.8,.4),opacity .3s .55s;transform:translateY(-58%) rotateX(-96deg);opacity:0}
[data-open="fold"] .gate__open{transform:translateY(10%) scale(.7)}
[data-open="fold"] .gate.is-open .gate__glow{background:radial-gradient(closest-side,rgba(255,230,180,.85),rgba(216,67,107,.45) 40%,rgba(216,67,107,0) 70%)}
/* drift (Kapal Bulan): the letter sails away up and to the right until it is a star; the open letter floats in from the lower left */
[data-open="drift"] .gate.is-turn .env{transition:transform 1.3s cubic-bezier(.4,0,.6,1),opacity .6s .7s;transform:translate(42vw,-190%) rotate(14deg) scale(.12);opacity:0}
[data-open="drift"] .gate__open{transform:translate(-36vw,10%) rotate(-10deg) scale(.6)}
[data-open="drift"] .gate.is-open .gate__glow{background:radial-gradient(closest-side,rgba(230,238,255,.9),rgba(160,180,255,.45) 40%,rgba(160,180,255,0) 70%)}
/* drop (Kyoto): the letter leaps up out of sight, then the open letter falls back down and lands with a small bounce */
[data-open="drop"] .gate.is-turn .env{transition:transform .7s cubic-bezier(.4,0,1,.6);transform:translateY(-420%) scale(.8)}
[data-open="drop"] .gate__open{transform:translateY(-260%) scale(.9)}
[data-open="drop"] .gate.is-open .gate__open{transition:opacity .2s,transform .9s cubic-bezier(.3,1.5,.5,1)}
/* sway (Pendopo Jawa): the letter rocks gently, as in a slow gamelan beat, before it turns */
[data-open="sway"] .gate.is-turn .env{animation:sway-turn .9s ease-in-out both}
@keyframes sway-turn{0%{transform:translateY(-58%)}25%{transform:translateY(-58%) rotate(-7deg)}50%{transform:translateY(-58%) rotate(6deg)}100%{transform:translateY(-58%) rotateY(180deg)}}

/* veil (Akad Putih): the address side is lifted away like a veil, softly growing and fading; the open letter is already there */
[data-open="veil"] .gate.is-turn .env{transition:transform 1s cubic-bezier(.3,0,.2,1),opacity .8s .1s;transform:translateY(-70%) scale(1.3);opacity:0}
[data-open="veil"] .gate__open{transform:translateY(-56%) scale(.96)}

/* closings: what bride and groom Nawala do at the end */
[data-close="circle"] .duo img:first-child,[data-close="circle"] .duo img:last-child{animation:orbit 6s linear infinite}
[data-close="circle"] .duo img:last-child{animation-delay:-3s}
@keyframes orbit{0%{transform:translate3d(-22px,0,0) scale(1)}25%{transform:translate3d(0,-14px,0) scale(.9)}50%{transform:translate3d(22px,0,0) scale(1)}75%{transform:translate3d(0,8px,0) scale(1.06)}100%{transform:translate3d(-22px,0,0) scale(1)}}
[data-close="bow"] .duo img{transform-origin:50% 100%}
[data-close="bow"] .duo img:first-child,[data-close="bow"] .duo img:last-child{animation:bow 4.6s ease-in-out infinite}
[data-close="bow"] .duo img:last-child{animation-delay:.25s}
@keyframes bow{0%,30%,100%{transform:none}42%,56%{transform:rotate(16deg) translateY(4px)}}
[data-close="float"] .duo img:first-child,[data-close="float"] .duo img:last-child{animation:float 5.4s ease-in-out infinite alternate}
[data-close="float"] .duo img:last-child{animation-delay:-2.7s}
@keyframes float{from{transform:translate3d(0,6px,0) rotate(-3deg)}to{transform:translate3d(0,-12px,0) rotate(3deg)}}
[data-close="spin"] .duo img:first-child,[data-close="spin"] .duo img:last-child{animation:spinhop 3.2s cubic-bezier(.3,0,.3,1) infinite}
[data-close="spin"] .duo img:last-child{animation-delay:-1.6s}
@keyframes spinhop{0%,50%,100%{transform:none}22%{transform:translateY(-26px) rotateY(180deg)}44%{transform:rotateY(360deg)}}
[data-close="sway"] .duo img{transform-origin:50% 100%}
[data-close="sway"] .duo img:first-child,[data-close="sway"] .duo img:last-child{animation:sway 3.6s ease-in-out infinite alternate}
[data-close="sway"] .duo img:last-child{animation-delay:-1.8s}
@keyframes sway{from{transform:rotate(-6deg)}to{transform:rotate(6deg)}}
[data-close="lean"] .duo img:first-child{animation:lean-l 4.4s ease-in-out infinite}
[data-close="lean"] .duo img:last-child{animation:lean-r 4.4s ease-in-out infinite}
@keyframes lean-l{0%,25%,100%{transform:none}45%,70%{transform:translate3d(10px,-4px,0) rotate(7deg)}}
@keyframes lean-r{0%,25%,100%{transform:none}45%,70%{transform:translate3d(-10px,-4px,0) rotate(-7deg)}}
@media (prefers-reduced-motion:reduce){[data-close] .duo img{animation:none!important}}

/* the review sheet's main action is Nawala's neon pill, as everywhere (assets/css/kit.css); the rest stay glass */
@property --a{syntax:"<angle>";initial-value:0deg;inherits:false}
#sheet-x{color:#16301F;border:2px solid transparent;background:linear-gradient(#FBF6EA,#FBF6EA) padding-box,conic-gradient(from var(--a),#F4A6C0,#F6C445,#D8436B,#F4A6C0) border-box;animation:kit-spin 5s linear infinite}
@keyframes kit-spin{to{--a:360deg}}
@media (prefers-reduced-motion:reduce){#sheet-x{animation:none}}
