/* การ์ด e-card · ทุกขนาดใช้หน่วย cqw เพื่อให้ภาพย่อและการ์ดเต็มใช้โค้ดเดียวกัน
   ลวดลายทุกชิ้นอ้างจาก /art/*.svg · ใช้ CSS mask แทน clip-path เพื่อขอบโค้งและขอบกระดาษฉีกที่เรียบเนียน */

/* ฟอนต์ลายมือของชื่อบ่าวสาว · ไฟล์และสัญญาอนุญาต (SIL OFL 1.1) อยู่ใน /hand/ · ดู hand/SOURCES.md */
@font-face { font-family: 'Charm'; font-style: normal; font-weight: 400; font-display: swap; src: url('/hand/charm-thai-400-normal.woff2') format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'Charm'; font-style: normal; font-weight: 400; font-display: swap; src: url('/hand/charm-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Srisakdi'; font-style: normal; font-weight: 400; font-display: swap; src: url('/hand/srisakdi-thai-400-normal.woff2') format('woff2'); unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: 'Srisakdi'; font-style: normal; font-weight: 400; font-display: swap; src: url('/hand/srisakdi-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

.ec {
  container-type: inline-size;
  overflow: hidden;
  position: relative;
  background: var(--ec-bg);
  color: var(--ec-ink);
  text-align: center;
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-weight: 300;
  --ec-serif: 'Cormorant Garamond', 'Trirong', serif;
  --ec-display: 'Bodoni Moda', 'Trirong', serif;
  --ec-orn-color: var(--ec-accent);
  --ec-hairline: color-mix(in srgb, var(--ec-ink) 18%, transparent);
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}
.ec *, .ec *::before, .ec *::after { box-sizing: border-box; margin: 0; padding: 0; }
.ec img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }

/* ตัวช่วยลวดลาย (ปกติซ่อน เปิดเฉพาะ template ที่ใช้) */
.ec-orn { display: none; pointer-events: none; flex: none; }

/* โครงพื้นฐานทุกแบบ */
.ec-cover { position: relative; }
.ec-names {
  font-family: var(--ec-serif);
  font-weight: 400;
  font-size: 10.6cqw;
  line-height: 1.38;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.ec-names-empty { min-height: 8cqw; }
.ec-names span, .ec-names i { display: block; }
.ec-names .ec-w, .ec-sign .ec-w { display: inline-block; max-width: 100%; font-weight: inherit; }
.ec-names i {
  font-style: normal;
  font-family: 'Trirong', serif;
  font-size: 4.1cqw;
  line-height: 2.1;
  opacity: .76;
}
.ec-date {
  font-family: 'Trirong', serif;
  font-weight: 400;
  font-size: 4.4cqw;
  letter-spacing: 0;
  line-height: 1.85;
  text-wrap: balance;
  margin-top: 2cqw;
}
.ec-date-dots {
  font-family: var(--ec-serif);
  font-size: 4.8cqw;
  letter-spacing: .12em;
  font-variant-numeric: lining-nums tabular-nums;
}
.ec-kicker {
  font-family: 'IBM Plex Sans Thai', sans-serif;
  font-weight: 400;
  font-size: 3.3cqw;
  letter-spacing: 0;
  line-height: 1.9;
  opacity: .8;
}

.ec-sec { padding: 13cqw 8.5cqw; position: relative; }
.ec-alt {
  background: var(--ec-alt);
  color: var(--ec-altInk);
  --ec-orn-color: var(--ec-altInk);
  --ec-hairline: color-mix(in srgb, var(--ec-altInk) 22%, transparent);
}

.ec-ev-no {
  font-family: var(--ec-serif);
  font-weight: 400;
  font-size: 4.2cqw;
  letter-spacing: .18em;
  line-height: 1.4;
  color: var(--ec-orn-color);
  margin-bottom: 1.4cqw;
  font-variant-numeric: lining-nums tabular-nums;
}
.ec-ev-tag {
  display: inline-block;
  font-size: 3.3cqw;
  font-weight: 400;
  line-height: 1.7;
  padding: .8cqw 3.8cqw;
  margin: -2.2cqw 0 3.6cqw;
  border: 1px solid var(--ec-hairline);
  opacity: .88;
}
.ec-h {
  font-family: 'Trirong', serif;
  font-weight: 400;
  font-size: 7cqw;
  line-height: 1.55;
  letter-spacing: 0;
  margin-bottom: 5cqw;
}
.ec-when {
  font-family: 'Trirong', serif;
  font-weight: 400;
  font-size: 4.3cqw;
  line-height: 1.85;
  margin: -3cqw 0 5.5cqw;
  opacity: .86;
}
.ec-body {
  font-size: 3.85cqw;
  line-height: 1.95;
  letter-spacing: 0;
  max-width: 78cqw;
  margin-inline: auto;
  text-wrap: pretty;
}
.ec-parents {
  font-size: 3.45cqw;
  line-height: 2.05;
  letter-spacing: 0;
  margin-bottom: 5.5cqw;
  opacity: .84;
}

/* ปุ่มในส่วนสถานที่ */
.ec-acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.8cqw 3.2cqw;
  margin-top: 6.5cqw;
}
.ec-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 10.6cqw;
  padding: 2.2cqw 6.8cqw;
  border: 1px solid currentColor;
  border-radius: 99px;
  font-size: 3.6cqw;
  font-weight: 400;
  line-height: 1.6;
  transition: opacity 180ms ease, transform 180ms ease;
}
.ec a.ec-btn { color: inherit; text-decoration: none; cursor: pointer; min-height: max(44px, 10.6cqw); }
.ec a.ec-btn:hover { opacity: .82; }
.ec a.ec-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* ปฏิทิน (รองรับ 1 ถึงหลายเดือน) */
.ec-cal { max-width: 76cqw; margin: 0 auto; }
.ec-cal + .ec-cal {
  margin-top: 9cqw;
  padding-top: 8cqw;
  border-top: 1px solid var(--ec-hairline);
}
.ec-cal-m {
  font-family: 'Trirong', serif;
  font-weight: 400;
  font-size: 4.7cqw;
  line-height: 1.9;
  margin-bottom: 3.4cqw;
}
.ec-cal-g {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  row-gap: 1.4cqw;
  font-size: 3.45cqw;
  font-variant-numeric: lining-nums tabular-nums;
}
.ec-cal-g span { height: 8.2cqw; display: grid; place-items: center; }
.ec-cal-h { opacity: .58; font-size: 3.1cqw; }
.ec-cal-on {
  background: var(--ec-altInk);
  color: var(--ec-alt);
  border-radius: 50%;
  width: 8.2cqw;
  justify-self: center;
  font-weight: 500;
}

/* กำหนดการ */
.ec-list { list-style: none; position: relative; max-width: 82cqw; margin: 0 auto; }
.ec-list li {
  display: grid;
  grid-template-columns: 20cqw 1fr;
  gap: 5.5cqw;
  align-items: baseline;
  text-align: left;
  padding: 3.4cqw 0;
  border-bottom: 1px solid var(--ec-hairline);
}
.ec-list li:last-child { border-bottom: 0; }
.ec-list li.ec-notime { grid-template-columns: 1fr; text-align: center; }
.ec-list li.ec-notime time { display: none; }
.ec-list time {
  font-family: var(--ec-serif);
  font-weight: 500;
  font-size: 6.4cqw;
  line-height: 1.3;
  text-align: right;
  font-variant-numeric: lining-nums tabular-nums;
}
.ec-list span { font-size: 3.85cqw; line-height: 1.9; }

.ec-venue {
  font-family: 'Trirong', serif;
  font-weight: 400;
  font-size: 5.4cqw;
  line-height: 1.75;
  margin-bottom: 1.6cqw;
  text-wrap: balance;
}

/* สีการแต่งกาย */
.ec-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3.2cqw;
  margin-bottom: 5cqw;
}
.ec-dots span {
  width: 12.2cqw;
  height: 12.2cqw;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  box-shadow: inset 0 0 0 .9cqw color-mix(in srgb, var(--ec-bg) 55%, transparent);
}

/* ภาพถ่ายและแกลเลอรี (รองรับ 0–6 รูปเพิ่ม) */
.ec-photo { padding: 0; aspect-ratio: 4 / 5; overflow: hidden; }
.ec-gallery {
  padding: 4cqw 6cqw;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3cqw;
}
.ec-gal-item { aspect-ratio: 4 / 5; overflow: hidden; }
.ec-gallery[data-count="3"] .ec-gal-item:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 4 / 3;
}

/* ท้ายการ์ด */
.ec-end { padding-top: 15cqw; padding-bottom: 14cqw; }
.ec-thanks { font-family: 'Trirong', serif; font-weight: 400; font-size: 6cqw; line-height: 1.8; }
.ec-sign { font-family: 'Trirong', serif; font-size: 4.3cqw; line-height: 1.95; margin-top: 2cqw; opacity: .88; }
.ec-credit {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
  font-size: 3cqw;
  letter-spacing: .26em;
  margin-top: 9cqw;
  opacity: .68;
}

/* ช่องว่างเมื่อยังไม่มีรูป (live draft) */
.ec .ec-noimg {
  width: 100%;
  height: 100%;
  min-height: 60cqw;
  background:
    radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--ec-accent) 18%, transparent), transparent 70%),
    color-mix(in srgb, var(--ec-accent) 14%, var(--ec-bg));
}


/* ==========================================================================
   EC01 · ละมุน (Minimal Editorial Cotton Stationery)
   ========================================================================== */
.ec[data-tpl="lamun"] {
  background-image: url(/art/paper-grain.svg);
  background-size: 56cqw 56cqw;
}
.ec[data-tpl="lamun"] .ec-alt {
  background-image: url(/art/paper-grain.svg);
  background-size: 56cqw 56cqw;
}
.ec[data-tpl="lamun"] .ec-cover {
  padding: 11cqw 8cqw 6cqw;
}
.ec[data-tpl="lamun"] .ec-orn-crest {
  display: block;
  width: 24cqw;
  height: 14.4cqw;
  margin: 0 auto 3.5cqw;
  background-color: var(--ec-accent);
  -webkit-mask: url(/art/lamun-sprig.svg) center / contain no-repeat;
  mask: url(/art/lamun-sprig.svg) center / contain no-repeat;
  opacity: .85;
}
.ec[data-tpl="lamun"] .ec-names {
  margin-top: 3cqw;
  font-size: 10.2cqw;
  line-height: 1.38;
}
.ec[data-tpl="lamun"] .ec-names i { color: var(--ec-accent); opacity: 1; }
.ec[data-tpl="lamun"] .ec-date {
  margin-top: 2.5cqw;
  color: color-mix(in srgb, var(--ec-ink) 80%, var(--ec-accent));
}
.ec[data-tpl="lamun"] .ec-arch {
  position: relative;
  margin: 7.5cqw auto 0;
  width: 72cqw;
  height: 98cqw;
  padding: 2.4cqw;
  border: 1px solid color-mix(in srgb, var(--ec-accent) 55%, transparent);
  border-radius: 36cqw 36cqw 1cqw 1cqw;
}
.ec[data-tpl="lamun"] .ec-arch::after {
  content: "";
  position: absolute;
  inset: -1.6cqw;
  border: 1px solid color-mix(in srgb, var(--ec-accent) 26%, transparent);
  border-radius: 37.6cqw 37.6cqw 1.6cqw 1.6cqw;
  pointer-events: none;
}
.ec[data-tpl="lamun"] .ec-arch img,
.ec[data-tpl="lamun"] .ec-arch .ec-noimg {
  border-radius: 34cqw 34cqw .6cqw .6cqw;
}
.ec[data-tpl="lamun"] .ec-orn-seal {
  display: block;
  width: 14.5cqw;
  height: 14.5cqw;
  margin: -7.2cqw auto 0;
  position: relative;
  z-index: 2;
  background-color: var(--ec-accent);
  -webkit-mask: url(/art/wax-seal.svg) center / contain no-repeat;
  mask: url(/art/wax-seal.svg) center / contain no-repeat;
}
.ec[data-tpl="lamun"] .ec-invite {
  background: transparent;
  padding-top: 8cqw;
}
.ec[data-tpl="lamun"] .ec-orn-h {
  display: block;
  width: 46cqw;
  height: 4.8cqw;
  margin: 0 auto 3.5cqw;
  background-color: var(--ec-orn-color);
  -webkit-mask: url(/art/lamun-divider.svg) center / contain no-repeat;
  mask: url(/art/lamun-divider.svg) center / contain no-repeat;
  opacity: .72;
}
.ec[data-tpl="lamun"] .ec-orn-end {
  display: block;
  width: 22cqw;
  height: 13.2cqw;
  margin: 0 auto 4cqw;
  background-color: var(--ec-orn-color);
  -webkit-mask: url(/art/lamun-sprig.svg) center / contain no-repeat;
  mask: url(/art/lamun-sprig.svg) center / contain no-repeat;
  opacity: .75;
}
.ec[data-tpl="lamun"] .ec-photo {
  padding: 9cqw 11cqw;
  aspect-ratio: auto;
  height: 116cqw;
}
.ec[data-tpl="lamun"] .ec-photo img {
  border-radius: 39cqw 39cqw 1.2cqw 1.2cqw;
}
.ec[data-tpl="lamun"] .ec-gallery { padding: 7cqw 9cqw 10cqw; gap: 3.5cqw; }
.ec[data-tpl="lamun"] .ec-gal-item { border-radius: 20cqw 20cqw 1cqw 1cqw; }
.ec[data-tpl="lamun"] .ec-list li { padding: 3.6cqw 0; }
.ec[data-tpl="lamun"] .ec-list time { color: var(--ec-accent); }
.ec[data-tpl="lamun"] .ec-btn {
  border-color: color-mix(in srgb, currentColor 55%, transparent);
  background: transparent;
}
.ec[data-tpl="lamun"] .ec-btn:first-child {
  background: var(--ec-altInk);
  color: var(--ec-alt);
  border-color: var(--ec-altInk);
}


/* ==========================================================================
   EC02 · สวนใบไม้ (Botanical Fine-Line & Eucalyptus Garden)
   ========================================================================== */
.ec[data-tpl="suan"] .ec-cover { padding-bottom: 5cqw; }
.ec[data-tpl="suan"] .ec-hero {
  height: 120cqw;
  position: relative;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 66%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 66%, transparent 100%);
}
.ec[data-tpl="suan"] .ec-orn-a,
.ec[data-tpl="suan"] .ec-orn-b {
  display: block;
  position: absolute;
  z-index: 2;
  background-color: var(--ec-accent);
  opacity: .88;
}
.ec[data-tpl="suan"] .ec-orn-a {
  width: 40cqw;
  height: 54cqw;
  left: -7cqw;
  top: 66cqw;
  -webkit-mask: url(/art/suan-branch-a.svg) center / contain no-repeat;
  mask: url(/art/suan-branch-a.svg) center / contain no-repeat;
}
.ec[data-tpl="suan"] .ec-orn-b {
  width: 38cqw;
  height: 45cqw;
  right: -6cqw;
  top: -4cqw;
  transform: rotate(180deg);
  -webkit-mask: url(/art/suan-branch-b.svg) center / contain no-repeat;
  mask: url(/art/suan-branch-b.svg) center / contain no-repeat;
}
.ec[data-tpl="suan"] .ec-title {
  margin-top: -14cqw;
  padding: 0 9cqw 3cqw;
  position: relative;
  z-index: 3;
}
.ec[data-tpl="suan"] .ec-kicker { color: var(--ec-accent); opacity: .95; margin-bottom: 1.5cqw; }
.ec[data-tpl="suan"] .ec-names { font-size: 10.8cqw; }
.ec[data-tpl="suan"] .ec-names i { color: var(--ec-accent); opacity: .9; }
.ec[data-tpl="suan"] .ec-orn-h {
  display: block;
  width: 56cqw;
  height: 8cqw;
  margin: 0 auto 3.2cqw;
  background-color: var(--ec-orn-color);
  -webkit-mask: url(/art/suan-garland.svg) center / contain no-repeat;
  mask: url(/art/suan-garland.svg) center / contain no-repeat;
  opacity: .82;
}
.ec[data-tpl="suan"] .ec-orn-end {
  display: block;
  width: 52cqw;
  height: 7.4cqw;
  margin: 0 auto 4.5cqw;
  background-color: var(--ec-orn-color);
  -webkit-mask: url(/art/suan-garland.svg) center / contain no-repeat;
  mask: url(/art/suan-garland.svg) center / contain no-repeat;
  opacity: .82;
}
.ec[data-tpl="suan"] .ec-list li {
  border-bottom-style: dotted;
  border-bottom-color: color-mix(in srgb, var(--ec-accent) 42%, transparent);
}
.ec[data-tpl="suan"] .ec-list time { color: var(--ec-accent); }
.ec[data-tpl="suan"] .ec-photo {
  padding: 7cqw 7cqw;
  aspect-ratio: auto;
  height: 108cqw;
  background: var(--ec-bg);
}
.ec[data-tpl="suan"] .ec-photo img {
  border-radius: 2.4cqw;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ec-accent) 32%, transparent);
}
.ec[data-tpl="suan"] .ec-gallery { padding: 5cqw 7cqw 9cqw; }
.ec[data-tpl="suan"] .ec-gal-item { border-radius: 2cqw; }
.ec[data-tpl="suan"] .ec-btn {
  border-radius: 1.6cqw;
  border-color: var(--ec-altInk);
}
.ec[data-tpl="suan"] .ec-btn:first-child {
  background: var(--ec-altInk);
  color: var(--ec-alt);
}


/* ==========================================================================
   EC03 · กำมะหยี่ (Classic Velvet Ballroom & Cameo Medallion)
   หมายเหตุ: ไม่ใช้ตัวเอียงปลอมกับอักษรไทยตาม Brand Guideline ข้อ 4.3
   ========================================================================== */
.ec[data-tpl="kammayi"] .ec-cover {
  margin: 3.5cqw;
  padding: 10cqw 7cqw 8cqw;
  border: 1px solid color-mix(in srgb, var(--ec-accent) 42%, transparent);
  position: relative;
}
.ec[data-tpl="kammayi"] .ec-orn-c1,
.ec[data-tpl="kammayi"] .ec-orn-c2,
.ec[data-tpl="kammayi"] .ec-orn-c3,
.ec[data-tpl="kammayi"] .ec-orn-c4 {
  display: block;
  position: absolute;
  width: 11cqw;
  height: 11cqw;
  background-color: var(--ec-orn-color);
  -webkit-mask: url(/art/kammayi-corner.svg) center / contain no-repeat;
  mask: url(/art/kammayi-corner.svg) center / contain no-repeat;
  opacity: .78;
}
.ec[data-tpl="kammayi"] .ec-orn-c1 { top: 2.2cqw; left: 2.2cqw; }
.ec[data-tpl="kammayi"] .ec-orn-c2 { top: 2.2cqw; right: 2.2cqw; transform: scaleX(-1); }
.ec[data-tpl="kammayi"] .ec-orn-c3 { bottom: 2.2cqw; left: 2.2cqw; transform: scaleY(-1); }
.ec[data-tpl="kammayi"] .ec-orn-c4 { bottom: 2.2cqw; right: 2.2cqw; transform: scale(-1); }

.ec[data-tpl="kammayi"] .ec-kicker { color: var(--ec-accent); margin-bottom: 5.5cqw; opacity: .92; }
.ec[data-tpl="kammayi"] .ec-hero {
  position: relative;
  width: 74cqw;
  height: 103.6cqw;
  margin: 0 auto;
  padding: 5.2cqw;
}
.ec[data-tpl="kammayi"] .ec-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-color: var(--ec-accent);
  -webkit-mask: url(/art/kammayi-frame.svg) center / 100% 100% no-repeat;
  mask: url(/art/kammayi-frame.svg) center / 100% 100% no-repeat;
}
.ec[data-tpl="kammayi"] .ec-oval {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}
.ec[data-tpl="kammayi"] .ec-oval img { filter: saturate(.82) contrast(1.04); }
.ec[data-tpl="kammayi"] .ec-title { padding: 6.5cqw 2cqw 0; }
.ec[data-tpl="kammayi"] .ec-names {
  font-family: var(--ec-display);
  font-weight: 400;
  font-size: 11.2cqw;
  line-height: 1.4;
}
.ec[data-tpl="kammayi"] .ec-names i { color: var(--ec-accent); opacity: .95; }
.ec[data-tpl="kammayi"] .ec-orn-div,
.ec[data-tpl="kammayi"] .ec-orn-h,
.ec[data-tpl="kammayi"] .ec-orn-end {
  display: block;
  width: 48cqw;
  height: 7cqw;
  margin: 4.5cqw auto 0;
  background-color: var(--ec-orn-color);
  -webkit-mask: url(/art/kammayi-crest.svg) center / contain no-repeat;
  mask: url(/art/kammayi-crest.svg) center / contain no-repeat;
  opacity: .84;
}
.ec[data-tpl="kammayi"] .ec-orn-h,
.ec[data-tpl="kammayi"] .ec-orn-end { margin: 0 auto 3.5cqw; }
.ec[data-tpl="kammayi"] .ec-invite { padding-top: 8cqw; }
.ec[data-tpl="kammayi"] .ec-list li {
  display: block;
  text-align: center;
  padding: 0 0 4.8cqw;
  border-bottom: 0;
}
.ec[data-tpl="kammayi"] .ec-list li + li::before {
  content: "";
  display: block;
  width: 2.2cqw;
  height: 2.2cqw;
  margin: 0 auto 4.6cqw;
  background: var(--ec-accent);
  transform: rotate(45deg);
}
.ec[data-tpl="kammayi"] .ec-list time {
  display: block;
  text-align: center;
  color: var(--ec-accent);
  font-size: 6.8cqw;
  margin-bottom: .6cqw;
}
.ec[data-tpl="kammayi"] .ec-list span { display: block; }
.ec[data-tpl="kammayi"] .ec-btn { border-radius: .8cqw; }
.ec[data-tpl="kammayi"] .ec-btn:first-child {
  background: var(--ec-altInk);
  color: var(--ec-alt);
  border-color: var(--ec-altInk);
}
.ec[data-tpl="kammayi"] .ec-end {
  position: relative;
  box-shadow: inset 0 0 0 3.5cqw var(--ec-alt), inset 0 0 0 calc(3.5cqw + 1px) color-mix(in srgb, var(--ec-altInk) 28%, transparent);
}
.ec[data-tpl="kammayi"] .ec-end .ec-orn-c1 { top: 5.5cqw; left: 5.5cqw; }
.ec[data-tpl="kammayi"] .ec-end .ec-orn-c2 { top: 5.5cqw; right: 5.5cqw; }
.ec[data-tpl="kammayi"] .ec-end .ec-orn-c3 { bottom: 5.5cqw; left: 5.5cqw; }
.ec[data-tpl="kammayi"] .ec-end .ec-orn-c4 { bottom: 5.5cqw; right: 5.5cqw; }


/* ==========================================================================
   EC04 · ขาวดำ (High-Fashion Monochrome Editorial Monograph)
   ========================================================================== */
.ec[data-tpl="khaodam"] { text-align: left; }
.ec[data-tpl="khaodam"] img { filter: grayscale(1) contrast(1.08); }
.ec[data-tpl="khaodam"] .ec-cover {
  height: 168cqw;
  background: #141312;
  overflow: hidden;
}
.ec[data-tpl="khaodam"] .ec-cover::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 28cqw;
  background: linear-gradient(rgb(16 14 13 / .58), transparent);
  z-index: 1;
  pointer-events: none;
}
.ec[data-tpl="khaodam"] .ec-kicker {
  position: absolute;
  top: 6cqw;
  left: 7.5cqw;
  right: 7.5cqw;
  z-index: 2;
  color: #f4f2ee;
  opacity: .92;
  padding-bottom: 2.8cqw;
  border-bottom: 1px solid rgb(244 242 238 / .35);
}
.ec[data-tpl="khaodam"] .ec-title {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 44cqw 7.5cqw 9cqw;
  text-align: left;
  color: #f4f2ee;
  background: linear-gradient(transparent 0%, rgb(16 14 13 / .46) 44%, rgb(16 14 13 / .92) 100%);
}
.ec[data-tpl="khaodam"] .ec-orn-rule {
  display: block;
  width: 100%;
  height: 3.4cqw;
  margin-bottom: 4.5cqw;
  background-color: #f4f2ee;
  -webkit-mask: url(/art/khaodam-mark.svg) left center / 100% 100% no-repeat;
  mask: url(/art/khaodam-mark.svg) left center / 100% 100% no-repeat;
  opacity: .75;
}
.ec[data-tpl="khaodam"] .ec-names {
  font-family: var(--ec-display);
  font-size: 12.6cqw;
  line-height: 1.28;
  font-weight: 400;
}
.ec[data-tpl="khaodam"] .ec-names i {
  font-size: 4cqw;
  line-height: 1.75;
  opacity: .72;
}
.ec[data-tpl="khaodam"] .ec-date-dots {
  margin-top: 3.5cqw;
  font-size: 4.4cqw;
  letter-spacing: .18em;
  opacity: .9;
}
.ec[data-tpl="khaodam"] .ec-sec { padding: 13cqw 7.5cqw; }
.ec[data-tpl="khaodam"] .ec-orn-h {
  display: block;
  width: 100%;
  height: 3.2cqw;
  margin-bottom: 4.5cqw;
  background-color: var(--ec-orn-color);
  -webkit-mask: url(/art/khaodam-mark.svg) left center / 100% 100% no-repeat;
  mask: url(/art/khaodam-mark.svg) left center / 100% 100% no-repeat;
  opacity: .42;
}
.ec[data-tpl="khaodam"] .ec-ev-no {
  font-family: var(--ec-display);
  font-size: 9cqw;
  letter-spacing: .04em;
  line-height: 1;
  margin-bottom: 2cqw;
  opacity: .35;
}
.ec[data-tpl="khaodam"] .ec-h {
  font-family: var(--ec-display);
  font-size: 9.2cqw;
  line-height: 1.38;
  margin-bottom: 4.5cqw;
}
.ec[data-tpl="khaodam"] .ec-body { margin-inline: 0; max-width: none; }
.ec[data-tpl="khaodam"] .ec-parents { margin-bottom: 5cqw; }
.ec[data-tpl="khaodam"] .ec-cal { max-width: none; }
.ec[data-tpl="khaodam"] .ec-cal-m { text-align: left; }
.ec[data-tpl="khaodam"] .ec-cal-on { border-radius: 0; }
.ec[data-tpl="khaodam"] .ec-list { max-width: none; }
.ec[data-tpl="khaodam"] .ec-list li {
  grid-template-columns: 22cqw 1fr;
  border-bottom: 0;
  border-top: 1px solid var(--ec-hairline);
  padding: 4cqw 0;
}
.ec[data-tpl="khaodam"] .ec-list li.ec-notime { text-align: left; }
.ec[data-tpl="khaodam"] .ec-list time { text-align: left; font-family: var(--ec-display); font-size: 6cqw; }
.ec[data-tpl="khaodam"] .ec-acts { justify-content: flex-start; }
.ec[data-tpl="khaodam"] .ec-btn { border-radius: 0; }
.ec[data-tpl="khaodam"] .ec-btn:first-child {
  background: var(--ec-altInk);
  color: var(--ec-alt);
  border-color: var(--ec-altInk);
}
.ec[data-tpl="khaodam"] .ec-dots { justify-content: flex-start; }
.ec[data-tpl="khaodam"] .ec-dots span { border-radius: 0; width: 11cqw; height: 11cqw; box-shadow: none; }
.ec[data-tpl="khaodam"] .ec-photo { padding: 0; }
.ec[data-tpl="khaodam"] .ec-gallery { padding: 3cqw 7.5cqw 10cqw; gap: 2.5cqw; }
.ec[data-tpl="khaodam"] .ec-end { border-top: 1px solid var(--ec-hairline); }
.ec[data-tpl="khaodam"] .ec-credit { margin-top: 11cqw; }


/* ==========================================================================
   EC05 · กระดาษฉีก (Deckle-Edge Handmade Paper — ใช้ SVG Mask แทน clip-path)
   ========================================================================== */
.ec[data-tpl="kradat"] {
  background-image: url(/art/paper-grain.svg);
  background-size: 52cqw 52cqw;
}
.ec[data-tpl="kradat"] .ec-hero { height: 118cqw; }

/* ขอบกระดาษฉีกจริงด้วย ::before + SVG mask (ไม่ยืดตามความสูงของ section) */
.ec[data-tpl="kradat"] .ec-title,
.ec[data-tpl="kradat"] .ec-alt,
.ec[data-tpl="kradat"] .ec-plan,
.ec[data-tpl="kradat"] .ec-dress {
  position: relative;
  z-index: 2;
  background-color: var(--ec-bg);
  background-image: url(/art/paper-grain.svg);
  background-size: 52cqw 52cqw;
}
.ec[data-tpl="kradat"] .ec-alt {
  background-color: var(--ec-alt);
}
.ec[data-tpl="kradat"] .ec-title::before,
.ec[data-tpl="kradat"] .ec-alt::before,
.ec[data-tpl="kradat"] .ec-plan::before,
.ec[data-tpl="kradat"] .ec-dress::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -4.4cqw;
  height: 4.8cqw;
  pointer-events: none;
  background-color: var(--ec-bg);
  -webkit-mask: url(/art/tear-edge-a.svg) 0 0 / 100% 100% no-repeat;
  mask: url(/art/tear-edge-a.svg) 0 0 / 100% 100% no-repeat;
  filter: drop-shadow(0 -.6cqw .7cqw rgb(0 0 0 / .08));
}
.ec[data-tpl="kradat"] .ec-alt::before {
  background-color: var(--ec-alt);
  -webkit-mask: url(/art/tear-edge-b.svg) 0 0 / 100% 100% no-repeat;
  mask: url(/art/tear-edge-b.svg) 0 0 / 100% 100% no-repeat;
}
.ec[data-tpl="kradat"] .ec-dress::before {
  -webkit-mask: url(/art/tear-edge-b.svg) 0 0 / 100% 100% no-repeat;
  mask: url(/art/tear-edge-b.svg) 0 0 / 100% 100% no-repeat;
}

.ec[data-tpl="kradat"] .ec-title {
  margin-top: -5cqw;
  padding: 6cqw 8cqw 9cqw;
}
.ec[data-tpl="kradat"] .ec-orn-seal {
  display: block;
  width: 15.5cqw;
  height: 15.5cqw;
  margin: -14.5cqw auto 3.5cqw;
  position: relative;
  z-index: 3;
  background-color: var(--ec-accent);
  -webkit-mask: url(/art/wax-seal.svg) center / contain no-repeat;
  mask: url(/art/wax-seal.svg) center / contain no-repeat;
}
.ec[data-tpl="kradat"] .ec-invite { padding-top: 6cqw; padding-bottom: 16cqw; }
.ec[data-tpl="kradat"] .ec-alt,
.ec[data-tpl="kradat"] .ec-plan,
.ec[data-tpl="kradat"] .ec-dress {
  padding-top: 12cqw;
  padding-bottom: 17cqw;
}
.ec[data-tpl="kradat"] .ec-end { padding-bottom: 14cqw; }
.ec[data-tpl="kradat"] .ec-orn-end {
  display: block;
  width: 13.5cqw;
  height: 13.5cqw;
  margin: 0 auto 4cqw;
  background-color: var(--ec-orn-color);
  -webkit-mask: url(/art/wax-seal.svg) center / contain no-repeat;
  mask: url(/art/wax-seal.svg) center / contain no-repeat;
  opacity: .85;
}
.ec[data-tpl="kradat"] .ec-photo {
  margin-top: -4cqw;
  padding-bottom: 5cqw;
  z-index: 1;
}
.ec[data-tpl="kradat"] .ec-gallery {
  padding: 4cqw 6cqw 14cqw;
  gap: 3cqw;
  background: var(--ec-bg);
}
.ec[data-tpl="kradat"] .ec-gal-item {
  padding: 2cqw;
  background: color-mix(in srgb, var(--ec-bg) 70%, #faf8f4);
  border: 1px solid var(--ec-hairline);
}
.ec[data-tpl="kradat"] .ec-list li {
  display: block;
  text-align: center;
  padding: 3.4cqw 0;
  border-bottom: 1px dashed var(--ec-hairline);
}
.ec[data-tpl="kradat"] .ec-list li:last-child { border-bottom: 0; }
.ec[data-tpl="kradat"] .ec-list time { display: block; text-align: center; font-size: 6.4cqw; margin-bottom: .6cqw; }
.ec[data-tpl="kradat"] .ec-btn { border-radius: 1.4cqw; }
.ec[data-tpl="kradat"] .ec-btn:first-child {
  background: var(--ec-altInk);
  color: var(--ec-alt);
  border-color: var(--ec-altInk);
}


/* ==========================================================================
   EC06 · เรือนแก้ว (Contemporary Thai Heritage — ใช้ SVG Arch Mask แทน clip-path)
   ========================================================================== */
.ec[data-tpl="ruankaew"] {
  background-image: url(/art/paper-grain.svg);
  background-size: 56cqw 56cqw;
}
.ec[data-tpl="ruankaew"] .ec-cover {
  margin: 3.6cqw;
  padding: 8.5cqw 6cqw 8cqw;
  border: 1px solid color-mix(in srgb, var(--ec-accent) 68%, transparent);
  position: relative;
}
.ec[data-tpl="ruankaew"] .ec-orn-c1,
.ec[data-tpl="ruankaew"] .ec-orn-c2,
.ec[data-tpl="ruankaew"] .ec-orn-c3,
.ec[data-tpl="ruankaew"] .ec-orn-c4 {
  display: block;
  position: absolute;
  width: 12.5cqw;
  height: 12.5cqw;
  background-color: var(--ec-orn-color);
  -webkit-mask: url(/art/thai-corner.svg) center / contain no-repeat;
  mask: url(/art/thai-corner.svg) center / contain no-repeat;
  opacity: .88;
}
.ec[data-tpl="ruankaew"] .ec-orn-c1 { top: 1.8cqw; left: 1.8cqw; }
.ec[data-tpl="ruankaew"] .ec-orn-c2 { top: 1.8cqw; right: 1.8cqw; transform: scaleX(-1); }
.ec[data-tpl="ruankaew"] .ec-orn-c3 { bottom: 1.8cqw; left: 1.8cqw; transform: scaleY(-1); }
.ec[data-tpl="ruankaew"] .ec-orn-c4 { bottom: 1.8cqw; right: 1.8cqw; transform: scale(-1); }

.ec[data-tpl="ruankaew"] .ec-orn-yam,
.ec[data-tpl="ruankaew"] .ec-orn-h,
.ec[data-tpl="ruankaew"] .ec-orn-end {
  display: block;
  width: 48cqw;
  height: 10.5cqw;
  margin: 0 auto 3cqw;
  background-color: var(--ec-orn-color);
  -webkit-mask: url(/art/thai-prajamyam.svg) center / contain no-repeat;
  mask: url(/art/thai-prajamyam.svg) center / contain no-repeat;
}
.ec[data-tpl="ruankaew"] .ec-kicker { color: var(--ec-accent); opacity: .95; }

/* ซุ้มโค้งทรงไทย (SVG mask สำหรับภาพ + กรอบเส้นคู่ยอดบัวตูมวางทับ) */
.ec[data-tpl="ruankaew"] .ec-gable {
  position: relative;
  margin: 4cqw auto 5.5cqw;
  width: 74cqw;
  height: 111cqw;
}
.ec[data-tpl="ruankaew"] .ec-gable-photo {
  position: absolute;
  inset: 0;
  -webkit-mask: url(/art/thai-arch-mask.svg) center / 100% 100% no-repeat;
  mask: url(/art/thai-arch-mask.svg) center / 100% 100% no-repeat;
}
.ec[data-tpl="ruankaew"] .ec-gable::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-color: var(--ec-accent);
  -webkit-mask: url(/art/thai-arch-frame.svg) center / 100% 100% no-repeat;
  mask: url(/art/thai-arch-frame.svg) center / 100% 100% no-repeat;
}
.ec[data-tpl="ruankaew"] .ec-names {
  font-family: 'Trirong', serif;
  font-weight: 400;
  font-size: 9.2cqw;
  line-height: 1.55;
}
.ec[data-tpl="ruankaew"] .ec-names i { color: var(--ec-accent); opacity: .95; }
.ec[data-tpl="ruankaew"] .ec-sec.ec-alt::before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4.5cqw;
  background-color: var(--ec-altInk);
  opacity: .24;
  -webkit-mask: url(/art/thai-border.svg) center / 68cqw 100% repeat-x;
  mask: url(/art/thai-border.svg) center / 68cqw 100% repeat-x;
  pointer-events: none;
}
.ec[data-tpl="ruankaew"] .ec-list time { color: var(--ec-accent); }
.ec[data-tpl="ruankaew"] .ec-photo {
  padding: 6cqw 8cqw;
  aspect-ratio: auto;
  height: 110cqw;
}
.ec[data-tpl="ruankaew"] .ec-photo img {
  outline: 1px solid color-mix(in srgb, var(--ec-accent) 55%, transparent);
  outline-offset: 1.6cqw;
}
.ec[data-tpl="ruankaew"] .ec-gallery { padding: 5cqw 8cqw 10cqw; gap: 4cqw; }
.ec[data-tpl="ruankaew"] .ec-gal-item {
  border: 1px solid color-mix(in srgb, var(--ec-accent) 45%, transparent);
  padding: 1.2cqw;
}
.ec[data-tpl="ruankaew"] .ec-btn {
  border-radius: 0;
  outline: 1px solid currentColor;
  outline-offset: 1.1cqw;
}
.ec[data-tpl="ruankaew"] .ec-btn:first-child {
  background: var(--ec-altInk);
  color: var(--ec-alt);
  border-color: var(--ec-altInk);
}
.ec[data-tpl="ruankaew"] .ec-cal-on {
  border-radius: 0;
  outline: 1px solid var(--ec-altInk);
  outline-offset: .8cqw;
}
.ec[data-tpl="ruankaew"] .ec-end {
  position: relative;
  padding-top: 17cqw;
}
.ec[data-tpl="ruankaew"] .ec-end .ec-orn-c1 { top: 6.5cqw; left: 4.5cqw; }
.ec[data-tpl="ruankaew"] .ec-end .ec-orn-c2 { top: 6.5cqw; right: 4.5cqw; }
.ec[data-tpl="ruankaew"] .ec-end .ec-orn-c3 { bottom: 4.5cqw; left: 4.5cqw; }
.ec[data-tpl="ruankaew"] .ec-end .ec-orn-c4 { bottom: 4.5cqw; right: 4.5cqw; }

@media (prefers-reduced-motion: reduce) {
  .ec-btn { transition: none; }
}

/* ── EC07 baitong ── */
/* ==========================================================================
   EC07 · ใบตอง (Contemporary Thai Leaf Craft)
   ========================================================================== */
.ec[data-tpl="baitong"] {
  background-image: url(/art/paper-grain.svg);
  background-size: 56cqw 56cqw;
}

/* ปก */
.ec[data-tpl="baitong"] .ec-cover { padding: 5cqw 7cqw 13cqw; }
.ec[data-tpl="baitong"] .ec-orn-malai {
  display: block;
  width: 86cqw;
  height: 22.4cqw;
  margin: 0 auto 3.5cqw;
  background-color: var(--ec-accent);
  -webkit-mask: url(/art/baitong-malai.svg) center / contain no-repeat;
  mask: url(/art/baitong-malai.svg) center / contain no-repeat;
}
.ec[data-tpl="baitong"] .ec-kicker { color: var(--ec-accent); opacity: 1; }
.ec[data-tpl="baitong"] .ec-names {
  font-family: 'Trirong', serif;
  font-size: 9.4cqw;
  line-height: 1.55;
  margin-top: 2.5cqw;
}
.ec[data-tpl="baitong"] .ec-names i { color: var(--ec-accent); opacity: 1; }
.ec[data-tpl="baitong"] .ec-date { margin-top: 2cqw; }
.ec[data-tpl="baitong"] .ec-bt-frame {
  position: relative;
  width: 74.8cqw;
  height: 94.6cqw;
  margin: 6cqw auto 0;
}
.ec[data-tpl="baitong"] .ec-bt-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-color: var(--ec-accent);
  -webkit-mask: url(/art/baitong-frame-line.svg) center / 100% 100% no-repeat;
  mask: url(/art/baitong-frame-line.svg) center / 100% 100% no-repeat;
}
.ec[data-tpl="baitong"] .ec-bt-photo {
  position: absolute;
  inset: 4.4cqw;
  -webkit-mask: url(/art/baitong-frame-mask.svg) center / 100% 100% no-repeat;
  mask: url(/art/baitong-frame-mask.svg) center / 100% 100% no-repeat;
}
.ec[data-tpl="baitong"] .ec-orn-fold {
  display: block;
  width: 72cqw;
  height: 9cqw;
  margin: 3.5cqw auto 0;
  background-color: var(--ec-accent);
  -webkit-mask: url(/art/baitong-fold.svg) left bottom / 9cqw 9cqw repeat-x;
  mask: url(/art/baitong-fold.svg) left bottom / 9cqw 9cqw repeat-x;
}
.ec[data-tpl="baitong"] .ec-invite { padding-top: 2cqw; padding-bottom: 16cqw; }

/* ขอบยอดใบตองของพื้นสลับ */
.ec[data-tpl="baitong"] .ec-sec.ec-alt { padding-top: 14cqw; padding-bottom: 16cqw; }
.ec[data-tpl="baitong"] .ec-sec.ec-alt::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -4.8cqw;
  height: 5cqw;
  pointer-events: none;
  background-color: var(--ec-alt);
  -webkit-mask: url(/art/baitong-edge.svg) left top / 10cqw 100% repeat-x;
  mask: url(/art/baitong-edge.svg) left top / 10cqw 100% repeat-x;
}
.ec[data-tpl="baitong"] .ec-plan { padding-bottom: 17cqw; }

/* หัวข้อและท้ายการ์ด */
.ec[data-tpl="baitong"] .ec-orn-h {
  display: block;
  width: 50cqw;
  height: 10cqw;
  margin: 0 auto 3cqw;
  background-color: var(--ec-orn-color);
  -webkit-mask: url(/art/baitong-petals.svg) center / contain no-repeat;
  mask: url(/art/baitong-petals.svg) center / contain no-repeat;
}
.ec[data-tpl="baitong"] .ec-orn-end {
  display: block;
  width: 76cqw;
  height: 19.8cqw;
  margin: 0 auto 6cqw;
  background-color: var(--ec-orn-color);
  -webkit-mask: url(/art/baitong-malai.svg) center / contain no-repeat;
  mask: url(/art/baitong-malai.svg) center / contain no-repeat;
}
.ec[data-tpl="baitong"] .ec-h,
.ec[data-tpl="baitong"] .ec-venue,
.ec[data-tpl="baitong"] .ec-parents,
.ec[data-tpl="baitong"] .ec-body,
.ec[data-tpl="baitong"] .ec-ev-tag,
.ec[data-tpl="baitong"] .ec-sign { overflow-wrap: anywhere; }
.ec[data-tpl="baitong"] .ec-ev-tag { max-width: 100%; }

/* ปฏิทิน: วันงานเป็นทรงใบไม้ */
.ec[data-tpl="baitong"] .ec-cal-on { border-radius: 50% 0 50% 0; }

/* กำหนดการร้อยตามก้านใบ */
.ec[data-tpl="baitong"] .ec-list li {
  grid-template-columns: 20cqw minmax(0, 1fr);
  gap: 0;
  align-items: start;
  padding: 0;
  border-bottom: 0;
}
.ec[data-tpl="baitong"] .ec-list time {
  color: var(--ec-accent);
  font-size: 6cqw;
  padding: 3.4cqw 4.5cqw 3.4cqw 0;
}
.ec[data-tpl="baitong"] .ec-list span {
  position: relative;
  align-self: stretch;
  padding: 3.5cqw 0 3.5cqw 6cqw;
  border-left: 1px solid color-mix(in srgb, var(--ec-accent) 55%, transparent);
  overflow-wrap: anywhere;
}
.ec[data-tpl="baitong"] .ec-list span::before {
  content: "";
  position: absolute;
  left: -1.5cqw;
  top: 5.8cqw;
  width: 2.8cqw;
  height: 2.8cqw;
  border-radius: 50% 0 50% 0;
  background: var(--ec-accent);
}
.ec[data-tpl="baitong"] .ec-list li.ec-notime { grid-template-columns: minmax(0, 1fr); }
.ec[data-tpl="baitong"] .ec-list li.ec-notime span {
  padding: 3.5cqw 0;
  border-left: 0;
  text-align: center;
}
.ec[data-tpl="baitong"] .ec-list li.ec-notime span::before { display: none; }

/* ปุ่มและสีการแต่งกาย */
.ec[data-tpl="baitong"] .ec-btn { border-radius: 5cqw 0 5cqw 0; }
.ec[data-tpl="baitong"] .ec-btn:first-child {
  background: var(--ec-altInk);
  color: var(--ec-alt);
  border-color: var(--ec-altInk);
}
.ec[data-tpl="baitong"] .ec-dots span { border-radius: 50% 0 50% 0; }

/* ภาพถ่าย */
.ec[data-tpl="baitong"] .ec-photo {
  padding: 8cqw 12cqw 12cqw;
  aspect-ratio: auto;
  height: 118.8cqw;
}
.ec[data-tpl="baitong"] .ec-photo img {
  -webkit-mask: url(/art/baitong-frame-mask.svg) center / 100% 100% no-repeat;
  mask: url(/art/baitong-frame-mask.svg) center / 100% 100% no-repeat;
}
.ec[data-tpl="baitong"] .ec-gallery { padding: 6cqw 7cqw 14cqw; gap: 3.2cqw; }
.ec[data-tpl="baitong"] .ec-gal-item {
  border: 1px solid color-mix(in srgb, var(--ec-accent) 55%, transparent);
  padding: 1.2cqw;
  border-radius: 14cqw 0 14cqw 0;
}
.ec[data-tpl="baitong"] .ec-gal-item:nth-child(even) { border-radius: 0 14cqw 0 14cqw; }
.ec[data-tpl="baitong"] .ec-gal-item img { border-radius: 12.8cqw 0 12.8cqw 0; }
.ec[data-tpl="baitong"] .ec-gal-item:nth-child(even) img { border-radius: 0 12.8cqw 0 12.8cqw; }

/* ── EC08 baisri ── */
/* ==========================================================================
   EC07 · บายศรี (Contemporary Thai Baisri & Yom-Mum Celadon Heritage)
   ========================================================================== */
.ec[data-tpl="baisri"] {
  background-image: url(/art/baisri-silk.svg);
  background-size: 28cqw 28cqw;
}
.ec[data-tpl="baisri"] .ec-alt {
  background-image: url(/art/baisri-silk.svg);
  background-size: 28cqw 28cqw;
}
.ec[data-tpl="baisri"] .ec-cover {
  padding: 5.5cqw 0 7cqw;
}
.ec[data-tpl="baisri"] .ec-orn-rail {
  display: block;
  width: 82cqw;
  height: 3.6cqw;
  margin: 0 auto 5cqw;
  background-color: var(--ec-accent);
  opacity: .72;
  -webkit-mask: url(/art/baisri-rail.svg) center / 16cqw 100% repeat-x;
  mask: url(/art/baisri-rail.svg) center / 16cqw 100% repeat-x;
}
.ec[data-tpl="baisri"] .ec-window {
  position: relative;
  width: 82cqw;
  height: 96cqw;
  margin: 0 auto;
}
.ec[data-tpl="baisri"] .ec-window-photo {
  position: absolute;
  inset: 0;
  -webkit-mask: url(/art/baisri-window-mask.svg) center / 100% 100% no-repeat;
  mask: url(/art/baisri-window-mask.svg) center / 100% 100% no-repeat;
}
.ec[data-tpl="baisri"] .ec-window::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-color: var(--ec-accent);
  -webkit-mask: url(/art/baisri-window-frame.svg) center / 100% 100% no-repeat;
  mask: url(/art/baisri-window-frame.svg) center / 100% 100% no-repeat;
}
.ec[data-tpl="baisri"] .ec-plaque {
  position: relative;
  z-index: 2;
  width: 78cqw;
  margin: -13cqw auto 0;
  padding: 5.5cqw 6cqw 6.5cqw;
  background-color: var(--ec-bg);
  background-image: url(/art/baisri-silk.svg);
  background-size: 28cqw 28cqw;
  border: 1px solid color-mix(in srgb, var(--ec-accent) 62%, transparent);
  box-shadow: inset 0 0 0 1.4cqw var(--ec-bg), inset 0 0 0 calc(1.4cqw + 1px) color-mix(in srgb, var(--ec-accent) 34%, transparent);
}
.ec[data-tpl="baisri"] .ec-orn-lotus {
  display: block;
  width: 24cqw;
  height: 13.2cqw;
  margin: 0 auto 2.8cqw;
  background-color: var(--ec-accent);
  -webkit-mask: url(/art/baisri-lotus.svg) center / contain no-repeat;
  mask: url(/art/baisri-lotus.svg) center / contain no-repeat;
  opacity: .92;
}
.ec[data-tpl="baisri"] .ec-kicker {
  color: var(--ec-accent);
  opacity: .94;
  margin-bottom: 2.2cqw;
}
.ec[data-tpl="baisri"] .ec-names {
  font-family: 'Trirong', serif;
  font-weight: 400;
  font-size: 9.2cqw;
  line-height: 1.5;
}
.ec[data-tpl="baisri"] .ec-names i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2.6cqw;
  width: 100%;
  color: var(--ec-accent);
  opacity: .95;
  line-height: 1.9;
}
.ec[data-tpl="baisri"] .ec-names i::before,
.ec[data-tpl="baisri"] .ec-names i::after {
  content: "";
  width: 8cqw;
  height: 1px;
  background: color-mix(in srgb, var(--ec-accent) 55%, transparent);
}
.ec[data-tpl="baisri"] .ec-date {
  margin-top: 2.6cqw;
  color: color-mix(in srgb, var(--ec-ink) 86%, var(--ec-accent));
}
.ec[data-tpl="baisri"] .ec-invite {
  padding-top: 7.5cqw;
  padding-bottom: 12cqw;
}
.ec[data-tpl="baisri"] .ec-sec.ec-alt::before,
.ec[data-tpl="baisri"] .ec-sec.ec-alt::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  height: 3.4cqw;
  background-color: var(--ec-altInk);
  opacity: .22;
  -webkit-mask: url(/art/baisri-rail.svg) center / 16cqw 100% repeat-x;
  mask: url(/art/baisri-rail.svg) center / 16cqw 100% repeat-x;
  pointer-events: none;
}
.ec[data-tpl="baisri"] .ec-sec.ec-alt::before { top: 2.2cqw; }
.ec[data-tpl="baisri"] .ec-sec.ec-alt::after { bottom: 2.2cqw; }
.ec[data-tpl="baisri"] .ec-end::after { display: none; }
.ec[data-tpl="baisri"] .ec-orn-h {
  display: block;
  width: 54cqw;
  height: 4.8cqw;
  margin: 0 auto 3.4cqw;
  background-color: var(--ec-orn-color);
  -webkit-mask: url(/art/baisri-divider.svg) center / contain no-repeat;
  mask: url(/art/baisri-divider.svg) center / contain no-repeat;
  opacity: .84;
}
.ec[data-tpl="baisri"] .ec-orn-end {
  display: block;
  width: 24cqw;
  height: 13.2cqw;
  margin: 0 auto 4cqw;
  background-color: var(--ec-orn-color);
  -webkit-mask: url(/art/baisri-lotus.svg) center / contain no-repeat;
  mask: url(/art/baisri-lotus.svg) center / contain no-repeat;
  opacity: .88;
}
.ec[data-tpl="baisri"] .ec-ev-no {
  font-family: var(--ec-serif);
  font-size: 4.2cqw;
  letter-spacing: .2em;
  color: var(--ec-accent);
  margin-bottom: 1.8cqw;
}
.ec[data-tpl="baisri"] .ec-ev-tag {
  border-color: color-mix(in srgb, var(--ec-altInk) 42%, transparent);
  padding: .9cqw 4.2cqw;
}
.ec[data-tpl="baisri"] .ec-cal-on {
  border-radius: 1.2cqw;
  outline: 1px solid color-mix(in srgb, var(--ec-altInk) 55%, transparent);
  outline-offset: .9cqw;
}
.ec[data-tpl="baisri"] .ec-list {
  max-width: 84cqw;
}
.ec[data-tpl="baisri"] .ec-list li {
  position: relative;
  grid-template-columns: 20cqw 1fr;
  gap: 8cqw;
  padding: 3.6cqw 0;
  border-bottom: 0;
}
.ec[data-tpl="baisri"] .ec-list li:not(.ec-notime)::before {
  content: "";
  position: absolute;
  left: 23.2cqw;
  top: 6.4cqw;
  width: 1.7cqw;
  height: 1.7cqw;
  background: var(--ec-accent);
  transform: rotate(45deg);
}
.ec[data-tpl="baisri"] .ec-list li:not(.ec-notime):not(:last-child)::after {
  content: "";
  position: absolute;
  left: 24cqw;
  top: 8.8cqw;
  bottom: -5.4cqw;
  width: 1px;
  background: color-mix(in srgb, var(--ec-accent) 42%, transparent);
}
.ec[data-tpl="baisri"] .ec-list li.ec-notime {
  border-bottom: 1px solid var(--ec-hairline);
}
.ec[data-tpl="baisri"] .ec-list li.ec-notime:last-child {
  border-bottom: 0;
}
.ec[data-tpl="baisri"] .ec-list time {
  color: var(--ec-accent);
  font-size: 6cqw;
}
.ec[data-tpl="baisri"] .ec-photo {
  position: relative;
  padding: 7cqw 9cqw;
  aspect-ratio: auto;
  height: 110cqw;
}
.ec[data-tpl="baisri"] .ec-photo img {
  -webkit-mask: url(/art/baisri-window-mask.svg) center / 100% 100% no-repeat;
  mask: url(/art/baisri-window-mask.svg) center / 100% 100% no-repeat;
}
.ec[data-tpl="baisri"] .ec-photo::after {
  content: "";
  position: absolute;
  inset: 7cqw 9cqw;
  pointer-events: none;
  background-color: var(--ec-accent);
  -webkit-mask: url(/art/baisri-window-frame.svg) center / 100% 100% no-repeat;
  mask: url(/art/baisri-window-frame.svg) center / 100% 100% no-repeat;
}
.ec[data-tpl="baisri"] .ec-gallery {
  padding: 6cqw 8.5cqw 10cqw;
  gap: 3.6cqw;
}
.ec[data-tpl="baisri"] .ec-gal-item {
  padding: 1.4cqw;
  border: 1px solid color-mix(in srgb, var(--ec-accent) 46%, transparent);
  background: color-mix(in srgb, var(--ec-accent) 7%, var(--ec-bg));
}
.ec[data-tpl="baisri"] .ec-dots span {
  border-radius: 2.2cqw;
  box-shadow: inset 0 0 0 1cqw color-mix(in srgb, var(--ec-bg) 60%, transparent);
}
.ec[data-tpl="baisri"] .ec-btn {
  border-radius: .8cqw;
  border-color: var(--ec-altInk);
}
.ec[data-tpl="baisri"] .ec-btn:first-child {
  background: var(--ec-altInk);
  color: var(--ec-alt);
  border-color: var(--ec-altInk);
}
.ec[data-tpl="baisri"] .ec-end {
  padding-top: 17cqw;
  padding-bottom: 14cqw;
}

/* ── EC09 siamjade ── */
.ec[data-tpl="siamjade"] {
background-color: var(--ec-bg);
background-image:
radial-gradient(ellipse at 50% 45%, color-mix(in srgb, var(--ec-accent) 8%, transparent), transparent 65%);
}

.ec[data-tpl="siamjade"] .ec-cover {
position: relative;
margin: 3.5cqw;
padding: 9cqw 6cqw 11cqw;
border: .25cqw solid color-mix(in srgb, var(--ec-accent) 65%, transparent);
overflow: hidden;
}

.ec[data-tpl="siamjade"] .ec-orn-c1,
.ec[data-tpl="siamjade"] .ec-orn-c2,
.ec[data-tpl="siamjade"] .ec-orn-c3,
.ec[data-tpl="siamjade"] .ec-orn-c4 {
display: block;
position: absolute;
z-index: 3;
width: 12cqw;
height: 12cqw;
background-color: var(--ec-accent);
-webkit-mask: url(/art/thai-corner.svg) center / contain no-repeat;
mask: url(/art/thai-corner.svg) center / contain no-repeat;
opacity: .9;
}

.ec[data-tpl="siamjade"] .ec-orn-c1 {
top: 2cqw;
left: 2cqw;
}

.ec[data-tpl="siamjade"] .ec-orn-c2 {
top: 2cqw;
right: 2cqw;
transform: scaleX(-1);
}

.ec[data-tpl="siamjade"] .ec-orn-c3 {
bottom: 2cqw;
left: 2cqw;
transform: scaleY(-1);
}

.ec[data-tpl="siamjade"] .ec-orn-c4 {
bottom: 2cqw;
right: 2cqw;
transform: scale(-1);
}

.ec[data-tpl="siamjade"] .ec-si-crest {
width: 48cqw;
height: 10cqw;
margin: 0 auto 3cqw;
display: grid;
place-items: center;
}

.ec[data-tpl="siamjade"] .ec-orn-yam {
display: block;
width: 100%;
height: 100%;
background-color: var(--ec-accent);
-webkit-mask: url(/art/thai-prajamyam.svg) center / contain no-repeat;
mask: url(/art/thai-prajamyam.svg) center / contain no-repeat;
}

.ec[data-tpl="siamjade"] .ec-kicker {
color: var(--ec-accent);
font-size: 3.5cqw;
font-weight: 400;
letter-spacing: .04em;
margin-bottom: 4cqw;
}

.ec[data-tpl="siamjade"] .ec-si-frame {
position: relative;
width: 78cqw;
height: 100cqw;
margin: 0 auto;
padding: 2.6cqw;
border: .3cqw solid var(--ec-accent);
border-radius: 39cqw 39cqw 2cqw 2cqw;
}

.ec[data-tpl="siamjade"] .ec-si-frame::before {
content: "";
position: absolute;
inset: 1.2cqw;
border: .2cqw solid color-mix(in srgb, var(--ec-accent) 60%, transparent);
border-radius: 37cqw 37cqw 1cqw 1cqw;
pointer-events: none;
z-index: 2;
}

.ec[data-tpl="siamjade"] .ec-si-photo {
width: 100%;
height: 100%;
overflow: hidden;
border-radius: 36cqw 36cqw 1cqw 1cqw;
}

.ec[data-tpl="siamjade"] .ec-si-photo img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center 22%;
}

.ec[data-tpl="siamjade"] .ec-si-frame:has(.ec-noimg) {
display: none;
}

.ec[data-tpl="siamjade"] .ec-si-title {
position: relative;
padding: 6cqw 2cqw 2cqw;
}

.ec[data-tpl="siamjade"] .ec-names {
font-family: 'Trirong', serif;
font-size: 9.2cqw;
line-height: 1.48;
font-weight: 400;
overflow-wrap: anywhere;
text-wrap: balance;
margin: 0 auto;
}

.ec[data-tpl="siamjade"] .ec-names span {
display: block;
max-width: 100%;
}

.ec[data-tpl="siamjade"] .ec-names i {
display: block;
font-family: 'Trirong', serif;
font-size: 4cqw;
line-height: 1.9;
color: var(--ec-accent);
}

.ec[data-tpl="siamjade"] .ec-names-empty {
display: none;
}

.ec[data-tpl="siamjade"] .ec-si-divider {
width: 32cqw;
height: .25cqw;
margin: 4cqw auto 2cqw;
background: var(--ec-accent);
opacity: .75;
}

.ec[data-tpl="siamjade"] .ec-date {
font-family: 'Trirong', serif;
font-size: 4.4cqw;
line-height: 1.9;
color: var(--ec-ink);
margin-top: 2cqw;
}

.ec[data-tpl="siamjade"] .ec-orn-h,
.ec[data-tpl="siamjade"] .ec-orn-end {
display: block;
width: 43cqw;
height: 9cqw;
margin: 0 auto 4cqw;
background-color: var(--ec-orn-color);
-webkit-mask: url(/art/thai-prajamyam.svg) center / contain no-repeat;
mask: url(/art/thai-prajamyam.svg) center / contain no-repeat;
}

.ec[data-tpl="siamjade"] .ec-sec.ec-alt {
position: relative;
}

.ec[data-tpl="siamjade"] .ec-sec.ec-alt::before {
content: "";
display: block;
position: absolute;
top: 0;
left: 0;
right: 0;
height: 4cqw;
background-color: var(--ec-altInk);
opacity: .2;
-webkit-mask: url(/art/thai-border.svg) center / 68cqw 100% repeat-x;
mask: url(/art/thai-border.svg) center / 68cqw 100% repeat-x;
pointer-events: none;
}

.ec[data-tpl="siamjade"] .ec-list {
max-width: 84cqw;
margin: 0 auto;
}

.ec[data-tpl="siamjade"] .ec-list li {
grid-template-columns: 20cqw 1fr;
gap: 4cqw;
padding: 3.8cqw 0;
border-bottom: .2cqw solid var(--ec-hairline);
}

.ec[data-tpl="siamjade"] .ec-list time {
color: var(--ec-accent);
font-size: 6cqw;
}

.ec[data-tpl="siamjade"] .ec-list span {
font-size: 3.85cqw;
line-height: 1.9;
overflow-wrap: anywhere;
}

.ec[data-tpl="siamjade"] .ec-list li.ec-notime {
grid-template-columns: 1fr;
text-align: center;
}

.ec[data-tpl="siamjade"] .ec-venue {
overflow-wrap: anywhere;
}

.ec[data-tpl="siamjade"] .ec-btn {
border-radius: 1cqw;
border-color: var(--ec-accent);
}

.ec[data-tpl="siamjade"] .ec-btn:first-child {
background: var(--ec-altInk);
color: var(--ec-alt);
border-color: var(--ec-altInk);
}

.ec[data-tpl="siamjade"] .ec-photo {
padding: 6cqw 8cqw;
aspect-ratio: auto;
height: 110cqw;
}

.ec[data-tpl="siamjade"] .ec-photo img {
border: .2cqw solid color-mix(in srgb, var(--ec-accent) 55%, transparent);
}

.ec[data-tpl="siamjade"] .ec-gallery {
padding: 5cqw 8cqw 10cqw;
gap: 3cqw;
}

.ec[data-tpl="siamjade"] .ec-gal-item {
border: .2cqw solid color-mix(in srgb, var(--ec-accent) 50%, transparent);
padding: 1.5cqw;
}

.ec[data-tpl="siamjade"] .ec-end {
border-top: .2cqw solid var(--ec-hairline);
padding-top: 16cqw;
}

.ec[data-tpl="siamjade"] .ec-thanks {
font-family: 'Trirong', serif;
color: var(--ec-altInk);
}

/* ==========================================================================
   ส่วนเพิ่ม 6 ธ.ค. 2569 (War-room #30 #33) · อยู่ท้ายไฟล์เพื่อให้ชนะกฎของแต่ละแบบ
   ========================================================================== */

/* #33 ฟอนต์ลายมือของชื่อบ่าวสาว · ตามข้อเสนอ agy: Charm = EC01 EC02 EC05 · Srisakdi = EC03 EC06
   EC04 และ EC07–EC09 ใช้ฟอนต์เดิม · คำว่า "และ" (.ec-names i) ใช้ Trirong ตามเดิม */
.ec[data-tpl="lamun"] .ec-names,
.ec[data-tpl="suan"] .ec-names,
.ec[data-tpl="kradat"] .ec-names { font-family: 'Charm', 'Trirong', serif; font-weight: 400; font-synthesis: none; line-height: 1.66; }
.ec[data-tpl="kammayi"] .ec-names,
.ec[data-tpl="ruankaew"] .ec-names { font-family: 'Srisakdi', 'Trirong', serif; font-weight: 400; font-synthesis: none; line-height: 1.62; }

/* #30 นับถอยหลัง (จำนวนวัน · เซิร์ฟเวอร์คิด) ใต้ปฏิทิน */
.ec-count {
  display: flex; justify-content: center; align-items: baseline; gap: 2.6cqw;
  margin-top: 8cqw; padding-top: 6.5cqw;
  border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  font-family: 'Trirong', serif; font-weight: 400; font-size: 4.4cqw; line-height: 1.6;
}
.ec-count b { font-family: var(--ec-serif); font-weight: 400; font-size: 13cqw; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.ec-count-now { font-size: 5.2cqw; }

/* #30 ผู้ประสานงาน */
.ec-people { list-style: none; display: grid; gap: 6cqw; max-width: 82cqw; margin: 0 auto; }
.ec-people li { display: grid; gap: 2.6cqw; justify-items: center; }
.ec-person:empty { display: none; }
.ec-person { font-family: 'Trirong', serif; font-weight: 400; font-size: 4.3cqw; line-height: 1.8; overflow-wrap: anywhere; }
.ec-people .ec-btn { font-variant-numeric: lining-nums tabular-nums; }
.ec[data-tpl="khaodam"] .ec-count { justify-content: flex-start; }
.ec[data-tpl="khaodam"] .ec-people { margin: 0; }
.ec[data-tpl="khaodam"] .ec-people li { justify-items: start; }
