/* =========================================================
   KadOnline — CSS asas kad digital
   Semua warna/font dikawal oleh pemboleh ubah CSS yang
   dijana daripada tetapan reka bentuk pengguna.
   ========================================================= */
:root {
    --primary: #52605f;
    --accent: #be822b;
    --bg: #fdfefe;
    --text: #3a4a48;
    --font-script: 'Great Vibes', cursive;
    --font-serif: 'Cormorant Garamond', serif;
    --font-body: 'Lato', sans-serif;
    --name-size: 48px;
    --overlay: .55;

    --surface: #ffffff;
    --surface-2: color-mix(in srgb, var(--bg) 85%, var(--accent) 6%);
    --line: color-mix(in srgb, var(--accent) 22%, transparent);
    --shadow: 0 4px 24px color-mix(in srgb, var(--primary) 10%, transparent);
    --hero-fade: 255, 255, 255;
    --nav-bg: rgba(255, 255, 255, .96);
    --dark-band: color-mix(in srgb, var(--primary) 85%, #000 15%);
}

body.mode-dark {
    --surface: rgba(255, 255, 255, .06);
    --surface-2: color-mix(in srgb, var(--bg) 92%, #fff 4%);
    --shadow: 0 4px 24px rgba(0, 0, 0, .35);
    --hero-fade: 10, 14, 24;
    --nav-bg: color-mix(in srgb, var(--bg) 92%, transparent);
    --dark-band: color-mix(in srgb, var(--bg) 70%, #000 30%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: #e9e6e1; }
body.mode-dark { background: var(--bg); }
html:has(body.mode-dark) { background: #05070c; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 60px rgba(0, 0, 0, .12);
}
body.locked { overflow: hidden; height: 100vh; }

.font-script { font-family: var(--font-script); }
.font-serif { font-family: var(--font-serif); }

/* ---------- PREVIEW BANNER ---------- */
.preview-banner {
    position: fixed; top: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px; z-index: 10001;
    background: #ffcf33; color: #3a2a00; font-size: 12px; text-align: center; padding: 4px 8px;
}

/* ---------- COVER ---------- */
#cover-screen {
    position: fixed; inset: 0; z-index: 9999;
    width: 100%; max-width: 480px; margin: 0 auto;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--bg-cover, var(--bg)) center/cover no-repeat;
    background-color: var(--bg);
    overflow: hidden;
    transition: opacity .8s ease, transform .8s ease;
}
#cover-screen::before {
    content: ''; position: absolute; inset: 0;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    background: rgba(var(--hero-fade), .25);
}
#cover-screen.hide { opacity: 0; transform: scale(1.05); pointer-events: none; }
.cover-content {
    position: relative; z-index: 2; text-align: center;
    padding: 2rem 2rem; width: 88%; max-width: 360px;
    background: rgba(var(--hero-fade), .35);
    border-radius: 24px; border: 1px solid rgba(255, 255, 255, .55);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
}
.cover-subtitle {
    letter-spacing: 4px; font-size: 14px; font-weight: 700; color: var(--primary);
    text-transform: uppercase; margin-bottom: .8rem;
}
.cover-names { font-family: var(--font-script); font-size: calc(var(--name-size) * 1.05); line-height: 1.15; color: var(--primary); }
.cover-with { font-family: var(--font-serif); font-size: 24px; color: var(--accent); margin: .1rem 0; }
.cover-divider { width: 60px; height: 1px; background: var(--accent); margin: 1.1rem auto; }
.cover-date { font-size: 14px; letter-spacing: 2px; color: var(--primary); text-transform: uppercase; font-weight: 700; }
.open-btn {
    margin-top: 1.6rem; display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 1rem 1.6rem; cursor: pointer; font: inherit;
    background: rgba(255, 255, 255, .3); border: 1.5px solid rgba(255, 255, 255, .65);
    border-radius: 999px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .12); transition: transform .3s ease;
    animation: pulse-soft 2.2s ease-in-out infinite;
}
.open-btn.has-img { border-radius: 50%; padding: 1.2rem 1.4rem; }
.open-btn:hover { transform: scale(1.06); }
.open-btn img { width: 90px; height: 90px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .15)); }
.open-btn i { font-size: 26px; color: var(--accent); }
.open-btn span { font-weight: 700; font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--primary); }
@keyframes pulse-soft { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }

/* ---------- BUNGA BERAYUN (sudut atas-kiri & bawah-kanan) ---------- */
.flower-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.fl-corner { position: absolute; width: 300px; height: 300px; }
.fl-corner.fl-tl { top: -26px; left: -34px; animation: flInTL 1.5s ease-out both; }
/* Sudut bawah-kanan = gugusan sama diputar 180° */
.fl-corner.fl-br { bottom: -26px; right: -34px; transform: rotate(180deg); animation: flInBR 1.5s ease-out both; }
.fl { position: absolute; transform-origin: 0 0; animation: flSway 2s ease-in-out infinite alternate; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .08)); }
.fl svg, .fl img { display: block; width: 100%; height: auto; }
.fl-a { width: 270px; top: 0; left: 0; }
.fl-b { width: 230px; top: 60px; left: -20px; animation-delay: .25s; transform: rotate(8deg); opacity: .9; }
.fl-c { width: 190px; top: -14px; left: 70px; animation-delay: .5s; opacity: .85; }
.fl-img .fl-a { width: 260px; }
.fl-corner.fl-br.fl-img:not(.fl-mirror) { transform: none; }
.fl-corner.fl-br.fl-img:not(.fl-mirror) .fl { transform-origin: 100% 100%; top: auto; left: auto; bottom: 0; right: 0; }
@keyframes flSway { from { rotate: -3deg; } to { rotate: 3deg; } }
/* Sudut kanan-atas = cermin mendatar · kiri-bawah = cermin menegak */
.fl-corner.fl-tr { top: -26px; right: -34px; transform: scaleX(-1); animation: flInTR 1.5s ease-out both; }
.fl-corner.fl-bl { bottom: -26px; left: -34px; transform: scaleY(-1); animation: flInBL 1.5s ease-out both; }
.fl-corner.fl-bl.fl-img:not(.fl-mirror) { transform: scaleX(-1); }
.fl-corner.fl-bl.fl-img:not(.fl-mirror) .fl { transform-origin: 100% 100%; top: auto; left: auto; bottom: 0; right: 0; }
@keyframes flInTL { from { opacity: 0; translate: -60px -60px; } to { opacity: 1; translate: 0 0; } }
@keyframes flInBR { from { opacity: 0; translate: 60px 60px; } to { opacity: 1; translate: 0 0; } }
@keyframes flInTR { from { opacity: 0; translate: 60px -60px; } to { opacity: 1; translate: 0 0; } }
@keyframes flInBL { from { opacity: 0; translate: -60px 60px; } to { opacity: 1; translate: 0 0; } }
#cover-screen .flower-layer { z-index: 1; }
.hero-section .flower-layer { z-index: 2; }
@media (max-width: 380px) { .fl-corner { scale: .82; } .fl-corner.fl-tl { transform-origin: 0 0; } .fl-corner.fl-br { transform-origin: 100% 100%; } .fl-corner.fl-tr { transform-origin: 100% 0; } .fl-corner.fl-bl { transform-origin: 0 100%; } }

/* ---------- ELEMEN MOTION (tema Motion) ---------- */
.motion-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.mt-wrap { position: absolute; inset: 0; animation-duration: 1.5s; animation-fill-mode: both; animation-timing-function: ease-out; }
.mt-el { position: absolute; background-repeat: no-repeat; background-position: center; }
@keyframes mt-swing1 { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
@keyframes mt-swing2 { from { transform: rotate(-1deg); } to { transform: rotate(1deg); } }
.mt-fadeIn { animation-name: mtFadeIn; }
.mt-fadeInDown { animation-name: mtFadeInDown; }
.mt-fadeInUp { animation-name: mtFadeInUp; }
.mt-fadeInLeft { animation-name: mtFadeInLeft; }
.mt-fadeInRight { animation-name: mtFadeInRight; }
.mt-fadeInTopLeft { animation-name: mtFadeInTopLeft; }
.mt-fadeInTopRight { animation-name: mtFadeInTopRight; }
.mt-fadeInBottomLeft { animation-name: mtFadeInBottomLeft; }
.mt-fadeInBottomRight { animation-name: mtFadeInBottomRight; }
@keyframes mtFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes mtFadeInDown { from { opacity: 0; transform: translate3d(0, -100%, 0); } to { opacity: 1; transform: none; } }
@keyframes mtFadeInUp { from { opacity: 0; transform: translate3d(0, 100%, 0); } to { opacity: 1; transform: none; } }
@keyframes mtFadeInLeft { from { opacity: 0; transform: translate3d(-100%, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes mtFadeInRight { from { opacity: 0; transform: translate3d(100%, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes mtFadeInTopLeft { from { opacity: 0; transform: translate3d(-100%, -100%, 0); } to { opacity: 1; transform: none; } }
@keyframes mtFadeInTopRight { from { opacity: 0; transform: translate3d(100%, -100%, 0); } to { opacity: 1; transform: none; } }
@keyframes mtFadeInBottomLeft { from { opacity: 0; transform: translate3d(-100%, 100%, 0); } to { opacity: 1; transform: none; } }
@keyframes mtFadeInBottomRight { from { opacity: 0; transform: translate3d(100%, 100%, 0); } to { opacity: 1; transform: none; } }

/* ---------- LAPISAN HIASAN TEMA (.tk-deco) ----------
   CSS setiap tema diskop di bawah .tk-deco (kad/themes/{slug}/deco.css).
   isolation → z-index tinggi dalam CSS tema kekal di bawah teks kad. */
.tk-deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; isolation: isolate; }
.tk-deco > * { pointer-events: none; }
/* Utiliti Bootstrap yang digunakan dalam markup hiasan tema (kad tidak memuatkan Bootstrap) */
.tk-deco .w-100 { width: 100%; } .tk-deco .h-100 { height: 100%; } .tk-deco .w-50 { width: 50%; }
.tk-deco .position-absolute { position: absolute; } .tk-deco .position-relative { position: relative; }
.tk-deco .mx-auto { margin-left: auto; margin-right: auto; } .tk-deco .py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.tk-deco .d-block { display: block; } .tk-deco .img-fluid { max-width: 100%; height: auto; }
.tk-deco img { display: block; }
.tk-static { animation: tkFade 1.2s ease both; }
@keyframes tkFade { from { opacity: 0; } to { opacity: 1; } }
#cover-screen .tk-deco { z-index: 1; }

/* ---------- KHAT / JAWI / AYAT ---------- */
.khat-names { margin: .4rem auto .2rem; padding: 0 12%; }
.khat-mask { width: 100%; max-height: 46vh; margin: 0 auto; background: var(--primary);
    -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center; }
.jawi-names { font-family: 'Amiri', serif !important; direction: rtl; font-size: calc(var(--name-size) * .62) !important; line-height: 1.5 !important; }
.jawi-with { font-family: 'Amiri', serif !important; font-size: 30px !important; direction: rtl; }
.hero-arabic { font-family: 'Amiri', serif; font-size: 28px; color: var(--primary); direction: rtl; margin-bottom: .2rem; }
.hero-hijri { font-family: 'Amiri', serif; font-size: 18px; color: var(--primary); direction: rtl; margin-bottom: .2rem; }
.hero-verse { font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 700; font-size: 14px; color: var(--primary); margin-top: 1.4rem; line-height: 1.6; }

/* ---------- LAYOUT ELEGANT (tema diimport: Cinzel + Tangerine, tanpa lapisan) ---------- */
body:not(.layout-default) .hero-content { width: var(--hero-w); padding: 0; translate: var(--hero-x) var(--hero-y); }
body:not(.layout-default) .hero-tag,
body:not(.layout-default) .cover-subtitle { font-family: var(--font-serif); font-weight: 700; letter-spacing: 1px; text-transform: none; font-size: 16px; margin-bottom: 1.6rem; }
body:not(.layout-default) .hero-names,
body:not(.layout-default) .hero-with { line-height: 1em; text-shadow: .3px .3px .3px rgba(0, 0, 0, .25); }
body:not(.layout-default) .hero-with { font-family: var(--font-script); font-size: calc(var(--name-size) * .8); color: var(--primary); }
body:not(.layout-default) .hero-date { font-family: var(--font-serif); font-style: normal; font-weight: 700; font-size: 18px; letter-spacing: 0; }
body:not(.layout-default) .hero-venue { font-family: var(--font-serif); font-weight: 700; letter-spacing: 0; text-transform: none; font-size: 14px; }
body:not(.layout-default) .hero-section .section-divider { background: var(--primary); opacity: .5; }
body:not(.layout-default) .hero-section .scroll-hint { display: none; }
body:not(.layout-default) .cover-with { font-family: var(--font-script); font-size: 42px; color: var(--primary); }
body:not(.layout-default) #cover-screen::before { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); background: transparent; }
body:not(.layout-default) .cover-content { background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
body:not(.layout-default) .cover-names { line-height: 1em; }
body:not(.layout-default) .cover-date { font-family: var(--font-serif); text-transform: none; letter-spacing: 0; }

/* ---------- MAIN ---------- */
#main-card { display: none; }
#main-card.show { display: block; }

/* ---------- HERO ---------- */
.hero-section {
    position: relative; min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-hero, none) center/cover no-repeat;
    background-color: var(--bg);
    overflow: hidden;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg,
        rgba(var(--hero-fade), calc(var(--overlay) * .2)) 0%,
        rgba(var(--hero-fade), var(--overlay)) 60%,
        rgba(var(--hero-fade), min(1, calc(var(--overlay) * 1.55))) 100%);
}
.hero-content { position: relative; z-index: 2; text-align: center; padding: 6rem 1.5rem 5rem; }
.hero-tag { letter-spacing: 5px; font-size: 16px; color: var(--primary); text-transform: uppercase; font-weight: 700; margin-bottom: 1rem; }
.hero-names { font-family: var(--font-script); font-size: var(--name-size); color: var(--primary); line-height: 1.15; text-shadow: 0 2px 6px rgba(0, 0, 0, .1); word-break: break-word; }
.hero-with { font-family: var(--font-serif); font-size: 26px; color: var(--accent); }
.hero-date { margin-top: 1.2rem; font-family: var(--font-serif); font-size: 19px; letter-spacing: 2px; color: var(--primary); font-style: italic; }
.hero-venue { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--primary); margin-top: .5rem; }
.deco-wrap { position: absolute; top: -10px; z-index: 3; width: 140px; transform-origin: top center; pointer-events: none; }
.deco-wrap img { width: 100%; display: block; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .18)); }
.deco-wrap.left { left: -10px; animation: swing 3s ease-in-out infinite; }
.deco-wrap.right { right: -10px; animation: swingR 3s ease-in-out infinite -1.5s; }
@keyframes swing { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(12deg); } }
@keyframes swingR { 0%, 100% { transform: scaleX(-1) rotate(-12deg); } 50% { transform: scaleX(-1) rotate(12deg); } }
.scroll-hint {
    position: absolute; bottom: 24px; left: 50%; z-index: 3;
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    color: var(--primary); font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
    animation: bounce 2s infinite;
}
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(8px); } }

/* ---------- SECTION ---------- */
.section-block { padding: 3.5rem 1.6rem; background: var(--bg); position: relative; }
.section-block.alt {
    background: var(--bg-section, none) center/cover no-repeat;
    background-color: var(--surface-2);
}
.section-block.alt::before {
    content: ''; position: absolute; inset: 0; z-index: 0;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
}
.section-block > * { position: relative; z-index: 1; }
.section-title { font-family: var(--font-serif); font-size: 13px; letter-spacing: 5px; text-transform: uppercase; color: var(--accent); text-align: center; margin-bottom: .3rem; }
.section-heading { font-family: var(--font-script); font-size: 44px; color: var(--primary); text-align: center; line-height: 1.2; }
.section-divider { width: 50px; height: 1px; background: var(--accent); margin: 1rem auto 2rem; }

.greeting-text { font-family: var(--font-serif); font-size: 17px; text-align: center; color: var(--text); line-height: 1.9; font-style: italic; }
.host-text { font-family: var(--font-serif); font-size: 18px; text-align: center; color: var(--primary); line-height: 1.9; margin: 1.2rem 0; }
.host-text .hl { color: var(--accent); }
.couple-names { font-family: var(--font-script); font-size: calc(var(--name-size) * .8); color: var(--primary); text-align: center; margin: 1.5rem 0 .5rem; line-height: 1.25; }
.couple-names .amp { display: block; font-family: var(--font-serif); font-size: 24px; color: var(--accent); }

/* Kad butiran */
.details-card {
    background: var(--surface); border-radius: 20px; padding: 1.6rem 1.2rem;
    box-shadow: var(--shadow); border: 1px solid var(--line); margin-bottom: 1rem; height: 100%;
}
.details-icon {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #fff));
    display: flex; align-items: center; justify-content: center; margin: 0 auto .8rem;
    color: #fff; font-size: 16px; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 35%, transparent);
}
.details-label { font-size: 10px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); text-align: center; font-weight: 700; margin-bottom: .4rem; }
.details-value { font-family: var(--font-serif); font-size: 17px; color: var(--primary); text-align: center; line-height: 1.5; }

/* Aturcara */
.schedule-item { display: flex; align-items: center; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.schedule-item:last-child { border-bottom: 0; }
.schedule-time { font-family: var(--font-serif); font-size: 16px; color: var(--accent); font-weight: 600; width: 100px; flex-shrink: 0; text-align: right; }
.schedule-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.schedule-event { font-size: 15px; color: var(--text); }

/* Countdown */
.countdown-section { background: linear-gradient(135deg, var(--dark-band), color-mix(in srgb, var(--dark-band) 80%, var(--accent) 20%)); padding: 3rem 1.2rem; text-align: center; }
.countdown-title { font-family: var(--font-script); font-size: 40px; color: color-mix(in srgb, var(--accent) 70%, #fff); }
.countdown-subtitle { font-size: 11px; letter-spacing: 4px; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin-bottom: 1.6rem; }
.cd-grid { display: flex; justify-content: center; gap: 10px; }
.cd-box {
    width: 70px; padding: 12px 0 8px; border-radius: 14px;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15);
}
.cd-num { font-family: var(--font-serif); font-size: 32px; font-weight: 600; color: #fff; line-height: 1; }
.cd-lbl { font-size: 9px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255, 255, 255, .65); margin-top: 6px; }
.cd-done { color: #fff; font-family: var(--font-serif); font-size: 20px; }

/* Galeri */
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 8px; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track figure { flex: 0 0 86%; scroll-snap-align: center; margin: 0; }
.gallery-track img { width: 100%; height: 320px; object-fit: cover; border-radius: 16px; box-shadow: var(--shadow); cursor: zoom-in; }
.gallery-track figcaption { text-align: center; font-family: var(--font-serif); font-style: italic; font-size: 14px; color: var(--text); margin-top: 6px; }
.gallery-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.gallery-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.gallery-dots span.on { background: var(--accent); }
.lightbox { position: fixed; inset: 0; z-index: 9500; background: rgba(0, 0, 0, .9); display: none; align-items: center; justify-content: center; }
.lightbox.active { display: flex; }
.lightbox img { max-width: 94%; max-height: 90vh; border-radius: 8px; }

/* Guestbook */
#wishes-scroll { max-height: 400px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
#wishes-list { display: flex; flex-direction: column; gap: .75rem; }
.wish-card { background: var(--surface); border-radius: 16px; padding: 1.2rem 1rem; box-shadow: var(--shadow); border: 1px solid var(--line); text-align: center; animation: fadeUp .45s ease; }
.wish-msg { font-family: var(--font-serif); font-style: italic; font-size: 17px; color: var(--text); line-height: 1.6; overflow-wrap: anywhere; }
.wish-author { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: var(--accent); text-transform: uppercase; margin-top: .6rem; }
.wish-time { font-size: 10px; opacity: .55; margin-top: 2px; }
.wishes-empty { text-align: center; color: var(--text); font-family: var(--font-serif); font-style: italic; opacity: .6; padding: 2rem 0; }
.wishes-count { font-size: 10px; letter-spacing: 2px; color: var(--accent); text-align: right; text-transform: uppercase; margin-bottom: .5rem; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Doa */
.prayer-frame { position: relative; margin: 0 auto; max-width: 420px; }
.prayer-frame img { width: 100%; display: block; pointer-events: none; }
.prayer-frame .prayer-content { position: absolute; top: 22%; left: 11%; right: 11%; bottom: 14%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.prayer-plain { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 2rem 1.4rem; text-align: center; box-shadow: var(--shadow); }
.prayer-text { font-family: var(--font-serif); font-size: 15px; color: var(--text); line-height: 1.9; font-style: italic; }
.arabic-text { font-family: 'Amiri', serif; font-size: 22px; color: var(--accent); margin-bottom: .6rem; line-height: 1.8; direction: rtl; }

/* Butang & borang */
.btn-main {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
    background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 75%, #fff));
    color: #fff; border: 0; border-radius: 50px; padding: 13px 28px;
    font-family: var(--font-body); font-weight: 700; letter-spacing: 2px; font-size: 12px; text-transform: uppercase;
    cursor: pointer; box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent); transition: all .25s; text-decoration: none;
}
.btn-main:hover { transform: translateY(-2px); color: #fff; }
.btn-main:disabled { opacity: .6; transform: none; cursor: wait; }
.btn-ghost { background: transparent; color: var(--primary); box-shadow: none; border: 1px solid var(--line); }
.btn-ghost:hover { color: var(--primary); }
.k-label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--primary); font-weight: 700; margin-bottom: 6px; display: block; }
.k-input {
    width: 100%; border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); border-radius: 10px;
    padding: 11px 14px; font-family: var(--font-body); font-size: 14px; color: var(--text);
    background: var(--surface); transition: border-color .2s;
}
body.mode-dark .k-input { background: rgba(255, 255, 255, .08); color: #fff; }
body.mode-dark .k-input option { color: #000; }
.k-input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.k-field { margin-bottom: 1rem; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.seg { display: flex; gap: 8px; }
.seg label { flex: 1; }
.seg input { display: none; }
.seg span { display: block; text-align: center; padding: 11px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; font-weight: 700; font-size: 13px; color: var(--primary); }
.seg input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.k-alert { padding: 10px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 1rem; display: none; }
.k-alert.err { display: block; background: #fdecea; color: #a12622; }
.k-alert.ok { display: block; background: #e8f5e9; color: #1e6b2a; }

/* ---------- BOTTOM NAV ---------- */
.bottom-nav {
    position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 100%; max-width: 480px; z-index: 1000; display: none;
    background: var(--nav-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding: 6px 4px 8px;
}
.bottom-nav.show { display: block; }
.nav-items { display: flex; justify-content: space-around; overflow-x: auto; scrollbar-width: none; }
.nav-items::-webkit-scrollbar { display: none; }
.nav-btn {
    flex: 1 0 auto; min-width: 58px; display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: none; border: 0; cursor: pointer; padding: 4px 6px; color: var(--primary); transition: color .2s;
}
.nav-btn i { font-size: 18px; }
.nav-btn span { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700; white-space: nowrap; }
.nav-btn:hover, .nav-btn.active { color: var(--accent); }

/* ---------- MODAL (bottom sheet) ---------- */
.k-modal { display: none; position: fixed; inset: 0; z-index: 9000; background: rgba(0, 0, 0, .55); align-items: flex-end; justify-content: center; }
.k-modal.active { display: flex; }
.k-sheet {
    background: var(--bg); color: var(--text); border-radius: 24px 24px 0 0; width: 100%; max-width: 480px;
    max-height: 88vh; overflow-y: auto; padding: 1.2rem 1.6rem 2.2rem; animation: slideUp .35s cubic-bezier(.4, 0, .2, 1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
.k-handle { width: 40px; height: 4px; background: color-mix(in srgb, var(--text) 25%, transparent); border-radius: 2px; margin: 0 auto 1.2rem; }
.k-title { font-family: var(--font-serif); font-size: 26px; color: var(--primary); text-align: center; margin-bottom: 1.2rem; }

/* Lokasi */
.map-frame { border-radius: 12px; overflow: hidden; margin-bottom: 1rem; }
.map-frame iframe { width: 100%; height: 230px; border: 0; display: block; }
.dir-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 12px;
    border: 1.5px solid var(--accent); color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase; text-decoration: none; margin-bottom: .7rem; transition: all .2s;
}
.dir-btn:hover { background: var(--accent); color: #fff; }

/* Money gift */
.bank-card {
    background: linear-gradient(135deg, var(--dark-band), color-mix(in srgb, var(--dark-band) 75%, var(--accent)));
    border-radius: 20px; padding: 1.4rem; color: #fff; position: relative; overflow: hidden; margin-bottom: 1rem;
}
.bank-card::before { content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: rgba(255, 255, 255, .06); top: -40px; right: -40px; }
.bank-name { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; opacity: .75; margin-bottom: .4rem; }
.bank-number { font-size: 22px; letter-spacing: 3px; font-family: var(--font-serif); margin-bottom: .2rem; }
.bank-holder { font-size: 13px; opacity: .85; }
.copy-btn { position: absolute; top: 1rem; right: 1rem; background: rgba(255, 255, 255, .15); border: 0; border-radius: 8px; padding: 6px 12px; color: #fff; font-size: 11px; cursor: pointer; }
.qr-box { text-align: center; margin: .5rem 0 1.4rem; }
.qr-box img { width: 190px; max-width: 70%; border-radius: 12px; background: #fff; padding: 8px; }

/* Wishlist */
.wl-item { display: flex; gap: 12px; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.wl-item:last-child { border-bottom: 0; }
.wl-img { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--surface-2); flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.wl-name { font-weight: 700; font-size: 14px; color: var(--primary); }
.wl-price { font-size: 12px; opacity: .7; }
.wl-actions { display: flex; gap: 6px; margin-top: 6px; }
.wl-actions a, .wl-actions button { font-size: 11px; padding: 5px 12px; border-radius: 20px; border: 1px solid var(--accent); background: transparent; color: var(--accent); text-decoration: none; cursor: pointer; font-weight: 700; }
.wl-actions button.reserve { background: var(--accent); color: #fff; }
.wl-actions button:disabled { background: #999; border-color: #999; color: #fff; cursor: not-allowed; }
.wl-address { background: var(--surface); border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; font-size: 13px; margin-bottom: 1rem; }

/* Hubungi */
.contact-item { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.contact-item:last-child { border-bottom: 0; }
.contact-name { font-family: var(--font-serif); font-size: 19px; color: var(--primary); }
.contact-rel { font-size: 11px; opacity: .65; letter-spacing: 1px; text-transform: uppercase; }
.contact-actions { display: flex; gap: 10px; }
.contact-btn { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; text-decoration: none; transition: transform .2s; }
.contact-btn:hover { transform: scale(1.1); }
.btn-phone { background: #e3f2fd; color: #1565c0; }
.btn-wa { background: #e8f5e9; color: #25d366; }

/* Kalendar */
.mini-cal { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; margin-bottom: 1rem; }
.mini-cal .cal-head { text-align: center; font-family: var(--font-serif); font-size: 20px; color: var(--primary); margin-bottom: .6rem; }
.mini-cal .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; font-size: 13px; }
.mini-cal .dow { font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; padding: 4px 0; }
.mini-cal .d { padding: 7px 0; border-radius: 50%; color: var(--text); }
.mini-cal .d.ev { background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--dark-band); color: rgba(255, 255, 255, .7); text-align: center; padding: 2.5rem 1.5rem 6.5rem; }
.footer-hashtag { font-family: var(--font-serif); font-size: 30px; color: color-mix(in srgb, var(--accent) 70%, #fff); margin-bottom: .4rem; }
.footer-credit { font-size: 12px; letter-spacing: 1px; }
.footer-pdf { display: inline-flex; gap: 6px; align-items: center; margin-top: 1rem; color: #fff; border: 1px solid rgba(255, 255, 255, .3); padding: 7px 16px; border-radius: 30px; font-size: 12px; text-decoration: none; }
.footer-pdf:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.powered { font-size: 10px; opacity: .45; margin-top: 1rem; }

/* Butang muzik */
.music-btn {
    position: fixed; top: 16px; z-index: 1001; width: 44px; height: 44px; border-radius: 50%;
    right: max(16px, calc(50vw - 240px + 16px));
    background: rgba(255, 255, 255, .92); border: 0; box-shadow: 0 4px 16px rgba(0, 0, 0, .15);
    cursor: pointer; display: none; align-items: center; justify-content: center; color: var(--primary); font-size: 16px;
}
.music-btn.show { display: flex; }
.music-btn.playing { color: var(--accent); animation: spin 4s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.k-toast { position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%); background: #222; color: #fff; padding: 10px 22px; border-radius: 50px; font-size: 13px; z-index: 99999; animation: fadeUp .3s ease; max-width: 90%; text-align: center; }

/* Kesan latar */
#fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 900; overflow: hidden; max-width: 480px; margin: 0 auto; }
.fx-petal, .fx-snow { position: absolute; top: -20px; will-change: transform; }
.fx-petal { width: 12px; height: 10px; border-radius: 12px 0 12px 0; background: color-mix(in srgb, var(--accent) 60%, #ffd1dc); opacity: .75; animation: fall linear forwards; }
.fx-snow { width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff; opacity: .85; animation: fall linear forwards; }
@keyframes fall { to { transform: translate(var(--dx, 40px), 110vh) rotate(540deg); } }

/* ---------- GAYA GLASS ---------- */
body.style-glass .section-block:not(.alt) { background: transparent; }
body.style-glass #main-card { background: var(--bg-section, none) center/cover fixed; background-color: var(--bg); }
body.style-glass .section-block:not(.alt)::before { content: ''; position: absolute; inset: 0; z-index: 0; background: color-mix(in srgb, var(--bg) 80%, transparent); }
body.style-glass .details-card,
body.style-glass .wish-card,
body.style-glass .prayer-plain,
body.style-glass .mini-cal {
    background: color-mix(in srgb, var(--surface) 55%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, .35);
}

/* Gelap: teks atas hero lebih cerah */
body.mode-dark .hero-names,
body.mode-dark .cover-names,
body.mode-dark .section-heading { text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
body.mode-dark .cover-content { border-color: rgba(255, 255, 255, .18); }
body.mode-dark .open-btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .25); }
body.mode-dark .music-btn { background: rgba(20, 24, 36, .9); }

@media (max-width: 360px) {
    .cd-box { width: 60px; }
    .cd-num { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Foto Tetamu */
.gp-intro { text-align: center; font-family: var(--font-serif); font-style: italic; font-size: 14px; color: var(--text); opacity: .8; margin-bottom: 1rem; }
.gp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-height: 460px; overflow-y: auto; scrollbar-width: thin; }
.gp-grid .wishes-empty { grid-column: 1 / -1; }
.gp-item { position: relative; margin: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); animation: fadeUp .45s ease; }
.gp-item img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.gp-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 9.5px; line-height: 1.25; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.gp-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 1.1rem; margin-bottom: .8rem; border: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); border-radius: 14px; color: var(--primary); cursor: pointer; font-size: 13px; font-weight: 600; text-align: center; }
.gp-pick i { font-size: 26px; color: var(--accent); }
.gp-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 1rem; }
.gp-thumbs:empty { display: none; }
.gp-thumb { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--line); }
.gp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gp-thumb button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 14px; line-height: 1; padding: 0; cursor: pointer; }
