/* ════════════════════════════════════════════════════════════════
   LOVE CHAT — undangan pernikahan bergaya aplikasi chat pastel
   ════════════════════════════════════════════════════════════════ */

:root {
    --cream: #fffaf3;
    --paper: #fffdf9;
    --lilac: #b9a7f5;
    --lilac-d: #8c78e8;
    --lilac-l: #efeaff;
    --peach: #ffc8b4;
    --peach-d: #ff9f86;
    --peach-l: #fff0ea;
    --mint: #bfeadc;
    --mint-d: #4fbf98;
    --mint-l: #ebf9f3;
    --butter: #ffe9a8;
    --butter-l: #fff8de;
    --pink: #ff8fb1;
    --pink-d: #ef6f97;
    --ink: #4a3f6b;
    --ink-soft: #6f6590;
    --muted: #a59cc0;
    --line: #ece5f7;
    --tick: #6fa8ff;

    --f-head: 'Fredoka', 'Nunito', system-ui, sans-serif;
    --f-body: 'Nunito', system-ui, -apple-system, sans-serif;
    --f-hand: 'Caveat', cursive;

    --col: 480px;
    --spring: cubic-bezier(.34, 1.56, .64, 1);
    --shadow-bubble: 0 1px 0 rgba(140, 120, 232, .08), 0 6px 16px -8px rgba(74, 63, 107, .22);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--f-body);
    color: var(--ink);
    background-color: #f6efff;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(255, 200, 180, .55) 0, transparent 32%),
        radial-gradient(circle at 88% 30%, rgba(191, 234, 220, .6) 0, transparent 30%),
        radial-gradient(circle at 30% 85%, rgba(255, 233, 168, .55) 0, transparent 30%),
        radial-gradient(circle at 85% 88%, rgba(185, 167, 245, .5) 0, transparent 32%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23c9b8ff' stroke-width='1.6' stroke-linecap='round' opacity='.5'%3E%3Cpath d='M24 30c-3-4-10-2-9 3 1 4 9 9 9 9s8-5 9-9c1-5-6-7-9-3z'/%3E%3Cpath d='M92 82l2 6 6 2-6 2-2 6-2-6-6-2 6-2z'/%3E%3Ccircle cx='86' cy='26' r='5'/%3E%3Ccircle cx='30' cy='92' r='3'/%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-height: 100vh;
}
body.no-scroll { overflow: hidden; height: 100vh; }

button, input, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
svg { display: block; }

/* ════════════════════════════════════════════════════════════════
   COVER — LOCK SCREEN
   ════════════════════════════════════════════════════════════════ */
.lock {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(165deg, #d9ccff 0%, #ffd9e6 42%, #ffe6cf 70%, #d6f3e8 100%);
    transition: transform .85s cubic-bezier(.7, 0, .3, 1), opacity .85s ease, filter .85s ease;
}
.lock.opening {
    transform: translateY(-104%);
    opacity: .4;
    filter: blur(6px);
}
.lock-wall { position: absolute; inset: 0; pointer-events: none; }
.blob {
    position: absolute;
    border-radius: 50%;
    /* pre-blurred gradient (≈ filter: blur(40px)) — padding/margin give room for the soft edge */
    box-sizing: content-box;
    padding: 80px;
    margin: -80px;
    opacity: .75;
    animation: blobDrift 14s ease-in-out infinite alternate;
}
.blob.b1 { width: 320px; height: 320px; background: radial-gradient(circle, rgba(195,178,255,1) 80px, rgba(195,178,255,0.84) 120px, rgba(195,178,255,0.5) 160px, rgba(195,178,255,0.16) 200px, rgba(195,178,255,0) 240px); top: -80px; left: -90px; }
.blob.b2 { width: 280px; height: 280px; background: radial-gradient(circle, rgba(255,185,207,1) 60px, rgba(255,185,207,0.84) 100px, rgba(255,185,207,0.5) 140px, rgba(255,185,207,0.16) 180px, rgba(255,185,207,0) 220px); top: 26%; right: -110px; animation-delay: -4s; }
.blob.b3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(255,227,155,1) 70px, rgba(255,227,155,0.84) 110px, rgba(255,227,155,0.5) 150px, rgba(255,227,155,0.16) 190px, rgba(255,227,155,0) 230px); bottom: -60px; left: -70px; animation-delay: -8s; opacity: .55; }
.blob.b4 { width: 220px; height: 220px; background: radial-gradient(circle, rgba(168,234,210,1) 30px, rgba(168,234,210,0.84) 70px, rgba(168,234,210,0.5) 110px, rgba(168,234,210,0.16) 150px, rgba(168,234,210,0) 190px); bottom: 18%; right: 10%; animation-delay: -2s; opacity: .6; }
@keyframes blobDrift {
    to { transform: translate(30px, 40px) scale(1.12); }
}

.lock-float { position: absolute; inset: 0; overflow: hidden; }
.floater {
    position: absolute;
    bottom: -40px;
    opacity: 0;
    filter: drop-shadow(0 2px 4px rgba(140, 120, 232, .25));
    animation: floatUp 8s linear forwards;
}
.floater svg { width: 100%; height: 100%; fill: currentColor; }
@keyframes floatUp {
    0% { transform: translate(0, 0) rotate(-10deg) scale(.6); opacity: 0; }
    12% { opacity: .95; }
    85% { opacity: .9; }
    100% { transform: translate(var(--drift), -110vh) rotate(16deg) scale(1); opacity: 0; }
}

.lock-inner {
    position: relative;
    width: 100%;
    max-width: var(--col);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 20px 14px;
}

.status-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 10px 0;
    color: rgba(74, 63, 107, .82);
    font: 700 13px/1 var(--f-body);
}
.sb-carrier { display: inline-flex; gap: 5px; align-items: center; }
.sb-icons { display: inline-flex; gap: 6px; align-items: center; }

.lock-clock {
    margin-top: clamp(26px, 7vh, 64px);
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 18px rgba(140, 120, 232, .35);
}
.lock-pad {
    margin: 0 auto 10px;
    color: rgba(255, 255, 255, .95);
    filter: drop-shadow(0 2px 6px rgba(140, 120, 232, .35));
    animation: padWiggle 3.2s ease-in-out infinite;
}
@keyframes padWiggle {
    0%, 82%, 100% { transform: rotate(0); }
    86% { transform: rotate(-10deg); }
    90% { transform: rotate(9deg); }
    94% { transform: rotate(-5deg); }
}
.lock-date {
    margin: 0;
    font: 600 17px/1.2 var(--f-head);
    letter-spacing: .02em;
    opacity: .95;
}
.lock-time {
    margin: 2px 0 0;
    font: 600 clamp(76px, 24vw, 104px)/1 var(--f-head);
    letter-spacing: -.02em;
    background: linear-gradient(180deg, #ffffff 30%, #fff1f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 18px rgba(124, 100, 220, .5));
}

.notif-stack {
    position: relative;
    width: 100%;
    margin-top: clamp(22px, 5vh, 44px);
    animation: notifIn .9s var(--spring) .35s both;
}
@keyframes notifIn {
    from { opacity: 0; transform: translateY(-26px) scale(.94); }
}
.notif {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, .72);
    backdrop-filter: blur(18px) saturate(1.4);
    -webkit-backdrop-filter: blur(18px) saturate(1.4);
    border: 1px solid rgba(255, 255, 255, .85);
    border-radius: 24px;
    padding: 14px 16px 16px;
    box-shadow: 0 14px 34px -14px rgba(108, 86, 196, .45);
}
.main-notif { z-index: 2; }
.ghost-notif {
    z-index: 1;
    width: 92%;
    margin: -10px auto 0;
    padding-top: 20px;
    padding-bottom: 12px;
    background: rgba(255, 255, 255, .5);
    border-radius: 0 0 20px 20px;
    animation: ghostIn .7s var(--spring) 1.1s both;
}
@keyframes ghostIn { from { opacity: 0; transform: translateY(-20px); } }
.notif-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font: 800 11px/1 var(--f-body);
    letter-spacing: .08em;
    color: var(--ink-soft);
}
.app-ico {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--lilac), var(--pink));
    box-shadow: 0 3px 8px -2px rgba(239, 111, 151, .6);
}
.notif-time { margin-left: auto; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.notif-title {
    margin: 10px 0 2px;
    font: 600 19px/1.25 var(--f-head);
    color: var(--ink);
}
.notif-text { margin: 0; font-size: 14.5px; color: var(--ink-soft); }
.ghost-notif .notif-text { margin-top: 6px; font-size: 13.5px; }
.notif-to {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(239, 234, 255, .95), rgba(255, 240, 234, .95));
    border: 1px dashed rgba(185, 167, 245, .8);
    text-align: center;
}
.to-label { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.to-name {
    display: block;
    margin-top: 3px;
    font: 600 20px/1.2 var(--f-head);
    color: var(--lilac-d);
    word-break: break-word;
}

.unlock {
    --p: 0;
    position: relative;
    margin-top: auto;
    width: 100%;
    max-width: 340px;
    height: 64px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .45);
    border: 1px solid rgba(255, 255, 255, .8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: inset 0 2px 6px rgba(140, 120, 232, .12), 0 10px 26px -12px rgba(108, 86, 196, .45);
    cursor: pointer;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    animation: notifIn .9s var(--spring) .7s both;
}
.unlock:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.unlock-fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 64px;
    border-radius: 99px;
    background: linear-gradient(90deg, rgba(185, 167, 245, .55), rgba(255, 143, 177, .55));
}
.unlock-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 48px;
    font: 600 16px/1 var(--f-head);
    letter-spacing: .02em;
    color: var(--ink);
    opacity: calc(1 - var(--p) * 1.6);
    background: linear-gradient(90deg, rgba(74, 63, 107, .55) 0%, rgba(74, 63, 107, .95) 45%, #fff 50%, rgba(74, 63, 107, .95) 55%, rgba(74, 63, 107, .55) 100%);
    background-size: 250% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 2.6s linear infinite;
}
.unlock-text b { margin-left: 6px; letter-spacing: -.1em; }
@keyframes shimmer { from { background-position: 125% 0; } to { background-position: -125% 0; } }
.unlock-knob {
    position: absolute;
    left: 5px;
    top: 5px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 6px 14px -4px rgba(108, 86, 196, .5);
    cursor: grab;
    touch-action: none;
    z-index: 2;
}
.unlock-knob svg { animation: heartbeat 1.4s ease-in-out infinite; }
.unlock.dragging .unlock-knob { cursor: grabbing; }
.unlock:not(.dragging):not(.done) .unlock-knob { animation: knobNudge 2.6s ease-in-out 1.8s infinite; }
@keyframes knobNudge {
    0%, 60%, 100% { transform: translateX(0); }
    70% { transform: translateX(18px); }
    80% { transform: translateX(0); }
    86% { transform: translateX(8px); }
}
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    15% { transform: scale(1.2); }
    30% { transform: scale(.95); }
    45% { transform: scale(1.12); }
}
.home-bar {
    display: block;
    width: 134px;
    height: 5px;
    border-radius: 9px;
    background: rgba(74, 63, 107, .55);
    margin: 18px auto 4px;
}

/* ════════════════════════════════════════════════════════════════
   MUSIC BUTTON
   ════════════════════════════════════════════════════════════════ */
.music-toggle-btn {
    position: fixed;
    top: 10px;
    right: max(12px, calc(50vw - var(--col) / 2 + 12px));
    z-index: 1002;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    padding: 0;
    cursor: pointer;
    border: 2px solid #fff;
    color: #fff;
    background: linear-gradient(135deg, var(--lilac) 0%, var(--pink) 100%);
    box-shadow: 0 6px 16px -6px rgba(239, 111, 151, .7);
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s ease, transform .25s var(--spring);
    -webkit-tap-highlight-color: transparent;
}
body.opened .music-toggle-btn { opacity: 1; pointer-events: auto; }
.music-toggle-btn:hover { transform: scale(1.08); }
.music-toggle-btn svg { width: 19px; height: 19px; }
.music-toggle-btn::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--pink);
    opacity: 0;
    pointer-events: none;
}
.music-toggle-btn.playing::after { animation: musicRing 1.8s ease-out infinite; }
@keyframes musicRing { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.55); opacity: 0; } }

/* ════════════════════════════════════════════════════════════════
   APP SHELL
   ════════════════════════════════════════════════════════════════ */
.app {
    position: relative;
    width: 100%;
    max-width: var(--col);
    min-height: 100vh;
    margin: 0 auto;
    background-color: var(--cream);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' opacity='.62'%3E%3Cpath d='M30 28c-4-5-13-2-11 4 1 5 11 11 11 11s10-6 11-11c2-6-7-9-11-4z' stroke='%23f3c6d6'/%3E%3Cpath d='M140 30l3 8 8 3-8 3-3 8-3-8-8-3 8-3z' stroke='%23ddd2ff'/%3E%3Ccircle cx='118' cy='118' r='9' stroke='%23f5dc9a'/%3E%3Ccircle cx='128' cy='112' r='9' stroke='%23f5dc9a'/%3E%3Cg stroke='%23bfe6d8'%3E%3Ccircle cx='50' cy='121' r='5'/%3E%3Ccircle cx='57' cy='127' r='5'/%3E%3Ccircle cx='54' cy='135' r='5'/%3E%3Ccircle cx='46' cy='135' r='5'/%3E%3Ccircle cx='43' cy='127' r='5'/%3E%3C/g%3E%3Ccircle cx='50' cy='129' r='2.5' fill='%23f5dc9a' stroke='none'/%3E%3Cpath d='M92 74c-2-3-7-1-6 2 0 3 6 6 6 6s6-3 6-6c1-3-4-5-6-2z' stroke='%23ddd2ff'/%3E%3Ccircle cx='160' cy='160' r='2' fill='%23f3c6d6' stroke='none'/%3E%3Ccircle cx='10' cy='80' r='2' fill='%23ddd2ff' stroke='none'/%3E%3Cpath d='M160 86l2 4 4 2-4 2-2 4-2-4-4-2 4-2z' stroke='%23f3c6d6'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 180px 180px;
    box-shadow: 0 0 0 1px rgba(185, 167, 245, .18), 0 30px 80px -30px rgba(108, 86, 196, .4);
}
@media (min-width: 520px) {
    .app { border-left: 1px solid #fff; border-right: 1px solid #fff; }
}

/* ── Header ── */
.chat-head {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 6px;
    height: 64px;
    padding: 0 66px 0 8px;
    background: rgba(255, 253, 249, .82);
    backdrop-filter: blur(16px) saturate(1.3);
    -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border-bottom: 1px solid var(--line);
}
.ch-back { color: var(--lilac-d); padding: 6px 2px; flex: none; }
.ch-avatars { position: relative; flex: none; width: 66px; height: 44px; }
.ch-avatars .av {
    position: absolute;
    top: 2px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 3px 8px -3px rgba(74, 63, 107, .4);
}
.ch-avatars .av.g { left: 0; }
.ch-avatars .av.b { left: 24px; }
.online-dot {
    position: absolute;
    right: -1px;
    bottom: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #5ad19e;
    border: 2.5px solid #fff;
}
.ch-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ch-title {
    font: 600 16.5px/1.15 var(--f-head);
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ch-status {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mint-d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .3s;
}
.ch-status.typing-now { color: var(--lilac-d); font-style: italic; }

/* ════════════════════════════════════════════════════════════════
   CHAT
   ════════════════════════════════════════════════════════════════ */
.chat {
    padding: 14px 10px 36px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sys-chip {
    align-self: center;
    margin: 10px 0 6px;
    padding: 6px 14px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .92);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font: 700 12px/1.3 var(--f-body);
    letter-spacing: .02em;
    box-shadow: 0 3px 10px -6px rgba(74, 63, 107, .3);
    text-align: center;
}
.sys-chip b { color: var(--lilac-d); }
.sys-note {
    align-self: center;
    max-width: 330px;
    margin: 2px auto 12px;
    padding: 9px 14px;
    border-radius: 14px;
    background: var(--butter-l);
    border: 1px solid #f7e6a8;
    color: #8a7440;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}
.sys-note svg { display: inline-block; vertical-align: -1px; margin-right: 3px; }

/* ── Message rows ── */
.msg {
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 7px;
    max-width: 100%;
    margin-top: 2px;
}
.msg.first { margin-top: 10px; }
.msg.out { justify-content: flex-end; }
.msg-av {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    box-shadow: 0 2px 6px -2px rgba(74, 63, 107, .35);
}
.msg-av.spacer { box-shadow: none; }
.msg:not(.first) > svg.msg-av { visibility: hidden; }

.bubble {
    position: relative;
    max-width: min(78%, 330px);
    padding: 9px 13px 8px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: var(--shadow-bubble);
    word-wrap: break-word;
    -webkit-tap-highlight-color: transparent;
    user-select: text;
}
.bubble p { margin: 0; }
.msg.in .bubble {
    background: #fff;
    border: 1px solid #f1ecfa;
    border-bottom-left-radius: 8px;
}
.msg.out .bubble {
    background: linear-gradient(140deg, #e6ddff 0%, #f6dcf0 55%, #ffe1d6 100%);
    border: 1px solid rgba(255, 255, 255, .7);
    border-bottom-right-radius: 8px;
}
/* tails on the first bubble of each group */
.msg.first .bubble::before {
    content: '';
    position: absolute;
    bottom: 0;
    width: 14px;
    height: 16px;
}
.msg.in.first .bubble::before {
    left: -7px;
    background: radial-gradient(circle at 0 0, transparent 13px, #fff 13.5px);
}
.msg.out.first .bubble::before {
    right: -7px;
    background: radial-gradient(circle at 100% 0, transparent 13px, #ffe1d6 13.5px);
}

.sender {
    display: block;
    margin-bottom: 1px;
    font: 600 13px/1.3 var(--f-head);
    color: var(--mint-d);
}
.meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 3px;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    line-height: 1;
}
.msg.out .meta { color: #a38db8; }
.tk {
    width: 17px;
    height: 11px;
    color: #c2b6d8;
    transition: color .5s ease .7s;
}
.msg.shown .tk { color: var(--tick); }
.hand {
    font: 700 22px/1 var(--f-hand);
    color: var(--pink-d);
    white-space: nowrap;
}

/* ── Reveal states ── */
/* hidden items keep their space so the observer can see them and nothing jumps */
.pinned.pending, .composer.pending { opacity: 0; transform: translateY(18px); }
.msg.pending > :not(.typing) { opacity: 0; }
.msg.shown > svg.msg-av { animation: avPop .4s var(--spring) both; }
@keyframes avPop { from { opacity: 0; transform: scale(.4); } }
.msg.shown .bubble,
.msg.shown .sticker { animation: bubblePop .55s var(--spring) both; }
.msg.in.shown .bubble, .msg.in.shown .sticker { transform-origin: 0 100%; }
.msg.out.shown .bubble { transform-origin: 100% 100%; }
.pinned.shown, .composer.shown { animation: sysPop .6s var(--spring) both; }
@keyframes bubblePop {
    0% { opacity: 0; transform: scale(.4) translateY(10px); }
    100% { opacity: 1; transform: none; }
}
@keyframes sysPop {
    0% { opacity: 0; transform: translateY(18px) scale(.94); }
    100% { opacity: 1; transform: none; }
}

.typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 13px 15px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid #f1ecfa;
    box-shadow: var(--shadow-bubble);
    animation: bubblePop .35s var(--spring) both;
}
.typing { position: absolute; top: 0; }
.typing.in { left: 39px; border-bottom-left-radius: 8px; transform-origin: 0 100%; }
.typing.out { right: 39px; border-bottom-right-radius: 8px; background: #f1ebff; transform-origin: 100% 100%; }
.typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--lilac);
    animation: dots 1s ease-in-out infinite;
}
.typing span:nth-child(2) { animation-delay: .15s; background: var(--pink); }
.typing span:nth-child(3) { animation-delay: .3s; background: var(--peach-d); }
@keyframes dots {
    0%, 60%, 100% { transform: translateY(0); opacity: .55; }
    30% { transform: translateY(-5px); opacity: 1; }
}

/* ── Reaction badge ── */
.react {
    position: absolute;
    bottom: -12px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 7px 2px 5px;
    border-radius: 99px;
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 3px 8px -3px rgba(74, 63, 107, .35);
    font: 800 11px/1 var(--f-body);
    color: var(--pink-d);
    z-index: 2;
}
.msg.in .react { right: 10px; }
.msg.out .react { left: 10px; }
.sticker .react { right: 18px; bottom: 6px; }
.react svg { width: 14px; height: 14px; fill: var(--pink); }
.react.pop { animation: reactPop .5s var(--spring); }
@keyframes reactPop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
.bubble:has(.react) { margin-bottom: 12px; }

/* ── Sticker ── */
.sticker-row { margin-top: 6px; }
.sticker { position: relative; width: 200px; cursor: default; }
.sticker-svg { width: 100%; height: auto; overflow: visible; --avbg-g: transparent; --avbg-b: transparent; }
.stk-groom { animation: bobL 2.4s ease-in-out infinite; transform-origin: 70px 166px; }
.stk-bride { animation: bobR 2.4s ease-in-out infinite; transform-origin: 150px 166px; }
.stk-heart { animation: heartbeat 1.3s ease-in-out infinite; transform-origin: 110px 112px; }
.stk-spark use { animation: twinkle 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.stk-spark use:nth-child(2) { animation-delay: .6s; }
.stk-spark use:nth-child(3) { animation-delay: 1.2s; }
.stk-mini use { animation: miniFloat 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.stk-mini use:nth-child(2) { animation-delay: 1.1s; }
@keyframes bobL { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(3deg) translateY(-2px); } }
@keyframes bobR { 0%, 100% { transform: rotate(2deg); } 50% { transform: rotate(-3deg) translateY(-2px); } }
@keyframes twinkle { 0%, 100% { transform: scale(.5); opacity: .4; } 50% { transform: scale(1.1); opacity: 1; } }
@keyframes miniFloat { 0% { transform: translateY(6px); opacity: 0; } 40% { opacity: 1; } 100% { transform: translateY(-16px); opacity: 0; } }

/* ── Forwarded ── */
.fwd-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    font-style: italic;
    color: #9a86c9;
    margin-bottom: 5px;
}
.fwd blockquote {
    margin: 0;
    padding: 8px 11px;
    border-left: 4px solid var(--lilac);
    border-radius: 6px 12px 12px 6px;
    background: rgba(255, 255, 255, .6);
}
.fwd blockquote p { font-size: 14px; line-height: 1.6; color: var(--ink-soft); font-style: italic; }
.fwd cite {
    display: block;
    margin-top: 6px;
    font: 600 13px/1 var(--f-head);
    font-style: normal;
    color: var(--lilac-d);
}

/* ── Cards inside bubbles ── */
.bubble.card { width: min(78%, 310px); padding: 12px 13px 9px; }

.contact-top { display: flex; align-items: center; gap: 12px; }
.contact-av {
    flex: none;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 4px 12px -4px rgba(74, 63, 107, .45);
}
.contact-role {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 99px;
    font: 800 10.5px/1.5 var(--f-body);
    letter-spacing: .06em;
    text-transform: uppercase;
}
.groom-card .contact-role { background: var(--mint-l); color: var(--mint-d); }
.bride-card .contact-role { background: rgba(255, 255, 255, .75); color: var(--pink-d); }
.contact-name {
    margin: 4px 0 0;
    font: 600 22px/1.15 var(--f-head);
    color: var(--ink);
    word-break: break-word;
}
.contact-parent {
    margin: 10px 0 0 !important;
    padding-top: 9px;
    border-top: 1px dashed rgba(185, 167, 245, .6);
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--ink-soft);
}
.contact-parent b { color: var(--ink); font-weight: 700; }

/* ── Pinned countdown ── */
.pinned {
    align-self: center;
    width: min(100%, 360px);
    margin: 20px 0 10px;
    padding: 12px 14px 14px;
    border-radius: 22px;
    background: linear-gradient(150deg, #fff 0%, #fff7ef 100%);
    border: 1px solid #f6e3d8;
    box-shadow: 0 12px 30px -16px rgba(255, 143, 177, .6);
    text-align: center;
}
.pin-head {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 99px;
    background: var(--peach-l);
    color: var(--peach-d);
    font: 800 11px/1.4 var(--f-body);
    letter-spacing: .04em;
}
.pin-title { margin: 8px 0 12px; font: 600 18px/1.2 var(--f-head); color: var(--ink); }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cd {
    padding: 10px 2px 8px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.cd b { font: 600 26px/1 var(--f-head); color: var(--ink); font-variant-numeric: tabular-nums; }
.cd span { font-size: 11px; font-weight: 800; color: var(--ink-soft); letter-spacing: .03em; }
.cd.c1 { background: var(--lilac-l); }
.cd.c2 { background: #ffe6ee; }
.cd.c3 { background: var(--mint-l); }
.cd.c4 { background: var(--butter-l); }
.cd.tick b { animation: cdTick .4s var(--spring); }
@keyframes cdTick { 0% { transform: translateY(-5px) scale(1.12); } 100% { transform: none; } }

/* ── Events ── */
.ev-top { display: flex; align-items: center; gap: 12px; }
.ev-cal {
    flex: none;
    width: 58px;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    text-align: center;
    box-shadow: 0 4px 12px -5px rgba(74, 63, 107, .4);
}
.ev-mon {
    display: block;
    padding: 4px 0 3px;
    font: 800 11px/1 var(--f-body);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
}
.ev-akad .ev-mon { background: linear-gradient(90deg, var(--lilac), var(--pink)); }
.ev-resepsi .ev-mon { background: linear-gradient(90deg, var(--mint-d), #7fd3b6); }
.ev-day { display: block; padding: 5px 0 6px; font: 600 26px/1 var(--f-head); color: var(--ink); }
.ev-kind { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ev-title { margin: 2px 0 0; font: 600 22px/1.1 var(--f-head); color: var(--ink); }
.ev-rows { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.ev-rows li {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--ink-soft);
    font-weight: 600;
}
.ev-ic {
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 12px;
    background: rgba(255, 255, 255, .8);
}
.msg.in .ev-ic { background: var(--mint-l); }
.ev-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 14px;
    font: 600 14px/1 var(--f-head);
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--lilac-d), var(--pink));
    box-shadow: 0 6px 14px -6px rgba(140, 120, 232, .8);
    transition: transform .2s var(--spring), box-shadow .2s;
}
.ev-btn:hover { transform: translateY(-2px); }
.ev-btn:active { transform: scale(.97); }
.ev-resepsi .ev-btn,
.ev-btn.mint { background: linear-gradient(135deg, #3fae8a, #7fd3b6); box-shadow: 0 6px 14px -6px rgba(63, 174, 138, .8); }

/* ── Location ── */
.bubble.location { padding: 5px 5px 8px; }
.loc-map {
    position: relative;
    height: 160px;
    border-radius: 15px;
    overflow: hidden;
    background: var(--mint-l);
}
.leaflet-map { width: 100%; height: 100%; z-index: 1; }
.map-illu, .map-illu svg { display: block; width: 100%; height: 100%; }
.loc-pin {
    position: absolute;
    left: 50%;
    top: 46%;
    transform: translate(-50%, -100%);
    filter: drop-shadow(0 4px 6px rgba(239, 111, 151, .5));
    animation: pinBounce 1.6s ease-in-out infinite;
    pointer-events: none;
}
@keyframes pinBounce { 0%, 100% { transform: translate(-50%, -100%); } 50% { transform: translate(-50%, -125%); } }
.lc-marker span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50% 50% 50% 4px;
    transform: rotate(-45deg);
    background: #fff;
    box-shadow: 0 4px 10px -2px rgba(239, 111, 151, .6);
}
.lc-marker svg { width: 22px; height: 22px; fill: var(--pink-d); transform: rotate(45deg); }
.loc-body { padding: 10px 9px 0; }
.loc-kind { font-size: 11.5px; font-weight: 800; color: var(--mint-d); letter-spacing: .03em; }
.loc-name { margin: 3px 0 0; font: 600 18px/1.25 var(--f-head); color: var(--ink); }
.loc-addr { margin: 4px 0 0 !important; font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.bubble.location .meta { padding-right: 8px; }

/* ── Photos ── */
.bubble.photo-msg { width: min(78%, 300px); padding: 5px 5px 8px; }
.collage {
    display: grid;
    gap: 4px;
    border-radius: 15px;
    overflow: hidden;
}
.collage.count-1 { grid-template-columns: 1fr; }
.collage.count-2 { grid-template-columns: 1fr 1fr; }
.collage.count-3 { grid-template-columns: 1fr 1fr; }
.collage.count-3 .ph:first-child { grid-column: 1 / -1; }
.collage.count-4 { grid-template-columns: 1fr 1fr; }
.ph {
    position: relative;
    aspect-ratio: 1;
    padding: 0;
    border: 0;
    margin: 0;
    overflow: hidden;
    cursor: zoom-in;
    background: var(--lilac-l);
}
.collage.count-1 .ph, .collage.count-3 .ph:first-child { aspect-ratio: 4 / 3; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.ph:hover img { transform: scale(1.06); }
.ph-more {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(74, 63, 107, .45);
    backdrop-filter: blur(2px);
    color: #fff;
    font: 600 28px/1 var(--f-head);
}
.ph.placeholder { display: grid; place-items: center; cursor: default; }
.ph.placeholder svg { fill: rgba(255, 255, 255, .95); animation: heartbeat 2.2s ease-in-out infinite; }
.ph.p0 { background: linear-gradient(135deg, #e6ddff, #ffd6e3); }
.ph.p1 { background: linear-gradient(135deg, #ffe0d1, #fff1c2); }
.ph.p2 { background: linear-gradient(135deg, #d4f2e6, #e6ddff); }
.ph.p3 { background: linear-gradient(135deg, #ffd6e3, #ffe0d1); }
.ph.p1 svg { animation-delay: .5s; }
.ph.p2 svg { animation-delay: 1s; }
.ph.p3 svg { animation-delay: 1.5s; }
.photo-cap { margin: 7px 8px 0 !important; font-size: 14.5px; }
.bubble.photo-msg .meta { padding-right: 8px; }

/* ── Voice note ── */
.bubble.voice {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 10px;
    width: min(78%, 290px);
    padding: 10px 13px 8px 10px;
}
.bubble.voice .meta { grid-column: 1 / -1; }
.vn-play {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    display: grid;
    place-items: center;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--lilac-d), var(--pink));
    box-shadow: 0 5px 12px -5px rgba(140, 120, 232, .9);
    transition: transform .2s var(--spring);
}
.vn-play:active { transform: scale(.92); }
.vn-play svg { width: 20px; height: 20px; }
.vn-i-pause { display: none !important; }
.voice.playing .vn-i-pause { display: block !important; }
.voice.playing .vn-i-play { display: none !important; }
.vn-main { min-width: 0; }
.vn-wave { display: flex; align-items: center; gap: 2.5px; height: 32px; overflow: hidden; }
.vn-wave i {
    flex: 1 1 0;
    min-width: 2px;
    max-width: 4px;
    height: var(--h);
    border-radius: 3px;
    background: rgba(140, 120, 232, .35);
    transform-origin: center;
    transition: background .3s;
}
.vn-wave i.lit { background: var(--lilac-d); }
.voice.playing .vn-wave i { animation: wave 1s ease-in-out infinite; }
.voice.playing .vn-wave i:nth-child(3n) { animation-delay: .2s; }
.voice.playing .vn-wave i:nth-child(3n+1) { animation-delay: .45s; }
.voice.playing .vn-wave i:nth-child(4n) { animation-delay: .7s; }
@keyframes wave { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.45); } }
.vn-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 3px;
    font-size: 12px;
    font-weight: 700;
    color: #9a86c9;
}

/* ── Gift wrapper ── */
.gift-wrap {
    margin: 20px 0 6px;
    padding: 4px 0 0;
    display: flex;
    flex-direction: column;
    border-radius: 28px;
    background: rgba(255, 255, 255, .6);
    border: 1px solid rgba(255, 255, 255, .9);
    overflow: hidden;
}
.gift-wrap .gift-chip { margin-top: 14px; }
.gift-wrap:not(:has(#gift-section)) { display: none; }
.gift-wrap #gift-section {
    background: transparent !important;
    padding: 12px 0 18px !important;
}
.gift-wrap .gs-heading h2 { font-family: var(--f-head) !important; color: var(--ink) !important; font-weight: 600 !important; }
.gift-wrap .gs-heading h2::after { background: var(--pink) !important; }

/* ════════════════════════════════════════════════════════════════
   WISHES · GROUP CHAT
   ════════════════════════════════════════════════════════════════ */
.wish-group { display: flex; flex-direction: column; margin-top: 14px; scroll-margin-top: 70px; }
.wishes-list {
    display: flex;
    flex-direction: column-reverse;   /* newest at the bottom, like a real chat */
    gap: 9px;
    max-height: 470px;
    overflow-y: auto;
    padding: 8px 2px 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--lilac) transparent;
    overscroll-behavior: contain;
}
.wish-item {
    --wc: var(--lilac-d);
    display: flex;
    align-items: flex-end;
    gap: 7px;
    max-width: 88%;
}
.wish-item.new { animation: bubblePop .55s var(--spring) both; transform-origin: 0 100%; }
.wish-avatar {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    font: 600 14px/1 var(--f-head);
    text-transform: uppercase;
    background: var(--wc);
    box-shadow: 0 0 0 2px #fff, 0 3px 8px -3px rgba(74, 63, 107, .45);
}
.wish-body {
    position: relative;
    min-width: 0;
    padding: 8px 12px 7px;
    background: #fff;
    border: 1px solid #f1ecfa;
    border-radius: 18px 18px 18px 6px;
    box-shadow: var(--shadow-bubble);
}
.wish-header { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; }
.wish-name { font: 600 13.5px/1.3 var(--f-head); color: var(--wc); word-break: break-word; }
.wish-badge {
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .02em;
}
.wish-badge.hadir { background: var(--mint-l); color: #2f9a76; }
.wish-badge.tidak { background: #ffe9ee; color: var(--pink-d); }
.wish-badge.ragu { background: var(--butter-l); color: #b48a14; }
.wish-message { margin: 3px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink); white-space: pre-line; word-wrap: break-word; }
.wish-time { display: block; margin-top: 3px; text-align: right; font-size: 11px; font-weight: 700; color: var(--muted); }
.wish-empty {
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin: 8px auto;
    padding: 18px 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .85);
    border: 1px dashed var(--lilac);
    text-align: center;
}
.wish-empty svg { animation: heartbeat 1.6s ease-in-out infinite; }
.wish-empty p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); font-weight: 600; }

/* ── Composer ── */
.composer {
    margin-top: 8px;
    padding: 14px 14px 14px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .95);
    border: 1px solid var(--line);
    box-shadow: 0 16px 34px -20px rgba(108, 86, 196, .55);
}
.composer-head { text-align: center; margin-bottom: 12px; }
.composer-title { display: block; font: 600 20px/1.2 var(--f-head); color: var(--ink); }
.composer-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.chat-form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--ink-soft); padding-left: 4px; }
.chat-form input[type="text"],
.chat-form textarea {
    width: 100%;
    border: 1.5px solid var(--line);
    background: var(--paper);
    border-radius: 16px;
    padding: 11px 14px;
    font-size: 15px;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.chat-form input[type="text"]:focus,
.chat-form textarea:focus {
    border-color: var(--lilac);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(185, 167, 245, .25);
}
.chat-form ::placeholder { color: #bdb4d4; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
    display: inline-block;
    padding: 8px 13px;
    border-radius: 99px;
    border: 1.5px solid var(--line);
    background: #fff;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink-soft);
    transition: all .25s var(--spring);
}
.chip input:checked + span {
    border-color: transparent;
    color: #fff;
    background: linear-gradient(135deg, var(--lilac-d), var(--pink));
    box-shadow: 0 5px 12px -5px rgba(140, 120, 232, .8);
    transform: scale(1.04);
}
.chip input:focus-visible + span { outline: 3px solid rgba(185, 167, 245, .5); outline-offset: 2px; }
.compose-row { display: flex; align-items: flex-end; gap: 9px; }
.compose-row textarea { flex: 1; resize: none; border-radius: 20px; min-height: 84px; line-height: 1.5; }
.send-btn {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 0;
    padding: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 1px;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--lilac-d), var(--pink));
    box-shadow: 0 8px 18px -6px rgba(239, 111, 151, .75);
    transition: transform .25s var(--spring), background .3s;
}
.send-btn:hover { transform: scale(1.06) rotate(-6deg); }
.send-btn:active { transform: scale(.92); }
.send-btn:disabled { cursor: default; }
.send-label { font: 800 9px/1 var(--f-body); letter-spacing: .05em; text-transform: uppercase; }
.send-btn.sending .send-ic { animation: sendFly .9s ease-in-out infinite; }
.send-btn.sent { background: linear-gradient(135deg, #3fae8a, #7fd3b6); }
@keyframes sendFly { 0% { transform: translate(0, 0); } 50% { transform: translate(4px, -4px); opacity: .5; } 100% { transform: translate(0, 0); } }

/* ════════════════════════════════════════════════════════════════
   CLOSING
   ════════════════════════════════════════════════════════════════ */
.chat-end {
    margin-top: 34px;
    padding: 26px 18px 30px;
    text-align: center;
    border-radius: 28px;
    background: linear-gradient(160deg, rgba(239, 234, 255, .9), rgba(255, 233, 240, .9) 50%, rgba(255, 240, 222, .9));
    border: 1px solid #fff;
    box-shadow: 0 16px 34px -22px rgba(108, 86, 196, .6);
}
.end-hearts { display: flex; justify-content: center; align-items: center; gap: 8px; }
.end-hearts svg:nth-child(2) { animation: heartbeat 1.4s ease-in-out infinite; }
.end-thanks { margin: 10px 0 0; font: 700 34px/1 var(--f-hand); color: var(--pink-d); }
.end-names { margin: 6px 0 0; font: 600 26px/1.2 var(--f-head); color: var(--ink); word-break: break-word; }
.end-names em { font: 700 28px/1 var(--f-hand); font-style: normal; color: var(--lilac-d); margin: 0 4px; }
.end-credit { margin: 14px 0 0; font-size: 12px; font-weight: 700; color: var(--muted); }
body.has-qr .chat { padding-bottom: 96px; }

/* ════════════════════════════════════════════════════════════════
   FX + LIGHTBOX
   ════════════════════════════════════════════════════════════════ */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 6000; overflow: hidden; }
.burst {
    position: absolute;
    margin: -8px 0 0 -8px;
    animation: burstOut 1.2s cubic-bezier(.2, .8, .3, 1) forwards;
}
.burst svg { width: 100%; height: 100%; fill: currentColor; }
@keyframes burstOut {
    0% { transform: translate(0, 0) scale(.2) rotate(0); opacity: 1; }
    70% { opacity: 1; }
    100% { transform: translate(var(--tx), calc(var(--ty) + 50px)) scale(1) rotate(var(--rot)); opacity: 0; }
}

.gallery-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 7000;
    align-items: center;
    justify-content: center;
    background: rgba(58, 46, 92, .88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity .3s ease;
}
.lb-img-wrap { max-width: 92vw; max-height: 80vh; }
.lb-img-wrap img {
    max-width: 92vw;
    max-height: 80vh;
    border-radius: 20px;
    border: 4px solid #fff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.lb-close, .lb-prev, .lb-next {
    position: absolute;
    border: 0;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .92);
    color: var(--lilac-d);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .4);
}
.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: 22px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 14px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    font: 600 13px/1.3 var(--f-head);
}

/* Leaflet tidy-up inside bubbles */
.leaflet-container { font-family: var(--f-body); }
.leaflet-control-attribution { font-size: 9px !important; }

/* ════════════════════════════════════════════════════════════════
   SMALL SCREENS + REDUCED MOTION
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 360px) {
    .bubble { font-size: 14.5px; }
    .bubble.card, .bubble.photo-msg, .bubble.voice { width: 82%; }
    .cd b { font-size: 22px; }
    .ch-title { font-size: 15px; }
}
@media (max-height: 640px) {
    .lock-clock { margin-top: 12px; }
    .lock-time { font-size: 68px; }
    .ghost-notif { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
    html { scroll-behavior: auto; }
}
