/* station 10: RSVP */
/* rsvp */
form{display:flex;flex-direction:column;gap:16px;text-align:left;margin-top:16px}
label.f{display:flex;flex-direction:column;gap:6px;font-family:var(--caps);letter-spacing:.14em;font-size:13px;color:var(--ink-soft)}
.f input,.f textarea,.f select{font-family:var(--serif);font-size:20px;color:var(--ink);background:transparent;border:0;border-bottom:1px solid var(--silver);padding:8px 2px;border-radius:0;letter-spacing:0}
.f textarea{min-height:76px;resize:vertical}
.f input:focus,.f textarea:focus,.f select:focus{outline:none;border-bottom-color:var(--navy);box-shadow:0 1px 0 var(--navy)}
.choice{display:grid;grid-template-columns:1fr 1fr;gap:10px;border:0;margin:0;padding:0}
.choice legend{font-family:var(--caps);letter-spacing:.14em;font-size:13px;color:var(--ink-soft);margin-bottom:6px;padding:0}
.choice label{position:relative}
.choice input{position:absolute;opacity:0;pointer-events:none}
.choice span{display:flex;align-items:center;justify-content:center;text-align:center;min-height:54px;padding:8px;box-shadow:inset 0 0 0 1px var(--silver);font-size:19px;color:var(--navy);cursor:pointer;transition:background .2s,color .2s}
.choice input:checked+span{background:var(--navy);color:var(--white);box-shadow:inset 0 0 0 3px var(--navy), inset 0 0 0 4px var(--silver)}
.choice input:focus-visible+span{outline:2px solid var(--dusty);outline-offset:2px}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.err{color:#9B2C2C;font-size:17px;min-height:1.4em;text-align:center;margin:0}
.thanks{display:none;padding:10px 0 0}
.thanks.on{display:block}
.thanks .stamp{width:90px;margin:0 auto 8px}
.thanks .script-line{font-family:var(--script);font-size:clamp(36px,10vw,44px);color:var(--navy);line-height:1.3;padding:0 .15em}
.when-cant{font-size:16px;color:var(--ink-soft);margin-top:4px}

#rsvp.card{padding-bottom:124px}

/* ---------- the lantern-lit table and the ivory reply card (rsvp.js) ---------- */
#st-rsvp .st-art{width:min(320px,82%)}
#st-rsvp .lantern-rig{position:relative}
#st-rsvp .lantern-rig img{display:block}
/* the lantern's light: faint by day, warm and wide at night */
#st-rsvp .lantern-glow{position:absolute;left:37.2%;top:30.4%;width:0;height:0;pointer-events:none;z-index:3}
#st-rsvp .lantern-glow i,#st-rsvp .lantern-glow b{position:absolute;border-radius:50%;transform:translate(-50%,-50%)}
#st-rsvp .lantern-glow i{width:110px;height:130px;mix-blend-mode:screen;
  background:radial-gradient(closest-side,rgba(255,236,190,.95),rgba(255,214,140,.5) 40%,rgba(255,200,120,0));
  opacity:calc(.3 + var(--night,0) * .7)}
#st-rsvp .lantern-glow b{width:330px;height:300px;
  background:radial-gradient(closest-side,rgba(255,214,150,.55),rgba(255,214,150,.18) 50%,rgba(255,214,150,0));
  opacity:calc(var(--night,0) * .85)}
#st-rsvp.lantern-live .lantern-glow i{animation:lantern-flicker 3.1s ease-in-out infinite}
@keyframes lantern-flicker{0%,100%{transform:translate(-50%,-50%) scale(1)}23%{transform:translate(-50%,-51%) scale(.94)}41%{transform:translate(-50%,-50%) scale(1.04)}67%{transform:translate(-50%,-50%) scale(.97)}}

/* the reply card: ivory stock with a fine double ink rule, warming a little in the lantern light */
#st-rsvp form.reply-card{position:relative;gap:14px;margin:18px 0 0;padding:26px 20px 22px;
  background:radial-gradient(120% 90% at 50% 0%,#FFFDF8 0%,var(--ivory-card) 60%,#F6F0E2 100%);
  box-shadow:0 0 0 1px var(--ivory-edge),inset 0 0 0 6px var(--ivory-card),inset 0 0 0 7px rgba(126,117,102,.28),
    0 12px 22px -14px rgba(27,42,74,.45),0 0 46px rgba(255,206,130,calc(var(--night,0) * .4))}
/* writing lines in ink, and the answer written in a hand-like italic */
#st-rsvp .f{color:var(--ink-soft)}
#st-rsvp .f input,#st-rsvp .f textarea{font-style:italic;font-size:22px;color:#1F2C4A;caret-color:var(--navy);
  border-bottom:1px solid rgba(126,117,102,.6);padding:6px 38px 6px 2px}
#st-rsvp .f textarea{min-height:76px;line-height:32px;padding-top:2px;padding-bottom:0;border-bottom:0;
  background:repeating-linear-gradient(to bottom,transparent 0 31px,rgba(126,117,102,.45) 31px 32px);background-attachment:local}
/* placeholder at 5.2:1 on the warmest part of the card (it was 3.6:1) */
#st-rsvp .f textarea::placeholder,#st-rsvp .f input::placeholder{color:#5A647B;opacity:1;font-style:italic;font-size:18px}
#st-rsvp .f input:focus,#st-rsvp .f textarea:focus{border-bottom-color:var(--navy);box-shadow:0 1px 0 var(--navy)}
#st-rsvp .f textarea:focus{box-shadow:none;background-image:repeating-linear-gradient(to bottom,transparent 0 31px,rgba(27,42,74,.6) 31px 32px)}

/* the answers: plain ivory, and the chosen one is ringed in ink, as if by hand */
#st-rsvp .choice span{background:rgba(255,255,255,.5);box-shadow:inset 0 0 0 1px rgba(126,117,102,.45);color:var(--navy);transition:background .3s,color .3s}
#st-rsvp .choice input:checked+span{background:rgba(191,214,238,.34);color:var(--navy);box-shadow:inset 0 0 0 1px rgba(126,117,102,.25);font-weight:600}
#st-rsvp .ink-ring{position:absolute;inset:-6px -4px;width:calc(100% + 8px);height:calc(100% + 12px);pointer-events:none;overflow:visible}
#st-rsvp .ink-ring path{fill:none;stroke:var(--navy);stroke-width:1.6;stroke-linecap:round;vector-effect:non-scaling-stroke;
  stroke-dasharray:1;stroke-dashoffset:1;opacity:0;transition:stroke-dashoffset .7s var(--ease-out),opacity .2s}
#st-rsvp .choice input:checked+span .ink-ring path{stroke-dashoffset:0;opacity:1}
#st-rsvp .choice span{position:relative}

/* the quill: rests at the end of the line you are writing on */
#st-rsvp .quill{position:absolute;left:0;top:0;width:22px;height:55px;pointer-events:none;z-index:2;
  transition:transform .7s var(--ease-out),opacity .4s;opacity:.85}
#st-rsvp .quill svg{width:100%;height:100%;display:block;overflow:visible;transform-origin:10% 98%;transform:rotate(24deg);
  transition:transform .5s var(--ease-out);filter:drop-shadow(2px 3px 2px rgba(27,42,74,.18))}
#st-rsvp .quill.poised{opacity:1}
#st-rsvp .quill.poised svg{transform:rotate(14deg)}
#st-rsvp .quill.writing svg{animation:quill-write .42s ease-in-out infinite}
@keyframes quill-write{0%,100%{transform:rotate(14deg) translate(0,0)}30%{transform:rotate(11deg) translate(-1.5px,1px)}65%{transform:rotate(16deg) translate(1px,-.5px)}}

/* the thank-you and the seal; a very long name wraps instead of running off the card */
#st-rsvp .thanks .stamp{width:96px}
#st-rsvp .thanks .script-line,#st-rsvp .thanks p{overflow-wrap:anywhere}

@media (max-width:360px){#rsvp.card{padding-left:14px;padding-right:14px}#st-rsvp form.reply-card{padding:22px 14px 18px}}
@media (prefers-reduced-motion: reduce){#st-rsvp .quill{transition:none}#st-rsvp .ink-ring path{stroke-dashoffset:0;opacity:0}#st-rsvp .choice input:checked+span .ink-ring path{opacity:1}}

/* ---------- the celebration layer (fixed, above the page, never takes a tap) ---------- */
.rsvp-fx{position:fixed;inset:0;z-index:var(--z-magic,40);pointer-events:none;overflow:hidden;contain:strict}
.rsvp-fx > *{position:absolute;left:0;top:0;will-change:transform,opacity}
.rf-bf img{display:block;height:auto;margin:-50% 0 0 -50%;animation:rf-flap .24s ease-in-out infinite alternate;filter:drop-shadow(0 4px 4px rgba(27,42,74,.15))}
@keyframes rf-flap{from{transform:scaleX(1)}to{transform:scaleX(.32)}}
.rf-bub{margin:-50% 0 0 -50%;border-radius:50%;
  background:radial-gradient(circle at 32% 28%,rgba(255,255,255,.98) 0 8%,rgba(255,255,255,0) 15%),
    radial-gradient(circle at 68% 74%,rgba(255,255,255,.7) 0 5%,rgba(255,255,255,0) 10%),
    radial-gradient(circle,rgba(191,214,238,.12) 0 55%,rgba(201,186,224,.5) 70%,rgba(140,170,215,.75) 84%,rgba(233,214,166,.7) 93%,rgba(255,255,255,.9) 100%);
  box-shadow:inset 0 0 0 1px rgba(90,120,170,.45),0 2px 6px rgba(27,42,74,.08)}
.rf-petal{border-radius:0 80% 0 80%;background:radial-gradient(circle at 30% 30%,#fff,var(--c) 70%);box-shadow:inset 0 0 0 .6px rgba(94,100,112,.35)}
