/* Chat Thread (ported from the Wedding project's 28-chat-thread.html): a generic, unbranded chat app in blush, plum
   and cream with mint read ticks. Nunito for the thread, Pacifico for the group name. */
:root{
  --plum:#5b2a4e; --plum2:#7b3d69; --ink:#3a2235; --mute:#8d7486; --line:rgba(91,42,78,.13);
  --wall:#fbefe9; --blush:#fadbe2; --blush2:#eba9bb; --cream:#fffaf3; --mint:#1fae8a; --mint2:#86f0d0;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%;overflow-x:clip;background:var(--wall)}
body{margin:0;font-family:'Nunito',system-ui,-apple-system,sans-serif;color:var(--ink);background:var(--wall);-webkit-tap-highlight-color:transparent}
button,input{font:inherit;color:inherit}
button{cursor:pointer;touch-action:manipulation}
:focus-visible{outline:3px solid var(--mint);outline-offset:2px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* the "phone": full width on phones, a centred 480px screen on desktop */
.app{position:relative;max-width:480px;margin:0 auto;min-height:100vh;min-height:100dvh;
  background:var(--wall) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' fill='none' stroke='%237b3d69' stroke-opacity='.11' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 34c-7-4.5-11-9-11-13a5.5 5.5 0 0 1 11-2 5.5 5.5 0 0 1 11 2c0 4-4 8.5-11 13z'/%3E%3Ccircle cx='104' cy='28' r='8'/%3E%3Cpath d='M99 18l5-6 5 6'/%3E%3Cpath d='M66 72l2.2 5 5.3.6-4 3.6 1.2 5.3-4.7-2.8-4.7 2.8 1.2-5.3-4-3.6 5.3-.6z'/%3E%3Ccircle cx='124' cy='104' r='3'/%3E%3Ccircle cx='124' cy='96' r='4'/%3E%3Ccircle cx='132' cy='104' r='4'/%3E%3Ccircle cx='124' cy='112' r='4'/%3E%3Ccircle cx='116' cy='104' r='4'/%3E%3Crect x='14' y='100' width='30' height='20' rx='9'/%3E%3Cpath d='M20 120l-4 7 9-7'/%3E%3Cpath d='M78 134v-17l13-3v15'/%3E%3Ccircle cx='75' cy='134' r='3'/%3E%3Ccircle cx='88' cy='129' r='3'/%3E%3Ccircle cx='50' cy='18' r='1.2'/%3E%3Ccircle cx='140' cy='60' r='1.2'/%3E%3Ccircle cx='36' cy='70' r='1.2'/%3E%3C/svg%3E") 0 0/150px 150px}
@media (min-width:560px){
  html,body{background:radial-gradient(circle at 25% 15%,#8a4a78,#3d1a35 70%) fixed}
  .app{box-shadow:0 0 0 1px rgba(255,255,255,.1),0 30px 90px rgba(0,0,0,.5)}
}

/* header + pinned countdown */
.top{position:sticky;top:0;z-index:5;background:var(--plum);color:#fff;padding-top:env(safe-area-inset-top)}
.sbar{display:none}
@media (min-width:560px){.sbar{display:flex;justify-content:space-between;padding:8px 22px 0;font-size:12px;font-weight:800;letter-spacing:.02em;opacity:.9}}
.bar{display:flex;align-items:center;gap:10px;padding:8px 10px 8px 6px}
.back{font-size:28px;line-height:1;opacity:.8;width:14px;text-align:center;margin-top:-3px}
.av{position:relative;width:42px;height:42px;flex:none}
.av img,.av .ini{width:100%;height:100%;border-radius:50%;object-fit:cover;object-position:50% 20%;border:2px solid #f6c9d3;display:block}
.av::after{content:"";position:absolute;right:-1px;bottom:-1px;width:11px;height:11px;border-radius:50%;background:var(--mint2);border:2px solid var(--plum)}
.ini{display:grid!important;place-items:center;background:var(--blush);color:var(--plum);font-weight:900;font-size:15px;line-height:1;white-space:nowrap}
.ti{flex:1;min-width:0}
.gname{margin:0;font-family:'Pacifico',cursive;font-size:19px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st{margin:0;font-size:12.5px;font-weight:600;opacity:.85;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.st.ty{color:var(--mint2);opacity:1}
/* not .skip: boot.js puts class "skip" on <html>, and a bare .skip rule would style the whole page */
.skip-btn{flex:none;border:0;background:rgba(255,255,255,.16);color:#fff;border-radius:999px;padding:7px 12px;font-weight:800;font-size:13px}
.hnote{flex:none;width:34px;height:34px;border-radius:50%;border:0;background:rgba(255,255,255,.16);color:#fff;font-size:16px;font-weight:900}
.hnote span{display:inline-block;animation:bob2 1s ease-in-out infinite}
.pinb{display:flex;align-items:center;gap:10px;background:#fff8f3;color:var(--ink);padding:7px 14px;border-bottom:1px solid var(--line);font-size:13.5px;line-height:1.3}
.pinb .pi{font-size:16px;flex:none}
.pinb .pt{border-left:3px solid var(--blush2);padding-left:9px;min-width:0}
.pinb small{display:block;font-size:11.5px;font-weight:800;color:var(--plum2)}
.pinb b{font-variant-numeric:tabular-nums;color:var(--plum)}

/* messages */
.log{list-style:none;margin:0;padding:14px 12px 14px;display:flex;flex-direction:column;gap:5px}
.m{display:flex}
.m.nr{margin-top:8px}
.m.a,.m.me{justify-content:flex-end}
.m.sys{justify-content:center;margin:6px 0}
.sys span{background:rgba(255,255,255,.85);color:var(--plum2);font-size:12.5px;font-weight:700;padding:5px 12px;border-radius:10px;box-shadow:0 1px 1px rgba(91,42,78,.08);text-align:center;max-width:300px}
.bub{position:relative;max-width:82%;min-width:0;padding:7px 11px 5px;border-radius:18px;font-size:15.5px;line-height:1.42;overflow-wrap:break-word;box-shadow:0 1px 1.5px rgba(91,42,78,.13);background:var(--cream)}
.a .bub{background:var(--blush);border-bottom-right-radius:6px;transform-origin:100% 100%}
.m.b .bub,.us .bub{border-bottom-left-radius:6px;transform-origin:0 100%}
.me .bub{background:var(--plum);color:#fff;border-bottom-right-radius:6px;transform-origin:100% 100%}
.bub p{margin:0}
.bub p+p{margin-top:5px}
.who{display:block;font-size:12px;font-weight:800;color:var(--plum2);margin-bottom:1px}
.me .who{color:#f6c9d3}
.meta{display:flex;justify-content:flex-end;align-items:center;gap:3px;font-size:11px;color:var(--mute);margin-top:1px;white-space:nowrap}
.me .meta{color:rgba(255,255,255,.7)}
.tk{width:17px;height:11px;fill:none;stroke:#b39aac;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;transition:stroke .3s}
.tk .t2{opacity:0;transition:opacity .2s}
.d .tk .t2{opacity:1}
.r .tk{stroke:var(--mint)}
.me.r .tk{stroke:var(--mint2)}
.m.pop .bub{animation:pop .5s cubic-bezier(.3,1.45,.5,1) both}
@keyframes pop{from{opacity:0;transform:translateY(14px) scale(.7)}to{opacity:1;transform:none}}

/* the guest's name, from a personal link */
.dear .bub p{font-family:'Pacifico',cursive;font-size:21px;line-height:1.35;color:var(--plum)}

/* reactions */
.m.rx{margin-bottom:12px}
.rxc{position:absolute;bottom:-14px;left:10px;background:#fff;border-radius:12px;padding:0 6px;font-size:13px;line-height:22px;box-shadow:0 1px 3px rgba(91,42,78,.2);transform:scale(0);transition:transform .45s cubic-bezier(.3,1.7,.5,1)}
.a .rxc{left:auto;right:10px}
.rxon .rxc{transform:none}

/* typing… */
.typing .bub{display:flex;gap:4px;padding:12px 14px;align-items:center}
.typing i{width:7px;height:7px;border-radius:50%;background:#b08aa6;animation:dot 1.1s ease-in-out infinite}
.typing i:nth-child(2){animation-delay:.15s}
.typing i:nth-child(3){animation-delay:.3s}
@keyframes dot{0%,60%,100%{transform:none;opacity:.45}30%{transform:translateY(-5px);opacity:1}}

/* photo */
.ph .bub{padding:4px 4px 5px}
.ph img,.phx{display:block;width:min(230px,58vw);aspect-ratio:4/5;object-fit:cover;object-position:50% 25%;border-radius:14px 14px 10px 10px;background:#f2d6dd}
.phx{display:grid;place-items:center;color:var(--plum2);font-weight:800;font-size:14px;border:2px dashed rgba(123,61,105,.35)}
.ph p{padding:5px 7px 0}
.ph .meta{padding-right:6px}

/* album: the gallery, tap a photo for full size */
.albm .bub{padding:4px 4px 5px}
.albm p{padding:3px 7px 5px}
.alb{display:grid;grid-template-columns:1fr 1fr;gap:3px;width:min(240px,62vw)}
.alb button{position:relative;padding:0;border:0;background:#f2d6dd;border-radius:6px;overflow:hidden;aspect-ratio:1}
.alb button:first-child{border-top-left-radius:14px}
.alb button:nth-child(2){border-top-right-radius:14px}
.alb img{display:block;width:100%;height:100%;object-fit:cover}
.alb .more{position:absolute;inset:0;display:grid;place-items:center;background:rgba(91,42,78,.55);color:#fff;font-weight:900;font-size:22px}
.alb.one{grid-template-columns:1fr}
.alb.one button{border-radius:14px 14px 6px 6px;aspect-ratio:4/5}
.albm .meta{padding-right:6px}
.box{border:0;padding:0;background:none;max-width:94vw;max-height:92vh;overflow:visible}
.box::backdrop{background:rgba(42,16,36,.9)}
.box img{display:block;max-width:94vw;max-height:86vh;border-radius:14px;object-fit:contain}
.box button{position:absolute;width:40px;height:40px;border-radius:50%;border:0;background:rgba(255,255,255,.92);color:var(--plum);font-size:22px;font-weight:900;line-height:1;box-shadow:0 3px 10px rgba(0,0,0,.3)}
.box .x{top:-14px;right:-8px}
.box .pv,.box .nx{top:50%;margin-top:-20px}
.box .pv{left:6px}
.box .nx{right:6px}

/* voice note: the song */
.vn{display:flex;align-items:center;gap:9px;width:min(262px,66vw);padding-top:3px}
.vplay{flex:none;width:42px;height:42px;border-radius:50%;border:0;background:var(--plum);color:#fff;display:grid;place-items:center;box-shadow:0 3px 8px rgba(91,42,78,.3)}
.vplay svg{width:16px;height:16px;fill:currentColor}
.vplay .ps,.song-on .vplay .pl{display:none}
.song-on .vplay .ps{display:block}
.wave{flex:1;display:flex;align-items:center;justify-content:space-between;height:30px;min-width:0}
.wave i{display:block;width:3px;height:calc(var(--h)*100%);border-radius:2px;background:var(--plum2);opacity:.4}
.song-on .wave i{opacity:.9;animation:wv .8s ease-in-out infinite alternate;animation-delay:calc(var(--i)*-.11s)}
@keyframes wv{from{transform:scaleY(.25)}to{transform:scaleY(1)}}
.vav{position:relative;flex:none;width:38px;height:38px}
.vav img,.vav .ini{width:100%;height:100%;border-radius:50%;object-fit:cover;object-position:50% 20%;display:block;font-size:13px}
.vav .ini{background:#fff}
.vav span:last-child{position:absolute;right:-4px;bottom:-3px;font-size:13px}
.vmeta{font-size:13px;margin-top:4px!important;color:var(--plum)}
.vst{font-size:12px;color:var(--mute);font-weight:700}
.song-on .vst{color:var(--mint)}

/* shared-location cards, maps drawn in CSS */
.locm .bub,.card .bub{padding:4px;width:min(300px,86%);max-width:86%}
.map{position:relative;height:116px;border-radius:14px 14px 9px 9px;overflow:hidden;
  background:radial-gradient(ellipse 58px 34px at var(--px,20%) var(--py,78%),#bfe3c4 97%,transparent),
    repeating-linear-gradient(90deg,transparent 0 33px,rgba(255,255,255,.6) 33px 35px),
    repeating-linear-gradient(0deg,transparent 0 27px,rgba(255,255,255,.6) 27px 29px),#efe5d6}
.rd{position:absolute;left:-30%;width:160%;height:9px;background:#fff;top:var(--y);transform:rotate(var(--r));box-shadow:0 0 0 1px rgba(160,130,110,.12)}
.rd.mj{height:12px;background:#ffe9b8}
.rv{position:absolute;left:-15%;width:130%;height:80px;top:var(--y);border-radius:50%;border:11px solid transparent;border-top-color:#bcdcf0;transform:rotate(var(--r))}
.mlab{position:absolute;left:8px;top:8px;max-width:70%;background:rgba(255,255,255,.92);color:var(--plum);font-size:11.5px;font-weight:800;padding:2px 8px;border-radius:8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pw{position:absolute;left:50%;top:52%;width:28px;height:28px;margin:-34px 0 0 -14px;animation:bob2 2.2s ease-in-out infinite}
.pin{display:block;width:28px;height:28px;border-radius:50% 50% 50% 0;background:var(--c);transform:rotate(-45deg);box-shadow:-2px 2px 4px rgba(0,0,0,.18)}
.pin::after{content:"";position:absolute;left:9px;top:9px;width:10px;height:10px;border-radius:50%;background:#fff}
.pulse{position:absolute;left:50%;top:52%;width:38px;height:14px;margin:-7px 0 0 -19px;border-radius:50%;background:var(--c);opacity:0;animation:pulse 2.2s ease-out infinite}
@keyframes bob2{50%{transform:translateY(-5px)}}
@keyframes pulse{from{transform:scale(.3);opacity:.55}to{transform:scale(1.9);opacity:0}}
.lc{padding:8px 8px 2px}
.lk{font-size:11.5px;font-weight:800;color:var(--plum2);text-transform:uppercase;letter-spacing:.06em}
.ln{margin:1px 0 4px;font-size:19px;font-weight:900;line-height:1.2;color:var(--plum)}
.lc p{font-size:14px;line-height:1.4}
.lc .nt{font-style:italic;color:var(--mute);font-size:13.5px}
.lb{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.lb a{flex:1 1 auto;text-align:center;padding:9px 10px;border-radius:12px;background:#fff;color:var(--plum);font-weight:800;font-size:13.5px;text-decoration:none;border:1.5px solid rgba(123,61,105,.25)}
.lb a:first-child{background:var(--plum);color:#fff;border-color:var(--plum)}
.locm .meta,.card .meta{padding:0 6px}

/* travel tips and contacts: the same card look as the locations */
.tips p+p{margin-top:8px}
.tips b{color:var(--plum)}
.cc{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;padding:8px 0;border-top:1px solid var(--line)}
.cc:first-of-type{border-top:0}
.ca{flex:none;width:38px;height:38px;border-radius:50%;background:var(--blush);color:var(--plum);display:grid;place-items:center;font-weight:900}
.cn{flex:1 1 120px;min-width:0}
.cn b{display:block;color:var(--plum);font-size:15px;line-height:1.25}
.cn small{display:block;color:var(--mute);font-size:12.5px;line-height:1.3}
.cc .lb{flex:1 1 100%;margin-top:0}

/* story chapters */
.yr{display:inline-block;background:#fff;color:var(--plum2);font-size:11.5px;font-weight:900;letter-spacing:.05em;padding:1px 8px;border-radius:8px;margin-bottom:3px}
.chap img{display:block;width:100%;max-width:230px;border-radius:12px;margin-top:6px;aspect-ratio:4/3;object-fit:cover}

/* forwarded note from the families */
.fwd .bub{max-width:88%}
.fw{font-size:12px;font-style:italic;color:var(--mute)}
.fq{border-left:3px solid var(--blush2);padding-left:10px;margin-top:4px}
.fq b{color:var(--plum)}
.fq small{font-size:12.5px;color:var(--mute)}
.fq .amp{font-family:'Pacifico',cursive;color:var(--blush2);font-size:18px;line-height:1.1}
.fq .inv{color:var(--plum2);font-weight:700}

/* hashtag sticker */
.stk .bub{background:none;box-shadow:none;padding:4px 2px}
.sticker{display:block;transform:rotate(-4deg);background:linear-gradient(140deg,#fff0f4,#f6c2d0);border:4px solid #fff;border-radius:22px;padding:14px 18px 12px;box-shadow:0 6px 16px rgba(91,42,78,.2);text-align:center}
.sticker .hs{display:block;font-weight:900;font-size:24px;line-height:1.2;color:var(--plum);overflow-wrap:anywhere}
.sticker .sc{display:block;margin-top:2px;font-size:13px;font-weight:800;color:var(--plum2)}
.stk .meta{margin-top:8px}

/* end of the thread: share + branding, above the docked composer */
main{padding-bottom:calc(var(--cb,0px) + 22px)}
.foot{display:flex;flex-direction:column;align-items:center;gap:10px;padding:6px 12px 0}
.foot .chg{font-size:13.5px}
.made{font-size:11.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--plum2);text-decoration:none;opacity:.8}

/* composer: the guest's RSVP reply */
.comp{position:fixed;left:50%;bottom:0;z-index:6;width:100%;max-width:480px;transform:translateX(-50%);background:#fff8f4;border-top:1px solid var(--line);padding:9px 12px calc(10px + env(safe-area-inset-bottom));box-shadow:0 -6px 22px rgba(91,42,78,.1)}
.ask{margin:0 0 7px;font-size:12.5px;font-weight:700;color:var(--mute);text-align:center}
.ask b{color:var(--plum)}
fieldset{border:0;margin:0;padding:0;min-width:0}
.chips{display:flex;gap:8px}
.chip{flex:1;position:relative;min-width:0}
.chip input,.vh{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.chip span{display:block;text-align:center;padding:10px 6px;border-radius:999px;border:1.5px solid var(--plum2);background:#fff;color:var(--plum);font-weight:800;font-size:14px;line-height:1.2;transition:transform .2s}
.chip input:checked+span{background:var(--plum);color:#fff}
.chip input:focus-visible+span{outline:3px solid var(--mint);outline-offset:2px}
.chip span:active{transform:scale(.95)}
.nudge .chip span{animation:nudge .6s cubic-bezier(.3,1.6,.5,1) 2}
.nudge .chip:nth-child(2) span{animation-delay:.12s}
@keyframes nudge{50%{transform:scale(1.07)}}
.row{display:flex;gap:8px;margin-top:8px;align-items:center}
.fld{flex:1;min-width:0;border:1.5px solid var(--line);border-radius:999px;padding:10px 15px;font-size:16px;background:#fff}
.fld::placeholder{color:#a7909f}
.fld.bad{border-color:#c4486a}
.fld.bad::placeholder{color:#c4486a}
.step{flex:none;display:flex;align-items:center;background:#fff;border:1.5px solid var(--line);border-radius:999px;padding:3px}
.step button{width:34px;height:34px;border-radius:50%;border:0;background:var(--blush);color:var(--plum);font-size:20px;font-weight:900;line-height:1}
.step button:disabled{opacity:.35}
.step output{min-width:62px;text-align:center;font-size:13.5px;font-weight:800;color:var(--plum);white-space:nowrap}
.evp{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin-top:8px;transition:opacity .2s}
.evp .lbl{font-size:12px;font-weight:800;color:var(--mute);margin-right:2px}
.evc{position:relative;min-width:0;max-width:100%}
.evc input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.evc span{display:block;padding:4px 10px;border-radius:999px;border:1.5px solid rgba(123,61,105,.3);background:#fff;color:var(--mute);font-size:12.5px;font-weight:800;line-height:1.3}
.evc input:checked+span{background:var(--blush);border-color:var(--blush2);color:var(--plum)}
.evc input:checked+span::before{content:"✓ "}
.evc input:focus-visible+span{outline:3px solid var(--mint);outline-offset:2px}
.evp.off{opacity:.45}
.send{flex:none;width:46px;height:46px;border-radius:50%;border:0;background:var(--plum);color:#fff;display:grid;place-items:center;box-shadow:0 3px 10px rgba(91,42,78,.3)}
.send svg{width:20px;height:20px;fill:currentColor;margin-left:3px}
.rsvp-err{margin:6px 0 0;color:#c4486a;font-size:12.5px;font-weight:700;text-align:center}
.sent{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 10px;font-size:13.5px}
.sent p{margin:0;width:100%;text-align:center;font-weight:800;color:var(--plum)}
.sent p span{color:var(--mint)}
.sent .stx{font-weight:600;color:var(--mute);font-size:12.5px;line-height:1.4}
.wa{background:var(--mint);color:#fff;text-decoration:none;font-weight:800;padding:9px 16px;border-radius:999px}
.chg{border:1.5px solid var(--plum2);background:#fff;color:var(--plum);font-weight:800;padding:8px 14px;border-radius:999px}

/* YouTube's player must stay visible while it plays: a small card at the right, above the reply bar and the
   "new messages" button (--cb is the reply bar's height) */
.yt-card{position:fixed;z-index:6;right:max(12px,calc(50vw - 240px + 12px));bottom:calc(var(--cb,0px) + 56px);width:160px;height:90px;overflow:hidden;border-radius:12px;background:#000;box-shadow:0 12px 30px -12px rgba(0,0,0,.5);opacity:0;transform:translateY(8px);transition:opacity .4s,transform .4s;pointer-events:none}
.yt-card.on{opacity:1;transform:none;pointer-events:auto}
.yt-card iframe{display:block;width:160px;height:90px;border:0}
.newp{position:fixed;left:50%;bottom:calc(var(--cb,0px) + 12px);z-index:6;transform:translateX(-50%);border:0;border-radius:999px;background:var(--plum);color:#fff;font-weight:800;font-size:13px;padding:8px 14px;box-shadow:0 4px 14px rgba(91,42,78,.35)}
#fx{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:7}

@media (max-width:370px){
  .bub{font-size:15px}
  .gname{font-size:17px}
  .skip-btn{padding:7px 10px}
  .chip span{font-size:13.5px}
  .step output{min-width:56px}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}
