:root{
  color-scheme: dark;
  --ink:#0B0508; --velvet:#140A10; --velvet-2:#1E0F17; --velvet-3:#2A1520;
  --rose:#FF5C8A; --rose-deep:#C7376A; --blush:#FFD3E0; --gold:#D9AE49; --gold-lit:#F5DB9B;
  --paper:#fff; --paper-dim:rgba(255,255,255,.6); --line:rgba(255,211,224,.12);
  --mine:#5A1A33; --mine-2:#6E2240; --theirs:#221219;
  --ease: cubic-bezier(.22,.61,.36,1);
  --top: env(safe-area-inset-top, 0px); --bottom: env(safe-area-inset-bottom, 0px);
}
*,*::before,*::after{ box-sizing:border-box; }
html,body{ margin:0; height:100%; background:var(--ink); color:var(--paper); }
body{ font-family: Karla, system-ui, sans-serif; font-size:16px; line-height:1.45; overflow:hidden; -webkit-tap-highlight-color: transparent; }
[hidden]{ display:none !important; }
button{ font:inherit; color:inherit; cursor:pointer; background:none; border:0; padding:0; }
.hand{ font-family: Caveat, cursive; }
.pen{ font-family: "Patrick Hand", cursive; }
.dim{ color: var(--paper-dim); }
svg{ display:block; }

.screen{ position:fixed; inset:0; display:flex; flex-direction:column; }

/* ---------- pills (same pen as the gift page) ---------- */
.btn{ position:relative; padding: 11px 22px; border-radius:999px; font-family:"Patrick Hand", cursive; font-size:1.15rem; }
.btn::after{ content:""; position:absolute; inset:0; border-radius:999px; border:2px solid var(--rose); transform: rotate(-1deg); pointer-events:none; }
.btn.fill{ background: var(--rose); color:#1a0710; }
.btn.fill::after{ border-color: var(--blush); transform: rotate(1.2deg) translate(2px,2px); }
.btn.soft::after{ border-color: rgba(255,211,224,.4); }
.btn:active{ transform: scale(.97); }
.btn[disabled]{ opacity:.45; cursor:default; }

/* ---------- lock ---------- */
#lock{ background: radial-gradient(120% 70% at 50% 0%, #2a0f1c 0%, var(--ink) 60%); overflow-y:auto; }
.lock-in{ width:100%; max-width:420px; margin:auto; padding: calc(24px + var(--top)) 16px calc(24px + var(--bottom)); text-align:center; }
.lock-heart{ width:64px; height:64px; margin: 0 auto 6px; }
.lock-heart path{ fill: rgba(255,92,138,.18); stroke: var(--rose); stroke-width:3; stroke-linejoin:round; animation: beat 1.6s ease-in-out infinite; transform-origin:50% 55%; }
@keyframes beat{ 0%,100%{ transform: scale(1); } 15%{ transform: scale(1.08); } 30%{ transform: scale(1); } 45%{ transform: scale(1.05); } }
#lock h1{ font-size: 3rem; margin: 0; color: var(--blush); font-weight:700; line-height:1; }
#lock .pen{ margin:.3rem 0 0; font-size:1.1rem; }
.entered{ min-height: 52px; margin: 18px 0 4px; display:flex; flex-wrap:wrap; justify-content:center; gap:8px; align-items:center; }
.entered span{ width:14px; height:14px; border-radius:50%; background: var(--rose); box-shadow: 0 0 12px rgba(255,92,138,.6); animation: pop .25s var(--ease); }
.entered span.peek{ width:auto; height:auto; background:none; box-shadow:none; font-size:1.6rem; }
.entered.shake{ animation: shake .45s; }
@keyframes shake{ 20%,60%{ transform: translateX(-8px); } 40%,80%{ transform: translateX(8px); } }
@keyframes pop{ from{ transform: scale(.4); opacity:0; } }
.lock-err{ min-height:1.5em; color: var(--rose); margin: 0 0 8px; font-size:1.05rem; }
/* minmax(0, 1fr): columns stay exactly a sixth wide, so a tapped key can't push the grid wider */
.keypad{ display:grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.key{ aspect-ratio: 1; min-width: 0; width: 100%; overflow: hidden; border-radius: 14px; background: var(--velvet-2); font-size: clamp(1.4rem, 6.4vw, 1.9rem); display:grid; place-items:center;
      border:1px solid var(--line); transition: transform .12s, background .12s; user-select:none; -webkit-user-select:none; }
.key:active, .key.hit{ transform: scale(.9); background: rgba(255,92,138,.25); }
.lock-actions{ display:flex; justify-content:center; gap:14px; margin-top: 20px; }
.setup-step{ font-family:"Patrick Hand", cursive; color: var(--gold); letter-spacing:.04em; margin: 10px 0 0; }

/* ---------- top bar ---------- */
#chat{ background: var(--ink); }
.top{ position:relative; display:flex; align-items:center; gap: 12px; padding: calc(10px + var(--top)) 10px 10px 16px;
      background: var(--velvet); border-bottom: 1px solid var(--line); z-index: 5; }
.avatar{ width:42px; height:42px; border-radius:50%; flex:0 0 auto; display:grid; place-items:center; background: radial-gradient(circle at 30% 30%, var(--rose), var(--rose-deep));
         font-family: Caveat, cursive; font-weight:700; font-size: 1.6rem; color:#1a0710; position:relative; }
.avatar.on::after{ content:""; position:absolute; right:0; bottom:1px; width:11px; height:11px; border-radius:50%; background:#5BE38D; border:2px solid var(--velvet); }
.who{ flex:1; min-width:0; }
.name{ font-size: 1.7rem; line-height:1; color: var(--blush); font-weight:700; }
.status{ font-size:.85rem; color: var(--paper-dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-height: 1.2em; }
.love-count{ display:block; font-size: .92rem; line-height: 1.2; color: var(--gold-lit); margin-top: 1px; text-align:left; }
.love-count.pop{ animation: pop .3s var(--ease); }
.status.live{ color: var(--gold-lit); font-family:"Patrick Hand", cursive; font-size: .98rem; }
.icon-btn{ width:42px; height:42px; border-radius:50%; display:grid; place-items:center; flex: 0 0 auto; }
.icon-btn:active{ background: rgba(255,255,255,.08); }
.icon-btn svg{ width:24px; height:24px; fill:none; stroke: var(--blush); stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.icon-btn.small{ width:32px; height:32px; } .icon-btn.small svg{ width:18px; height:18px; }
#menuBtn svg{ fill: var(--blush); stroke:none; }
.menu{ position:absolute; right:10px; top: calc(100% - 4px); background: var(--velvet-3); border:1px solid var(--line); border-radius: 14px; padding: 6px; min-width: 220px;
       box-shadow: 0 12px 40px rgba(0,0,0,.5); animation: pop .18s var(--ease); }
.menu button, .menu a{ display:block; width:100%; text-align:left; padding: 12px 14px; border-radius:10px; color: inherit; text-decoration:none; }
.menu button:active, .menu a:active{ background: rgba(255,255,255,.07); }
#lock .gift-link{ display:inline-block; margin-top: 34px; color: var(--paper-dim); font-size: 1.05rem; text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,.25); }

.banner{ background: rgba(217,174,73,.12); color: var(--gold-lit); font-size:.92rem; padding: 10px 16px; border-bottom: 1px solid rgba(217,174,73,.25); display:flex; gap:12px; align-items:center; }
.banner b{ font-weight:600; }
.banner button{ margin-left:auto; color: var(--ink); background: var(--gold); padding: 6px 12px; border-radius: 999px; font-weight:600; flex:0 0 auto; }

/* ---------- messages ---------- */
.list{ flex:1; overflow-y:auto; overflow-x:hidden; padding: 10px 10px 14px; overscroll-behavior: contain;
       background-color: var(--ink);
       background-image: 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='%23FF5C8A' stroke-opacity='.06' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 30c-6-4-9-8-7-12 2-3 6-3 7 0 1-3 5-3 7 0 2 4-1 8-7 12z'/%3E%3Cpath d='M86 92c-5-3-7-7-6-10 2-3 5-2 6 0 1-2 4-3 6 0 1 3-1 7-6 10z'/%3E%3Ccircle cx='92' cy='26' r='2'/%3E%3Ccircle cx='30' cy='88' r='1.6'/%3E%3Cpath d='M58 58l3 3m0-3l-3 3'/%3E%3C/g%3E%3C/svg%3E");
       background-size: 160px 160px; }
.older{ text-align:center; min-height: 24px; color: var(--paper-dim); font-size:.85rem; font-family:"Patrick Hand", cursive; }
.day{ text-align:center; margin: 14px 0 8px; }
.day span{ display:inline-block; font-family:"Patrick Hand", cursive; font-size:.92rem; color: var(--gold-lit); background: rgba(20,10,16,.9); padding: 3px 14px; border-radius: 999px; border:1px solid rgba(217,174,73,.25); }
.empty{ text-align:center; margin-top: 20vh; padding: 0 20px; }
.empty .hand{ font-size: 2rem; color: var(--blush); }

.m{ display:flex; margin: 2px 0; position:relative; touch-action: pan-y; }
.m.me{ justify-content:flex-end; }
.m.gap{ margin-top: 10px; }
.b{ position:relative; max-width: min(78%, 520px); padding: 7px 10px 6px; border-radius: 16px; background: var(--theirs); word-wrap: break-word; overflow-wrap:anywhere;
    transition: transform .2s var(--ease); user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.m.me .b{ background: linear-gradient(160deg, var(--mine-2), var(--mine)); }
.m:not(.me).tail .b{ border-bottom-left-radius: 5px; }
.m.me.tail .b{ border-bottom-right-radius: 5px; }
.b .text{ white-space: pre-wrap; }
.b .text a{ color: var(--gold-lit); }
.b .text.big{ font-size: 2.4rem; line-height:1.15; }
.b.emoji-only{ background: transparent !important; padding: 0 2px; }
.b .foot{ float:right; margin: 6px 0 -3px 10px; display:flex; align-items:center; gap:3px; font-size:.72rem; color: rgba(255,255,255,.55); white-space:nowrap; }
.b .foot svg{ width:16px; height:12px; fill:none; stroke: currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.b .foot .read{ color: #7cc7ff; }
.b .foot .wait svg{ width:12px; height:12px; }
.b.media-b{ padding: 4px; }
.b.media-b .cap{ padding: 5px 6px 1px; }
.b.media-b .foot.over{ position:absolute; right: 10px; bottom: 9px; margin:0; float:none; background: rgba(0,0,0,.45); padding: 1px 7px; border-radius: 999px; color:#fff; }
.m.deleted .b{ font-style: italic; color: var(--paper-dim); }
.m.flash .b{ animation: flash 1.4s; }
@keyframes flash{ 0%,60%{ box-shadow: 0 0 0 3px var(--gold); } 100%{ box-shadow: 0 0 0 3px transparent; } }
.m.pending .b{ opacity:.75; }
.m.failed .b{ box-shadow: 0 0 0 1.5px var(--rose); }
.retry{ display:block; font-size:.8rem; color: var(--rose); margin-top: 4px; text-decoration: underline; }
.swipe-hint{ position:absolute; left: -2px; top:50%; width:28px; height:28px; margin-top:-14px; border-radius:50%; background: rgba(255,255,255,.1); display:grid; place-items:center; opacity:0; }
.swipe-hint svg{ width:16px; height:16px; fill:none; stroke: var(--blush); stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

/* reply quote inside a bubble and above the composer */
.quote{ display:flex; gap:8px; align-items:center; background: rgba(0,0,0,.25); border-left: 3px solid var(--rose); border-radius: 8px; padding: 5px 8px; margin-bottom: 5px; cursor:pointer; min-width: 0; }
.quote.k-kenneth{ border-left-color: var(--gold); }
.quote .qt{ flex:1; min-width:0; }
.quote .qn{ font-size: .8rem; font-weight:600; color: var(--rose); }
.quote.k-kenneth .qn{ color: var(--gold-lit); }
.quote .qb{ font-size: .86rem; color: rgba(255,255,255,.75); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.quote img{ width:40px; height:40px; object-fit:cover; border-radius:6px; flex:0 0 auto; }
.b.media-b .quote{ margin: 2px 2px 5px; }

/* photos / videos */
.ph{ position:relative; display:block; border-radius: 12px; overflow:hidden; background: rgba(0,0,0,.35); max-width: 100%; }
.ph img, .ph video{ display:block; width:100%; height:100%; object-fit:cover; }
.ph .play{ position:absolute; inset:0; margin:auto; width:54px; height:54px; border-radius:50%; background: rgba(0,0,0,.5); display:grid; place-items:center; }
.ph .play svg{ width:24px; height:24px; fill:#fff; margin-left:3px; }
.ph .dur{ position:absolute; left:8px; bottom:8px; font-size:.75rem; background: rgba(0,0,0,.5); padding: 1px 7px; border-radius:999px; }
.ph .prog{ position:absolute; inset:0; display:grid; place-items:center; background: rgba(0,0,0,.4); font-family:"Patrick Hand", cursive; font-size: 1.1rem; }

/* voice notes */
.vn{ display:flex; align-items:center; gap: 10px; width: min(290px, 66vw); padding: 2px 0; }
.vn .pp{ width:40px; height:40px; border-radius:50%; background: var(--rose); display:grid; place-items:center; flex:0 0 auto; }
.m.me .vn .pp{ background: var(--blush); }
.vn .pp svg{ width:18px; height:18px; fill:#1a0710; }
.vn .wv{ flex:1; height: 30px; display:flex; align-items:center; gap:2px; cursor:pointer; touch-action:none; }
.vn .wv i{ flex:1; background: rgba(255,255,255,.35); border-radius:2px; min-height:3px; }
.vn .wv i.on{ background: var(--gold-lit); }
.vn .vt{ display:flex; flex-direction:column; align-items:flex-end; gap:2px; flex:0 0 auto; }
.vn .vd{ font-size:.75rem; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; }
.vn .sp{ font-size:.72rem; font-weight:600; background: rgba(255,255,255,.14); border-radius: 999px; padding: 1px 6px; }

/* reactions */
.rx{ position:absolute; bottom:-12px; display:flex; gap:1px; background: var(--velvet-3); border: 2px solid var(--ink); border-radius:999px; padding: 0 5px; font-size:.9rem; line-height:1.4; z-index: 1; }
.m:not(.me) .rx{ left: 10px; } .m.me .rx{ right: 10px; }
.m.has-rx{ margin-bottom: 16px; }

/* typing bubble */
.typing .b{ padding: 12px 14px; }
.typing .dots{ display:flex; gap:4px; }
.typing .dots i{ width:7px; height:7px; border-radius:50%; background: var(--blush); opacity:.4; animation: dot 1.2s infinite; }
.typing .dots i:nth-child(2){ animation-delay:.15s; } .typing .dots i:nth-child(3){ animation-delay:.3s; }
@keyframes dot{ 30%{ opacity:1; transform: translateY(-3px); } }

.jump{ position:absolute; right: 14px; bottom: calc(86px + var(--bottom)); width:42px; height:42px; border-radius:50%; background: var(--velvet-3); border:1px solid var(--line); display:grid; place-items:center; z-index: 4; }
.jump svg{ width:22px; height:22px; fill:none; stroke: var(--blush); stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.jump span{ position:absolute; top:-6px; right:-4px; background: var(--rose); color:#1a0710; font-size:.72rem; font-weight:700; border-radius:999px; padding: 0 6px; min-width: 18px; text-align:center; }
.jump span:empty{ display:none; }

/* ---------- composer ---------- */
.composer{ background: var(--velvet); border-top: 1px solid var(--line); padding: 8px 8px calc(8px + var(--bottom)); }
.composer .row{ display:flex; align-items:flex-end; gap: 4px; }
.replying{ display:flex; align-items:center; gap: 6px; padding: 0 2px 8px 6px; }
.replying .quote{ flex:1; margin:0; cursor:default; }
#input{ flex:1; min-width:0; resize:none; border:1px solid var(--line); background: var(--velvet-2); color: var(--paper); border-radius: 22px; padding: 10px 14px;
        font: inherit; font-size: 16px; line-height:1.35; max-height: 140px; outline:none; overflow-y:hidden; scrollbar-width: thin; }
#input:focus{ border-color: rgba(255,92,138,.5); }
#input::placeholder{ color: rgba(255,255,255,.38); font-family:"Patrick Hand", cursive; font-size: 1.05rem; }
.send-btn{ width:44px; height:44px; border-radius:50%; background: var(--rose); display:grid; place-items:center; flex:0 0 auto; position:relative; }
.send-btn:active{ transform: scale(.94); }
.send-btn svg{ width:22px; height:22px; fill:none; stroke:#1a0710; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; position:absolute; transition: transform .2s, opacity .2s; }
.send-btn .i-send{ opacity:0; transform: scale(.4) rotate(-40deg); }
.send-btn.on .i-send{ opacity:1; transform:none; }
.send-btn.on .i-mic{ opacity:0; transform: scale(.4); }
.rec{ align-items:center !important; }
.rec-dot{ width:10px; height:10px; border-radius:50%; background: var(--rose); animation: blink 1s infinite; margin-left: 4px; flex:0 0 auto; }
@keyframes blink{ 50%{ opacity:.2; } }
.rec-time{ font-variant-numeric: tabular-nums; min-width: 44px; font-size: .95rem; }
.rec-wave{ flex:1; height: 34px; min-width: 0; }

/* ---------- long-press sheet ---------- */
.sheet-wrap{ position:fixed; inset:0; background: rgba(0,0,0,.5); z-index: 20; display:flex; align-items:flex-end; justify-content:center; animation: fade .15s; }
@keyframes fade{ from{ opacity:0; } }
.sheet{ width:100%; max-width: 480px; background: var(--velvet-3); border-radius: 20px 20px 0 0; padding: 12px 10px calc(12px + var(--bottom)); animation: up .22s var(--ease); }
@keyframes up{ from{ transform: translateY(100%); } }
.sheet > button{ display:block; width:100%; text-align:left; padding: 14px 14px; border-radius: 12px; font-size: 1.02rem; }
.sheet > button:active{ background: rgba(255,255,255,.07); }
.sheet .danger{ color: var(--rose); }
.reacts{ display:flex; justify-content:space-between; padding: 4px 4px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.reacts button{ font-size: 1.7rem; width: 44px; height:44px; border-radius:50%; display:grid; place-items:center; transition: transform .12s; }
.reacts button:active{ transform: scale(1.3); }
.reacts button.mine{ background: rgba(255,92,138,.25); }

/* ---------- send preview + viewer ---------- */
.preview, .viewer{ position:fixed; inset:0; z-index: 30; background: #000; display:flex; flex-direction:column; }
.preview-media{ flex:1; display:flex; gap: 10px; overflow-x:auto; scroll-snap-type: x mandatory; align-items:center; padding-top: var(--top); }
.preview-media > *{ flex: 0 0 100%; max-height: 100%; object-fit: contain; scroll-snap-align:center; }
.preview-media img, .preview-media video{ width:100%; height:100%; object-fit:contain; }
.preview-bar{ display:flex; gap: 6px; align-items:center; padding: 10px 8px calc(10px + var(--bottom)); background: var(--velvet); }
#caption{ flex:1; min-width:0; border:1px solid var(--line); background: var(--velvet-2); color: var(--paper); border-radius: 22px; padding: 11px 14px; font: inherit; font-size:16px; outline:none; }
.viewer-body{ flex:1; display:grid; place-items:center; overflow:hidden; }
.viewer-body img, .viewer-body video{ max-width:100%; max-height:100%; object-fit:contain; }
.viewer-x{ position:absolute; top: calc(10px + var(--top)); right: 10px; z-index:2; background: rgba(0,0,0,.4); }
.viewer-meta{ position:absolute; left: 12px; right: 64px; top: calc(14px + var(--top)); z-index:2; display:flex; align-items:center; gap: 10px; font-size:.9rem; color: rgba(255,255,255,.8); }
.viewer-meta:empty{ display:none; }
.viewer-meta button{ background: rgba(255,92,138,.9); color:#1a0710; font-family:"Patrick Hand", cursive; font-size: 1rem; padding: 5px 12px; border-radius:999px; margin-left:auto; }

/* search */
.search{ position:fixed; inset:0; z-index: 25; background: var(--ink); display:flex; flex-direction:column; }
.search-top{ display:flex; align-items:center; gap: 6px; padding: calc(8px + var(--top)) 12px 10px 6px; background: var(--velvet); border-bottom: 1px solid var(--line); }
#searchInput{ flex:1; min-width:0; border:1px solid var(--line); background: var(--velvet-2); color: var(--paper); border-radius: 22px; padding: 10px 16px; font: inherit; font-size:16px; outline:none; }
#searchInput:focus{ border-color: rgba(255,92,138,.5); }
#searchInput::placeholder{ color: rgba(255,255,255,.38); font-family:"Patrick Hand", cursive; font-size: 1.05rem; }
.search-body{ flex:1; overflow-y:auto; padding: 6px 0 calc(20px + var(--bottom)); }
.hit{ display:block; width:100%; text-align:left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.hit:active{ background: rgba(255,255,255,.05); }
.hit-top{ display:flex; gap: 8px; font-size: .8rem; margin-bottom: 3px; }
.hit-top .who{ font-weight:600; color: var(--blush); }
.hit.me .hit-top .who{ color: var(--gold-lit); }
.hit-top .when{ margin-left:auto; color: rgba(255,255,255,.5); }
.hit-body{ color: rgba(255,255,255,.85); display:-webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow:hidden; white-space: pre-wrap; overflow-wrap:anywhere; }
.hit-body mark{ background: rgba(255,92,138,.4); color: #fff; border-radius: 3px; padding: 0 1px; }

/* pins */
.pinbar{ display:flex; align-items:center; gap: 10px; width:100%; text-align:left; padding: 8px 14px; background: var(--velvet-2); border-bottom: 1px solid var(--line); z-index: 4; }
.pinbar:active{ background: var(--velvet-3); }
.pin-ico{ font-size: 1.05rem; flex: 0 0 auto; }
.pin-txt{ flex:1; min-width:0; display:flex; flex-direction:column; }
.pin-label{ font-size: .76rem; font-weight:600; color: var(--gold-lit); }
.pin-body{ font-size: .9rem; color: rgba(255,255,255,.85); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pin-dots{ display:flex; flex-direction:column; gap: 3px; flex: 0 0 auto; }
.pin-dots i{ width: 3px; height: 8px; border-radius: 2px; background: rgba(255,255,255,.25); }
.pin-dots i.on{ background: var(--rose); }
.pinbar.pop .pin-txt{ animation: pop .3s var(--ease); }
.b .foot .pinned{ font-size: .7rem; margin-right: 1px; }
.b .foot .starred{ font-size: .7rem; margin-right: 1px; }
.stars-sub{ margin: 4px 16px 6px; color: var(--paper-dim); font-size: .95rem; }
.pins-title{ margin:0; font-size: 1.9rem; color: var(--blush); font-weight:700; }
.hit .unpin{ margin-left: 8px; color: var(--rose); font-family:"Patrick Hand", cursive; font-size: .95rem; text-decoration: underline; }

/* gallery */
.gallery{ position:fixed; inset:0; z-index: 25; background: var(--ink); display:flex; flex-direction:column; }
.gal-top{ display:flex; align-items:center; gap: 6px; padding: calc(8px + var(--top)) 12px 4px 6px; background: var(--velvet); }
.gal-top h2{ margin:0; font-size: 1.9rem; color: var(--blush); font-weight:700; }
.gal-type{ display:flex; gap: 4px; padding: 4px 12px 2px; background: var(--velvet); }
.gal-type button{ flex:1; padding: 9px 6px; font-size: .95rem; color: var(--paper-dim); border-bottom: 2px solid transparent; }
.gal-type button.on{ color: var(--blush); border-bottom-color: var(--rose); font-weight:600; }
.gal-list{ display:flex; flex-direction:column; gap: 8px; padding: 0 10px; }
.gal-vn{ background: var(--theirs); border-radius: 14px; padding: 10px 12px 8px; }
.gal-vn.me{ background: linear-gradient(160deg, var(--mine-2), var(--mine)); }
.gal-vn-top{ display:flex; align-items:center; gap: 8px; font-size: .82rem; margin-bottom: 6px; }
.gal-vn-top .who{ font-weight:600; color: var(--blush); }
.gal-vn-top .when{ color: rgba(255,255,255,.6); }
.gal-vn-top .go{ margin-left:auto; font-family:"Patrick Hand", cursive; font-size:.95rem; color: var(--gold-lit); text-decoration: underline; text-underline-offset: 3px; }
.gal-vn .vn{ width: 100%; }
.gal-vn.me .vn .pp{ background: var(--blush); }
.gal-tabs{ display:flex; gap: 8px; padding: 6px 12px 12px; background: var(--velvet); border-bottom: 1px solid var(--line); overflow-x:auto; }
.gal-tabs button{ flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; border:1px solid var(--line); font-size:.9rem; color: var(--paper-dim); }
.gal-tabs button b{ font-weight: 500; }
.gal-tabs button span{ opacity:.6; margin-left: 2px; }
.gal-tabs button.on{ background: var(--rose); border-color: var(--rose); color:#1a0710; }
.gal-body{ flex:1; overflow-y:auto; padding: 0 2px calc(20px + var(--bottom)); }
.gal-month{ font-family:"Patrick Hand", cursive; color: var(--gold-lit); font-size: 1.05rem; padding: 14px 10px 6px; }
.gal-grid{ display:grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
@media (min-width: 600px){ .gal-grid{ grid-template-columns: repeat(5, 1fr); } }
.gal-item{ position:relative; aspect-ratio: 1; overflow:hidden; background: var(--velvet-2); }
.gal-item img{ width:100%; height:100%; object-fit:cover; display:block; }
.gal-item .who{ position:absolute; left: 5px; top: 5px; font-size: .85rem; line-height:1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.7)); }
.gal-item .vid{ position:absolute; right: 5px; bottom: 5px; display:flex; align-items:center; gap:3px; font-size:.72rem; background: rgba(0,0,0,.55); padding: 1px 6px; border-radius:999px; }
.gal-item .vid svg{ width:10px; height:10px; fill:#fff; }
.gal-note{ text-align:center; color: var(--paper-dim); padding: 18px 16px; margin:0; font-size:1.05rem; }

.toast{ position:fixed; left:50%; bottom: calc(100px + var(--bottom)); transform: translateX(-50%); background: var(--velvet-3); border:1px solid var(--line); color: var(--blush);
        padding: 10px 18px; border-radius: 999px; font-family:"Patrick Hand", cursive; font-size: 1.05rem; z-index: 60; animation: pop .2s var(--ease); max-width: calc(100% - 32px); text-align:center; }

/* monthiversary / 100-day card */
.moment{ position:fixed; inset:0; z-index: 48; background: rgba(0,0,0,.55); display:grid; place-items:center; padding: 16px; animation: fade .3s; }
.moment-card{ width:100%; max-width: 340px; text-align:center; background: radial-gradient(120% 90% at 50% 0%, #3a1527 0%, var(--velvet) 70%);
  border-radius: 24px; padding: 26px 22px 24px; position:relative; animation: pop .5s var(--ease); }
.moment-card::after{ content:""; position:absolute; inset:0; border-radius:24px; border: 2px solid var(--rose); transform: rotate(-1deg); pointer-events:none; }
.moment-icon{ font-size: 3rem; line-height:1; animation: beat 1.6s ease-in-out infinite; }
.moment-card h2{ font-size: 2.3rem; line-height:1.05; color: var(--blush); margin: 12px 0 8px; font-weight:700; }
.moment-card p{ font-size: 1.2rem; color: var(--gold-lit); margin: 0 0 20px; }

/* the "us" page */
.top .who, .top .avatar{ cursor: pointer; }
.us{ position:fixed; inset:0; z-index: 26; overflow-y:auto; isolation:isolate; animation: fade .3s;
     background: radial-gradient(70% 40% at 50% 12%, rgba(255,92,138,.32), transparent 70%), radial-gradient(60% 40% at 50% 100%, rgba(217,174,73,.14), transparent 70%), var(--ink); }
.us-x{ position:fixed; top: calc(8px + var(--top)); left: 6px; z-index: 2; }
.us-body{ max-width: 460px; margin: 0 auto; padding: calc(40px + var(--top)) 16px calc(30px + var(--bottom)); text-align:center; }
.us-pair{ display:flex; align-items:center; justify-content:center; margin-top: 8px; }
.us-av{ width: 108px; height: 108px; border-radius:50%; display:grid; place-items:center; font-size: 2.8rem;
        background: radial-gradient(circle at 35% 30%, #3a1527, #1b0b13) center / cover no-repeat;
        box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px rgba(255,92,138,.55), 0 18px 40px rgba(0,0,0,.6); animation: usIn .7s var(--ease) both; }
#usMe{ transform: translateX(14px) rotate(-4deg); --tx: 40px; } #usPeer{ transform: translateX(-14px) rotate(4deg); --tx: -40px; animation-delay: .08s; }
@keyframes usIn{ from{ opacity:0; translate: var(--tx) 0; } }
.us-heart{ width: 54px; height: 54px; z-index: 2; margin: 0 -10px; filter: drop-shadow(0 4px 14px rgba(255,92,138,.8)); }
.us-heart path{ fill: var(--rose); stroke: var(--blush); stroke-width: 3; transform-origin: 50% 55%; animation: beat 1.4s ease-in-out infinite; }
.us-names{ font-size: 2.2rem; color: var(--blush); margin: 18px 0 2px; font-weight:700; line-height:1.1; }
.us-since{ color: var(--gold-lit); margin: 0 0 18px; font-size: 1.1rem; }
.us-big{ display:flex; justify-content:center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.us-big .pill{ background: linear-gradient(135deg, rgba(255,92,138,.25), rgba(199,55,106,.15)); border: 1px solid rgba(255,92,138,.35);
               border-radius: 999px; padding: 7px 14px; font-size: .95rem; }
.us-big .pill b{ font-size: 1.15rem; }
.us-grid{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; text-align:left; }
.tile{ background: rgba(255,255,255,.045); border-radius: 18px; padding: 14px 14px 12px; box-shadow: inset 0 0 0 1px rgba(255,211,224,.08); animation: viewIn .5s var(--ease) both; }
.tile .ti{ font-size: 1.3rem; }
.tile .tn{ font-size: 1.55rem; font-weight: 600; margin-top: 2px; }
.tile .tl{ font-size: .82rem; color: var(--paper-dim); }
.tile .split{ display:flex; height: 6px; border-radius: 3px; overflow:hidden; margin-top: 9px; background: rgba(255,255,255,.08); }
.tile .split i{ background: var(--gold); } .tile .split i + i{ background: var(--rose); }
.tile .sl{ display:flex; justify-content:space-between; font-size: .72rem; color: var(--paper-dim); margin-top: 4px; }
.us-emoji{ margin: 16px 0 6px; }
.us-emoji .lbl{ font-family:"Patrick Hand", cursive; color: var(--gold-lit); font-size: 1.05rem; margin-bottom: 6px; }
.us-emoji .row{ display:flex; justify-content:center; gap: 14px; font-size: 2rem; }
.us-emoji .row span{ display:flex; flex-direction:column; align-items:center; }
.us-emoji .row small{ font-size: .72rem; color: var(--paper-dim); }
.us-links{ display:grid; gap: 8px; margin-top: 18px; }
.us-links button{ padding: 13px; border-radius: 14px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,211,224,.1); }

/* good morning / good night */
.greet{ position:fixed; left:50%; top: calc(92px + var(--top)); z-index: 6; transform: translateX(-50%); display:flex; align-items:center; gap: 10px;
        white-space: nowrap; padding: 8px 20px 8px 14px; border-radius: 999px; background: rgba(30,15,23,.82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
        box-shadow: 0 12px 34px rgba(0,0,0,.5), inset 0 0 0 1px rgba(245,219,155,.25); animation: greetIn 4.6s var(--ease) forwards; pointer-events:none; }
.greet .hand{ font-size: 1.55rem; color: var(--blush); }
.greet-i{ font-size: 1.5rem; animation: beat 1.6s ease-in-out infinite; }
@keyframes greetIn{ 0%{ opacity:0; transform: translate(-50%, -14px) scale(.9); } 12%{ opacity:1; transform: translate(-50%, 0) scale(1); }
                    82%{ opacity:1; transform: translate(-50%, 0); } 100%{ opacity:0; transform: translate(-50%, -10px); } }

/* typing bubble with her little face */
.typing{ align-items: flex-end; gap: 6px; }
.typing .tav{ width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; display:grid; place-items:center; font-size: .85rem;
              background: radial-gradient(circle at 35% 30%, #3a1527, #1b0b13) center / cover no-repeat; box-shadow: 0 0 0 1.5px rgba(255,92,138,.5); }
.typing .b{ animation: msgIn .3s var(--ease); }
.typing .rec-ic{ font-size: 1rem; animation: blink 1s infinite; }

/* 💗 thinking of you */
.nudge-btn svg{ fill: rgba(255,92,138,.18); stroke: var(--rose); }
.nudge-btn:active svg{ fill: var(--rose); transform: scale(1.2); transition: transform .1s; }
.nudge-btn.sent svg{ animation: nudgeSent .9s var(--ease); }
@keyframes nudgeSent{ 0%{ transform: scale(1); fill: var(--rose); } 20%{ transform: scale(1.4); } 40%{ transform: scale(1); } 60%{ transform: scale(1.25); } 100%{ transform: scale(1); } }
.beat{ position:fixed; inset:0; z-index: 66; display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 10px; pointer-events:none;
       background: radial-gradient(50% 40% at 50% 46%, rgba(255,92,138,.38), rgba(11,5,8,.55) 70%); animation: beatFade 3.6s var(--ease) forwards; }
@keyframes beatFade{ 0%{ opacity:0; } 10%{ opacity:1; } 80%{ opacity:1; } 100%{ opacity:0; } }
.beat-heart{ width: 150px; height: 150px; filter: drop-shadow(0 0 30px rgba(255,92,138,.9)); }
.beat-heart path{ fill: var(--rose); stroke: var(--blush); stroke-width: 2.5; transform-origin: 50% 55%; animation: heartbeat 1.1s ease-in-out 3; }
@keyframes heartbeat{ 0%,100%{ transform: scale(1); } 14%{ transform: scale(1.22); } 28%{ transform: scale(1); } 42%{ transform: scale(1.14); } 70%{ transform: scale(1); } }
.beat-text{ font-size: 2rem; color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.6); margin: 0; padding: 0 20px; text-align:center; }
.m.nudgerow{ justify-content:center; margin: 8px 0; }
.nudgepill{ display:inline-flex; align-items:center; gap: 8px; font-family:"Patrick Hand", cursive; font-size: 1rem; color: var(--blush);
            background: linear-gradient(135deg, rgba(255,92,138,.18), rgba(199,55,106,.10)); box-shadow: inset 0 0 0 1px rgba(255,92,138,.3);
            padding: 5px 14px; border-radius: 999px; }
.nudgepill small{ color: var(--paper-dim); font-family: Karla, sans-serif; font-size: .72rem; }
.m.nudgerow.in .nudgepill{ animation: rxPop .6s var(--ease); }

/* ✨ send with an effect */
.fx-sheet h3{ margin: 2px 6px 10px; font-size: 1.9rem; color: var(--blush); }
.fxs{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 4px 8px; }
.fxs button{ display:flex; flex-direction:column; align-items:center; gap: 4px; padding: 14px 8px; border-radius: 16px; font-size: .95rem;
             background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,211,224,.1); }
.fxs button span{ font-size: 2rem; transition: transform .2s; }
.fxs button:active span{ transform: scale(1.3) rotate(-8deg); }
.fx-layer{ position:fixed; inset:0; z-index: 47; pointer-events:none; overflow:hidden; }
.fxp{ position:absolute; will-change: transform, opacity; }
.fxp.rise{ bottom: -40px; animation: fxRise linear forwards; }
@keyframes fxRise{ to{ transform: translateY(-115vh) rotate(var(--r)); opacity: 0; } }
.fxp.fall{ top: -40px; animation: fxFall linear forwards; }
@keyframes fxFall{ 0%{ transform: translate(0, 0) rotate(0); } 25%{ transform: translate(var(--sway), 28vh) rotate(calc(var(--r) * .3)); }
                   50%{ transform: translate(calc(var(--sway) * -1), 56vh) rotate(calc(var(--r) * .6)); } 100%{ transform: translate(var(--sway), 112vh) rotate(var(--r)); opacity: .2; } }
.fxp.twinkle{ animation: fxTwinkle ease-in-out forwards; }
@keyframes fxTwinkle{ 0%{ transform: scale(0) rotate(0); opacity:0; } 30%{ transform: scale(1.2) rotate(40deg); opacity:1; } 60%{ transform: scale(.9) rotate(80deg); opacity:1; } 100%{ transform: scale(0) rotate(140deg); opacity:0; } }
.fxp.bit{ width: 8px; height: 13px; border-radius: 2px; }
.b .fxbadge{ display:inline-block; margin-left: 4px; cursor:pointer; font-size: .8rem; }

/* 📻 our radio */
.radiobar{ display:flex; align-items:center; gap: 4px; padding: 5px 8px 5px 12px; z-index: 4;
           background: linear-gradient(90deg, rgba(90,24,56,.75), rgba(42,21,32,.75)); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
           border-bottom: 1px solid rgba(255,92,138,.18); }
.rb-main{ flex:1; min-width:0; display:flex; align-items:center; gap: 10px; text-align:left; }
.rb-txt{ display:flex; flex-direction:column; min-width:0; line-height: 1.2; }
.rb-txt b{ font-weight: 600; font-size: .9rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rb-txt small{ font-size: .74rem; color: var(--paper-dim); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.eq{ display:flex; align-items:flex-end; gap: 2px; height: 16px; width: 18px; flex: 0 0 auto; }
.eq i{ flex:1; background: linear-gradient(180deg, var(--gold-lit), var(--rose)); border-radius: 1px; height: 30%; }
.radiobar.on .eq i{ animation: eq .9s ease-in-out infinite; }
.radiobar.on .eq i:nth-child(2){ animation-delay: -.3s; } .radiobar.on .eq i:nth-child(3){ animation-delay: -.6s; } .radiobar.on .eq i:nth-child(4){ animation-delay: -.15s; }
@keyframes eq{ 0%,100%{ height: 25%; } 50%{ height: 100%; } }
.radiobar .icon-btn svg, .rs-ctrl .icon-btn svg{ fill: var(--blush); stroke: none; }
#rsShuffle svg, #rsStop svg{ fill:none; stroke: var(--blush); }
#rsShuffle.on svg{ stroke: var(--rose); filter: drop-shadow(0 0 4px rgba(255,92,138,.8)); }
#rbPlay .i-pause, #rsPlay .i-pause{ display:none; }
.playing-on #rbPlay .i-pause, .playing-on #rsPlay .i-pause{ display:inline; }
.playing-on #rbPlay .i-play, .playing-on #rsPlay .i-play{ display:none; }
#rsPlay svg{ fill: #1a0710; stroke: none; position: static; opacity: 1; transform:none; }
.radio-invite{ position:fixed; left:50%; top: calc(132px + var(--top)); transform: translateX(-50%); z-index: 64; max-width: calc(100% - 32px);
               white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size: 1.05rem; color: #fff; padding: 9px 18px; border-radius: 999px;
               background: linear-gradient(135deg, var(--rose), var(--rose-deep)); box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 22px rgba(255,92,138,.5); animation: pop .4s var(--ease); }
.radio-sheet{ max-height: 86vh; overflow-y:auto; }
.rs-now{ display:flex; align-items:center; gap: 14px; padding: 6px 8px 10px; }
.rs-disc{ width: 64px; height: 64px; border-radius: 50%; flex: 0 0 auto; display:grid; place-items:center; color: var(--blush); font-size: 1.3rem;
          background: repeating-radial-gradient(circle, #1b0b13 0 2px, #2a1520 2px 4px); box-shadow: 0 0 0 3px rgba(255,92,138,.4), 0 8px 24px rgba(0,0,0,.5); }
.rs-disc span{ width: 22px; height: 22px; border-radius: 50%; display:grid; place-items:center; background: var(--rose); color:#fff; font-size: .8rem; }
.playing-on .rs-disc{ animation: spin 5s linear infinite; }
.rs-title{ font-size: 1.8rem; color: var(--blush); line-height: 1.05; font-weight: 700; }
.rs-artist{ color: var(--paper-dim); font-size: .9rem; }
.rs-prog, .rs-row{ display:flex; align-items:center; gap: 10px; padding: 4px 8px; font-size: .78rem; color: var(--paper-dim); font-variant-numeric: tabular-nums; }
.rs-prog input, .rs-row input{ flex:1; accent-color: var(--rose); }
.rs-ctrl{ display:flex; align-items:center; justify-content:center; gap: 14px; padding: 6px 0 8px; }
.rs-play{ width: 56px; height: 56px; }
.rs-together{ display:flex; gap: 10px; align-items:flex-start; padding: 10px 10px; margin: 4px 0; border-radius: 12px; background: rgba(255,92,138,.08); font-size: .95rem; }
.rs-together input{ accent-color: var(--rose); width: 18px; height: 18px; margin-top: 2px; }
.rs-together small{ display:block; color: var(--paper-dim); font-size: .78rem; }
.rs-addbtn{ display:block; width: calc(100% - 8px); margin: 8px 4px 2px; padding: 12px; border-radius: 14px; font-family:"Patrick Hand", cursive; font-size: 1.1rem;
            color: var(--gold-lit); border: 1.5px dashed rgba(217,174,73,.45); }
.rs-add{ display:grid; gap: 8px; padding: 10px 6px 4px; }
.rs-add input{ border:1px solid var(--line); background: rgba(255,255,255,.05); color: var(--paper); border-radius: 12px; padding: 11px 14px; font: inherit; font-size: 16px; outline: none; }
.rs-add input:focus{ border-color: rgba(255,92,138,.5); }
.rs-addrow{ display:flex; justify-content:flex-end; gap: 10px; }
.rs-addprog{ height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow:hidden; }
.rs-addprog i{ display:block; height:100%; width: 0; background: linear-gradient(90deg, var(--rose), var(--gold-lit)); transition: width .2s; }
.rs-list button .x{ margin-left:auto; width: 30px; height: 30px; border-radius: 50%; display:grid; place-items:center; color: var(--paper-dim); font-size: .9rem; }
.rs-list button .x:active{ background: rgba(255,255,255,.1); }
.rs-list button .new{ font-size: .7rem; color: var(--gold-lit); margin-left: 6px; }
.rs-list .grp{ font-family:"Patrick Hand", cursive; color: var(--gold-lit); font-size: 1.05rem; padding: 10px 10px 4px; }
.rs-list button{ display:flex; align-items:center; gap: 12px; width:100%; text-align:left; padding: 10px 10px; border-radius: 12px; }
.rs-list button:active{ background: rgba(255,255,255,.06); }
.rs-list button .n{ width: 22px; text-align:center; color: var(--paper-dim); font-size: .85rem; }
.rs-list button .tt{ display:flex; flex-direction:column; line-height:1.25; }
.rs-list button .tt small{ color: var(--paper-dim); font-size: .78rem; }
.rs-list button.cur{ background: rgba(255,92,138,.14); }
.rs-list button.cur .n{ color: var(--rose); }

/* ✍️ hand-drawn bubbles, like the gift page's cards */
.pen-border{ display:none; position:absolute; left:0; top:0; width:100%; height:100%; overflow:visible; pointer-events:none; z-index: 2; }
.bubbles-pen .pen-border{ display:block; }
.pen-border path{ fill:none; stroke: rgba(217,174,73,.72); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pen-border .ghost{ stroke-width: 1; opacity: .42; }
.bubbles-pen .m.me .pen-border path{ stroke: rgba(255,92,138,.78); }
.bubbles-pen .b.drawn{ border-radius: 16px !important; background: linear-gradient(170deg, #1F1018 0%, #170B12 100%);
                     box-shadow: 0 8px 22px -10px rgba(0,0,0,.75); }
.bubbles-pen .m.me .b.drawn{ background: linear-gradient(165deg, #3C1428 0%, #2A0D1C 100%); box-shadow: 0 10px 26px -12px rgba(199,55,106,.45); }
.bubbles-pen .m.tail .b.drawn::before{ display:none; }                    /* no speech tails on drawn cards */
.bubbles-pen .b.drawn{ padding: 9px 13px 8px; }
.bubbles-pen .b.drawn.media-b{ padding: 5px; }
/* the folded corner, on the first card of each run */
.bubbles-pen .m.gap .b.drawn:not(.media-b)::after{ content:""; position:absolute; top:0; right:0; width: 24px; height: 24px; border-top-right-radius: 15px; pointer-events:none;
                                               background: linear-gradient(225deg, rgba(217,174,73,.42) 0 50%, transparent 50%); }
.bubbles-pen .m.me.gap .b.drawn:not(.media-b)::after{ background: linear-gradient(225deg, rgba(255,92,138,.45) 0 50%, transparent 50%); }
.bubbles-pen .b.drawn .foot{ color: rgba(245,219,155,.55); }
.bubbles-pen .m.me .b.drawn .foot{ color: rgba(255,211,224,.6); }
.bubbles-pen .quote{ background: rgba(255,255,255,.04); }

/* voice notes: the drawn squiggle instead of bars */
.wsq{ display:none; position:relative; width:100%; height: 30px; }
.bubbles-pen .vn .wv i{ display:none; }
.bubbles-pen .vn .wsq{ display:block; }
.wsq-base, .wsq-prog{ position:absolute; inset:0; }
.wsq svg{ width:100%; height:100%; overflow:visible; }
.wsq path{ fill:none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.wsq-base path{ stroke: rgba(217,174,73,.5); }
.wsq-prog{ clip-path: inset(0 100% 0 0); }
.wsq-prog path{ stroke: var(--gold-lit); stroke-width: 1.9; filter: drop-shadow(0 0 3px rgba(245,219,155,.7)); }
.bubbles-pen .m.me .wsq-base path{ stroke: rgba(255,211,224,.45); }

/* the style switch */
.bstyle{ display:flex; align-items:center; gap: 8px; margin: 0 6px 14px; }
.bstyle .pen{ color: var(--paper-dim); margin-right: 4px; }
.bstyle button{ flex:1; padding: 9px 8px; border-radius: 12px; background: rgba(255,255,255,.05); font-size: .92rem; color: var(--paper-dim); }
.bstyle button.on{ background: rgba(255,92,138,.2); color: var(--blush); box-shadow: inset 0 0 0 1.5px var(--rose); }

/* 🐈 the doodle cat on the typing bar */
.composer{ position: relative; z-index: 3; }
.kitty{ position:absolute; left: 96px; top: -45px; width: 60px; height: 56px; z-index: 1; padding: 0; transform-origin: 50% 100%; }
.kitty.off{ display:none; }
.kitty svg{ width:100%; height:100%; overflow:visible; }
.kitty path, .kitty ellipse{ fill:none; stroke: var(--blush); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.kitty .k-head{ fill: #1b0d15; }
.kitty .k-eye{ fill: var(--blush); stroke: none; transform-box: fill-box; transform-origin: center; transition: transform .12s; }
.kitty .k-eyes{ transition: transform .35s var(--ease); }
.kitty .k-shut{ display:none; }
.kitty .k-nose{ fill: var(--rose); stroke: var(--rose); stroke-width: 1; }
.kitty .k-blush{ stroke: rgba(255,92,138,.75); stroke-width: 2.6; opacity: .0; transition: opacity .3s; }
.kitty .k-paws{ fill: #1b0d15; }
.kitty .k-ear{ stroke: rgba(255,92,138,.8); transition: transform .2s; transform-box: fill-box; transform-origin: bottom; }
.kitty.blink .k-eye{ transform: scaleY(.1); }
.kitty.look .k-eyes{ transform: translate(2px, -2px); }
.kitty.look .k-ear{ transform: rotate(-12deg); }
.kitty.watch .k-eyes{ transform: translate(1.5px, 1px); }
.kitty.hop{ animation: kHop .7s var(--ease); }
@keyframes kHop{ 0%,100%{ transform: translateY(0); } 30%{ transform: translateY(-12px) rotate(-4deg); } 55%{ transform: translateY(0) scaleY(.9); } 75%{ transform: translateY(-4px); } }
.kitty.purr{ animation: kPurr .9s ease-in-out; }
.kitty.purr .k-blush, .kitty.happy .k-blush{ opacity: 1; }
.kitty.purr .k-eye{ display:none; } .kitty.purr .k-shut{ display:inline; }
@keyframes kPurr{ 0%,100%{ transform: rotate(0); } 15%{ transform: rotate(-7deg); } 30%{ transform: rotate(6deg); } 45%{ transform: rotate(-5deg); } 60%{ transform: rotate(4deg); } 80%{ transform: rotate(-2deg); } }
.kitty.sleep .k-eye{ display:none; } .kitty.sleep .k-shut{ display:inline; }
.kitty.sleep svg{ animation: kBreathe 3.4s ease-in-out infinite; }
@keyframes kBreathe{ 50%{ transform: scale(1.03, .97); } }
.k-say{ position:absolute; left: 52px; top: -14px; font-family: Caveat, cursive; font-size: 1.15rem; color: var(--blush); white-space: nowrap; pointer-events:none;
        opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; text-shadow: 0 1px 8px rgba(0,0,0,.8); }
.k-say.show{ opacity: 1; transform: none; }
.kitty.sleep .k-say{ opacity: .85; transform: none; animation: zzz 2.6s ease-in-out infinite; }
@keyframes zzz{ 0%{ transform: translate(0, 4px); opacity: 0; } 30%{ opacity: .85; } 100%{ transform: translate(8px, -10px); opacity: 0; } }
.k-heart{ position:fixed; z-index: 45; color: var(--rose); font-size: 16px; pointer-events:none; text-shadow: 0 0 8px rgba(255,92,138,.9); animation: flyHeart 1s var(--ease) forwards; }

/* faint doodles drifting behind the chat */
.floaters{ position:absolute; inset:0; z-index:-1; pointer-events:none; overflow:hidden; }
.fl{ position:absolute; width: 74px; height: 74px; opacity: .07; }
.fl path{ fill:none; stroke: var(--blush); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fl.f1{ left: 6%; top: 22%; animation: drift1 19s ease-in-out infinite; }
.fl.f2{ right: 8%; top: 36%; width: 52px; height: 52px; animation: drift2 23s ease-in-out infinite; }
.fl.f3{ left: 12%; top: 62%; width: 60px; animation: drift1 27s ease-in-out infinite reverse; }
.fl.f4{ right: 14%; top: 70%; width: 70px; height: 70px; animation: drift2 21s ease-in-out infinite; }
.fl.f5{ right: 22%; top: 13%; width: 48px; height: 48px; animation: drift1 25s ease-in-out infinite; }
.fl.f6{ left: 40%; top: 46%; width: 44px; height: 44px; opacity: .05; animation: drift2 29s ease-in-out infinite reverse; }
@keyframes drift1{ 0%,100%{ transform: translate(0, 0) rotate(-6deg); } 50%{ transform: translate(14px, -22px) rotate(8deg); } }
@keyframes drift2{ 0%,100%{ transform: translate(0, 0) rotate(5deg); } 50%{ transform: translate(-16px, 18px) rotate(-7deg); } }
#chat[data-wall="photo"] .floaters{ display:none; }

/* menus and sheets get the drawn outline too */
.sheet{ position: relative; }                      /* .menu is already absolutely positioned */
.bubbles-pen .menu .pen-border path, .bubbles-pen .sheet .pen-border path{ stroke: rgba(217,174,73,.5); }

/* 🎮 how well do you know me? */
.game{ position:fixed; inset:0; z-index: 27; overflow-y:auto; animation: fade .3s;
       background: radial-gradient(70% 40% at 50% 8%, rgba(217,174,73,.20), transparent 70%), radial-gradient(60% 40% at 50% 100%, rgba(255,92,138,.18), transparent 70%), var(--ink); }
.game-body{ max-width: 460px; margin: 0 auto; padding: calc(52px + var(--top)) 16px calc(28px + var(--bottom)); text-align:center; }
.g-title{ font-family: Caveat, cursive; font-size: 2.6rem; color: var(--blush); line-height: 1.05; margin: 6px 0 6px; font-weight: 700; }
.g-sub{ color: var(--paper-dim); margin: 0 0 18px; }
.g-card{ position:relative; text-align:left; background: linear-gradient(170deg, #1F1018, #170B12); border-radius: 18px; padding: 16px 16px 14px; margin: 12px 0; }
.g-big{ font-size: 3rem; line-height: 1; margin: 8px 0 4px; }
.g-steps{ display:flex; justify-content:center; gap: 7px; margin: 0 0 14px; }
.g-steps i{ width: 26px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.12); transition: background .3s; }
.g-steps i.done{ background: var(--gold); } .g-steps i.now{ background: var(--rose); }
.g-q{ font-family: Fraunces, serif; font-size: 1.45rem; line-height: 1.2; margin: 6px 0 2px; text-align:center; }
.g-lbl{ font-family:"Patrick Hand", cursive; color: var(--gold-lit); font-size: 1.1rem; margin: 16px 2px 8px; text-align:left; }
.g-lbl.rose{ color: var(--rose); }
.g-opts{ display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.g-opt{ padding: 12px 10px; border-radius: 14px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,211,224,.12); font-size: .98rem; line-height:1.25; min-height: 52px;
        transition: transform .12s, background .2s, box-shadow .2s; }
.g-opt:active{ transform: scale(.97); }
.g-opt.on{ background: rgba(217,174,73,.22); box-shadow: inset 0 0 0 2px var(--gold), 0 0 16px -4px rgba(217,174,73,.6); }
.g-opts.guess .g-opt.on{ background: rgba(255,92,138,.2); box-shadow: inset 0 0 0 2px var(--rose), 0 0 16px -4px rgba(255,92,138,.6); }
.g-go{ margin-top: 20px; width: 100%; }
.g-wait{ font-family: Caveat, cursive; font-size: 1.6rem; color: var(--blush); margin: 10px 0; }
.g-dots{ display:inline-flex; gap: 6px; margin: 10px 0; }
.g-dots i{ width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.15); }
.g-dots i.on{ background: var(--rose); box-shadow: 0 0 8px rgba(255,92,138,.8); }
.g-scores{ display:flex; justify-content:center; gap: 12px; margin: 14px 0 6px; }
.g-score{ flex:1; max-width: 190px; border-radius: 18px; padding: 14px 10px; background: rgba(255,255,255,.05); box-shadow: inset 0 0 0 1px rgba(255,211,224,.12); }
.g-score b{ display:block; font-size: 2.4rem; line-height: 1.1; }
.g-score small{ color: var(--paper-dim); font-size: .82rem; }
.g-score.win{ box-shadow: inset 0 0 0 2px var(--gold), 0 0 22px -6px rgba(217,174,73,.7); }
.g-line{ font-family: Caveat, cursive; font-size: 1.7rem; color: var(--gold-lit); margin: 10px 0 4px; }
.g-rev{ text-align:left; }
.g-rev .q{ font-family: Fraunces, serif; font-size: 1.05rem; margin-bottom: 8px; }
.g-rev .row{ display:flex; gap: 8px; align-items:flex-start; font-size: .9rem; margin: 4px 0; }
.g-rev .who{ flex: 0 0 84px; color: var(--paper-dim); }
.g-rev .ok{ color: #6CF0A0; } .g-rev .no{ color: #FF8A8E; }
.m.gamerow{ justify-content:center; margin: 10px 0; }
.gamepill{ display:flex; flex-direction:column; align-items:center; gap: 2px; padding: 10px 20px; border-radius: 18px; text-align:center;
           background: linear-gradient(135deg, rgba(217,174,73,.18), rgba(255,92,138,.12)); box-shadow: inset 0 0 0 1px rgba(217,174,73,.35); }
.gamepill .gt{ font-family:"Patrick Hand", cursive; color: var(--gold-lit); font-size: 1.05rem; }
.gamepill .gs{ font-size: .95rem; }
.gamepill small{ color: var(--paper-dim); font-size: .72rem; }
.game-nudge{ position:fixed; left:50%; top: calc(132px + var(--top)); transform: translateX(-50%); z-index: 64; white-space:nowrap; font-size: 1.05rem; color:#2a1408; padding: 9px 18px;
             border-radius: 999px; background: linear-gradient(135deg, var(--gold-lit), var(--gold)); box-shadow: 0 10px 30px rgba(0,0,0,.5); animation: pop .4s var(--ease); }

/* a new version is waiting */
.update-pill{ position:fixed; left:50%; top: calc(96px + var(--top)); transform: translateX(-50%); z-index: 65; white-space: nowrap;
              background: linear-gradient(135deg, var(--gold-lit), var(--gold)); color: #2a1408; font-size: 1.05rem; padding: 8px 18px; border-radius: 999px;
              box-shadow: 0 10px 30px rgba(0,0,0,.5), 0 0 20px rgba(245,219,155,.35); animation: pop .35s var(--ease); }

/* hearts when the code opens */
.heart-float{ position: fixed; bottom: -30px; font-size: 22px; pointer-events:none; animation: rise linear forwards; z-index: 50; }
@keyframes rise{ to{ transform: translateY(-110vh) rotate(var(--r, 20deg)); opacity: 0; } }

/* =====================================================================
   the pretty layer: glow, glass, softer bubbles (overrides the basics above)
   ===================================================================== */
:root{
  --glass: rgba(22, 11, 17, .72);
  --mine-grad: linear-gradient(135deg, #9A2D5C 0%, #74214A 52%, #5A1838 100%);
  --mine-tail: #5A1838;
  --theirs-grad: linear-gradient(180deg, #2C1622 0%, #23121B 100%);
  --theirs-tail: #23121B;
}

/* a soft, still glow behind everything (the messages scroll over it) */
#chat{ isolation: isolate; }
#chat::before{
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background:
    radial-gradient(60% 40% at 100% 0%, rgba(255,92,138,.16), transparent 70%),
    radial-gradient(55% 45% at 0% 100%, rgba(217,174,73,.10), transparent 70%),
    radial-gradient(80% 60% at 50% 50%, rgba(90,24,56,.20), transparent 80%),
    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='%23FFD3E0' stroke-opacity='.05' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M30 42c-7-5-11-10-8-15 2-4 7-4 8 0 1-4 6-4 8 0 3 5-1 10-8 15z'/%3E%3Cpath d='M128 132c-6-4-9-8-7-12 2-3 6-3 7 0 1-3 5-3 7 0 2 4-1 8-7 12z'/%3E%3Cpath d='M140 36l2 5 5 2-5 2-2 5-2-5-5-2 5-2z'/%3E%3Cpath d='M44 140l1.5 3.5 3.5 1.5-3.5 1.5-1.5 3.5-1.5-3.5-3.5-1.5 3.5-1.5z'/%3E%3Ccircle cx='92' cy='88' r='1.4'/%3E%3Ccircle cx='160' cy='94' r='1.1'/%3E%3C/g%3E%3C/svg%3E"),
    var(--ink);
  background-size: auto, auto, auto, 220px 220px, auto;
}
.list{ background: transparent; padding: 12px 12px 16px; }

/* chat backgrounds (each of us picks our own) */
#chat[data-wall="rose"]::before{
  background:
    radial-gradient(75% 50% at 50% 0%, rgba(255,92,138,.34), transparent 70%),
    radial-gradient(60% 50% at 100% 100%, rgba(199,55,106,.26), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='none' stroke='%23FFD3E0' stroke-opacity='.08' stroke-width='1.3' stroke-linecap='round'%3E%3Cpath d='M30 40c-7-5-11-10-8-15 2-4 7-4 8 0 1-4 6-4 8 0 3 5-1 10-8 15z'/%3E%3Cpath d='M118 118c-6-4-9-8-7-12 2-3 6-3 7 0 1-3 5-3 7 0 2 4-1 8-7 12z'/%3E%3C/g%3E%3C/svg%3E"),
    linear-gradient(180deg, #2A0D1B 0%, #12060C 100%);
  background-size: auto, auto, 160px 160px, auto;
}
#chat[data-wall="stars"]::before{
  background:
    radial-gradient(30% 22% at 85% 6%, rgba(245,219,155,.22), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cg fill='%23FFF6DE'%3E%3Ccircle cx='20' cy='30' r='1.1' opacity='.7'/%3E%3Ccircle cx='70' cy='12' r='.7' opacity='.5'/%3E%3Ccircle cx='130' cy='50' r='1.3' opacity='.8'/%3E%3Ccircle cx='180' cy='20' r='.8' opacity='.4'/%3E%3Ccircle cx='40' cy='110' r='.9' opacity='.6'/%3E%3Ccircle cx='100' cy='90' r='.6' opacity='.4'/%3E%3Ccircle cx='160' cy='130' r='1' opacity='.65'/%3E%3Ccircle cx='15' cy='175' r='.7' opacity='.45'/%3E%3Ccircle cx='90' cy='160' r='1.2' opacity='.7'/%3E%3Ccircle cx='190' cy='185' r='.6' opacity='.4'/%3E%3C/g%3E%3Cpath d='M130 150l1.5 4 4 1.5-4 1.5-1.5 4-1.5-4-4-1.5 4-1.5z' fill='%23F5DB9B' opacity='.5'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #0C0A1C 0%, #130818 60%, #0B0508 100%);
  background-size: auto, 200px 200px, auto;
}
#chat[data-wall="gold"]::before{
  background:
    radial-gradient(65% 45% at 0% 0%, rgba(245,219,155,.30), transparent 70%),
    radial-gradient(60% 50% at 100% 100%, rgba(255,92,138,.18), transparent 70%),
    linear-gradient(160deg, #2B1A0E 0%, #160C08 60%, #0E0706 100%);
}
#chat[data-wall="ocean"]::before{
  background:
    radial-gradient(60% 45% at 100% 0%, rgba(120,190,255,.20), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, rgba(255,92,138,.16), transparent 70%),
    linear-gradient(180deg, #071824 0%, #0A0C18 60%, #0B0712 100%);
}
#chat[data-wall="photo"]::before{
  inset: -12px; filter: blur(2px) saturate(1.1);
  background: linear-gradient(180deg, rgba(11,5,8,.55), rgba(11,5,8,.78)), var(--wall-img) center / cover no-repeat, var(--ink);
}

.wall-sheet h3{ margin: 2px 6px 0; font-size: 1.9rem; color: var(--blush); }
.wall-sub{ margin: 0 6px 12px; font-size: 1rem; }
.walls{ display:grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 0 4px 6px; }
.walls button{ display:flex; flex-direction:column; align-items:center; gap: 6px; font-size: .85rem; color: var(--paper-dim); }
.walls button.on{ color: var(--blush); font-weight:600; }
.sw{ display:grid; place-items:center; width:100%; aspect-ratio: 3 / 4; border-radius: 14px; font-style:normal; font-size: 1.6rem; color: var(--blush);
     box-shadow: inset 0 0 0 1px rgba(255,211,224,.12); background-size: cover; background-position: center; transition: transform .15s; }
.walls button.on .sw{ box-shadow: 0 0 0 2px var(--rose), 0 0 18px rgba(255,92,138,.45); }
.walls button:active .sw{ transform: scale(.95); }
.sw-velvet{ background: radial-gradient(70% 50% at 100% 0%, rgba(255,92,138,.3), transparent 70%), radial-gradient(70% 50% at 0% 100%, rgba(217,174,73,.2), transparent 70%), #0B0508; }
.sw-rose{ background: radial-gradient(80% 50% at 50% 0%, rgba(255,92,138,.55), transparent 70%), linear-gradient(180deg, #2A0D1B, #12060C); }
.sw-stars{ background: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 70% 20%, #fff, transparent), radial-gradient(1.5px 1.5px at 50% 60%, #FFF6DE, transparent), radial-gradient(1px 1px at 80% 75%, #fff, transparent), radial-gradient(1px 1px at 30% 85%, #fff, transparent), radial-gradient(40% 25% at 85% 8%, rgba(245,219,155,.35), transparent), linear-gradient(180deg, #0C0A1C, #130818); }
.sw-gold{ background: radial-gradient(80% 55% at 0% 0%, rgba(245,219,155,.5), transparent 70%), linear-gradient(160deg, #2B1A0E, #0E0706); }
.sw-ocean{ background: radial-gradient(80% 55% at 100% 0%, rgba(120,190,255,.35), transparent 70%), radial-gradient(70% 50% at 0% 100%, rgba(255,92,138,.25), transparent 70%), linear-gradient(180deg, #071824, #0B0712); }
.sw-photo{ background: rgba(255,255,255,.05); }

/* profile photo in the header */
.avatar.photo{ background: var(--av) center / cover no-repeat, #1b0b13; color: transparent; font-size: 0; }

/* glass header + composer */
.top{ background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
      border-bottom: 0; box-shadow: 0 1px 0 rgba(255,211,224,.06), 0 10px 30px -18px rgba(0,0,0,.8); }
.top::after{ content:""; position:absolute; left:16px; right:16px; bottom:0; height:1px;
             background: linear-gradient(90deg, transparent, rgba(255,92,138,.45), rgba(217,174,73,.4), transparent); }
.name{ font-size: 1.85rem; text-shadow: 0 0 18px rgba(255,92,138,.35); }
.avatar{ width:46px; height:46px; font-size: 1.5rem; background: radial-gradient(circle at 35% 30%, #3a1527, #1b0b13);
         box-shadow: 0 0 0 2px var(--velvet), 0 0 0 3.5px rgba(255,92,138,.55); }
.avatar::before{ content:""; position:absolute; inset:-5px; border-radius:50%; z-index:-1;
                 background: conic-gradient(from 0deg, var(--rose), var(--gold), var(--rose-deep), var(--rose)); opacity:.0; transition: opacity .4s; }
.avatar.on::before{ opacity:.85; animation: spin 6s linear infinite; filter: blur(3px); }
.avatar.on::after{ background: #6CF0A0; border-color: #1b0b13; box-shadow: 0 0 8px rgba(108,240,160,.8); }
@keyframes spin{ to{ transform: rotate(1turn); } }
.who{ position:relative; }

.composer{ background: var(--glass); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%);
           border-top: 0; box-shadow: 0 -1px 0 rgba(255,211,224,.06); padding: 10px 10px calc(10px + var(--bottom)); }
#input{ background: rgba(255,255,255,.05); border-color: rgba(255,211,224,.10); border-radius: 24px; padding: 11px 16px;
        box-shadow: inset 0 1px 2px rgba(0,0,0,.35); transition: border-color .2s, background .2s; }
#input:focus{ background: rgba(255,255,255,.07); border-color: rgba(255,92,138,.45); }
.send-btn{ width:46px; height:46px; background: linear-gradient(145deg, #FF7BA1, var(--rose) 45%, var(--rose-deep));
           box-shadow: 0 6px 18px -4px rgba(255,92,138,.6), inset 0 1px 0 rgba(255,255,255,.35); transition: transform .15s, box-shadow .2s; }
.send-btn.on{ box-shadow: 0 6px 22px -2px rgba(255,92,138,.8), inset 0 1px 0 rgba(255,255,255,.35); }

/* bubbles */
.m{ margin: 2px 0; }
.m.gap{ margin-top: 12px; }
.b{ padding: 8px 12px 7px; border-radius: 20px; background: var(--theirs-grad); line-height: 1.42;
    box-shadow: 0 1px 1px rgba(0,0,0,.25), 0 8px 22px -12px rgba(0,0,0,.6), inset 0 0 0 1px rgba(255,211,224,.06); }
.m.me .b{ background: var(--mine-grad);
          box-shadow: 0 1px 1px rgba(0,0,0,.2), 0 10px 26px -12px rgba(199,55,106,.55), inset 0 1px 0 rgba(255,255,255,.10); }
.m:not(.me).tail .b{ border-bottom-left-radius: 6px; }
.m.me.tail .b{ border-bottom-right-radius: 6px; }
/* little curled tails on the last bubble of a run */
.m.tail .b:not(.emoji-only)::before{ content:""; position:absolute; bottom:0; width:12px; height:15px; pointer-events:none; }
.m:not(.me).tail .b:not(.emoji-only)::before{ left:-6px; background: var(--theirs-tail); clip-path: path("M12 0 C 12 8 9 12 0 15 L 12 15 Z"); }
.m.me.tail .b:not(.emoji-only)::before{ right:-6px; background: var(--mine-tail); clip-path: path("M0 0 C 0 8 3 12 12 15 L 0 15 Z"); }
.m .b.emoji-only{ box-shadow:none !important; }
.b .foot{ color: rgba(255,255,255,.5); }
.m.me .b .foot{ color: rgba(255,226,236,.62); }
.b .foot .read{ color: #9BD8FF; filter: drop-shadow(0 0 4px rgba(155,216,255,.5)); }
.b .text.big{ font-size: 2.6rem; filter: drop-shadow(0 6px 14px rgba(0,0,0,.35)); }
.ph{ border-radius: 16px; }
.b.media-b{ padding: 4px; }
.quote{ background: rgba(0,0,0,.22); border-radius: 12px; border-left-width: 3px; }

/* runs of messages join up: tighter corners where bubbles touch */
.m.me:not(.gap) .b{ border-top-right-radius: 6px; }
.m.me:not(.tail) .b{ border-bottom-right-radius: 6px; }
.m:not(.me):not(.gap) .b{ border-top-left-radius: 6px; }
.m:not(.me):not(.tail) .b{ border-bottom-left-radius: 6px; }
.m .b.emoji-only{ border-radius: 20px; }

/* read = a little pink heart */
.b .foot .read{ color: inherit; filter: none; display:inline-flex; }
.b .foot .read svg{ width: 13px; height: 11px; fill: #FF8FB1; stroke: none; filter: drop-shadow(0 0 4px rgba(255,92,138,.8)); }
.b .foot .read.just svg{ animation: readPop .7s var(--ease) both; }
@keyframes readPop{ 0%{ transform: scale(0); } 50%{ transform: scale(1.6); } 70%{ transform: scale(.9); } 100%{ transform: scale(1); } }

/* "new messages ♡" */
.unread-line{ display:flex; align-items:center; gap: 10px; margin: 14px 4px 10px; }
.unread-line::before, .unread-line::after{ content:""; flex:1; height:1px; background: linear-gradient(90deg, transparent, rgba(255,92,138,.6)); }
.unread-line::after{ transform: scaleX(-1); }
.unread-line span{ font-family:"Patrick Hand", cursive; font-size: .95rem; color: #fff; background: linear-gradient(135deg, var(--rose), var(--rose-deep));
                   padding: 2px 14px; border-radius: 999px; box-shadow: 0 4px 14px -4px rgba(255,92,138,.7); }

/* the date chip that floats while scrolling */
.day-float{ position:absolute; left:0; right:0; top: 80px; z-index: 3; display:flex; justify-content:center; pointer-events:none;
            opacity:0; transform: translateY(-6px); transition: opacity .25s, transform .25s var(--ease); }
.day-float.show{ opacity:1; transform:none; }
.day-float span{ font-family:"Patrick Hand", cursive; font-size:.92rem; color: var(--gold-lit); background: rgba(22,11,17,.78);
                 -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border:1px solid rgba(217,174,73,.3); padding: 3px 14px; border-radius:999px;
                 box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.day-float span::before{ content:"♡ "; color: var(--rose); }

/* send: a heartbeat and one tiny heart flying off */
.send-btn.sent{ animation: sendBeat .45s var(--ease); }
@keyframes sendBeat{ 0%{ transform: scale(1); } 30%{ transform: scale(.82); } 65%{ transform: scale(1.12); } 100%{ transform: scale(1); } }
.send-heart{ position:fixed; z-index: 45; width:14px; text-align:center; font-size: 14px; color: var(--rose); pointer-events:none;
             text-shadow: 0 0 8px rgba(255,92,138,.9); animation: flyHeart .95s var(--ease) forwards; }
@keyframes flyHeart{ 0%{ opacity:0; transform: translate(0, 0) scale(.4); } 20%{ opacity:1; } 100%{ opacity:0; transform: translate(-26px, -70px) scale(1.3) rotate(-18deg); } }

/* opening: the lock heart fills, then the lock melts into the chat */
.lock-heart path{ transition: fill .6s var(--ease); }
.lock-heart.filled path{ fill: var(--rose); animation: beat .9s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(255,92,138,.9)); }
#lock.leaving{ z-index: 70; animation: lockOut .65s var(--ease) forwards; pointer-events:none; }
@keyframes lockOut{ to{ opacity:0; transform: scale(1.08); filter: blur(6px); } }
#chat.arrive{ animation: chatIn .7s var(--ease) both; }
@keyframes chatIn{ from{ opacity:0; transform: scale(.985); } }

/* reactions: bounce + a copy floating away */
.rx.pop{ animation: rxPop .6s var(--ease); }
@keyframes rxPop{ 0%{ transform: scale(.3); } 55%{ transform: scale(1.35); } 100%{ transform: scale(1); } }
.rx-fly{ position:fixed; z-index: 45; font-size: 28px; width: 28px; text-align:center; pointer-events:none; animation: rxFly 1.1s var(--ease) forwards; }
@keyframes rxFly{ 0%{ opacity:0; transform: translateY(0) scale(.5); } 20%{ opacity:1; transform: translateY(-14px) scale(1.2); } 100%{ opacity:0; transform: translateY(-80px) scale(1.5); } }

/* voice notes: sender's picture with a mic badge (rose = not played yet) */
.vn{ width: min(280px, 63vw); gap: 8px; }
.vn .wv{ min-width: 0; overflow: hidden; }
.gal-vn .vn{ width: 100%; }
.vn-av{ position:relative; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; display:grid; place-items:center; font-size: 1.3rem;
        background: radial-gradient(circle at 35% 30%, #3a1527, #1b0b13) center / cover no-repeat; box-shadow: 0 0 0 1.5px rgba(255,211,224,.25); }
.vn-av .mic{ position:absolute; right:-4px; bottom:-3px; width: 18px; height: 18px; border-radius:50%; display:grid; place-items:center;
             background: var(--gold); box-shadow: 0 0 0 2px #2a1520; }
.m.me .vn-av .mic{ box-shadow: 0 0 0 2px #74214A; }
.vn-av .mic svg{ width: 11px; height: 11px; fill:none; stroke:#1a0710; stroke-width: 2.6; stroke-linecap:round; }
.vn-av.fresh .mic{ background: var(--rose); box-shadow: 0 0 0 2px #2a1520, 0 0 10px rgba(255,92,138,.9); }
.vn-av.fresh .mic svg{ stroke: #fff; }
.vn .pp{ width: 36px; height: 36px; }
.vn .pp svg{ width: 16px; height: 16px; }

/* recording bar: a glowing glass pill */
.rec{ background: rgba(255,92,138,.08); border-radius: 26px; padding: 3px 3px 3px 6px; box-shadow: inset 0 0 0 1px rgba(255,92,138,.25), 0 0 24px -6px rgba(255,92,138,.5); }
.rec-dot{ box-shadow: 0 0 0 0 rgba(255,92,138,.7); animation: recPulse 1.3s infinite; }
@keyframes recPulse{ 0%{ box-shadow: 0 0 0 0 rgba(255,92,138,.7); } 70%{ box-shadow: 0 0 0 10px rgba(255,92,138,0); } 100%{ box-shadow: 0 0 0 0 rgba(255,92,138,0); } }
.rec-time{ color: var(--blush); font-weight: 600; }

/* photo viewer: the photo on a blurred, glowing copy of itself */
.viewer{ isolation: isolate; }
.viewer::before{ content:""; position:absolute; inset:-40px; z-index:-1; background: var(--vimg, none) center / cover no-repeat, #000;
                 filter: blur(34px) brightness(.45) saturate(1.3); }
.viewer-body img, .viewer-body video{ border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.6); animation: viewIn .35s var(--ease); }
@keyframes viewIn{ from{ opacity:0; transform: scale(.94); } }

/* her picture glows faster while she types */
.avatar.typing::before{ opacity: 1 !important; animation: spin 1.6s linear infinite !important; filter: blur(2px); }

/* header: room for the call buttons */
.top{ gap: 6px; }
.top .who{ margin-left: 4px; }
.top > .icon-btn{ width: 36px; height: 36px; }
.top > .icon-btn svg{ width: 22px; height: 22px; }
.top .name{ font-size: 1.6rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#vnoteBtn.hide{ display:none; }
#input::placeholder{ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer .row > .icon-btn{ width: 38px; }

/* video notes: a circle in the chat */
.b.round-b{ background: transparent !important; box-shadow: none !important; padding: 0; }
.b.round-b::before{ display:none; }
.rv{ position:relative; width: min(230px, 60vw); aspect-ratio: 1; border-radius: 50%; overflow:hidden; cursor:pointer;
     background: #1b0b13 center / cover no-repeat; box-shadow: 0 10px 30px -10px rgba(0,0,0,.7), 0 0 0 2px rgba(255,211,224,.15); transition: transform .3s var(--ease); }
.rv video{ position:absolute; inset:0; width:100%; height:100%; object-fit: cover; }
.rv.playing{ transform: scale(1.12); }
.m.me .rv.playing{ transform-origin: 100% 50%; } .m:not(.me) .rv.playing{ transform-origin: 0 50%; }
.rv svg.ring{ position:absolute; inset:0; width:100%; height:100%; transform: rotate(-90deg); pointer-events:none; }
.rv svg.ring circle{ fill:none; stroke: var(--rose); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; filter: drop-shadow(0 0 4px rgba(255,92,138,.8)); }
.rv .play{ position:absolute; inset:0; margin:auto; width:52px; height:52px; border-radius:50%; background: rgba(0,0,0,.45); display:grid; place-items:center;
           -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.rv .play svg{ width:22px; height:22px; fill:#fff; margin-left:3px; }
.rv.playing .play{ display:none; }
.rv .dur{ position:absolute; left:50%; bottom: 10px; transform: translateX(-50%); font-size:.75rem; background: rgba(0,0,0,.5); padding: 1px 8px; border-radius: 999px; }
.round-b .foot{ float:none; justify-content:flex-end; margin: 4px 6px 0; }
.round-b .prog{ position:absolute; inset:0; display:grid; place-items:center; background: rgba(0,0,0,.45); font-family:"Patrick Hand", cursive; font-size:1.2rem; }

/* video note recorder */
.vnrec{ position:fixed; inset:0; z-index: 35; display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 18px;
        background: radial-gradient(70% 50% at 50% 40%, rgba(90,24,56,.9), rgba(11,5,8,.97)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
        padding: calc(20px + var(--top)) 16px calc(24px + var(--bottom)); animation: fade .25s; }
.vnrec-hint{ margin:0; color: var(--blush); font-size: 1.2rem; }
.vnrec-stage{ position:relative; width: min(78vw, 340px); aspect-ratio: 1; }
.vnrec-stage video{ position:absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); border-radius:50%; object-fit: cover; background:#000; }
#vnLive.mirror{ transform: scaleX(-1); }
.vnrec-ring{ position:absolute; inset:0; width:100%; height:100%; transform: rotate(-90deg); }
.vnrec-ring circle{ fill:none; stroke: rgba(255,255,255,.12); stroke-width: 2.5; }
.vnrec.recording .vnrec-ring circle{ stroke: var(--rose); stroke-dasharray: 100; stroke-dashoffset: var(--ring, 100); stroke-linecap: round;
                                      filter: drop-shadow(0 0 6px rgba(255,92,138,.9)); }
.vnrec-time{ font-variant-numeric: tabular-nums; color: var(--paper-dim); font-size: .95rem; }
.vnrec-bar{ display:flex; align-items:center; justify-content:center; gap: 34px; }
.vnrec-go{ width: 74px; height: 74px; border-radius:50%; display:grid; place-items:center; background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 3px #fff; }
.vnrec-go span{ width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(145deg, #FF7BA1, var(--rose-deep)); transition: all .25s var(--ease);
                box-shadow: 0 0 20px rgba(255,92,138,.6); }
.vnrec.recording .vnrec-go span{ width: 28px; height: 28px; border-radius: 8px; }

/* calls */
.call{ position:fixed; inset:0; z-index: 80; display:flex; flex-direction:column; justify-content:space-between; align-items:center; color:#fff;
       background: #0B0508; isolation: isolate; animation: fade .3s; }
.call-bg{ position:absolute; inset:-40px; z-index:-2; background: radial-gradient(60% 45% at 50% 30%, rgba(255,92,138,.35), transparent 70%), #12060C;
          background-size: cover; background-position: center; filter: blur(30px) brightness(.55) saturate(1.2); }
.call-bg.photo{ background-image: var(--cav); }
#remoteVideo{ position:absolute; inset:0; width:100%; height:100%; object-fit: cover; z-index:-1; background:#000; display:none; }
.call.video.live #remoteVideo{ display:block; }
#localVideo{ position:absolute; z-index: 2; right: 14px; top: calc(14px + var(--top)); width: 108px; aspect-ratio: 3 / 4; border-radius: 16px; object-fit: cover;
             transform: scaleX(-1); box-shadow: 0 10px 30px rgba(0,0,0,.6), 0 0 0 1.5px rgba(255,255,255,.25); background:#111; display:none; touch-action:none; }
.call.video #localVideo{ display:block; }
.call.video:not(.live) #localVideo{ inset: 0; width:100%; height:100%; border-radius:0; aspect-ratio:auto; z-index:-1; box-shadow:none; }
#localVideo.back{ transform: none; }
.call-top{ display:flex; flex-direction:column; align-items:center; gap: 6px; margin-top: calc(13vh + var(--top)); text-align:center; padding: 0 16px; }
.call.video.live .call-top{ margin-top: calc(20px + var(--top)); align-self:flex-start; align-items:flex-start; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.call.video.live .call-av{ display:none; }
.call-av{ width: 132px; height: 132px; border-radius: 50%; display:grid; place-items:center; font-size: 3.4rem; position:relative;
          background: radial-gradient(circle at 35% 30%, #3a1527, #1b0b13) center / cover no-repeat; box-shadow: 0 0 0 3px rgba(255,211,224,.25), 0 20px 50px rgba(0,0,0,.6); }
.call-av::after{ content:""; position:absolute; inset:-10px; border-radius:50%; border: 2px solid rgba(255,92,138,.6); animation: callPulse 1.8s ease-out infinite; }
.call.live .call-av::after{ animation: none; opacity: 0; }
@keyframes callPulse{ 0%{ transform: scale(.9); opacity:1; } 100%{ transform: scale(1.35); opacity:0; } }
.call-name{ font-size: 2.4rem; font-weight:700; color: var(--blush); line-height:1.1; margin-top: 12px; }
.call.video.live .call-name{ font-size: 1.7rem; margin:0; }
.call-status{ font-size: 1rem; color: rgba(255,255,255,.75); font-variant-numeric: tabular-nums; min-height: 1.4em; }
.call-actions{ display:flex; gap: 22px; justify-content:center; margin-bottom: calc(40px + var(--bottom)); padding: 0 12px; }
.cbtn{ display:flex; flex-direction:column; align-items:center; gap: 7px; font-size: .78rem; color: rgba(255,255,255,.85); }
.cbtn svg{ width: 60px; height: 60px; padding: 17px; border-radius: 50%; background: rgba(255,255,255,.14); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
           fill:none; stroke:#fff; stroke-width: 1.8; stroke-linecap:round; stroke-linejoin:round; overflow:visible; transition: background .2s; }
.cbtn .slash{ display:none; }
.cbtn.off svg{ background: #fff; stroke: #1a0710; }
.cbtn.off .slash{ display:inline; }
.cbtn.red svg{ background: #E5484D; box-shadow: 0 8px 24px -6px rgba(229,72,77,.8); }
.cbtn.green svg{ background: #30A46C; box-shadow: 0 8px 24px -6px rgba(48,164,108,.8); animation: answerBob 1.2s ease-in-out infinite; }
@keyframes answerBob{ 50%{ transform: translateY(-5px) rotate(-8deg); } }
.call:not(.video) #callCam, .call:not(.video) #callFlip{ display:none; }
.call.video.live.remote-off #remoteVideo{ opacity: 0; }
.call.video.live.remote-off .call-top{ margin-top: calc(13vh + var(--top)); align-self:center; align-items:center; }
.call.video.live.remote-off .call-av{ display:grid; }

/* a call in the chat history */
.m.callrow{ justify-content: center; margin: 10px 0; }
.callpill{ display:flex; align-items:center; gap: 10px; padding: 9px 16px; border-radius: 999px; background: rgba(42,21,32,.75); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
           box-shadow: inset 0 0 0 1px rgba(255,211,224,.1); font-size: .9rem; color: rgba(255,255,255,.88); }
.callpill .ci{ width: 30px; height: 30px; border-radius: 50%; display:grid; place-items:center; background: rgba(48,164,108,.25); }
.callpill.missed .ci{ background: rgba(229,72,77,.25); }
.callpill .ci svg{ width: 16px; height: 16px; fill:none; stroke: #6CF0A0; stroke-width: 2; stroke-linecap:round; stroke-linejoin:round; }
.callpill.missed .ci svg{ stroke: #FF8A8E; }
.callpill .ct{ display:flex; flex-direction:column; line-height: 1.25; }
.callpill .ct small{ color: rgba(255,255,255,.55); font-size: .75rem; }
.callpill .again{ margin-left: 6px; font-family:"Patrick Hand", cursive; color: var(--gold-lit); font-size: 1rem; }

/* new messages float in; heart-only messages beat */
.m.in .b{ animation: msgIn .38s var(--ease) var(--in-delay, 0ms) both; }
.m.me.in .b{ transform-origin: 100% 100%; } .m:not(.me).in .b{ transform-origin: 0 100%; }
@keyframes msgIn{ from{ opacity:0; transform: translateY(10px) scale(.96); } }
.text.big.hearty{ display:inline-block; }
.m.in .text.big.hearty{ animation: heartIn 1.2s var(--ease) var(--in-delay, 0ms) both; }
.m.in .b.emoji-only:has(.hearty){ animation: none; }
@keyframes heartIn{ 0%{ transform: scale(.3); opacity:0; } 35%{ transform: scale(1.25); opacity:1; } 50%{ transform: scale(.95); } 65%{ transform: scale(1.12); } 100%{ transform: scale(1); } }

/* day separators with a little drawn line */
.day{ display:flex; align-items:center; gap: 10px; margin: 18px 6px 10px; }
.day::before, .day::after{ content:""; flex:1; height:1px; background: linear-gradient(90deg, transparent, rgba(217,174,73,.35)); }
.day::after{ transform: scaleX(-1); }
.day span{ background: rgba(22,11,17,.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-color: rgba(217,174,73,.3); padding: 3px 14px 3px 12px; }
.day span::before{ content:"♡ "; color: var(--rose); }

/* reactions, typing, voice notes */
.rx{ background: rgba(42,21,32,.92); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-color: var(--ink);
     box-shadow: 0 4px 12px rgba(0,0,0,.4); padding: 1px 6px; }
.typing .b{ padding: 13px 16px; }
.typing .dots i{ background: linear-gradient(135deg, var(--rose), var(--gold-lit)); opacity:.5; }
.vn .pp{ background: linear-gradient(145deg, #FF7BA1, var(--rose-deep)); box-shadow: 0 4px 12px -3px rgba(255,92,138,.6); }
.vn .pp svg{ fill:#fff; }
.m.me .vn .pp, .gal-vn.me .vn .pp{ background: linear-gradient(145deg, #fff, var(--blush)); box-shadow: 0 4px 12px -3px rgba(255,211,224,.5); }
.m.me .vn .pp svg, .gal-vn.me .vn .pp svg{ fill: var(--rose-deep); }
.vn .wv i{ border-radius: 3px; }
.vn .wv i.on{ background: linear-gradient(180deg, #FFF0C8, var(--gold-lit)); }

/* floating bits */
.jump{ background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 8px 20px rgba(0,0,0,.45); }
.pinbar{ background: rgba(30,15,23,.78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.menu, .sheet{ background: rgba(38,19,29,.92); -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
               border: 1px solid rgba(255,211,224,.10); box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.sheet{ border-bottom: 0; }
.sheet::before{ content:""; display:block; width:38px; height:4px; border-radius:2px; background: rgba(255,255,255,.2); margin: 0 auto 10px; }
.toast{ background: rgba(38,19,29,.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 10px 30px rgba(0,0,0,.5); }

/* lock screen: hearts drifting up behind the keypad, glassy keys */
#lock::before{ content:""; position:fixed; inset:0; pointer-events:none; opacity:.9;
  background:
    radial-gradient(50% 35% at 50% 18%, rgba(255,92,138,.22), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cg fill='none' stroke='%23FF5C8A' stroke-opacity='.10' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M40 60c-8-5-12-11-9-16 2-5 8-4 9 0 1-4 7-5 9 0 3 5-1 11-9 16z'/%3E%3Cpath d='M150 150c-6-4-9-8-7-12 2-3 6-3 7 0 1-3 5-3 7 0 2 4-1 8-7 12z'/%3E%3Cpath d='M160 40c-4-3-6-5-5-8 1-2 4-2 5 0 1-2 3-2 5 0 1 3-1 5-5 8z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, 200px 200px; animation: drift 40s linear infinite; }
@keyframes drift{ to{ background-position: 0 0, 0 -200px; } }
.lock-in{ position:relative; }
.key{ background: rgba(255,255,255,.045); border-color: rgba(255,211,224,.09); border-radius: 16px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 16px -10px rgba(0,0,0,.8); }
.key:active, .key.hit{ background: rgba(255,92,138,.28); box-shadow: 0 0 18px rgba(255,92,138,.45); }
#lock h1{ text-shadow: 0 0 26px rgba(255,92,138,.45); }

@media (min-width: 760px){
  #chat{ max-width: 760px; margin: 0 auto; border-left:1px solid var(--line); border-right:1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
