/* Tema: Rumah Gadang — Baralek Gadang adat Minangkabau. Malam bertabur emas dengan siluet rumah bergonjong,
   undangan dibuka sebagai "tur ruangan": 5 ruang (Halaman Istana → Meja Tamu & Kado) dengan tombol Kembali/Lanjut
   (rumah-gadang.js). Tanpa JS bagian-bagian tetap tersusun biasa. Butiran beras berjatuhan.
   Pilihan warna lewat class body .variant-{marawa|songket|bundo}. */
:root, .variant-marawa {
  --bg: #0a0203;
  --room: #200204;
  --room2: #240205;
  --paper: rgba(0, 0, 0, .35);
  --blush: rgba(212, 175, 55, .1);
  --pink: rgba(212, 175, 55, .4);
  --rose: #d4af37;
  --deep: #e5c158;
  --on-deep: #2a0306;
  --ink: #fff8eb;
  --muted: #c9b7a4;
  --gold: #d4af37;
  --gold-hi: #fae29c;
  --gold-rgb: 212 175 55;
  --red: #7d111b;
  --line: rgba(212, 175, 55, .22);
  --shadow: 0 0 0;
  --overlay: 20 2 4;
  --frame: #2a0306;
  --radius: 20px;
  --cover-bg: #0a0203;
  --cover-ink: #fff8eb;
  --dock-bg: rgba(32, 2, 4, .92);
  --script: "Alex Brush", cursive;
  --serif: "Cinzel", Georgia, serif;
  --display: "Playfair Display", Georgia, serif;
  --sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --accent: #d4af37;
}
.variant-songket { --room: #1f1404; --room2: #241806; --red: #6b4a0e; --frame: #2a1d06; --on-deep: #2a1d06; --overlay: 20 12 2; --dock-bg: rgba(31, 20, 4, .92); }
.variant-bundo { --room: #04140f; --room2: #061a13; --red: #0f5a3e; --frame: #082219; --on-deep: #082219; --overlay: 3 16 11; --dock-bg: rgba(4, 20, 15, .92); }

/* ---------- latar malam ---------- */
.theme-rumah-gadang { background: var(--bg); color: var(--ink); }
.rg-scene {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(circle at 50% 120%, rgb(var(--gold-rgb) / .16), transparent 55%),
    linear-gradient(180deg, #120206 0%, #1d0408 45%, var(--bg) 100%);
}
.rg-scene::before {
  /* bintang & motif titik songket */
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgb(var(--gold-rgb) / .35) 1px, transparent 1.2px);
  background-size: 26px 26px;
  mask-image: linear-gradient(#000, transparent 70%); -webkit-mask-image: linear-gradient(#000, transparent 70%);
}
.rg-moon { position: absolute; top: 9%; right: 12%; width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #fff4d1, #e9c773 70%); box-shadow: 0 0 60px 20px rgb(var(--gold-rgb) / .25); opacity: .85; }
.rg-house { position: absolute; left: 50%; bottom: 0; width: max(100%, 900px); height: auto; translate: -50% 0; opacity: .9; }

/* ---------- huruf & tombol ---------- */
.theme-rumah-gadang .kicker { font-family: var(--serif); color: var(--gold); letter-spacing: .26em; font-weight: 700; font-size: .68rem; }
.theme-rumah-gadang .sec-title { font-family: var(--display); font-weight: 700; color: var(--gold-hi); font-size: clamp(1.8rem, 5vw, 2.4rem); }
.theme-rumah-gadang .script { color: var(--gold-hi); }
.theme-rumah-gadang .lead { color: var(--muted); max-width: 46ch; }
.theme-rumah-gadang :is(.btn-open, .btn-main) { background: linear-gradient(90deg, #f59e0b, #fbbf24 50%, #d97706); color: #2a0306; font-weight: 700; box-shadow: 0 10px 26px -8px rgb(245 158 11 / .5); }
.theme-rumah-gadang .btn-soft { background: rgba(255, 255, 255, .06); color: var(--gold-hi); border: 1px solid var(--line); }
.theme-rumah-gadang .btn-soft:hover { background: rgb(var(--gold-rgb) / .16); }
.theme-rumah-gadang .btn-copy { color: var(--gold-hi); border-color: var(--line); }
.theme-rumah-gadang .btn-copy.done { background: var(--gold); color: #2a0306; }

/* ---------- sampul: surat pasambahan ---------- */
.theme-rumah-gadang .cover, .theme-rumah-gadang .cover:not([style]) {
  color: var(--ink);
  background: radial-gradient(circle at 50% 45%, rgb(var(--overlay) / .3), rgb(var(--overlay) / .9) 70%), var(--cover-img, none) var(--cover-pos, center) / cover no-repeat, var(--bg);
}
.theme-rumah-gadang .cover-inner {
  width: min(100%, 480px); max-width: none; padding: 30px 28px 32px; border-radius: 30px;
  background: linear-gradient(180deg, rgb(var(--overlay) / .93), rgba(10, 2, 3, .96));
  border: 2px solid rgb(var(--gold-rgb) / .6); box-shadow: 0 0 0 6px rgba(10, 2, 3, .6), 0 0 0 7px rgb(var(--gold-rgb) / .25), 0 30px 80px rgba(0, 0, 0, .7);
}
.theme-rumah-gadang .cover .deco { display: none; }
.theme-rumah-gadang .cover .kicker { color: var(--gold); }
.theme-rumah-gadang .cover-title { color: var(--gold-hi); font-size: clamp(3rem, 13vw, 4.2rem); text-shadow: 0 0 26px rgb(var(--gold-rgb) / .35); }
.theme-rumah-gadang .cover-date { font-family: var(--serif); font-size: .8rem; letter-spacing: .12em; color: #ead9bd; }
.theme-rumah-gadang .cover-guest { background: rgba(255, 255, 255, .05) !important; border-color: var(--line) !important; }
.theme-rumah-gadang .cover-guest b { font-family: var(--display); color: var(--gold-hi); }
.theme-rumah-gadang .cover .btn-open { width: 100%; letter-spacing: .08em; text-transform: uppercase; }
.rg-crown { display: block; width: 110px; height: 46px; margin: 0 auto -4px; color: var(--gold-hi); filter: drop-shadow(0 0 12px rgb(var(--gold-rgb) / .5)); }
.rg-mono { position: relative; width: 104px; height: 104px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid var(--gold); box-shadow: inset 0 0 0 6px rgba(0, 0, 0, .3), inset 0 0 0 7px rgb(var(--gold-rgb) / .4), 0 0 30px rgb(var(--gold-rgb) / .3); }
.rg-mono::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px dashed rgb(var(--gold-rgb) / .6); animation: ambSpin 30s linear infinite; }
.rg-mono span { font-family: var(--script); font-size: 2.5rem; color: var(--gold-hi); line-height: 1; white-space: nowrap; }
.rg-mono small { font-size: .5em; margin: 0 1px; }

/* ---------- tata letak dasar (tanpa panel kiri) ---------- */
.theme-rumah-gadang .layout { display: block; position: relative; z-index: 1; }
.theme-rumah-gadang .side { display: none; }
.theme-rumah-gadang .content { max-width: 780px; background: transparent; box-shadow: none; }
.theme-rumah-gadang .sec + .sec { border-top: 1px solid var(--line); }
.theme-rumah-gadang .intro { left: 0; width: auto; }
.theme-rumah-gadang .petals { z-index: 30; }

/* ---------- tur ruangan ---------- */
body.rg-tour { overflow: hidden; }
body.rg-tour .dock { display: none; }
.rg-room { position: fixed; inset: 0; z-index: 10; overflow-y: auto; overscroll-behavior: contain; padding: 74px 14px 120px; -webkit-overflow-scrolling: touch; }
.has-demo .rg-room { padding-top: 112px; }
.rg-room:not(.on) { display: none; }
.rg-room.on { animation: rgIn .7s cubic-bezier(.2, .8, .2, 1); }
.rg-room.back { animation-name: rgInBack; }
@keyframes rgIn { from { opacity: 0; transform: translateX(40px) scale(.98); } }
@keyframes rgInBack { from { opacity: 0; transform: translateX(-40px) scale(.98); } }
.rg-card {
  position: relative; max-width: 780px; margin: 0 auto; border-radius: 30px; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--room) 94%, transparent), color-mix(in srgb, var(--room2) 96%, transparent));
  border: 2px solid rgb(var(--gold-rgb) / .55); box-shadow: 0 0 0 6px rgba(10, 2, 3, .55), 0 0 0 7px rgb(var(--gold-rgb) / .2), 0 30px 80px rgba(0, 0, 0, .7);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.rg-card::before {
  /* pita songket di atas kartu */
  content: ""; display: block; height: 10px;
  background: repeating-linear-gradient(90deg, var(--gold) 0 10px, var(--red) 10px 20px, #0a0203 20px 30px);
  opacity: .85;
}
.rg-room-head { padding: 26px 20px 0; text-align: center; }
.rg-room-head p { font-family: var(--serif); font-size: .66rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.rg-room-head h2 { font-family: var(--display); font-weight: 700; color: var(--gold-hi); font-size: clamp(1.6rem, 5vw, 2.2rem); line-height: 1.2; margin-top: 4px; }
.rg-room .sec { padding: 40px 22px; }
.rg-room .sec:first-of-type { padding-top: 24px; }
.rg-room .foot { padding-bottom: 24px; }

.rg-label {
  position: fixed; top: 16px; left: 50%; translate: -50% 0; z-index: 45; display: flex; align-items: center; gap: 10px; white-space: nowrap;
  padding: 8px 16px; border-radius: 99px; background: rgba(10, 2, 3, .82); border: 1px solid var(--line); backdrop-filter: blur(8px);
  font-family: var(--serif); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-hi); font-weight: 700;
}
.has-demo .rg-label { top: 54px; }
.rg-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.rg-label small { padding-left: 10px; border-left: 1px solid var(--line); color: var(--muted); font-size: .66rem; }
.rg-nav {
  position: fixed; left: 50%; bottom: 14px; translate: -50% 0; z-index: 45; display: flex; align-items: center; gap: 12px;
  padding: 8px; border-radius: 99px; background: rgba(10, 2, 3, .88); border: 1px solid rgb(var(--gold-rgb) / .45); backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .8); max-width: calc(100% - 24px);
}
.rg-nav button { border: 0; cursor: pointer; font: 700 .76rem/1 var(--sans); border-radius: 99px; padding: 10px 14px; white-space: nowrap; }
.rg-prev { background: rgba(255, 255, 255, .07); color: var(--gold-hi); }
.rg-next { background: linear-gradient(90deg, #f59e0b, #fbbf24); color: #2a0306; }
.rg-nav button:disabled { opacity: .35; cursor: default; }
.rg-dots { display: flex; gap: 7px; align-items: center; }
.rg-dots button { width: 8px; height: 8px; padding: 0; background: #57534e; }
.rg-dots button.on { width: 12px; height: 12px; background: var(--gold-hi); box-shadow: 0 0 10px var(--gold); }
@media (max-width: 420px) { .rg-next span, .rg-prev span { display: none; } }
body:not(.is-open) :is(.rg-label, .rg-nav) { opacity: 0; pointer-events: none; }
:is(.rg-label, .rg-nav) { transition: opacity .6s .4s; }
.theme-rumah-gadang .music-btn { bottom: 84px; }
.theme-rumah-gadang .music-title { bottom: 90px; }

/* ---------- isi ruangan ---------- */
.theme-rumah-gadang .hero { background: none; }
.theme-rumah-gadang .arch { border-color: var(--gold); border-width: 3px; box-shadow: 0 0 0 6px rgba(0, 0, 0, .35), 0 0 0 7px rgb(var(--gold-rgb) / .4), 0 0 40px rgb(var(--gold-rgb) / .25); background: var(--frame); border-radius: 110px 110px 18px 18px; }
.theme-rumah-gadang .hero-title { color: var(--gold-hi); }
.theme-rumah-gadang .hero-date { font-family: var(--serif); color: var(--ink); letter-spacing: .1em; font-size: 1rem; }
.theme-rumah-gadang .countdown div { background: rgba(0, 0, 0, .35); border-color: var(--line); }
.theme-rumah-gadang .countdown b { font-family: var(--display); color: var(--gold-hi); }
.theme-rumah-gadang .countdown span { color: var(--muted); }
.theme-rumah-gadang .divider-orn { color: var(--gold); }
.theme-rumah-gadang blockquote p { font-family: var(--display); font-style: italic; color: #f3e6cf; font-size: 1.05rem; }

.theme-rumah-gadang .people { display: grid; gap: 16px; justify-items: center; }
.theme-rumah-gadang .people > * { grid-column: 1 / -1; }
@media (min-width: 640px) {
  .theme-rumah-gadang .people:has(.amp):not(:has(.amp ~ .amp)) { grid-template-columns: 1fr 1fr; }
  .theme-rumah-gadang .people:has(.amp):not(:has(.amp ~ .amp)) .person { grid-column: auto; grid-row: 2; }
  .theme-rumah-gadang .people:has(.amp):not(:has(.amp ~ .amp)) .amp { display: none; }
}
.theme-rumah-gadang :is(.person, .event, .wish-form, .wish, .qris, .gift-address, .dresscode, .livestream, .timeline li) {
  background: rgba(0, 0, 0, .35); border: 1px solid var(--line); border-radius: var(--radius);
}
.theme-rumah-gadang .person { width: 100%; max-width: 330px; padding: 26px 18px; }
.theme-rumah-gadang .person-photo { width: 140px; height: 140px; border: 4px solid #2a0306; box-shadow: 0 0 0 2px var(--gold), 0 0 0 8px #2a0306; outline: 2px dashed rgb(var(--gold-rgb) / .7); outline-offset: 10px; margin-bottom: 24px; }
.theme-rumah-gadang .person-name { font-family: var(--display); font-weight: 700; font-size: 1.35rem; color: var(--gold-hi); }
.theme-rumah-gadang .person-full { font-family: var(--display); font-style: italic; font-weight: 500; color: var(--gold); font-size: .95rem; }
.theme-rumah-gadang .person-parents { color: var(--muted); }
.theme-rumah-gadang .ig { background: rgb(var(--gold-rgb) / .1); color: var(--gold-hi); border: 1px solid var(--line); }
.theme-rumah-gadang .amp { color: var(--gold); }

.theme-rumah-gadang .events { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.theme-rumah-gadang .events > * { flex: 0 0 100%; }
.theme-rumah-gadang .events > .event { flex: 1 1 280px; margin: 0; }
.theme-rumah-gadang .event { text-align: left; padding: 24px 20px; }
.theme-rumah-gadang .event h3 { font-family: var(--display); font-weight: 700; color: var(--gold-hi); font-size: 1.35rem; }
.theme-rumah-gadang .event-date { justify-content: flex-start; color: var(--muted); }
.theme-rumah-gadang .event-date b { color: var(--gold-hi); border-color: var(--line); font-family: var(--display); }
.theme-rumah-gadang .event-time { color: var(--gold); }
.theme-rumah-gadang .event-venue { color: var(--ink); }
.theme-rumah-gadang .event-actions { justify-content: flex-start; }
.theme-rumah-gadang .event-actions .btn:first-child { background: linear-gradient(90deg, #f59e0b, #fbbf24); color: #2a0306; border: 0; }
.theme-rumah-gadang :is(.dresscode, .livestream) { padding: 22px; }
.theme-rumah-gadang .dc-title { color: var(--gold-hi); font-family: var(--display); }
.theme-rumah-gadang .dc-swatches i { box-shadow: 0 0 0 3px #2a0306, 0 0 0 4px var(--gold); }

.theme-rumah-gadang .timeline { padding-left: 0; display: grid; gap: 14px; }
.theme-rumah-gadang .timeline::before, .theme-rumah-gadang .timeline li::before { display: none; }
.theme-rumah-gadang .timeline li { padding: 14px 14px 18px; }
.theme-rumah-gadang .timeline h3 { font-family: var(--display); font-weight: 700; color: var(--gold-hi); }
.theme-rumah-gadang .t-date { color: var(--gold); }
@media (min-width: 640px) { .theme-rumah-gadang .timeline { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } }
@media (min-width: 640px) { .theme-rumah-gadang .grid { columns: 3; } }
.theme-rumah-gadang .g-item { background: var(--frame); border: 1px solid var(--line); }

.theme-rumah-gadang .rsvp-stats div { background: rgba(0, 0, 0, .35); border-color: var(--line); }
.theme-rumah-gadang .rsvp-stats b { color: var(--gold-hi); }
.theme-rumah-gadang .wish-form label, .theme-rumah-gadang .chips legend { color: var(--gold-hi); }
.theme-rumah-gadang .wish-form :is(input[type=text], select, textarea) { background: rgba(0, 0, 0, .45); border-color: var(--line); color: var(--ink); }
.theme-rumah-gadang .wish-form select option { background: #200204; }
.theme-rumah-gadang .wish-form :is(input, select, textarea):focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgb(var(--gold-rgb) / .15); }
.theme-rumah-gadang .chips span { border-color: var(--line); background: rgba(0, 0, 0, .3); }
.theme-rumah-gadang .chips input:checked + span { background: var(--gold); color: #2a0306; border-color: var(--gold); }
.theme-rumah-gadang .wish-head b { color: var(--gold-hi); }
.theme-rumah-gadang .wish p { color: #eadfcf; }
.theme-rumah-gadang .tag { background: rgb(var(--gold-rgb) / .14); color: var(--gold-hi); }
.theme-rumah-gadang .tag-hadir { background: rgba(110, 200, 150, .14); color: #8fd6ac; }
.theme-rumah-gadang .tag-tidak { background: rgba(230, 120, 120, .14); color: #f0a3a3; }
.theme-rumah-gadang .form-msg.ok { color: #8fd6ac; }

.theme-rumah-gadang .bank { background: linear-gradient(135deg, #2a0306, var(--red) 70%, #a8841d); border: 1px solid rgb(var(--gold-rgb) / .5); }
.theme-rumah-gadang .qris img { background: #fff; padding: 8px; }
.theme-rumah-gadang .closing { background: radial-gradient(circle at 50% 100%, rgb(var(--gold-rgb) / .12), transparent 65%); }
.theme-rumah-gadang .closing-title { color: var(--gold-hi); }
.theme-rumah-gadang .closing .lead { color: #ead9bd; font-family: var(--display); font-style: italic; }
.theme-rumah-gadang .foot { color: var(--muted); }
.theme-rumah-gadang .foot a { color: var(--gold-hi); }

/* butiran beras berjatuhan */
.theme-rumah-gadang .petals i { width: 4px; height: 9px; border-radius: 50%; background: #f5efe0; opacity: .75; box-shadow: 0 0 4px rgba(255, 255, 255, .4); }
.theme-rumah-gadang .petals i:nth-child(5n) { width: 4px; height: 4px; background: var(--gold-hi); box-shadow: 0 0 8px var(--gold); }

.theme-rumah-gadang [hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .rg-room.on { animation: none; }
  .rg-mono::after { animation: none; }
}
@media (max-width: 600px) { .has-demo .rg-label { top: 96px; } .has-demo .rg-room { padding-top: 144px; } }
.theme-rumah-gadang .cover .btn-open { white-space: nowrap; padding-inline: 16px; font-size: clamp(.7rem, 3.4vw, .85rem); letter-spacing: .05em; }

/* sampul contoh tanpa foto: latar --cover-bg tema ini bukan gambar → lapisan foto dikosongkan, latar tema sendiri yang tampil */
.theme-rumah-gadang .cover.cover-plain { --cover-img: linear-gradient(transparent, transparent) !important; }
