/* Shared base for the kit designs (generated from riviera.css by qa/samples/make-kit-css.cjs, then extended).
   A design sets the colour tokens below and styles its own cover, opening view and art in css/<design>.css. */
:root {
  --bg: #fbf8f2;
  --paper: #f6f1e8;
  --stone: #ece4d6;
  --accent: #a9c4dc;
  --accent-soft: #e2ecf5;
  --accent-deep: #5b7fa2;
  --ink: #2f4a66;
  --gold: #c7a35e;
  --gold-text: #8a6a2c;     /* gold for text, ≥ 4.5:1 on ivory */
  --text: #35404c;
  --text-soft: #56616d;
  --text-mute: #66707b;     /* ≥ 4.5:1 on ivory */
  --shade: 40, 58, 80;
  --line: #d9d2c4;
  --line-soft: #ece6da;
  --card: #ffffff;
  --card-ink: var(--text);
  --font-script: 'Pinyon Script', 'Amiri', cursive;
  --font-serif: 'Cormorant Garamond', 'Amiri', Georgia, serif;
  --font-ui: 'Jost', 'Readex Pro', system-ui, sans-serif;
  --caps: .22em;
  --col: 480px;
  --glide: cubic-bezier(.65, 0, .35, 1);
  --soft: cubic-bezier(.2, .7, .2, 1);
}
html[lang="ar"] {
  --font-script: 'Amiri', serif;
  --font-serif: 'Amiri', serif;
  --font-ui: 'Readex Pro', system-ui, sans-serif;
  --caps: 0;
}
html[lang="ar"][data-font-ar="ruqaa"] { --font-script: 'Aref Ruqaa', 'Amiri', serif; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #e6e2da; color: var(--text); font: 400 18px/1.65 var(--font-serif); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
body.is-sealed { overflow: hidden; }
img, svg { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.nowrap { white-space: nowrap; }
.noscript { max-width: 420px; margin: 40vh auto 0; padding: 0 20px; text-align: center; font-family: system-ui, sans-serif; }

.page { position: relative; max-width: var(--col); min-height: 100vh; margin: 0 auto; overflow: hidden; overflow: clip; background: var(--bg); box-shadow: 0 0 60px rgba(var(--shade), .12); outline: none; }

/* ---------- type ---------- */
.script { font-family: var(--font-script); font-weight: 400; line-height: 1.2; }
html[lang="ar"] .script { font-weight: 700; line-height: 1.55; }
.kicker { margin: 0 0 4px; font: 500 12px/1.5 var(--font-ui); letter-spacing: var(--caps); text-transform: uppercase; color: var(--gold-text); }
html[lang="ar"] .kicker { font-size: 15px; text-transform: none; }
.kicker--solo { margin-bottom: 26px; }
.title { margin: 0 0 22px; font-size: 54px; color: var(--ink); }
html[lang="ar"] .title { font-size: 40px; }
.amp { margin: 0 .12em; color: var(--gold); font-size: .8em; }
.flourish { width: min(170px, 60%); height: auto; margin: 22px auto; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 26px; border: 1.5px solid transparent; border-radius: 999px; font: 500 13px/1 var(--font-ui); letter-spacing: calc(var(--caps) * .6); text-transform: uppercase; text-decoration: none; transition: transform .2s, background-color .2s; }
html[lang="ar"] .pill { font-size: 16px; text-transform: none; }
.pill:active { transform: scale(.97); }
.pill--fill { background: var(--accent-deep); color: #fff; box-shadow: 0 12px 24px -12px rgba(var(--shade), .7); }
.pill--line { background: rgba(255, 255, 255, .6); border-color: var(--accent); color: var(--ink); }
.pill--wide { width: 100%; }
.pill[disabled] { opacity: .6; cursor: default; }
.icon { width: 20px; height: 20px; flex: none; }
.textlink { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border: 0; background: none; color: var(--accent-deep); font: 500 15px var(--font-ui); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- the sealed envelope (four paper flaps around a gold seal) ---------- */
.gate { position: fixed; inset: 0; z-index: 60; overflow: hidden; }
.env { position: absolute; inset: 0; cursor: pointer; }
.env__flap { position: absolute; inset: -2px; transition: transform 1.25s var(--glide); }
.env__flap i { position: absolute; inset: 0; background: var(--flap-bg, var(--paper)); }
.env__flap--l, .env__flap--r { z-index: 1; filter: drop-shadow(0 0 4px rgba(var(--shade), .07)); }
.env__flap--l i { clip-path: polygon(0 0, 53% 50%, 0 100%); background: var(--flap-bg, var(--paper)); }
.env__flap--r i { clip-path: polygon(100% 0, 47% 50%, 100% 100%); background: var(--flap-bg, var(--paper)); }
.env__flap--b { z-index: 2; filter: drop-shadow(0 -2px 4px rgba(var(--shade), .08)); }
.env__flap--b i { clip-path: polygon(0 100%, 50% 47%, 100% 100%); background: var(--flap-bg, var(--paper)); }
.env__flap--t { z-index: 3; filter: drop-shadow(0 3px 5px rgba(var(--shade), .1)); }
.env__flap--t i { clip-path: polygon(0 0, 100% 0, 50% 55%); background: var(--flap-bg, var(--paper)); }
.env__center { position: absolute; z-index: 5; top: 47%; left: 50%; display: flex; flex-direction: column; align-items: center; width: min(86vw, 360px); transform: translate(-50%, -50%); text-align: center; transition: opacity .5s ease, transform .6s var(--soft); }
.env__to { margin: 0 0 18px; font: 500 15px/1.5 var(--font-ui); letter-spacing: calc(var(--caps) * .5); color: var(--text-mute); }
.seal { position: relative; width: 118px; aspect-ratio: 1; padding: 0; border: 0; border-radius: 50%; background: none; filter: drop-shadow(0 10px 14px rgba(110, 80, 25, .35)); animation: sealBreath 3.2s ease-in-out infinite; }
.seal svg { width: 100%; height: 100%; }
.seal::after { content: ''; position: absolute; inset: 8%; border-radius: 50%; background: linear-gradient(115deg, transparent 35%, rgba(255, 250, 230, .75) 50%, transparent 65%); background-size: 250% 100%; animation: sheen 3.6s ease-in-out infinite; pointer-events: none; mix-blend-mode: soft-light; }
.seal-letter { font: 400 46px var(--font-script); }
html[lang="ar"] .seal-letter { font: 700 42px var(--font-script); }
.env__hint { margin: 16px 0 0; font: 500 13px var(--font-ui); letter-spacing: var(--caps); text-transform: uppercase; color: var(--accent-deep); animation: hintPulse 2.4s ease-in-out infinite; }
html[lang="ar"] .env__hint { font-size: 17px; text-transform: none; }
@keyframes sealBreath { 50% { transform: scale(1.04); } }
@keyframes sheen { 0%, 30% { background-position: 120% 0; } 70%, 100% { background-position: -120% 0; } }
@keyframes hintPulse { 50% { opacity: .55; } }

.gate.is-opening .seal { animation: none; transform: scale(1.18); opacity: 0; transition: transform .5s var(--soft), opacity .45s ease .1s; }
.gate.is-opening .env__hint, .gate.is-opening .env__to { opacity: 0; transition: opacity .3s; }
html:not([data-design="relief"]) .gate.is-opening .env__hint { animation: none; } /* its pulse brought the hint back over the opening page */
.gate.is-open .env__flap--t { transform: translateY(-62%) scaleY(.6); }
.gate.is-open .env__flap--b { transform: translateY(62%) scaleY(.6); transition-delay: .06s; }
.gate.is-open .env__flap--l { transform: translateX(-58%); transition-delay: .1s; }
.gate.is-open .env__flap--r { transform: translateX(58%); transition-delay: .1s; }
.gate.is-open .env__flap { opacity: 0; transition-property: transform, opacity; transition-duration: 1.25s, 1s; transition-timing-function: var(--glide), ease; }

/* ---------- hero: the view through the arch ---------- */
.hero { position: relative; height: 100vh; min-height: 560px; max-height: 920px; overflow: hidden; background: var(--bg); }
@supports (height: 100svh) { .hero { height: 100svh; } }

.hero__text { position: absolute; top: 19%; right: 14%; left: 14%; text-align: center; opacity: 0; transform: translateY(14px); transition: opacity 1.4s ease .9s, transform 1.6s var(--soft) .9s; }
.hero.is-in .hero__text { opacity: 1; transform: none; }
.hero__text { max-width: 100%; } /* never wider than the screen, so long names shrink to it (.fit) */
.hero__names { margin: 0; white-space: nowrap; font-size: clamp(38px, 12vw, 58px); color: var(--ink); text-shadow: 0 0 18px rgba(255, 255, 255, .9), 0 0 4px rgba(255, 255, 255, .8); }
/* Names that shrink to fit (class .fit, js/kit.js fitAll) never break inside a name («ماريا-جوزفين»). Where a box may
   take two lines (data-fit-wrap) and one line would get too small, the line breaks after the first name, so «و» / "&"
   starts the second line together with its name. */
.fit { max-width: 100%; } /* measured against its box, never wider than it */
.fit .nm { white-space: nowrap; }
.fit.is-wrapped > .nm:first-child::after { content: '\A'; white-space: pre; }
.fit.is-wrapped { text-wrap: balance; }
bdi.fit { white-space: nowrap; }
bdi.fit.is-wrapped { white-space: normal; }
.hero__tying { margin: 2px 0 0; font: italic 400 21px/1.4 var(--font-serif); color: var(--text-soft); text-shadow: 0 0 10px #fff; }
html[lang="ar"] .hero__tying { font-style: normal; font-size: 20px; }

/* ---------- date: three foil cards to scratch ---------- */
.date { padding: 54px 22px 64px; text-align: center; background: var(--bg); }
.date__hint { margin: -10px 0 22px; font: 500 13px var(--font-ui); letter-spacing: calc(var(--caps) * .6); color: var(--accent-deep); }
html[lang="ar"] .date__hint { font-size: 15px; }
.scratch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 360px; margin: 0 auto; }
.scratch__cell { display: grid; gap: 8px; }
.scratch__tile { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.12; overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 14px 26px -16px rgba(var(--shade), .55), inset 0 0 0 1px var(--line-soft); }
.scratch__value { padding: 0 4px; font: 500 44px/1 var(--font-serif); font-variant-numeric: lining-nums; color: var(--ink); }
.scratch__value--word { font-size: 23px; line-height: 1.2; }
html[lang="ar"] .scratch__value--word { font-size: 22px; }
.scratch__foil { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; touch-action: none; transition: opacity .7s ease; cursor: grab; }
.scratch__tile.is-revealed .scratch__foil { opacity: 0; pointer-events: none; }
.scratch__tile.is-revealed .scratch__value { animation: pop .6s var(--soft); }
.scratch__label { font: 500 11px var(--font-ui); letter-spacing: var(--caps); text-transform: uppercase; color: var(--text-mute); }
html[lang="ar"] .scratch__label { font-size: 14px; }
@keyframes pop { 40% { transform: scale(1.12); } }
.date__all { margin-top: 10px; font-size: 14px; }
.date__full { margin: 16px 0 0; font: 500 16px var(--font-ui); color: var(--text-soft); animation: pop .6s var(--soft); }
.date__hijri { display: block; margin: 6px 0 0; font: 500 13px/1.4 var(--font-ui); color: var(--text-mute); }
html[lang="ar"] .date__hijri { font-size: 14px; }

.timer { margin-top: 34px; }
.timer__cells { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; max-width: 380px; margin: 0 auto; }
.timer__cell { padding: 12px 2px 9px; border-radius: 14px; background: var(--accent-soft); }
.timer__num { display: block; font: 500 30px/1 var(--font-serif); font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.timer__unit { display: block; margin-top: 6px; font: 500 10.5px var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--text-mute); }
html[lang="ar"] .timer__unit { font-size: 13px; letter-spacing: 0; }
.timer__msg { margin: 0; font-size: 34px; color: var(--ink); }
.timer:not(.is-past) .timer__msg, .timer.is-past .timer__cells { display: none; }
.save-date { position: relative; display: inline-block; margin-top: 20px; }
.save-date__menu { position: absolute; z-index: 5; top: calc(100% + 10px); left: 50%; display: grid; min-width: 240px; padding: 6px; border-radius: 16px; background: #fff; transform: translateX(-50%); box-shadow: 0 18px 40px -12px rgba(var(--shade), .45); }
.save-date__menu a, .save-date__menu button { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 14px; border: 0; border-radius: 10px; background: none; text-decoration: none; font: 500 15px var(--font-ui); }
.save-date__menu a:hover, .save-date__menu button:hover { background: var(--accent-soft); }

/* ---------- the letter in a powder-blue envelope ---------- */
.letter__dear { margin: 0 0 12px; font-size: 29px; white-space: nowrap; color: var(--ink); }
html[lang="ar"] .letter__dear { font-size: 26px; }
.opening :lang(ar) { font-family: 'Amiri', serif; letter-spacing: 0; }
.opening__lead { margin: 0 0 8px; font-size: 20px; line-height: 1.8; color: var(--accent-deep); }
.opening__verse { margin: 0; font-size: 20px; line-height: 2.05; color: var(--text); text-wrap: balance; }
.opening__after { margin: 6px 0 0; font-size: 16px; color: var(--text-soft); }
.opening__ref { margin: 4px 0 0; font: 500 12px/1.6 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-text); }
.opening__ref:lang(ar) { font: 400 14px/1.7 'Amiri', serif; letter-spacing: 0; text-transform: none; }
.opening__meaning { margin: 12px auto 0; font: italic 400 17px/1.5 var(--font-serif); color: var(--text-soft); }
.letter__line { margin: 0 auto 6px; font-size: 19px; line-height: 1.8; color: var(--text-soft); text-wrap: balance; }
.letter__family { color: var(--ink); }
/* the couple on one line, «و» / "&" always between them: the font shrinks to fit narrow screens (class .fit) */
.letter__names { margin: 4px 0 10px; font-size: 48px; color: var(--ink); white-space: nowrap; }
html[lang="ar"] .letter__names { font-size: 40px; }
/* birthday: the age line under the name on the opening view and the link card, and the age ordinal in the letter */
.hero__bday { margin: 2px 0 6px; font: 600 15px/1.4 var(--font-ui); letter-spacing: var(--caps); text-transform: uppercase; color: var(--gold-text, var(--ink)); text-shadow: 0 0 10px rgba(255, 255, 255, .9); }
html[lang="ar"] .hero__bday { font-size: 19px; letter-spacing: 0; text-transform: none; }
.og__bday { position: relative; margin: 0 0 6px; font: 600 30px/1.3 var(--font-ui); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-text, var(--ink)); }
html[lang="ar"] .og__bday { font-size: 38px; letter-spacing: 0; text-transform: none; }
.letter__age { margin: -6px 0 10px; font: 700 24px/1.4 var(--font-script); color: inherit; opacity: .85; } /* the card's own text colour: dark or light cards alike */
.letter__when, .letter__where { margin: 0 auto; font-size: 19px; line-height: 1.8; color: var(--text); text-wrap: balance; }
.letter__close { margin: 0; font: italic 400 20px/1.6 var(--font-serif); color: var(--accent-deep); }
html[lang="ar"] .letter__close { font-style: normal; }

/* ---------- program over pastel clouds ---------- */
.line { position: relative; max-width: 360px; margin: 6px auto 0; padding: 0; list-style: none; }
.line::before { content: ''; position: absolute; top: 14px; bottom: 14px; left: 50%; width: 1.5px; background: var(--accent-deep); opacity: .55; }
.line__item { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr); align-items: center; gap: 12px; padding: 14px 0; }
.line__time { text-align: end; font: 500 26px/1.1 var(--font-serif); font-variant-numeric: lining-nums; color: var(--ink); white-space: nowrap; }
.line__dot { justify-self: center; width: 11px; height: 11px; background: var(--accent-deep); transform: rotate(45deg); box-shadow: 0 0 0 4px rgba(255, 255, 255, .85); }
.line__label { text-align: start; font: 500 14px/1.4 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--text-soft); overflow-wrap: break-word; }
html[lang="ar"] .line__label { font-size: 18px; letter-spacing: 0; }
.line__item:nth-child(even) .line__time { order: 3; text-align: start; }
.line__item:nth-child(even) .line__label { order: 1; text-align: end; }
.line__item:nth-child(even) .line__dot { order: 2; }

/* ---------- panels ---------- */
.panel { position: relative; padding: 66px 24px; text-align: center; }
.panel--tint { background: linear-gradient(180deg, #fbf1ec, var(--bg)); }
.place { position: relative; padding: 66px 0 0; text-align: center; background: var(--bg); }
.place__text { padding: 0 24px 26px; }
.place__map { display: inline-block; margin-top: 2px; font: 500 15px var(--font-ui); color: var(--ink); text-underline-offset: 5px; }
.place__photo { position: relative; aspect-ratio: 4 / 3.5; overflow: hidden; }

.place__photo img { width: 100%; height: 100%; object-fit: cover; }
.place__name { display: inline-flex; align-items: center; gap: 8px; margin: 0; font: 500 28px/1.3 var(--font-serif); color: var(--ink); }
.place__name .icon { color: var(--accent-deep); }
.place__area { margin: 2px 0 8px; font: 400 15px var(--font-ui); color: var(--text-mute); }
.attire { padding-bottom: 60px; }
.swipe { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 10px; font: italic 400 16px var(--font-serif); color: var(--text-mute); }
.swipe svg { width: 40px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linecap: round; }
html[dir="rtl"] .swipe svg { transform: scaleX(-1); }
.looks { display: flex; gap: 14px; margin: 0 -24px 30px; padding: 6px 24px 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 24px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.looks::-webkit-scrollbar { display: none; }
.looks__item { flex: 0 0 68%; margin: 0; aspect-ratio: 3 / 4.2; overflow: hidden; border-radius: 18px; background: var(--stone); box-shadow: 0 16px 28px -18px rgba(var(--shade), .6); scroll-snap-align: start; }
.looks__img { width: 100%; height: 100%; object-fit: cover; }
.attire__label { margin: 0 0 12px; font: 500 12px var(--font-ui); letter-spacing: var(--caps); text-transform: uppercase; color: var(--text-mute); }
html[lang="ar"] .attire__label { font-size: 15px; }
.swatches { display: flex; justify-content: center; margin: 4px 0 24px; padding-inline-start: 14px; }
.swatches span { width: 58px; height: 58px; margin-inline-start: -14px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px #fff, 0 10px 18px -10px rgba(var(--shade), .5); }
.attire__note { max-width: 330px; margin: 0 auto 18px; font: italic 400 20px/1.55 var(--font-serif); color: var(--text-soft); }
html[lang="ar"] .attire__note { font-style: normal; font-size: 19px; }

/* ---------- reply ---------- */
.reply { position: relative; padding: 66px 20px 76px; text-align: center; background: linear-gradient(180deg, var(--bg), var(--accent-soft)); }
/* after the party: a thank-you line in place of the form */
.reply__over { max-width: 340px; margin: 0 auto; font: 400 30px/1.45 var(--font-script); color: var(--ink); text-wrap: balance; }
.reply__lead { max-width: 330px; margin: -8px auto 22px; font-size: 18px; line-height: 1.6; color: var(--text-soft); text-wrap: balance; }
.pill--soft { min-width: 190px; background: var(--accent); color: #fff; box-shadow: 0 12px 24px -14px rgba(var(--shade), .6); }
html[lang="ar"] .pill--soft { font-size: 17px; }
.reply-card { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .7s var(--soft); }
.reply-card.is-open { opacity: 1; transform: none; }
.reply-card { max-width: 400px; margin: 0 auto; padding: 26px 24px 28px; border-radius: 26px; background: #fff; text-align: start; box-shadow: 0 24px 44px -26px rgba(var(--shade), .55), inset 0 0 0 1px var(--line-soft); }
.reply-card__due { margin: 0 0 20px; padding-bottom: 14px; border-bottom: 1px dashed var(--line); text-align: center; font: 500 12px/1.6 var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--text-mute); }
html[lang="ar"] .reply-card__due { font-size: 15px; letter-spacing: 0; }
.field { display: block; min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.field__label { display: block; margin-bottom: 6px; padding: 0; font: 500 12px var(--font-ui); letter-spacing: .14em; text-transform: uppercase; color: var(--text-soft); }
html[lang="ar"] .field__label { font-size: 15px; letter-spacing: 0; }
.field input, .field textarea { width: 100%; padding: 8px 2px; border: 0; border-bottom: 1.5px solid var(--line); border-radius: 0; background: transparent; font: 400 20px/1.4 var(--font-serif); resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent-deep); box-shadow: 0 1px 0 var(--accent-deep); }
html[dir="rtl"] .field :is(input, textarea):placeholder-shown { direction: rtl; }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice__opt { position: relative; }
.choice__opt input { position: absolute; opacity: 0; pointer-events: none; }
.choice__opt span { display: grid; place-items: center; min-height: 70px; padding: 10px; border: 1.5px solid var(--line); border-radius: 16px; text-align: center; font: 400 19px/1.25 var(--font-serif); cursor: pointer; transition: border-color .2s, background-color .2s; }
.choice__opt input:checked + span { border-color: var(--accent-deep); background: var(--accent-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent-deep); }
.choice__opt input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.counter { display: inline-flex; align-items: center; gap: 18px; }
.counter button { width: 44px; height: 44px; border: 1.5px solid var(--line); border-radius: 50%; background: none; font: 400 22px/1 var(--font-ui); }
.counter output { min-width: 28px; text-align: center; font: 500 26px var(--font-serif); font-variant-numeric: lining-nums; }
.reply-form__wa { display: flex; margin: 10px auto 0; font-size: 15px; }
.reply-card__error { min-height: 1.4em; margin: -6px 0 12px; text-align: center; font: 500 14px var(--font-ui); color: #9c3d32; }
.is-shaking { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.reply-card__thanks { display: grid; justify-items: center; padding: 6px 0; text-align: center; }
.reply-card__thanks .icon { width: 44px; height: 44px; color: var(--accent-deep); }
.reply-card__done { margin: 4px 0 0; font-size: 36px; color: var(--ink); }
.reply-card__msg { margin: 6px 0 10px; font: 400 19px/1.5 var(--font-serif); }

/* ---------- guestbook (voice note) ---------- */
.book-name { max-width: 400px; margin: 0 auto 20px; text-align: start; }
.tile { max-width: 400px; margin: 0 auto; padding: 22px 22px 24px; border-radius: 26px; background: #fff; text-align: center; box-shadow: 0 18px 40px -24px rgba(var(--shade), .5), inset 0 0 0 1px var(--line-soft); }
.tile__head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; text-align: start; }
.tile__icon { display: grid; flex: none; place-items: center; width: 50px; height: 50px; border-radius: 15px; background: var(--accent-soft); color: var(--accent-deep); }
.tile h3 { margin: 0; font: 500 22px/1.2 var(--font-serif); }
.tile__head p { margin: 2px 0 0; font: 400 14px/1.45 var(--font-ui); color: var(--text-mute); }
.mic { display: grid; place-items: center; width: 92px; height: 92px; margin: 4px auto 14px; border: 0; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--accent), var(--accent-deep)); color: #fff; box-shadow: 0 14px 28px -10px rgba(var(--shade), .6); }
.mic .icon { grid-area: 1 / 1; width: 34px; height: 34px; }
.mic .icon + .icon, .is-recording .mic .icon:first-child { display: none; }
.is-recording .mic .icon + .icon { display: block; }
.is-recording .mic { animation: micGlow 1.4s ease-in-out infinite; }
.mic.is-busy { opacity: .7; }
@keyframes micGlow { 50% { box-shadow: 0 0 0 14px rgba(var(--shade), .14), 0 14px 28px -10px rgba(var(--shade), .6); } }
.levels { display: flex; align-items: center; justify-content: center; gap: 4px; height: 28px; margin-bottom: 10px; }
.levels i { width: 4px; height: 100%; border-radius: 2px; background: var(--accent); transform: scaleY(var(--lvl, .15)); transition: transform .08s; }
.mic__status { margin: 0; font: 400 15px var(--font-ui); color: var(--text-soft); }
.mic__review audio { width: 100%; margin: 14px 0 12px; }
.mic__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mic__actions .pill { padding: 0 12px; }

/* ---------- guests' photos ---------- */
.photos__lead { max-width: 330px; margin: -8px auto 22px; font-size: 18px; line-height: 1.6; color: var(--text-soft); text-wrap: balance; }
.shots__add { position: relative; min-height: 56px; cursor: pointer; }
.shots__add .icon { width: 22px; height: 22px; }
.shots__add:focus-within { outline: 2px solid var(--ink); outline-offset: 3px; }
.shots__add--gallery { margin-top: 10px; min-height: 46px; }
.shots__hint { margin: 10px 0 0; font: 400 14px/1.45 var(--font-ui); color: var(--text-mute); }
.shots__note { margin: 4px 0 0; font: 500 13px/1.45 var(--font-ui); color: var(--text-soft); }
.shots__status { margin: 12px 0 0; font: 500 15px/1.5 var(--font-ui); color: var(--accent-deep); }
.shots__status:empty, .shots__grid:empty { display: none; }
.shots__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.shot { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--line-soft); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: opacity .4s, filter .4s; }
.shot img:not([src]) { visibility: hidden; }
.shot.is-new { background: linear-gradient(100deg, var(--accent-soft) 30%, rgba(255, 255, 255, .7) 50%, var(--accent-soft) 70%) 0 0 / 300% 100%; animation: shotShimmer 1.4s linear infinite; }
.shot.is-ready img { opacity: .55; filter: saturate(.6); }
.shot.is-sending img { opacity: .8; }
.shot.is-failed img { filter: grayscale(.6) brightness(.8); }
@keyframes shotShimmer { to { background-position: -150% 0; } }
.shot__bar { position: absolute; right: 8px; bottom: 8px; left: 8px; height: 4px; overflow: hidden; border-radius: 2px; background: rgba(255, 255, 255, .6); opacity: 0; transition: opacity .3s; }
.shot__bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent-deep); }
html[dir="rtl"] .shot__bar i { margin-inline-start: auto; }
.shot.is-sending .shot__bar { opacity: 1; }
.shot.is-sending .shot__bar i { width: 92%; transition: width var(--t, 6s) cubic-bezier(.15, .6, .3, 1); }
.shot.is-sent .shot__bar { opacity: 0; transition-delay: .35s; }
.shot.is-sent .shot__bar i { width: 100%; transition: width .3s ease; }
.shot__ok { position: absolute; top: 6px; inset-inline-end: 6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-deep); color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 4px 10px -3px rgba(var(--shade), .6); transform: scale(0); transition: transform .35s var(--soft); }
.shot__ok .icon { width: 16px; height: 16px; stroke-width: 2.6; }
.shot.is-sent .shot__ok { transform: scale(1); }
.shot__retry { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; border: 0; background: rgba(var(--shade), .55); color: #fff; font: 500 12.5px/1.3 var(--font-ui); text-align: center; }
html[lang="ar"] .shot__retry { font-size: 13.5px; }
.shot__retry .icon { width: 24px; height: 24px; }
@media (prefers-reduced-motion: reduce) { .shot.is-new { animation: none; } }
/* opened from the table card's QR code (#photos, js/kit.js): a soft ring spreads from the camera button, twice */
.photos-sec.is-arrived .shots__add:first-child::after { content: ''; position: absolute; inset: -5px; border: 2px solid var(--accent-deep); border-radius: inherit; opacity: 0; pointer-events: none; animation: arrived 1.7s ease-out .6s 2; }
@keyframes arrived { 0% { opacity: .75; transform: scale(.97); } 100% { opacity: 0; transform: scale(1.07, 1.3); } }
@media (prefers-reduced-motion: reduce) { .photos-sec.is-arrived .shots__add:first-child::after { animation: none; } }

/* ---------- farewell ---------- */
.farewell--photo { padding-bottom: 0 !important; }
.farewell__photo { position: relative; aspect-ratio: 4 / 5; margin: 30px -24px 0; overflow: hidden; }

.farewell__img { width: 100%; height: 100%; object-fit: cover; }
.farewell { padding: 60px 24px 120px; text-align: center; background: linear-gradient(180deg, var(--bg), #f1ece3); }
.farewell__line { max-width: 360px; margin: 0 auto 10px; font-size: 40px; color: var(--ink); }
html[lang="ar"] .farewell__line { font-size: 30px; }
.farewell__names { margin: 0; font-size: 46px; color: var(--ink); }
html[lang="ar"] .farewell__names { font-size: 38px; }
.farewell__heart { width: 30px; margin: 10px auto 14px; fill: none; stroke: var(--gold); stroke-width: 1.6; }

/* ---------- sound, language, notice, scroll hint, falling blossoms ---------- */
.sound { position: fixed; z-index: 40; bottom: calc(18px + env(safe-area-inset-bottom)); inset-inline-end: max(14px, calc((100vw - var(--col)) / 2 + 14px)); display: grid; place-items: center; width: 50px; height: 50px; border: 0; border-radius: 50%; background: var(--accent-deep); color: #fff; box-shadow: 0 10px 22px -8px rgba(var(--shade), .6); }
.sound__bars { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
.sound__bars i { width: 3.5px; height: 100%; border-radius: 2px; background: currentColor; transform: scaleY(.3); transform-origin: 50% 100%; }
.sound__bars i:nth-child(2) { transform: scaleY(.6); }
.sound:not(.is-on) .sound__bars { opacity: .6; }
.sound.is-on .sound__bars i { animation: level .85s ease-in-out infinite alternate; }
.sound.is-on .sound__bars i:nth-child(2) { animation-delay: -.28s; }
.sound.is-on .sound__bars i:nth-child(3) { animation-delay: -.56s; }
@keyframes level { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.lang-switch { position: fixed; z-index: 65; top: calc(14px + env(safe-area-inset-top)); inset-inline-start: max(12px, calc((100vw - var(--col)) / 2 + 12px)); display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border: 1px solid rgba(var(--shade), .2); border-radius: 999px; background: rgba(255, 255, 255, .88); color: var(--ink); font: 500 14px/1 'Jost', system-ui, sans-serif; letter-spacing: .06em; box-shadow: 0 8px 18px -10px rgba(var(--shade), .5); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lang-switch:lang(ar) { font: 500 15px/1 'Readex Pro', system-ui, sans-serif; letter-spacing: 0; }
.notice { position: fixed; z-index: 70; bottom: calc(84px + env(safe-area-inset-bottom)); left: 50%; max-width: min(90vw, 400px); padding: 12px 18px; border-radius: 14px; background: rgba(var(--shade), .95); color: #fff; font: 400 14px/1.5 var(--font-ui); text-align: center; opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .3s, transform .3s; }
.notice.is-on { opacity: 1; transform: translate(-50%, 0); }
.scroll-hint { position: absolute; z-index: 5; bottom: 22px; left: 50%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 18px 6px; border: 1px solid rgba(var(--shade), .18); border-radius: 999px; background: rgba(255, 255, 255, .88); color: var(--ink); font: 500 12px/1.3 var(--font-ui); letter-spacing: calc(var(--caps) * .6); text-transform: uppercase; box-shadow: 0 10px 22px -12px rgba(var(--shade), .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .6s ease, transform .6s ease; }
html[lang="ar"] .scroll-hint { font-size: 14px; text-transform: none; }
.scroll-hint.is-on { opacity: 1; pointer-events: auto; }
.scroll-hint.is-off { opacity: 0; transform: translate(-50%, 12px); pointer-events: none; }
.scroll-hint svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1.6s ease-in-out infinite; }
/* bolder: a solid pill with two arrows that run down one after the other */
#main .hero .scroll-hint { padding: 10px 24px 7px; border: 0; background: var(--hint-bg, var(--accent-deep)); color: #fff; font-size: 13px; box-shadow: 0 10px 24px -8px rgba(var(--shade), .6); } /* wins over each design's own hint colours */
html[lang="ar"] #main .hero .scroll-hint { font-size: 16px; }
.scroll-hint svg { width: 22px; height: 22px; stroke-width: 2; animation: none; }
.scroll-hint svg path { animation: hintArrow 1.4s ease-in-out infinite; }
.scroll-hint svg path + path { animation-delay: .2s; }
@keyframes hintArrow { 0%, 100% { opacity: .35; transform: translateY(-2px); } 50% { opacity: 1; transform: translateY(2px); } }
@keyframes nudge { 0%, 100% { transform: translateY(-2px); opacity: .55; } 50% { transform: translateY(3px); opacity: 1; } }
.petals { position: fixed; z-index: 30; top: 0; bottom: 0; left: 50%; width: min(100%, var(--col)); overflow: hidden; transform: translateX(-50%); pointer-events: none; }
.petal { position: absolute; top: -24px; left: var(--px); width: var(--ps); height: var(--ps); animation: drift var(--pt) linear forwards; filter: drop-shadow(0 1px 1.5px rgba(var(--shade), .25)); }
.petal svg { width: 100%; height: 100%; animation: flutter 3.2s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate(var(--pd), calc(100vh + 40px)) rotate(var(--pr)); } }
@keyframes flutter { from { transform: translateX(-6px) rotate(-28deg) scale(.86); } to { transform: translateX(6px) rotate(28deg) scale(1); } }

/* ---------- scroll entrance ---------- */
.rise { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform 1s var(--soft); }
.rise.is-shown { opacity: 1; transform: none; }

/* ---------- link-preview card (?og=1): exactly 1200x630 ---------- */
.og-mode { overflow: hidden; background: #dfe9f0; }
.og-mode .page { width: 1200px; max-width: none; height: 630px; min-height: 0; margin: 0; overflow: hidden; background: none; box-shadow: none; }
.og { position: relative; width: 1200px; height: 630px; overflow: hidden; }
.og__seal { position: absolute; top: 40px; left: 50%; width: 120px; transform: translateX(-50%); filter: drop-shadow(0 10px 14px rgba(110, 80, 25, .35)); }
.og__text { position: absolute; top: 160px; right: 120px; left: 120px; text-align: center; }
.og__kicker { margin: 0; font: 500 26px var(--font-ui); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-text); }
html[lang="ar"] .og__kicker { font-size: 32px; letter-spacing: 0; }
.og__names { margin: 0; white-space: nowrap; font-size: 120px; color: var(--ink); text-shadow: 0 0 24px #fff, 0 0 6px #fff; }
html[lang="ar"] .og__names { font-size: 104px; }
.og__line { position: absolute; bottom: 30px; left: 50%; display: flex; align-items: center; gap: 14px; margin: 0; padding: 10px 28px; border-radius: 999px; background: rgba(255, 255, 255, .92); white-space: nowrap; font: 500 22px/1.4 var(--font-ui); color: var(--ink); transform: translateX(-50%); }
.og__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .rise { opacity: 1; transform: none; transition: none; }
  .seal, .seal::after, .env__hint, .scroll-hint svg, .scroll-hint svg path, .sound.is-on .sound__bars i { animation: none; }
  .hero__text, .env__flap, .reply-card { transition: none; }
}

/* ---------- kit pieces ---------- */
.ornament { display: block; width: min(150px, 50%); height: auto; margin: 2px auto 22px; }
.card { max-width: 400px; margin: 0 auto; padding: 28px 22px; border-radius: 26px; background: var(--card); color: var(--card-ink); box-shadow: 0 24px 44px -26px rgba(var(--shade), .55); }
.letter-sec { padding: 56px 18px; text-align: center; }
.letter { max-width: 420px; margin: 0 auto; padding: 36px 22px; text-align: center; }
.families { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 14px; margin: 0 0 22px; padding-bottom: 18px; border-bottom: 1px solid currentColor; border-bottom-color: rgba(var(--shade), .2); }
.families__col { display: grid; gap: 4px; align-content: start; }
.families__label { font: 500 12px var(--font-ui); letter-spacing: .12em; text-transform: uppercase; opacity: .75; }
html[lang="ar"] .families__label { font-size: 14px; letter-spacing: 0; }
.families__name { font: 500 17px/1.5 var(--font-serif); }
.when-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; margin: 0 auto; }
.when-row span { font: 500 15px/1.4 var(--font-ui); }
.when-row span:first-child { text-align: end; }
.when-row span:last-child { text-align: start; }
.when-row b { padding: 0 16px; border-inline: 1px solid currentColor; font: 500 48px/1 var(--font-serif); font-variant-numeric: lining-nums; }
.when-time { margin: 10px 0 0; font: 500 15px var(--font-ui); opacity: .85; }
.date-sec .timer { margin-top: 24px; }
.cal { margin-top: 26px; padding: 18px 14px 14px; border-radius: 18px; background: var(--cal-bg, #fffaf4); color: var(--cal-ink, var(--text)); }
.cal__month { margin: 0 0 10px; font-size: 26px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px 2px; font: 500 14px/2 var(--font-ui); font-variant-numeric: lining-nums; }
.cal__head { font-size: 13px; opacity: .6; }
.cal__day.is-day b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-deep); color: #fff; line-height: 1; }
.count-sec .timer { margin-top: 6px; }
.count__date { margin: 18px 0 0; font: 500 15px var(--font-ui); color: var(--text-soft); }
.album-sec { padding-inline: 0 !important; }
.album { display: flex; gap: 14px; margin-bottom: -22px; padding: 6px 15% 40px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.album::-webkit-scrollbar { display: none; }
.album__item { flex: 0 0 70%; margin: 0; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 14px; scroll-snap-align: center; box-shadow: 0 18px 30px -18px rgba(var(--shade), .6); }
.album__img { width: 100%; height: 100%; object-fit: cover; }
.album__dots { display: flex; justify-content: center; gap: 6px; }
.album__dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--accent); opacity: .35; transition: width .3s, opacity .3s; }
.album__dots i.is-on { width: 20px; opacity: 1; }
.place__map { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; margin: 18px 0 0; padding: 0 12px; text-decoration: underline; } /* a thumb-sized tap target */
.verse-sec { padding: 40px 18px; }
.verse { max-width: 420px; margin: 0 auto; text-align: center; }

/* The guest's own name is the point of a personal link: it gets its own, larger line under "a special invitation for". */
.env__to bdi { display: block; margin-top: 4px; font: 400 28px/1.3 var(--font-script); letter-spacing: 0; text-transform: none; }
html[lang="ar"] .env__to bdi { font-size: 31px; }
