/*
 * Generated visual enhancements for the templates identified in
 * docs/TEMPLATE_IMAGE_VISUAL_AUDIT.md. Every rule is body-scoped so the shared
 * bundle can be loaded safely without changing any other invitation template.
 * Decorative layers never receive pointer events and intentionally sit below
 * invitation controls and customer-supplied photography.
 */

body.aile-invitation {
  --generated-surface: url("/templates/generated/aile/AIL-01-paper-texture.jpg");
  --generated-frame: url("/templates/generated/aile/AIL-02-botanical-corners.png");
  --generated-divider: url("/templates/generated/aile/AIL-03-story-divider.png");
}

body.alunan-invitation {
  --generated-surface: url("/templates/generated/alunan/ALU-01-tonal-background.jpg");
  --generated-frame: url("/templates/generated/alunan/ALU-02-floral-corners.png");
  --generated-divider: url("/templates/generated/alunan/ALU-03-arch-divider.png");
}

body.anabelle-invitation {
  --generated-hero: url("/templates/generated/anabelle/ANA-01-hero-frame.jpg");
  --generated-surface: url("/templates/generated/anabelle/ANA-02-paper-background.jpg");
  --generated-divider: url("/templates/generated/anabelle/ANA-03-wildflower-divider.png");
}

body.ashilla-invitation {
  --generated-surface: url("/templates/generated/ashilla/ASH-01-canvas-texture.jpg");
  --generated-frame: url("/templates/generated/ashilla/ASH-02-line-corners.png");
  --generated-divider: url("/templates/generated/ashilla/ASH-03-divider.png");
}

body.insan-invitation {
  --generated-surface: url("/templates/generated/insan/INS-01-handmade-paper.jpg");
  --generated-frame: url("/templates/generated/insan/INS-02-geometric-frame.png");
}

body.linda-invitation {
  --generated-surface: url("/templates/generated/linda/LIN-01-green-texture.jpg");
  --generated-frame: url("/templates/generated/linda/LIN-02-gold-corners.png");
  --generated-divider: url("/templates/generated/linda/LIN-03-gold-divider.png");
}

body.tia-invitation {
  --generated-surface: url("/templates/generated/tia/TIA-01-ivory-gold-paper.jpg");
  --generated-frame: url("/templates/generated/tia/TIA-02-blue-gold-corners.png");
  --generated-divider: url("/templates/generated/tia/TIA-03-fine-divider.png");
}

/* Round 2 review (T3): on the ivory paper the white gate text and the pale blue hairline script
 * (accent 3.9:1, accent-soft 2.2:1) were unreadable. Darker blues keep the palette and clear
 * 4.5:1; the gate, which the paper also covers, takes the ink colours. */
body.tia-invitation {
  --ti-accent: #3E5C69;
  --ti-accent-soft: #4F6E7B;
}

body.tia-invitation .ti-gate,
body.tia-invitation .ti-gate .ti-eyebrow {
  color: var(--ti-ink);
}

body.tia-invitation .ti-gate__names,
body.tia-invitation .ti-gate__guest-name {
  color: var(--ti-accent);
}

/* The shared gate rule below sets position: relative for its frame layer, which turned Tia's
 * full-screen fixed gate into a short block with the page showing under it; and the frame sat
 * above the opening text and button. Keep the gate fixed and its content over the frame. */
body.tia-invitation .ti-gate[data-ti-cover] {
  position: fixed;
}

body.tia-invitation .ti-gate__inner {
  position: relative;
  z-index: 3;
}

/* Round 2 (QA-NEW-007, CODEX-031): with long names and a long guest line the gate content is taller than
 * the phone. The gate centred it with overflow visible, so "Open Invitation" sat wholly below the
 * screen and swipes scrolled the page behind. Let the gate scroll on its own; top-align with auto
 * margins (still centred when it fits, reachable from the top when it does not); keep the frame
 * overlay pinned to the screen while the gate scrolls. */
body.tia-invitation .ti-gate[data-ti-cover] {
  align-items: flex-start;
  overflow-y: auto;
  overscroll-behavior: contain;
}

body.tia-invitation .ti-gate[data-ti-cover] > .ti-gate__inner {
  margin-block: auto;
}

body.tia-invitation .ti-gate[data-ti-cover]::after {
  position: fixed;
}

body.jeni-invitation {
  --generated-surface: url("/templates/generated/jeni/JEN-01-greige-paper.jpg");
  --generated-frame: url("/templates/generated/jeni/JEN-02-olive-corners.png");
}

body.juwita-invitation {
  --generated-surface: url("/templates/generated/juwita/JUW-01-navy-linen.jpg");
  --generated-frame: url("/templates/generated/juwita/JUW-02-copper-ornaments.png");
}

body.sekar-invitation {
  --generated-surface: url("/templates/generated/sekar/SEK-01-blush-wash.jpg");
  --generated-frame: url("/templates/generated/sekar/SEK-02-pressed-leaf-corners.png");
}

body.senandika-invitation {
  --generated-surface: url("/templates/generated/senandika/SEN-01-white-paper.jpg");
  --generated-frame: url("/templates/generated/senandika/SEN-02-terracotta-corners.png");
}

body.serlyn-invitation {
  --generated-surface: url("/templates/generated/serlyn/SER-01-navy-texture.jpg");
  --generated-frame: url("/templates/generated/serlyn/SER-02-gold-corner-linework.png");
}

/* Rasi-style long-form templates. */
body.aile-invitation .al-gate,
body.aile-invitation .al-section,
body.alunan-invitation .al-gate,
body.alunan-invitation .al-section,
body.ashilla-invitation .as-gate,
body.ashilla-invitation .as-section,
body.insan-invitation .in-gate,
body.insan-invitation .in-section,
body.linda-invitation .li-gate,
body.linda-invitation .li-section,
body.tia-invitation .ti-gate,
body.tia-invitation .ti-section,
body.jeni-invitation .jn-gate,
body.jeni-invitation .jn-section,
body.juwita-invitation .jw-gate,
body.juwita-invitation .jw-section,
body.sekar-invitation .sk-gate,
body.sekar-invitation .sk-section,
body.senandika-invitation .sn-gate,
body.senandika-invitation .sn-section,
body.serlyn-invitation .se-gate,
body.serlyn-invitation .se-section {
  background-image: var(--generated-surface);
  background-position: center;
  background-size: cover;
}

body.anabelle-invitation .an-section {
  background-image: var(--generated-surface);
  background-position: center;
  background-size: cover;
}

body.anabelle-invitation .an-gate {
  background-image: linear-gradient(rgba(255,255,255,.10), rgba(255,255,255,.10)), var(--generated-hero);
  background-position: center;
  background-size: cover;
}

/* Round 2 (3b-2): only the in-flow covers need position:relative for their frame ::after. The gates
 * are position:fixed full-screen overlays in each template's main.css; this rule used to list them
 * too and, being more specific, turned every gate into a ~300px block at the top of a page that
 * already scrolled. A fixed gate already contains its absolutely placed ::after. */
body.aile-invitation .al-gate,
body.alunan-invitation .al-gate,
body.ashilla-invitation .as-gate,
body.insan-invitation .in-gate,
body.linda-invitation .li-gate,
body.tia-invitation .ti-gate,
body.jeni-invitation .jn-gate,
body.juwita-invitation .jw-gate,
body.sekar-invitation .sk-gate,
body.senandika-invitation .sn-gate,
body.serlyn-invitation .se-gate {
  isolation: isolate;
}

body.alunan-invitation .al-cover,
body.ashilla-invitation .as-cover,
body.linda-invitation .li-cover,
body.sekar-invitation .sk-cover {
  isolation: isolate;
  position: relative;
}

body.aile-invitation .al-gate::after,
body.alunan-invitation .al-gate::after,
body.alunan-invitation .al-cover::after,
body.ashilla-invitation .as-gate::after,
body.ashilla-invitation .as-cover::after,
body.insan-invitation .in-gate::after,
body.linda-invitation .li-gate::after,
body.linda-invitation .li-cover::after,
body.tia-invitation .ti-gate::after,
body.jeni-invitation .jn-gate::after,
body.juwita-invitation .jw-gate::after,
body.sekar-invitation .sk-gate::after,
body.sekar-invitation .sk-cover::after,
body.senandika-invitation .sn-gate::after,
body.serlyn-invitation .se-gate::after {
  background: var(--generated-frame) center / 100% 100% no-repeat;
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

body.aile-invitation .al-gate::after,
body.insan-invitation .in-gate::after,
body.tia-invitation .ti-gate::after,
body.jeni-invitation .jn-gate::after,
body.senandika-invitation .sn-gate::after {
  opacity: .82;
}

body.alunan-invitation .al-gate::after,
body.alunan-invitation .al-cover::after,
body.ashilla-invitation .as-gate::after,
body.ashilla-invitation .as-cover::after,
body.linda-invitation .li-gate::after,
body.linda-invitation .li-cover::after,
body.juwita-invitation .jw-gate::after,
body.sekar-invitation .sk-gate::after,
body.sekar-invitation .sk-cover::after,
body.serlyn-invitation .se-gate::after {
  opacity: .72;
}

body.aile-invitation .al-section .al-heading::after,
body.alunan-invitation .al-section .al-heading::after,
body.anabelle-invitation .an-section .an-heading::after,
body.ashilla-invitation .as-section .as-heading::after,
body.linda-invitation .li-section .li-heading::after,
body.tia-invitation .ti-section .ti-heading::after {
  background: var(--generated-divider) center / contain no-repeat;
  content: "";
  display: block;
  height: 32px;
  margin: .45rem auto 0;
  width: min(170px, 58vw);
}

/* Round 2 (3b-2): two surfaces above were put behind text drawn for the opposite background.
 * Aile's gate and Thank-You blocks are maroon with white text; the pale paper replaced the maroon
 * (1.2:1). Keep the paper under a maroon wash. */
body.aile-invitation .al-gate,
body.aile-invitation .al-thanks {
  background-image: linear-gradient(rgba(149, 33, 45, .9), rgba(149, 33, 45, .9)), var(--generated-surface);
}

/* Linda's sections were cream with green text; the generated green texture (made for the gold
 * corner art) left that text at 1.1-1.3:1. Keep the green-and-gold look and set the text that sits
 * on it in cream and tan. White cards (gift, wishes, alert, form fields) keep their green text. */
body.linda-invitation .li-section,
body.linda-invitation .li-cover { color: var(--li-offwhite); }
body.linda-invitation .li-section h2,
body.linda-invitation .li-cover__names,
body.linda-invitation .li-person__name,
body.linda-invitation .li-story-item__title,
body.linda-invitation .li-video-item__title,
body.linda-invitation .li-agenda-item__title,
body.linda-invitation .li-venue__hall,
body.linda-invitation .li-quote { color: var(--li-offwhite); }
body.linda-invitation .li-eyebrow,
body.linda-invitation .li-cover__hashtag,
body.linda-invitation .li-countdown__value,
body.linda-invitation .li-rundown-item__time,
body.linda-invitation .li-person__link { color: var(--li-tan); }
body.linda-invitation .li-lead,
body.linda-invitation .li-person__parents,
body.linda-invitation .li-countdown__label,
body.linda-invitation .li-story-item__text,
body.linda-invitation .li-agenda-item__date,
body.linda-invitation .li-agenda-item__time,
body.linda-invitation .li-venue__address,
body.linda-invitation .li-rundown-item__text,
body.linda-invitation .li-field label,
body.linda-invitation .li-quote__attribution { color: rgba(249, 247, 237, .86); }
body.linda-invitation .li-btn--ghost { color: var(--li-offwhite); border-color: var(--li-tan); }
body.linda-invitation .li-divider { background: var(--li-tan); }
body.linda-invitation .li-gift-item,
body.linda-invitation .li-wish-item,
body.linda-invitation .li-alert { color: var(--li-green); }
body.linda-invitation .li-wish-item__time,
body.linda-invitation .li-gift-item__name { color: rgba(36, 60, 28, .78); }

/* Ragam-style full-screen slide templates. */
body.ragam-adatsumatera-invitation {
  --generated-surface: url("/templates/generated/adatsumatera/SUM-01-woven-paper.jpg");
  --generated-frame: url("/templates/generated/adatsumatera/SUM-02-corner-frame.webp");
  --generated-divider: url("/templates/generated/adatsumatera/SUM-03-songket-divider.webp");
}

body.ragam-coloredbeach-invitation {
  --generated-surface: url("/templates/generated/coloredbeach/CBE-01-beach-hero.jpg");
  --generated-frame: url("/templates/generated/coloredbeach/CBE-02-coastal-corners.png");
  --generated-divider: url("/templates/generated/coloredbeach/CBE-03-wave-divider.png");
}

body.ragam-creampurple-invitation {
  --generated-surface: url("/templates/generated/creampurple/CPU-01-lavender-wash.jpg");
  --generated-frame: url("/templates/generated/creampurple/CPU-02-floral-corners.webp");
  --generated-divider: url("/templates/generated/creampurple/CPU-03-floral-divider.webp");
}

body.ragam-angela-invitation {
  --generated-surface: url("/templates/generated/angela/ANG-01-botanical-wash.webp");
  --generated-frame: url("/templates/generated/angela/ANG-02-floral-corners.webp");
}

body.ragam-artichoke-invitation {
  --generated-surface: url("/templates/generated/artichoke/ART-01-sage-background.jpg");
  --generated-frame: url("/templates/generated/artichoke/ART-02-artichoke-line-art.webp");
}

body.ragam-adatsumatera-invitation .container-mobile,
body.ragam-coloredbeach-invitation .container-mobile,
body.ragam-creampurple-invitation .container-mobile,
body.ragam-angela-invitation .container-mobile,
body.ragam-artichoke-invitation .container-mobile {
  isolation: isolate;
  position: relative;
}

body.ragam-adatsumatera-invitation .container-mobile::before,
body.ragam-coloredbeach-invitation .container-mobile::before,
body.ragam-creampurple-invitation .container-mobile::before,
body.ragam-angela-invitation .container-mobile::before,
body.ragam-artichoke-invitation .container-mobile::before {
  background: var(--generated-surface) center / cover no-repeat;
  content: "";
  inset: 0;
  opacity: .22;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

body.ragam-coloredbeach-invitation .container-mobile::before { opacity: .16; }
body.ragam-creampurple-invitation .container-mobile::before { opacity: .28; }

body.ragam-adatsumatera-invitation .ragam_cover::after,
body.ragam-coloredbeach-invitation .ragam_cover::after,
body.ragam-creampurple-invitation .ragam_cover::after,
body.ragam-angela-invitation .ragam_cover::after,
body.ragam-artichoke-invitation .ragam_cover::after {
  background: var(--generated-frame) center / 100% 100% no-repeat;
  content: "";
  inset: 0;
  opacity: .78;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

/* Round 2 R2-1037/1043: the square artichoke art was stretched over the whole tall cover and
   stacked above the copy, hiding the names, recipient lines and most of the open button. On
   the cover it now keeps its proportions in the lower-right corner and sits under the text. */
body.ragam-artichoke-invitation .ragam_cover::after { content: none; }
body.ragam-artichoke-invitation .ragam_cover .container-mobile::after {
  aspect-ratio: 1 / 1;
  background: var(--generated-frame) center / 100% 100% no-repeat;
  bottom: -6px;
  content: "";
  /* The art's small top-left sprig would land on the recipient lines; a 45-degree cut keeps
     only the lower-right plant (sprig x+y <= .63, plant x+y >= .9 of the square). */
  -webkit-mask-image: linear-gradient(135deg, transparent 37%, #000 39%);
          mask-image: linear-gradient(135deg, transparent 37%, #000 39%);
  opacity: .78;
  pointer-events: none;
  position: absolute;
  right: -6px;
  width: 64%;
  z-index: 0;
}
body.ragam-artichoke-invitation .ragam_cover .container-mobile > .d-flex { position: relative; z-index: 1; }

/* Round 2 R2-1015: the same stretched overlay put Angela's roses over "Undangan Pernikahan",
   the ampersand and the hashtag. On the cover each bouquet of the square art (split where its
   alpha has a gap, x+y between .9 and 1.2) keeps its proportions in its own corner, drawn on the
   design's frame layer under the text. */
body.ragam-angela-invitation .ragam_cover::after { content: none; }
body.ragam-angela-invitation .ragam_cover .frame::before,
body.ragam-angela-invitation .ragam_cover .frame::after {
  aspect-ratio: 1 / 1;
  background: var(--generated-frame) center / 100% 100% no-repeat;
  content: "";
  opacity: .78;
  pointer-events: none;
  position: absolute;
  width: 64%;
}
body.ragam-angela-invitation .ragam_cover .frame::before {
  left: -8px;
  top: -8px;
  -webkit-mask-image: linear-gradient(135deg, #000 52%, transparent 53%);
          mask-image: linear-gradient(135deg, #000 52%, transparent 53%);
}
body.ragam-angela-invitation .ragam_cover .frame::after {
  bottom: -8px;
  right: -8px;
  -webkit-mask-image: linear-gradient(135deg, transparent 52%, #000 53%);
          mask-image: linear-gradient(135deg, transparent 52%, #000 53%);
}

/* Round 2 R2-1473: the same stretched overlay drew ColoredBeach's top-left shell sprig over
   "RAKA PRATAMA &" on the cover, above the text. Each sprig of the square art (split on the
   diagonal, where its alpha has a wide gap) keeps its proportions in its own corner, on the
   cover's workspace layer under the copy. */
body.ragam-coloredbeach-invitation .ragam_cover::after { content: none; }
/* Static on purpose: the corners below are positioned against the full cover, not this inset box. */
body.ragam-coloredbeach-invitation .ragam_cover > .workspace { position: static; }
body.ragam-coloredbeach-invitation .ragam_cover > .workspace > .content { position: relative; z-index: 1; }
body.ragam-coloredbeach-invitation .ragam_cover > .workspace::before,
body.ragam-coloredbeach-invitation .ragam_cover > .workspace::after {
  aspect-ratio: 1 / 1;
  background: var(--generated-frame) center / 100% 100% no-repeat;
  content: "";
  opacity: .78;
  pointer-events: none;
  position: absolute;
  width: 48%;
  z-index: 0;
}
body.ragam-coloredbeach-invitation .ragam_cover > .workspace::before {
  left: -8px;
  top: -8px;
  -webkit-mask-image: linear-gradient(135deg, #000 50%, transparent 51%);
          mask-image: linear-gradient(135deg, #000 50%, transparent 51%);
}
body.ragam-coloredbeach-invitation .ragam_cover > .workspace::after {
  bottom: -8px;
  right: -8px;
  -webkit-mask-image: linear-gradient(135deg, transparent 50%, #000 51%);
          mask-image: linear-gradient(135deg, transparent 50%, #000 51%);
}

/* Round 2 R2-1949: Senandika's terracotta corners were stretched over the whole opening gate and
   stacked above the copy, so at 360px the left sprig ran into the eyebrow, the names and the
   opening lines, and the right one into their ends. Each sprig of the square art (split on the
   diagonal, where its alpha has a wide gap) keeps its proportions in its own corner, under the
   copy. */
body.senandika-invitation .sn-gate::after,
body.senandika-invitation .sn-gate::before {
  aspect-ratio: 1 / 1;
  background: var(--generated-frame) center / 100% 100% no-repeat;
  content: "";
  inset: auto;
  opacity: .82;
  pointer-events: none;
  position: absolute;
  width: min(80%, 360px);
  z-index: 0;
}
body.senandika-invitation .sn-gate::after {
  left: 0;
  top: 0;
  -webkit-mask-image: linear-gradient(135deg, #000 50%, transparent 51%);
          mask-image: linear-gradient(135deg, #000 50%, transparent 51%);
}
body.senandika-invitation .sn-gate::before {
  bottom: 0;
  right: 0;
  -webkit-mask-image: linear-gradient(135deg, transparent 50%, #000 51%);
          mask-image: linear-gradient(135deg, transparent 50%, #000 51%);
}
body.senandika-invitation .sn-gate__inner { position: relative; z-index: 1; }
/* R2-1949: a long couple or guest line scrolls inside the gate instead of rising into the top sprig;
   the sprigs shrink and the copy starts below them. */
body.senandika-invitation .sn-gate--long { align-items: safe center; overflow-y: auto; }
body.senandika-invitation .sn-gate--long::after,
body.senandika-invitation .sn-gate--long::before { width: min(50%, 240px); }
body.senandika-invitation .sn-gate--long .sn-gate__inner { margin: auto; padding: 132px 24px 120px; }
body.senandika-invitation .sn-gate--long .sn-gate__names { font-size: clamp(1.7rem, 7.4vw, 2.3rem); line-height: 1.25; }
body.senandika-invitation .sn-gate--long .sn-gate__guest-name { font-size: clamp(1.25rem, 5.6vw, 1.7rem); }

body.ragam-adatsumatera-invitation .ragam_slide h2::after,
body.ragam-adatsumatera-invitation .ragam_slide h3::after,
body.ragam-coloredbeach-invitation .ragam_slide h2::after,
body.ragam-coloredbeach-invitation .ragam_slide h3::after,
body.ragam-creampurple-invitation .ragam_slide h2::after,
body.ragam-creampurple-invitation .ragam_slide h3::after {
  background: var(--generated-divider) center / contain no-repeat;
  content: "";
  display: block;
  height: 28px;
  margin: .35rem auto 0;
  width: min(160px, 54vw);
}

/* Pelita-style photographic templates. */
body.pelita-embroidery-invitation {
  --generated-surface: url("/templates/generated/embroidery/EMB-01-textile-background.jpg");
  --generated-frame: url("/templates/generated/embroidery/EMB-02-embroidered-frame.png");
  --generated-divider: url("/templates/generated/embroidery/EMB-03-stitch-divider.png");
}

body.pelita-floravera-invitation {
  --generated-surface: url("/templates/generated/floravera/FLV-01-botanical-background.jpg");
  --generated-frame: url("/templates/generated/floravera/FLV-02-floral-corners.webp");
  --generated-divider: url("/templates/generated/floravera/FLV-03-pressed-flower-divider.webp");
}

body.pelita-studio1-invitation {
  --generated-surface: url("/templates/generated/studio1/ST1-01-brown-texture.jpg");
  --generated-frame: url("/templates/generated/studio1/ST1-02-gold-geometry.png");
}

body.pelita-embroidery-invitation .pelita-section:not(.pelita-section--bg),
body.pelita-floravera-invitation .pelita-section:not(.pelita-section--bg),
body.pelita-studio1-invitation .pelita-section:not(.pelita-section--bg) {
  background-image: var(--generated-surface);
  background-position: center;
  background-size: cover;
}

/* Round 2 R2-1085: Embroidery's sections were inked in its dark --inv-base on this maroon textile.
   Light ink on the textile; panels and fields that paint their own light ground keep the dark ink. */
body.pelita-embroidery-invitation .pelita-section:not(.pelita-section--bg) {
  --inv-base: #f6e8d6;
  color: #f6e8d6;
}
body.pelita-embroidery-invitation .pelita-date-panel,
body.pelita-embroidery-invitation .pelita-section input,
body.pelita-embroidery-invitation .pelita-section textarea,
body.pelita-embroidery-invitation .pelita-section select {
  --inv-base: #4a1e1e;
}
body.pelita-embroidery-invitation .pelita-date-panel { color: #4a1e1e; }

body.pelita-embroidery-invitation .pelita-cover,
body.pelita-floravera-invitation .pelita-cover,
body.pelita-studio1-invitation .pelita-cover {
  isolation: isolate;
}

body.pelita-embroidery-invitation .pelita-cover::after,
body.pelita-floravera-invitation .pelita-cover::after,
body.pelita-studio1-invitation .pelita-cover::after {
  background: var(--generated-frame) center / 100% 100% no-repeat;
  content: "";
  inset: 0;
  opacity: .78;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

body.pelita-embroidery-invitation .pelita-section h2::after,
body.pelita-embroidery-invitation .pelita-section h3::after,
body.pelita-floravera-invitation .pelita-section h2::after,
body.pelita-floravera-invitation .pelita-section h3::after {
  background: var(--generated-divider) center / contain no-repeat;
  content: "";
  display: block;
  height: 30px;
  margin: .4rem auto 0;
  width: min(170px, 56vw);
}

/* Garden06. */
body.garden06-invitation {
  --generated-surface: url("/templates/generated/garden06/G06-01-garden-wash.jpg");
  --generated-divider: url("/templates/generated/garden06/G06-02-leaf-divider.png");
}

body.garden06-invitation .gd06-cover,
body.garden06-invitation .gd06-section {
  background-image: var(--generated-surface);
  background-position: center;
  background-size: cover;
}

body.garden06-invitation .gd06-section h2::after,
body.garden06-invitation .gd06-section h3::after,
body.garden06-invitation .gd06-couple-names::after {
  background: var(--generated-divider) center / contain no-repeat;
  content: "";
  display: block;
  height: 30px;
  margin: .4rem auto 0;
  width: min(170px, 56vw);
}

/* Sora uses the shared Lakon layout, hence its template-code body selector. */
body.lakon--sora {
  --generated-surface: url("/templates/generated/sora/SOR-01-sunlit-background.jpg");
  --generated-frame: url("/templates/generated/sora/SOR-02-leaf-shadow-overlay.png");
}

body.lakon--sora .cover,
body.lakon--sora main section:not(.hero) {
  background-image: var(--generated-surface);
  background-position: center;
  background-size: cover;
}

/* No `position` here: the cover is already position: fixed (sora/style.css), which anchors ::after.
   Setting relative turned the full-screen cover into a 424px strip with its date over the names. */
body.lakon--sora .cover {
  isolation: isolate;
}

body.lakon--sora .cover::after {
  background: var(--generated-frame) center / cover no-repeat;
  content: "";
  inset: 0;
  opacity: .68;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  body.aile-invitation *,
  body.alunan-invitation *,
  body.anabelle-invitation *,
  body.ashilla-invitation *,
  body.insan-invitation *,
  body.linda-invitation *,
  body.tia-invitation *,
  body.jeni-invitation *,
  body.juwita-invitation *,
  body.sekar-invitation *,
  body.senandika-invitation *,
  body.serlyn-invitation * {
    background-attachment: scroll !important;
  }
}

/* Review: ornament textures sit under a readable wash. */
body.pelita-floravera-invitation .pelita-section--cream:not(.pelita-section--bg){background-image:linear-gradient(#fdf6f4f2,#fdf6f4f2),var(--generated-surface)}
body.pelita-floravera-invitation .pelita-section--dark:not(.pelita-section--bg){background-image:linear-gradient(#34231be8,#34231be8),var(--generated-surface)}
/* Round 2 R2-S34: Studio1's opaque brown texture painted over its cream sections, leaving the dark ink at 1.05:1. The cream sections get the same readable wash Floravera has. */
body.pelita-studio1-invitation .pelita-section--cream:not(.pelita-section--bg){background-image:linear-gradient(#fdfdfdf2,#fdfdfdf2),var(--generated-surface)}

/* Round 2 R2-0319: RumahKaca's "Salin rekening" was a 17px underlined text button; it now matches the
   nusantara pill with a 40px tap target. */
body.rumah-kaca-theme .ac-copy { display: inline-flex; align-items: center; min-height: 40px; margin-top: 6px;
  padding: 8px 18px; border: 1px solid currentColor; border-radius: 999px; font-weight: 600; text-decoration: none; }
/* Round 2 R2-0349: the nusantara section headings bottomed out at 32px, so on a phone two-word titles
   wrapped into stacked fragments. */
@media (max-width: 480px) {
  body.rangkai-nusantara-theme .ac-heading { font-size: clamp(1.6rem, 7.2vw, 2rem); }
}

/* Round 2 (R2-1983 Alunan closing): the pale generated surface was painted over the footnote's own
   dark colour, so the cream couple names and date sat on light pink. On the coloured footnotes the
   texture is now multiplied into the section colour: the grain stays, the tone is the design's own. */
body.alunan-invitation .al-footnote,
body.ashilla-invitation .as-footnote,
body.linda-invitation .li-footnote,
body.sekar-invitation .sk-footnote,
body.senandika-invitation .sn-footnote {
  background-blend-mode: multiply;
}

/* Round 2 (R2-1939, CODEX-442): the generated corner frame is drawn on a layer above the cover (z-index 2),
   so when a two-line guest name pushed the cover text toward the corners, the label went under the olive
   branch and the branch crossed the button. The cover content now paints above the frame. */
body.aile-invitation .al-gate__inner, body.alunan-invitation .al-gate__inner, body.ashilla-invitation .as-gate__inner,
body.insan-invitation .in-gate__inner, body.linda-invitation .li-gate__inner, body.tia-invitation .ti-gate__inner,
body.jeni-invitation .jn-gate__inner, body.juwita-invitation .jw-gate__inner, body.sekar-invitation .sk-gate__inner,
body.senandika-invitation .sn-gate__inner, body.serlyn-invitation .se-gate__inner {
  position: relative;
  z-index: 3;
}
/* Round 2 (R2-1935): Insan's wheat sprigs sit on both side edges of the frame, about a fifth of the width in,
   so at phone width the names and welcome lines ran into them. The cover text keeps to the clear middle. */
body.insan-invitation .in-gate__inner { max-width: min(420px, 60vw); }
/* CODEX-476: in that narrower column a long couple name (e.g. "... Wijaya & Anindya Putri Kusumaningrum") ran past
   the sprig and the viewport. The names now size to the column and wrap inside long words, and a tall cover scrolls. */
body.insan-invitation .in-gate__names { font-size: clamp(1.6rem, 7vw, 3.2rem); overflow-wrap: anywhere; hyphens: auto; }
body.insan-invitation .in-gate { overflow-y: auto; align-items: safe center; }
/* Jeni's olive branches reach furthest in; its text gets a soft paper pool so it reads over the leaves. */
body.jeni-invitation .jn-gate__inner {
  padding: 18px 16px;
  border-radius: 24px;
  background: radial-gradient(closest-side, rgba(236, 229, 213, .94) 72%, rgba(236, 229, 213, 0));
}
