:root{
  --bg:#f7f2eb;
  --bg-soft:#fcf9f5;
  --card:#fffdf9;
  --text:#3a2c27;
  --muted:#7c6a60;
  --gold:#b98b58;
  --gold-2:#8f653f;
  --line:#e7d7c4;
  --line-strong:#d7b995;
  --danger:#b84f4f;
  --success:#2f7a50;
  --shadow:0 14px 34px rgba(67,48,35,.08);
  --shadow-lg:0 26px 70px rgba(67,48,35,.16);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  color:var(--text);
  font-family:Inter,"Noto Sans Khmer",sans-serif;
  background:
    radial-gradient(circle at 10% 5%, rgba(185,139,88,.12), transparent 22%),
    radial-gradient(circle at 92% 0%, rgba(215,185,149,.15), transparent 18%),
    linear-gradient(180deg,#f7f1e8,#fcfaf7);
}
a{text-decoration:none;color:inherit}
img{display:block;max-width:100%}
.hidden{display:none!important}
.container{width:min(1120px,92%);margin:auto}
.narrow{width:min(560px,92%)}
.pad-y{padding:28px 0 54px}
.stack>*+*{margin-top:14px}
.stack-lg>*+*{margin-top:22px}
.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}
.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.full{grid-column:1/-1}
.span-2{grid-column:span 2}
.form-grid-gap{gap:16px 18px}
.compact-grid{align-items:end}
.header-row,.nav-row,.section-head-row,.actions,.hero-actions,.wrap-row{display:flex;align-items:center;gap:12px}
.header-row,.section-head-row{justify-content:space-between}
.wrap-row,.hero-actions{flex-wrap:wrap}
.actions-end{display:flex;align-items:end}
.center-card{text-align:center}
.top-gap{margin-top:16px}
.muted{color:var(--muted)}
.small{font-size:12px}
.inline-check{display:inline-flex;align-items:center;gap:8px;font-weight:800;color:var(--gold-2);}
.brand{font-weight:700;color:var(--gold-2)}
.site-header{
  position:sticky;top:0;z-index:20;
  background:rgba(255,251,246,.88);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.site-header .container{padding:12px 0}
.nav-row a{color:var(--muted);margin-left:8px}
.flashes{padding-top:16px}
.flash{padding:13px 16px;border-radius:16px;margin-bottom:10px;border:1px solid var(--line);background:#fff}
.flash.success{border-color:#cce8d7;background:#f4fff8;color:var(--success)}
.flash.error{border-color:#ebc2c2;background:#fff5f5;color:#8f4040}
.card{
  background:rgba(255,253,249,.96);
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:var(--shadow);
  padding:24px;
  position:relative;
}
.card h1,.card h2,.card h3{font-family:"Playfair Display","Noto Serif Khmer",serif;margin:0 0 10px}
.card h1{font-size:38px}
.card h2{font-size:30px}
.card h3{font-size:28px}

.section-title-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
.section-title-actions h1,.section-title-actions h2,.section-title-actions h3{margin-bottom:0}
.blessing-live-open-btn{min-height:42px;padding:9px 16px;white-space:nowrap}
@media (max-width:640px){
  .section-title-actions{align-items:stretch;flex-direction:column;gap:10px}
  .blessing-live-open-btn{width:100%;min-height:44px}
}
label{display:block;margin-bottom:6px;font-weight:600;color:var(--gold-2)}
input,select,textarea{
  width:100%;padding:13px 14px;border-radius:16px;
  border:1px solid var(--line-strong);background:#fff;color:var(--text);
  font:inherit;
}
textarea{min-height:110px;resize:vertical}
.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:20px}
table{width:100%;border-collapse:collapse;background:#fff}th,td{padding:14px 12px;border-bottom:1px solid var(--line);vertical-align:top;text-align:left}th{background:#fbf7f1;color:var(--gold-2);font-size:13px;text-transform:uppercase;letter-spacing:.06em}
.thumb{width:88px;height:66px;object-fit:cover;border-radius:12px}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:46px;padding:11px 18px;border-radius:999px;border:1px solid var(--gold);
  background:#fff;color:var(--gold-2);cursor:pointer;font-weight:700;font-family:Inter,"Battambang","Noto Sans Khmer",sans-serif;
  box-shadow:0 8px 18px rgba(68,48,32,.05);
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover{transform:translateY(-1px);box-shadow:var(--shadow)}
.btn.primary{background:linear-gradient(180deg,#c79864,#b98650);color:#fff;border-color:#b98650}
.btn.danger{background:#fff6f6;color:var(--danger);border-color:#e1b5b5}
.pill{
  border:1px solid var(--line-strong);background:rgba(255,252,248,.96);color:var(--gold-2);
  box-shadow:var(--shadow);border-radius:999px;padding:10px 16px;font-weight:700;cursor:pointer;font-family:Inter,"Battambang","Noto Sans Khmer",sans-serif;
}
.pill.active{background:linear-gradient(180deg,#c79864,#b98650);color:#fff;border-color:#b98650}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.stat-card{background:#fff;border:1px solid var(--line);border-radius:24px;padding:20px;box-shadow:var(--shadow)}
.stat-num{font-size:34px;font-weight:800;color:var(--gold-2);margin-bottom:6px}
.owner-shell .card{scroll-margin-top:90px}

/* Guest premium design */
.guest-page{position:relative;padding:18px 0 48px;min-height:100vh}
.guest-page.lang-km{font-family:Inter,"Battambang","Noto Sans Khmer",sans-serif}
.guest-page{
  --monogram-en-size:30px;
  --monogram-km-size:28px;
  --couple-en-size:64px;
  --couple-km-size:64px;
  --formal-intro-en-size:19px;
  --formal-intro-km-size:19px;
  --welcome-en-size:17px;
  --welcome-km-size:17px;
  --venue-en-size:24px;
  --venue-km-size:24px;
  --address-en-size:17px;
  --address-km-size:17px;
  --guest-en-size:38px;
  --guest-km-size:38px;
  --date-en-size:30px;
  --date-km-size:30px;
  --dress-en-size:17px;
  --dress-km-size:17px;
  --owner-note-en-size:16px;
  --owner-note-km-size:16px;
  --monogram-size:var(--monogram-en-size);
  --couple-size:var(--couple-en-size);
  --formal-intro-size:var(--formal-intro-en-size);
  --welcome-size:var(--welcome-en-size);
  --venue-size:var(--venue-en-size);
  --address-size:var(--address-en-size);
  --guest-name-size:var(--guest-en-size);
  --date-size:var(--date-en-size);
  --dress-size:var(--dress-en-size);
  --owner-note-size:var(--owner-note-en-size);
}
.guest-page.lang-km{
  --monogram-size:var(--monogram-km-size);
  --couple-size:var(--couple-km-size);
  --formal-intro-size:var(--formal-intro-km-size);
  --welcome-size:var(--welcome-km-size);
  --venue-size:var(--venue-km-size);
  --address-size:var(--address-km-size);
  --guest-name-size:var(--guest-km-size);
  --date-size:var(--date-km-size);
  --dress-size:var(--dress-km-size);
  --owner-note-size:var(--owner-note-km-size);
}
.floating-controls{position:fixed;right:18px;bottom:18px;z-index:40;display:flex;flex-direction:column;gap:10px;align-items:flex-end}
.premium-intro-wrap,.guest-main{position:relative}
.premium-intro-wrap{padding-top:8px;--text-scale:var(--intro-scale,1)}
.guest-main{--text-scale:var(--main-scale,1)}
.premium-shell .card{overflow:hidden}
.gold-border-animated:before{
  content:"";position:absolute;inset:0;padding:1px;border-radius:inherit;
  background:linear-gradient(120deg, rgba(185,139,88,.14), rgba(215,185,149,.9), rgba(185,139,88,.2));
  -webkit-mask:linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;
  animation:borderFlow 4.2s linear infinite;
  pointer-events:none;
}
@keyframes borderFlow{0%{filter:hue-rotate(0deg)}100%{filter:hue-rotate(25deg)}}
.premium-floral{position:absolute;width:160px;height:160px;pointer-events:none;opacity:.8;background:radial-gradient(circle at 35% 35%, rgba(255,255,255,.9) 0 12%, rgba(232,199,163,.65) 13% 28%, rgba(185,139,88,.12) 29% 58%, transparent 59%)}
.floral-tl{top:-14px;left:-14px}.floral-tr{top:-14px;right:-14px}.floral-bl{bottom:-14px;left:-14px}.floral-br{bottom:-14px;right:-14px}
.guest-hero>.floral-tl{display:none}
.envelope-card{position:relative;max-width:980px;margin:0 auto;padding:36px 0 120px}
.monogram-mark{position:absolute;top:6px;left:50%;transform:translateX(-50%);z-index:4}
.monogram-mark img,.hero-logo-img{width:72px;height:72px;object-fit:contain;filter:drop-shadow(0 8px 20px rgba(0,0,0,.12));margin-inline:auto}
.monogram-mark span,.hero-logo-circle{display:grid;place-items:center;width:72px;height:72px;border-radius:50%;background:#fff8ef;border:2px solid rgba(185,139,88,.45);box-shadow:var(--shadow);font-family:"Playfair Display","Noto Serif Khmer",serif;color:var(--gold-2);font-size:clamp(24px,2.2vw,var(--monogram-size));font-weight:700;margin-inline:auto}
.premium-envelope-card{min-height:660px}
.premium-paper{position:relative;z-index:2;max-width:930px;margin:36px auto 0;background:linear-gradient(180deg,#fffefc,#fffaf5);padding:60px 56px 34px;border-radius:34px;box-shadow:var(--shadow-lg)}
.premium-paper.open{transform:translateY(-18px);transition:transform .7s ease}
.premium-envelope-bottom{position:absolute;left:50%;bottom:66px;transform:translateX(-50%);width:min(760px,78%);height:144px;background:linear-gradient(180deg,#e7c9a6,#dcbb95);border-radius:0 0 34px 34px;box-shadow:var(--shadow);z-index:1}
.small-kicker{text-align:center;color:var(--gold-2);font-size:13px;letter-spacing:.18em;text-transform:uppercase;font-weight:700;margin-bottom:12px}
.premium-couple{font-family:"Playfair Display","Noto Serif Khmer",serif;font-weight:700;text-align:center;color:var(--text);max-width:100%;margin:0 auto 10px;position:relative;text-wrap:normal;padding-inline:10px}
.has-split-name{display:grid;grid-template-columns:minmax(0,max-content) auto minmax(0,max-content);align-items:baseline;justify-content:center;justify-items:center;column-gap:.12em;row-gap:0;width:auto;max-width:100%;margin-inline:auto}
.couple-part{min-width:0;display:block}.couple-part .name-line{display:block}.couple-groom{text-align:right}.couple-bride{text-align:left}.couple-sep{display:flex;align-items:center;justify-content:center;line-height:1;padding-inline:.04em;text-align:center}
.name-layout-single .premium-couple{font-size:clamp(30px,4vw,calc(var(--couple-size) * var(--text-scale,1)));line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:clip;text-wrap:normal}
.name-layout-balanced .premium-couple{font-size:clamp(30px,3.8vw,calc((var(--couple-size) - 4px) * var(--text-scale,1)));line-height:1.16;max-width:760px}
.premium-parents{text-align:center;white-space:pre-line;font-size:15px;line-height:1.85;max-width:760px;margin:0 auto 10px}
.premium-intro-text{max-width:760px;margin:0 auto 14px;text-align:center;font-size:clamp(14px,1.7vw,calc(var(--formal-intro-size) * var(--text-scale,1)));line-height:1.85}
.premium-guest-box{max-width:520px;margin:0 auto 14px;background:#fff;border:1px dashed #d1ab80;border-radius:24px;padding:16px 18px;text-align:center}
.guest-display{display:block;margin-top:6px;font-size:clamp(20px,2.6vw,calc(var(--guest-name-size) * var(--text-scale,1)));line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:clip;padding-inline:4px}
.premium-date{text-align:center;font-weight:800;color:var(--gold-2);font-size:clamp(20px,2.6vw,calc(var(--date-size) * var(--text-scale,1)));line-height:1.26;margin-top:6px}
.premium-venue{text-align:center;color:var(--text);font-size:clamp(16px,1.9vw,calc(var(--venue-size) * var(--text-scale,1)));line-height:1.5;margin-top:6px}
.envelope-open{position:absolute;left:50%;bottom:30px;transform:translateX(-50%);min-width:290px;z-index:4}
.lang-km .premium-couple{line-height:1.22;padding-block:.10em .16em;font-family:"Noto Serif Khmer","Playfair Display",serif}
.lang-km .name-layout-single .premium-couple{white-space:nowrap;overflow:hidden;text-overflow:clip;text-wrap:normal}
.lang-km .premium-intro-text{line-height:1.95}
.lang-km .guest-display{line-height:1.56;padding-block:.14em .22em;overflow:visible}
.lang-km .premium-date{line-height:1.42;padding-block:.06em 0}
.lang-km .premium-venue{line-height:1.6;padding-block:.04em 0}
.kh-better-btn{font-family:"Battambang","Noto Sans Khmer",Inter,sans-serif;font-size:calc(22px * var(--text-scale,1));letter-spacing:.01em;padding:calc(16px * var(--text-scale,1)) calc(28px * var(--text-scale,1));line-height:1.35}
.pulse-btn{animation:softPulse 1.7s ease-in-out infinite}
@keyframes softPulse{0%,100%{transform:translateX(-50%) scale(1)}50%{transform:translateX(-50%) scale(1.04);box-shadow:0 0 0 12px rgba(185,139,88,.08)}}
.guest-main{padding-top:12px}
.guest-flashes{margin-bottom:18px}
.guest-hero{padding:0;position:relative;overflow:visible}
.premium-hero-card{padding:0;position:relative}
/* Opened Invitation hero image: desktop/laptop uses the v16 smart-fit style.
   The real banner is shown without distortion, with a soft blurred background
   filling any empty space. This looks better than stretching the photo. */
.premium-cover{--cover-height:clamp(420px,30vw,520px);height:var(--cover-height);background-size:cover;background-position:center;background-repeat:no-repeat;position:relative;overflow:hidden;border-top-left-radius:inherit;border-top-right-radius:inherit}
.premium-cover:before{content:"";position:absolute;inset:-22px;background-image:var(--hero-image);background-size:cover;background-position:center;filter:blur(16px);transform:scale(1.06);opacity:.42;z-index:0}
.premium-cover-fit{position:absolute;inset:0;background-image:var(--hero-image);background-size:contain;background-repeat:no-repeat;background-position:center;z-index:1}
.premium-cover:after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(59,44,39,.04),rgba(59,44,39,.24));border-top-left-radius:inherit;border-top-right-radius:inherit;z-index:2;pointer-events:none}
@media (max-width: 760px){
  .premium-cover{--cover-height:250px;background-size:cover;background-position:center}
  .premium-cover:before,.premium-cover-fit{display:none}
  .premium-cover:after{background:linear-gradient(180deg,rgba(59,44,39,.12),rgba(59,44,39,.42))}
}
.premium-hero-pad{padding:0 28px 28px;position:relative;text-align:center}
.hero-monogram-row{display:flex;justify-content:center;align-items:center;width:100%;margin-top:-36px;margin-bottom:12px;position:relative;z-index:30;pointer-events:none}
.hero-logo-wrap{display:flex;justify-content:center;align-items:center;width:72px;height:72px;min-width:72px;margin:0 auto;pointer-events:none;transform:none}
.hero-logo-wrap img,.hero-logo-wrap .hero-logo-circle{display:grid;place-items:center;margin:0 auto;flex:0 0 auto;width:72px;height:72px}
.hero-couple-single{max-width:920px}

.hero-actions{justify-content:center;margin-top:16px;row-gap:12px}
.home-pill{min-width:110px}
.hero-actions .btn{min-height:50px}
.guest-main.hidden + .floating-controls .home-pill{display:none!important}

.top-gallery-card,.premium-couple-portraits,.premium-detail-card{scroll-margin-top:24px}
.gallery-slider{position:relative;overflow:hidden;border-radius:28px;background:#f3eadf}
.slides-track{display:flex;transition:transform .55s ease}
.slide-item{min-width:100%;position:relative}
.slide-item img{width:100%;height:560px;object-fit:cover;cursor:pointer}
.slide-caption{position:absolute;left:18px;right:18px;bottom:18px;background:rgba(255,252,247,.92);padding:12px 16px;border-radius:16px;color:var(--gold-2);font-weight:600;box-shadow:var(--shadow)}
.gallery-slider .nav{position:absolute;top:50%;transform:translateY(-50%);z-index:3;width:48px;height:48px;border-radius:50%;border:1px solid rgba(255,255,255,.8);background:rgba(255,255,255,.88);box-shadow:var(--shadow);font-size:24px;font-weight:800;color:var(--gold-2);cursor:pointer}
.gallery-slider .prev{left:14px}.gallery-slider .next{right:14px}
.thumbs{display:flex;gap:12px;overflow:auto;margin-top:16px;padding-bottom:4px}
.thumb-btn{width:114px;height:82px;object-fit:cover;border-radius:16px;border:3px solid transparent;cursor:pointer;flex:0 0 auto;box-shadow:var(--shadow)}
.thumb-btn.active{border-color:var(--gold)}
.portrait-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.portrait-card{background:#fff;border:1px solid var(--line);border-radius:24px;overflow:hidden;box-shadow:var(--shadow)}
.portrait-photo{height:380px;background-size:cover;background-position:center}
.portrait-name{text-align:center;padding:18px 16px;font-family:"Playfair Display","Noto Serif Khmer",serif;font-size:28px;color:var(--gold-2)}
.label{font-size:12px;letter-spacing:.12em;text-transform:uppercase;font-weight:700;color:var(--gold-2);margin-bottom:6px}
.value{font-size:17px;line-height:1.9;margin-bottom:14px}
.countdown{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:20px}
.countdown > div{background:#fff;border:1px solid var(--line);border-radius:18px;padding:16px 10px;text-align:center}
.countdown span{display:block;font-size:34px;font-weight:800;color:var(--gold-2)}
.countdown small{display:block;margin-top:4px;color:var(--muted)}
.qr-wrap{display:flex;justify-content:center;margin:16px 0}.qr-image{width:210px;height:210px;border-radius:18px;border:1px solid var(--line);background:#fff;padding:10px}
.schedule-row{display:grid;grid-template-columns:148px 42px 1fr;gap:12px;padding:12px 0;border-top:1px solid var(--line);align-items:start}
.schedule-row:first-child{border-top:none;padding-top:0}
.schedule-time{font-weight:800;color:var(--gold-2)}
.schedule-icon-col{display:flex;align-items:center;justify-content:center;padding-top:2px}
.schedule-icon{width:28px;height:28px;object-fit:contain;border-radius:8px}
.schedule-icon-placeholder{display:block;width:28px;height:28px;opacity:0}
.schedule-detail strong{display:block}
.owner-edit-list{display:grid;gap:16px}
.owner-edit-card{box-shadow:none}
.owner-edit-head{margin-bottom:12px}
.small-thumb{width:42px;height:42px;object-fit:contain;border-radius:10px;border:1px solid var(--line)}
.owner-inline-preview{min-height:46px}
.blessing-wall{display:grid;gap:12px;max-height:560px;overflow:auto;padding-right:4px;scrollbar-width:none;-ms-overflow-style:none}
.blessing-wall::-webkit-scrollbar{display:none}
.blessing-post{display:grid;grid-template-columns:128px minmax(0,1fr);gap:14px;padding:14px 16px;border:1px solid var(--line);border-radius:20px;background:#fff;align-items:start}
.blessing-post-text-only{grid-template-columns:1fr;padding:14px 16px}
.blessing-photo{width:128px;height:128px;object-fit:cover;border-radius:16px;cursor:pointer}.blessing-video{background:#000;cursor:auto}
.blessing-body{min-width:0;max-width:100%}
.blessing-name{font-weight:800;color:var(--gold-2);margin-bottom:5px;line-height:1.45;text-align:left}
.blessing-message{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.45em;align-items:start;line-height:1.65;white-space:pre-wrap;margin-bottom:8px;text-align:left;word-break:normal;overflow-wrap:anywhere;text-wrap:pretty}.blessing-emoji{display:inline-grid;place-items:center;width:1.8em;height:1.8em;border-radius:999px;background:rgba(185,133,73,.10);font-size:.95em;line-height:1}.blessing-text{min-width:0}.guest-page.lang-km .blessing-message{line-height:1.7;text-align:left;max-width:100%;overflow-wrap:break-word}.blessing-time{font-size:11px;color:var(--muted);text-align:left}
@media (min-width:981px){.blessing-wall{max-height:none;overflow:visible}.blessing-wall .blessing-message{font-size:clamp(12px,.85vw,14px)!important;line-height:1.65}.blessing-wall .blessing-name{font-size:clamp(12px,.9vw,14px)!important}.blessing-wall .blessing-time{font-size:11px!important}.blessing-wall .blessing-post{box-shadow:none}}
.lightbox{position:fixed;inset:0;background:rgba(15,10,8,.78);display:grid;place-items:center;padding:24px;z-index:60}
.lightbox img{max-width:min(96vw,1000px);max-height:88vh;border-radius:20px;box-shadow:var(--shadow-lg)}
.lightbox-close{position:absolute;top:20px;right:20px;width:52px;height:52px;border-radius:50%;border:none;background:#fff;color:var(--gold-2);font-size:34px;cursor:pointer}

@media (max-width: 980px){
  .grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
  .premium-paper{padding:58px 28px 32px}
  .name-layout-single .premium-couple{white-space:nowrap;overflow:hidden;text-overflow:clip}
  .slide-item img{height:460px}
}
@media (max-width: 760px){
  .grid-2,.grid-4,.stats-grid,.portrait-grid{grid-template-columns:1fr}
  .span-2{grid-column:auto}
  .premium-paper{padding:64px 18px 34px;border-radius:28px}
  .premium-envelope-card{min-height:580px}
  .premium-envelope-bottom{width:86%;height:118px}
  .kh-better-btn{font-size:20px;min-width:250px}
  .floating-controls{right:12px;bottom:12px}
  .premium-cover{--cover-height:250px;height:var(--cover-height)}
  .hero-monogram-row{margin-top:-31px;}
  .hero-logo-wrap{width:62px;height:62px;min-width:62px}
  .hero-logo-img,.hero-logo-circle,.hero-logo-wrap img,.hero-logo-wrap .hero-logo-circle,.monogram-mark img,.monogram-mark span{width:62px;height:62px}
  .slide-item img{height:300px}
  .countdown{grid-template-columns:repeat(2,minmax(0,1fr))}
  .schedule-row{grid-template-columns:92px 30px 1fr}
  .blessing-post,.blessing-post-text-only{grid-template-columns:1fr;padding:14px}
  .blessing-photo{width:100%;height:220px}
  .envelope-open{min-width:240px;bottom:24px}
}

.inline-block{display:inline-block}
.owner-shell{padding-bottom:20px}
.reveal{opacity:0;transform:translateY(28px);transition:opacity .7s ease, transform .7s ease}
.reveal.visible{opacity:1;transform:none}


@media (min-width: 1281px){
  .container{width:min(1280px, calc(100% - 48px));}
  .premium-paper{max-width:980px;}
}

@media (max-width: 1180px){
  .container{width:min(100%, calc(100% - 28px));}
  .premium-paper{max-width:calc(100vw - 42px);padding:70px 40px 40px;}
  .premium-envelope-bottom{width:min(720px,82%);}
  .hero-actions .btn{padding-inline:14px;font-size:15px;}
}

@media (max-width: 900px){
  .premium-couple{padding-inline:6px;}
  .name-layout-single .premium-couple{white-space:nowrap;overflow:hidden;text-overflow:clip;}
  .premium-intro-wrap{padding-top:8px;}
  .premium-envelope-card{min-height:620px;}
  .premium-paper{padding:56px 24px 28px;}
  .premium-date{font-size:clamp(22px,4.3vw,34px);}
  .premium-venue{font-size:clamp(15px,2.8vw,22px);}
  .actions.hero-actions{gap:10px;}
  .gallery-slider .nav{width:42px;height:42px;}
}

@media (max-width: 640px){
  .container{width:calc(100% - 20px);}
  .floating-controls{right:10px;bottom:10px;gap:8px;}
  .floating-controls .pill{padding:10px 14px;font-size:14px;}
  .premium-paper{max-width:calc(100vw - 20px);padding:60px 14px 30px;border-radius:24px;}
  .premium-envelope-card{min-height:540px;padding-bottom:96px;}
  .premium-envelope-bottom{width:90%;height:98px;bottom:68px;}
  .premium-guest-box{padding:14px 12px;border-radius:20px;}
  .name-layout-single .premium-couple,.name-layout-balanced .premium-couple{width:100%;max-width:100%;font-size:clamp(22px,6.1vw,29px);line-height:1.15;white-space:normal;overflow:visible;text-overflow:unset;text-wrap:unset;}
  .lang-km .name-layout-single .premium-couple,.lang-km .name-layout-balanced .premium-couple{font-size:clamp(23px,6.2vw,30px);line-height:1.18;}
  .lang-en .name-layout-single .premium-couple,.lang-en .name-layout-balanced .premium-couple{font-size:clamp(21px,5.8vw,27px);line-height:1.08;}
  .has-split-name{display:grid;grid-template-columns:minmax(0,1fr) minmax(1.12em,1.28em) minmax(0,1fr);align-items:start;justify-items:stretch;column-gap:0;row-gap:0;width:100%;max-width:100%;margin-inline:auto;}
  .has-split-name .couple-groom,.has-split-name .couple-bride{display:flex;flex-direction:column;gap:0;width:100%;max-width:100%;min-width:0;overflow:hidden;}
  .has-split-name .couple-groom{text-align:right;align-items:flex-end;padding-right:.14em;}
  .has-split-name .couple-bride{text-align:left;align-items:flex-start;padding-left:.14em;}
  .has-split-name .couple-sep{display:flex;align-items:center;justify-content:center;width:100%;min-width:0;padding:0;margin:0;line-height:1;text-align:center;justify-self:center;align-self:center;transform:none;}
  .has-split-name .couple-part{max-width:100%;min-width:0;overflow-wrap:normal;word-break:keep-all;white-space:normal;}
  .lang-en .has-split-name .couple-groom.two-row .name-line,.lang-en .has-split-name .couple-bride.two-row .name-line{line-height:1.02;}
  .lang-km .has-split-name .couple-groom .name-line,.lang-km .has-split-name .couple-bride .name-line{line-height:1.14;}
  .lang-km .guest-display{font-size:clamp(18px,5.2vw,24px);}
  .lang-en .guest-display{font-size:clamp(18px,5vw,23px);}
  .guest-display{font-size:clamp(20px,6vw,30px);}
  .premium-date{font-size:clamp(18px,6.3vw,30px);}
  .premium-venue{font-size:clamp(14px,4.3vw,20px);}
  .kh-better-btn{font-size:18px;line-height:1.45;padding:16px 20px;min-width:220px;}
  .hero-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
  .hero-actions .btn,.hero-actions a{width:100%;justify-content:center;text-align:center;}
  .top-gallery-card,.premium-couple-portraits,.premium-detail-card,.guest-hero{border-radius:22px;}
}


@media (max-width: 640px){
  .lang-en .invitation-letter .has-split-name .couple-groom,
  .lang-en .invitation-letter .has-split-name .couple-bride{
    text-align:center;
    align-items:center;
    justify-content:center;
    padding-left:0;
    padding-right:0;
  }
  .lang-en .invitation-letter .has-split-name .couple-part .name-line{
    width:100%;
    text-align:center;
  }
  .lang-km .invitation-letter .premium-couple{
    line-height:1.3;
    padding-block:.18em .28em;
  }
  .lang-km .invitation-letter .has-split-name .couple-groom .name-line,
  .lang-km .invitation-letter .has-split-name .couple-bride .name-line{
    line-height:1.24;
    padding-block:.08em .12em;
  }
}

@media (max-width: 420px){
  .lang-km .invitation-letter .premium-couple{
    line-height:1.32;
    padding-block:.2em .3em;
  }
  .lang-km .invitation-letter .has-split-name .couple-groom .name-line,
  .lang-km .invitation-letter .has-split-name .couple-bride .name-line{
    line-height:1.26;
    padding-block:.1em .12em;
  }
}

@media (max-width: 420px){
  .small-kicker{font-size:11px;letter-spacing:.12em;}
  .premium-cover{--cover-height:210px;height:var(--cover-height);}
  .hero-monogram-row{margin-top:-27px;}
  .hero-logo-wrap{width:54px;height:54px;min-width:54px;}
  .hero-logo-img,.hero-logo-circle,.hero-logo-wrap img,.hero-logo-wrap .hero-logo-circle,.monogram-mark img,.monogram-mark span{width:54px;height:54px;font-size:24px;}
  .name-layout-single .premium-couple,.name-layout-balanced .premium-couple{font-size:clamp(20px,5.8vw,25px);line-height:1.12;}
  .lang-km .name-layout-single .premium-couple,.lang-km .name-layout-balanced .premium-couple{font-size:clamp(22px,5.9vw,26px);line-height:1.16;}
  .lang-en .name-layout-single .premium-couple,.lang-en .name-layout-balanced .premium-couple{font-size:clamp(19px,5.2vw,23px);line-height:1.04;}
  .has-split-name{grid-template-columns:minmax(0,1fr) minmax(1.02em,1.12em) minmax(0,1fr);}
  .has-split-name .couple-groom{padding-right:.1em;}
  .has-split-name .couple-bride{padding-left:.1em;}
  .lang-km .guest-display{font-size:clamp(17px,4.9vw,22px);}
  .lang-en .guest-display{font-size:clamp(17px,4.7vw,21px);}
  .hero-actions{grid-template-columns:1fr;}
  .premium-intro-text{line-height:1.75;}
  .thumb-btn{width:88px;height:68px;}
}

@media (max-height: 820px) and (min-width: 900px){
  .premium-envelope-card{min-height:620px;padding-bottom:96px;}
  .premium-paper{padding:54px 48px 28px;margin-top:24px;}
  .premium-envelope-bottom{height:120px;bottom:62px;}
  .envelope-open{bottom:24px;}
}



.qr-guest-name{margin-top:10px;text-align:center;font-weight:700;color:var(--accent-700, #7b5b3f);line-height:1.5;}


.formal-intro-single{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.formal-intro-multi{white-space:normal}
.lang-sized-venue{font-size:clamp(16px,1.7vw,var(--venue-size));line-height:1.75}
.lang-sized-address{font-size:clamp(14px,1.5vw,var(--address-size));line-height:1.8}
.lang-sized-welcome{font-size:clamp(14px,1.5vw,var(--welcome-size));line-height:1.8}

.lang-km .btn,.lang-km .pill,.lang-km label,.lang-km h1,.lang-km h2,.lang-km h3,.lang-km .muted,.lang-km .value,.lang-km .schedule-time,.lang-km .small-kicker{line-height:1.55;}
.lang-km .btn,.lang-km .pill{padding-top:calc(12px + .08em);padding-bottom:calc(12px + .12em);}
.lang-km .premium-guest-box,.lang-km .guest{overflow:visible;}

.lang-sized-dress{font-size:clamp(14px,1.5vw,var(--dress-size));line-height:1.8}
.lang-sized-owner-note{font-size:clamp(13px,1.4vw,var(--owner-note-size));line-height:1.85;white-space:pre-line}

.setting-with-size{display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:12px;align-items:end}
.setting-main{min-width:0}
.setting-size input{min-width:0;text-align:center}
.setting-side-stack{display:grid;gap:12px}
.setting-block.full.setting-with-size{grid-template-columns:minmax(0,1fr) 110px}
.setting-block.full .setting-side-stack{grid-template-columns:110px;align-content:start}

@media (max-width: 860px){
  .setting-with-size,
  .setting-block.full.setting-with-size{grid-template-columns:1fr}
  .setting-size input{max-width:160px}
  .formal-intro-single{white-space:normal;overflow:visible;text-overflow:clip}
}

@media (max-width:560px){
  .schedule-row{grid-template-columns:84px 26px 1fr;gap:10px}
  .schedule-icon{width:22px;height:22px}
}


/* Opened invitation page mobile tuning */
@media (max-width: 640px){
  .lang-en .guest-hero .has-split-name .couple-groom,
  .lang-en .guest-hero .has-split-name .couple-bride{
    text-align:center;
    align-items:center;
    justify-content:center;
    padding-left:0;
    padding-right:0;
  }
  .lang-en .guest-hero .has-split-name .couple-part .name-line{
    width:100%;
    text-align:center;
  }

  .lang-km .guest-hero .premium-couple{
    line-height:1.30;
    padding-block:.18em .30em;
  }
  .lang-km .guest-hero .has-split-name .couple-groom .name-line,
  .lang-km .guest-hero .has-split-name .couple-bride .name-line{
    white-space:nowrap;
    line-height:1.26;
    padding-block:.10em .16em;
  }
}

@media (max-width: 420px){
  .lang-en .guest-hero .has-split-name .couple-groom,
  .lang-en .guest-hero .has-split-name .couple-bride{
    text-align:center;
    align-items:center;
    justify-content:center;
    padding-left:0;
    padding-right:0;
  }
  .lang-en .guest-hero .has-split-name .couple-part .name-line{
    width:100%;
    text-align:center;
  }

  .lang-km .guest-hero .premium-couple{
    line-height:1.32;
    padding-block:.20em .32em;
  }
  .lang-km .guest-hero .has-split-name .couple-groom .name-line,
  .lang-km .guest-hero .has-split-name .couple-bride .name-line{
    white-space:nowrap;
    line-height:1.28;
    padding-block:.12em .18em;
  }
}


/* Opened page only - Khmer couple name a little smaller */
@media (max-width: 640px){
  .guest-page.lang-km .guest-hero .hero-couple-single{
    font-size: clamp(19px, 5.2vw, var(--opened-couple-km-mobile-size, 24px)) !important;
    line-height: 1.34 !important;
    padding-block: .16em .24em !important;
  }
}

@media (max-width: 420px){
  .guest-page.lang-km .guest-hero .hero-couple-single{
    font-size: clamp(17px, 4.8vw, var(--opened-couple-km-mobile-size, 21px)) !important;
    line-height: 1.36 !important;
    padding-block: .18em .26em !important;
  }
}

@media (max-width: 640px){
  .guest-page.lang-km .guest-hero .guest-display{
    font-size:clamp(18px,5.2vw,var(--opened-guest-km-mobile-size, 24px)) !important;
    line-height:1.62 !important;
    overflow:visible !important;
  }
}

@media (max-width: 420px){
  .guest-page.lang-km .guest-hero .guest-display{
    font-size:clamp(17px,4.8vw,var(--opened-guest-km-mobile-size, 21px)) !important;
    line-height:1.66 !important;
    overflow:visible !important;
  }
}

/* Mobile tuning: smaller date, Khmer guest name with Khmer OS Muol Light if available */
@media (max-width: 640px){
  .premium-date{
    font-size:clamp(16px,5.2vw,26px) !important;
    line-height:1.28 !important;
  }

  .lang-km .guest-display{
    font-family:"Khmer OS Muol Light","Khmer OS Muol","Noto Serif Khmer","Battambang",serif !important;
    font-size:clamp(20px,5.8vw,26px) !important;
    line-height:1.68 !important;
    letter-spacing:.01em;
  }
}

@media (max-width: 420px){
  .premium-date{
    font-size:clamp(15px,4.9vw,23px) !important;
    line-height:1.3 !important;
  }

  .lang-km .guest-display{
    font-family:"Khmer OS Muol Light","Khmer OS Muol","Noto Serif Khmer","Battambang",serif !important;
    font-size:clamp(18px,5.2vw,23px) !important;
    line-height:1.72 !important;
    letter-spacing:.01em;
  }
}

/* Owner dashboard tabs */
.owner-tabs,.owner-subtabs{display:flex;gap:10px;flex-wrap:wrap;position:sticky;top:62px;z-index:8;background:rgba(247,242,235,.92);backdrop-filter:blur(10px);padding:10px;border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}
.owner-subtabs{position:relative;top:auto;z-index:1;background:#fffaf4;box-shadow:none}
.owner-tab-btn,.owner-subtab-btn{border:1px solid var(--line-strong);background:#fff;color:var(--gold-2);border-radius:999px;padding:11px 16px;font-weight:800;cursor:pointer;font-family:Inter,"Battambang","Noto Sans Khmer",sans-serif}
.owner-tab-btn.active,.owner-subtab-btn.active{background:linear-gradient(180deg,#c79864,#b98650);border-color:#b98650;color:#fff;box-shadow:0 10px 20px rgba(137,92,49,.12)}
.owner-tab-panel,.owner-subtab-panel{display:none}
.owner-tab-panel.active,.owner-subtab-panel.active{display:block}
.owner-settings-form .owner-subtab-panel{animation:softFade .18s ease}
@keyframes softFade{from{opacity:.55;transform:translateY(3px)}to{opacity:1;transform:none}}
.owner-edit-list{display:grid;gap:16px}
.owner-edit-card,.subtle-card{background:#fffaf4;border-color:#ecdcc9}
.owner-edit-head{margin-bottom:12px}
.small-thumb{width:44px;height:44px;object-fit:contain;background:#fff}
.owner-mini-photo-card{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end;padding:12px;border:1px solid var(--line);border-radius:18px;background:#fff}
.owner-mini-photo-form{display:grid;grid-template-columns:80px 90px minmax(150px,1fr) minmax(120px,1fr) minmax(120px,1fr) minmax(120px,1fr) auto;gap:10px;align-items:end}
.owner-mini-photo-form .thumb{align-self:center}
@media (max-width:1100px){.owner-mini-photo-card,.owner-mini-photo-form{grid-template-columns:1fr}.owner-mini-photo-form .thumb{width:120px;height:90px}}
@media (max-width:760px){.owner-tabs{top:0}.owner-tab-btn,.owner-subtab-btn{font-size:13px;padding:9px 12px}.span-2{grid-column:1/-1}.owner-shell .card{padding:18px}.table-wrap table{min-width:760px}}

/* Configurable name typography and responsive name layout */
.guest-page{
  --couple-en-font:"Playfair Display","Noto Serif Khmer",serif;
  --couple-km-font:"Khmer OS Muol Light","Noto Serif Khmer","Battambang",serif;
  --guest-en-font:"Playfair Display","Noto Serif Khmer",serif;
  --guest-km-font:"Khmer OS Muol Light","Khmer OS Muol","Noto Serif Khmer","Battambang",serif;
  --date-en-font:"Playfair Display","Noto Serif Khmer",serif;
  --date-km-font:"Khmer OS Muol Light","Noto Serif Khmer","Battambang",serif;
  --couple-font-family:var(--couple-en-font);
  --guest-font-family:var(--guest-en-font);
  --date-font-family:var(--date-en-font);
  --couple-mobile-size:var(--couple-en-mobile-size,30px);
  --guest-mobile-size:var(--guest-en-mobile-size,24px);
  --date-mobile-size:var(--date-en-mobile-size,30px);
}
.guest-page.lang-km{
  --couple-font-family:var(--couple-km-font);
  --guest-font-family:var(--guest-km-font);
  --date-font-family:var(--date-km-font);
  --couple-mobile-size:var(--couple-km-mobile-size,30px);
  --guest-mobile-size:var(--guest-km-mobile-size,26px);
  --date-mobile-size:var(--date-km-mobile-size,30px);
}
.premium-couple,.portrait-name{font-family:var(--couple-font-family) !important}
.guest-display{font-family:var(--guest-font-family) !important}
.premium-date{font-family:var(--date-font-family) !important}
.has-split-name.couple-layout-dual{display:flex !important;flex-direction:column;gap:.06em;align-items:center;justify-content:center;white-space:normal !important;overflow:visible !important;text-align:center}
.has-split-name.couple-layout-dual .couple-groom,.has-split-name.couple-layout-dual .couple-bride{width:100%;text-align:inherit !important;align-items:inherit !important;justify-content:center !important;padding-left:0 !important;padding-right:0 !important;overflow:visible !important}
.has-split-name.couple-layout-dual .couple-sep{width:auto !important;line-height:1 !important;padding:0 !important;align-self:inherit !important}
.name-align-desktop-left .premium-couple,.name-align-desktop-left .guest-box,.name-align-desktop-left .guest-display{text-align:left !important}
.name-align-desktop-center .premium-couple,.name-align-desktop-center .guest-box,.name-align-desktop-center .guest-display{text-align:center !important}
.name-align-desktop-right .premium-couple,.name-align-desktop-right .guest-box,.name-align-desktop-right .guest-display{text-align:right !important}
.name-align-desktop-left .has-split-name.couple-layout-dual{align-items:flex-start}
.name-align-desktop-center .has-split-name.couple-layout-dual{align-items:center}
.name-align-desktop-right .has-split-name.couple-layout-dual{align-items:flex-end}
@media (max-width:640px){
  .guest-page .premium-couple{font-size:clamp(16px,6.2vw,var(--couple-mobile-size)) !important;line-height:1.25 !important;white-space:normal !important;overflow:visible !important;text-overflow:unset !important}
  .guest-page .guest-display{font-family:var(--guest-font-family) !important;font-size:clamp(14px,5.8vw,var(--guest-mobile-size)) !important;line-height:1.62 !important;white-space:normal !important;overflow:visible !important;text-overflow:unset !important}
  .guest-page.lang-km .guest-hero .hero-couple-single{font-size:clamp(16px,5.8vw,var(--couple-mobile-size)) !important;line-height:1.34 !important}
  .guest-page.lang-km .guest-hero .guest-display{font-size:clamp(14px,5.8vw,var(--guest-mobile-size)) !important;line-height:1.68 !important}
  .name-align-mobile-left .premium-couple,.name-align-mobile-left .guest-box,.name-align-mobile-left .guest-display{text-align:left !important}
  .name-align-mobile-center .premium-couple,.name-align-mobile-center .guest-box,.name-align-mobile-center .guest-display{text-align:center !important}
  .name-align-mobile-right .premium-couple,.name-align-mobile-right .guest-box,.name-align-mobile-right .guest-display{text-align:right !important}
  .name-align-mobile-left .has-split-name.couple-layout-dual{align-items:flex-start}
  .name-align-mobile-center .has-split-name.couple-layout-dual{align-items:center}
  .name-align-mobile-right .has-split-name.couple-layout-dual{align-items:flex-end}
}

/* Couple portrait sliders */
.gallery-widget{width:100%}
.portrait-slider{height:380px;border-radius:0;background:#f3eadf}
.portrait-slider .slide-item img{height:380px;object-fit:cover}
.portrait-widget .gallery-slider .nav{width:40px;height:40px;font-size:20px}
.compact-thumbs{padding:10px;gap:8px;justify-content:center;background:#fffaf4}
.compact-thumbs .thumb-btn{width:58px;height:46px;border-radius:10px}
@media (max-width:760px){.portrait-slider,.portrait-slider .slide-item img{height:300px}}


/* v3: language-specific couple name rows. Dual row keeps 3 columns; only Groom/Bride columns split into 2 text lines. */
.has-split-name,
.has-split-name.couple-layout-dual{
  display:grid !important;
  grid-template-columns:minmax(0,1fr) minmax(2.8em,auto) minmax(0,1fr) !important;
  align-items:center !important;
  justify-content:center !important;
  justify-items:center !important;
  column-gap:.22em !important;
  row-gap:0 !important;
  width:min(100%, 900px) !important;
  margin-inline:auto !important;
  white-space:normal !important;
  overflow:visible !important;
  text-align:center !important;
}
.has-split-name .couple-groom,
.has-split-name .couple-bride,
.has-split-name.couple-layout-dual .couple-groom,
.has-split-name.couple-layout-dual .couple-bride{
  width:100% !important;
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  padding-left:0 !important;
  padding-right:0 !important;
  min-width:0 !important;
  overflow:visible !important;
}
.has-split-name .couple-part .name-line,
.has-split-name.couple-layout-dual .couple-part .name-line{
  display:block !important;
  max-width:100% !important;
  white-space:normal !important;
  overflow-wrap:normal !important;
  word-break:keep-all !important;
  line-height:1.08 !important;
}
.lang-km .has-split-name .couple-part .name-line{
  line-height:1.16 !important;
}
.has-split-name .couple-sep,
.has-split-name.couple-layout-dual .couple-sep{
  grid-column:2 !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  align-self:center !important;
  justify-self:center !important;
  width:auto !important;
  min-width:2.4em !important;
  padding:0 .08em !important;
  margin:0 !important;
  text-align:center !important;
  white-space:nowrap !important;
  line-height:1.1 !important;
  font-size:.34em !important;
  font-weight:600 !important;
  letter-spacing:0 !important;
  color:var(--gold-2) !important;
}
.lang-km .has-split-name .couple-sep{
  font-family:var(--couple-km-font) !important;
  font-size:.36em !important;
}
.has-split-name:not(.couple-layout-dual) .couple-part .name-line{
  white-space:nowrap !important;
}
.name-align-desktop-left .has-split-name,
.name-align-desktop-center .has-split-name,
.name-align-desktop-right .has-split-name{
  justify-content:center !important;
}
@media (max-width:640px){
  .has-split-name,
  .has-split-name.couple-layout-dual{
    grid-template-columns:minmax(0,1fr) minmax(2.4em,auto) minmax(0,1fr) !important;
    column-gap:.08em !important;
    width:100% !important;
  }
  .has-split-name .couple-sep,
  .has-split-name.couple-layout-dual .couple-sep{
    min-width:2.1em !important;
    font-size:.34em !important;
    padding-inline:.04em !important;
  }
  .lang-km .has-split-name .couple-sep{
    font-size:.34em !important;
  }
}


/* v4: Khmer-only middle word and configurable event date typography */
.lang-km .has-split-name,
.lang-km .has-split-name.couple-layout-dual{
  grid-template-columns:minmax(0,1fr) minmax(4.2em,auto) minmax(0,1fr) !important;
}
.lang-km .has-split-name .couple-sep,
.lang-km .has-split-name.couple-layout-dual .couple-sep{
  font-family:var(--couple-km-font) !important;
  font-size:.25em !important;
  line-height:1.25 !important;
  min-width:4em !important;
  color:var(--gold-2) !important;
  font-weight:600 !important;
}
.guest-page.lang-en .premium-date{font-family:var(--date-en-font) !important;}
.guest-page.lang-km .premium-date{font-family:var(--date-km-font) !important;}
@media (max-width:640px){
  .guest-page .premium-date{
    font-size:clamp(12px,5.2vw,var(--date-mobile-size,30px)) !important;
    font-family:var(--date-font-family) !important;
  }
  .guest-page.lang-km .has-split-name,
  .guest-page.lang-km .has-split-name.couple-layout-dual{
    grid-template-columns:minmax(0,1fr) minmax(3.8em,auto) minmax(0,1fr) !important;
  }
  .guest-page.lang-km .has-split-name .couple-sep,
  .guest-page.lang-km .has-split-name.couple-layout-dual .couple-sep{
    font-size:.25em !important;
    min-width:3.8em !important;
  }
}


/* v5 all text typography controls */
.guest-page.lang-en{font-family:var(--opened_body-en-font, Inter, sans-serif) !important;font-size:var(--opened_body-en-size,16px)}
.guest-page.lang-km{font-family:var(--opened_body-km-font, Battambang, sans-serif) !important;font-size:var(--opened_body-km-size,16px)}

.guest-page.lang-en #introEnvelope .small-kicker{font-family:var(--first_kicker-en-font) !important;font-size:var(--first_kicker-en-size) !important}
.guest-page.lang-km #introEnvelope .small-kicker{font-family:var(--first_kicker-km-font) !important;font-size:var(--first_kicker-km-size) !important}
.guest-page.lang-en #introEnvelope .premium-intro-text{font-family:var(--first_intro-en-font) !important;font-size:var(--first_intro-en-size) !important}
.guest-page.lang-km #introEnvelope .premium-intro-text{font-family:var(--first_intro-km-font) !important;font-size:var(--first_intro-km-size) !important}
.guest-page.lang-en #introEnvelope .premium-guest-box > div{font-family:var(--first_guest_label-en-font) !important;font-size:var(--first_guest_label-en-size) !important}
.guest-page.lang-km #introEnvelope .premium-guest-box > div{font-family:var(--first_guest_label-km-font) !important;font-size:var(--first_guest_label-km-size) !important}
.guest-page.lang-en #introEnvelope .envelope-open{font-family:var(--first_button-en-font) !important;font-size:var(--first_button-en-size) !important}
.guest-page.lang-km #introEnvelope .envelope-open{font-family:var(--first_button-km-font) !important;font-size:var(--first_button-km-size) !important}
.guest-page.lang-en #introEnvelope .premium-venue{font-family:var(--first_venue-en-font) !important;font-size:var(--first_venue-en-size) !important}
.guest-page.lang-km #introEnvelope .premium-venue{font-family:var(--first_venue-km-font) !important;font-size:var(--first_venue-km-size) !important}

.guest-page.lang-en .guest-main .small-kicker{font-family:var(--opened_kicker-en-font) !important;font-size:var(--opened_kicker-en-size) !important}
.guest-page.lang-km .guest-main .small-kicker{font-family:var(--opened_kicker-km-font) !important;font-size:var(--opened_kicker-km-size) !important}
.guest-page.lang-en .guest-main, .guest-page.lang-en .guest-main p, .guest-page.lang-en .guest-main .muted, .guest-page.lang-en .guest-main .value{font-family:var(--opened_body-en-font) !important;font-size:var(--opened_body-en-size)}
.guest-page.lang-km .guest-main, .guest-page.lang-km .guest-main p, .guest-page.lang-km .guest-main .muted, .guest-page.lang-km .guest-main .value{font-family:var(--opened_body-km-font) !important;font-size:var(--opened_body-km-size)}
.guest-page.lang-en .guest-main h3{font-family:var(--opened_section_title-en-font) !important;font-size:var(--opened_section_title-en-size) !important}
.guest-page.lang-km .guest-main h3{font-family:var(--opened_section_title-km-font) !important;font-size:var(--opened_section_title-km-size) !important}
.guest-page.lang-en .guest-main .btn{font-family:var(--opened_button-en-font) !important;font-size:var(--opened_button-en-size) !important}
.guest-page.lang-km .guest-main .btn{font-family:var(--opened_button-km-font) !important;font-size:var(--opened_button-km-size) !important}
.guest-page.lang-en .guest-main .premium-venue,.guest-page.lang-en .lang-sized-venue{font-family:var(--opened_venue-en-font) !important;font-size:var(--opened_venue-en-size) !important}
.guest-page.lang-km .guest-main .premium-venue,.guest-page.lang-km .lang-sized-venue{font-family:var(--opened_venue-km-font) !important;font-size:var(--opened_venue-km-size) !important}
.guest-page.lang-en .lang-sized-address{font-family:var(--opened_address-en-font) !important;font-size:var(--opened_address-en-size) !important}
.guest-page.lang-km .lang-sized-address{font-family:var(--opened_address-km-font) !important;font-size:var(--opened_address-km-size) !important}
.guest-page.lang-en .lang-sized-welcome,.guest-page.lang-en .lang-sized-owner-note{font-family:var(--opened_welcome-en-font) !important;font-size:var(--opened_welcome-en-size) !important}
.guest-page.lang-km .lang-sized-welcome,.guest-page.lang-km .lang-sized-owner-note{font-family:var(--opened_welcome-km-font) !important;font-size:var(--opened_welcome-km-size) !important}

.guest-page.lang-en .schedule-time{font-family:var(--schedule_time-en-font) !important;font-size:var(--schedule_time-en-size) !important}
.guest-page.lang-km .schedule-time{font-family:var(--schedule_time-km-font) !important;font-size:var(--schedule_time-km-size) !important}
.guest-page.lang-en .schedule-detail strong{font-family:var(--schedule_title-en-font) !important;font-size:var(--schedule_title-en-size) !important}
.guest-page.lang-km .schedule-detail strong{font-family:var(--schedule_title-km-font) !important;font-size:var(--schedule_title-km-size) !important}
.guest-page.lang-en .schedule-detail .muted{font-family:var(--schedule_desc-en-font) !important;font-size:var(--schedule_desc-en-size) !important}
.guest-page.lang-km .schedule-detail .muted{font-family:var(--schedule_desc-km-font) !important;font-size:var(--schedule_desc-km-size) !important}
.guest-page.lang-en .slide-caption{font-family:var(--gallery_caption-en-font) !important;font-size:var(--gallery_caption-en-size) !important}
.guest-page.lang-km .slide-caption{font-family:var(--gallery_caption-km-font) !important;font-size:var(--gallery_caption-km-size) !important}
.guest-page.lang-en .portrait-name{font-family:var(--portrait_name-en-font) !important;font-size:var(--portrait_name-en-size) !important}
.guest-page.lang-km .portrait-name{font-family:var(--portrait_name-km-font) !important;font-size:var(--portrait_name-km-size) !important}
.guest-page.lang-en .blessing-name{font-family:var(--blessing_name-en-font) !important;font-size:var(--blessing_name-en-size) !important}
.guest-page.lang-km .blessing-name{font-family:var(--blessing_name-km-font) !important;font-size:var(--blessing_name-km-size) !important}
.guest-page.lang-en .blessing-message{font-family:var(--blessing_message-en-font) !important;font-size:var(--blessing_message-en-size) !important}
.guest-page.lang-km .blessing-message{font-family:var(--blessing_message-km-font) !important;font-size:var(--blessing_message-km-size) !important}
.guest-page.lang-en #rsvp,.guest-page.lang-en #rsvp label,.guest-page.lang-en #rsvp input,.guest-page.lang-en #rsvp select,.guest-page.lang-en #rsvp textarea,
.guest-page.lang-en #blessings label,.guest-page.lang-en #blessings input,.guest-page.lang-en #blessings textarea{font-family:var(--rsvp_form-en-font) !important;font-size:var(--rsvp_form-en-size) !important}
.guest-page.lang-km #rsvp,.guest-page.lang-km #rsvp label,.guest-page.lang-km #rsvp input,.guest-page.lang-km #rsvp select,.guest-page.lang-km #rsvp textarea,
.guest-page.lang-km #blessings label,.guest-page.lang-km #blessings input,.guest-page.lang-km #blessings textarea{font-family:var(--rsvp_form-km-font) !important;font-size:var(--rsvp_form-km-size) !important}

@media (max-width:640px){
  .guest-page.lang-en{font-size:var(--opened_body-en-mobile-size,14px)}
  .guest-page.lang-km{font-size:var(--opened_body-km-mobile-size,14px)}
  .guest-page.lang-en #introEnvelope .small-kicker{font-size:var(--first_kicker-en-mobile-size) !important}
  .guest-page.lang-km #introEnvelope .small-kicker{font-size:var(--first_kicker-km-mobile-size) !important}
  .guest-page.lang-en #introEnvelope .premium-intro-text{font-size:var(--first_intro-en-mobile-size) !important}
  .guest-page.lang-km #introEnvelope .premium-intro-text{font-size:var(--first_intro-km-mobile-size) !important}
  .guest-page.lang-en #introEnvelope .premium-guest-box > div{font-size:var(--first_guest_label-en-mobile-size) !important}
  .guest-page.lang-km #introEnvelope .premium-guest-box > div{font-size:var(--first_guest_label-km-mobile-size) !important}
  .guest-page.lang-en #introEnvelope .envelope-open{font-size:var(--first_button-en-mobile-size) !important}
  .guest-page.lang-km #introEnvelope .envelope-open{font-size:var(--first_button-km-mobile-size) !important}
  .guest-page.lang-en #introEnvelope .premium-venue{font-size:var(--first_venue-en-mobile-size) !important}
  .guest-page.lang-km #introEnvelope .premium-venue{font-size:var(--first_venue-km-mobile-size) !important}
  .guest-page.lang-en .guest-main .small-kicker{font-size:var(--opened_kicker-en-mobile-size) !important}
  .guest-page.lang-km .guest-main .small-kicker{font-size:var(--opened_kicker-km-mobile-size) !important}
  .guest-page.lang-en .guest-main, .guest-page.lang-en .guest-main p, .guest-page.lang-en .guest-main .muted, .guest-page.lang-en .guest-main .value{font-size:var(--opened_body-en-mobile-size) !important}
  .guest-page.lang-km .guest-main, .guest-page.lang-km .guest-main p, .guest-page.lang-km .guest-main .muted, .guest-page.lang-km .guest-main .value{font-size:var(--opened_body-km-mobile-size) !important}
  .guest-page.lang-en .guest-main h3{font-size:var(--opened_section_title-en-mobile-size) !important}
  .guest-page.lang-km .guest-main h3{font-size:var(--opened_section_title-km-mobile-size) !important}
  .guest-page.lang-en .guest-main .btn{font-size:var(--opened_button-en-mobile-size) !important}
  .guest-page.lang-km .guest-main .btn{font-size:var(--opened_button-km-mobile-size) !important}
  .guest-page.lang-en .guest-main .premium-venue,.guest-page.lang-en .lang-sized-venue{font-size:var(--opened_venue-en-mobile-size) !important}
  .guest-page.lang-km .guest-main .premium-venue,.guest-page.lang-km .lang-sized-venue{font-size:var(--opened_venue-km-mobile-size) !important}
  .guest-page.lang-en .lang-sized-address{font-size:var(--opened_address-en-mobile-size) !important}
  .guest-page.lang-km .lang-sized-address{font-size:var(--opened_address-km-mobile-size) !important}
  .guest-page.lang-en .lang-sized-welcome,.guest-page.lang-en .lang-sized-owner-note{font-size:var(--opened_welcome-en-mobile-size) !important}
  .guest-page.lang-km .lang-sized-welcome,.guest-page.lang-km .lang-sized-owner-note{font-size:var(--opened_welcome-km-mobile-size) !important}
  .guest-page.lang-en .schedule-time{font-size:var(--schedule_time-en-mobile-size) !important}
  .guest-page.lang-km .schedule-time{font-size:var(--schedule_time-km-mobile-size) !important}
  .guest-page.lang-en .schedule-detail strong{font-size:var(--schedule_title-en-mobile-size) !important}
  .guest-page.lang-km .schedule-detail strong{font-size:var(--schedule_title-km-mobile-size) !important}
  .guest-page.lang-en .schedule-detail .muted{font-size:var(--schedule_desc-en-mobile-size) !important}
  .guest-page.lang-km .schedule-detail .muted{font-size:var(--schedule_desc-km-mobile-size) !important}
  .guest-page.lang-en .slide-caption{font-size:var(--gallery_caption-en-mobile-size) !important}
  .guest-page.lang-km .slide-caption{font-size:var(--gallery_caption-km-mobile-size) !important}
  .guest-page.lang-en .portrait-name{font-size:var(--portrait_name-en-mobile-size) !important}
  .guest-page.lang-km .portrait-name{font-size:var(--portrait_name-km-mobile-size) !important}
  .guest-page.lang-en .blessing-name{font-size:var(--blessing_name-en-mobile-size) !important}
  .guest-page.lang-km .blessing-name{font-size:var(--blessing_name-km-mobile-size) !important}
  .guest-page.lang-en .blessing-message{font-size:var(--blessing_message-en-mobile-size) !important}
  .guest-page.lang-km .blessing-message{font-size:var(--blessing_message-km-mobile-size) !important}
  .guest-page.lang-en #rsvp,.guest-page.lang-en #rsvp label,.guest-page.lang-en #rsvp input,.guest-page.lang-en #rsvp select,.guest-page.lang-en #rsvp textarea,
  .guest-page.lang-en #blessings label,.guest-page.lang-en #blessings input,.guest-page.lang-en #blessings textarea{font-size:var(--rsvp_form-en-mobile-size) !important}
  .guest-page.lang-km #rsvp,.guest-page.lang-km #rsvp label,.guest-page.lang-km #rsvp input,.guest-page.lang-km #rsvp select,.guest-page.lang-km #rsvp textarea,
  .guest-page.lang-km #blessings label,.guest-page.lang-km #blessings input,.guest-page.lang-km #blessings textarea{font-size:var(--rsvp_form-km-mobile-size) !important}
}

/* v6: sub-tabs and live real-text preview for All Text Font / Size */
.text-style-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0 18px;padding:10px;border:1px solid var(--line);border-radius:18px;background:rgba(255,250,244,.9)}
.text-style-tab-btn{appearance:none;border:1px solid #dabd9d;background:#fff;color:#9b6335;border-radius:999px;padding:9px 14px;font-weight:800;cursor:pointer;font-family:Inter,"Battambang","Noto Sans Khmer",sans-serif;transition:.18s ease}
.text-style-tab-btn:hover{transform:translateY(-1px);box-shadow:0 8px 18px rgba(137,92,49,.12)}
.text-style-tab-btn.active{background:linear-gradient(180deg,#c79864,#b98650);border-color:#b98650;color:#fff}
.text-style-panel{display:none!important}
.text-style-panel.active{display:block!important}
.typography-card{margin:14px 0;padding:18px!important;border-radius:22px!important}
.typography-card-head{margin-bottom:12px}
.typography-preview-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0 16px}
.typography-preview-box{border:1px dashed #d9bd9d;border-radius:16px;background:rgba(255,255,255,.72);padding:12px;min-width:0}
.typography-preview-label{font-family:Inter,"Noto Sans Khmer",sans-serif;font-size:12px;font-weight:800;color:#9b6335;margin-bottom:7px}
.typography-real-preview{line-height:1.55;color:#2f2722;word-break:break-word;overflow-wrap:anywhere}
.mobile-preview-box{max-width:360px;background:linear-gradient(180deg,#fffdf9,#fff8f0)}
.mobile-real-preview{max-width:330px}
.typography-input-grid{margin-top:8px}
@media (max-width:760px){
  .text-style-tab-btn{font-size:13px;padding:8px 11px}
  .typography-preview-grid{grid-template-columns:1fr}
  .typography-card{padding:14px!important}
}

/* v7 owner gallery management: compact, non-overflowing image edit cards */
.owner-photo-columns{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:18px;
  align-items:start;
}
.owner-photo-section{min-width:0;overflow:hidden;}
.owner-photo-list{display:grid;gap:12px;min-width:0;}
.owner-mini-photo-card{
  display:grid !important;
  grid-template-columns:104px minmax(0,1fr) !important;
  gap:14px !important;
  align-items:start !important;
  padding:12px !important;
  border:1px solid var(--line) !important;
  border-radius:18px !important;
  background:#fff !important;
  min-width:0 !important;
  overflow:hidden !important;
}
.owner-mini-photo-media{display:flex;flex-direction:column;gap:8px;align-items:center;min-width:0;}
.owner-photo-thumb{width:92px!important;height:92px!important;object-fit:cover!important;border-radius:14px!important;background:#f4eadf;display:block;}
.compact-danger{width:92px;min-height:38px;padding:8px 10px;font-size:12px;}
.owner-mini-photo-form{
  display:grid !important;
  grid-template-columns:82px minmax(0,1fr) minmax(0,1fr) !important;
  gap:10px !important;
  align-items:end !important;
  min-width:0 !important;
}
.owner-mini-photo-form > div{min-width:0;}
.owner-mini-photo-form label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.owner-mini-photo-form input{width:100%;min-width:0;}
.owner-mini-photo-form input[type="file"]{font-size:12px;}
.owner-mini-photo-form .mini-field-url{grid-column:span 2;}
.owner-mini-photo-form .mini-field-file{grid-column:span 2;}
.owner-mini-photo-form .mini-field-save{align-self:end;}
@media (max-width:1220px){
  .owner-photo-columns{grid-template-columns:1fr;}
}
@media (max-width:700px){
  .owner-mini-photo-card{grid-template-columns:1fr!important;}
  .owner-mini-photo-media{align-items:flex-start;flex-direction:row;justify-content:space-between;}
  .owner-mini-photo-form{grid-template-columns:1fr!important;}
  .owner-mini-photo-form .mini-field-url,
  .owner-mini-photo-form .mini-field-file{grid-column:auto;}
}

/* v7 configurable couple middle separator (& / ជាគូនឹង) */
.guest-page.lang-en .has-split-name .couple-sep,
.guest-page.lang-en .has-split-name.couple-layout-dual .couple-sep{
  font-family:var(--couple_separator-en-font, var(--couple-en-font)) !important;
  font-size:var(--couple_separator-en-size,22px) !important;
  min-width:max(2.4em,32px) !important;
  line-height:1.1 !important;
}
.guest-page.lang-km .has-split-name .couple-sep,
.guest-page.lang-km .has-split-name.couple-layout-dual .couple-sep{
  font-family:var(--couple_separator-km-font, var(--couple-km-font)) !important;
  font-size:var(--couple_separator-km-size,14px) !important;
  min-width:max(4em,54px) !important;
  line-height:1.35 !important;
}
@media (max-width:640px){
  .guest-page.lang-en .has-split-name .couple-sep,
  .guest-page.lang-en .has-split-name.couple-layout-dual .couple-sep{
    font-size:var(--couple_separator-en-mobile-size,18px) !important;
    min-width:max(2.2em,26px) !important;
  }
  .guest-page.lang-km .has-split-name .couple-sep,
  .guest-page.lang-km .has-split-name.couple-layout-dual .couple-sep{
    font-size:var(--couple_separator-km-mobile-size,12px) !important;
    min-width:max(4em,46px) !important;
  }
}


/* v8: Couple photo sliders are clean portrait sliders only: no captions or thumbnail strip. */
.portrait-widget .slide-caption,
.portrait-widget .compact-thumbs,
.portrait-widget .thumbs{display:none!important;}
.portrait-widget{margin-bottom:0;}
.portrait-widget .portrait-slider{margin-bottom:0;}
.portrait-card .portrait-widget + .portrait-name{margin-top:0;}

/* v9: Gallery image drag position controls for owner dashboard. */
.owner-gallery-add-card{overflow:hidden;}
.owner-gallery-list{gap:18px;}
.owner-gallery-card{overflow:hidden;}
.owner-gallery-editor{
  display:grid;
  grid-template-columns:minmax(220px,360px) minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.owner-gallery-preview-box{display:grid;gap:8px;min-width:0;}
.owner-gallery-preview{
  width:100%;
  height:220px;
  object-fit:cover;
  border-radius:18px;
  background:#f4eadf;
  border:1px solid var(--line);
  display:block;
}
.owner-gallery-form{
  display:grid;
  grid-template-columns:86px minmax(0,1fr) minmax(0,1fr) minmax(0,1fr);
  gap:12px;
  align-items:end;
  min-width:0;
}
.owner-gallery-form > div{min-width:0;}
.owner-gallery-form label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.owner-gallery-form input{width:100%;min-width:0;}
.owner-gallery-form input[type="file"]{font-size:12px;}
.owner-gallery-form input[type="range"]{accent-color:var(--gold);}
.owner-gallery-form .mini-field-url{grid-column:span 2;}
.owner-gallery-form .mini-field-file{grid-column:span 1;}
.owner-gallery-form .position-field{grid-column:span 2;}
.owner-gallery-form .mini-field-save{align-self:end;}
@media (max-width:1180px){
  .owner-gallery-editor{grid-template-columns:1fr;}
  .owner-gallery-preview{height:260px;}
}
@media (max-width:760px){
  .owner-gallery-form{grid-template-columns:1fr;}
  .owner-gallery-form .mini-field-url,
  .owner-gallery-form .mini-field-file,
  .owner-gallery-form .position-field{grid-column:auto;}
  .owner-gallery-preview{height:210px;}
}

/* v10: Real drag/zoom editor for Gallery and Groom/Bride photos */
.slide-item{overflow:hidden;}
.portrait-slider .slide-item{overflow:hidden;}
.portrait-slider .slide-item img{
  transform:scale(var(--photo-zoom,1));
  transform-origin:center center;
  transition:transform .35s ease, object-position .35s ease;
}
.owner-adjust-columns{align-items:start;}
.owner-editor-carousel{overflow:hidden;}
.owner-carousel-stage{min-width:0;}
.owner-carousel-item{display:none;}
.owner-carousel-item.active{display:block;}
.owner-carousel-counter{min-width:54px;text-align:center;display:inline-flex;justify-content:center;align-items:center;}
.owner-adjust-layout{
  display:grid;
  grid-template-columns:minmax(260px,460px) minmax(0,1fr);
  gap:18px;
  align-items:start;
}
.owner-adjust-preview-box{display:grid;gap:8px;min-width:0;}
.owner-drag-frame{
  position:relative;
  width:100%;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:22px;
  background:#f4eadf;
  box-shadow:0 14px 34px rgba(61,39,20,.08);
  cursor:grab;
  touch-action:none;
  user-select:none;
}
.owner-drag-frame.dragging{cursor:grabbing;}
.owner-main-gallery-drag-frame{aspect-ratio:16/7;min-height:220px;}
.owner-couple-drag-frame{aspect-ratio:4/3;min-height:260px;}
.owner-position-preview{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  pointer-events:none;
  transform-origin:center center;
  transition:transform .12s ease, object-position .12s ease;
}
.owner-drag-hint{
  position:absolute;
  left:12px;
  right:12px;
  bottom:12px;
  background:rgba(255,252,247,.86);
  border:1px solid rgba(166,105,53,.18);
  border-radius:999px;
  padding:7px 12px;
  color:var(--gold-2);
  font-weight:700;
  font-size:12px;
  text-align:center;
  pointer-events:none;
}
.owner-adjust-controls{min-width:0;display:grid;gap:10px;}
.owner-position-edit-form{
  display:grid;
  grid-template-columns:88px minmax(0,1fr) minmax(0,1fr);
  gap:12px;
  align-items:end;
  min-width:0;
}
.owner-position-edit-form > div{min-width:0;}
.owner-position-edit-form label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.owner-position-edit-form input{width:100%;min-width:0;}
.owner-position-edit-form input[type="file"]{font-size:12px;}
.owner-position-edit-form input[type="range"]{accent-color:var(--gold);}
.owner-position-edit-form .wide-field{grid-column:span 2;}
.owner-position-edit-form .position-field{grid-column:span 1;}
.owner-delete-line{display:flex;justify-content:flex-end;margin-top:4px;}
.owner-gallery-carousel{margin-top:16px;}
@media (max-width:1180px){
  .owner-adjust-layout{grid-template-columns:1fr;}
  .owner-main-gallery-drag-frame{min-height:260px;}
  .owner-couple-drag-frame{min-height:320px;}
}
@media (max-width:760px){
  .owner-position-edit-form{grid-template-columns:1fr;}
  .owner-position-edit-form .wide-field,
  .owner-position-edit-form .position-field{grid-column:auto;}
  .owner-main-gallery-drag-frame{aspect-ratio:4/3;min-height:210px;}
  .owner-couple-drag-frame{min-height:240px;}
  .owner-carousel-counter{min-width:auto;}
}

/* v11: Photo editor controls are placed below the real image preview so Save buttons never disappear. */
.owner-adjust-layout{
  grid-template-columns:1fr !important;
  gap:14px !important;
}
.owner-adjust-controls{
  width:100% !important;
  overflow:visible !important;
}
.owner-position-edit-form{
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  align-items:end !important;
}
.owner-position-edit-form .wide-field{grid-column:1 / -1 !important;}
.owner-position-edit-form .actions-end{grid-column:1 / -1 !important;justify-content:flex-start !important;}
.owner-position-edit-form label{white-space:normal !important;overflow:visible !important;text-overflow:clip !important;line-height:1.25;}
.owner-delete-line{justify-content:flex-start !important;margin-top:8px !important;}
.owner-couple-drag-frame{min-height:300px;}
@media (max-width:760px){
  .owner-position-edit-form{grid-template-columns:1fr !important;}
  .owner-couple-drag-frame{min-height:240px;}
}

/* v11: All Text Font / Size can directly control real Groom/Bride and Guest names on First and Opened pages. */
.guest-page.lang-en #introEnvelope .premium-couple{font-family:var(--first_couple_name-en-font,var(--couple-en-font)) !important;font-size:var(--first_couple_name-en-size,var(--couple-en-size,64px)) !important;}
.guest-page.lang-km #introEnvelope .premium-couple{font-family:var(--first_couple_name-km-font,var(--couple-km-font)) !important;font-size:var(--first_couple_name-km-size,var(--couple-km-size,64px)) !important;}
.guest-page.lang-en #introEnvelope .guest-display{font-family:var(--first_guest_name-en-font,var(--guest-en-font)) !important;font-size:var(--first_guest_name-en-size,var(--guest-en-size,38px)) !important;}
.guest-page.lang-km #introEnvelope .guest-display{font-family:var(--first_guest_name-km-font,var(--guest-km-font)) !important;font-size:var(--first_guest_name-km-size,var(--guest-km-size,38px)) !important;}
.guest-page.lang-en .guest-main .guest-hero .premium-couple{font-family:var(--opened_couple_name-en-font,var(--couple-en-font)) !important;font-size:var(--opened_couple_name-en-size,var(--couple-en-size,64px)) !important;}
.guest-page.lang-km .guest-main .guest-hero .premium-couple{font-family:var(--opened_couple_name-km-font,var(--couple-km-font)) !important;font-size:var(--opened_couple_name-km-size,var(--couple-km-size,64px)) !important;}
.guest-page.lang-en .guest-main .guest-hero .guest-display{font-family:var(--opened_guest_name-en-font,var(--guest-en-font)) !important;font-size:var(--opened_guest_name-en-size,var(--guest-en-size,38px)) !important;}
.guest-page.lang-km .guest-main .guest-hero .guest-display{font-family:var(--opened_guest_name-km-font,var(--guest-km-font)) !important;font-size:var(--opened_guest_name-km-size,var(--guest-km-size,38px)) !important;}
@media (max-width:640px){
  .guest-page.lang-en #introEnvelope .premium-couple{font-size:var(--first_couple_name-en-mobile-size,var(--couple-en-mobile-size,30px)) !important;}
  .guest-page.lang-km #introEnvelope .premium-couple{font-size:var(--first_couple_name-km-mobile-size,var(--couple-km-mobile-size,30px)) !important;}
  .guest-page.lang-en #introEnvelope .guest-display{font-size:var(--first_guest_name-en-mobile-size,var(--guest-en-mobile-size,24px)) !important;}
  .guest-page.lang-km #introEnvelope .guest-display{font-size:var(--first_guest_name-km-mobile-size,var(--guest-km-mobile-size,26px)) !important;}
  .guest-page.lang-en .guest-main .guest-hero .premium-couple{font-size:var(--opened_couple_name-en-mobile-size,var(--couple-en-mobile-size,30px)) !important;}
  .guest-page.lang-km .guest-main .guest-hero .premium-couple{font-size:var(--opened_couple_name-km-mobile-size,var(--couple-km-mobile-size,30px)) !important;}
  .guest-page.lang-en .guest-main .guest-hero .guest-display{font-size:var(--opened_guest_name-en-mobile-size,var(--guest-en-mobile-size,24px)) !important;}
  .guest-page.lang-km .guest-main .guest-hero .guest-display{font-size:var(--opened_guest_name-km-mobile-size,var(--guest-km-mobile-size,26px)) !important;}
}

/* v12: Event Datetime typography in All Text Font / Size for First and Opened Invitation */
.guest-page.lang-en #introEnvelope .premium-date{font-family:var(--first_event_date-en-font) !important;font-size:var(--first_event_date-en-size) !important;line-height:1.26 !important;}
.guest-page.lang-km #introEnvelope .premium-date{font-family:var(--first_event_date-km-font) !important;font-size:var(--first_event_date-km-size) !important;line-height:1.42 !important;}
.guest-page.lang-en .guest-main .premium-date{font-family:var(--opened_event_date-en-font) !important;font-size:var(--opened_event_date-en-size) !important;line-height:1.26 !important;}
.guest-page.lang-km .guest-main .premium-date{font-family:var(--opened_event_date-km-font) !important;font-size:var(--opened_event_date-km-size) !important;line-height:1.42 !important;}
@media (max-width:640px){
  .guest-page.lang-en #introEnvelope .premium-date{font-size:var(--first_event_date-en-mobile-size) !important;}
  .guest-page.lang-km #introEnvelope .premium-date{font-size:var(--first_event_date-km-mobile-size) !important;}
  .guest-page.lang-en .guest-main .premium-date{font-size:var(--opened_event_date-en-mobile-size) !important;}
  .guest-page.lang-km .guest-main .premium-date{font-size:var(--opened_event_date-km-mobile-size) !important;}
}


/* v13: make Event DateTime typography cards easy to find */
.typography-card[data-typography-card="first_event_date"],
.typography-card[data-typography-card="opened_event_date"]{
  border-color:rgba(185,134,80,.72)!important;
  background:linear-gradient(180deg,rgba(255,250,244,.98),rgba(255,246,236,.96))!important;
}
.typography-card[data-typography-card="first_event_date"] .typography-card-head h4::before,
.typography-card[data-typography-card="opened_event_date"] .typography-card-head h4::before{
  content:"⏰ ";
}

/* v14: font-style combobox support for all configurable typography */
.guest-page.lang-en #introEnvelope .small-kicker{font-style:var(--first_kicker-en-style,normal)!important;font-weight:var(--first_kicker-en-weight,700)!important}
.guest-page.lang-km #introEnvelope .small-kicker{font-style:var(--first_kicker-km-style,normal)!important;font-weight:var(--first_kicker-km-weight,700)!important}
.guest-page.lang-en #introEnvelope .premium-intro-text{font-style:var(--first_intro-en-style,normal)!important;font-weight:var(--first_intro-en-weight,400)!important}
.guest-page.lang-km #introEnvelope .premium-intro-text{font-style:var(--first_intro-km-style,normal)!important;font-weight:var(--first_intro-km-weight,400)!important}
.guest-page.lang-en #introEnvelope .premium-couple{font-style:var(--first_couple_name-en-style,var(--couple-en-style,normal))!important;font-weight:var(--first_couple_name-en-weight,var(--couple-en-weight,700))!important}
.guest-page.lang-km #introEnvelope .premium-couple{font-style:var(--first_couple_name-km-style,var(--couple-km-style,normal))!important;font-weight:var(--first_couple_name-km-weight,var(--couple-km-weight,700))!important}
.guest-page.lang-en #introEnvelope .guest-display{font-style:var(--first_guest_name-en-style,var(--guest-en-style,normal))!important;font-weight:var(--first_guest_name-en-weight,var(--guest-en-weight,700))!important}
.guest-page.lang-km #introEnvelope .guest-display{font-style:var(--first_guest_name-km-style,var(--guest-km-style,normal))!important;font-weight:var(--first_guest_name-km-weight,var(--guest-km-weight,700))!important}
.guest-page.lang-en #introEnvelope .premium-guest-box > div{font-style:var(--first_guest_label-en-style,normal)!important;font-weight:var(--first_guest_label-en-weight,400)!important}
.guest-page.lang-km #introEnvelope .premium-guest-box > div{font-style:var(--first_guest_label-km-style,normal)!important;font-weight:var(--first_guest_label-km-weight,400)!important}
.guest-page.lang-en #introEnvelope .premium-date{font-style:var(--first_event_date-en-style,var(--date-en-style,normal))!important;font-weight:var(--first_event_date-en-weight,var(--date-en-weight,700))!important}
.guest-page.lang-km #introEnvelope .premium-date{font-style:var(--first_event_date-km-style,var(--date-km-style,normal))!important;font-weight:var(--first_event_date-km-weight,var(--date-km-weight,700))!important}
.guest-page.lang-en #introEnvelope .envelope-open{font-style:var(--first_button-en-style,normal)!important;font-weight:var(--first_button-en-weight,700)!important}
.guest-page.lang-km #introEnvelope .envelope-open{font-style:var(--first_button-km-style,normal)!important;font-weight:var(--first_button-km-weight,700)!important}
.guest-page.lang-en #introEnvelope .premium-venue{font-style:var(--first_venue-en-style,normal)!important;font-weight:var(--first_venue-en-weight,400)!important}
.guest-page.lang-km #introEnvelope .premium-venue{font-style:var(--first_venue-km-style,normal)!important;font-weight:var(--first_venue-km-weight,400)!important}

.guest-page.lang-en .guest-main{font-style:var(--opened_body-en-style,normal)!important;font-weight:var(--opened_body-en-weight,400)!important}
.guest-page.lang-km .guest-main{font-style:var(--opened_body-km-style,normal)!important;font-weight:var(--opened_body-km-weight,400)!important}
.guest-page.lang-en .guest-main .small-kicker{font-style:var(--opened_kicker-en-style,normal)!important;font-weight:var(--opened_kicker-en-weight,700)!important}
.guest-page.lang-km .guest-main .small-kicker{font-style:var(--opened_kicker-km-style,normal)!important;font-weight:var(--opened_kicker-km-weight,700)!important}
.guest-page.lang-en .guest-main .guest-hero .premium-couple{font-style:var(--opened_couple_name-en-style,var(--couple-en-style,normal))!important;font-weight:var(--opened_couple_name-en-weight,var(--couple-en-weight,700))!important}
.guest-page.lang-km .guest-main .guest-hero .premium-couple{font-style:var(--opened_couple_name-km-style,var(--couple-km-style,normal))!important;font-weight:var(--opened_couple_name-km-weight,var(--couple-km-weight,700))!important}
.guest-page.lang-en .guest-main .guest-hero .guest-display{font-style:var(--opened_guest_name-en-style,var(--guest-en-style,normal))!important;font-weight:var(--opened_guest_name-en-weight,var(--guest-en-weight,700))!important}
.guest-page.lang-km .guest-main .guest-hero .guest-display{font-style:var(--opened_guest_name-km-style,var(--guest-km-style,normal))!important;font-weight:var(--opened_guest_name-km-weight,var(--guest-km-weight,700))!important}
.guest-page.lang-en .guest-main .premium-date{font-style:var(--opened_event_date-en-style,var(--date-en-style,normal))!important;font-weight:var(--opened_event_date-en-weight,var(--date-en-weight,700))!important}
.guest-page.lang-km .guest-main .premium-date{font-style:var(--opened_event_date-km-style,var(--date-km-style,normal))!important;font-weight:var(--opened_event_date-km-weight,var(--date-km-weight,700))!important}
.guest-page.lang-en .guest-main h3{font-style:var(--opened_section_title-en-style,normal)!important;font-weight:var(--opened_section_title-en-weight,700)!important}
.guest-page.lang-km .guest-main h3{font-style:var(--opened_section_title-km-style,normal)!important;font-weight:var(--opened_section_title-km-weight,700)!important}
.guest-page.lang-en .guest-main .btn{font-style:var(--opened_button-en-style,normal)!important;font-weight:var(--opened_button-en-weight,700)!important}
.guest-page.lang-km .guest-main .btn{font-style:var(--opened_button-km-style,normal)!important;font-weight:var(--opened_button-km-weight,700)!important}
.guest-page.lang-en .guest-main .premium-venue,.guest-page.lang-en .lang-sized-venue{font-style:var(--opened_venue-en-style,normal)!important;font-weight:var(--opened_venue-en-weight,400)!important}
.guest-page.lang-km .guest-main .premium-venue,.guest-page.lang-km .lang-sized-venue{font-style:var(--opened_venue-km-style,normal)!important;font-weight:var(--opened_venue-km-weight,400)!important}
.guest-page.lang-en .lang-sized-address{font-style:var(--opened_address-en-style,normal)!important;font-weight:var(--opened_address-en-weight,400)!important}
.guest-page.lang-km .lang-sized-address{font-style:var(--opened_address-km-style,normal)!important;font-weight:var(--opened_address-km-weight,400)!important}
.guest-page.lang-en .lang-sized-welcome,.guest-page.lang-en .lang-sized-owner-note{font-style:var(--opened_welcome-en-style,normal)!important;font-weight:var(--opened_welcome-en-weight,400)!important}
.guest-page.lang-km .lang-sized-welcome,.guest-page.lang-km .lang-sized-owner-note{font-style:var(--opened_welcome-km-style,normal)!important;font-weight:var(--opened_welcome-km-weight,400)!important}

.guest-page.lang-en .schedule-time{font-style:var(--schedule_time-en-style,normal)!important;font-weight:var(--schedule_time-en-weight,700)!important}
.guest-page.lang-km .schedule-time{font-style:var(--schedule_time-km-style,normal)!important;font-weight:var(--schedule_time-km-weight,700)!important}
.guest-page.lang-en .schedule-detail strong{font-style:var(--schedule_title-en-style,normal)!important;font-weight:var(--schedule_title-en-weight,700)!important}
.guest-page.lang-km .schedule-detail strong{font-style:var(--schedule_title-km-style,normal)!important;font-weight:var(--schedule_title-km-weight,700)!important}
.guest-page.lang-en .schedule-detail .muted{font-style:var(--schedule_desc-en-style,normal)!important;font-weight:var(--schedule_desc-en-weight,400)!important}
.guest-page.lang-km .schedule-detail .muted{font-style:var(--schedule_desc-km-style,normal)!important;font-weight:var(--schedule_desc-km-weight,400)!important}
.guest-page.lang-en .slide-caption{font-style:var(--gallery_caption-en-style,normal)!important;font-weight:var(--gallery_caption-en-weight,600)!important}
.guest-page.lang-km .slide-caption{font-style:var(--gallery_caption-km-style,normal)!important;font-weight:var(--gallery_caption-km-weight,600)!important}
.guest-page.lang-en .portrait-name{font-style:var(--portrait_name-en-style,normal)!important;font-weight:var(--portrait_name-en-weight,700)!important}
.guest-page.lang-km .portrait-name{font-style:var(--portrait_name-km-style,normal)!important;font-weight:var(--portrait_name-km-weight,700)!important}
.guest-page.lang-en .blessing-name{font-style:var(--blessing_name-en-style,normal)!important;font-weight:var(--blessing_name-en-weight,700)!important}
.guest-page.lang-km .blessing-name{font-style:var(--blessing_name-km-style,normal)!important;font-weight:var(--blessing_name-km-weight,700)!important}
.guest-page.lang-en .blessing-message{font-style:var(--blessing_message-en-style,normal)!important;font-weight:var(--blessing_message-en-weight,400)!important}
.guest-page.lang-km .blessing-message{font-style:var(--blessing_message-km-style,normal)!important;font-weight:var(--blessing_message-km-weight,400)!important}
.guest-page.lang-en #rsvp,.guest-page.lang-en #rsvp input,.guest-page.lang-en #rsvp select,.guest-page.lang-en #rsvp textarea,.guest-page.lang-en #rsvp label{font-style:var(--rsvp_form-en-style,normal)!important;font-weight:var(--rsvp_form-en-weight,400)!important}
.guest-page.lang-km #rsvp,.guest-page.lang-km #rsvp input,.guest-page.lang-km #rsvp select,.guest-page.lang-km #rsvp textarea,.guest-page.lang-km #rsvp label{font-style:var(--rsvp_form-km-style,normal)!important;font-weight:var(--rsvp_form-km-weight,400)!important}
.guest-page.lang-en .couple-sep{font-style:var(--couple_separator-en-style,normal)!important;font-weight:var(--couple_separator-en-weight,600)!important}
.guest-page.lang-km .couple-sep{font-style:var(--couple_separator-km-style,normal)!important;font-weight:var(--couple_separator-km-weight,600)!important}

/* QR guest label below the QR image. The QR PNG itself remains clean/simple. */
.qr-card{text-align:center;}
.qr-card .guest-box.premium-guest-box.qr-guest-label{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  width:auto !important;
  min-width:0 !important;
  max-width:calc(100% - 24px) !important;
  margin:8px auto 14px !important;
  padding:4px .45em !important; /* about one single-space gap before/after the name */
  border:1px dashed rgba(185,133,73,.46) !important;
  border-radius:999px !important;
  background:rgba(255,255,255,.78) !important;
  color:var(--gold-2);
  font-family:"Noto Serif Khmer","Playfair Display",serif;
  font-size:11px !important;
  font-weight:600;
  line-height:1.35;
  text-align:center;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  box-shadow:0 6px 16px rgba(136,100,61,.08);
}
@media(max-width:640px){
  .qr-card .guest-box.premium-guest-box.qr-guest-label{
    font-size:10px !important;
    padding:3px .45em !important;
    max-width:calc(100% - 18px) !important;
  }
}

/* v38: premium language-aware file upload control for guest blessing photo */
.premium-file-upload{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.premium-file-input{
  position:absolute;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0!important;
}
.premium-file-button{
  width:auto!important;
  min-width:142px;
  margin:0;
}
.premium-file-name{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  max-width:100%;
  padding:9px 14px;
  border:1px dashed rgba(185,133,73,.45);
  border-radius:999px;
  background:rgba(255,255,255,.82);
  color:var(--muted);
  font-size:13px;
  line-height:1.35;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.premium-file-name.has-file{
  color:var(--gold-2);
  font-weight:700;
  border-style:solid;
  background:#fffaf4;
}
@media(max-width:640px){
  .premium-file-upload{align-items:stretch;}
  .premium-file-button{width:100%!important;}
  .premium-file-name{width:100%;justify-content:flex-start;}
}

.subtle-note{border:1px dashed var(--line);border-radius:16px;background:rgba(255,255,255,.55);padding:12px 14px;color:var(--muted);line-height:1.55;}
.subtle-note code{background:rgba(185,133,73,.1);border-radius:6px;padding:2px 6px;color:var(--accent);}


/* v52: Blessing Wall desktop/laptop fit and clean wrapping */
@media (min-width:981px){
  .utility-grid{align-items:stretch;}
  .utility-grid > .card{height:100%;}
  .blessing-wall-card{
    display:flex;
    flex-direction:column;
    min-height:100%;
    overflow:hidden;
  }
  .blessing-wall-card .section-title-actions{
    flex:0 0 auto;
    margin-bottom:12px;
  }
  .blessing-wall{
    flex:1 1 auto;
    min-height:0;
    height:100%;
    max-height:none !important;
    overflow-y:auto !important;
    overflow-x:hidden;
    padding-right:6px;
    padding-bottom:0;
    align-content:start;
  }
  .blessing-wall .blessing-post{
    grid-template-columns:1fr !important;
    gap:8px;
    padding:12px 14px !important;
    border-radius:18px;
    width:100%;
    max-width:100%;
  }
  .blessing-wall .blessing-post:not(.blessing-post-text-only){
    grid-template-columns:88px minmax(0,1fr) !important;
  }
  .blessing-wall .blessing-photo{
    width:88px;
    height:88px;
    border-radius:14px;
  }
  .blessing-wall .blessing-body{
    min-width:0;
    width:100%;
  }
  .blessing-wall .blessing-name{
    margin-bottom:5px;
    font-size:clamp(13px,1vw,16px) !important;
    line-height:1.35 !important;
  }
  .blessing-wall .blessing-message{
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    align-items:start;
    gap:.45em;
    font-size:clamp(13px,.95vw,15px) !important;
    line-height:1.72 !important;
    max-width:100%;
    white-space:normal !important;
    word-break:normal;
    overflow-wrap:anywhere;
    margin-bottom:8px;
  }
  .guest-page.lang-km .blessing-wall .blessing-message{
    line-height:1.78 !important;
  }
  .blessing-wall .blessing-emoji{
    width:1.55em;
    height:1.55em;
    font-size:.9em;
    margin-top:.08em;
  }
  .blessing-wall .blessing-time{
    font-size:clamp(11px,.82vw,13px) !important;
    line-height:1.45;
  }
}


/* v53: Keep Blessing Wall height equal to Schedule card on PC/Laptop */
@media (min-width:981px){
  .utility-grid{
    align-items:start !important;
  }
  .schedule-wall-card{
    height:auto;
  }
  .blessing-wall-card{
    display:flex !important;
    flex-direction:column;
    overflow:hidden !important;
    min-height:0 !important;
    height:var(--schedule-wall-height, auto) !important;
    max-height:var(--schedule-wall-height, none) !important;
  }
  .blessing-wall-card .section-title-actions{
    flex:0 0 auto;
  }
  .blessing-wall-card .blessing-wall{
    flex:1 1 auto;
    min-height:0 !important;
    max-height:none !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    padding-right:6px;
    padding-bottom:4px;
    align-content:start;
  }
}
@media (max-width:980px){
  .blessing-wall-card{
    height:auto !important;
    max-height:none !important;
  }
}


/* v54: stable first-load equal height for Schedule and Blessing Wall */
@media (min-width:981px){
  .utility-grid{
    align-items:start !important;
  }
  .schedule-wall-card{
    height:auto !important;
  }
  .blessing-wall-card{
    display:flex !important;
    flex-direction:column !important;
    overflow:hidden !important;
    min-height:360px !important;
    height:var(--schedule-wall-height, 640px) !important;
    max-height:var(--schedule-wall-height, 640px) !important;
  }
  .blessing-wall-card .blessing-wall{
    flex:1 1 auto !important;
    min-height:0 !important;
    height:auto !important;
    max-height:none !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    overscroll-behavior:contain;
  }
}
@media (max-width:980px){
  .blessing-wall-card{
    height:auto !important;
    max-height:none !important;
    min-height:0 !important;
  }
}
