/* ═══════════════════════════════════════════════════════════════
   ETERNAL ARCHES — perjalanan "infinite zoom" menembus gerbang
   lengkung Andalusia & Mughal. Setiap ruang adalah satu gerbang.
   ═══════════════════════════════════════════════════════════════ */
:root {
    --emerald: #0f3b33;
    --jade: #1f6b5c;
    --ivory: #f7f1e3;
    --gold: #c9a35a;
    --gold-l: #e6c987;
    --terra: #b5654a;
    --night: #0b1a2a;
    --deep: #051410;
    --f-disp: 'Cinzel', 'Times New Roman', serif;
    --f-body: 'Cormorant Garamond', Georgia, serif;
    --f-ar: 'Amiri', 'Traditional Arabic', serif;
    --ease: cubic-bezier(.65, 0, .25, 1);
    --stage-w: min(100vw, 480px);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: var(--f-body); color: var(--ivory); background: var(--deep);
    overflow: hidden; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}
body.no-scroll { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.ico { width: 1em; height: 1em; flex: none; }

/* ── Desktop backdrop: an arcade receding to both sides ── */
.world {
    position: fixed; inset: 0; z-index: 0;
    background:
        radial-gradient(ellipse at 50% 45%, rgba(230, 201, 135, .14), transparent 55%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='800' viewBox='0 0 240 800'%3E%3Cg fill='none' stroke='%23c9a35a'%3E%3Cpath d='M30 800V330C30 230 90 170 120 120c30 50 90 110 90 210v470' stroke-opacity='.4' stroke-width='1.5'/%3E%3Cpath d='M44 800V336c0-90 52-145 76-190 24 45 76 100 76 190v464' stroke-opacity='.18'/%3E%3Cpath d='M120 146v60' stroke-opacity='.4'/%3E%3Cpath d='M112 206h16l4 8-4 22h-16l-4-22z' fill='%23e6c987' fill-opacity='.35' stroke-opacity='.5'/%3E%3Cpath d='M0 90h240M0 98h240' stroke-opacity='.18'/%3E%3C/g%3E%3Ccircle cx='120' cy='222' r='34' fill='%23ffe6a3' fill-opacity='.06'/%3E%3C/svg%3E") center bottom / auto 100% repeat-x,
        linear-gradient(180deg, #071c18 0%, #0d322b 60%, #061411 100%);
}
.world::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(3, 12, 10, .9), rgba(3, 12, 10, .2) 32%, rgba(3, 12, 10, .2) 68%, rgba(3, 12, 10, .9));
}

/* ── Stage ── */
.stage {
    position: fixed; top: 0; left: 50%; z-index: 1; width: var(--stage-w); height: 100vh; height: 100dvh;
    transform: translateX(-50%); overflow: hidden; background: #04100d;
    user-select: none; -webkit-user-select: none; touch-action: pan-y;
}
.stage input, .stage textarea { user-select: text; -webkit-user-select: text; }
.stage.grabbing { cursor: grabbing; }
.rooms { position: absolute; inset: 0; }
.room {
    position: absolute; inset: 0; pointer-events: none; backface-visibility: hidden;
}
.stage.moving .room { will-change: transform, opacity; }
.stage.moving .panel { will-change: transform, opacity; }
.wall { position: absolute; display: block; pointer-events: none; }
.room .lamp-glow { opacity: .55; }
.room.cur .lamp-glow { animation: flicker 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes flicker { 0%, 100% { opacity: .75; } 40% { opacity: .55; } 55% { opacity: .9; } 70% { opacity: .65; } }

.halo {
    position: absolute; inset: 0; z-index: 400; pointer-events: none; opacity: 0;
    background: radial-gradient(ellipse 60% 45% at 50% 44%, rgba(255, 236, 190, .85), rgba(255, 220, 150, .25) 45%, transparent 75%);
}
.vignette {
    position: absolute; inset: 0; z-index: 401; pointer-events: none;
    background: radial-gradient(ellipse 85% 70% at 50% 46%, transparent 62%, rgba(2, 10, 8, .55));
}

/* ── Content panel (arch-topped, inside each opening) ── */
.panel { position: absolute; pointer-events: auto; }
.pbg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.pfill { fill: none; stroke: var(--gold); stroke-width: 2; }
.pline { fill: none; stroke: var(--line); stroke-width: 1; }
.scroller {
    position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; touch-action: pan-y;
    padding: calc(var(--rise) + 12px) 22px 30px; text-align: center;
    background: linear-gradient(180deg, var(--bg1), var(--bg2)); color: var(--ink);
}
.scroller::-webkit-scrollbar { display: none; }
.panel::after {
    content: ''; position: absolute; left: 50%; bottom: 10px; width: 22px; height: 22px; margin-left: -11px; pointer-events: none;
    border-radius: 50%; border: 1px solid var(--line); opacity: 0; transition: opacity .4s;
    background: var(--bg2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%23c9a35a' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.panel.more::after { opacity: 1; animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 50% { transform: translateY(3px); } }
.scroller.center { display: flex; flex-direction: column; align-items: center; }
.scroller.center > * { flex: none; }
.scroller.center > :first-child { margin-top: auto; }
.scroller.center > :last-child { margin-bottom: auto; }
.scroller > :last-child { margin-bottom: 8px; }

/* themes = colour of the inner light of each room */
.t-ivory   { --bg1: rgba(251, 247, 236, .97); --bg2: rgba(243, 233, 210, .97); --ink: #173a33; --muted: #5d6e66; --acc: #9a6a2c; --line: rgba(201, 163, 90, .7); --card: rgba(255, 255, 255, .55); --cardline: rgba(201, 163, 90, .45); }
.t-emerald { --bg1: rgba(19, 77, 66, .96); --bg2: rgba(10, 44, 38, .97); --ink: #f7f1e3; --muted: #bcd2c6; --acc: #e6c987; --line: rgba(230, 201, 135, .55); --card: rgba(255, 255, 255, .05); --cardline: rgba(230, 201, 135, .32); }
.t-gold    { --bg1: rgba(250, 234, 196, .97); --bg2: rgba(234, 200, 132, .97); --ink: #2f2412; --muted: #6b5634; --acc: #8f4a37; --line: rgba(143, 74, 55, .45); --card: rgba(255, 250, 236, .55); --cardline: rgba(143, 74, 55, .28); }
.t-night   { --bg1: rgba(18, 37, 60, .97); --bg2: rgba(9, 22, 36, .98); --ink: #f2ead6; --muted: #a8b6c6; --acc: #e6c987; --line: rgba(230, 201, 135, .5); --card: rgba(255, 255, 255, .05); --cardline: rgba(230, 201, 135, .28); }
.t-night .scroller {
    background:
        radial-gradient(1.2px 1.2px at 12% 18%, #fff8, transparent), radial-gradient(1px 1px at 78% 12%, #fff9, transparent),
        radial-gradient(1.4px 1.4px at 64% 30%, #ffe9b0aa, transparent), radial-gradient(1px 1px at 26% 46%, #fff6, transparent),
        radial-gradient(1.2px 1.2px at 88% 52%, #fff7, transparent), radial-gradient(1px 1px at 8% 70%, #fff6, transparent),
        radial-gradient(1.3px 1.3px at 44% 86%, #ffe9b099, transparent), radial-gradient(1px 1px at 92% 82%, #fff5, transparent),
        linear-gradient(180deg, var(--bg1), var(--bg2));
}
.t-gold .scroller { background: radial-gradient(ellipse 80% 40% at 50% 0%, rgba(255, 249, 226, .9), transparent 70%), linear-gradient(180deg, var(--bg1), var(--bg2)); }

/* ── Typography ── */
.kicker { font-family: var(--f-disp); font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--acc); margin-bottom: 6px; }
.title { font-family: var(--f-disp); font-weight: 600; font-size: 25px; line-height: 1.15; letter-spacing: .02em; color: var(--ink); }
.title small { display: block; margin-top: 6px; font-family: var(--f-body); font-style: italic; font-weight: 500; font-size: 17px; letter-spacing: 0; color: var(--acc); }
.txt { font-size: 17px; line-height: 1.55; color: var(--ink); margin: 12px 0; }
.txt.sm { font-size: 15.5px; color: var(--muted); }
.txt i { white-space: nowrap; }
.arabic { font-family: var(--f-ar); direction: rtl; font-size: 19px; line-height: 1.95; color: var(--acc); }
.arabic.big { font-size: 27px; line-height: 1.6; color: var(--ink); }
.orn { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px auto; width: 150px; color: var(--acc); }
.orn i { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line)); }
.orn i:last-child { background: linear-gradient(270deg, transparent, var(--line)); }
.orn svg { width: 14px; height: 14px; }

.ayat { margin-top: 16px; padding: 16px 14px 14px; border-radius: 70px 70px 10px 10px / 34px 34px 10px 10px; border: 1px solid var(--cardline); background: var(--card); }
.ayat blockquote { font-style: italic; font-size: 16.5px; line-height: 1.55; color: var(--ink); margin-top: 6px; }
.ayat figcaption { margin-top: 8px; font-family: var(--f-disp); font-size: 11px; letter-spacing: .2em; color: var(--acc); }

/* ── Buttons ── */
.btn-gold, .btn-line {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px;
    padding: 12px 22px; border-radius: 999px; font-family: var(--f-disp); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    transition: transform .2s, box-shadow .2s, opacity .2s;
}
.btn-gold { background: linear-gradient(180deg, #f1dca4, var(--gold) 70%, #a9823d); color: #102f29; box-shadow: 0 8px 20px -10px rgba(201, 163, 90, .9), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-line { border: 1px solid var(--line); color: var(--acc); background: transparent; }
.btn-gold:active, .btn-line:active { transform: scale(.96); }
.btn-gold .ico, .btn-line .ico { width: 16px; height: 16px; }
.btn-gold.wide { width: 100%; }
.btn-gold.loading { opacity: .6; pointer-events: none; }

/* ── Gate / cover ── */
.doors { position: absolute; perspective: 1100px; pointer-events: none; }
.leaf { position: absolute; top: 0; bottom: 0; width: 50%; transition: transform 1.5s cubic-bezier(.55, .05, .3, 1); backface-visibility: hidden; }
.leaf svg { display: block; width: 100%; height: 100%; }
.leaf.l { left: 0; transform-origin: 0 50%; box-shadow: inset -10px 0 18px -10px rgba(0, 0, 0, .6); }
.leaf.r { right: 0; transform-origin: 100% 50%; }
.gate.opening .leaf.l { transform: rotateY(-108deg); }
.gate.opening .leaf.r { transform: rotateY(108deg); }
.doors::after {
    content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.2s .2s;
    background: radial-gradient(ellipse 50% 60% at 50% 45%, rgba(255, 236, 190, .5), transparent 70%);
}
.gate.opening .doors::after { opacity: 1; }
.gate-plaque {
    position: absolute; left: 50%; top: calc(var(--yb) * .555); width: min(300px, 78%); transform: translate(-50%, -50%);
    pointer-events: auto; text-align: center; color: #173a33;
    padding: 46px 20px 20px; border-radius: 150px 150px 14px 14px / 70px 70px 14px 14px;
    background: radial-gradient(ellipse 90% 40% at 50% 0%, #fffdf6, transparent 70%), linear-gradient(180deg, #f9f3e4, #efe2c3);
    box-shadow: 0 0 0 1px #c9a35a, 0 0 0 5px rgba(15, 59, 51, .9), 0 0 0 6px #c9a35a, 0 24px 50px -10px rgba(0, 0, 0, .7);
    transition: opacity .6s, transform .8s var(--ease);
}
.gate-plaque::before {
    content: ''; position: absolute; inset: 7px; border: 1px solid rgba(201, 163, 90, .55); pointer-events: none;
    border-radius: 143px 143px 9px 9px / 64px 64px 9px 9px;
}
.gate.opening .gate-plaque { opacity: 0; transform: translate(-50%, -46%) scale(.94); pointer-events: none; }
.gp-kicker { font-family: var(--f-disp); font-size: 10.5px; letter-spacing: .32em; text-transform: uppercase; color: #9a6a2c; }
.gp-names { font-family: var(--f-disp); font-weight: 600; font-size: 31px; line-height: 1.12; margin-top: 8px; color: #0f3b33; }
.gp-names span { display: block; font-family: var(--f-body); font-style: italic; font-weight: 500; font-size: 24px; color: var(--terra); margin: 1px 0; }
.gp-date { font-family: var(--f-disp); font-size: 12px; letter-spacing: .2em; margin-top: 8px; color: #5d6e66; }
.gate-plaque .orn { --line: rgba(201, 163, 90, .8); color: var(--gold); margin: 10px auto; }
.gp-to { font-size: 14.5px; font-style: italic; color: #5d6e66; }
.gp-guest { font-family: var(--f-disp); font-size: 20px; font-weight: 600; margin-top: 4px; color: #0f3b33; overflow-wrap: anywhere; }
/* glowBtn: cincin dipindah ke ::after (pil 8px lebih besar) di belakang tombol; hanya scale + opacity yang beranimasi.
   Shadow statis = shadow yang dulu ditulis keyframes (tanpa highlight inset, seperti sebelumnya). */
.gate-plaque .btn-gold { position: relative; margin-top: 14px; box-shadow: 0 8px 20px -10px rgba(201, 163, 90, .9); }
.gate-plaque .btn-gold::after {
    content: ''; position: absolute; inset: -8px; z-index: -1; border-radius: 999px; pointer-events: none;
    background: rgba(230, 201, 135, .5); transform: scale(.927, .714);
    animation: glowBtn 2.6s ease-in-out infinite;
}
.gate-plaque .btn-gold:active::after, .gate-plaque .btn-gold.loading::after { visibility: hidden; }
@keyframes glowBtn { 0%, 100% { transform: scale(.927, .714); opacity: 1; } 50% { transform: none; opacity: 0; } }
.gp-note { margin-top: 10px; font-size: 12.5px; font-style: italic; color: #7d8a83; }

/* ── HUD: beads, dock, hint, music ── */
.beads, .dock, .music-toggle-btn { opacity: 0; pointer-events: none; transition: opacity .8s .6s; }
body.opened .beads, body.opened .dock, body.opened .music-toggle-btn { opacity: 1; pointer-events: auto; }
.beads {
    position: absolute; right: 2px; top: 50%; transform: translateY(-46%); z-index: 500;
    display: flex; flex-direction: column; align-items: center;
}
.beads .thread { position: absolute; top: -14px; bottom: -14px; left: 50%; width: 1px; background: linear-gradient(180deg, transparent, rgba(230, 201, 135, .7) 8%, rgba(230, 201, 135, .7) 92%, transparent); }
.beads button { position: relative; width: 26px; height: 22px; display: grid; place-items: center; }
.beads button span { width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6d8, #c9a35a 60%, #7d5d22); box-shadow: 0 1px 2px rgba(0, 0, 0, .5); transition: transform .4s var(--ease), box-shadow .4s; }
.beads button.done span { opacity: .75; }
.beads button.on span {
    width: 10px; height: 15px; border-radius: 40% 40% 50% 50% / 55% 55% 45% 45%;
    background: radial-gradient(circle at 50% 60%, #fff8de, #ffd879 45%, #c9a35a);
    box-shadow: 0 0 10px 3px rgba(255, 214, 120, .75), 0 0 22px 6px rgba(255, 200, 90, .35);
}
.beads button.on span::before { content: ''; position: absolute; left: 50%; top: 1px; width: 5px; height: 3px; transform: translateX(-50%); background: #c9a35a; border-radius: 2px 2px 0 0; }
.beads button::after {
    content: attr(data-label); position: absolute; right: 28px; top: 50%; transform: translate(6px, -50%); white-space: nowrap;
    padding: 4px 10px; border-radius: 999px; background: rgba(7, 28, 24, .92); border: 1px solid rgba(230, 201, 135, .4);
    font-family: var(--f-disp); font-size: 10px; letter-spacing: .14em; color: var(--gold-l); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
@media (hover: hover) { .beads button:hover::after { opacity: 1; transform: translate(0, -50%); } }

.dock {
    position: absolute; left: 0; right: 0; top: calc(var(--yb) + 8px); bottom: env(safe-area-inset-bottom); z-index: 500;
    display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 16px;
}
.dk-btn {
    width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-l);
    background: radial-gradient(circle at 50% 35%, #1a5246, #0a2621); border: 1px solid rgba(230, 201, 135, .55);
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .08); transition: opacity .3s, transform .2s;
}
.dk-btn .ico { width: 20px; height: 20px; }
.dk-btn:active { transform: scale(.92); }
.dk-btn:disabled { opacity: .3; cursor: default; }
.dk-btn.next:not(:disabled) { animation: nudgeDown 2.4s ease-in-out infinite; }
@keyframes nudgeDown { 0%, 70%, 100% { transform: translateY(0); } 80% { transform: translateY(3px); } 90% { transform: translateY(-1px); } }
.dk-label { min-width: 150px; text-align: center; padding: 6px 14px; border-radius: 999px; background: rgba(5, 20, 16, .7); border: 1px solid rgba(230, 201, 135, .28); }
.dk-label b { display: block; font-family: var(--f-disp); font-size: 10px; letter-spacing: .3em; color: var(--gold); font-weight: 500; }
.dk-label span { display: block; font-family: var(--f-disp); font-size: 13.5px; letter-spacing: .08em; color: var(--ivory); white-space: nowrap; }
body.has-qr .dock { justify-content: flex-start; }
body.has-qr .dk-label { min-width: 0; }

.hint {
    position: absolute; left: 50%; top: calc(var(--yb) - 58px); z-index: 520; transform: translate(-50%, 10px);
    display: flex; align-items: center; gap: 8px; white-space: nowrap;
    padding: 9px 16px; border-radius: 999px; background: rgba(5, 20, 16, .9); border: 1px solid rgba(230, 201, 135, .5);
    font-size: 14px; font-style: italic; color: var(--ivory); opacity: 0; pointer-events: none; transition: opacity .5s, transform .5s var(--ease);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .8);
}
.hint.show { opacity: 1; transform: translate(-50%, 0); }
.hint-ico { display: grid; color: var(--gold-l); line-height: 0; }
.hint-ico .ico { width: 14px; height: 14px; margin: -4px 0; animation: hintUp 1.4s ease-in-out infinite; }
.hint-ico .ico + .ico { animation-delay: .15s; opacity: .6; }
@keyframes hintUp { 0%, 100% { transform: translateY(3px); opacity: .4; } 50% { transform: translateY(-3px); opacity: 1; } }

.music-toggle-btn {
    position: fixed; top: calc(8px + env(safe-area-inset-top)); left: max(8px, calc(50vw - 240px + 8px)); z-index: 600;
    width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-l);
    background: rgba(5, 20, 16, .75); border: 1px solid rgba(230, 201, 135, .5);
}
.music-toggle-btn svg { width: 15px; height: 15px; }
.music-toggle-btn.playing svg { animation: spin 5s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Mempelai ── */
.portrait {
    position: relative; width: 168px; height: 214px; margin: 10px auto 14px; padding: 6px;
    border-radius: 84px 84px 10px 10px / 70px 70px 10px 10px; border: 1px solid var(--line);
}
.portrait img, .portrait .mono {
    width: 100%; height: 100%; object-fit: cover; border-radius: 78px 78px 6px 6px / 64px 64px 6px 6px;
}
.portrait .mono {
    display: grid; place-items: center; font-family: var(--f-disp); font-size: 82px; color: var(--gold-l);
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'%3E%3Cpath d='M14 3l3 8 8 3-8 3-3 8-3-8-8-3 8-3z' fill='none' stroke='%23e6c987' stroke-opacity='.25'/%3E%3C/svg%3E"),
        radial-gradient(ellipse at 50% 30%, #1f6b5c, #0b2d27);
    text-shadow: 0 2px 0 rgba(0, 0, 0, .3);
}
.person { font-family: var(--f-disp); font-weight: 600; font-size: 25px; line-height: 1.2; color: var(--ink); }
.parent { font-size: 17px; line-height: 1.5; color: var(--muted); }
.parent b { color: var(--ink); font-weight: 600; }

/* ── Kisah ── */
.story { list-style: none; text-align: left; margin-top: 6px; position: relative; padding-left: 28px; }
.story::before { content: ''; position: absolute; left: 9px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.story li { position: relative; margin-bottom: 16px; }
.story b { font-family: var(--f-disp); font-size: 15px; letter-spacing: .06em; color: var(--acc); }
.story p { font-size: 16.5px; line-height: 1.5; margin-top: 3px; }
.st-dot { position: absolute; left: -28px; top: 0; width: 19px; height: 19px; display: grid; place-items: center; color: var(--acc); background: var(--bg1); }
.st-dot .ico { width: 15px; height: 15px; }

/* ── Hitung mundur ── */
.crescent { width: 46px; height: 46px; color: var(--gold-l); margin: 0 auto 6px; filter: drop-shadow(0 0 10px rgba(230, 201, 135, .45)); }
.cd { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; margin: 18px 0 10px; }
.cd div {
    padding: 16px 0 10px; border-radius: 40px 40px 6px 6px / 22px 22px 6px 6px;
    border: 1px solid var(--cardline); background: var(--card);
}
.cd b { display: block; font-family: var(--f-disp); font-size: 25px; font-weight: 600; color: var(--gold-l); font-variant-numeric: tabular-nums; }
.cd span { font-size: 13px; letter-spacing: .08em; color: var(--muted); }
.cd-date { font-family: var(--f-disp); font-size: 14px; letter-spacing: .1em; color: var(--ink); }

/* ── Acara ── */
.ev {
    position: relative; margin-top: 18px; padding: 30px 16px 16px; text-align: center;
    border: 1px solid var(--cardline); background: var(--card); border-radius: 110px 110px 10px 10px / 40px 40px 10px 10px;
}
.ev-ico {
    position: absolute; top: -16px; left: 50%; transform: translateX(-50%); width: 34px; height: 34px; border-radius: 50%;
    display: grid; place-items: center; color: var(--acc); background: var(--bg1); border: 1px solid var(--line);
}
.ev-ico .ico { width: 18px; height: 18px; }
.ev h3 { font-family: var(--f-disp); font-size: 19px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.ev p { display: flex; align-items: flex-start; justify-content: center; gap: 7px; font-size: 16px; line-height: 1.35; margin-top: 4px; color: var(--ink); }
.ev p .ico { width: 15px; height: 15px; margin-top: 2px; color: var(--acc); }
.ev .btn-line { margin-top: 12px; padding: 9px 16px; font-size: 10.5px; }

/* ── Lokasi ── */
.map-frame {
    position: relative; width: 100%; height: 210px; margin: 14px 0 12px; overflow: hidden;
    border-radius: 120px 120px 8px 8px / 60px 60px 8px 8px; border: 1px solid var(--line);
    box-shadow: 0 0 0 4px rgba(0, 0, 0, .12);
}
.leaflet-map { width: 100%; height: 100%; }
.map-illu { position: absolute; inset: 0; display: block; }
.map-illu svg { width: 100%; height: 100%; display: block; }
.mi-pin {
    position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; transform: translate(-50%, -95%); display: grid; place-items: center;
    border-radius: 50% 50% 50% 4px; rotate: -45deg; background: var(--terra); color: #fff; box-shadow: 0 8px 16px -6px rgba(0, 0, 0, .5);
}
.mi-pin .ico { width: 20px; height: 20px; rotate: 45deg; }
.loc-name { font-family: var(--f-disp); font-size: 18px; font-weight: 600; color: var(--ink); }
.ea-marker span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); background: var(--emerald); color: var(--gold-l); border: 2px solid var(--gold-l); box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .6); }
.ea-marker svg { width: 18px; height: 18px; transform: rotate(45deg); }

/* ── Galeri ── */
.gal { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 4px; }
.niche {
    position: relative; aspect-ratio: 3 / 4; overflow: hidden; padding: 4px; display: block;
    border-radius: 50% 50% 6px 6px / 36% 36% 6px 6px; border: 1px solid var(--line); background: var(--card);
}
.niche img { width: 100%; height: 100%; object-fit: cover; border-radius: 50% 50% 4px 4px / 35% 35% 4px 4px; }
.gal.ph .niche { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.gal.ph .niche::before {
    content: ''; position: absolute; inset: 4px; border-radius: 50% 50% 4px 4px / 35% 35% 4px 4px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M11 2l2.6 6.4L20 11l-6.4 2.6L11 20l-2.6-6.4L2 11l6.4-2.6z' fill='none' stroke='%23e6c987' stroke-opacity='.28'/%3E%3C/svg%3E"),
        radial-gradient(ellipse at 50% 20%, #24786a, #0d342d 80%);
}
.gal.ph .n1::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Ccircle cx='11' cy='11' r='9' fill='none' stroke='%23f7f1e3' stroke-opacity='.25'/%3E%3C/svg%3E"), radial-gradient(ellipse at 50% 20%, #c9785c, #7a3a28 85%); }
.gal.ph .n2::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22'%3E%3Cpath d='M0 11L11 0L22 11L11 22Z' fill='none' stroke='%23e6c987' stroke-opacity='.25'/%3E%3C/svg%3E"), radial-gradient(ellipse at 50% 20%, #23466e, #0b1a2a 85%); }
.gal.ph .n3::before { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 22 22'%3E%3Cpath d='M11 2l2.6 6.4L20 11l-6.4 2.6L11 20l-2.6-6.4L2 11l6.4-2.6z' fill='none' stroke='%230f3b33' stroke-opacity='.25'/%3E%3C/svg%3E"), radial-gradient(ellipse at 50% 20%, #f3dca0, #b98d42 85%); }
.ni-art { position: relative; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; color: var(--gold-l); border: 1px solid rgba(230, 201, 135, .5); background: rgba(0, 0, 0, .15); }
.n3 .ni-art { color: #0f3b33; border-color: rgba(15, 59, 51, .4); background: rgba(255, 255, 255, .25); }
.ni-art .ico { width: 28px; height: 28px; }
.ni-cap { position: relative; font-family: var(--f-body); font-style: italic; font-size: 15px; color: #f7f1e3; }
.n3 .ni-cap { color: #0f3b33; }

/* ── Hadiah (restyle injected gift UI) ── */
.gift-wrap { margin: 8px -22px 0; text-align: left; }
.gift-wrap:not(:has(#gift-section)) { display: none; }
.gift-wrap #gift-section { background: transparent !important; padding: 4px 0 0 !important; font-family: var(--f-body) !important; }
.gift-wrap .gs-heading { display: none; }
.gift-wrap .gs-wrap { padding: 0 22px !important; }
.gift-wrap .gs-track { padding: 4px 22px 12px !important; }
.gift-wrap .gs-bank-track { padding: 0 22px 8px !important; }
.gift-wrap .gs-card, .gift-wrap .gs-bank-card { background: rgba(255, 255, 255, .7) !important; border: 1px solid rgba(201, 163, 90, .5) !important; box-shadow: 0 10px 22px -18px rgba(15, 59, 51, .6) !important; }
.gift-wrap .gs-card { border-radius: 60px 60px 10px 10px / 30px 30px 10px 10px !important; }
.gift-wrap .gs-bank-card { border-radius: 12px !important; }
.gift-wrap .gs-img-ph { background: linear-gradient(135deg, #e7f0ea, #d5e5dc) !important; }
.gift-wrap .gs-btn, .gift-wrap .gs-bank-copy { border-radius: 999px !important; font-family: var(--f-disp) !important; letter-spacing: .08em !important; }
.gift-wrap .gs-btn-buy { background: linear-gradient(180deg, #1f6b5c, #0f3b33) !important; color: #f7f1e3 !important; border: 0 !important; }
.gift-wrap .gs-bank-copy { background: #0f3b33 !important; color: #e6c987 !important; border: 0 !important; }
.gift-wrap .gs-price { color: #9a6a2c !important; font-family: var(--f-disp) !important; font-weight: 600 !important; }
.gift-wrap .gs-name, .gift-wrap .gs-bank-name-text, .gift-wrap .gs-bank-holder { font-family: var(--f-body) !important; color: #173a33 !important; font-size: 15px !important; }
.gift-wrap .gs-bank-number { font-family: var(--f-disp) !important; color: #0f3b33 !important; letter-spacing: .06em !important; }
.gift-wrap .gs-sub-label { display: block; padding: 0 22px; font-family: var(--f-disp) !important; font-size: 11px !important; letter-spacing: .22em !important; text-transform: uppercase; color: #9a6a2c !important; text-align: center; }
.gift-wrap .gs-dot.taken { background: #c9a35a !important; }

/* ── RSVP ── */
.rsvp-form { text-align: left; margin-top: 8px; }
.f-l { display: block; margin: 14px 0 6px; font-family: var(--f-disp); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--acc); }
.f-in {
    width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--cardline); background: rgba(0, 0, 0, .18);
    color: var(--ink); font-family: var(--f-body); font-size: 17px; outline: none; transition: border-color .2s, background .2s;
}
.f-in::placeholder { color: rgba(247, 241, 227, .45); font-style: italic; }
.f-in:focus { border-color: var(--gold-l); background: rgba(0, 0, 0, .26); }
textarea.f-in { resize: none; min-height: 92px; }
.att { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.att input { position: absolute; opacity: 0; pointer-events: none; }
.att span {
    display: block; padding: 10px 4px; border-radius: 30px 30px 8px 8px / 16px 16px 8px 8px; text-align: center; cursor: pointer;
    border: 1px solid var(--cardline); font-size: 15px; color: var(--muted); transition: all .25s;
}
.att input:checked + span { background: linear-gradient(180deg, #f1dca4, var(--gold)); color: #102f29; border-color: transparent; font-weight: 600; }
.rsvp-form .btn-gold { margin-top: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Ucapan ── */
.wishes-list { display: flex; flex-direction: column; gap: 10px; text-align: left; margin-top: 4px; }
.wish-item { display: flex; gap: 10px; padding: 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--cardline); }
.wish-item.new { animation: wishIn .6s var(--ease); }
@keyframes wishIn { from { opacity: 0; transform: translateY(-8px); } }
.wish-avatar { flex: none; width: 34px; height: 34px; border-radius: 50% 50% 6px 6px; display: grid; place-items: center; background: var(--av, #1f6b5c); color: #f7f1e3; font-family: var(--f-disp); font-size: 15px; }
.wish-body { min-width: 0; flex: 1; }
.wish-header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wish-name { font-family: var(--f-disp); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.wish-badge { font-size: 11.5px; padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; }
.wish-badge.hadir { color: #1f6b5c; }
.wish-badge.tidak { color: #8f4a37; }
.wish-badge.ragu { color: #8a6a2e; }
.wish-message { font-size: 16px; line-height: 1.45; margin-top: 3px; color: var(--ink); overflow-wrap: anywhere; }
.wish-time { font-size: 12.5px; font-style: italic; color: var(--muted); }
.wish-empty { text-align: center; padding: 22px 10px; color: var(--muted); font-style: italic; font-size: 16px; }
.we-ico { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto 10px; border-radius: 50%; border: 1px solid var(--line); color: var(--acc); }
.we-ico .ico { width: 24px; height: 24px; }

/* ── Penutup ── */
.names { font-family: var(--f-disp); font-weight: 600; font-size: 32px; line-height: 1.1; color: var(--gold-l); text-shadow: 0 0 18px rgba(230, 201, 135, .25); }
.names span { display: block; font-family: var(--f-body); font-style: italic; font-weight: 500; font-size: 24px; color: var(--ivory); }
.fam { display: grid; gap: 10px; width: 100%; margin: 6px 0 12px; }
.fam p { padding: 10px; border-radius: 10px; border: 1px solid var(--cardline); background: var(--card); font-size: 16px; line-height: 1.4; color: var(--ink); }
.fam span { display: block; font-family: var(--f-disp); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--acc); margin-bottom: 2px; }
.salam { font-style: italic; font-size: 17px; color: var(--gold-l); }
.credit { margin-top: 18px; font-size: 13px; color: var(--muted); letter-spacing: .02em; }

/* ── Toast ── */
.toast {
    position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); z-index: 9995;
    transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
    padding: 11px 18px; border-radius: 999px; background: rgba(7, 28, 24, .95); border: 1px solid rgba(230, 201, 135, .5);
    color: var(--ivory); font-size: 15px; white-space: nowrap; transition: opacity .3s, transform .35s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body.has-qr .toast { bottom: calc(160px + env(safe-area-inset-bottom)); }

/* ── Lightbox ── */
.gallery-lightbox {
    position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center;
    background: rgba(4, 16, 13, .95); opacity: 0; transition: opacity .3s;
}
.lb-img-wrap { max-width: 92vw; max-height: 80vh; }
.lb-img-wrap img { max-width: 92vw; max-height: 80vh; border-radius: 120px 120px 10px 10px / 70px 70px 10px 10px; object-fit: contain; border: 1px solid var(--gold); }
.lb-close, .lb-prev, .lb-next {
    position: absolute; width: 46px; height: 46px; border-radius: 50%; color: var(--gold-l); font-size: 26px; line-height: 1;
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(230, 201, 135, .4); display: grid; place-items: center;
}
.lb-close { top: 18px; right: 18px; font-size: 18px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-counter { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); color: rgba(247, 241, 227, .7); font-family: var(--f-disp); font-size: 12px; letter-spacing: .2em; }

/* ── Desktop ── */
@media (min-width: 700px) {
    .stage { box-shadow: 0 0 0 1px rgba(201, 163, 90, .35), 0 0 80px 10px rgba(0, 0, 0, .6); }
}

/* ── Small phones ── */
@media (max-height: 700px) {
    .gp-names { font-size: 26px; }
    .gate-plaque { padding-top: 38px; }
    .gp-note { display: none; }
    .title { font-size: 22px; }
    .portrait { width: 140px; height: 178px; }
    .portrait .mono { font-size: 66px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .gate.opening .leaf { opacity: 0; }
}
