/* Ila & Hemant · Lucknow. Same identity as the Haldwani invitation:
   ivory paper, Cormorant Garamond + Jost, wine and gold, glass controls. */
:root {
  --paper: #eee2c8; --ink: #344022; --wine: #8e171c; --gold: #ad824b; --rose: #c4596b;
  --serif: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --deva: 'Noto Serif Devanagari', 'Kohinoor Devanagari', 'Devanagari Sangam MN', serif;
  --t-label: 11px; --t-small: 13px; --t-body: 15px; --t-lead: 20px; --t-h3: 24px; --t-h2: 34px; --t-h1: 48px;
  --track-label: .22em;
  color-scheme: light; font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden; -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { display: block; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.invitation-app { position: fixed; inset: 0; display: grid; place-items: center; overflow: hidden; }
.ambient { position: absolute; inset: -40px; background: url(assets/opening-amb.jpg) center / cover; filter: blur(30px) saturate(1.1); opacity: .55; transition: background-image .8s; }
#app:not([data-state="closed"]) .ambient { background-image: url(assets/house-amb.jpg); opacity: .35; }

.scene {
  position: relative; width: min(100%, 66.6667dvh); height: 100%; max-width: 900px; overflow: hidden;
  background: var(--paper); isolation: isolate; box-shadow: 0 0 100px rgba(117,100,72,.08);
  --bar-h: 66px; --bar-bottom: max(12px, env(safe-area-inset-bottom, 0px));
  --bar-clear: calc(var(--bar-h) + var(--bar-bottom) + 16px); --cue-clear: 0px;
  --top: max(14px, env(safe-area-inset-top, 0px));
  touch-action: none; user-select: none; -webkit-user-select: none;
}
#app[data-mode="manual"] .scene { --cue-clear: 44px; }
@media (min-width: 600px) {
  .scene { --phone-h: min(calc(100vh - 40px), 900px); --phone-h: min(calc(100dvh - 40px), 900px); height: var(--phone-h); width: calc(var(--phone-h) * .4615); max-width: calc(100% - 32px); border-radius: 30px; box-shadow: 0 30px 90px rgba(43,32,16,.18), 0 0 0 1px rgba(43,32,16,.08); }
}

/* ---------- Envelope ---------- */
.envelope { position: absolute; inset: 0; z-index: 20; background: var(--paper); transition: opacity .7s ease; }
#app[data-state="revealed"] .envelope, #app[data-state="journey"] .envelope { opacity: 0; pointer-events: none; }
/* The opening film. .art is the film's own box (9:16 sized to cover the scene by opening.js),
   so the invitation text sits on the same spot of the picture at every screen shape. */
.art { position: absolute; top: 50%; left: 50%; height: 100%; aspect-ratio: 9 / 16; transform: translate(-50%, -50%); container-type: size; }
.open-film { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: var(--paper); pointer-events: none; }
.art-text { inset: 0; z-index: 9; text-align: center; pointer-events: none; color: #3f4a2a; }
.art-text p { position: absolute; left: 0; right: 0; margin: 0; }
.t-om { top: 6.1%; font: 500 2.3cqw/1.3 var(--deva); color: #9a6a23; text-shadow: 0 0 10px #f6ead0; }
.t-bless { top: 10.5%; font: 500 1.9cqw/1 var(--serif); letter-spacing: .12em; text-transform: uppercase; color: #4a4f31; }
.t-lotus { position: absolute; left: 50%; top: 13.6%; width: 5cqw; transform: translateX(-50%); fill: var(--wine); }
.t-names { top: 17.4%; font: 500 5.4cqw/1 var(--serif); letter-spacing: .05em; text-transform: uppercase; color: #3b4626; white-space: nowrap; }
.t-names i { display: inline-block; margin: 0 .12em; font: italic 500 1.25em/0 var(--serif); text-transform: none; color: var(--wine); transform: translateY(.06em); }
.t-rule { top: 23.3%; display: flex; align-items: center; justify-content: center; gap: 1.2cqw; }
.t-rule span { width: 16cqw; height: 1px; background: linear-gradient(90deg, transparent, rgba(173,130,75,.85)); }
.t-rule span:last-child { transform: scaleX(-1); }
.t-rule svg { width: 3.6cqw; fill: var(--wine); }
.t-date { top: 26.3%; font: 500 3.1cqw/1 var(--serif); letter-spacing: .13em; text-transform: uppercase; color: #3b4626; }
.t-tap { top: 76.3%; font: 500 2.25cqw/1 var(--serif); letter-spacing: .2em; text-transform: uppercase; color: #4a4f31; text-shadow: 0 0 8px #f4e9d3, 0 0 3px #f4e9d3; animation: tap-breathe 2.6s ease-in-out infinite; }
.t-tap-rule { top: 78.5%; display: flex; align-items: center; justify-content: center; gap: 1cqw; color: var(--wine); font-size: 1.1cqw; }
.t-tap-rule span { width: 6cqw; height: 1px; background: rgba(142,23,28,.45); }
@keyframes tap-breathe { 50% { opacity: .55; } }


.open-invitation { position: absolute; inset: 0; z-index: 30; width: 100%; height: 100%; border: 0; background: transparent; }
.open-invitation:focus-visible { outline: 2px solid var(--wine); outline-offset: -14px; border-radius: 4px; }
#app:not([data-state="closed"]) .open-invitation { pointer-events: none; }

.skip-opening { position: absolute; z-index: 40; right: 14px; bottom: max(18px, env(safe-area-inset-bottom)); }

/* ---------- Journey stage ---------- */
.stage { position: absolute; inset: 0; z-index: 1; overflow: hidden; background: #2a2116; }
.layer { position: absolute; inset: 0; opacity: 0; will-change: transform, opacity; transform-origin: 50% 50%; }
.layer img { width: 100%; height: 100%; object-fit: cover; }
.fill-layer { position: absolute; inset: -4%; z-index: -20; visibility: hidden; }
.fill-layer img { width: 100%; height: 100%; object-fit: cover; filter: blur(14px) saturate(1.05); }
.film-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; visibility: hidden; pointer-events: none; }
.sparkle { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; }
.cloudbank { position: absolute; inset: 0; z-index: 7; pointer-events: none; opacity: 0; }
.cloudbank .cl { position: absolute; max-width: none; will-change: transform; }
.cl-1 { width: 190%; left: -45%; top: 58%; } .cl-2 { width: 140%; left: -20%; top: -12%; }
.cl-3 { width: 200%; left: -50%; top: 18%; transform: scaleX(-1); } .cl-4 { width: 150%; left: -25%; top: 40%; }
.cl-veil { position: absolute; inset: 0; background: radial-gradient(90% 70% at 50% 50%, #fff9ee, #f3e7cf); opacity: 0; }

/* ---------- Glass controls (as Haldwani) ---------- */
.glass { color: #fffaf0; text-shadow: 0 1px 8px rgba(0,0,0,.3);
  background: radial-gradient(120% 90% at 14% -20%, rgba(255,255,255,.4), rgba(255,255,255,0) 52%), radial-gradient(80% 90% at 100% 130%, rgba(255,255,255,.15), rgba(255,255,255,0) 60%), linear-gradient(160deg, rgba(255,255,255,.22), rgba(255,255,255,.07) 45%, rgba(255,255,255,.04)), rgba(28,24,16,.18);
  -webkit-backdrop-filter: blur(22px) saturate(190%) brightness(.88); backdrop-filter: blur(22px) saturate(190%) brightness(.88);
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.7), inset 0 -1px 1px rgba(255,255,255,.18), inset 0 0 24px rgba(255,255,255,.1), 0 12px 32px rgba(10,8,4,.24), 0 1px 3px rgba(10,8,4,.2); }
#app.closing-open .glass { color: #2f3424; text-shadow: none; background: radial-gradient(120% 90% at 14% -20%, rgba(255,255,255,.8), rgba(255,255,255,0) 55%), linear-gradient(160deg, rgba(255,253,248,.8), rgba(247,239,224,.7)); border-color: rgba(255,255,255,.8); box-shadow: inset 0 1px 1px #fff, inset 0 0 18px rgba(255,255,255,.5), 0 10px 30px rgba(42,32,16,.18), 0 0 0 1px rgba(201,179,136,.33); }
.glass-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 0 16px; border: 1px solid rgba(255,248,227,.64); border-radius: 28px; color: #3c3d27; background: rgba(247,237,218,.91); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); font: 500 var(--t-small)/1 var(--sans); letter-spacing: .01em; box-shadow: 0 2px 16px rgba(34,23,0,.05); }

.top-controls, .day-bar, .home-logo, .step-next, .arrival, .ceremonies { opacity: 0; pointer-events: none; }
#app[data-state="revealed"] :is(.top-controls, .day-bar, .home-logo),
#app[data-state="journey"] :is(.top-controls, .day-bar, .home-logo) { animation: arrive 1.05s ease .28s forwards; pointer-events: auto; }
#app[data-state="revealed"] .step-next, #app[data-state="journey"] .step-next { animation: fade-in .9s ease .3s forwards; pointer-events: auto; }
@keyframes fade-in { to { opacity: 1; } }
#app[data-state="revealed"] .arrival, #app[data-state="journey"] .arrival, #app[data-state="journey"] .ceremonies, #app[data-state="revealed"] .ceremonies { opacity: 1; }
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.home-logo { position: absolute; z-index: 12; top: var(--top); left: 8px; display: grid; place-items: center; min-width: 64px; height: 46px; padding: 0 8px; border: 0; border-radius: 12px; background: transparent; font: 500 23px/1 var(--serif); letter-spacing: .12em; white-space: nowrap; color: #fff6e6; text-shadow: 0 0 2px rgba(26,22,15,.85), 0 1px 4px rgba(26,22,15,.7), 0 0 16px rgba(26,22,15,.55); transition: transform .2s; }
.home-logo span { margin-right: -.12em; }
.home-logo i { font-size: 22px; font-weight: 500; color: #f4b19a; }
#app.closing-open .home-logo { color: #4d4026; text-shadow: none; }
#app.closing-open .home-logo i { color: var(--wine); }
.home-logo:active { transform: scale(.94); }

.top-controls { position: absolute; z-index: 11; top: var(--top); right: 14px; display: flex; align-items: center; gap: 8px; }
#app.closing-open .top-controls { visibility: hidden; }
.mode-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 17px 0 14px; border-radius: 23px; font: 500 var(--t-small)/1 var(--sans); letter-spacing: .01em; white-space: nowrap; transition: transform .2s; }
.mode-toggle:active { transform: scale(.97); }
.mode-toggle svg { flex: 0 0 19px; width: 19px; height: 19px; }
.mode-toggle .icon-play, #app[data-mode="manual"] .mode-toggle .icon-touch { display: none; }
#app[data-mode="manual"] .mode-toggle .icon-play { display: block; }

.day-bar { position: absolute; z-index: 13; left: 12px; right: 12px; bottom: var(--bar-bottom); height: var(--bar-h); display: flex; align-items: stretch; padding: 0 6px; border-radius: 24px; }
.day-all { display: flex; align-items: center; gap: 9px; padding: 0 13px 0 10px; border: 0; background: transparent; color: inherit; font: 500 14px/1 var(--sans); letter-spacing: .01em; white-space: nowrap; }
.day-all svg { flex: 0 0 26px; width: 26px; height: 26px; color: #f3d9a6; }
#app.closing-open .day-all svg { color: #a27a52; }
.day-list { flex: 1 1 0%; display: grid; grid-template-columns: repeat(3, 1fr); border-left: 1px solid rgba(255,255,255,.28); margin: 13px 0; }
#app.closing-open .day-list { border-left-color: rgba(201,179,136,.6); }
.day-button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; margin: -13px 0; padding: 0; border: 0; background: transparent; color: inherit; opacity: .78; transition: opacity .2s; }
.day-button b { font: 500 29px/1 var(--serif); font-variant-numeric: oldstyle-nums; letter-spacing: .01em; }
.day-button small { font: 500 var(--t-label)/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.day-button[aria-current] { opacity: 1; }
.day-button[aria-current] small { color: #f3d9a6; }
#app.closing-open .day-button[aria-current] small { color: #a27a52; }
.day-button[aria-current]::after { content: ""; position: absolute; bottom: 7px; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }

.step-next { position: absolute; z-index: 10; left: 50%; bottom: calc(var(--bar-bottom) + var(--bar-h) + 6px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 38px; padding: 4px 16px 2px; border: 0; background: transparent; color: #fff4df; font: 500 var(--t-label)/1 var(--sans); letter-spacing: var(--track-label); text-transform: uppercase; text-shadow: 0 1px 10px rgba(23,28,22,.8); white-space: nowrap; }
#app[data-mode="auto"] .step-next, #app.closing-open .step-next { visibility: hidden; }
.step-next i { position: relative; display: block; width: 1px; height: 14px; overflow: hidden; background: rgba(255,244,223,.25); }
.step-next i::after { content: ""; position: absolute; left: 0; top: -8px; width: 1px; height: 8px; background: #fff4df; animation: cue-drop 2.2s ease-in-out 1.2s infinite; }
@keyframes cue-drop { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 75%, 100% { transform: translateY(22px); opacity: 0; } }
.journey-wait { position: absolute; z-index: 10; left: 50%; bottom: calc(var(--bar-bottom) + var(--bar-h) + 18px); display: flex; gap: 6px; transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .4s; }
#app.journey-waiting .journey-wait { opacity: 1; }
.journey-wait i { width: 6px; height: 6px; border-radius: 50%; background: #fff4df; box-shadow: 0 0 8px rgba(23,28,22,.67); animation: wait-dot 1.2s ease-in-out infinite; }
.journey-wait i:nth-child(2) { animation-delay: .15s; } .journey-wait i:nth-child(3) { animation-delay: .3s; }
@keyframes wait-dot { 0%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

/* ---------- Arrival + ceremony titles ---------- */
.arrival { position: absolute; z-index: 8; inset: 0; }
.arrival-bottom { position: absolute; bottom: 0; left: 0; width: 100%; padding: 55px 20px calc(var(--bar-clear) + var(--cue-clear)); text-align: center; color: #fff4df; background: linear-gradient(transparent, rgba(32,34,21,.45) 30%, rgba(31,36,24,.75)); text-shadow: 0 1px 16px rgba(23,28,22,.67); opacity: var(--arrival, 1); transform: translateY(calc((1 - var(--arrival, 1)) * 10px)); }
.eyebrow { font: 500 var(--t-label)/1.8 var(--sans); letter-spacing: var(--track-label); }
.arrival-bottom .eyebrow { margin: 0 0 11px; }
.arrival-bottom h1 { font: 500 clamp(44px, 12.5vw, 56px)/1 var(--serif); margin: 0; white-space: nowrap; outline: none; letter-spacing: -.01em; }
.arrival-bottom h1 i { color: #e5c592; font-weight: 500; }
.arrival-date { margin: 10px 0 0; font: 500 var(--t-lead)/1.3 var(--serif); letter-spacing: .06em; }

.ceremonies { position: absolute; inset: 0; z-index: 9; pointer-events: none; }
.ceremony { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 130px 20px calc(var(--bar-clear) + var(--cue-clear)); text-align: center; color: #fff6e6; background: linear-gradient(transparent, rgba(29,25,16,.4) 28%, rgba(26,22,14,.8)); text-shadow: 0 1px 16px rgba(23,28,22,.7); opacity: var(--ceremony, 0); transform: translateY(calc((1 - var(--ceremony, 0)) * 10px)); visibility: hidden; }
.ceremony.is-near { visibility: visible; }
.ceremony p, .ceremony h2 { margin: 0; }
.ceremony-date { font: 500 12.5px/1.6 var(--sans); letter-spacing: .3em; text-transform: uppercase; color: #f3d9a6; }
.ceremony-rule { display: flex; align-items: center; justify-content: center; gap: 11px; margin: 8px auto 10px !important; color: #f3d9a6; font-size: 8px; }
.ceremony-rule::before, .ceremony-rule::after { content: ""; width: 46px; height: 1px; background: rgba(243,217,166,.6); }
.ceremony-name { font: 500 clamp(38px, 11vw, 50px)/1 var(--serif); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.ceremony-time { margin-top: 10px !important; font: 500 12.5px/1.6 var(--sans); letter-spacing: .24em; text-transform: uppercase; color: #f3d9a6; text-wrap: balance; }
.ceremony-venue { position: relative; display: inline-flex; align-items: center; gap: 7px; max-width: 100%; margin: 12px auto 0; padding: 8px 15px 8px 12px; border: 1px solid rgba(243,217,166,.4); border-radius: 22px; color: #fff6e6; background: rgba(26,22,14,.28); text-decoration: none; font: 500 14px/1.25 var(--sans); letter-spacing: .01em; pointer-events: none; }
.ceremony-venue::after { content: ""; position: absolute; inset: -7px -4px; }
.ceremony-venue svg { flex: 0 0 16px; width: 16px; height: 16px; color: #f3d9a6; }
.ceremony-venue span { text-decoration: underline rgba(243,217,166,.5); text-underline-offset: 3px; }
.ceremony.is-shown .ceremony-venue { pointer-events: auto; }
@media (min-width: 600px) { .ceremony-name { font-size: 42px; } .arrival-bottom h1 { font-size: 48px; } }
@media (max-height: 700px) {
  .scene { --bar-h: 58px; } .ceremony { padding-top: 80px; } .ceremony-name { font-size: 34px; }
  .ceremony-rule { margin: 6px auto 7px !important; } .ceremony-time { margin-top: 6px !important; }
  .ceremony-venue { margin-top: 8px; padding-block: 6px; } .day-button b { font-size: 26px; }
  .arrival-bottom { padding-top: 32px; } .arrival-bottom h1 { font-size: 40px; }
}
@media (max-width: 359px) { .closing-back { padding-inline: 58px; letter-spacing: .16em; white-space: nowrap; } .day-all { padding: 0 8px 0 6px; gap: 6px; font-size: 13px; } .day-all svg { flex-basis: 22px; width: 22px; height: 22px; } .day-button b { font-size: 25px; } .mode-toggle { padding: 0 13px 0 11px; } }

/* ---------- All events sheet ---------- */
.details-dialog { position: fixed; margin: auto; width: min(480px, 100% - 28px); max-height: calc(100dvh - 40px); overflow: auto; padding: 0; border: 1px solid #c9ad7d; border-radius: 5px; color: var(--ink); background: #f3e8d3; box-shadow: 0 28px 120px rgba(20,23,9,.44); }
.details-dialog::backdrop { background: rgba(32,36,25,.4); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); }
.details-dialog[open] { animation: sheet-in .35s ease both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (min-width: 600px) { .details-dialog { width: min(380px, 100% - 28px); } }
.close-dialog { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,250,240,.6); color: var(--ink); z-index: 1; }
.close-dialog svg { width: 20px; height: 20px; }
.dialog-inner { border: 1px solid rgba(201,179,136,.5); margin: 11px; padding: 33px 19px 26px; text-align: center; }
.lotus { width: 51px; height: 40px; margin-bottom: 13px; }
.sheet-invocation { margin: 0 0 10px; font: 500 16px/1.4 var(--deva); color: #9a6a23; }
.dialog-blessing { margin: 0 0 12px; color: #7e734f; }
.dialog-inner h2 { margin: 0 0 14px; font: 500 var(--t-h1)/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.dialog-inner h2 i { color: var(--wine); font-weight: 500; }
.invitation-copy { margin: 0; font: italic 500 20px/1.4 var(--serif); color: #5d5b40; }
.fine-divider { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 22px auto; color: var(--wine); max-width: 180px; font-size: 9px; }
.fine-divider::before, .fine-divider::after { content: ""; height: 1px; width: 65px; background: rgba(188,155,101,.5); }
.date-label { margin: 0 0 12px; font: 500 var(--t-label)/1.6 var(--sans); letter-spacing: var(--track-label); color: #7e734f; }
.events-list { display: grid; gap: 18px; margin: 4px 0 26px; text-align: left; }
.event-day h3 { margin: 0 0 6px; font: 500 var(--t-label)/1.6 var(--sans); letter-spacing: var(--track-label); text-transform: uppercase; color: #9b7a45; }
.event-row { padding: 6px 0 10px; }
.event-row + .event-row { border-top: 1px dashed rgba(201,179,136,.33); padding-top: 10px; }
.event-go { display: grid; grid-template-columns: 1fr 20px; align-items: center; column-gap: 8px; width: 100%; padding: 4px 2px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.event-go .event-name { font: 500 var(--t-h3)/1.15 var(--serif); }
.event-go .event-meta { grid-row: 2; font: 400 var(--t-small)/1.5 var(--sans); letter-spacing: .02em; color: #7a6f4c; }
.event-go svg { grid-area: 1 / 2 / span 2; width: 18px; height: 18px; color: #9b824e; }
.event-go:hover .event-name { color: var(--wine); }
.event-venue { display: grid; grid-template-columns: 16px 1fr; column-gap: 7px; margin: 6px 2px 0; color: #4b5531; text-decoration: none; font: 500 14px/1.45 var(--sans); }
.event-venue svg { width: 15px; height: 15px; margin-top: 1px; color: #9b6a2a; }
.event-venue span { text-decoration: underline rgba(155,130,78,.5); text-underline-offset: 3px; }
.event-venue small { grid-column: 2; font: 400 12.5px/1.5 var(--sans); color: #7e7656; }
.presence-note { font: italic 500 var(--t-lead)/1.45 var(--serif); margin: 0 0 20px; color: #5d5b40; }
.button-outline, .button-solid { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 18px; font: 500 14px/1.2 var(--sans); letter-spacing: .01em; border-radius: 14px; border: 1px solid rgba(155,130,78,.46); }
.button-outline { background: transparent; color: var(--ink); }
.button-solid { border-color: var(--ink); background: var(--ink); color: #fbf1dd; }
.calendar-button { min-width: 210px; }
.calendar-button svg, .closing-actions svg { width: 17px; height: 17px; flex: 0 0 17px; }
.calendar-note { font: 400 12px/1.5 var(--sans); color: #757056; margin: 10px 0 0; }

/* ---------- Closing ---------- */
.closing { position: absolute; inset: 0; z-index: 12; transform: translateY(102%); transition: transform .55s cubic-bezier(.2,.8,.2,1); user-select: text; -webkit-user-select: text; touch-action: pan-y; }
.closing.is-open { transform: none; }
.closing-scroll { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; outline: none; color: var(--ink); background: radial-gradient(120% 50% at 50% 0%, #fbf4e6, #f1e5cc 70%) fixed, #f1e5cc; }
.closing-back { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; padding: calc(var(--top) + 17px) 92px 24px; border: 0; background: rgba(246,237,220,.86); -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%); box-shadow: 0 1px 0 rgba(214,195,159,.45); color: #6b5f3f; font: 500 var(--t-label)/1 var(--sans); letter-spacing: var(--track-label); text-transform: uppercase; }
.closing-back svg { width: 18px; height: 18px; flex-basis: 18px; }
.closing-inner { max-width: 420px; margin: 0 auto; padding: 18px 22px calc(var(--bar-clear) + 28px); text-align: center; }
.ornament { margin: 6px 0 14px; font: 400 13px/1 var(--sans); letter-spacing: .45em; color: #b08a4c; }
.closing-devanagari { margin: 0 0 10px; font: 500 24px/1.4 var(--deva); color: var(--wine); }
.closing-title { margin: 0 0 14px; font: 500 var(--t-h2)/1.08 var(--serif); letter-spacing: -.005em; color: #2f3424; text-wrap: balance; }
.closing-title em { font-style: italic; color: var(--wine); }
.closing-subtitle { margin: 4px 0 10px; font: 500 var(--t-h2)/1.08 var(--serif); color: #2f3424; }
.closing-lead { max-width: 34ch; margin: 0 auto 22px; font: 400 var(--t-body)/1.65 var(--sans); color: #5e5a43; }
.label-caps { margin: 0 0 6px; font: 500 var(--t-label)/1.6 var(--sans); letter-spacing: var(--track-label); text-transform: uppercase; color: #9b7a45; }
.families { display: grid; gap: 12px; margin: 0 0 26px; }
.family { padding: 18px 16px 16px; border: 1px solid #d6c39f; border-radius: 18px; background: rgba(255,250,240,.5); }
.family h3 { margin: 0 0 6px; font: 500 var(--t-label)/1.6 var(--sans); letter-spacing: var(--track-label); text-transform: uppercase; color: #9b7a45; }
.family p { margin: 0 0 8px; font: 500 var(--t-h3)/1.2 var(--serif); color: #2f3424; text-wrap: balance; }
.family small { display: block; font: 400 var(--t-small)/1.55 var(--sans); color: #6f6a50; text-wrap: balance; }
.rsvp { display: grid; gap: 16px; margin: 0 0 22px; text-align: left; }
.rsvp > .label-caps, .rsvp > .closing-subtitle, .rsvp > .closing-lead { text-align: center; margin-bottom: 0; }
.rsvp > .closing-lead { margin: -6px auto 0; }
.field { display: grid; gap: 8px; font: 500 var(--t-small)/1.3 var(--sans); color: #4c4a35; }
.field small { font-weight: 400; color: #8a8467; }
.field input, .field textarea { width: 100%; padding: 13px 15px; border: 1px solid #ccb68e; border-radius: 14px; background: #fffaf0; color: #2f3424; font: 400 16px/1.4 var(--sans); outline: none; user-select: text; -webkit-user-select: text; }
.field textarea { resize: vertical; min-height: 88px; }
.field input:focus, .field textarea:focus { border-color: #9b7a45; box-shadow: 0 0 0 3px rgba(231,211,168,.4); }
.stepper { display: flex; align-items: center; gap: 14px; }
.stepper button { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid #ccb68e; border-radius: 50%; background: #fffaf0; color: #4c4a35; }
.stepper button svg { width: 22px; height: 22px; }
.stepper button:disabled { opacity: .4; }
.stepper output { min-width: 34px; text-align: center; font: 600 30px/1 var(--serif); color: #2f3424; }
.plans { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.plans legend { margin-bottom: 8px; padding: 0; font: 500 var(--t-small)/1.3 var(--sans); color: #4c4a35; }
.plan { position: relative; display: block; cursor: pointer; }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan span { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 13px 16px; border: 1px solid #d6c39f; border-radius: 14px; background: rgba(255,250,240,.5); transition: border-color .2s, background .2s; }
.plan strong { font: 600 21px/1.1 var(--serif); color: #2f3424; white-space: nowrap; }
.plan small { font: 400 var(--t-small)/1.3 var(--sans); color: #6f6a50; text-align: right; }
.plan input:checked + span { border-color: var(--wine); background: #fff6e6; box-shadow: inset 0 0 0 1px var(--wine); }
.plan input:focus-visible + span { outline: 2px solid var(--wine); outline-offset: 2px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rsvp-send { min-height: 54px; padding: 14px 18px; border: 0; border-radius: 16px; background: #2f3424; color: #fbf1dd; font: 500 16px/1.2 var(--sans); letter-spacing: .01em; box-shadow: 0 8px 24px rgba(47,52,36,.2); }
.rsvp-send:disabled { opacity: .6; }
.rsvp-status { margin: -4px 0 0; font: 400 var(--t-small)/1.5 var(--sans); color: #6f6a50; text-align: center; }
.rsvp-done { position: relative; margin: 0 0 22px; padding: 22px 18px 18px; border: 1px solid #dccbab; border-radius: 24px; background: radial-gradient(120% 70% at 50% 22%, #fdf9f1, #f8f1e3 62%, #f3e9d6); box-shadow: 0 12px 30px rgba(107,90,48,.07), inset 0 1px 0 #fffaf2; text-align: center; }
.done-art { position: relative; width: 250px; max-width: 100%; height: 170px; margin: 0 auto 8px; }
.done-frame { position: absolute; left: 50%; top: 0; width: 192px; height: auto; transform: translateX(-50%); }
.done-glow { position: absolute; left: 50%; top: 54%; width: 190px; height: 170px; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(247,223,166,.69), rgba(247,223,166,0)); opacity: .55; }
.done-check { position: absolute; left: calc(50% + 5.6px); top: 91.5px; width: 64px; height: 64px; transform: translate(-50%, -50%); overflow: visible; }
.done-check path { fill: none; stroke: #3f4229; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 72; stroke-dashoffset: 0; }
.petal { position: absolute; width: 13px; height: 8px; border-radius: 85% 12%; background: linear-gradient(135deg, #f7c6c0, #db767b); opacity: .85; transform: rotate(var(--r)); animation: petal-sway 6.5s var(--sd) ease-in-out infinite alternate; }
.petal.p1 { left: 84%; top: 14%; --r: -28deg; --sd: -1.2s; } .petal.p2 { left: 9%; top: 36%; width: 10px; height: 6px; --r: 24deg; --sd: -3.4s; }
.petal.p3 { left: 94%; top: 44%; width: 10px; height: 6px; --r: -14deg; --sd: -2.1s; } .petal.p4 { left: 4%; top: 80%; --r: 32deg; --sd: -4.6s; }
.petal.p5 { left: 74%; top: 2%; width: 8px; height: 5px; --r: 40deg; --sd: -.6s; }
@keyframes petal-sway { to { transform: translate(-5px, 7px) rotate(calc(var(--r) + 22deg)); } }
.done-title { margin: 2px 0 4px; font: italic 500 40px/1.1 var(--serif); color: #2f3424; outline: none; }
.done-rule { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 10px; }
.done-rule span { width: 78px; height: 1px; background: #cdb88f; }
.done-rule svg { width: 14px; height: 14px; fill: var(--wine); }
.done-message { max-width: 24ch; margin: 0 auto 16px; font: italic 500 21px/1.38 var(--serif); color: #4a4a35; text-wrap: balance; }
.done-pill { display: flex; align-items: center; gap: 13px; max-width: 320px; margin: 0 auto; padding: 13px 18px 13px 16px; border-radius: 20px; background: #efe6d3; color: #2f3424; text-align: left; font: 500 15px/1.4 var(--sans); }
.done-pill svg { flex: 0 0 26px; width: 26px; height: 26px; color: #4c4a35; }
.done-pill i { flex: 0 0 1px; align-self: stretch; margin: 2px 0; background: #c58f74; }
.done-change { min-height: 44px; margin: 8px 0 -6px; padding: 0 12px; border: 0; background: transparent; color: #6b5f3f; font: 500 var(--t-small)/1 var(--sans); text-decoration: underline rgba(107,95,63,.4); text-underline-offset: 4px; }
.rsvp-done.is-playing { animation: done-in .5s cubic-bezier(.2,.8,.2,1) both; }
.rsvp-done.is-playing .done-frame { animation: frame-in .75s cubic-bezier(.2,.8,.2,1) .1s both; }
.rsvp-done.is-playing .done-glow { animation: glow-in2 1.5s ease-out .35s both; }
.rsvp-done.is-playing .done-check path { animation: check-draw .6s cubic-bezier(.65,0,.35,1) .55s both; }
.rsvp-done.is-playing .done-check { animation: check-pop .5s cubic-bezier(.3,1.5,.5,1) 1.1s both; }
.rsvp-done.is-playing .petal { animation: petal-in 1.8s var(--pd, .5s) cubic-bezier(.2,.7,.3,1) both, petal-sway 6.5s calc(var(--pd, .5s) + 1.8s) ease-in-out infinite alternate; }
.rsvp-done.is-playing .p1 { --pd: .45s; } .rsvp-done.is-playing .p2 { --pd: .6s; } .rsvp-done.is-playing .p3 { --pd: .75s; } .rsvp-done.is-playing .p4 { --pd: .9s; } .rsvp-done.is-playing .p5 { --pd: .55s; }
.rsvp-done.is-playing :is(.done-title, .done-message, .done-pill, .done-change) { animation: rise-in .55s ease-out .9s both; }
@keyframes done-in { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes frame-in { from { opacity: 0; transform: translateX(-50%) scale(.85); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes glow-in2 { from { opacity: 0; } to { opacity: .55; } }
@keyframes check-draw { from { stroke-dashoffset: 72; } to { stroke-dashoffset: 0; } }
@keyframes check-pop { 40% { transform: translate(-50%, -50%) scale(1.09); } }
@keyframes petal-in { from { opacity: 0; transform: translate(10px, -26px) rotate(calc(var(--r) - 70deg)); } to { opacity: .85; transform: rotate(var(--r)); } }
.closing-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 26px; }
.closing-actions .button-outline { padding: 12px 10px; color: #2f3424; background: rgba(255,250,240,.5); }
.share-status { margin: -6px 0 14px; font: 400 var(--t-small)/1.5 var(--sans); color: #6f6a50; overflow-wrap: anywhere; }
.share-status:empty { display: none; }
.closing-call { margin: 0 0 8px; font: italic 500 var(--t-lead)/1.4 var(--serif); color: #4c4a35; }
.closing-phones { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 22px; margin: 0 0 28px; }
.closing-phones a { font: 500 17px/1.4 var(--sans); letter-spacing: .03em; color: var(--wine); text-decoration: none; border-bottom: 1px solid rgba(142,23,28,.33); }
.closing-monogram { margin: 0 0 8px; font: 600 30px/1 var(--serif); color: #2f3424; }
.closing-monogram i { font-style: italic; font-weight: 500; color: var(--wine); margin: 0 2px; }
.closing-foot { max-width: 34ch; margin: 0 auto; font: 400 12px/1.6 var(--sans); color: #8a8467; }
.noscript-message { position: fixed; inset: auto 0 0; padding: 20px; text-align: center; background: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  .t-tap { animation: none; }
  .step-next i::after { display: none; }
}

/* ---------- Touch feel ---------- */
.button-outline, .button-solid, .rsvp-send, .glass-button, .event-go, .day-button, .day-all, .stepper button, .close-dialog, .closing-back, .done-change, .step-next, .ceremony-venue, .event-venue { transition: transform .16s ease, opacity .2s ease, background-color .2s ease; touch-action: manipulation; }
.button-outline:active, .button-solid:active, .rsvp-send:active, .glass-button:active, .stepper button:active:not(:disabled), .close-dialog:active { transform: scale(.97); }
.day-button:active, .day-all:active, .event-go:active, .ceremony-venue:active, .event-venue:active, .done-change:active { opacity: .6; }
.plan:active span { background: #fff6e6; }
#app.is-dragging .stage { cursor: grabbing; }
#app.is-dragging .step-next { opacity: 0 !important; }
.closing-scroll :focus-visible, .dialog-inner :focus-visible, .day-bar :focus-visible, .top-controls :focus-visible, .home-logo:focus-visible, .step-next:focus-visible { outline: 2px solid #f3d9a6; outline-offset: 2px; border-radius: 10px; }
.closing-scroll :focus-visible, .dialog-inner :focus-visible { outline-color: var(--wine); }

/* While the RSVP is being typed, the day bar steps aside (the keyboard needs the room). */
#app.typing .day-bar { visibility: hidden; }

/* A long way round (a day button): a soft dip, not a fast-forward. */
.jump-veil { position: absolute; inset: 0; z-index: 7; background: #20170d; opacity: 0; pointer-events: none; }

/* The journey is made for portrait: a phone held on its side asks to be turned. */
.turn-hint { display: none; }
@media (orientation: landscape) and (max-height: 500px) and (pointer: coarse) {
  .turn-hint { position: fixed; inset: 0; z-index: 1000; display: grid; place-content: center; justify-items: center; gap: 8px; padding: 24px; text-align: center; color: var(--ink); background: radial-gradient(120% 90% at 50% 0%, #fbf4e6, var(--paper)); }
  .turn-hint svg { width: 46px; height: 46px; color: var(--wine); animation: turn-nudge 2.8s ease-in-out infinite; }
  .turn-hint p { margin: 6px 0 0; font: 500 26px/1.2 var(--serif); }
  .turn-hint small { font: 400 var(--t-small)/1.5 var(--sans); color: #6f6a50; }
}
@keyframes turn-nudge { 0%, 55%, 100% { transform: rotate(-90deg); } 70%, 90% { transform: rotate(0deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .turn-hint svg { animation: none; }
}

/* ---------- Language switch (envelope screen) ---------- */
.lang-switch { position: absolute; z-index: 35; top: max(14px, env(safe-area-inset-top, 0px)); right: 14px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid rgba(155,130,78,.5); background: rgba(250,243,228,.82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #4c4a35; font: 500 15px/1 var(--sans); text-decoration: none; touch-action: manipulation; transition: transform .16s ease, opacity .2s ease; }
.lang-switch:active { transform: scale(.96); opacity: .8; }
.lang-switch:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
#app.is-opening .lang-switch, #app:not([data-state="closed"]) .lang-switch { display: none; }

/* ---------- Hindi (Devanagari) ---------- */
html[lang="hi"] { --serif: 'Cormorant Garamond', 'Noto Serif Devanagari', 'Kohinoor Devanagari', 'Devanagari Sangam MN', serif; --sans: 'Jost', 'Noto Sans Devanagari', 'Kohinoor Devanagari', 'Devanagari Sangam MN', -apple-system, 'Segoe UI', sans-serif; }
html[lang="hi"] body * { letter-spacing: normal !important; text-transform: none !important; }
html[lang="hi"] :is(.art-text p, h1, h2, h3, .ceremony-name, .ceremony-date, .ceremony-time, .arrival-date, .eyebrow, .label-caps, .closing-lead, .invitation-copy, .presence-note, .family p, .family small, .plan strong, .plan small, .event-name, .event-meta, .date-label, .calendar-note, .closing-call, .closing-foot, .done-message, .done-pill, .rsvp-status, .turn-hint p, .turn-hint small) { line-height: 1.4; }
html[lang="hi"] .ceremony-name { font-size: clamp(34px, 9.6vw, 44px); }
html[lang="hi"] .arrival-bottom h1 { font-size: clamp(40px, 11vw, 50px); }
html[lang="hi"] .closing-title, html[lang="hi"] .closing-subtitle { line-height: 1.22; }
html[lang="hi"] .t-names { line-height: 1.2; }
html[lang="hi"] .ceremony-time, html[lang="hi"] .ceremony-date { font-size: 14px; }
html[lang="hi"] .ceremony-venue { font-size: 15px; }
html[lang="hi"] .day-button small { font-size: 12px; }
html[lang="hi"] .dialog-inner h2 { line-height: 1.2; }
html[lang="hi"] .event-go .event-name { line-height: 1.3; }

/* ---------- Sound button (the music) ---------- */
.sound-toggle { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 50%; transition: transform .2s; }
.sound-toggle[hidden] { display: none; }
.sound-toggle:active { transform: scale(.94); }
.sound-toggle svg { width: 21px; height: 21px; }
.sound-toggle .icon-muted, #app.music-muted .sound-toggle .icon-sound { display: none; }
#app.music-muted .sound-toggle .icon-muted { display: block; }
.sound-toggle:focus-visible { outline: 2px solid #f3d9a6; outline-offset: 3px; }
