[hidden]{display:none!important}
:root{
  --bg:#3B0A11; --bg2:#4A1419; --lace:#4E1C1F; --line:#7A3C3F; --rule:#5E2629;
  --cream:#F3E6D8; --soft:#E8D7CA; --muted:#D8C2B4; --gold:#C9A66B; --gold-light:#E3C890;
  --serif:'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --script:'Pinyon Script', 'Snell Roundhand', cursive;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;color-scheme:dark;-webkit-tap-highlight-color:transparent}
button,a,label{touch-action:manipulation}
body{margin:0;background:var(--bg);color:var(--cream);font-family:var(--serif);font-size:17px;line-height:1.5;overflow-x:hidden}
body.locked{overflow:hidden;height:100svh}
p{margin:0}
h1,h2,h3{margin:0;font-weight:inherit}
svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex:none}
a{color:var(--cream)}
:focus-visible{outline:2px solid var(--cream);outline-offset:3px}

/* ---------- shared ---------- */
.script{font-family:var(--script);font-weight:400;line-height:1.1}
.caps{font-size:14px;letter-spacing:.14em;font-weight:500}
.caps.small{font-size:12px;letter-spacing:.18em}
.label{font-size:13px;letter-spacing:.32em;font-weight:500}
.lead{font-size:16px;line-height:1.6;color:var(--soft);text-wrap:balance}
.note{font-size:15px;font-style:italic;color:var(--muted)}
.it{font-style:italic}
.btn{min-height:48px;padding:0 26px;border-radius:999px;font:600 15px/1 var(--serif);letter-spacing:.14em;display:inline-flex;align-items:center;justify-content:center;gap:10px;text-decoration:none;cursor:pointer;transition:transform .15s, background .2s, color .2s}
.btn:active{transform:scale(.97)}
.btn-solid{background:var(--cream);color:var(--bg);border:1px solid var(--cream)}
.btn-ghost{background:transparent;color:var(--cream);border:1px solid var(--cream)}
.btn-ghost:hover{background:rgba(243,230,216,.08)}
.btn.wide{width:100%}
.tulip{position:absolute;pointer-events:none;user-select:none}

/* ---------- cover ---------- */
.cover{position:fixed;inset:0;z-index:20;background:var(--bg);overflow:hidden}
/* The cover is one fixed 390x760 design (an iPhone-shaped card) laid out in plain px, then scaled
   as a whole by --k (set in app.js to fit the screen), so every device shows the same composition.
   Wider/taller screens just get more maroon around it; the tulips bleed past its edges. */
.cover-art{position:absolute;left:50%;top:50%;width:390px;height:760px;margin:-380px 0 0 -195px;transform:scale(var(--k,1));
  display:flex;flex-direction:column;align-items:center;justify-content:center}
.tulip-tr{right:-70px;top:-50px;width:236px;transform:rotate(-24deg)}
.tulip-bl{left:-80px;bottom:-40px;width:250px;transform:rotate(160deg) scaleX(-1)}
.cover-text{position:relative;text-align:center;display:flex;flex-direction:column;align-items:center;gap:4px;margin-top:-76px}
.eyebrow{font-size:13px;letter-spacing:.32em;font-weight:500;margin-bottom:14px}
.names{font-family:var(--script);font-weight:400;display:flex;flex-direction:column;line-height:1;margin-bottom:22px}
.names .n1,.names .n2{font-size:60px}
.names .amp{font-size:58px;line-height:.8}
/* seal sits just below "7 SYAABAN 1448H" (that line ends at y≈480 of the canvas) */
.cover-cta{position:absolute;left:0;right:0;top:510px;display:flex;flex-direction:column;align-items:center;gap:12px;padding:0 16px;text-align:center}
/* royal wax seal "OPEN" button */
.seal-btn{background:none;border:0;padding:4px 8px;border-radius:16px;color:var(--cream);display:flex;flex-direction:column;align-items:center;gap:8px;cursor:pointer;font-family:var(--serif)}
/* heart wax seal from heart-wax-seal.svg (inlined in index.html); reset the page-wide svg icon
   styles so it renders as drawn. Its lighting filters all use color-interpolation-filters:sRGB —
   with the default (linearRGB) iOS Safari washes out the colours. */
.seal{width:120px;height:122px;fill:#000;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;overflow:visible;
  filter:drop-shadow(0 4px 6px rgba(20,3,5,.55));animation:breathe 2.6s ease-in-out infinite}
@keyframes breathe{50%{transform:scale(1.05)}}
/* after the refresh button closes the doors: no intro replay, the seal pops back in */
.cover.seen .cover-text>*,.cover.seen .cover-cta{animation:none;opacity:1}
.cover.seen:not(.sealing) .seal{animation:sealIn .5s ease both,breathe 2.6s ease-in-out .5s infinite}
@keyframes sealIn{from{opacity:0;transform:scale(.8)}to{opacity:1;transform:none}}
.cover.sealing .seal{animation:none;transform:scale(1.25);opacity:0;transition:transform .4s ease, opacity .4s ease}/* intro fade */
.cover-text>*,.cover-cta{opacity:0;animation:rise 1s ease forwards}
.cover-text>*:nth-child(2){animation-delay:.25s}.cover-text>*:nth-child(3){animation-delay:.5s}.cover-text>*:nth-child(4){animation-delay:.65s}.cover-cta{animation-delay:1s}
@keyframes rise{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
/* opened */
/* opened: cover splits down the middle and both halves slide apart like sliding doors */
.door{z-index:22;pointer-events:none;transition:transform 1.3s cubic-bezier(.6,0,.25,1)}
.door .cover-text>*,.door .cover-cta{animation:none!important;opacity:1}
.door .cover-cta{visibility:hidden}
.door-l{clip-path:inset(0 50% 0 0)}
.door-r{clip-path:inset(0 0 0 50%)}
.door-l.open{transform:translateX(-50%)}
.door-r.open{transform:translateX(50%)}
.door::after{content:"";position:absolute;top:0;bottom:0;z-index:5;width:28px}
.door-l::after{right:50%;background:linear-gradient(to left,rgba(0,0,0,.4),transparent)}
.door-r::after{left:50%;background:linear-gradient(to right,rgba(0,0,0,.4),transparent)}
.cover.gone{display:none}

/* ---------- main ---------- */
.main{position:relative;max-width:480px;margin:0 auto;padding:110px 24px 100px;overflow:hidden;opacity:0;transition:opacity 1s .2s}
body.opened .main{opacity:1}
.tulip-top{right:-60px;top:-30px;width:200px;transform:rotate(-24deg)}
.tulip-bottom{left:-70px;bottom:-40px;width:220px;transform:rotate(160deg) scaleX(-1)}
.ghost{position:absolute;opacity:.12;width:300px;pointer-events:none}
.ghost-r{right:-120px;top:1000px;transform:rotate(-10deg)}
.ghost-l{left:-110px;top:1900px;transform:scaleX(-1)}
.block{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;margin-bottom:40px}
.greet{font-size:30px}
.host{font-size:15px;letter-spacing:.12em;font-weight:600;margin-top:10px}
.sub{font-size:13px;letter-spacing:.04em;color:var(--muted)}
.amp-sm{font-size:36px!important;margin:0}
.amp-sm+.host{margin-top:0}
.block .lead{margin-top:6px}
.couple{gap:2px}
.script.big{font-size:clamp(40px,12vw,50px)}
/* full names: always one line; app.js shrinks the font until the longer name fits */
.fit-line{white-space:nowrap}
.amp-md{font-size:44px;margin:6px 0}
.countdown{width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:6px}
.countdown div{border:1px solid var(--line);border-radius:12px;padding:14px 0;display:flex;flex-direction:column}
.countdown span{font-size:30px;font-weight:600;font-variant-numeric:tabular-nums;line-height:1.1}
.countdown small{font-size:11px;letter-spacing:.16em;color:var(--muted)}
.row-links{display:flex;gap:22px;flex-wrap:wrap;justify-content:center}
.link{min-height:44px;display:inline-flex;align-items:center;gap:8px;font-size:15px;letter-spacing:.04em;text-underline-offset:4px}
.rule{border-top:1px solid var(--rule);border-bottom:1px solid var(--rule);padding:28px 0}
.date{font-size:22px;font-weight:600;letter-spacing:.06em}
.time{font-size:20px;font-weight:500;margin-top:10px}
.venue{font-size:20px;font-weight:600}
.map-btn{margin-top:10px;letter-spacing:.06em}
.contacts{width:100%;display:flex;flex-direction:column;gap:10px}
.contacts a{min-height:52px;border:1px solid var(--line);border-radius:14px;padding:0 18px;display:flex;align-items:center;justify-content:space-between;text-decoration:none;transition:background .2s}
.contacts a:hover{background:rgba(243,230,216,.06)}
.contacts b{font-size:17px}.contacts i{font-weight:400;font-style:normal;color:var(--muted)}
.contacts span{font-size:15px;font-variant-numeric:tabular-nums}

/* ---------- form ---------- */
.title{font-size:44px!important}
.card{width:100%;text-align:left;background:var(--bg2);border:1px solid #6E3034;border-radius:18px;padding:22px;display:flex;flex-direction:column;gap:16px;margin-top:16px}
.card label,.card legend,.flabel{display:flex;flex-direction:column;gap:6px;font-size:13px;letter-spacing:.14em;font-weight:600}
.card fieldset{border:0;margin:0;padding:0;min-width:0}
.card legend{padding:0;margin-bottom:6px}
.card input[type=text],.card textarea{width:100%;min-height:46px;border-radius:10px;border:1px solid var(--line);background:var(--bg);color:var(--cream);padding:10px 14px;font:400 17px/1.4 var(--serif);letter-spacing:0;resize:vertical}
.card input::placeholder,.card textarea::placeholder{color:#B59A8E}
.seg{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.seg input{position:absolute;opacity:0;pointer-events:none}
.seg label{min-height:46px;border-radius:10px;border:1px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:16px;letter-spacing:0;cursor:pointer;flex-direction:row}
.seg input:checked+label{background:var(--cream);color:var(--bg);border-color:var(--cream)}
.seg input:focus-visible+label{outline:2px solid var(--cream);outline-offset:3px}
#paxRow{display:flex;flex-direction:column;gap:6px}
#paxRow.off{display:none}
.stepper{display:flex;align-items:center;gap:14px}
.stepper button{width:46px;height:46px;border-radius:50%;border:1px solid var(--line);background:transparent;color:var(--cream);font-size:22px;cursor:pointer}
.stepper output{min-width:32px;text-align:center;font-size:24px;font-weight:600}
.hp{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.form-msg{min-height:1em;font-size:15px;color:var(--muted)}
.form-msg.err{color:#FFC9B8}
.wish-head{width:100%;display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-top:22px;text-align:left;flex-wrap:wrap}
.wishes{position:relative;width:100%;display:flex;flex-direction:column;gap:12px;text-align:left;overflow-y:auto;overscroll-behavior:contain;padding-right:6px;scrollbar-width:thin;scrollbar-color:var(--line) transparent}
.wishes:focus-visible{outline-offset:6px}
/* soft fade at the bottom while more wishes are below */
.wishes.more-below{-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 56px),transparent);mask-image:linear-gradient(to bottom,#000 calc(100% - 56px),transparent)}
.wish{border-bottom:1px solid var(--rule);padding-bottom:14px;display:flex;flex-direction:column;gap:6px;animation:rise .6s ease both}
.wish-name{font-size:18px;overflow-wrap:anywhere}
.wish p{font-size:16px;line-height:1.55;color:var(--soft);white-space:pre-line;overflow-wrap:anywhere}
.empty{color:var(--muted);font-style:italic;text-align:center;padding:12px 0}
.foot{gap:8px;margin-bottom:40px}

/* ---------- music + petals ---------- */
/* floating buttons, bottom-right: music on top, refresh below it */
.fabs{position:fixed;right:16px;bottom:max(16px,env(safe-area-inset-bottom));z-index:30;display:flex;flex-direction:column;gap:10px}
.fab{position:relative;width:48px;height:48px;border-radius:50%;border:1px solid var(--cream);background:var(--lace);color:var(--cream);display:flex;align-items:center;justify-content:center;cursor:pointer}
.fab:active{transform:scale(.94)}
.music.playing svg{animation:spin 6s linear infinite}
.music:not(.playing)::after{content:"";position:absolute;width:28px;height:1.5px;background:var(--cream);transform:rotate(-45deg)}
@keyframes spin{to{transform:rotate(360deg)}}
#petals{position:fixed;inset:0;pointer-events:none;z-index:25;width:100%;height:100%}

/* scroll reveal */
.reveal{opacity:0;transform:translateY(24px);transition:opacity .9s ease, transform .9s ease}
.reveal.in{opacity:1;transform:none}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
  .reveal,.cover-text>*,.cover-cta{opacity:1;transform:none}
  .cover.sealing .seal{transform:none}
}
