/* majlis.click — Tema Zamrud (paparan kad tetamu) */
:root {
  /* Tema Zamrud (lalai). Tema lain menukar pembolehubah ini dalam assets/tema-*.css */
  --bg: #0F3B30;
  --bg-image: radial-gradient(rgba(201,164,92,0.22) 1px, transparent 1.6px), radial-gradient(rgba(201,164,92,0.12) 1px, transparent 1.6px);
  --bg-size: 26px 26px, 17px 17px;
  --bg-pos: 0 0, 9px 13px;
  --text: #F4ECD8;          /* teks atas latar */
  --text-mute: #CFC3A4;
  --accent: #C9A45C;        /* garisan, ornamen, butang utama */
  --accent-lt: #E3C88A;     /* teks sorotan (eyebrow, nama) */
  --on-accent: #0A2A22;     /* teks atas butang --accent */
  --script: #F4ECD8;        /* nama pengantin */
  --amp: #C9A45C;
  --panel: #134A3C;         /* kotak kira detik, ucapan, senarai */
  --arch-bg: rgba(10,42,34,0.55);
  --deep: #0A2A22;          /* navigasi bawah */
  --closing-bg: rgba(10,42,34,0.7);
  --nav-icon: #E3C88A;
  --nav-text: #F4ECD8;
  --paper: #F6F0E2;         /* kad kertas (maklumat, borang) */
  --paper-ink: #1D3A31;
  --paper-mute: #4A5A52;
  --paper-line: #E3D7BC;
  --paper-label: #6B5A2E;
  --paper-border: rgba(201,164,92,0.6);
  --field-line: #D9CBA8;
  --primary: #0F3B30;       /* butang gelap & pilihan dalam kertas */
  --on-primary: #F4ECD8;
  --primary-soft: #EAF0EA;
  --overlay: rgba(6,20,16,0.94);
  --radius: 20px;
  --f-body: 'Jost', system-ui, sans-serif;
  --f-serif: 'Cormorant Garamond', Georgia, serif;
  --f-script: 'Pinyon Script', cursive;
  --f-label: 'Jost', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--text); font-family: var(--f-body); font-size: 16px; line-height: 1.55;
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-size: var(--bg-size); background-position: var(--bg-pos);
}
body.is-locked { overflow: hidden; }
a { color: var(--accent-lt); }
a:hover { color: var(--text); }
h2 { margin: 0; font-family: var(--f-serif); font-size: 36px; font-weight: 600; line-height: 1.1; color: var(--text); }
p { margin: 0; }
img { max-width: 100%; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--text-mute); }
.ink-muted { color: var(--paper-mute); }
.small { font-size: 14px; }
.italic { font-style: italic; }
.light { color: var(--text); font-weight: 500; }
.center { text-align: center; }
.center-flex { justify-content: center; }
.center-self { align-self: center; }
.with-icon { display: inline-flex; align-items: center; gap: 6px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: 0.3em; color: var(--accent-lt); }
.divider { color: var(--accent); }
.script { font-family: var(--f-script); font-size: 56px; line-height: 1.05; color: var(--script); position: relative; }
.script-lg { font-size: 60px; }
.amp { font-family: var(--f-serif); font-style: italic; font-size: 26px; line-height: 1; color: var(--amp); position: relative; }

/* ---------- Sampul ---------- */
.cover {
  position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 32px 24px; text-align: center; overflow-y: auto;
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-size: var(--bg-size); background-position: var(--bg-pos);
  transition: opacity .7s ease, transform .7s ease;
}
.cover.is-open { opacity: 0; transform: translateY(-24px); pointer-events: none; }
/* Kandungan sampul: dipusatkan bila muat, boleh diskrol bila skrin pendek */
.cover { justify-content: flex-start; }
.cover-inner { position: relative; z-index: 1; margin: auto 0; display: flex; flex-direction: column; align-items: center; gap: 22px; width: 100%; }
@media (max-height: 740px) {
  .cover { padding-top: 24px; padding-bottom: 24px; }
  .cover-inner { gap: 14px; }
  .arch-cover { min-height: 380px; padding-top: 28px; padding-bottom: 18px; }
  .arch-cover .monogram { width: 54px; height: 54px; font-size: 19px; margin-bottom: 4px; }
  .arch-cover .script { font-size: 46px; }
}
@media (max-height: 600px) {
  .arch-cover { min-height: 330px; }
  .arch-cover .script { font-size: 40px; }
  .guest-name { font-size: 22px; }
}
.corner { position: absolute; color: var(--accent); }
.corner-tl { left: 14px; top: 14px; }
.corner-br { right: 14px; bottom: 14px; transform: rotate(180deg); }
.arch {
  position: relative; width: 290px; min-height: 400px; border: 1.5px solid var(--accent); border-radius: 145px 145px 14px 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 40px 16px 24px;
  background: var(--arch-bg); flex-shrink: 0;
}
.arch::before {
  content: ''; position: absolute; inset: 8px; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 137px 137px 9px 9px; pointer-events: none;
}
.arch-cover { width: 296px; min-height: 470px; }
.monogram {
  width: 70px; height: 70px; border-radius: 999px; border: 1px solid var(--accent); display: flex; align-items: center; justify-content: center;
  font-family: var(--f-serif); font-size: 24px; font-weight: 600; color: var(--accent-lt); letter-spacing: 0.06em; margin-bottom: 8px;
}
.cover-date { font-size: 15px; font-weight: 500; }
.guest-name { font-family: var(--f-serif); font-size: 26px; font-weight: 600; color: var(--text); }

/* ---------- Butang ---------- */
.btn-gold, .btn-dark, .btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px;
  border-radius: 3px; font: 600 13px var(--f-body); letter-spacing: .12em; text-transform: uppercase; text-decoration: none; cursor: pointer; border: none;
}
.btn-gold { background: var(--accent); color: var(--on-accent); }
.btn-gold:hover { background: color-mix(in srgb, var(--accent) 82%, #fff); color: var(--on-accent); }
#open-card { font-size: 14px; padding: 0 36px; min-height: 54px; }
.btn-dark { background: var(--primary); color: var(--on-primary); }
.btn-dark:hover { background: color-mix(in srgb, var(--primary) 85%, #000); color: var(--on-primary); }
.btn-line { background: transparent; border: 1px solid var(--accent); color: var(--accent-lt); font-weight: 500; }
.btn-line:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--text); }
.btn-sm { min-height: 44px; padding: 0 14px; font-size: 13px; }
.btn-full { width: 100%; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--primary); background: transparent; color: var(--primary); font: 600 12px var(--f-body); cursor: pointer;
}
.icon-btn {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent-lt);
  display: flex; align-items: center; justify-content: center;
}
.icon-btn-gold { background: var(--accent); color: var(--on-accent); }
.music-btn {
  position: fixed; top: 16px; right: max(16px, calc(50% - 224px)); z-index: 40; width: 46px; height: 46px; border-radius: 999px;
  border: 1px solid var(--accent); background: color-mix(in srgb, var(--deep) 90%, transparent); color: var(--accent-lt);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.music-btn.is-paused { opacity: 0.6; }
.music-btn.is-playing svg { animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Susun atur ---------- */
.card { max-width: 480px; margin: 0 auto; padding-bottom: 96px; overflow-x: clip; }
.hero { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 56px 24px 48px; text-align: center; }
.bismillah { font-family: 'Amiri', serif; font-size: 28px; color: var(--accent-lt); line-height: 1.4; }
.datebar { display: flex; align-items: center; gap: 16px; margin-top: 4px; }
.datebar-day { font-size: 13px; font-weight: 600; letter-spacing: 0.2em; }
.datebar-date { font-family: var(--f-serif); font-size: 30px; font-weight: 600; }
.vline { width: 1px; height: 36px; background: var(--accent); }
.datebar-hijri { white-space: nowrap; }
/* Skrin sempit: tarikh besar di atas, hari & Hijrah di bawah */
@media (max-width: 400px) {
  .datebar { flex-wrap: wrap; justify-content: center; gap: 4px 12px; }
  .datebar-date { order: -1; flex-basis: 100%; font-size: 32px; }
  .datebar .vline { height: 18px; }
  .datebar .vline-1 { display: none; }
  .datebar-day { order: 0; }
}
@media (max-width: 340px) {
  .bismillah { font-size: 22px; }
  .arch { width: 100%; max-width: 280px; }
  .arch-cover { width: 100%; max-width: 290px; }
  .script { font-size: 48px; }
  .script-lg { font-size: 52px; }
}

.block { display: flex; flex-direction: column; gap: 22px; padding: 40px 20px; }
.block.center { align-items: center; text-align: center; gap: 14px; padding: 40px 28px; }
.sec-head { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.narrow { max-width: 300px; }
.salam { font-family: var(--f-serif); font-style: italic; font-size: 20px; color: var(--accent-lt); }
.hosts { font-family: var(--f-serif); font-size: 24px; font-weight: 600; line-height: 1.3; }
.fullname { font-family: var(--f-serif); font-size: 24px; font-weight: 600; letter-spacing: 0.04em; color: var(--accent-lt); line-height: 1.2; }
.photo-arch {
  width: 280px; height: 360px; border-radius: 140px 140px 14px 14px; overflow: hidden; border: 1.5px solid var(--accent);
  padding: 6px; background: var(--arch-bg);
}
.photo-arch img { width: 100%; height: 100%; object-fit: cover; border-radius: 134px 134px 9px 9px; }

/* Kertas krim */
.paper {
  display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: calc(var(--radius) * .35);
  background: var(--paper); color: var(--paper-ink); border: 1px solid var(--paper-border);
}
.paper.center { align-items: center; }
.paper-tight { padding: 16px; }
.paper a.btn-dark { color: var(--on-primary); }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.k { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; color: var(--paper-label); }
.v { font-size: 15px; font-weight: 500; margin-top: 4px; }
.rule { height: 1px; background: var(--paper-line); }
.timeline { display: flex; flex-direction: column; }
.tl-row { display: flex; gap: 16px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--paper-line); font-size: 15px; }
.tl-row:last-child { border-bottom: none; }
.tl-time { width: 64px; flex-shrink: 0; font-family: var(--f-serif); font-size: 20px; font-weight: 600; color: var(--primary); }

/* Kira detik */
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cd { padding: 14px 0; border-radius: 14px; background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); text-align: center; }
.cd b { display: block; font-family: var(--f-serif); font-size: 36px; font-weight: 600; line-height: 1; }
.cd span { display: block; font-size: 11px; letter-spacing: 0.12em; color: var(--text-mute); margin-top: 4px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.two .btn-line, .two .btn-dark { padding: 0 10px; font-size: 14px; }

/* Lokasi */
.map { width: 100%; height: 200px; border: 0; border-radius: 4px; background: var(--paper-line); }
.venue { padding: 0 4px; }
.venue-name { font-family: var(--f-serif); font-size: 22px; font-weight: 600; }

/* Kisah */
.story { display: flex; flex-direction: column; padding-left: 8px; }
.story-row { display: flex; gap: 18px; position: relative; padding-bottom: 26px; }
.story-row::before { content: ''; position: absolute; left: 6.5px; top: 22px; bottom: 0; width: 1px; background: color-mix(in srgb, var(--accent) 50%, transparent); }
.story-row.last { padding-bottom: 0; }
.story-row.last::before { display: none; }
.story-dot { width: 14px; height: 14px; flex-shrink: 0; border-radius: 999px; background: var(--accent); margin-top: 10px; }
.story-row.last .story-dot { background: transparent; border: 2px solid var(--accent); }
.story-year { font-family: var(--f-serif); font-size: 28px; font-weight: 600; color: var(--accent-lt); }
.story-title { font-size: 16px; font-weight: 600; }

/* Galeri */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.g-item { display: block; height: 170px; border-radius: 4px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.g-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.g-item:hover img { transform: scale(1.04); }
.g-wide { grid-column: span 2; height: 240px; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: var(--overlay); display: flex; align-items: center; justify-content: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-height: 88vh; border-radius: 12px; }
.lb-close { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 999px; border: 1px solid var(--accent); background: transparent; color: #fff; font-size: 28px; cursor: pointer; }

/* Borang RSVP */
.form { gap: 18px; }
.f { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: none; min-width: 0; }
.f label, .f legend, .lbl { font-size: 13px; font-weight: 600; padding: 0; }
.f legend { margin-bottom: 8px; }
.opt { font-weight: 400; color: var(--paper-mute); }
.f input[type=text], .f input[type=tel], .f textarea, .claim-form input {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--field-line); border-radius: 4px; background: #fff;
  font: 16px var(--f-body); color: var(--paper-ink);
}
.f textarea { min-height: 96px; resize: vertical; }
.f input:focus, .f textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg label, .slots label {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 4px;
  border: 1px solid var(--field-line); background: #fff; font-size: 15px; font-weight: 500; cursor: pointer;
}
.seg label:has(input:checked) { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.slots { display: flex; flex-direction: column; gap: 8px; }
.slots label:has(input:checked) { border: 1.5px solid var(--primary); background: var(--primary-soft); }
.seg input, .slots input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.slots input { accent-color: var(--primary); }
.if-attend { display: flex; flex-direction: column; gap: 18px; }
.if-attend[hidden] { display: none; }
.stepper { display: flex; align-items: center; justify-content: space-between; height: 48px; border: 1px solid var(--field-line); border-radius: 4px; background: #fff; }
.stepper button { width: 44px; height: 44px; border: none; background: transparent; font-size: 22px; color: var(--primary); cursor: pointer; }
.stepper input { width: 40px; border: none; text-align: center; font: 600 17px var(--f-body); color: var(--paper-ink); background: transparent; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.hp { position: absolute; left: -9999px; }
.form-error { color: #8A2437; font-size: 14px; font-weight: 500; }
.thanks-script { font-family: var(--f-script); font-size: 48px; color: var(--accent); line-height: 1.1; }
.paper .thanks-script { color: var(--primary); }

/* Ucapan */
.count-pill { padding: 5px 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent); font-size: 12px; color: var(--accent-lt); }
.wishes { display: flex; flex-direction: column; gap: 10px; }
.wish { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: 16px; background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); }
.wish[hidden] { display: none; }
.wish.is-new { border-color: var(--accent); }
.wish-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.wish-name { font-family: var(--f-serif); font-size: 20px; font-weight: 600; color: var(--accent-lt); }
.wish-text { font-size: 15px; overflow-wrap: anywhere; }

/* Salam kaut */
.qr { width: 220px; height: 220px; object-fit: contain; background: #fff; border-radius: 16px; padding: 10px; border: 1px solid var(--paper-line); }
.acct { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.acct-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; text-align: right; }
.acct-row span:first-child { text-align: left; }

/* Senarai (hadiah, hubungi) */
.list { display: flex; flex-direction: column; gap: 10px; }
.item {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; padding: 14px 16px; border-radius: 16px;
  background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.item-icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent-lt); display: flex; align-items: center; justify-content: center; }
.item-body { flex: 1; min-width: 0; }
.item-title { font-size: 16px; font-weight: 600; }
.tag { padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--text) 12%, transparent); font-size: 12px; color: var(--text-mute); }
.claim-form { display: flex; gap: 8px; width: 100%; }
.claim-form[hidden] { display: none; }
.claim-form input { flex: 1; min-width: 0; }

/* Doa & penutup */
.doa-text { font-family: var(--f-serif); font-style: italic; font-size: 21px; line-height: 1.6; }
.closing {
  display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 40px 24px 48px; text-align: center;
  background: var(--closing-bg); border-top: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.made { margin-top: 12px; }
.made a { font-weight: 600; }

/* Navigasi bawah */
.bottom-nav {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 30; width: 100%; max-width: 480px;
  display: grid; align-items: end; padding: 8px 6px calc(12px + env(safe-area-inset-bottom));
  background: var(--deep); border-top: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; min-height: 48px; text-decoration: none; color: var(--nav-icon); }
.bottom-nav a span { font-size: 11px; color: var(--nav-text); }
.bottom-nav .nav-main span:last-child { color: var(--nav-icon); font-weight: 600; }
.nav-bubble {
  width: 54px; height: 54px; margin-top: -26px; border-radius: 999px; background: var(--accent); border: 3px solid var(--deep);
  color: var(--on-accent); display: flex; align-items: center; justify-content: center;
}

/* Bar pratonton (pemilik sahaja) */
.preview-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 70; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 8px 12px; min-height: 60px; background: #2A2233; color: #FAF7FC;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25); font-family: var(--f-body);
}
.preview-info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.preview-info strong { font-size: 15px; }
.preview-info span { font-size: 12px; color: #CFC6DA; }
.preview-actions { display: flex; gap: 8px; flex-shrink: 0; }
.preview-actions form { margin: 0; }
.pv-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid #CFC6DA; background: transparent; color: #FAF7FC; font: 600 14px var(--f-body); text-decoration: none; cursor: pointer;
}
.pv-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.pv-main { background: #EADCFB; border-color: #EADCFB; color: #2A2233; }
.pv-main:hover { background: #fff; color: #2A2233; }
/* Mod sokongan admin: warna berbeza supaya admin sedar ini kad pelanggan */
.preview-bar.is-support { background: #7A3B12; }
.preview-bar.is-support .preview-info span { color: #F6D9BF; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-bar.is-support .pv-main { background: #FCE7D3; border-color: #FCE7D3; color: #5A2A0A; }
/* Pratonton kad Percuma: pilih paparan "With Premium" / "Free" & label Premium pada ciri (pemilik sahaja) */
.pv-info { flex-direction: row; align-items: center; gap: 10px; }
.pv-info > span { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #CFC6DA; white-space: nowrap; }
@media (max-width: 520px) { .pv-info > span { display: none; } }
.pv-seg { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,0.1); }
.pv-seg a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; color: #EDE6F3; font: 600 13px var(--f-body); text-decoration: none; white-space: nowrap; }
.pv-seg a.is-on { background: #F6E7BF; color: #3A2A08; }
.pv-seg a:not(.is-on):hover { background: rgba(255,255,255,0.12); color: #fff; }
@media (max-width: 380px) { .pv-seg a { padding: 0 9px; font-size: 12.5px; } .pv-info + .preview-actions .pv-btn { padding: 0 12px; } }
.pv-tag { display: inline-flex; align-items: center; gap: 5px; margin: 0 auto 10px; padding: 5px 11px; border-radius: 999px; background: #F6E7BF; color: #5E4210;
  font: 700 11px/1.2 var(--f-body); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; box-shadow: 0 2px 10px rgba(94,66,16,0.18); position: relative; z-index: 2; }
.pv-tag span { font-weight: 600; letter-spacing: .02em; text-transform: none; }
.pv-tag svg { flex: none; }
.pv-tag:hover { background: #F2DC9C; color: #4A320A; }
.pv-tag-row { display: flex; justify-content: center; margin: 4px 0; }
.sec-head > .pv-tag { margin-bottom: 8px; }
.preview-flash {
  position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 69; width: calc(100% - 24px); max-width: 456px;
  padding: 12px 16px; border-radius: 12px; background: #EADCFB; color: #2A2233; font-size: 14px; font-weight: 500;
  box-shadow: 0 6px 20px rgba(0,0,0,0.25); animation: flashOut 6s forwards;
}
/* Amaran RSVP untuk pemilik (pratonton): tetamu tidak boleh RSVP */
.preview-warn { position: fixed; top: 60px; left: 0; right: 0; z-index: 69; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 14px; padding: 9px 16px;
  background: #FFF1D6; color: #5A3A0A; font: 500 13.5px/1.4 var(--f-body, sans-serif); text-align: center; border-bottom: 1px solid #F0D9A8; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.preview-warn a { color: #5A3A0A; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.has-pwarn .cover { padding-top: 130px; }
.has-pwarn .card { padding-top: 106px; }
.rsvp-owner-note { margin: 0 0 12px; padding: 10px 14px; border-radius: 10px; background: #FFF1D6; color: #5A3A0A; font: 500 13px/1.45 var(--f-body, sans-serif); text-align: center; }
/* Mod terima kasih (selepas majlis) */
.thanks-hero { margin-top: 6px; font-family: var(--f-script); font-size: 34px; line-height: 1.1; color: var(--script, var(--accent)); }
.invite-guest { display: inline-block; margin: 6px 0 2px; font-family: var(--f-serif); font-size: 1.45em; font-weight: 600; line-height: 1.2; color: var(--text); }
@keyframes flashOut { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
.has-preview .cover { padding-top: 84px; }
.has-preview .card { padding-top: 60px; }
.has-preview .music-btn { top: 72px; }
.has-preview .corner-tl { top: 74px; }

@media (prefers-reduced-motion: reduce) {
  .preview-flash { animation: none; }
  html { scroll-behavior: auto; }
  .cover { transition: none; }
  .music-btn.is-playing svg { animation: none; }
}

/* Tanda air kad Percuma */
/* Watermark kad Percuma: jelas di hujung kad (Pakej B) */
.watermark {
  display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 20px; padding: 18px 20px;
  border-radius: 16px; border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 9%, transparent); color: var(--text); text-decoration: none; font-size: 14px; text-align: center;
}
.watermark strong { display: block; color: var(--accent-lt); font-size: 20px; letter-spacing: .02em; }
.watermark span { margin-top: 2px; padding: 6px 14px; border-radius: 99px; background: var(--primary); color: var(--on-primary); font-weight: 600; font-size: 13px; }
.watermark:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--text); }

/* Notis Premium dalam pratonton */
.premium-note ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.premium-note .btn-dark { color: var(--on-primary); }

/* Kad tamat tempoh / tidak tersedia */
.ended { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px 24px; text-align: center; }
.ended h1 { margin: 0; font-family: var(--f-serif); font-size: 34px; font-weight: 600; }

/* Skrol automatik selepas kad dibuka */
.auto-btn {
  position: fixed; top: 16px; left: max(16px, calc(50% - 224px)); z-index: 40; width: 46px; height: 46px; border-radius: 999px;
  border: 1px solid var(--accent); background: color-mix(in srgb, var(--deep) 90%, transparent); color: var(--accent-lt);
  display: flex; align-items: center; justify-content: center; cursor: pointer; backdrop-filter: blur(4px);
}
.auto-btn[hidden] { display: none; }
.auto-btn .ab-pause, .auto-btn .ab-play { display: flex; }
.auto-btn .ab-play, .auto-btn.is-paused .ab-pause { display: none; }
.auto-btn.is-paused .ab-play { display: flex; }
.auto-btn:not(.is-paused)::after {
  content: ''; position: absolute; inset: -4px; border-radius: 999px; border: 2px solid color-mix(in srgb, var(--accent) 60%, transparent);
  border-right-color: transparent; animation: spin 2.4s linear infinite;
}
.has-preview .auto-btn { top: 72px; }
/* Mod skrin penuh */
:fullscreen body, body:fullscreen { overflow-y: auto; }

/* Siaran langsung */
.live-box { padding-top: 22px; }
.live-dot { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; padding: 5px 12px; border-radius: 999px; background: #C8364B; color: #fff; font: 600 11.5px/1 var(--font-body, 'Jost', sans-serif); letter-spacing: .12em; }
.live-dot span { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: livePulse 1.4s ease-in-out infinite; }
@keyframes livePulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .live-dot span { animation: none; } }

/* Pas masuk QR */
.pass { position: relative; border: 1.5px dashed var(--paper-label); }
.pass .eyebrow { color: var(--paper-label); margin-bottom: 10px; }
.pass-qr { width: 210px; height: 210px; margin: 0 auto; background: #fff; border-radius: 12px; padding: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.pass-qr svg { width: 100%; height: 100%; display: block; }
.pass-code { margin-top: 12px; font: 600 26px/1 ui-monospace, 'SFMono-Regular', Menlo, monospace; letter-spacing: .28em; color: var(--paper-ink); }
.pass-name { margin-top: 8px; font-weight: 600; color: var(--paper-ink); }
.link-plain { background: none; border: 0; color: var(--paper-mute); text-decoration: underline; cursor: pointer; font: inherit; padding: 4px; }

/* Album tetamu */
.album-page { min-height: 100vh; }
.album-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px; border: 1.5px dashed var(--paper-label); border-radius: 16px; color: var(--paper-ink); cursor: pointer; text-align: center; background: color-mix(in srgb, var(--paper) 70%, #fff); }
.album-pick span { font-weight: 600; font-size: 17px; }
.album-pick small { color: var(--paper-mute); }
.album-pick:hover { border-style: solid; }
.album-queue { display: grid; gap: 6px; }
.aq-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; color: var(--paper-mute); padding: 6px 10px; border-radius: 8px; background: rgba(0,0,0,.04); }
.aq-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.aq-st { flex-shrink: 0; }
.aq-row.is-ok .aq-st { color: #1F7A45; font-weight: 600; }
.aq-row.is-bad .aq-st { color: #B83A4E; }
.album-grid .g-item { position: relative; }
.g-by { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 3px 8px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-item.is-new { animation: albumIn .5s ease; }
@keyframes albumIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.album-teaser { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.album-teaser .g-item { height: 104px; border-radius: 12px; }


/* =====================================================================
   Gaya "kad bercetak" (dikongsi semua tema): tipografi, bukan kotak UI
   ===================================================================== */
/* Label bahagian: serif condong berapit garis halus */
.card .sec-head .eyebrow {
  display: flex; align-items: center; gap: 12px; font-family: var(--f-serif); font-style: italic; font-weight: 500;
  font-size: 17px; letter-spacing: .02em; text-transform: none; color: var(--accent-lt);
}
.card .sec-head .eyebrow::before, .card .sec-head .eyebrow::after { content: ''; width: 28px; height: 1px; background: currentColor; opacity: .55; }
.sec-head h2 { font-size: 38px; }

/* Kira detik: nombor serif dipisah garis tegak */
.card .countdown { display: flex; justify-content: center; gap: 0; }
.card .countdown .cd { flex: 1; max-width: 92px; padding: 4px 0 6px; background: none; border: 0; border-radius: 0; box-shadow: none; }
.card .countdown .cd + .cd { border-left: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.card .countdown .cd b { font-size: 44px; font-weight: 500; letter-spacing: -.01em; }
.card .countdown .cd span { font-family: var(--f-serif); font-style: italic; font-size: 15px; letter-spacing: .02em; margin-top: 6px; color: var(--text-mute); }

/* Atur cara: masa serif condong, pemisah bertitik */
.tl-row { border-bottom: 1px dotted var(--paper-line); padding: 12px 0; }
.tl-time { font-style: italic; font-weight: 500; font-size: 21px; color: var(--paper-label); }

/* Ucapan tetamu: petikan, bukan kotak */
.card .count-pill { border: 0; padding: 0; border-radius: 0; background: none !important; font-family: var(--f-serif); font-style: italic; font-size: 16px; color: var(--text-mute); }
.card .wishes { gap: 0; }
.card .wishes .wish {
  background: none; border: 0; border-radius: 0; box-shadow: none; padding: 22px 6px; text-align: center; align-items: center; gap: 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
}
.card .wishes .wish:last-of-type { border-bottom: 0; }
.card .wishes .wish-text { order: -1; font-family: var(--f-serif); font-style: italic; font-size: 20px; line-height: 1.5; color: var(--text); max-width: 380px; }
.card .wishes .wish-text::before { content: '\201C'; } .card .wishes .wish-text::after { content: '\201D'; }
.card .wishes .wish-top { flex-direction: column; align-items: center; gap: 2px; }
.card .wishes .wish-name { font-family: var(--f-body); font-size: 12.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-lt); }
.card .wishes .wish-name::before { content: '\2014\00a0'; }
.card .wishes .wish-top .small { font-size: 12.5px; }
.card .wishes .wish.is-new .wish-text { color: var(--accent-lt); }

/* Wakil keluarga: senarai bergaris */
.card #hubungi .list { gap: 0; border-top: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.card #hubungi .item { background: none; border: 0; border-radius: 0; box-shadow: none; padding: 16px 2px; border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.card #hubungi .item-title { font-family: var(--f-serif); font-size: 21px; font-weight: 600; }
.card #hubungi .icon-btn { width: 40px; height: 40px; }

/* Butang dua lajur (kalendar, peta) lebih halus */
.two .btn-line, .two .btn-dark { font-size: 11.5px; letter-spacing: .06em; white-space: nowrap; padding: 0 8px; gap: 6px; }
.qr { border-radius: 4px; }
.music-btn, .icon-btn, .nav-bubble { border-radius: 999px; }

/* Sembunyi bar skrol (kad tetap boleh diskrol); ornamen sampul tidak boleh menolak lebar */
html, .cover { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, .cover::-webkit-scrollbar { display: none; width: 0; height: 0; }
.cover { overflow-x: hidden; }
body { overflow-x: hidden; }

/* Latar hiasan halaman (ditetapkan oleh setiap tema melalui --page-orn / --page-wash) */
.card { position: relative; z-index: 1; }
body::before, body::after {
  content: ''; position: fixed; z-index: 0; pointer-events: none; width: 210px; height: 210px;
  background: var(--page-orn, none) no-repeat center / contain; opacity: var(--page-orn-op, .14);
}
body::before { right: -30px; top: 60px; transform: rotate(90deg); }
body::after { left: -30px; bottom: 80px; transform: rotate(-90deg); }
@media (min-width: 700px) { body::before, body::after { width: 280px; height: 280px; opacity: calc(var(--page-orn-op, .14) * 1.4); } body::before { right: calc(50% - 480px); } body::after { left: calc(50% - 480px); } }
body.is-locked::before, body.is-locked::after { display: none; }
body.t-zamrud { --page-orn: url('hiasan/garis-emas.svg'); --page-orn-op: .28; }
.slots label.is-full { opacity: .5; cursor: not-allowed; text-decoration: line-through; text-decoration-thickness: 1px; }
.slot-note { font-style: normal; font-size: 12px; margin-left: auto; color: var(--accent, currentColor); text-decoration: none; display: inline-block; }
.pin-gate .pin-form { width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.pin-gate .pin-form input { text-align: center; font-size: 26px; letter-spacing: .5em; padding: 12px 10px 12px calc(10px + .5em); }
.pin-gate .form-error { margin: 0; }
.pin-gate .pin-lock { color: var(--accent-lt); margin-bottom: 4px; }
/* Satu nama (aqiqah / tuan rumah) */
.script-solo { line-height: 1.1; padding: 6px 0; }
.script-long { font-size: 44px !important; }
.script-lg.script-long { font-size: 48px !important; }
.occasion { margin-top: 6px; font-size: 15px; }

/* Majlis intimate (kad ber-PIN) */
.intimate-tag { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 10.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-lt); }
.intimate-tag::before, .intimate-tag::after { content: ""; width: 14px; height: 1px; background: currentColor; opacity: .6; }

/* Album tetamu: 2 slot gambar setiap tetamu */
.album-form { display: flex; flex-direction: column; gap: 14px; }
.album-intro h3 { margin: 0 0 4px; font-family: var(--f-serif); font-size: 22px; font-weight: 600; color: var(--paper-ink); text-align: center; }
.album-intro p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--paper-mute); text-align: center; }
.album-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.a-slot { position: relative; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden; background: color-mix(in srgb, var(--paper) 70%, #fff); }
.a-add { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 1.5px dashed var(--paper-label); border-radius: 14px; color: var(--paper-label); cursor: pointer; font-weight: 600; font-size: 14.5px; }
.a-add:hover { border-style: solid; }
.a-slot.is-filled img { width: 100%; height: 100%; object-fit: cover; display: block; }
.a-remove { position: absolute; right: 8px; bottom: 8px; border: 0; border-radius: 99px; padding: 6px 12px; background: rgba(0,0,0,.6); color: #fff; font: 600 12.5px var(--f-body); cursor: pointer; }
.a-note { position: absolute; left: 8px; top: 8px; right: 8px; padding: 4px 8px; border-radius: 8px; background: rgba(0,0,0,.6); color: #fff; font-size: 11.5px; text-align: center; }
.a-slot.is-busy { display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--paper-label); }
.a-wait { font-size: 13.5px; color: var(--paper-mute); animation: aPulse 1.2s ease-in-out infinite alternate; }
@keyframes aPulse { from { opacity: .45; } to { opacity: 1; } }
.a-status { margin: 0; text-align: center; font-size: 14px; color: var(--paper-ink); }

/* Guestbook: ucapan */
.gb-wish { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; scroll-margin-top: 16px; }
.gb-wish h3 { margin: 0; font-family: var(--f-serif); font-size: 22px; font-weight: 600; color: var(--paper-ink); text-align: center; }
.gb-wish > p { text-align: center; }
.gb-wish-ok { margin: 0; text-align: center; font-weight: 600; color: #1F7A45; }

/* Pratonton langsung (borang): kemas kini tanpa kesan pudar sampul */
.is-live.live-settled .cover { transition: none; }
.hosts-join { margin: 8px 0; letter-spacing: .04em; }

/* ===================== Bar pratonton: pilihan Premium/Free lebih jelas (7 Okt 2026) ===================== */
.pv-info { flex-direction: column; align-items: flex-start; gap: 2px; }
.pv-info > .pv-cap { display: block; font-size: 10px; line-height: 1; letter-spacing: .1em; text-transform: uppercase; color: #F6E7BF; font-weight: 600; }
.pv-seg { padding: 3px; background: #FFFFFF; box-shadow: 0 0 0 2px rgba(246,231,191,.55); }
.pv-seg a { min-height: 32px; padding: 0 14px; gap: 5px; color: #4A3E58; font-weight: 700; }
.pv-seg a svg { flex: none; }
.pv-seg a.is-on { background: linear-gradient(135deg, #F3D98E, #D9AE4E); color: #3A2A08; box-shadow: 0 2px 8px rgba(160,120,30,.35); }
.pv-seg a:not(.is-on):hover { background: #F3EEF7; color: #2A2233; }
@media (min-width: 761px) { .pv-info { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); align-items: center; } .pv-info + .preview-actions { margin-left: auto; } }
@media (max-width: 380px) { .pv-seg a { padding: 0 10px; } }

/* ===================== Sampul salam kaut beranimasi ===================== */
.ang { display: flex; flex-direction: column; align-items: center; }
.ang-env { position: relative; display: block; width: min(280px, 80%); aspect-ratio: 3 / 2; margin: 34px auto 6px; padding: 0; border: 0; background: none; cursor: pointer; perspective: 900px; -webkit-tap-highlight-color: transparent; animation: ang-bob 3.2s ease-in-out infinite; }
.ang-env:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 12px; }
.ang-env > span { position: absolute; display: block; }
.ang-back { inset: 0; border-radius: 12px; background: color-mix(in srgb, var(--accent) 78%, #000 10%); box-shadow: 0 18px 40px color-mix(in srgb, var(--accent) 35%, transparent); }
.ang-letter { left: 8%; right: 8%; top: 9%; height: 78%; border-radius: 8px; background: var(--paper, #fff); color: var(--paper-ink, #333); display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 4px; box-shadow: 0 2px 10px rgba(0,0,0,.12); transition: transform .7s cubic-bezier(.2,.8,.2,1) .35s, opacity .4s ease .9s; }
.ang-l1 { font: 600 11px var(--f-body); letter-spacing: .22em; text-transform: uppercase; color: var(--accent-lt, var(--accent)); }
.ang-l2 { font-family: var(--f-script); font-size: 26px; line-height: 1.1; padding: 0 8px; text-align: center; color: var(--script, var(--text)); }
.ang-front { inset: 0; border-radius: 12px; background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 55%, #fff), var(--accent)); clip-path: polygon(0 34%, 50% 66%, 100% 34%, 100% 100%, 0 100%); }
.ang-front::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 6px, transparent 6px 14px); }
.ang-flap { left: 0; right: 0; top: 0; height: 66%; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 45%, #fff), color-mix(in srgb, var(--accent) 88%, #fff)); clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: 50% 0; transform: rotateX(0deg); z-index: 3; transition: transform .55s cubic-bezier(.5,0,.3,1), z-index 0s linear .28s; }
.ang-seal { left: 50%; top: 66%; z-index: 4; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; display: flex !important; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--primary) 70%, #fff), var(--primary)); color: var(--on-primary, #fff); font: 600 15px var(--f-serif); letter-spacing: .02em; box-shadow: 0 4px 12px rgba(0,0,0,.25), inset 0 0 0 3px rgba(255,255,255,.25); transition: transform .35s ease, opacity .3s ease; }
.ang-hint { margin: 4px 0 0; }
.ang-body { width: 100%; }
/* dibuka */
.ang.is-open .ang-env { animation: none; }
.ang.is-open .ang-seal { transform: scale(1.5); opacity: 0; }
.ang.is-open .ang-flap { transform: rotateX(178deg); z-index: 0; }
.ang.is-open .ang-letter { transform: translateY(-34%) scale(1.04); opacity: 0; z-index: 2; }
.ang.is-open .ang-hint { opacity: 0; transition: opacity .3s; }
.ang.is-done .ang-env, .ang.is-done .ang-hint { display: none; }
.ang-body.ang-in { animation: ang-in .6s cubic-bezier(.2,.8,.2,1) both; }
.ang-spark { position: absolute; left: 50%; top: 40%; width: 10px; height: 10px; pointer-events: none; background: var(--accent); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: ang-spark .9s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes ang-bob { 0%, 70%, 100% { transform: translateY(0) rotate(0); } 78% { transform: translateY(-4px) rotate(-1.5deg); } 86% { transform: translateY(-2px) rotate(1.5deg); } }
@keyframes ang-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes ang-spark { 0% { transform: translate(-50%, -50%) scale(0); opacity: 1; } 100% { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1) rotate(90deg); opacity: 0; } }

/* ===================== Butang love ===================== */
.love-btn { position: fixed; right: max(14px, calc(50% - 226px)); bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 35; width: 48px; height: 48px; border-radius: 50%; padding: 0; border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--deep, #fff) 92%, transparent); box-shadow: 0 8px 22px rgba(0,0,0,.16); display: flex; align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; backdrop-filter: blur(4px); }
.love-ico { fill: #E8476F; transition: transform .15s ease; filter: drop-shadow(0 1px 1px rgba(150,20,60,.25)); }
.love-btn:active .love-ico, .love-btn.is-pop .love-ico { transform: scale(1.25); }
.love-n { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); min-width: 0; padding: 1px 7px; border-radius: 999px; background: #E8476F; color: #fff; font: 700 11px/1.4 var(--f-body); white-space: nowrap; font-variant-numeric: tabular-nums; box-shadow: 0 2px 6px rgba(150,20,60,.3); }
.love-n:empty { display: none; }
.is-locked .love-btn { display: none; }
.love-fx { position: fixed; z-index: 34; width: 28px; height: 28px; pointer-events: none; will-change: transform, opacity; animation: love-up 1.5s cubic-bezier(.25,.6,.35,1) forwards; }
.love-fx svg { width: 100%; height: 100%; display: block; }
@keyframes love-up {
  0% { transform: translate(0, 0) scale(.4); opacity: 0; }
  12% { opacity: 1; transform: translate(calc(var(--dx) * .15), -24px) scale(1); }
  100% { transform: translate(var(--dx), -260px) scale(var(--s)) rotate(var(--r)); opacity: 0; }
}

/* ===================== Bingkai selfie ===================== */
.sf-block .btn-gold { margin-top: 4px; }
.sf-note { margin: 10px 0 0; }
/* Selfie (3 Nov 2026): contoh hasil, lencana "Hari ini", kiraan tetamu */
.sf-demo { position: relative; width: min(56vw, 215px); aspect-ratio: 9 / 16; margin: 6px auto 26px; }
.sf-demo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 14px; opacity: 0; transform: rotate(-3deg) translateY(10px); transition: opacity .6s ease, transform .6s ease;
  box-shadow: 0 22px 44px rgba(40, 20, 30, .26), 0 0 0 1px rgba(255, 255, 255, .5); }
.sf-demo.is-on img { opacity: 1; transform: rotate(-3deg); animation: sfFloat 4.5s ease-in-out .6s infinite; }
.sf-demo::before { content: ''; position: absolute; inset: 0; border-radius: 14px; transform: rotate(-3deg); background: color-mix(in srgb, var(--accent) 10%, transparent); transition: opacity .6s ease; }
.sf-demo.is-on::before { opacity: 0; }
.sf-demo-tag { position: absolute; z-index: 2; top: 14px; left: -14px; background: var(--accent); color: var(--on-accent); font: 600 10.5px/1 var(--f-body); letter-spacing: .16em; text-transform: uppercase;
  padding: 7px 11px; border-radius: 30px; transform: rotate(-8deg); box-shadow: 0 6px 14px rgba(0, 0, 0, .18); opacity: 0; transition: opacity .4s ease .5s; }
.sf-demo.is-on .sf-demo-tag { opacity: 1; }
@keyframes sfFloat { 50% { transform: rotate(-3deg) translateY(-7px); } }
.sf-live { display: inline-flex; align-items: center; gap: 7px; font: 600 11px/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); padding: 7px 12px; border-radius: 30px; margin-bottom: 12px; }
.sf-live i { width: 7px; height: 7px; border-radius: 50%; background: #E0475B; animation: sfPulse 1.6s infinite; }
@keyframes sfPulse { 0% { box-shadow: 0 0 0 0 rgba(224, 71, 91, .6); } 70%, 100% { box-shadow: 0 0 0 7px rgba(224, 71, 91, 0); } }
.sf-proof { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 14px; margin: -6px 0 16px; color: var(--text); }
.sf-proof[hidden] { display: none; }
.sf-proof-ic { width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); display: grid; place-items: center; }
.sf-proof b { font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .sf-demo.is-on img, .sf-live i { animation: none; } }
body.sf-open { overflow: hidden; }
.sf { position: fixed; inset: 0; z-index: 95; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px 12px calc(14px + env(safe-area-inset-bottom)); background: #120E16; color: #fff; font-family: var(--f-body); }
.sf[hidden] { display: none; }
.sf-stage { position: relative; height: min(calc(100dvh - 150px), calc((100vw - 24px) * 16 / 9)); aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #2A2430; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.sf-stage video, .sf-stage img, .sf-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sf-stage video.is-mirror { transform: scaleX(-1); }
/* Kamera: gambar utama muat lebar (tidak dizum, kedudukan oleh selfie.js), latar = video sama dikaburkan */
.sf-stage video.sf-fg { object-fit: fill; }
.sf-stage video.sf-bg { filter: blur(22px) brightness(.62); transform: scale(1.12); }
.sf-stage video.sf-bg.is-mirror { transform: scale(-1.12, 1.12); }
.sf-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.sf-flash.is-on { animation: sf-flash .45s ease-out; }
@keyframes sf-flash { 0% { opacity: .9; } 100% { opacity: 0; } }
.sf-msg { position: absolute; left: 10%; right: 10%; top: 40%; text-align: center; font-size: 15px; line-height: 1.5; color: #F3EEF7; }
.sf-msg:empty { display: none; }
.sf-bar { display: flex; align-items: center; justify-content: center; gap: 26px; min-height: 76px; }
.sf-bar[hidden], .sf-after[hidden] { display: none; }
.sf-ico { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.sf-ico:hover { background: rgba(255,255,255,.24); }
.sf-shutter { width: 72px; height: 72px; border-radius: 50%; border: 4px solid #fff; background: rgba(255,255,255,.25); cursor: pointer; padding: 0; box-shadow: inset 0 0 0 4px #120E16; }
.sf-shutter:active { background: #fff; }
.sf-shutter:disabled { opacity: .4; cursor: default; }
.sf-pick { position: relative; overflow: hidden; }
.sf-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sf-after { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; max-width: 440px; }
.sf-btn { flex: 1 1 0; min-width: 120px; min-height: 48px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.3); background: transparent; color: #fff; font: 600 14.5px var(--f-body); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.sf-btn.is-main { background: #fff; color: #1E1824; border-color: #fff; }
.sf-btn.is-wide { flex-basis: 100%; }
.sf-btn:disabled { opacity: .55; cursor: default; }
.sf-toast { min-height: 20px; margin: 0; font-size: 13.5px; color: #E9E2F0; text-align: center; }
.sf-x { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .ang-env { animation: none; }
  .ang-flap, .ang-letter, .ang-seal { transition: none; }
  .ang-body.ang-in { animation: none; }
  .love-fx { animation-duration: .01s; }
}

/* ===================== Navigasi: butang Selfie + petunjuk sekali (7 Okt 2026) ===================== */
.bottom-nav .nav-ic { position: relative; display: inline-flex; }
.nav-dot { position: absolute; top: -3px; right: -5px; width: 9px; height: 9px; border-radius: 50%; background: #E8476F; box-shadow: 0 0 0 2px var(--deep); }
.nav-dot::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: #E8476F; animation: nav-dot 1.8s ease-out infinite; }
@keyframes nav-dot { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(2.6); opacity: 0; } }
body.sf-seen .nav-dot { display: none; }
.bottom-nav .nav-sf span:last-child { font-weight: 600; }
.sf-tip { position: fixed; z-index: 60; bottom: calc(84px + env(safe-area-inset-bottom)); left: 50%; transform: translate(-50%, 8px); opacity: 0; transition: opacity .3s ease, transform .3s ease;
  display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 16px; border: 0; border-radius: 14px; background: #2A2233; color: #fff; font-family: var(--f-body); text-align: center; cursor: pointer; box-shadow: 0 12px 28px rgba(0,0,0,.28); white-space: nowrap; }
.sf-tip.is-on { opacity: 1; transform: translate(-50%, 0); }
.sf-tip b { font-size: 13.5px; font-weight: 600; }
.sf-tip span { font-size: 12px; color: #D9CFE3; }
.sf-tip::after { content: ''; position: absolute; left: calc(50% + var(--ax, 0px)); bottom: -6px; width: 12px; height: 12px; margin-left: -6px; background: #2A2233; transform: rotate(45deg); border-radius: 2px; }
@media (prefers-reduced-motion: reduce) { .nav-dot::after { animation: none; } .sf-tip { transition: none; } }

/* Kata aluan penganjur (majlis korporat, 13 Okt 2026): teks panjang dipendekkan, "Baca selanjutnya" membuka dengan lancar */
.welcome { padding: 28px 24px; color: var(--paper-ink); }
.welcome-photo { width: 132px; height: 132px; margin: 0 auto 18px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 3px var(--paper), 0 0 0 4px var(--accent), 0 10px 26px rgba(0,0,0,.18); }
.welcome-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.welcome-body { font-family: var(--f-serif, Georgia, serif); font-size: 17px; line-height: 1.7; text-align: left; overflow: hidden; transition: max-height .55s cubic-bezier(.4, 0, .2, 1); }
.welcome-body p { margin: 0 0 12px; }
.welcome-body p:last-child { margin-bottom: 0; }
.welcome-body.is-clamped { -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); }
.welcome-more { display: block; margin: 10px auto 0; background: none; border: 0; padding: 8px 14px; font: 600 12px/1 var(--f-label, var(--f-body, sans-serif)); letter-spacing: .14em; text-transform: uppercase; color: var(--paper-label); cursor: pointer; }
.welcome-more::after { content: ''; display: inline-block; width: 6px; height: 6px; margin: 0 0 3px 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); transition: transform .3s ease; }
.welcome-more[aria-expanded="true"]::after { transform: rotate(-135deg); margin-bottom: -1px; }
.welcome-sign { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--paper-line); text-align: center; }
.welcome-name { font-family: var(--f-label, var(--f-serif)); font-weight: 600; letter-spacing: .04em; color: var(--paper-ink); }
.welcome-sign .muted { color: var(--paper-mute); }

/* Borang ucapan sahaja (RSVP dimatikan) */
.wish-form, #wish-thanks { margin-bottom: 18px; }

/* Draf belum diterbit dalam pratonton (14 Okt 2026): status jelas + panduan 4 langkah */
.preview-info.is-draft strong { display: flex; align-items: center; gap: 7px; color: #FFE3A6; }
.preview-info.is-draft span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-dot { width: 8px; height: 8px; border-radius: 50%; background: #F5B83D; box-shadow: 0 0 0 3px rgba(245,184,61,.25); flex: none; }
@media (max-width: 400px) { .preview-info.is-draft strong { font-size: 14px; } .preview-info.is-draft span { font-size: 11.5px; } }
.pv-pubform { margin: 0; }
.pv-pulse { animation: pvPulse 1.8s ease-out 1s 3; }
@keyframes pvPulse { 0% { box-shadow: 0 0 0 0 rgba(234,220,251,.75); } 70%, 100% { box-shadow: 0 0 0 12px rgba(234,220,251,0); } }
.pv-guide { position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  background: rgba(20,14,26,0); transition: background .26s ease; font-family: var(--f-body, sans-serif); }
.pv-guide.is-open { background: rgba(20,14,26,.55); }
.pv-guide[hidden] { display: none; }
.pv-guide-box { width: 100%; max-width: 420px; background: #fff; color: #2A2233; border-radius: 22px; padding: 22px 20px 16px; box-shadow: 0 20px 60px rgba(0,0,0,.35);
  transform: translateY(24px); opacity: 0; transition: transform .26s cubic-bezier(.2,.8,.3,1), opacity .2s ease; outline: none; }
.pv-guide.is-open .pv-guide-box { transform: none; opacity: 1; }
@media (min-width: 600px) { .pv-guide { align-items: center; } }
.pv-guide-k { margin: 0 0 4px; font: 700 11px/1 var(--f-body, sans-serif); letter-spacing: .12em; text-transform: uppercase; color: #1F8A4C; }
.pv-guide h2 { margin: 0 0 6px; font: 700 20px/1.25 var(--f-body, sans-serif); color: #2A2233; letter-spacing: 0; text-transform: none; }
.pv-guide-p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; color: #5E566B; }
.pv-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.pv-steps li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: #5E566B; }
.pv-steps em { font-style: normal; font-size: 12px; font-weight: 600; color: #8A6A1E; background: #FFF3D6; padding: 2px 8px; border-radius: 99px; margin-left: 4px; white-space: nowrap; }
.pv-n { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 700 12.5px/1 var(--f-body, sans-serif); background: #F1ECF6; color: #6F6680; }
.pv-steps .is-done { color: #2A2233; }
.pv-steps .is-done .pv-n { background: #1F8A4C; color: #fff; }
.pv-steps .is-now { color: #2A2233; font-weight: 600; }
.pv-steps .is-now .pv-n { background: #2A2233; color: #fff; }
.pv-guide-acts { display: grid; gap: 8px; }
.pv-guide-acts form { margin: 0; }
.pv-gbtn { display: flex; width: 100%; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1.5px solid #D9CEE6;
  background: #fff; color: #2A2233; font: 600 15px var(--f-body, sans-serif); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pv-gbtn:hover { background: #F8F5FB; color: #2A2233; }
.pv-gbtn.is-main { background: #2A2233; border-color: #2A2233; color: #fff; }
.pv-gbtn.is-main:hover { background: #3B3047; color: #fff; }
.pv-gbtn:focus-visible { outline: 2px solid #8A5A74; outline-offset: 2px; }
.pv-guide-f { margin: 12px 0 0; font-size: 12.5px; color: #8A8296; text-align: center; }
@media (prefers-reduced-motion: reduce) { .pv-pulse { animation: none; } .pv-guide, .pv-guide-box { transition: none; } }
.pv-info > .pv-cap.is-draft { display: inline-flex; align-items: center; gap: 6px; color: #FFE3A6; }
.pv-cap .pv-dot { width: 7px; height: 7px; box-shadow: 0 0 0 2px rgba(245,184,61,.25); }
.hero-intimate { display: flex; justify-content: center; margin: 4px auto 14px; color: var(--accent); }
/* Kad intimate dibuka selepas skrin PIN: sampul biasa tidak berkelip sebelum dibuka */
.opener[data-skip] ~ .cover, .opener[data-skip] + .cover { visibility: hidden; }
/* WhatsApp support dalam panel terbit (14 Okt 2026) */
.pv-guide-box { max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
.wa-help { display: flex; align-items: center; gap: 12px; min-height: 48px; text-decoration: none; -webkit-tap-highlight-color: transparent; font-family: var(--f-body, sans-serif); }
.wa-help-guide { margin-top: 12px; padding: 10px 12px; border-radius: 14px; background: #EEF8F1; border: 1px solid #CFEBD9; color: #2A2233; }
.wa-help-guide:hover { background: #E3F4E9; color: #2A2233; }
.wa-help-ico { width: 38px; height: 38px; border-radius: 50%; background: #1FA855; color: #fff; display: grid; place-items: center; flex: none; }
.wa-help-t { flex: 1; min-width: 0; line-height: 1.3; }
.wa-help-guide .wa-help-t b { display: block; font-size: 14.5px; color: #2A2233; }
.wa-help-guide .wa-help-t small { display: block; font-size: 12.5px; color: #6F6680; }
.wa-help-go { flex: none; color: #1A8A47; }
@media (max-height: 640px) { .pv-guide-box { padding-top: 16px; } .pv-guide h2 { font-size: 18px; } .pv-steps { gap: 5px; margin-bottom: 12px; } .pv-gbtn { min-height: 44px; } }

/* Latar pemandangan tema Kad 3D (theme_page_bg): telefon = pudar di belakang tulisan; skrin lebar = jelas di sisi, kad di atas panel lembut */
.pg-bg { --pg-veil: color-mix(in srgb, var(--bg) 78%, transparent);
  position: fixed; inset: 0; z-index: 0; pointer-events: none; transform: translateZ(0);
  background: linear-gradient(var(--pg-veil), var(--pg-veil)), var(--pg-img, none) center / cover no-repeat; }
@media (min-width: 600px) {
  .pg-bg { --pg-veil: color-mix(in srgb, var(--bg) 26%, transparent); }
  .has-pgbg .card { background: color-mix(in srgb, var(--bg) 90%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent), 0 24px 70px rgba(0, 0, 0, .16); }
}
.cover-yr, .cx-fx { display: none; } /* hiasan tema korporat cx (dipapar oleh tema itu sahaja) */

/* ---------- Ucapan tetamu (3 Nov 2026): cip ucapan, nota dinding, love & balasan, notifikasi, kad "Saya mendoakan" ---------- */
.wish-chips { margin: 2px 0 8px; }
.wish-chips-l { margin: 0 0 7px; font-size: 12.5px; color: var(--text-mute); }
.wish-chips-row { display: flex; flex-wrap: wrap; gap: 7px; }
.wish-chip { appearance: none; border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent); background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 7px 12px; font: 500 13px/1.2 var(--f-body); cursor: pointer; transition: background .15s, color .15s, box-shadow .15s; -webkit-tap-highlight-color: transparent; }
.wish-chip:hover { border-color: var(--primary); }
.wish-chip.is-on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 6px 14px color-mix(in srgb, var(--primary) 30%, transparent); }
.wish-chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.wish-wall-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 0; color: var(--text-mute); text-align: center; }
.wish-loved { display: inline-flex; align-items: center; gap: 4px; align-self: center; padding: 3px 10px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font: 600 11px/1.4 var(--f-body); letter-spacing: .02em; }
.wish-loved svg { fill: currentColor; stroke: none; }
.wish.is-loved { position: relative; }
.wish-reply { align-self: stretch; max-width: 380px; margin: 4px auto 0; padding: 10px 14px; border-left: 2px solid var(--accent); border-radius: 0 12px 12px 0; background: color-mix(in srgb, var(--accent) 9%, transparent); text-align: left; font-size: 14px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.wish-reply b { display: block; font-family: var(--f-script); font-weight: 400; font-size: 22px; line-height: 1.15; color: var(--script); margin-bottom: 2px; }
.wish-toast { position: fixed; z-index: 9990; left: 50%; top: calc(12px + env(safe-area-inset-top)); width: min(92vw, 400px); transform: translate(-50%, -14px); opacity: 0; pointer-events: none; transition: opacity .3s ease, transform .3s ease;
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 0; border-radius: 16px; background: rgba(36,26,31,.92); color: #fff; text-align: left; font: 500 13.5px/1.35 var(--f-body); box-shadow: 0 14px 30px rgba(0,0,0,.25); cursor: pointer; }
.wish-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.wish-toast i { font-style: normal; font-size: 20px; flex: none; }
.wish-toast b { font-weight: 600; }
.wish-toast small { display: block; font-size: 12px; color: rgba(255,255,255,.72); }
.mdoa { position: fixed; inset: 0; z-index: 9995; display: flex; align-items: flex-end; justify-content: center; background: rgba(20,14,18,.62); opacity: 0; transition: opacity .25s ease; }
.mdoa[hidden] { display: none; }
.mdoa.is-on { opacity: 1; }
.mdoa-sheet { position: relative; width: 100%; max-width: 460px; max-height: 94dvh; overflow-y: auto; padding: 22px 20px calc(20px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #FFFDFB; color: #2B2228; text-align: center; font-family: var(--f-body); transform: translateY(30px); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.mdoa.is-on .mdoa-sheet { transform: none; }
.mdoa-x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #F1ECEE; color: #2B2228; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.mdoa-title { margin: 0; padding: 0 40px; font-family: var(--f-script); font-weight: 400; font-size: 40px; line-height: 1.15; color: #5A3A48; }
.mdoa-sent { margin: 6px 0 2px; font-size: 14px; color: #2B2228; }
.mdoa-lead { margin: 0 0 14px; font-size: 13px; color: #7A6F74; }
.mdoa-img { display: block; width: min(56vw, 230px); height: auto; max-width: none; aspect-ratio: 9 / 16; margin: 0 auto 16px; border-radius: 14px; background: var(--bg); box-shadow: 0 18px 40px rgba(0,0,0,.22); object-fit: cover; }
.mdoa-btns { display: grid; gap: 9px; }
.mdoa-btn { min-height: 48px; border-radius: 999px; border: 1px solid #DDD3D7; background: #fff; color: #2B2228; font: 600 14.5px var(--f-body); display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.mdoa-btn.is-main { border: 0; background: var(--primary, #5A3A48); color: var(--on-primary, #fff); box-shadow: 0 10px 22px color-mix(in srgb, var(--primary) 28%, transparent); }
.mdoa-btn:disabled { opacity: .55; cursor: default; }
.mdoa-toast { min-height: 18px; margin: 10px 0 0; font-size: 13px; color: #7A6F74; }
.mdoa-conf { position: absolute; left: 0; right: 0; top: 0; height: 70%; pointer-events: none; overflow: hidden; }
.mdoa-conf i { position: absolute; top: -20px; width: 8px; height: 12px; border-radius: 2px; animation: mdoaFall 2.6s cubic-bezier(.25,.6,.4,1) forwards; }
@keyframes mdoaFall { 0% { transform: translateY(0) rotate(0); opacity: 1; } 100% { transform: translateY(70vh) rotate(540deg); opacity: 0; } }
body.mdoa-open { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .mdoa, .mdoa-sheet, .wish-toast { transition: none; } .mdoa-conf { display: none; } }
