/* =====================================================================================================
   فرحتي — invitation page structure (shared by every theme and opening).
   Load order: /invite.css  →  /t/<theme>.css  →  /o/<opening>.css  →  /invite.js

   THEME CONTRACT — a theme is ONE file public/t/<id>.css (+ one entry in designs.json). It must not need any
   markup change. Scope every rule under html.t-<id> (the <html> element carries t-<id>, o-<opening>, occ-<type>).
   Fonts: @import Google Fonts at the very top of the theme file.

   1) Custom properties a theme may set (defaults below in :root):
      palette   --bg --paper --ink --muted --accent --accent-hi --accent-lo --on-accent --line --field --ok --no
      type      --display --body --ui --fs (body size, keep ≥17px) --body-w (body weight) --lh --names-fs --names-lh --names-w --h2-fs --h2-w
      shape     --radius --btn-radius --cover-radius (single length, or a full border-radius list — then ALSO set
                --cover-frame-radius, used by the frame + album tiles) --shadow --map-filter (filter on the map iframe)
      artwork   (SVG data-URIs used as CSS MASKS, painted in --accent — draw in any opaque colour, alpha = shape)
                --orn-hero   crown ornament above the names (.hero-orn), size --hero-orn-w / --hero-orn-h
                --orn-div    divider between sections (also the small rule on opening cards)
                --orn-corner top-left corner piece; mirrored automatically into 4 hero corners, size --corner-size
                --orn-bullet bullet of the notes list
                --texture    background-image layers for the page (<html>) and the opening overlay
                Defaults are an EMPTY svg (invisible). Never set an ornament to `none` — mask:none paints a solid box.
      openings  --op-bg (overlay background colour)
                envelope: --env --env-2 --env-edge --env-ink --seal --seal-hi --seal-lo --seal-ink
                doors:    --door-img  (9:16 photo of closed double doors, seam at the centre: /o/img/doors-ivory|walnut|emerald|navy|blush.jpg)
                scratch:  --foil-img  (foil texture: /o/img/foil-gold|rose|silver.jpg) --foil-1 --foil-2 --foil-3 (fallback gradient) --foil-ink

   2) Decorative hooks a theme may style (all exist on every page; free pseudo-elements are marked ✓):
      body::before ✓ body::after ✓         fixed full-viewport backdrop layers (stars, vignette…) — keep z-index:-1
      .sheet ::before ✓ ::after ✓          the content column — page frame (double lines, borders…)
      .hero ::before ✓ ::after ✓           hero backdrop (arch, halo, moon…)
      .hero-orn / .hero-orn.bottom          crown ornaments above and below the hero text
      .corner.c1 .c2 .c3 .c4                hero corner pieces (top-left, top-right, bottom-left, bottom-right)
      .sec + .sec::before                   section divider (already painted from --orn-div; restyle size/opacity)
      .sec h2 ::after ✓                     heading flourish
      .cover-frame ::before ✓ ::after ✓     frame around the cover photo
      .names .n / .amp / .line / .hosts / .hosts.sign / .hero-date .hd-day / .hd-side
      .cd-cell .wish .rsvp-state .choice span .map .shot .btn-solid .btn-line   surfaces
      .op-plaque .op-card .env-card ::before ✓ ::after ✓   opening cards
   ===================================================================================================== */
:root {
  --bg: #FBF6EC; --paper: #FFFDF7; --ink: #4A3A28; --muted: #8A7860; --accent: #B8893B; --accent-hi: #E2C27E; --accent-lo: #8C6524;
  --on-accent: #FFFBF2; --line: rgba(184, 137, 59, .32); --field: rgba(255, 255, 255, .7); --ok: #3E7B52; --no: #A24A3C;
  --display: "Aref Ruqaa", serif; --body: "Noto Naskh Arabic", serif; --ui: "Tajawal", system-ui, sans-serif;
  --fs: 18px; --lh: 1.95; --names-fs: clamp(44px, 13.5vw, 76px); --names-lh: 1.3; --names-w: 700; --h2-fs: clamp(28px, 8vw, 36px); --h2-w: 700;
  --radius: 14px; --btn-radius: 999px; --cover-radius: 6px;
  --texture: none; --orn-hero: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'/>"); --orn-div: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'/>"); --orn-corner: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'/>"); --orn-bullet: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'/>");
  --body-w: 400;
  --hero-orn-w: 200px; --hero-orn-h: 60px; --corner-size: 92px;
  --door-img: url("/o/img/doors-ivory.jpg"); --foil-img: url("/o/img/foil-gold.jpg");
  --bar-h: 0px; --shadow: 0 24px 50px -30px rgba(60, 40, 20, .45);
}
.has-bar { --bar-h: 42px; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background-color: var(--bg); background-image: var(--texture); background-attachment: fixed; }
html.is-locked, html.is-locked body { overflow: hidden; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: transparent; /* page colour lives on <html> so body::before/after backdrops (z-index:-1) stay visible */
  color: var(--ink); font-family: var(--body); font-weight: var(--body-w); font-size: var(--fs); line-height: var(--lh); -webkit-font-smoothing: antialiased;
  overflow-x: hidden; padding-top: var(--bar-h); padding-bottom: env(safe-area-inset-bottom);
}
img { max-width: 100%; display: block; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }

/* ---------- top bars, progress, watermark ---------- */
.bars { position: fixed; inset: 0 0 auto; z-index: 90; }
.bar {
  height: var(--bar-h); display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 12px;
  font: 500 14px/1.3 var(--ui); background: rgba(20, 16, 12, .88); color: #F6EEDF; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bar-tag { opacity: .75; }
.bar-btn { color: #1E160E; background: #E8C97E; border-radius: 999px; padding: 7px 14px; font-weight: 700; text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.bar-btn::before { content: ""; position: absolute; inset: 0; } /* whole bar is the tap target */
.bar-demo { position: relative; }
.bar-preview { background: rgba(122, 46, 58, .94); }
.progress { position: fixed; inset: var(--bar-h) 0 auto; height: 3px; z-index: 80; pointer-events: none; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-lo), var(--accent-hi), var(--accent-lo)); transform: scaleX(0); transform-origin: right; }
[dir="ltr"] .progress i { transform-origin: left; }
.watermark { position: fixed; inset: 0; z-index: 70; pointer-events: none; display: grid; place-items: center; overflow: hidden; }
.watermark span {
  transform: rotate(-28deg); font: 800 clamp(48px, 15vw, 120px)/1 var(--ui); color: var(--ink); opacity: .07;
  white-space: nowrap; border: .06em solid currentColor; padding: .1em .35em; border-radius: .2em;
}

/* ---------- sheet + sections ---------- */
.inv { padding: 10px 0 calc(90px + env(safe-area-inset-bottom)); overflow-x: hidden; overflow-x: clip; } /* ornaments may bleed; never the page */
.sheet { position: relative; width: min(620px, 100%); margin-inline: auto; padding: 0 clamp(14px, 4vw, 26px); isolation: isolate; }
.sec { position: relative; padding: 48px 8px; text-align: center; }
.sec + .sec::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 180px; height: 28px; transform: translate(-50%, -50%);
  background: var(--accent); -webkit-mask: var(--orn-div) center / contain no-repeat; mask: var(--orn-div) center / contain no-repeat; opacity: .85;
}
.sec h2 {
  font-family: var(--display); font-weight: var(--h2-w); font-size: var(--h2-fs); line-height: 1.35; color: var(--accent);
  margin: 0 0 22px; text-wrap: balance; overflow-wrap: anywhere;
}
.sub { color: var(--muted); margin: -12px 0 20px; }

/* reveal */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- hero ---------- */
.hero { padding: 64px 18px 56px; min-height: calc(100svh - var(--bar-h) - 20px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.hero > * { position: relative; z-index: 1; }
.hero-orn { width: var(--hero-orn-w); height: var(--hero-orn-h); background: var(--accent); -webkit-mask: var(--orn-hero) center / contain no-repeat; mask: var(--orn-hero) center / contain no-repeat; }
.corner { position: absolute !important; width: var(--corner-size); height: var(--corner-size); background: var(--accent); -webkit-mask: var(--orn-corner) center / contain no-repeat; mask: var(--orn-corner) center / contain no-repeat; pointer-events: none; z-index: 0 !important; }
.c1 { top: 8px; left: 8px; } .c2 { top: 8px; right: 8px; transform: scaleX(-1); }
.c3 { bottom: 8px; left: 8px; transform: scaleY(-1); } .c4 { bottom: 8px; right: 8px; transform: scale(-1); }
.hosts { max-width: 30ch; color: var(--muted); text-wrap: balance; overflow-wrap: anywhere; }
.hosts b { color: var(--ink); font-weight: 600; display: inline-block; max-width: 100%; }
.line { max-width: 28ch; color: var(--muted); text-wrap: balance; font-size: calc(var(--fs) + 1px); }
.hosts + .line { margin-top: -10px; }
.hosts.sign { margin-top: 4px; font-style: italic; }
.hero-orn.bottom { transform: scaleY(-1); opacity: .7; }
.names { margin: 6px 0; font-family: var(--display); font-weight: var(--names-w); font-size: var(--names-fs); line-height: var(--names-lh); color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: .08em; max-width: 100%; }
.names:focus { outline: none; }
.names .n { display: block; max-width: 100%; overflow-wrap: anywhere; text-wrap: balance; }
.amp { color: var(--accent); font-size: .55em; line-height: 1.2; }
.names .amp { display: block; }
.hero-date { display: flex; align-items: center; justify-content: center; gap: 14px; font-family: var(--ui); color: var(--ink); margin-top: 6px; max-width: 100%; }
.hd-side { flex: 1 1 0; min-width: 0; font-size: 17px; font-weight: 500; padding-block: 8px; border-block: 1px solid var(--line); white-space: normal; text-wrap: balance; }
.hd-day { font-family: var(--display); font-size: 54px; line-height: 1; color: var(--accent); min-width: 1.2em; }
.hero-time { font-family: var(--ui); color: var(--muted); font-size: 17px; }

/* ---------- cover ---------- */
.cover { padding-top: 36px; }
.cover-frame { position: relative; margin: 0 auto; max-width: 460px; padding: 10px; border: 1px solid var(--line); border-radius: var(--cover-frame-radius, calc(var(--cover-radius) + 10px)); background: var(--paper); box-shadow: var(--shadow); }
.cover-frame img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--cover-radius); }

/* ---------- message ---------- */
.msg { font-size: calc(var(--fs) + 2px); line-height: 2; max-width: 32ch; margin: 0 auto; text-wrap: pretty; overflow-wrap: anywhere; white-space: pre-line; }

/* ---------- buttons, forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 26px; max-width: 100%;
  border-radius: var(--btn-radius); border: 1.5px solid var(--accent); font: 700 17px/1.3 var(--ui); text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: transform .2s ease, background-color .25s ease, color .25s ease, box-shadow .25s ease; text-align: center;
}
.btn:active { transform: scale(.97); }
.btn-solid { background: linear-gradient(180deg, var(--accent-hi), var(--accent) 45%, var(--accent-lo)); color: var(--on-accent); border-color: var(--accent-lo); box-shadow: 0 10px 22px -12px var(--accent-lo), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn-line { background: transparent; color: var(--accent); }
.btn-line:hover { background: var(--accent); color: var(--on-accent); }
.btn-wide { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.form { display: flex; flex-direction: column; gap: 16px; text-align: start; max-width: 440px; margin: 0 auto; }
.field { display: flex; flex-direction: column; gap: 6px; }
.lbl { font: 500 15px/1.4 var(--ui); color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.counter { font-variant-numeric: tabular-nums; opacity: .8; }
.input {
  width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--field);
  color: var(--ink); font: 400 17px/1.6 var(--body); transition: border-color .2s, box-shadow .2s;
}
textarea.input { resize: vertical; min-height: 110px; }
.input::placeholder { color: var(--muted); opacity: .75; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.input[readonly] { background: transparent; border-style: dashed; color: var(--ink); font-weight: 600; }
.err { color: var(--no); font: 500 15px/1.5 var(--ui); min-height: 0; }
.err:empty, .ok:empty { display: none; }
.ok { color: var(--ok); font: 500 15px/1.5 var(--ui); }

/* RSVP */
.choices { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 92px; padding: 12px 8px;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--field); font: 700 17px/1.35 var(--ui); color: var(--ink);
  transition: all .25s ease; text-align: center;
}
.choice svg { width: 26px; height: 26px; color: var(--muted); transition: inherit; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--on-accent); box-shadow: 0 12px 24px -16px var(--accent-lo); }
.choice input:checked + span svg { color: var(--on-accent); transform: scale(1.12); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.party { display: flex; flex-direction: column; align-items: center; gap: 8px; animation: rise .35s ease; }
.stepper { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 4px; background: var(--field); }
.step { width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; color: var(--accent); font: 500 28px/1 var(--ui); cursor: pointer; }
.step:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.step:disabled { opacity: .3; cursor: default; }
#partyOut { min-width: 2.4em; text-align: center; font: 700 26px/1 var(--display); color: var(--ink); }
.hint { font: 400 15px/1.5 var(--ui); color: var(--muted); }
.rsvp-state { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 26px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--field); max-width: 440px; margin: 0 auto; }
.rsvp-state:focus { outline: none; }
.rs-label { font: 500 15px/1.4 var(--ui); color: var(--muted); }
.rs-value { display: flex; align-items: center; gap: 8px; font: 700 20px/1.5 var(--ui); }
.rs-value.yes svg { color: var(--ok); } .rs-value.no svg { color: var(--no); }
.done-mark { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); animation: pop .6s cubic-bezier(.3, 1.6, .5, 1); }
.done-mark svg { width: 34px; height: 34px; stroke-width: 2.2; }
.rs-thanks { font-size: calc(var(--fs) + 2px); max-width: 26ch; text-wrap: balance; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* countdown */
.cd { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 420px; margin: 0 auto 24px; direction: inherit; }
.cd-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 2px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--field); }
.cd-num { font: 700 clamp(28px, 9vw, 40px)/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.cd-lbl { font: 500 14px/1.3 var(--ui); color: var(--muted); }
.cd-done { font-size: calc(var(--fs) + 2px); max-width: 28ch; margin: 0 auto; text-wrap: balance; }

/* when & where */
.facts { list-style: none; margin: 0 auto 24px; padding: 0; display: flex; flex-direction: column; gap: 14px; max-width: 440px; text-align: start; }
.facts li { display: flex; align-items: flex-start; gap: 14px; }
.facts svg { color: var(--accent); margin-top: .35em; }
.facts li > span { display: flex; flex-direction: column; min-width: 0; overflow-wrap: anywhere; }
.venue { font-family: var(--display); font-weight: var(--h2-w); font-size: 22px; line-height: 1.5; }
.addr { color: var(--muted); }
.map { margin: 0 auto 20px; max-width: 460px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--field); aspect-ratio: 4 / 3; }
.map iframe { width: 100%; height: 100%; border: 0; display: block; filter: var(--map-filter, none); }

/* album */
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 12% 14px; margin-inline: calc(-1 * clamp(14px, 4vw, 26px) - 8px); scrollbar-width: none; overscroll-behavior-x: contain; }
.strip::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 76%; max-width: 360px; scroll-snap-align: center; padding: 6px; border: 1px solid var(--line); border-radius: var(--cover-frame-radius, calc(var(--cover-radius) + 6px)); background: var(--paper); cursor: zoom-in; box-shadow: var(--shadow); }
.shot img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--cover-radius); }
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; background: rgba(8, 6, 4, .94); color: #fff; }
.lightbox[open] { display: grid; place-items: center; animation: rise .3s ease; }
.lightbox::backdrop { background: rgba(0, 0, 0, .6); }
.lightbox img { max-width: 94vw; max-height: 82dvh; object-fit: contain; border-radius: 6px; }
.lb-btn { position: absolute; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .35); background: rgba(0, 0, 0, .35); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-close { top: calc(14px + env(safe-area-inset-top)); inset-inline-end: 14px; }
.lb-prev, .lb-next { bottom: calc(22px + env(safe-area-inset-bottom)); }
.lb-prev { inset-inline-start: calc(50% - 60px); } .lb-next { inset-inline-end: calc(50% - 60px); }

/* notes */
.note-list { list-style: none; padding: 0; margin: 0 auto; max-width: 440px; display: flex; flex-direction: column; gap: 14px; text-align: start; }
.note-list li { position: relative; padding-inline-start: 34px; overflow-wrap: anywhere; }
.note-list li::before { content: ""; position: absolute; inset-inline-start: 0; top: .55em; width: 18px; height: 18px; background: var(--accent); -webkit-mask: var(--orn-bullet) center / contain no-repeat; mask: var(--orn-bullet) center / contain no-repeat; }

/* wishes */
.count { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 700 16px/1 var(--ui); vertical-align: middle; margin-inline-start: 6px; }
.wish-list { list-style: none; padding: 0; margin: 30px auto 0; max-width: 460px; display: flex; flex-direction: column; gap: 12px; text-align: start; }
.wish { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--field); position: relative; }
.wish.new { animation: rise .5s ease; border-color: var(--accent); }
.wish-text { overflow-wrap: anywhere; white-space: pre-line; }
.wish-by { margin-top: 8px; font: 400 15px/1.5 var(--ui); color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.wish-by b { color: var(--accent); font-weight: 700; overflow-wrap: anywhere; }
.wish-empty { margin-top: 24px; color: var(--muted); }

/* outro */
.outro { padding-bottom: 30px; }
.outro-line { font-size: calc(var(--fs) + 2px); color: var(--muted); }
.outro-names { font-family: var(--display); font-weight: var(--names-w); font-size: clamp(30px, 9vw, 44px); line-height: 1.45; margin-top: 8px; overflow-wrap: anywhere; text-wrap: balance; }
.made { display: inline-flex; align-items: center; min-height: 44px; margin-top: 30px; font: 500 13px/1 var(--ui); color: var(--muted); opacity: .7; text-decoration: none; letter-spacing: 0; }
.made:hover { opacity: 1; color: var(--accent); }

/* music */
.music {
  position: fixed; z-index: 60; bottom: calc(18px + env(safe-area-inset-bottom)); inset-inline-start: 18px; width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid var(--accent); background: color-mix(in srgb, var(--paper) 88%, transparent); color: var(--accent); display: grid; place-items: center;
  box-shadow: var(--shadow); cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: rise .5s ease;
}
.music svg { grid-area: 1 / 1; transition: opacity .3s, transform .3s; }
.music .eq { grid-area: 1 / 1; display: flex; align-items: flex-end; gap: 3px; height: 18px; opacity: 0; transition: opacity .3s; }
.music .eq i { width: 3px; height: 100%; background: currentColor; border-radius: 2px; transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.music .eq i:nth-child(2) { animation-delay: -.4s; } .music .eq i:nth-child(3) { animation-delay: -.7s; }
.music[aria-pressed="true"] svg { opacity: 0; transform: scale(.6); }
.music[aria-pressed="true"] .eq { opacity: 1; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

/* ---------- shared opening shell (variants in /o/*.css) ---------- */
.op {
  position: fixed; inset: var(--bar-h) 0 0; z-index: 75; display: grid; place-items: center; overflow: hidden;
  background: var(--op-bg, var(--bg)); background-image: var(--texture); color: var(--ink); text-align: center;
  transition: opacity .9s ease, transform 1s cubic-bezier(.7, 0, .3, 1), visibility 0s 1s;
}
.op.is-gone { opacity: 0; visibility: hidden; pointer-events: none; }
/* frosted plaques laid over photographic openings (photo, doors) */
.op-pl { position: absolute; left: 50%; transform: translateX(-50%); width: min(86%, 430px); display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 20px; border-radius: 22px; background: color-mix(in srgb, var(--paper) 80%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px -18px rgba(40, 20, 10, .5); transition: opacity .45s ease, transform .6s ease; }
.op-pl.top { top: max(5%, 22px); } .op-pl.bottom { bottom: max(6%, 26px); }
.op-pl.top .op-guest { font-size: clamp(24px, 7vw, 32px); }
.is-opening .op-pl.top { opacity: 0; transform: translate(-50%, -16px); pointer-events: none; } .is-opening .op-pl.bottom { opacity: 0; transform: translate(-50%, 16px); pointer-events: none; }
.op-skip .op { display: none; }
.op-to { font: 500 15px/1.4 var(--ui); color: var(--muted); }
.op-guest { font-family: var(--display); font-weight: var(--h2-w); font-size: clamp(26px, 7.4vw, 36px); line-height: 1.4; color: var(--accent); overflow-wrap: anywhere; text-wrap: balance; }
.op-title { font: 500 14px/1.4 var(--ui); color: var(--accent); text-transform: uppercase; letter-spacing: .04em; }
:lang(ar) .op-title, [lang="ar"] .op-title { letter-spacing: 0; text-transform: none; }
.op-names { font-family: var(--display); font-weight: var(--names-w); font-size: clamp(22px, 6.4vw, 30px); line-height: 1.5; overflow-wrap: anywhere; text-wrap: balance; }
.op-names .amp { font-size: .8em; margin-inline: .15em; }
.op-date { font: 500 16px/1.5 var(--ui); color: var(--muted); }
.op-hint { font: 400 15px/1.5 var(--ui); color: var(--muted); animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .45; } }

@media (min-width: 700px) {
  .sheet { margin-block: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .js .rv { transform: none; transition: opacity .4s ease; }
  .op { transition: opacity .5s ease, visibility 0s .5s; }
}

/* =====================================================================================================
   PHOTOGRAPHIC THEMES (html.art) — designs.json entry has "art": true and artwork lives in public/a/<id>/:
     open.jpg  9:16 photo of a sealed envelope (opening screen, also the WhatsApp link preview image)
     hero.jpg  9:16 photo of a blank card/paper in the same material world (names are typeset on it live)
     thumb.jpg small preview for the galleries
   The theme file sets: --art-open, --art-hero (urls), --art-pad (padding that keeps the hero text inside the blank
   paper area of hero.jpg: top sides bottom — CSS padding % is relative to the hero WIDTH, so a vertical inset of N% of the image height is written as N×1.78%), --art-veil (wash over the blurred backdrop), palette + fonts.
   ===================================================================================================== */
html.art { --texture: none; --art-pad: 42.7% 18% 42.7%; --art-veil: rgba(255, 255, 255, .5); }
html.art body::before { content: ""; position: fixed; inset: -50px; z-index: -1; background: var(--art-hero) center / cover no-repeat; filter: blur(36px) saturate(1.05); }
html.art body::after { content: ""; position: fixed; inset: 0; z-index: -1; background: var(--art-veil); }
html.art .hero { container-type: inline-size; border-radius: 0; margin: 0 calc(-1 * clamp(14px, 4vw, 26px)); min-height: 0; aspect-ratio: 9 / 16; padding: var(--art-pad); gap: 2.2cqw;
  background: var(--art-hero) center / cover no-repeat; justify-content: center; box-shadow: 0 30px 60px -40px rgba(40, 20, 10, .55); }
html.art .hero .corner, html.art .hero .hero-orn { display: none; }
html.art .hero .names { font-size: clamp(28px, 18cqw, 72px); line-height: 1.12; margin: 1cqw 0; }
html.art .hero .hosts, html.art .hero .line { font-size: clamp(13px, 5.9cqw, 21px); line-height: 1.6; }
html.art .hero .hero-date { font-size: clamp(13px, 5.6cqw, 19px); gap: 4cqw; margin-top: 0; line-height: 1.5; }
html.art .hero .hero-time { font-size: clamp(13px, 5.6cqw, 18px); line-height: 1.4; }
html.art .sec:not(.hero) { background: color-mix(in srgb, var(--paper) 88%, transparent); border-radius: var(--radius); box-shadow: var(--shadow); }
html.art .hero .hd-day { font-size: clamp(30px, 14cqw, 54px); }
html.art .sec:not(.hero) { margin: 16px 0; padding: 40px 16px; }
html.art .sec + .sec::before { display: none; }
html.art .hero .hd-side { font-size: inherit; padding-block: 1.6cqw; }
