/* Signet Studio — light glass theme: cream panels over a very subtle blue-to-purple wash. Manrope for text, Sora for headings. */
@font-face{font-family:"Manrope";font-style:normal;font-weight:200 800;font-display:swap;src:url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Manrope";font-style:normal;font-weight:200 800;font-display:swap;src:url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations")}
@font-face{font-family:"Sora";font-style:normal;font-weight:100 800;font-display:swap;src:url("../fonts/sora-latin-ext-wght-normal.woff2") format("woff2-variations");unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Sora";font-style:normal;font-weight:100 800;font-display:swap;src:url("../fonts/sora-latin-wght-normal.woff2") format("woff2-variations")}

:root{
  --blue:#3b82f6;--indigo:#6366f1;--purple:#a855f7;
  --grad:linear-gradient(135deg,#3b82f6 0%,#6366f1 50%,#a855f7 100%);
  --text:#1f1d3d;--muted:rgba(31,29,61,.68);--faint:rgba(31,29,61,.5);
  --glass:var(--pop);--glass-2:rgba(99,102,241,.08);--glass-3:rgba(99,102,241,.15);
  --card:rgba(255,255,255,.85);--inset:rgba(99,102,241,.06);--field:#fff;
  --line:rgba(62,52,130,.13);--line-2:rgba(62,52,130,.26);
  --danger:#e11d48;--ok:#16a34a;--warn:#d97706;--focus:#6366f1;
  --pop:rgba(255,253,247,.97);--solid:#fff;--accent-text:#4f46e5;--page:#f4f2fb;--wash:linear-gradient(135deg,#eaf1ff 0%,#efedff 50%,#f5eaff 100%);
  --r:18px;--r-sm:12px;--shadow:0 18px 50px rgba(70,60,150,.13);
  --font:"Manrope",system-ui,-apple-system,"Segoe UI",sans-serif;--head:"Sora","Manrope",system-ui,sans-serif;
}
*{box-sizing:border-box}
html,body,#root{height:100%}
body{margin:0;font-family:var(--font);font-size:15px;line-height:1.5;color:var(--text);
  background:var(--page);-webkit-font-smoothing:antialiased;overflow:hidden}
body::before{content:"";position:fixed;inset:0;z-index:-2;
  background:var(--wash)}
body::after{content:"";position:fixed;inset:-20%;z-index:-1;pointer-events:none;
  background:radial-gradient(38% 34% at 18% 22%,rgba(59,130,246,.13),transparent 70%),
             radial-gradient(34% 36% at 84% 78%,rgba(168,85,247,.13),transparent 70%),
             radial-gradient(28% 28% at 70% 14%,rgba(99,102,241,.09),transparent 70%)}
body.scroll{overflow:auto}
h1,h2,h3,h4{font-family:var(--head);font-weight:600;letter-spacing:-.01em;margin:0;line-height:1.2}
h1{font-size:26px}h2{font-size:20px}h3{font-size:16px}
p{margin:0}a{color:var(--accent-text)}
button,input,select,textarea{font:inherit;color:inherit}
::selection{background:rgba(129,140,248,.35)}
*{scrollbar-width:thin;scrollbar-color:rgba(62,52,130,.25) transparent}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.muted{color:var(--muted)}.small{font-size:13px}.center{text-align:center}.grow{flex:1;min-width:0}
.row{display:flex;align-items:center;gap:10px}.col{display:flex;flex-direction:column;gap:14px}
.spread{justify-content:space-between}.wrap{flex-wrap:wrap}
.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mono{font-family:ui-monospace,Consolas,monospace;letter-spacing:.04em}

.glass{background:var(--glass);border:1px solid var(--line);border-radius:var(--r);
  -webkit-backdrop-filter:blur(24px) saturate(140%);backdrop-filter:blur(24px) saturate(140%);box-shadow:var(--shadow)}
.icon{width:18px;height:18px;flex:none;display:block}
.icon.inline{display:inline-block;vertical-align:-4px}

/* Buttons and inputs */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:42px;padding:0 18px;border-radius:var(--r-sm);
  border:1px solid var(--line);background:var(--glass-2);font-weight:600;cursor:pointer;transition:background .15s,transform .05s,opacity .15s;white-space:nowrap}
.btn:hover{background:var(--glass-3)}.btn:active{transform:translateY(1px)}
.btn[disabled]{opacity:.5;cursor:not-allowed}
.btn-primary{background:var(--grad);color:#fff;border-color:transparent;box-shadow:0 8px 20px rgba(99,102,241,.3)}
.btn-primary:hover{background:var(--grad);filter:brightness(1.1)}
.btn-danger{background:rgba(225,29,72,.1);border-color:rgba(225,29,72,.4);color:#be123c}
.btn-danger:hover{background:rgba(225,29,72,.18)}
.btn-sm{height:34px;padding:0 12px;font-size:13px}.btn-block{width:100%}
.icon-btn{width:38px;height:38px;border-radius:12px;display:inline-grid;place-items:center;border:1px solid transparent;background:transparent;cursor:pointer;flex:none}
.icon-btn:hover{background:var(--glass-2);border-color:var(--line)}
.icon-btn.active{background:var(--glass-3);border-color:var(--line-2)}
.field{display:flex;flex-direction:column;gap:6px}
.field>span,.label{font-size:13px;font-weight:600;color:var(--muted)}
.field small{color:var(--faint);font-size:12px}
.input,select.input,textarea.input{width:100%;height:44px;padding:0 14px;border-radius:var(--r-sm);border:1px solid var(--line-2);
  background:var(--field);outline:none;transition:border-color .15s,background .15s}
textarea.input{height:auto;padding:10px 14px;resize:vertical;min-height:70px}
.input::placeholder{color:var(--faint)}
.input:focus{border-color:var(--focus);box-shadow:0 0 0 3px rgba(99,102,241,.15)}
select.input option{background:var(--solid);color:var(--text)}
.input-icon{position:relative}.input-icon .icon{position:absolute;left:14px;top:13px;color:var(--faint)}.input-icon .input{padding-left:42px}
.toggle{position:relative;width:46px;height:26px;flex:none}
.toggle input{position:absolute;inset:0;opacity:0;margin:0;cursor:pointer;z-index:1}
.toggle i{position:absolute;inset:0;border-radius:99px;background:rgba(62,52,130,.22);border:1px solid transparent;transition:.2s}
.toggle i::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:.2s}
.toggle input:checked+i{background:var(--grad);border-color:transparent}
.toggle input:checked+i::after{transform:translateX(20px)}
.toggle input:focus-visible+i{outline:2px solid var(--focus);outline-offset:2px}
.badge{display:inline-flex;align-items:center;gap:5px;padding:2px 9px;border-radius:99px;font-size:12px;font-weight:700;background:var(--glass-3);border:1px solid var(--line)}
.badge.ok{background:rgba(22,163,74,.12);border-color:rgba(22,163,74,.4);color:#15803d}
.badge.warn{background:rgba(217,119,6,.12);border-color:rgba(217,119,6,.4);color:#b45309}
.badge.bad{background:rgba(225,29,72,.1);border-color:rgba(225,29,72,.4);color:#be123c}
.badge.grad{background:var(--grad);border-color:transparent;color:#fff}
.banner{display:flex;gap:10px;align-items:flex-start;padding:11px 14px;border-radius:var(--r-sm);background:rgba(245,158,11,.12);border:1px solid rgba(217,119,6,.35);font-size:14px}
.banner.bad{background:rgba(225,29,72,.08);border-color:rgba(225,29,72,.35)}
.banner.info{background:rgba(99,102,241,.09);border-color:rgba(99,102,241,.3)}
.banner.good{background:rgba(16,185,129,.12);border-color:rgba(5,150,105,.4)}
.banner .icon{margin-top:2px}
.spinner{width:18px;height:18px;border-radius:50%;border:2px solid rgba(120,115,180,.3);border-top-color:currentColor;animation:spin .7s linear infinite;flex:none}
@keyframes spin{to{transform:rotate(360deg)}}

/* Sign-in and setup screens */
.auth-wrap{min-height:100%;display:grid;place-items:center;padding:24px;overflow:auto;height:100%}
.auth-card{width:100%;max-width:420px;padding:34px 30px;display:flex;flex-direction:column;gap:18px}
.auth-card.wide{max-width:640px}
.logo{width:58px;height:58px;border-radius:18px;background:var(--grad);display:grid;place-items:center;color:#fff;box-shadow:0 12px 26px rgba(99,102,241,.35)}
.logo .icon{width:28px;height:28px}
.brand{display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}

/* Main layout */
.app{height:100%;display:grid;grid-template-columns:var(--side-w,340px) minmax(0,1fr);gap:14px;padding:14px}
.sidebar,.pane{display:flex;flex-direction:column;min-height:0;overflow:hidden}
.side-head{padding:16px 16px 12px;display:flex;flex-direction:column;gap:12px}
.side-foot{padding:10px 12px;border-top:1px solid var(--line);display:flex;align-items:center;gap:6px}
.conv-list{flex:1;overflow-y:auto;padding:4px 8px 8px}
.conv-item{display:flex;align-items:center;gap:12px;width:100%;padding:10px;border-radius:14px;border:1px solid transparent;background:transparent;text-align:left;cursor:pointer}
.conv-item:hover{background:var(--glass-2)}
.conv-item.active{background:var(--glass-3);border-color:var(--line)}
.avatar{position:relative;width:44px;height:44px;border-radius:50%;flex:none;display:grid;place-items:center;font-family:var(--head);font-weight:600;font-size:15px;background:var(--grad);color:#fff}
.avatar.sm{width:36px;height:36px;font-size:13px}
.avatar.lg{width:56px;height:56px;font-size:19px}
.avatar.xl{width:88px;height:88px;font-size:28px}
.avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
.avatar .dot{position:absolute;right:0;bottom:0;width:12px;height:12px;border-radius:50%;background:#22c55e;border:2px solid #fffdf7}
.count{min-width:22px;height:22px;padding:0 6px;border-radius:99px;background:var(--grad);color:#fff;font-size:12px;font-weight:700;display:grid;place-items:center}
.pane-head{padding:12px 16px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:12px;min-height:66px}
.back{display:none}
.msgs{flex:1;overflow-y:auto;padding:18px 18px 8px;display:flex;flex-direction:column;gap:4px}
.day{align-self:center;margin:12px 0 8px;padding:3px 12px;border-radius:99px;background:var(--glass-2);border:1px solid var(--line);font-size:12px;color:var(--muted)}
.bubble{max-width:min(72%,560px);padding:9px 13px;border-radius:18px;white-space:pre-wrap;overflow-wrap:anywhere;position:relative}
.bubble.them{align-self:flex-start;background:var(--solid);border:1px solid var(--line);box-shadow:0 2px 8px rgba(70,60,150,.06);border-bottom-left-radius:6px}
.bubble.me{align-self:flex-end;background:var(--grad);color:#fff;border-bottom-right-radius:6px;box-shadow:0 6px 16px rgba(79,70,229,.22)}
.bubble.gap{margin-top:8px}
.bubble .meta{display:inline-flex;align-items:center;gap:4px;float:right;margin:6px 0 -2px 12px;font-size:11px;color:var(--faint)}
.bubble.me .meta{color:rgba(255,255,255,.82)}
.bubble .meta .icon{width:14px;height:14px}
.bubble .meta .edited{font-style:italic;opacity:.9}

/* Read receipts: one tick = sent, two grey ticks = delivered, two green ticks = read. */
.ticks{display:inline-flex;align-items:center;vertical-align:-3px;margin-right:4px}
.ticks .icon{width:15px;height:15px;stroke-width:2.4}
.bubble .meta .ticks{margin:0}
.ticks.sent,.ticks.delivered{color:var(--faint)}
.bubble.me .ticks.sent,.bubble.me .ticks.delivered{color:rgba(255,255,255,.7)}
.ticks.read{color:#16a34a}
.ticks .tick-text{margin-left:4px;font-size:11px;font-weight:700;letter-spacing:.01em}
.ticks.labelled{vertical-align:baseline;gap:0}
.bubble.me .ticks.sent .tick-text,.bubble.me .ticks.delivered .tick-text{color:rgba(255,255,255,.85)}
.bubble.me .ticks.read .tick-text{color:#d1fae5;text-shadow:0 0 3px rgba(10,60,30,.5)}
.bubble.sticker.me .meta .ticks .tick-text,.bubble.jumbo.me .meta .ticks .tick-text{color:inherit;text-shadow:none}
.bubble.me .ticks.read{color:#4ade80;filter:drop-shadow(0 0 1px rgba(10,30,20,.55)) drop-shadow(0 0 3px rgba(74,222,128,.45))}
.bubble.me .ticks.read .icon{stroke-width:2.8}
.seen-label{align-self:flex-end;display:inline-flex;align-items:center;gap:4px;margin:-1px 4px 4px 0;font-size:11px;font-weight:700;color:#16a34a}
.seen-label .icon{width:13px;height:13px;stroke-width:2.6}
.online-text{color:#16a34a;font-weight:600}

/* Messages: rows, hover actions, replies, stickers, deleted, pinned */
.msg-row{display:flex;align-items:center;gap:4px;max-width:100%}
.msg-row.me{flex-direction:row-reverse;align-self:flex-end}
.msg-row.them{align-self:flex-start}
.msg-row .bubble{max-width:min(72vw,560px)}
.msg-actions{display:flex;gap:2px;opacity:0;transition:opacity .12s}
.msg-row:hover .msg-actions,.msg-row:focus-within .msg-actions{opacity:1}
@media (hover:none){.msg-actions{display:none}}
.icon-btn.sm{width:30px;height:30px;border-radius:9px}
.icon-btn.sm .icon{width:16px;height:16px}
.bubble.flash{animation:flash 1.6s ease}
@keyframes flash{0%,40%{box-shadow:0 0 0 4px rgba(250,204,21,.75)}100%{box-shadow:none}}
.quote{display:flex;flex-direction:column;gap:1px;width:100%;min-width:140px;text-align:left;margin:0 0 6px;padding:6px 10px;border:0;border-left:3px solid var(--indigo);border-radius:8px;background:var(--inset);cursor:pointer;font-size:13px}
.quote b{font-size:12px;color:var(--indigo)}
.bubble.me .quote{background:rgba(255,255,255,.18);border-left-color:#fff}
.bubble.me .quote b{color:#fff}
.bubble.deleted{font-style:italic;color:var(--muted);background:transparent;border:1px dashed var(--line-2);box-shadow:none}
.bubble.me.deleted{color:var(--muted)}
.bubble.me.deleted .meta{color:var(--faint)}
.pin-mark{position:absolute;top:-8px;width:20px;height:20px;border-radius:50%;background:#facc15;color:#422006;display:grid;place-items:center;box-shadow:0 2px 6px rgba(0,0,0,.15)}
.bubble.me .pin-mark{left:-8px}.bubble.them .pin-mark{right:-8px}
.pin-mark .icon{width:12px;height:12px}
.bubble.sticker,.bubble.jumbo{background:transparent!important;border:0!important;box-shadow:none!important;padding:2px}
.bubble.sticker .meta,.bubble.jumbo .meta{float:none;display:flex;justify-content:flex-end;margin:2px 0 0;width:max-content;margin-left:auto;padding:1px 8px;border-radius:99px;background:var(--glass);border:1px solid var(--line);color:var(--muted)}
.bubble.sticker.me .meta .ticks.sent,.bubble.sticker.me .meta .ticks.delivered,.bubble.jumbo.me .meta .ticks.sent,.bubble.jumbo.me .meta .ticks.delivered{color:var(--faint)}
.bubble.sticker.me .meta .ticks.read,.bubble.jumbo.me .meta .ticks.read{color:#16a34a;filter:none}
.bubble.sticker .quote,.bubble.jumbo .quote{background:var(--glass);border-left-color:var(--indigo)}
.bubble.sticker .quote b{color:var(--indigo)}
.bubble.jumbo .text{font-size:44px;line-height:1.15;color:var(--text)}
.bubble.jumbo .emoji-inline{width:52px;height:52px}
.sticker-img{display:block;width:160px;height:160px;object-fit:contain}
.bubble img.sticker-img,.bubble video.sticker-img{max-height:160px;margin:0;cursor:default;border-radius:0}
.emoji-inline{width:22px;height:22px;object-fit:contain;vertical-align:-5px;display:inline-block}
.bubble img.emoji-inline{display:inline-block;margin:0;max-height:none;border-radius:0;cursor:default}
.gif-msg{position:relative;width:240px;max-width:100%;border-radius:12px;overflow:hidden;margin-bottom:4px;background:var(--inset)}
.gif-msg img{display:block;width:100%;height:100%;object-fit:cover;margin:0!important;border-radius:0!important;max-height:none!important}
.gif-badge{position:absolute;left:8px;bottom:8px;padding:1px 6px;border-radius:6px;background:rgba(15,12,50,.6);color:#fff;font-size:11px;font-weight:800;letter-spacing:.04em}
.bubble.media{padding:4px}
.bubble.media .meta{position:absolute;right:10px;bottom:10px;margin:0;padding:1px 7px;border-radius:99px;background:rgba(15,12,50,.55);color:#fff}
.img-loading{display:inline-block;width:100%;min-width:60px;min-height:60px;height:100%;border-radius:10px;background:linear-gradient(90deg,var(--inset),var(--glass-3),var(--inset));background-size:200% 100%;animation:shimmer 1.2s infinite}
@keyframes shimmer{to{background-position:-200% 0}}
.img-missing{display:grid;place-items:center;color:var(--faint);min-width:40px;min-height:40px}

/* Pinned bar, reply/edit bar */
.pin-bar{display:flex;align-items:center;gap:6px;padding:6px 10px 6px 14px;border-bottom:1px solid var(--line);background:rgba(250,204,21,.08)}
.pin-main{display:flex;align-items:center;gap:10px;flex:1;min-width:0;border:0;background:transparent;text-align:left;cursor:pointer;padding:2px 0}
.pin-main>.icon{color:#ca8a04}
.composer-notes{padding:0 14px;display:flex;flex-direction:column;gap:8px}
.composer-notes:empty{display:none}
.composer-notes>:first-child{margin-top:8px}
.mode-bar{display:flex;align-items:center;gap:10px;padding:8px 8px 8px 12px;border-radius:12px;background:var(--inset);border-left:3px solid var(--indigo)}
.mode-bar>.icon{color:var(--indigo)}
.pinned-item{display:flex;align-items:center;gap:6px;padding:6px;border-radius:12px;border:1px solid var(--line);background:var(--card)}
.pinned-open{display:flex;flex-direction:column;align-items:flex-start;gap:1px;min-width:0;border:0;background:transparent;text-align:left;cursor:pointer;padding:2px 6px}

/* Context menu */
.menu{position:fixed;z-index:90;min-width:190px;padding:6px;border-radius:14px;background:var(--pop);display:flex;flex-direction:column}
.menu-item{display:flex;align-items:center;gap:10px;padding:9px 12px;border:0;border-radius:9px;background:transparent;text-align:left;cursor:pointer;font-weight:600;font-size:14px}
.menu-item:hover,.menu-item:focus-visible{background:var(--glass-3)}
.menu-item.danger{color:#be123c}

/* Emoji / sticker / GIF picker */
.picker{position:absolute;left:10px;bottom:calc(100% + 6px);z-index:40;width:min(380px,calc(100vw - 20px));height:min(440px,62vh);display:flex;flex-direction:column;background:var(--pop);overflow:hidden}
.picker-tabs{margin:10px 10px 0;width:auto}
.picker-tabs .tab{flex:1;justify-content:center;padding:0 8px}
.picker-body{flex:1;min-height:0;display:flex;flex-direction:column;gap:8px;padding:10px}
.picker-body.center{align-items:center;justify-content:center}
.picker-scroll{flex:1;min-height:0;overflow-y:auto;margin:0 -4px;padding:0 4px}
.cat-bar{display:flex;gap:2px;overflow-x:auto;flex:none;scrollbar-width:none}
.cat-bar .icon-btn{width:32px;height:32px;border-radius:9px}
.cat-bar .icon-btn .icon{width:17px;height:17px}
.cat-title{position:sticky;top:0;z-index:1;padding:6px 2px 4px;background:var(--pop);font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.emoji-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(38px,1fr));gap:2px;margin-bottom:6px}
.emoji-cell{height:38px;border:0;border-radius:9px;background:transparent;font-size:24px;line-height:1;cursor:pointer;display:grid;place-items:center;padding:0;font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif}
.emoji-cell:hover{background:var(--glass-3)}
.emoji-img{width:28px;height:28px;object-fit:contain}
.emoji-cell-wrap,.sticker-cell-wrap{position:relative;display:block}
.sticker-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(78px,1fr));gap:6px;margin-bottom:8px}
.sticker-grid.manage{grid-template-columns:repeat(auto-fill,96px);gap:10px}
.sticker-cell-wrap{min-width:0;min-height:0}
.sticker-cell{min-width:0;min-height:0;overflow:hidden}
.sticker-cell img,.sticker-cell video{max-width:100%;max-height:100%}
.sticker-cell{width:100%;aspect-ratio:1;border:0;border-radius:12px;background:transparent;cursor:pointer;padding:4px;display:grid;place-items:center}
.sticker-cell:hover{background:var(--glass-3)}
.sticker-cell img,.sticker-cell video{width:100%;height:100%;object-fit:contain}
.remove-x{position:absolute;top:-4px;right:-4px;width:22px;height:22px;border-radius:50%;border:2px solid #fff;background:#e11d48;color:#fff;display:grid;place-items:center;cursor:pointer;padding:0}
.remove-x .icon{width:12px;height:12px;stroke-width:3}
.link-btn{border:0;background:transparent;color:var(--accent-text);font-weight:700;font-size:12px;cursor:pointer;padding:2px 4px;text-transform:none;letter-spacing:0;display:inline-flex;align-items:center;gap:2px}
.link-btn .icon{width:13px;height:13px}
.gif-grid{columns:2 120px;column-gap:6px}
.gif-cell{display:block;width:100%;margin:0 0 6px;break-inside:avoid;border:0;padding:0;border-radius:10px;overflow:hidden;cursor:pointer;background:var(--inset)}
.gif-cell img{display:block;width:100%;height:100%;object-fit:cover}
.gif-cell:hover{outline:3px solid var(--indigo)}
.gif-credit{text-align:right;font-size:11px}

/* Transparency preview */
.checker,.checker-bg{background-color:var(--solid);background-image:linear-gradient(45deg,#e5e7eb 25%,transparent 25%),linear-gradient(-45deg,#e5e7eb 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e5e7eb 75%),linear-gradient(-45deg,transparent 75%,#e5e7eb 75%);background-size:16px 16px;background-position:0 0,0 8px,8px -8px,-8px 0}
.checker{width:150px;height:150px;flex:none;border:2px dashed var(--line-2);border-radius:14px;display:grid;place-items:center;cursor:pointer;padding:8px;overflow:hidden}
.checker.small{width:110px;height:110px}
.checker img{max-width:100%;max-height:100%;object-fit:contain}
.checker .col{align-items:center;gap:6px;padding:8px}
.add-custom{display:flex;gap:16px;align-items:flex-start}
.range{width:100%;accent-color:var(--indigo)}

/* Profile picture settings */
.profile-row{display:flex;gap:18px;align-items:center}
.swatches{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.swatch{width:30px;height:30px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px var(--line-2);cursor:pointer;padding:0}
.swatch.on{box-shadow:0 0 0 3px var(--indigo)}

/* Sidebar title shrinks to fit (see FitTitle in app.js) */
.fit-title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;font-size:20px;line-height:1.2}
.bubble.err{font-style:italic;color:var(--muted)}
.bubble img{display:block;max-width:100%;max-height:340px;border-radius:12px;margin-bottom:6px;cursor:zoom-in}
.file{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:12px;background:var(--inset);border:1px solid var(--line);cursor:pointer;width:100%;text-align:left;margin-bottom:4px}
.file:hover{background:var(--glass-3)}
.bubble.me .file{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.35)}
.bubble.me .file:hover{background:rgba(255,255,255,.28)}
.bubble.me .file .muted{color:rgba(255,255,255,.8)}
.typing{align-self:flex-start;display:flex;gap:4px;padding:12px 14px;border-radius:18px;background:var(--solid);border:1px solid var(--line)}
.typing i{width:6px;height:6px;border-radius:50%;background:var(--indigo);opacity:.5;animation:blink 1.2s infinite}
.typing i:nth-child(2){animation-delay:.2s}.typing i:nth-child(3){animation-delay:.4s}
@keyframes blink{0%,60%,100%{opacity:.3;transform:none}30%{opacity:1;transform:translateY(-3px)}}
.composer{position:relative;padding:12px 14px;border-top:1px solid var(--line);display:flex;align-items:flex-end;gap:6px}
/* One line by default; app.js grows it with the text (up to 140px) and only then allows a scrollbar. */
.composer textarea{flex:1;min-width:0;display:block;min-height:44px;max-height:140px;height:44px;line-height:22px;resize:none;overflow-y:hidden;padding:10px 14px;border-radius:14px;border:1px solid var(--line-2);background:var(--field);outline:none;scrollbar-width:thin}
.composer .icon-btn{width:40px;height:44px;border-radius:12px}
.composer textarea:focus{border-color:var(--focus)}
.send{width:44px;height:44px;border-radius:14px;border:0;background:var(--grad);display:grid;place-items:center;cursor:pointer;flex:none;color:#fff;box-shadow:0 8px 18px rgba(99,102,241,.3)}
.send[disabled]{opacity:.45;cursor:not-allowed}
.empty{flex:1;display:grid;place-items:center;text-align:center;padding:30px}
.empty>div{display:flex;flex-direction:column;align-items:center;gap:12px;max-width:340px}
.e2e{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted)}
.e2e .icon{width:13px;height:13px}

/* Overlays */
.backdrop{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:18px;background:rgba(40,36,90,.32);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);overflow:auto}
.modal{width:100%;max-width:460px;padding:24px;display:flex;flex-direction:column;gap:16px;background:var(--pop)}
.modal.lg{max-width:560px}
.lightbox img{max-width:94vw;max-height:90vh;border-radius:14px;box-shadow:var(--shadow)}
.toasts{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);z-index:80;display:flex;flex-direction:column;gap:8px;align-items:center}
.toast{padding:10px 16px;border-radius:12px;background:#26234f;color:#fff;border:1px solid transparent;box-shadow:var(--shadow);font-size:14px;display:flex;gap:8px;align-items:center}
.toast.bad{border-color:rgba(251,113,133,.7)}
.safety{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:14px;border-radius:var(--r-sm);background:var(--inset);border:1px solid var(--line);font-size:16px;text-align:center}
.user-pick{max-height:320px;overflow-y:auto;display:flex;flex-direction:column;gap:2px}

/* Admin */
.admin{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:18px}
.tabs{display:flex;gap:6px;padding:4px;border-radius:14px;background:var(--inset);border:1px solid var(--line);width:max-content;max-width:100%;overflow-x:auto;overflow-y:hidden;flex:none;scrollbar-width:none}
.tabs::-webkit-scrollbar{display:none}
.tabs.tabs-wrap{flex-wrap:wrap;width:auto;overflow:visible}
.rf-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.rf-sel{font:inherit;font-size:13px;padding:6px 10px;border-radius:10px;border:1px solid var(--line);background:var(--inset);color:inherit}
.rf-text{min-width:0}
.tab{height:36px;padding:0 14px;border-radius:10px;border:0;background:transparent;font-weight:600;cursor:pointer;white-space:nowrap;flex:none;display:flex;align-items:center;gap:7px;color:var(--muted)}
.tab.active{background:var(--grad);color:#fff}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px}
.stat{padding:14px 16px;border-radius:var(--r-sm);background:var(--card);border:1px solid var(--line)}
.stat b{display:block;font-family:var(--head);font-size:24px;font-weight:600}
.table-wrap{overflow-x:auto;border-radius:var(--r-sm);border:1px solid var(--line);background:var(--card)}
table{width:100%;border-collapse:collapse;min-width:620px}
th,td{padding:11px 14px;text-align:left;border-bottom:1px solid var(--line);vertical-align:middle}
th{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-weight:700}
tr:last-child td{border-bottom:0}
.card{padding:18px;border-radius:var(--r-sm);background:var(--card);border:1px solid var(--line);display:flex;flex-direction:column;gap:14px}
.setting{display:flex;align-items:center;justify-content:space-between;gap:16px}
.setting .input{max-width:240px}
.as-wrap{display:flex;flex-direction:column;gap:14px;min-width:0}
.as-search{display:flex;align-items:center;gap:8px;padding:2px 10px;border-radius:12px;background:var(--inset);border:1px solid var(--line)}
.as-search>.icon{position:static;flex:none;color:var(--faint)}
.as-search input::-webkit-search-cancel-button,.as-search input::-webkit-search-decoration{-webkit-appearance:none;display:none}
.as-search .input{flex:1 1 auto;width:auto;min-width:0;border:0;background:transparent;box-shadow:none;max-width:none;padding-left:2px}
.as-search .icon-btn{flex:none}
.as-split{display:grid;grid-template-columns:230px minmax(0,1fr);gap:16px;align-items:start}
.as-nav{display:flex;flex-direction:column;gap:14px;position:sticky;top:0;max-height:calc(100vh - 160px);overflow-y:auto;scrollbar-width:thin}
.as-sec{display:flex;flex-direction:column;gap:2px}
.as-sec h4{margin:0 0 4px;padding:0 10px;font-size:11px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted)}
.as-row{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:8px 10px;border-radius:10px;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}
.as-row:hover{background:var(--glass-3)}
.as-row.on{background:var(--grad);color:#fff}
.as-dot{width:8px;height:8px;border-radius:50%;background:#6366f1;flex:none}
.as-row.on .as-dot{background:#fff}
.as-badge{min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:rgba(245,158,11,.25);color:var(--warn);font-size:11px;font-weight:700;display:inline-grid;place-items:center;flex:none}
.as-row.on .as-badge{background:rgba(255,255,255,.3);color:#fff}
.as-chev{color:var(--muted);flex:none}
.as-content{min-width:0}
.as-back{display:inline-flex;align-items:center;gap:6px;align-self:flex-start;padding:8px 10px;margin-left:-6px;border:0;background:transparent;color:inherit;font:inherit;font-weight:600;cursor:pointer;border-radius:10px}
.as-hit{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:var(--card);color:inherit;font:inherit;cursor:pointer;min-height:48px}
.as-hit:hover{background:var(--glass-3)}
.as-hit .block{display:block}
.as-wrap .setting{padding:8px 10px;margin:-8px -10px;border-radius:10px}
.as-wrap .setting .grow{flex:1 1 220px;min-width:0;overflow-wrap:anywhere}
.as-wrap .setting.dirty{box-shadow:inset 3px 0 0 #6366f1}
.as-wrap .setting.flash{animation:asflash 1.9s ease-out}
@keyframes asflash{0%,55%{background:rgba(245,158,11,.22);box-shadow:0 0 0 2px rgba(245,158,11,.7)}100%{background:transparent;box-shadow:0 0 0 2px transparent}}
.as-bar{position:sticky;bottom:0;z-index:5;display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 12px;padding-bottom:calc(10px + env(safe-area-inset-bottom));border-radius:12px;background:var(--card);border:1px solid var(--line);box-shadow:0 -8px 24px rgba(0,0,0,.28)}
@media (max-width:760px){
  .as-split{grid-template-columns:1fr}
  .as-nav{position:static;max-height:none;overflow:visible}
  .as-row{padding:13px 12px;min-height:48px;background:var(--card);border:1px solid var(--line);border-radius:12px;margin-bottom:6px}
  .as-wrap .setting .input{max-width:none;flex:1 1 100%;min-height:44px}
  .as-wrap .setting select.input{min-height:44px}
  .as-bar{border-radius:12px 12px 0 0;margin:0 -18px;border-left:0;border-right:0;padding-left:18px;padding-right:18px}
  .as-bar .btn{min-height:44px}
}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px}

/* Setup wizard */
.steps{display:flex;gap:8px;justify-content:center}
.steps i{width:34px;height:5px;border-radius:99px;background:var(--glass-3)}
.steps i.on{background:var(--grad)}
.check{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:12px;background:var(--card);border:1px solid var(--line)}
.check .icon.ok{color:var(--ok)}.check .icon.bad{color:var(--danger)}.check .icon.warn{color:var(--warn)}
ol.guide{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:8px}
code{font-family:ui-monospace,Consolas,monospace;font-size:13px;padding:2px 6px;border-radius:6px;background:var(--inset);border:1px solid var(--line);overflow-wrap:anywhere}
[hidden]{display:none!important}

@media (max-width:820px){
  .app{grid-template-columns:1fr;padding:0;gap:0}
  .app .glass{border-radius:0;border:0}
  .app.has-active .sidebar{display:none}
  .app:not(.has-active) .pane{display:none}
  .back{display:inline-grid}
  .bubble{max-width:86%}
  .msg-row .bubble{max-width:82vw}
  .add-custom{flex-direction:column;align-items:center}
  .picker{left:6px;width:calc(100vw - 12px)}
  .grid-2{grid-template-columns:1fr}
  .setting{flex-wrap:wrap}
}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Friends */
.person-card{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:8px 10px;border-radius:14px;border:1px solid var(--line);background:var(--card)}
.person-error{flex-basis:100%}
.icon-btn.has-badge{position:relative}
.count.badge-dot{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;font-size:11px;padding:0 4px;border:2px solid #fffdf7}
.btn .count,.tab .count{min-width:18px;height:18px;font-size:11px}

/* Sticker tab: My stickers / Search switch */
.seg{display:flex;gap:4px;margin:10px 10px 0;padding:3px;border-radius:11px;background:var(--inset);border:1px solid var(--line)}
.seg button{flex:1;height:30px;border:0;border-radius:8px;background:transparent;font-weight:700;font-size:13px;color:var(--muted);cursor:pointer}
.seg button.on{background:var(--solid);color:var(--text);box-shadow:0 1px 3px rgba(40,30,120,.12)}
.picker-body.embedded{padding:10px}

/* Memes, clips, AI emoji, compact picker tabs */
.picker-tabs.compact .tab{padding:0 4px;gap:4px;font-size:12.5px}
.picker-tabs.compact .tab .icon{width:16px;height:16px}
@media (max-width:420px){.picker-tabs.compact .tab span{display:none}}
.seg{overflow-x:auto;scrollbar-width:none}
.seg button{white-space:nowrap;padding:0 8px}
.gif-msg.meme{width:260px;background:var(--solid)}
.gif-msg.meme img{object-fit:contain}
.clip-msg{position:relative;width:320px;max-width:100%;border-radius:12px;overflow:hidden;margin-bottom:4px;background:#0f0c32;display:grid;place-items:center}
.clip-msg>img{display:block;width:100%;height:100%;object-fit:cover;margin:0!important;border-radius:0!important;max-height:none!important}
.clip-msg video{display:block;width:100%;height:100%;object-fit:contain;background:#000;margin:0!important;border-radius:0!important;max-height:none!important}
.clip-msg .gif-badge{top:8px;bottom:auto}
.clip-loading{position:absolute;inset:0;display:grid;place-items:center;color:#fff}
.bubble.clip .meta{display:none}
.bubble.clip{padding:4px}
.bubble.clip:hover .meta,.bubble.clip:focus-within .meta{display:inline-flex}
.clip-grid{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.clip-cell{position:relative;aspect-ratio:16/9;border:0;border-radius:10px;overflow:hidden;padding:0;cursor:pointer;background:#1e1b4b}
.clip-cell img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.clip-cell .clip-blur{filter:saturate(1.1)}
.clip-cell .img-loading{position:absolute;inset:0;opacity:0}
.clip-play{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:34px;height:34px;border-radius:50%;background:rgba(15,12,50,.55);color:#fff;display:grid;place-items:center;transition:opacity .15s}
.clip-play .icon{width:16px;height:16px;fill:#fff}
.clip-cell:hover .clip-play{opacity:0}
.clip-title{position:absolute;left:0;right:0;bottom:0;padding:14px 6px 4px;font-size:11px;font-weight:700;color:#fff;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:linear-gradient(transparent,rgba(10,8,40,.75))}
.clip-cell:hover{outline:3px solid var(--indigo)}
.ai-create{display:flex;flex-wrap:wrap;gap:6px;padding:10px 10px 0}
.ai-create .input{flex:1;min-width:0;height:36px}
.ai-made{flex-basis:100%;display:flex;align-items:center;gap:8px}
.ai-made .sticker-cell{width:72px}

/* Chat info panel */
.pane{position:relative}
.head-person{display:flex;align-items:center;gap:12px;flex:1;min-width:0;border:0;background:transparent;text-align:left;cursor:pointer;padding:4px 8px 4px 4px;margin:-4px 0;border-radius:14px}
.head-person:hover{background:var(--glass-2)}
.chat-info{position:absolute;top:0;right:0;bottom:0;z-index:30;width:min(400px,100%);display:flex;flex-direction:column;background:var(--pop);border-left:1px solid var(--line);box-shadow:-18px 0 40px rgba(60,50,140,.12);animation:slidein .18s ease}
@keyframes slidein{from{transform:translateX(24px);opacity:0}}
.info-scroll{flex:1;overflow-y:auto}
.info-profile{display:flex;flex-direction:column;align-items:center;gap:6px;padding:20px 16px 14px;text-align:center}
.info-profile .btn{margin-top:6px}
.info-tabs{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:repeat(4,1fr);gap:4px;padding:8px 10px;background:var(--pop);border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.info-tab{display:flex;align-items:center;justify-content:center;gap:5px;height:34px;border:0;border-radius:9px;background:transparent;font-weight:700;font-size:13px;color:var(--muted);cursor:pointer}
.info-tab .icon{width:15px;height:15px}
.info-tab.on{background:var(--grad);color:#fff}
.info-count{font-size:11px;opacity:.8;font-weight:600}
.thumb-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;padding:6px}
.thumb{position:relative;aspect-ratio:1;border:0;padding:0;border-radius:8px;overflow:hidden;cursor:pointer;background:var(--inset);display:grid;place-items:center;color:var(--faint)}
.thumb img,.thumb video,.thumb .img-loading{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:0}
.thumb-play{position:relative;width:30px;height:30px;border-radius:50%;background:rgba(15,12,50,.55);color:#fff;display:grid;place-items:center}
.thumb-play .icon{width:14px;height:14px;fill:#fff}
.thumb .gif-badge{left:5px;bottom:5px;font-size:10px}
.thumb:hover{outline:3px solid var(--indigo);outline-offset:-3px}
.info-list{display:flex;flex-direction:column;padding:6px 8px}
.info-row{display:flex;align-items:center;gap:10px;padding:8px 6px;border-bottom:1px solid var(--line)}
.info-icon{width:38px;height:38px;flex:none;border-radius:10px;background:var(--glass-3);color:var(--indigo);display:grid;place-items:center}
.info-link{min-width:0;text-decoration:none;color:var(--text)}
.info-link:hover b{text-decoration:underline}
.info-audio{display:block;width:100%;height:34px;margin-top:6px}
.info-foot{padding:14px;text-align:center;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px}
.viewer{z-index:95;background:rgba(10,8,40,.82)}
.viewer-body{display:flex;flex-direction:column;align-items:center;gap:10px;max-width:94vw}
.viewer-body img,.viewer-body video{max-width:94vw;max-height:80vh;border-radius:12px;box-shadow:var(--shadow);background:#000}
.viewer-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:8px 10px;border-radius:14px;background:var(--pop);min-width:min(520px,94vw)}
.viewer-bar .btn{text-decoration:none;color:var(--text)}
.audio-msg{display:flex;align-items:center;gap:10px;width:300px;max-width:100%;padding:6px 6px 6px 4px;margin-bottom:4px;border-radius:12px;background:var(--inset);border:1px solid var(--line)}
.audio-msg audio{display:block;width:100%;height:34px;margin-top:4px}
.bubble.me .audio-msg{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.35)}
.bubble.me .audio-msg .info-icon{background:rgba(255,255,255,.25);color:#fff}
.bubble.me .audio-msg .muted{color:rgba(255,255,255,.8)}
@media (max-width:820px){.chat-info{width:100%;border-left:0}}

/* Message formatting (format.js) */
.fmt-color.c-red{color:#e11d48}.swatch.c-red-bg{background:#e11d48}
.fmt-color.c-orange{color:#ea580c}.swatch.c-orange-bg{background:#ea580c}
.fmt-color.c-amber{color:#ca8a04}.swatch.c-amber-bg{background:#ca8a04}
.fmt-color.c-green{color:#16a34a}.swatch.c-green-bg{background:#16a34a}
.fmt-color.c-teal{color:#0d9488}.swatch.c-teal-bg{background:#0d9488}
.fmt-color.c-blue{color:#2563eb}.swatch.c-blue-bg{background:#2563eb}
.fmt-color.c-purple{color:#9333ea}.swatch.c-purple-bg{background:#9333ea}
.fmt-color.c-pink{color:#db2777}.swatch.c-pink-bg{background:#db2777}
.fmt-color.c-grey{color:#64748b}.swatch.c-grey-bg{background:#64748b}
.fmt-hl.hl-yellow{background:#fef08a;color:#1f1d3d}.swatch.hl-yellow-bg{background:#fef08a}
.fmt-hl.hl-green{background:#bbf7d0;color:#1f1d3d}.swatch.hl-green-bg{background:#bbf7d0}
.fmt-hl.hl-blue{background:#bfdbfe;color:#1f1d3d}.swatch.hl-blue-bg{background:#bfdbfe}
.fmt-hl.hl-pink{background:#fbcfe8;color:#1f1d3d}.swatch.hl-pink-bg{background:#fbcfe8}
.fmt-hl.hl-purple{background:#e9d5ff;color:#1f1d3d}.swatch.hl-purple-bg{background:#e9d5ff}
.fmt-hl.hl-orange{background:#fed7aa;color:#1f1d3d}.swatch.hl-orange-bg{background:#fed7aa}
.bubble.me .fmt-color{background:rgba(255,255,255,.94);border-radius:4px;padding:0 3px;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.bubble.me .fmt-hl{color:#1f1d3d}
.bubble strong{font-weight:800}
.msg-link{color:var(--accent-text);text-decoration:underline;text-underline-offset:2px;word-break:break-all}
.bubble.me .msg-link{color:#fff}
.mono-inline,.code-block{font-family:ui-monospace,"Cascadia Mono",Consolas,monospace;font-size:13px}
.mono-inline{padding:1px 5px;border-radius:5px;background:var(--inset);border:1px solid var(--line)}
.bubble.me .mono-inline{background:rgba(255,255,255,.2);border-color:rgba(255,255,255,.3)}
.code-block{display:block;margin:4px 0;padding:8px 10px;border-radius:9px;background:#1e1b4b;color:#e0e7ff;white-space:pre;overflow-x:auto;max-width:100%}
.bubble.me .code-block{background:rgba(15,12,50,.45)}
.fmt-quote{display:block;margin:2px 0 4px;padding:3px 0 3px 10px;border-left:3px solid var(--indigo);color:var(--muted);font-style:italic}
.bubble.me .fmt-quote{border-left-color:#fff;color:rgba(255,255,255,.9)}
/* Spoilers: animated static, warning triangle, dissolves on reveal */
@keyframes static{0%{background-position:0 0}20%{background-position:-40px 20px}40%{background-position:30px -50px}60%{background-position:-60px -10px}80%{background-position:50px 40px}100%{background-position:0 0}}
@keyframes dissolve{0%{opacity:1;filter:blur(0);transform:scale(1)}100%{opacity:0;filter:blur(14px);transform:scale(1.12)}}
.spoiler-text{border-radius:5px;cursor:pointer;position:relative}
.spoiler-text.hidden,.spoiler-text.revealing{background-color:#5b5f86;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .55 0 0 0 1.4 -.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");background-size:160px;animation:static .5s steps(5) infinite}
.spoiler-text.hidden .spoiler-inner{opacity:0}
.spoiler-text.revealing{animation:static .5s steps(5) infinite,fadebg .6s ease forwards}
.spoiler-text.revealing .spoiler-inner{opacity:1;transition:opacity .6s}
@keyframes fadebg{to{background-color:transparent;background-size:400px;opacity:1}}
.spoiler-media{position:relative;overflow:hidden;border-radius:12px}
.spoiler-media>:not(.spoiler-cover){transition:filter .7s ease}
.spoiler-media.hidden>:not(.spoiler-cover){filter:blur(28px) saturate(.6);pointer-events:none}
.spoiler-cover{position:absolute;inset:0;z-index:3;border:0;padding:0;display:grid;place-items:center;cursor:pointer;background:rgba(40,40,70,.55);overflow:hidden;border-radius:inherit}
.spoiler-label{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;color:#fff;font-family:var(--head);font-weight:700;font-size:14px;letter-spacing:.04em;text-transform:uppercase;text-shadow:0 1px 4px rgba(0,0,0,.6)}
.spoiler-label .icon{width:34px;height:34px;stroke-width:2.2;filter:drop-shadow(0 1px 3px rgba(0,0,0,.5))}
.spoiler-media.revealing .spoiler-cover{animation:dissolve .7s ease forwards;pointer-events:none}
.spoiler-cover:hover .spoiler-label{transform:scale(1.06)}
.spoiler-cover.small .spoiler-label .icon{width:22px;height:22px}
.thumb .spoiler-cover{border-radius:0}
/* Formatting toolbar */
.format-bar{position:relative;display:flex;align-items:center;gap:2px;padding:6px 12px 0;overflow-x:auto;scrollbar-width:none}
.format-bar .icon-btn.sm{flex:none}
.fb-sep{width:1px;height:20px;background:var(--line-2);margin:0 4px;flex:none}
.fb-pop{position:absolute;left:12px;bottom:calc(100% + 4px);z-index:45;display:flex;gap:6px;align-items:center;padding:8px;border-radius:12px;background:var(--pop);border:1px solid var(--line);box-shadow:var(--shadow)}
.fb-pop .input{height:34px;width:240px}
.fb-pop.swatches{margin:0}
.format-wrap{position:relative}
.thumb:has(.spoiler-cover) img,.thumb:has(.spoiler-cover) video{filter:blur(16px) saturate(.6)}
.thumb .spoiler-cover{background:rgba(40,40,70,.7)}

/* ---- Voice and video messages ---- */
.voice-msg{display:flex;align-items:center;gap:10px;width:270px;max-width:100%;padding:2px 2px;margin-bottom:2px}
.vplay{width:40px;height:40px;border-radius:50%;border:0;flex:none;display:grid;place-items:center;cursor:pointer;background:var(--grad);color:#fff;box-shadow:0 4px 12px rgba(99,102,241,.35)}
.vplay .spinner{width:16px;height:16px}
.bubble.me .vplay{background:#fff;color:#4f46e5;box-shadow:0 2px 8px rgba(15,12,50,.25)}
.wf{position:relative;flex:1;min-width:0;height:36px;cursor:pointer;touch-action:none;border-radius:6px;outline:none;user-select:none}
.wf:focus-visible{box-shadow:0 0 0 2px var(--focus)}
.wf-bars{position:absolute;inset:0;display:flex;align-items:center;gap:2px;pointer-events:none}
.wf-bars i{display:block;flex:1;min-width:1px;border-radius:2px;background:currentColor}
.wf-bars.base{color:rgba(99,102,241,.3)}
.wf-bars.played{color:#5b5bf0}
.bubble.me .wf-bars.base{color:rgba(255,255,255,.42)}
.bubble.me .wf-bars.played{color:#fff}
.vmeta{display:flex;flex-direction:column;align-items:flex-end;gap:3px;min-width:34px;font-size:12px;font-variant-numeric:tabular-nums}
.vtime{font-weight:600}
.vspeed{border:0;border-radius:99px;padding:1px 7px;font:inherit;font-size:11px;font-weight:700;cursor:pointer;background:rgba(99,102,241,.14);color:var(--accent-text)}
.bubble.me .vspeed{background:rgba(255,255,255,.25);color:#fff}
.voice-row .voice-msg{width:100%}
.voice-row .vmeta{color:var(--muted)}
.bubble.voice-bubble{min-width:0}

.vnote{position:relative;width:min(240px,62vw);aspect-ratio:1;flex:none}
.vnote-btn{position:absolute;inset:5px;border-radius:50%;overflow:hidden;border:0;padding:0;background:#0f0c32;cursor:pointer;display:block}
.vnote-btn video,.vnote-btn img,.rec-stage video{display:block;width:100%;height:100%;object-fit:cover;margin:0!important;border-radius:0!important;max-height:none!important;cursor:pointer}
.vnote-play{position:absolute;left:50%;top:50%;width:52px;height:52px;margin:-26px 0 0 -26px;border-radius:50%;display:grid;place-items:center;background:rgba(15,12,50,.55);color:#fff;backdrop-filter:blur(6px)}
.vnote-play .spinner{width:20px;height:20px}
.vnote-ring{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.vnote-ring circle{fill:none;stroke-width:3}
.vnote-ring .track{stroke:rgba(99,102,241,.25)}
.vnote-ring .prog{stroke:#6366f1;stroke-linecap:round;transition:stroke-dashoffset .25s linear}
.bubble.me .vnote-ring .track{stroke:rgba(255,255,255,.4)}
.bubble.me .vnote-ring .prog{stroke:#fff}
.vnote-time{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);padding:1px 8px;border-radius:99px;background:rgba(15,12,50,.6);color:#fff;font-size:12px;font-variant-numeric:tabular-nums;pointer-events:none}
.bubble.vnote-bubble{padding:6px}

.composer.recording{align-items:center;gap:8px}
.composer.recording .rec-cancel{color:#dc2626}
.rec-live-wrap{display:flex;align-items:center;gap:10px;min-width:0}
.rec-dot{flex:none;width:11px;height:11px;border-radius:50%;background:#cbd5e1}
.rec-dot.on{background:#ef4444;animation:recpulse 1.1s ease-in-out infinite}
@keyframes recpulse{50%{opacity:.25}}
.rec-time{flex:none;min-width:38px;font-weight:700;font-variant-numeric:tabular-nums}
.rec-live{flex:1;min-width:0;height:36px;display:block}
.rec-review{min-width:0}
.rec-review .voice-msg{width:100%}
.rec-stage{position:absolute;right:14px;bottom:calc(100% + 10px);width:min(240px,70vw);aspect-ratio:1;z-index:3;border-radius:50%;background:#0f0c32;box-shadow:0 14px 40px rgba(40,30,110,.32)}
.rec-stage>video{position:absolute;inset:5px;width:calc(100% - 10px);height:calc(100% - 10px);border-radius:50%!important}
.rec-stage>video.mirror{transform:scaleX(-1)}
.rec-stage .rec-play{background:transparent}
.rec-stage .vnote-ring .track{stroke:rgba(255,255,255,.35)}
.rec-stage .vnote-ring .prog{stroke:#ef4444}
@media (prefers-reduced-motion:reduce){.rec-dot.on{animation:none}.vnote-ring .prog{transition:none}}

/* ===================== 2.0: groups, calls, backgrounds, status, archive, uploads, sign-up ===================== */
.avatar.xs{width:24px;height:24px;font-size:10px}
.avatar.xs .dot{display:none}
.status-emoji{display:inline-block;margin-left:5px;font-size:.95em;line-height:1;vertical-align:-1px;font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",var(--font)}
.inline.group-mark{width:14px;height:14px;margin-right:5px;vertical-align:-2px;color:var(--indigo)}
.link-btn{border:0;background:none;padding:0 0 0 8px;color:var(--accent-text);font-weight:700;cursor:pointer;font-size:inherit}
.progress{display:block;flex:1;min-width:60px;height:8px;border-radius:99px;background:var(--glass-3);overflow:hidden;position:relative;box-shadow:inset 0 1px 2px rgba(30,27,75,.08)}
.progress i{display:block;height:100%;position:relative;overflow:hidden;background:var(--grad);border-radius:99px;transition:width .45s cubic-bezier(.22,.8,.3,1);box-shadow:0 0 10px rgba(99,102,241,.45)}
.progress i::after{content:"";position:absolute;inset:0;background:linear-gradient(100deg,transparent 20%,rgba(255,255,255,.6) 50%,transparent 80%);transform:translateX(-100%);animation:pm-shimmer 1.4s ease-in-out infinite}
.progress.starting::before{content:"";position:absolute;top:0;bottom:0;width:35%;border-radius:99px;background:var(--grad);animation:pm-slide 1.1s ease-in-out infinite}
.progress.done i::after{animation:none;opacity:0}
.progress.done i{animation:pm-pop .4s ease-out}
@keyframes pm-shimmer{to{transform:translateX(100%)}}
@keyframes pm-slide{0%{left:-35%}100%{left:100%}}
@keyframes pm-pop{50%{filter:brightness(1.25)}}
@media (prefers-reduced-motion:reduce){.progress i::after,.progress.starting::before{animation:none}.progress i{transition:none}}
.get-app{margin:0}
.bubble.me .progress{background:rgba(255,255,255,.3)}
.bubble.me .progress i{background:#fff}

/* Sidebar */
.me-btn{display:flex;align-items:center;gap:8px;flex:1;min-width:0;border:0;background:none;padding:4px;border-radius:12px;cursor:pointer;text-align:left}
.me-btn:hover{background:var(--glass-2)}
.archive-row .archive-avatar{background:var(--glass-3);color:var(--accent-text)}
.archive-row .archive-avatar .icon{width:20px;height:20px}
.archive-head{display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;border:0;background:var(--glass-2);border-radius:12px;cursor:pointer;margin-bottom:4px;text-align:left}
.count.muted-count{background:var(--glass-3);color:var(--text)}

/* Group messages */
.msg-row.grouped{align-items:flex-end}
.msg-avatar{width:24px;flex:none;align-self:flex-start;margin-top:2px}
.sender-name{font-size:12.5px;font-weight:700;margin-bottom:2px;line-height:1.3}
.bubble .meta .unverified{color:#d97706;display:inline-flex}
.bubble .meta .unverified .icon{width:13px;height:13px}
.event-row{align-self:center;display:flex;justify-content:center;max-width:90%;margin:6px 0}
.event-pill{display:inline-flex;align-items:center;gap:7px;padding:5px 12px;border-radius:99px;background:var(--pop);border:1px solid var(--line);font-size:12.5px;color:var(--muted);text-align:center;flex-wrap:wrap;justify-content:center}
.event-pill .icon{width:14px;height:14px;color:var(--indigo)}
.event-row.missed .event-pill{color:#be123c}
.event-row.missed .event-pill .icon{color:#e11d48}
.event-time{font-size:11px;opacity:.75}
.typing-wrap{display:flex;align-items:center;gap:8px;align-self:flex-start}
.role-badge{margin-left:6px;font-size:10.5px;padding:0 7px}
.info-row.member{gap:10px}
.info-status{font-size:14px;padding:2px 10px;border-radius:99px;background:var(--glass-2)}

/* People picker */
.chips{display:flex;flex-wrap:wrap;gap:6px}
.chip{display:inline-flex;align-items:center;gap:6px;padding:3px 8px 3px 3px;border-radius:99px;border:1px solid var(--line);background:var(--card);cursor:pointer;font-size:13px;font-weight:600}
.chip .icon{width:13px;height:13px;opacity:.6}
.pick-list{max-height:min(46vh,360px);overflow-y:auto}
.conv-item.pick{cursor:pointer}
.conv-item.pick input{position:absolute;opacity:0;pointer-events:none}
.conv-item.pick.on{background:var(--glass-2);border-color:var(--line)}
.pick-box{width:22px;height:22px;border-radius:7px;border:2px solid var(--line-2);display:grid;place-items:center;flex:none;color:#fff}
.conv-item.pick.on .pick-box{background:var(--grad);border-color:transparent}
.pick-box .icon{width:14px;height:14px;stroke-width:3}

/* Chat background */
.msgs-wrap{position:relative;flex:1;min-height:0;display:flex;flex-direction:column}
.msgs-wrap > .msgs{position:relative;z-index:1}
.chat-bg{position:absolute;inset:0;z-index:0;pointer-events:none}
.msgs-wrap.on-dark .day,.msgs-wrap.on-dark .event-pill{background:rgba(15,12,50,.55);color:#e0e7ff;border-color:rgba(255,255,255,.15)}
.msgs-wrap.on-dark .seen-label{color:#86efac}
.msgs-wrap.on-dark .typing-wrap .muted,.msgs-wrap.on-dark > .msgs > .day .e2e{color:#e0e7ff}
.bg-preview{position:relative;height:150px;border-radius:14px;overflow:hidden;border:1px solid var(--line);background:var(--solid)}
.bg-preview-msgs{position:relative;z-index:1;display:flex;flex-direction:column;gap:6px;padding:18px}
.bg-preview-msgs .bubble{max-width:70%}
.bg-preview-msgs .bubble.me{align-self:flex-end}
.bg-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));gap:10px}
.bg-tile{position:relative;display:flex;flex-direction:column;gap:4px;align-items:stretch;padding:4px;border-radius:12px;border:2px solid transparent;background:none;cursor:pointer;text-align:center}
.bg-tile.on{border-color:#6366f1;background:var(--glass-2)}
.bg-swatch{height:64px;border-radius:9px;border:1px solid var(--line);display:grid;place-items:center;background:var(--solid);color:var(--muted)}
.bg-tile.add .bg-swatch{border-style:dashed}
.bg-tile .remove-x{position:absolute;top:-4px;right:-4px}
.bg-opacity input[type=range]{width:100%;accent-color:#6366f1}

/* Status */
.status-pick{width:46px;height:46px;flex:none;border-radius:12px;border:1px solid var(--line);background:var(--field);font-size:24px;cursor:pointer;display:grid;place-items:center}
.status-grid-wrap{display:flex;flex-direction:column;gap:8px}
.status-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(38px,1fr));max-height:200px;overflow-y:auto;gap:2px}

/* Uploads */
.upload-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:12px;background:var(--card);border:1px solid var(--line)}
.upload-row > .icon{color:var(--indigo)}
.clip-load{position:absolute;inset:0;border:0;background:linear-gradient(135deg,#1e1b4b,#312e81);color:#fff;cursor:pointer;display:grid;place-items:center;border-radius:inherit;width:100%;padding:12px}
.clip-load.has-poster{background:linear-gradient(rgba(10,8,40,.18),rgba(10,8,40,.55))}
.clip-load.has-poster .small{text-shadow:0 1px 6px rgba(0,0,0,.7)}
.clip-load .progress{width:140px;flex:none;background:rgba(255,255,255,.25)}
.clip-load .progress i{background:#fff}
.viewer-msg{display:flex;flex-direction:column;align-items:center;gap:10px;color:#fff;padding:20px;text-align:center}

/* Sign-up and invites */
.invite-ok{color:#15803d;gap:6px}.invite-bad{color:#be123c;gap:6px}
.invite-ok .icon,.invite-bad .icon{width:16px;height:16px}
.invite-card{display:flex;gap:18px;align-items:center;padding:16px;border-radius:16px;background:var(--card);border:1px solid var(--line);flex-wrap:wrap}
.invite-card .qr{width:168px;height:168px;flex:none;border-radius:12px;border:1px solid var(--line)}
.invite-code{font-size:22px;font-weight:800;letter-spacing:.08em;color:var(--accent-text)}
.qr-scan{position:relative;border-radius:14px;overflow:hidden;background:#0f0c32;aspect-ratio:4/3}
.qr-scan video{width:100%;height:100%;object-fit:cover;display:block}
.qr-frame{position:absolute;inset:18%;border:3px solid rgba(255,255,255,.85);border-radius:16px;box-shadow:0 0 0 999px rgba(15,12,50,.35)}

/* Live calls */
.call-overlay{position:fixed;inset:0;z-index:80;display:grid;place-items:center;padding:16px;background:rgba(15,12,50,.55);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.call-card{position:relative;width:min(880px,100%);height:min(620px,calc(100vh - 32px));display:flex;flex-direction:column;border-radius:24px;overflow:hidden;background:linear-gradient(160deg,#1e1b4b,#312e81 60%,#4c1d95);color:#fff;box-shadow:0 30px 80px rgba(15,12,50,.45)}
.state-ringing .call-card,.state-calling .call-card,.state-starting .call-card,.state-ended .call-card{width:min(380px,100%);height:auto;min-height:420px}
.call-stage{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center}
.call-remote{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000}
.call-local{position:absolute;right:14px;bottom:14px;width:min(28%,220px);aspect-ratio:4/3;object-fit:cover;border-radius:14px;border:2px solid rgba(255,255,255,.6);transform:scaleX(-1);background:#000;z-index:2}
.call-person{display:flex;flex-direction:column;align-items:center;gap:14px;padding:24px;text-align:center}
.call-person h2{color:#fff;font-size:24px}
.call-avatar{border-radius:50%;padding:6px;background:rgba(255,255,255,.12)}
.call-avatar .avatar.xl{width:112px;height:112px;font-size:36px}
.call-avatar.pulse{animation:callpulse 1.8s ease-out infinite}
@keyframes callpulse{0%{box-shadow:0 0 0 0 rgba(165,180,252,.55)}100%{box-shadow:0 0 0 28px rgba(165,180,252,0)}}
.call-status{position:absolute;top:18px;left:0;right:0;text-align:center;font-weight:600;font-variant-numeric:tabular-nums;text-shadow:0 1px 6px rgba(0,0,0,.4);z-index:2}
.call-stage:not(.has-video) .call-status{position:static;order:2}
.call-stage:not(.has-video){flex-direction:column;gap:6px}
.call-status.warn{color:#fde68a}
.call-e2e{position:absolute;bottom:10px;left:14px;opacity:.75;display:flex;align-items:center;gap:4px;z-index:2}
.call-e2e .icon{width:12px;height:12px}
.call-controls{display:flex;justify-content:center;gap:16px;padding:18px;background:rgba(15,12,50,.35)}
.call-btn{width:58px;height:58px;border-radius:50%;border:0;display:grid;place-items:center;cursor:pointer;background:rgba(255,255,255,.16);color:#fff;transition:transform .12s,background .12s}
.call-btn:hover{transform:scale(1.06);background:rgba(255,255,255,.26)}
.call-btn .icon{width:24px;height:24px}
.call-btn.off{background:#fff;color:#312e81}
.call-btn.end{background:#e11d48}
.call-btn.end:hover{background:#be123c}
.call-btn.go{background:#16a34a}
.call-btn.go:hover{background:#15803d}
.call-mini{position:absolute;top:10px;right:10px;z-index:3;color:#fff;background:rgba(255,255,255,.12)}
.call-overlay.mini{inset:auto 18px 18px auto;padding:0;background:none;-webkit-backdrop-filter:none;backdrop-filter:none;display:block}
.call-overlay.mini .call-card{width:300px;height:260px;min-height:0;border-radius:18px}
.call-overlay.mini .call-person h2{font-size:16px}
.call-overlay.mini .call-avatar .avatar.xl{width:64px;height:64px;font-size:22px}
.call-overlay.mini .call-controls{padding:10px;gap:10px}
.call-overlay.mini .call-btn{width:44px;height:44px}
.call-overlay.mini .call-local{width:34%}
.call-overlay.mini .call-e2e{display:none}
@media (max-width:640px){.call-card{height:calc(100vh - 32px)}.call-local{width:34%}
  /* phones: eight round buttons do not fit in one row, so let them wrap and shrink a little */
  .call-controls{flex-wrap:wrap;gap:10px 12px;padding:14px 10px}
  .call-btn{width:50px;height:50px}
  .call-btn .icon{width:22px;height:22px}
  .call-overlay.full .call-controls{padding:20px 10px 18px}
  .call-overlay.full .call-local{bottom:150px;right:14px}}
@media (prefers-reduced-motion:reduce){.call-avatar.pulse{animation:none}}

.clip-error{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:14px;text-align:center;color:var(--muted);background:var(--glass-3)}
.col > .progress,.upload-row .progress{flex:none;width:100%;height:10px}
.get-app{text-decoration:none;color:var(--indigo)}
.get-app:hover{text-decoration:none}

.clip-tools{position:absolute;top:8px;right:8px;display:flex;gap:6px;opacity:0;transition:opacity .15s;z-index:2}
.clip-msg:hover .clip-tools,.clip-msg:focus-within .clip-tools,.clip-msg:fullscreen .clip-tools{opacity:1}
@media (hover:none){.clip-tools{opacity:1}}
.clip-tool{width:32px;height:32px;border-radius:10px;border:0;display:grid;place-items:center;color:#fff;background:rgba(15,12,50,.6);backdrop-filter:blur(8px);cursor:pointer}
.clip-tool:hover{background:rgba(15,12,50,.82)}
video:fullscreen{object-fit:contain!important;background:#000}

/* ---- Spoilers: pixelated motion blur ---- */
.pixel-cover{position:absolute;inset:0;display:block;overflow:hidden;background:#4d4f86}
.pixel-cover canvas{position:absolute;inset:-4%;width:108%;height:108%;image-rendering:pixelated;image-rendering:crisp-edges;image-rendering:pixelated;filter:saturate(1.05) contrast(.95);animation:pm-pixdrift 5.5s ease-in-out infinite alternate}
.spoiler-cover::after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at center,rgba(24,22,66,.5),rgba(24,22,66,.12) 70%);pointer-events:none}
.spoiler-cover .spoiler-label{z-index:1}
@keyframes pm-pixdrift{0%{transform:translate(-2.2%,-1.2%) scale(1.02)}100%{transform:translate(2.2%,1.4%) scale(1.07)}}
@media (prefers-reduced-motion:reduce){.pixel-cover canvas{animation:none}}

.spoiler-text.hidden,.spoiler-text.revealing{background-color:#5b5f86;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='32' shape-rendering='crispEdges'%3E%3Crect x='0' y='0' width='8' height='8' fill='%236b86d6' fill-opacity='1'/%3E%3Crect x='8' y='0' width='8' height='8' fill='%236b86d6' fill-opacity='1'/%3E%3Crect x='16' y='0' width='8' height='8' fill='%236b86d6' fill-opacity='1'/%3E%3Crect x='24' y='0' width='8' height='8' fill='%237f73c6' fill-opacity='1'/%3E%3Crect x='32' y='0' width='8' height='8' fill='%236f6cb6' fill-opacity='1'/%3E%3Crect x='40' y='0' width='8' height='8' fill='%236b86d6' fill-opacity='1'/%3E%3Crect x='48' y='0' width='8' height='8' fill='%236f6cb6' fill-opacity='1'/%3E%3Crect x='56' y='0' width='8' height='8' fill='%236068a0' fill-opacity='1'/%3E%3Crect x='64' y='0' width='8' height='8' fill='%236b86d6' fill-opacity='1'/%3E%3Crect x='72' y='0' width='8' height='8' fill='%235f7ad2' fill-opacity='1'/%3E%3Crect x='80' y='0' width='8' height='8' fill='%236f6cb6' fill-opacity='1'/%3E%3Crect x='88' y='0' width='8' height='8' fill='%236068a0' fill-opacity='1'/%3E%3Crect x='0' y='8' width='8' height='8' fill='%23565b86' fill-opacity='1'/%3E%3Crect x='8' y='8' width='8' height='8' fill='%237a6ab8' fill-opacity='1'/%3E%3Crect x='16' y='8' width='8' height='8' fill='%236b86d6' fill-opacity='1'/%3E%3Crect x='24' y='8' width='8' height='8' fill='%236f6cb6' fill-opacity='1'/%3E%3Crect x='32' y='8' width='8' height='8' fill='%23565b86' fill-opacity='1'/%3E%3Crect x='40' y='8' width='8' height='8' fill='%236068a0' fill-opacity='1'/%3E%3Crect x='48' y='8' width='8' height='8' fill='%23565b86' fill-opacity='1'/%3E%3Crect x='56' y='8' width='8' height='8' fill='%23565b86' fill-opacity='1'/%3E%3Crect x='64' y='8' width='8' height='8' fill='%237f73c6' fill-opacity='1'/%3E%3Crect x='72' y='8' width='8' height='8' fill='%237f73c6' fill-opacity='1'/%3E%3Crect x='80' y='8' width='8' height='8' fill='%23565b86' fill-opacity='1'/%3E%3Crect x='88' y='8' width='8' height='8' fill='%236b86d6' fill-opacity='1'/%3E%3Crect x='0' y='16' width='8' height='8' fill='%234c5694' fill-opacity='1'/%3E%3Crect x='8' y='16' width='8' height='8' fill='%236b86d6' fill-opacity='1'/%3E%3Crect x='16' y='16' width='8' height='8' fill='%237f73c6' fill-opacity='1'/%3E%3Crect x='24' y='16' width='8' height='8' fill='%237f73c6' fill-opacity='1'/%3E%3Crect x='32' y='16' width='8' height='8' fill='%235f7ad2' fill-opacity='1'/%3E%3Crect x='40' y='16' width='8' height='8' fill='%236b86d6' fill-opacity='1'/%3E%3Crect x='48' y='16' width='8' height='8' fill='%23565b86' fill-opacity='1'/%3E%3Crect x='56' y='16' width='8' height='8' fill='%236068a0' fill-opacity='1'/%3E%3Crect x='64' y='16' width='8' height='8' fill='%236b86d6' fill-opacity='1'/%3E%3Crect x='72' y='16' width='8' height='8' fill='%235f7ad2' fill-opacity='1'/%3E%3Crect x='80' y='16' width='8' height='8' fill='%237a6ab8' fill-opacity='1'/%3E%3Crect x='88' y='16' width='8' height='8' fill='%236068a0' fill-opacity='1'/%3E%3Crect x='0' y='24' width='8' height='8' fill='%235f7ad2' fill-opacity='1'/%3E%3Crect x='8' y='24' width='8' height='8' fill='%234c5694' fill-opacity='1'/%3E%3Crect x='16' y='24' width='8' height='8' fill='%237f73c6' fill-opacity='1'/%3E%3Crect x='24' y='24' width='8' height='8' fill='%235f7ad2' fill-opacity='1'/%3E%3Crect x='32' y='24' width='8' height='8' fill='%23565b86' fill-opacity='1'/%3E%3Crect x='40' y='24' width='8' height='8' fill='%236068a0' fill-opacity='1'/%3E%3Crect x='48' y='24' width='8' height='8' fill='%236068a0' fill-opacity='1'/%3E%3Crect x='56' y='24' width='8' height='8' fill='%237a6ab8' fill-opacity='1'/%3E%3Crect x='64' y='24' width='8' height='8' fill='%236068a0' fill-opacity='1'/%3E%3Crect x='72' y='24' width='8' height='8' fill='%235f7ad2' fill-opacity='1'/%3E%3Crect x='80' y='24' width='8' height='8' fill='%237a6ab8' fill-opacity='1'/%3E%3Crect x='88' y='24' width='8' height='8' fill='%236068a0' fill-opacity='1'/%3E%3C/svg%3E"),url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='32' shape-rendering='crispEdges'%3E%3Crect x='0' y='0' width='8' height='8' fill='%23565b86' fill-opacity='.55'/%3E%3Crect x='8' y='0' width='8' height='8' fill='%23565b86' fill-opacity='.55'/%3E%3Crect x='16' y='0' width='8' height='8' fill='%237f73c6' fill-opacity='.55'/%3E%3Crect x='24' y='0' width='8' height='8' fill='%237f73c6' fill-opacity='.55'/%3E%3Crect x='32' y='0' width='8' height='8' fill='%23565b86' fill-opacity='.55'/%3E%3Crect x='40' y='0' width='8' height='8' fill='%236b86d6' fill-opacity='.55'/%3E%3Crect x='48' y='0' width='8' height='8' fill='%237a6ab8' fill-opacity='.55'/%3E%3Crect x='56' y='0' width='8' height='8' fill='%237a6ab8' fill-opacity='.55'/%3E%3Crect x='0' y='8' width='8' height='8' fill='%237a6ab8' fill-opacity='.55'/%3E%3Crect x='8' y='8' width='8' height='8' fill='%236068a0' fill-opacity='.55'/%3E%3Crect x='16' y='8' width='8' height='8' fill='%237f73c6' fill-opacity='.55'/%3E%3Crect x='24' y='8' width='8' height='8' fill='%235f7ad2' fill-opacity='.55'/%3E%3Crect x='32' y='8' width='8' height='8' fill='%234c5694' fill-opacity='.55'/%3E%3Crect x='40' y='8' width='8' height='8' fill='%236068a0' fill-opacity='.55'/%3E%3Crect x='48' y='8' width='8' height='8' fill='%235f7ad2' fill-opacity='.55'/%3E%3Crect x='56' y='8' width='8' height='8' fill='%234c5694' fill-opacity='.55'/%3E%3Crect x='0' y='16' width='8' height='8' fill='%23565b86' fill-opacity='.55'/%3E%3Crect x='8' y='16' width='8' height='8' fill='%237a6ab8' fill-opacity='.55'/%3E%3Crect x='16' y='16' width='8' height='8' fill='%236068a0' fill-opacity='.55'/%3E%3Crect x='24' y='16' width='8' height='8' fill='%236f6cb6' fill-opacity='.55'/%3E%3Crect x='32' y='16' width='8' height='8' fill='%237f73c6' fill-opacity='.55'/%3E%3Crect x='40' y='16' width='8' height='8' fill='%236068a0' fill-opacity='.55'/%3E%3Crect x='48' y='16' width='8' height='8' fill='%23565b86' fill-opacity='.55'/%3E%3Crect x='56' y='16' width='8' height='8' fill='%23565b86' fill-opacity='.55'/%3E%3Crect x='0' y='24' width='8' height='8' fill='%236b86d6' fill-opacity='.55'/%3E%3Crect x='8' y='24' width='8' height='8' fill='%236b86d6' fill-opacity='.55'/%3E%3Crect x='16' y='24' width='8' height='8' fill='%236f6cb6' fill-opacity='.55'/%3E%3Crect x='24' y='24' width='8' height='8' fill='%237f73c6' fill-opacity='.55'/%3E%3Crect x='32' y='24' width='8' height='8' fill='%236b86d6' fill-opacity='.55'/%3E%3Crect x='40' y='24' width='8' height='8' fill='%237f73c6' fill-opacity='.55'/%3E%3Crect x='48' y='24' width='8' height='8' fill='%236f6cb6' fill-opacity='.55'/%3E%3Crect x='56' y='24' width='8' height='8' fill='%237a6ab8' fill-opacity='.55'/%3E%3C/svg%3E");background-size:96px 32px,64px 32px;background-position:0 0,0 0;animation:pm-pixtext 1.3s steps(12) infinite}
.spoiler-text.revealing{animation:pm-pixtext .6s steps(6) infinite,fadebg .6s ease forwards}
@keyframes pm-pixtext{0%{background-position:0 0,0 0}100%{background-position:-96px 0,64px -32px}}
@media (prefers-reduced-motion:reduce){.spoiler-text.hidden{animation:none}}

/* ---- Several files in one message ---- */
.files-multi{display:flex;flex-direction:column;gap:6px;align-items:flex-start;max-width:100%}
.media-grid{display:grid;gap:3px;width:320px;max-width:100%;grid-template-columns:repeat(2,1fr);border-radius:12px;overflow:hidden}
.media-grid.n3{grid-template-columns:repeat(2,1fr)}
.media-grid.n3 .media-tile:first-child{grid-column:span 2;aspect-ratio:2/1}
.media-grid.n5{grid-template-columns:repeat(3,1fr)}
.media-tile{position:relative;aspect-ratio:1/1;overflow:hidden;background:var(--glass-3);display:grid;place-items:center}
.media-tile>img{display:block;width:100%;height:100%;object-fit:cover;margin:0!important;border-radius:0!important;max-height:none!important;cursor:zoom-in}
.media-tile .clip-msg{width:100%!important;height:100%;max-width:none;margin:0;border-radius:0;aspect-ratio:auto!important}
.media-tile .clip-msg video{object-fit:cover}
.media-tile:hover .clip-tools,.media-tile:focus-within .clip-tools{opacity:1}
.spoiler-media>.media-grid{border-radius:12px}
/* Files waiting to be sent */
.attach-strip{display:flex;flex-direction:column;gap:8px;padding:2px 0}
.attach-list{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 6px;scrollbar-width:thin}
.attach-chip{position:relative;flex:none;width:76px;height:76px;border-radius:12px;overflow:hidden;background:var(--glass-3);border:1px solid var(--line);display:grid;place-items:center;color:var(--muted)}
.attach-chip>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.attach-chip .icon{width:24px;height:24px}
.attach-name{position:absolute;left:0;right:0;bottom:0;padding:10px 5px 3px;font-size:10px;line-height:1.2;color:#fff;background:linear-gradient(transparent,rgba(15,12,50,.72));text-align:left}
.attach-x{position:absolute;top:4px;right:4px;width:22px;height:22px;border-radius:50%;border:0;display:grid;place-items:center;color:#fff;background:rgba(15,12,50,.65);cursor:pointer;padding:0}
.attach-x:hover{background:rgba(15,12,50,.9)}
.attach-x .icon{width:13px;height:13px}

/* ---- Deleted messages turn to dust ---- */
.dust-slot{position:relative;overflow:visible;pointer-events:none;flex:none;width:100%;z-index:5}
.dust-layer{position:absolute}
.dust-tile{position:absolute;overflow:hidden;will-change:transform,opacity;pointer-events:none}

/* link previews */
.link-card{display:flex;flex-direction:column;width:320px;max-width:100%;margin-top:8px;border-radius:12px;overflow:hidden;background:var(--inset);border:1px solid rgba(120,110,200,.18);color:inherit;text-decoration:none;text-align:left;position:relative}
.link-card:hover{border-color:rgba(99,102,241,.45)}
.link-card .link-img{display:block;width:100%;height:auto;max-height:190px;aspect-ratio:1.91/1;object-fit:cover;background:rgba(120,110,200,.12)}
.link-card .link-img.img-loading{aspect-ratio:1.91/1;min-height:90px}
.link-body{display:flex;flex-direction:column;gap:2px;padding:8px 11px 10px;min-width:0}
.link-site{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:600;letter-spacing:.02em;text-transform:uppercase;opacity:.7;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.link-ico{width:16px;height:16px;border-radius:4px;object-fit:cover;flex:none}
.link-title{font-size:14px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.link-desc{font-size:12.5px;line-height:1.35;opacity:.8;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.bubble.me .link-card{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.28)}
.bubble.me .link-card:hover{border-color:rgba(255,255,255,.6)}
.link-card.in-composer{width:100%;flex-direction:row;align-items:stretch;margin:0 0 8px;background:var(--inset)}
.link-card.in-composer{max-width:520px}
.link-card.in-composer .link-img{flex:none;width:112px;height:auto;max-height:none;aspect-ratio:auto;align-self:stretch;min-height:72px}
.link-card.in-composer .link-body{justify-content:center}
.link-card.in-composer .link-x{position:absolute;top:6px;right:6px;background:var(--pop);box-shadow:0 1px 4px rgba(0,0,0,.18)}
.link-card.in-composer .link-body{padding-right:36px}

/* ===== 2.5: reactions, forwarding, search, mute, timers, status, saved messages ===== */
@keyframes pmshake{0%,100%{transform:translate(0,0)}10%{transform:translate(-9px,3px) rotate(-.5deg)}20%{transform:translate(8px,-4px) rotate(.5deg)}30%{transform:translate(-8px,-2px)}40%{transform:translate(7px,4px)}50%{transform:translate(-6px,2px) rotate(-.3deg)}60%{transform:translate(5px,-3px)}70%{transform:translate(-4px,2px)}80%{transform:translate(3px,-1px)}90%{transform:translate(-2px,1px)}}
.app.shake{animation:pmshake .7s cubic-bezier(.36,.07,.19,.97)}
@media (prefers-reduced-motion:reduce){.app.shake{animation:none}}
.nudge-pill .icon{color:#d97706}

/* reactions */
.menu .react-row{padding:4px 4px 6px;margin-bottom:4px;border-bottom:1px solid var(--line)}
.react-quick{display:flex;flex-wrap:wrap;gap:2px;max-width:290px}
.react-btn{width:36px;height:36px;border-radius:50%;border:0;background:transparent;font-size:21px;line-height:1;cursor:pointer;display:grid;place-items:center;transition:transform .1s,background .15s}
.react-btn:hover,.react-btn:focus-visible{background:var(--glass-3);transform:scale(1.18)}
.react-btn.on{background:var(--glass-3);box-shadow:inset 0 0 0 2px var(--indigo)}
.react-btn.more{font-size:16px;color:var(--muted)}
.reacts{display:flex;flex-wrap:wrap;gap:4px;margin:6px 0 2px;clear:both}
.react-chip{display:inline-flex;align-items:center;gap:4px;height:26px;padding:0 8px;border-radius:99px;border:1px solid var(--line-2);background:var(--pop);color:var(--text);cursor:pointer;font-size:13px;font-weight:700}
.react-chip:hover{border-color:var(--indigo)}
.react-chip.mine{background:rgba(99,102,241,.16);border-color:var(--indigo)}
.react-emoji{font-size:15px;line-height:1}.react-n{font-size:12px}
.bubble.me .react-chip{background:rgba(255,255,255,.92)}
.bubble.sticker .reacts,.bubble.jumbo .reacts{justify-content:flex-end}

/* forwarded, timers, unread */
.fwd-label{display:flex;align-items:center;gap:5px;font-size:12px;font-style:italic;opacity:.8;margin-bottom:3px}
.fwd-label .icon{width:13px;height:13px}
.bubble .meta .exp-mark{display:inline-flex;opacity:.85}
.unread-divider{display:flex;align-items:center;gap:10px;margin:10px 0 6px;color:var(--accent-text);font-size:12px;font-weight:800}
.unread-divider::before,.unread-divider::after{content:"";flex:1;height:1px;background:rgba(99,102,241,.4)}
.unread-divider span{padding:3px 12px;border-radius:99px;background:rgba(99,102,241,.14)}
.msgs-wrap{position:relative}
.jump-latest{position:absolute;right:16px;bottom:14px;z-index:5;width:42px;height:42px;border-radius:50%;border:1px solid var(--line-2);background:var(--pop);box-shadow:0 6px 18px rgba(70,60,150,.25);display:grid;place-items:center;cursor:pointer;color:var(--accent-text)}
.jump-latest:hover{background:var(--solid)}
.jump-latest .count{position:absolute;top:-8px;right:-4px}
.ttl-note{display:flex;align-items:center;gap:6px;padding:2px 6px}
.head-flag{margin-left:6px;color:var(--faint);font-weight:600}
.ttl-flag{display:inline-flex;align-items:center;gap:3px;font-size:12px;padding:1px 7px;border-radius:99px;background:var(--glass-2)}
.ttl-flag .icon{width:12px;height:12px}
.muted-mark{margin-left:5px;color:var(--faint);width:14px;height:14px}
.conv-item.muted-chat b{opacity:.8}
.draft-tag{color:#e11d48;font-weight:700}

/* search */
.search-bar{display:flex;align-items:center;gap:6px;padding:8px 10px;border-bottom:1px solid var(--line);background:var(--pop);flex-wrap:wrap}
.search-bar .input-icon{min-width:160px}
.search-bar .input{height:36px}
.search-bar .input-icon .icon{top:9px}
.search-count{min-width:62px;text-align:center;white-space:nowrap}
::highlight(pm-search){background:#fde68a;color:#1f1d3d}
.search-progress{display:flex;align-items:center;gap:10px;padding:8px 12px;border-radius:10px;background:var(--glass-2)}
.result-list{display:flex;flex-direction:column;gap:2px;max-height:52vh;overflow:auto}
.result-row{display:flex;align-items:center;gap:10px;padding:9px 10px;border:0;border-radius:10px;background:transparent;text-align:left;cursor:pointer}
.result-row:hover,.result-row:focus-visible{background:var(--glass-3)}
.result-text{color:var(--muted);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal}
.result-text mark{background:#fde68a;color:#1f1d3d;border-radius:3px;padding:0 1px}

/* pickers, radios, info */
.pick-list{display:flex;flex-direction:column;gap:2px;max-height:300px;overflow:auto}
.pick-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border:0;border-radius:10px;background:transparent;text-align:left;cursor:pointer}
.pick-row:hover:not([disabled]){background:var(--glass-2)}
.pick-row.on{background:var(--glass-3)}
.pick-row[disabled]{opacity:.45;cursor:not-allowed}
.pick-check{width:22px;height:22px;border-radius:50%;border:2px solid var(--line-2);display:grid;place-items:center;flex:none}
.pick-row.on .pick-check{background:var(--grad);border-color:transparent;color:#fff}
.pick-check .icon{width:14px;height:14px}
.fwd-preview{padding:8px 12px;border-radius:10px;background:var(--glass-2);border-left:3px solid var(--indigo)}
.radio-list{display:flex;flex-direction:column;gap:2px}
.radio-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;cursor:pointer}
.radio-row:hover{background:var(--glass-2)}
.radio-row input{accent-color:#6366f1;width:18px;height:18px;margin:0}
.info-msg{padding:8px 12px;border-radius:10px;background:var(--glass-2);border-left:3px solid var(--indigo)}
.info-grid{display:grid;grid-template-columns:auto 1fr;gap:6px 18px}
.info-person{display:flex;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--line)}
.info-times{display:flex;flex-direction:column;gap:2px;margin-top:2px}
.saved-avatar,.avatar.saved-avatar{background:linear-gradient(135deg,#f59e0b,#f97316)!important;color:#fff}
.saved-avatar .icon{width:20px;height:20px}
.avatar.bot-avatar{background:linear-gradient(135deg,#e3f0ff,#cfe4ff)!important;color:rgb(7,121,245)}
.avatar.bot-avatar .icon{width:58%;height:58%}
.avatar.sm.saved-avatar .icon{width:17px;height:17px}
.setting.vol input[type=range]{width:180px;accent-color:#6366f1}
.sound-picker{display:flex;flex-direction:column;gap:10px}

/* status */
.avatar .dot.away{background:#f59e0b}.avatar .dot.busy{background:#e11d48}
.mode-text.away{color:#d97706;font-weight:600}.mode-text.busy{color:#e11d48;font-weight:600}
.presence-box{display:flex;flex-direction:column;gap:10px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.mode-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:6px}
.mode-btn{display:flex;align-items:center;gap:8px;height:40px;padding:0 12px;border-radius:10px;border:1px solid var(--line);background:var(--glass-2);cursor:pointer;font-weight:600}
.mode-btn:hover{background:var(--glass-3)}
.mode-btn.on{border-color:var(--indigo);background:var(--glass-3);box-shadow:inset 0 0 0 1px var(--indigo)}
.mdot{width:11px;height:11px;border-radius:50%;background:#22c55e;flex:none}
.mode-away .mdot{background:#f59e0b}.mode-busy .mdot{background:#e11d48}.mode-invisible .mdot{background:#94a3b8;box-shadow:inset 0 0 0 2px #fff}
.react-btn.dim{opacity:.4}
/* 2.6 legal texts and cookie notice */
.legal-footer{margin-top:14px;line-height:1.9}
.legal-footer a{white-space:nowrap}
.terms-check{display:flex;gap:10px;align-items:flex-start;cursor:pointer}
.terms-check input{margin-top:3px;width:18px;height:18px;flex:none;accent-color:var(--indigo)}
.legal-tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.legal-tab{border:0;border-radius:999px;padding:6px 12px;background:var(--glass-3);cursor:pointer;font:inherit;font-size:13px;color:inherit}
.legal-tab.on{background:var(--indigo);color:#fff}
.legal-scroll{max-height:55vh;overflow:auto;padding-right:6px}
.legal-doc h3{font-family:Sora,Manrope,sans-serif;font-size:15px;margin:18px 0 4px}
.legal-doc p,.legal-doc li{font-size:14px;line-height:1.6}
.legal-doc ul{padding-left:1.2em;margin:6px 0}
.cookie-notice{position:fixed;left:50%;transform:translateX(-50%);bottom:18px;z-index:40;width:min(640px,calc(100vw - 24px));padding:14px 16px;display:flex;flex-direction:column;gap:10px;box-shadow:0 10px 40px rgba(60,50,150,.25)}
.cookie-ic{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;background:var(--glass-3);flex:none}
.cookie-actions{justify-content:flex-end;gap:8px}
/* 2.6 video call watermark: small, faint, top-left, never in the way of clicks */
.call-mark{position:absolute;top:14px;left:16px;z-index:2;display:flex;align-items:center;gap:7px;color:#fff;opacity:.5;pointer-events:none;user-select:none;font:600 13px/1 Sora,Manrope,sans-serif;letter-spacing:.02em;text-shadow:0 1px 6px rgba(0,0,0,.55)}
.call-mark img{width:20px;height:20px;border-radius:6px;filter:drop-shadow(0 1px 4px rgba(0,0,0,.45))}
.call-overlay.mini .call-mark span{display:none}
.call-overlay.mini .call-mark{top:8px;left:10px}
/* 2.6 full-screen calls: the call fills the whole window; buttons float over the picture and fade when idle */
.call-overlay.full{padding:0;background:#000;-webkit-backdrop-filter:none;backdrop-filter:none}
.call-overlay.full .call-card{width:100%;height:100%;border-radius:0;border:0;box-shadow:none}
.call-overlay.full .call-controls{position:absolute;left:0;right:0;bottom:0;z-index:3;padding:26px 18px 22px;background:linear-gradient(transparent,rgba(0,0,0,.6));transition:opacity .35s}
.call-overlay.full .call-local{bottom:104px;right:20px}
.call-overlay.full.idle .call-controls,.call-overlay.full.idle .call-status{opacity:0;pointer-events:none}
.call-overlay.full.idle{cursor:none}
.call-overlay.full .call-status{transition:opacity .35s}

/* Text size (Settings → Text size). --ts is 1 for normal, up to 2. */
.bubble{font-size:calc(15px*var(--ts,1))}
.bubble .meta{font-size:calc(11px*var(--ts,1))}
.bubble .quote{font-size:calc(13px*var(--ts,1))}
.bubble .quote b{font-size:calc(12px*var(--ts,1))}
.bubble.jumbo .text{font-size:calc(44px*var(--ts,1))}
.sender-name{font-size:calc(12.5px*var(--ts,1))}
.day,.event-pill{font-size:calc(12.5px*var(--ts,1))}
.composer textarea{font-size:calc(15px*var(--ts,1));line-height:1.45;min-height:calc(44px*var(--ts,1));max-height:calc(140px*var(--ts,1))}
.conv-item b{font-size:calc(15px*var(--ts,1))}
.conv-item .small{font-size:calc(13px*var(--ts,1))}
.textsize-pick{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}
.textsize-sample{display:flex;flex-direction:column;gap:8px;padding:12px;border-radius:var(--r-sm);background:var(--inset);border:1px solid var(--line)}
.textsize-sample .bubble{max-width:100%}
@media (max-width:700px){
  .ts-big .composer{flex-wrap:wrap;row-gap:8px}
  .ts-big .composer textarea{flex:1 0 100%;order:-1}
}

/* Signet branding */
.side-logo{display:block;flex:1;min-width:0;max-width:210px;height:34px;object-fit:contain;object-position:left center;user-select:none}
.brand-icon{width:72px;height:72px;border-radius:18px;box-shadow:0 12px 26px rgba(79,70,229,.35);user-select:none}
.ticks .seal-wrap{display:inline-flex;margin-left:3px;color:#fff}
.ticks .seal{width:15px;height:15px;display:block}
.bubble.sticker .seal-wrap,.bubble.jumbo .seal-wrap{color:#16a34a}

/* Sidebar brand: badge + live text (Manrope), "Studio" in the app's blue-to-purple gradient */
.brand-logo{display:flex;align-items:center;gap:9px;flex:1;min-width:0;height:40px;padding-left:2px;user-select:none}
.brand-logo img{width:32px;height:32px;flex:none;display:block}
.brand-name{font-family:"Manrope",system-ui,-apple-system,"Segoe UI",sans-serif;font-weight:800;font-size:19px;line-height:1;letter-spacing:-.3px;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-bottom:1px}
.brand-studio{font-weight:700;background:var(--grad);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent}
.brand-icon.lg{width:92px;height:92px;border-radius:23px}

/* Notice pills (nudges, calls): small delete button, shown on hover/focus and always on touch screens */
.pill-del{display:inline-grid;place-items:center;width:20px;height:20px;margin:-2px -6px -2px 0;border:0;border-radius:99px;background:transparent;color:var(--muted);cursor:pointer;opacity:0;transition:opacity .15s,background .15s}
.pill-del .icon{width:13px;height:13px;color:currentColor}
.event-row:hover .pill-del,.pill-del:focus-visible{opacity:.85}
.pill-del:hover{background:rgba(225,29,72,.12);color:#be123c;opacity:1}
@media (hover:none){.pill-del{opacity:.55}}
.msgs-wrap.on-dark .pill-del{color:#e0e7ff}

/* Animated backgrounds (chat background presets "a-*"). Only transform/opacity move, sizes use container units so the small previews match. */
.chat-bg .anim-layer,.anim-sw .anim-layer{position:absolute;inset:0;overflow:hidden;container-type:size;pointer-events:none}
.anim-sw{position:relative;overflow:hidden}
.anim-badge{position:absolute;top:3px;right:3px;width:16px;height:16px;border-radius:99px;display:grid;place-items:center;background:var(--pop);color:#6366f1;z-index:2}
.anim-badge .icon{width:10px;height:10px;color:currentColor}
.anim-badge.locked{background:#f59e0b;color:#fff}
.bg-premium-note{display:flex;flex-wrap:wrap;align-items:center;gap:8px 10px;margin:10px 0;padding:10px 12px;border-radius:12px;background:rgba(245,158,11,.12);border:1px solid rgba(245,158,11,.35);font-size:.9rem}
.bg-premium-note .icon{width:18px;height:18px;color:#d97706;flex:0 0 auto}
.bg-premium-note>span.grow{flex:1 1 200px;min-width:0}
.bg-premium-note .btn{flex:0 0 auto}
.bg-section{grid-column:1/-1;display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:6px;font-weight:700;font-size:13px;color:var(--ink,#0f172a)}
.bg-section .icon{width:15px;height:15px;color:#6366f1}
.bg-section small{font-weight:500;color:var(--muted);flex-basis:100%}
.anim-layer .an-i{position:absolute;display:block}
/* aurora */
.anim-aurora .an-i{width:85cqmax;height:85cqmax;border-radius:50%;filter:blur(10cqmin);animation:an-aurora var(--t) ease-in-out var(--d) infinite alternate;will-change:transform}
.anim-aurora .an-i:nth-child(1){left:-20%;top:-25%;background:radial-gradient(#a5b4fc,transparent 70%)}
.anim-aurora .an-i:nth-child(2){right:-25%;top:5%;background:radial-gradient(#e9d5ff,transparent 70%)}
.anim-aurora .an-i:nth-child(3){left:10%;bottom:-40%;background:radial-gradient(#93c5fd,transparent 70%)}
@keyframes an-aurora{from{transform:translate(-12cqw,8cqh) scale(.9)}to{transform:translate(16cqw,-14cqh) scale(1.15)}}
/* lava lamp */
.anim-lava .an-i{left:var(--x);top:100cqh;width:42cqmax;height:42cqmax;margin-left:-21cqmax;border-radius:50%;filter:blur(5cqmin);opacity:.85;animation:an-lava var(--t) ease-in-out var(--d) infinite;will-change:transform}
.anim-lava .an-i:nth-child(6n+1){background:#fdba74}.anim-lava .an-i:nth-child(6n+2){background:#f9a8d4}.anim-lava .an-i:nth-child(6n+3){background:#c4b5fd}
.anim-lava .an-i:nth-child(6n+4){background:#fcd34d}.anim-lava .an-i:nth-child(6n+5){background:#fda4af}.anim-lava .an-i:nth-child(6n){background:#a5b4fc}
@keyframes an-lava{0%{transform:translate(0,0) scale(1)}50%{transform:translate(7cqw,-125cqh) scale(1.3)}100%{transform:translate(-5cqw,-8cqh) scale(.9)}}
/* bubbles */
.anim-bubbles .an-i{left:var(--x);top:100cqh;width:calc(var(--s)*1cqmin);height:calc(var(--s)*1cqmin);border-radius:50%;border:1.5px solid rgba(255,255,255,.8);background:radial-gradient(circle at 30% 30%,rgba(255,255,255,.7),rgba(125,180,255,.16));animation:an-bubble var(--t) linear var(--d) infinite;will-change:transform}
@keyframes an-bubble{0%{transform:translate(0,0)}50%{transform:translate(3cqw,-62cqh)}100%{transform:translate(-2cqw,-130cqh)}}
/* drift */
.anim-drift{background:linear-gradient(120deg,#fde68a,#fbcfe8,#c7d2fe,#a5f3fc,#bbf7d0,#fde68a)!important;background-size:300% 300%;animation:an-drift 26s ease-in-out infinite}
@keyframes an-drift{0%,100%{background-position:0% 50%}50%{background-position:100% 50%}}
/* waves */
.anim-waves .an-i{left:0;width:200%;background-repeat:repeat-x;background-size:50% 100%;animation:an-wave var(--t) linear var(--d) infinite;will-change:transform}
.anim-waves .an-i:nth-child(1){bottom:0;height:42%;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath d='M0 50Q50 10 100 50T200 50T300 50T400 50V100H0Z' fill='%2393c5fd' fill-opacity='.45'/%3E%3C/svg%3E")}
.anim-waves .an-i:nth-child(2){bottom:6%;height:36%;animation-direction:reverse;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath d='M0 50Q50 90 100 50T200 50T300 50T400 50V100H0Z' fill='%23a5b4fc' fill-opacity='.4'/%3E%3C/svg%3E")}
.anim-waves .an-i:nth-child(3){bottom:12%;height:30%;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 100' preserveAspectRatio='none'%3E%3Cpath d='M0 50Q50 20 100 50T200 50T300 50T400 50V100H0Z' fill='%23c4b5fd' fill-opacity='.35'/%3E%3C/svg%3E")}
@keyframes an-wave{from{transform:translateX(0)}to{transform:translateX(-50%)}}
/* snow */
.anim-snow .an-i{left:var(--x);top:-4cqh;width:max(2px,calc(var(--s)*.13cqmin));height:max(2px,calc(var(--s)*.13cqmin));border-radius:50%;background:#fff;opacity:var(--o);animation:an-snow var(--t) linear var(--d) infinite;will-change:transform}
@keyframes an-snow{0%{transform:translate(0,0)}50%{transform:translate(4cqw,55cqh)}100%{transform:translate(-3cqw,112cqh)}}
/* stars */
.anim-stars .an-i:not(.sh){left:var(--x);top:var(--y);width:max(1.5px,calc(var(--s)*.12cqmin));height:max(1.5px,calc(var(--s)*.12cqmin));border-radius:50%;background:#fff;animation:an-twinkle var(--t) ease-in-out var(--d) infinite alternate}
@keyframes an-twinkle{from{opacity:.12;transform:scale(.7)}to{opacity:1;transform:scale(1.5)}}
.anim-stars .an-i.sh{left:var(--x);top:var(--y);width:14cqmin;height:1.5px;background:linear-gradient(90deg,transparent,#fff);opacity:0;rotate:-25deg;animation:an-shoot var(--t) ease-in var(--d) infinite}
@keyframes an-shoot{0%,90%{opacity:0;transform:translate(0,0)}92%{opacity:1}100%{opacity:0;transform:translate(-30cqw,14cqh)}}
/* fireflies */
.anim-fireflies .an-i{left:var(--x);top:var(--y);width:max(3px,calc(var(--s)*.14cqmin));height:max(3px,calc(var(--s)*.14cqmin));border-radius:50%;background:#fde68a;box-shadow:0 0 10px 3px rgba(253,230,138,.85);animation:an-fly var(--t) ease-in-out var(--d) infinite alternate,an-glow 3.2s ease-in-out var(--d) infinite;will-change:transform,opacity}
@keyframes an-fly{from{transform:translate(0,0)}to{transform:translate(calc(var(--dx)*1cqw),calc(var(--dy)*1cqh))}}
@keyframes an-glow{0%,100%{opacity:.15}50%{opacity:var(--o)}}
@media (prefers-reduced-motion:reduce){.anim-layer,.anim-layer .an-i{animation-play-state:paused!important}}

/* Choosing several messages / notices */
.sel-bar{gap:8px}
.sel-bar .sel-count{font-family:Sora,Manrope,sans-serif;font-size:15px}
.sel-bar .icon-btn.danger:not(:disabled){color:#e11d48}
.sel-bar .icon-btn:disabled{opacity:.35}
.sel-row{display:flex;align-items:center;gap:10px;padding:3px 6px;margin:0 -6px;border-radius:14px;cursor:pointer;transition:background .12s}
.sel-row:hover{background:rgba(99,102,241,.07)}
.sel-row.on{background:rgba(99,102,241,.14)}
.sel-row:focus-visible{outline:2px solid #6366f1;outline-offset:1px}
.sel-row>:not(.sel-check){flex:1;min-width:0;pointer-events:none}
.sel-row .msg-actions,.sel-row .pill-del{display:none}
.sel-check{flex:none;width:22px;height:22px;border-radius:99px;border:2px solid #a5b4fc;background:var(--pop);display:grid;place-items:center;color:#fff}
.sel-check .icon{width:14px;height:14px;color:#fff}
.sel-row.on .sel-check{background:linear-gradient(135deg,#3b82f6,#a855f7);border-color:transparent}

/* Choosing microphone / camera during a call */
.call-btn-group{position:relative;display:inline-flex}
.call-chev{position:absolute;right:-6px;top:-6px;width:22px;height:22px;border-radius:99px;border:1px solid rgba(255,255,255,.5);background:rgba(30,27,75,.75);color:#fff;display:grid;place-items:center;cursor:pointer;padding:0;opacity:.9}
.call-chev:hover{background:rgba(99,102,241,.95)}
.call-chev .icon{width:13px;height:13px;color:#fff}
.dev-menu{position:fixed;z-index:6;width:260px;max-height:50vh;overflow:auto;padding:6px;border-radius:14px;background:var(--pop);display:flex;flex-direction:column;color:var(--ink,#0f172a)}
.dev-menu .dev-title{padding:4px 10px 2px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;font-size:11px}
.dev-menu .menu-item.on{background:rgba(99,102,241,.12);font-weight:700}
.dev-menu .menu-item .ellipsis{min-width:0;text-align:left}

/* 3.4: user guide */
.guide-wrap{display:flex;flex-direction:column;gap:10px;min-height:0}
.guide-scroll{max-height:62vh;overflow:auto;padding:4px 8px 4px 4px}
.guide-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:10px;margin-top:10px}
.guide-card{display:flex;gap:12px;align-items:flex-start;text-align:left;border:0;border-radius:14px;padding:12px 14px;background:var(--glass-3);cursor:pointer;font:inherit;color:inherit;width:100%}
.guide-card:hover,.guide-card:focus-visible{background:var(--glass-2,var(--glass-3));outline:2px solid var(--indigo);outline-offset:0}
.guide-card>svg{flex:none;width:22px;height:22px;color:var(--indigo);margin-top:2px}
.guide-card.start{margin-top:10px;background:rgba(99,102,241,.12)}
.guide-card.start+.guide-card.start{margin-top:8px}
.guide-h{font-family:Sora,Manrope,sans-serif;font-size:16px;margin:20px 0 4px}
.guide-p,.guide-list li,.guide-steps li{font-size:14.5px;line-height:1.65}
.guide-p{margin:6px 0}
.guide-list{padding-left:1.3em;margin:6px 0}
.guide-list li{margin:4px 0}
.guide-steps{list-style:none;counter-reset:g;padding:0;margin:8px 0}
.guide-steps li{counter-increment:g;display:flex;gap:12px;margin:8px 0;align-items:flex-start}
.guide-steps li::before{content:counter(g);flex:none;width:26px;height:26px;border-radius:50%;background:var(--indigo);color:#fff;font-weight:700;font-size:13px;display:grid;place-items:center;margin-top:1px}
.guide-note{display:flex;gap:10px;border-radius:12px;padding:10px 12px;margin:12px 0;font-size:14px;line-height:1.55}
.guide-note>svg{flex:none;width:18px;height:18px;margin-top:2px}
.guide-note.tip{background:rgba(16,185,129,.12)}
.guide-note.tip>svg{color:#059669}
.guide-note.warn{background:rgba(245,158,11,.16)}
.guide-note.warn>svg{color:#b45309}
.guide-see{margin-top:18px;display:flex;flex-direction:column;gap:6px}
.guide-nav{margin-top:20px;padding-top:12px;border-top:1px solid var(--line,rgba(0,0,0,.08));gap:8px}
.guide-terms dt{font-weight:700;margin-top:10px}
.guide-terms dd{margin:2px 0 0;font-size:14.5px;line-height:1.55}
.guide-link{margin-top:14px}
.guide-link svg{width:14px;height:14px;vertical-align:-2px}

/* 3.6: verified ticks */
.vtick{display:inline-flex;vertical-align:-0.2em;margin-left:5px;cursor:pointer;border-radius:50%;line-height:0;flex:none}
.vtick:focus-visible{outline:2px solid var(--indigo);outline-offset:2px}
.vtick-svg{display:block}
.pane-head h3 .vtick,.info-profile h2 .vtick{vertical-align:-0.15em}

.avatar .icon.skull{width:52%;height:52%}
.report-card{gap:10px}
.report-evidence{display:flex;flex-direction:column;gap:6px;padding:10px;border-radius:var(--r-sm);background:var(--glass-3);border:1px solid var(--line)}
.report-evidence .hit{border-left:3px solid #e11d48;padding-left:8px}

/* Slash-command and @mention pop-up above the message box: light panel, dark readable text */
.slash-menu{margin:0 10px 6px;border-radius:12px;border:1px solid var(--line-2);overflow:hidden;background:var(--pop);color:var(--text);box-shadow:var(--shadow)}
.slash-menu button{color:var(--text)}
.slash-menu button:hover,.slash-menu button:focus-visible{background:var(--glass-3)}
.slash-menu .muted{color:var(--muted)}

/* ---- service status (admin) */
.st-banner{display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:12px;color:#fff;background:#16a34a}
.st-banner.slow{background:#d97706}.st-banner.down{background:#dc2626}
.st-banner .st-dot{background:var(--solid)}
.st-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:#16a34a;flex:none}
.st-dot.slow{background:#d97706}.st-dot.down{background:#dc2626}
.st-head{display:flex;align-items:center;gap:10px;margin-bottom:4px}
.st-word{font-size:13px;font-weight:700;color:#16a34a}.st-word.slow{color:#d97706}.st-word.down{color:#dc2626}
.st-bar{display:grid;grid-template-columns:repeat(48,1fr);gap:2px;height:30px;margin-top:10px}
.st-bar i{border-radius:2px;background:#16a34a}.st-bar i.slow{background:#d97706}.st-bar i.down{background:#dc2626}.st-bar i.none{background:rgba(127,127,127,.25)}
.st-axis{display:flex;justify-content:space-between;margin-top:3px}
.st-up{display:flex;flex-wrap:wrap;gap:6px 22px;margin-top:8px}
.st-info{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px 18px}
.st-info div{display:flex;flex-direction:column}
.st-reason{font-weight:600;margin:2px 0 4px;color:#d97706}.st-reason.down{color:#dc2626}

/* ---- Server telemetry ---- */
.tl-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.tl-controls h3{margin:0}
.tl-ranges{display:flex;gap:6px;flex-wrap:wrap}
.tl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:14px;align-items:start}
.tl-card.wide{grid-column:1/-1}
.tl-title{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.tl-title h3{margin:0;font-size:15px}
.grow{flex:1}
.tl-big{font-size:28px;font-weight:700;line-height:1.1;margin:4px 0 8px}
.tl-big.ok,.tl-kv b.ok{color:#16a34a}.tl-big.slow,.tl-kv b.slow{color:#d97706}.tl-big.down,.tl-kv b.down{color:#dc2626}
.tl-meter{height:8px;border-radius:99px;background:rgba(127,127,127,.2);overflow:hidden;margin:6px 0;display:flex}
.tl-meter>i{display:block;height:100%;background:#4f7cff;transition:width .4s}
.tl-meter>i.slow{background:#f59e0b}.tl-meter>i.down{background:#dc2626}.tl-meter>i.ok{background:#16a34a}
.tl-spark{width:100%;height:28px;display:block;margin:6px 0}
.tl-kvs{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px;margin-top:10px}
.tl-kv{display:flex;flex-direction:column;min-width:0}
.tl-kv b{font-size:14px;overflow-wrap:anywhere}
.tl-sub{margin-top:14px;padding-top:10px;border-top:1px solid rgba(127,127,127,.25)}
.tl-row{display:flex;align-items:center;gap:8px}
.tl-table{margin-top:12px;display:flex;flex-direction:column;gap:4px}
.tl-cores{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:4px 12px;margin-top:10px}
.tl-cores>div{display:grid;grid-template-columns:48px 1fr 44px;align-items:center;gap:6px}
.tl-speeds{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.tl-clock{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;text-align:center;margin-bottom:8px}
.tl-clock b{display:block;font-size:26px;font-variant-numeric:tabular-nums}
.tl-disk{margin-bottom:10px}
.tl-charts{display:grid;grid-template-columns:repeat(auto-fill,minmax(420px,1fr));gap:14px}
.tl-svg{width:100%;height:auto;display:block}
.tl-gl{stroke:rgba(127,127,127,.25);stroke-width:1}
.tl-ax{fill:currentColor;opacity:.6;font-size:10px}
.tl-hover{stroke:currentColor;opacity:.4}
.tl-legend{display:inline-flex;align-items:center;gap:5px;margin-left:10px}
.tl-legend i{width:10px;height:10px;border-radius:3px;display:inline-block}
.tl-tip{min-height:18px;opacity:.8}
@media(max-width:560px){.tl-grid,.tl-charts{grid-template-columns:1fr}.tl-clock b{font-size:20px}.tl-kvs{grid-template-columns:1fr 1fr}}

/* Admin → Users filters */
.filter-chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.chip-btn{display:inline-flex;align-items:center;gap:6px;padding:5px 12px;border-radius:99px;border:1px solid var(--line);background:var(--glass);color:inherit;font:inherit;font-size:13px;cursor:pointer}
.chip-btn:hover{background:var(--glass-3)}
.chip-btn[aria-pressed=true]{background:linear-gradient(135deg,#4f7cff,#8b5cf6);border-color:transparent;color:#fff}
.chip-btn .n{opacity:.7;font-size:12px}
.sticker-grid.manage .sticker-name{display:block;width:100%;margin-top:4px;padding:2px 4px;border:0;background:transparent;color:var(--muted);font:inherit;font-size:12px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;border-radius:6px}
.sticker-grid.manage .sticker-name:hover{background:var(--glass-3);color:inherit}

/* Emoji / sticker / GIF panel docked at the side of the chat */
.picker-top{display:flex;align-items:center;gap:4px;margin:10px 10px 0}
.picker-top .picker-tabs{margin:0;flex:1;min-width:0}
.picker.docked{left:auto;right:0;top:0;bottom:0;width:360px;height:auto;max-width:100%;border-radius:0;border:0;border-left:1px solid var(--line);box-shadow:none;z-index:25;animation:slidein .18s ease-out}
.pane:has(> .picker.docked){padding-right:360px}
@media (max-width:899px){.pane:has(> .picker.docked){padding-right:0}}
.picker.docked .picker-tabs .tab:not(.active) span{display:none}

/* Icons tab (Lucide) */
.icon-opts{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:space-between}
.icon-colors{display:flex;gap:5px;align-items:center;flex-wrap:wrap}
.swatch{width:20px;height:20px;border-radius:50%;border:2px solid transparent;box-shadow:0 0 0 1px var(--line);padding:0;cursor:pointer;position:relative;display:inline-block}
.swatch[aria-pressed=true],.swatch.custom.on{box-shadow:0 0 0 2px var(--indigo,#6366f1)}
.swatch.auto{background:linear-gradient(135deg,#111 50%,#fff 50%)}
.swatch.custom{background:conic-gradient(red,yellow,lime,aqua,blue,magenta,red);overflow:hidden}
.swatch.custom input{position:absolute;inset:-6px;opacity:0;cursor:pointer;width:40px;height:40px}
.icon-size{width:auto;padding:2px}
.icon-size .tab{height:28px;padding:0 10px;font-size:12.5px}
.picker-label{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin:6px 2px 4px}
.icon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:4px;margin-bottom:6px}
.icon-cell{aspect-ratio:1;border:0;border-radius:10px;background:transparent;display:grid;place-items:center;cursor:pointer;color:var(--text,inherit)}
.icon-cell:hover,.icon-cell:focus-visible{background:var(--glass-3)}
.icon-cell .icon{width:24px;height:24px}
.icon-hint{margin:8px 2px 2px}
.icon-sticker{width:96px;height:96px;display:block;margin:2px 4px}
.icon-inline{width:1.25em;height:1.25em;vertical-align:-.25em;display:inline-block}
.icon-missing{opacity:.7}
.bubble img.sticker-img,.bubble video.sticker-img{max-height:160px}

/* 4.5.0 privacy: app lock, devices, hidden chats */
.lockscreen{position:fixed;inset:0;z-index:100000;display:flex;align-items:center;justify-content:center;padding:20px;background-color:#f4f2fb;background-image:radial-gradient(circle at 30% 20%,rgba(99,102,241,.18),transparent 55%),radial-gradient(circle at 80% 80%,rgba(168,85,247,.16),transparent 50%)}
.lock-card{width:100%;max-width:320px;display:flex;flex-direction:column;gap:12px;align-items:stretch;text-align:center}
.lock-card h2{margin:0}
.lock-card p{margin:0}
.lock-icon{width:64px;height:64px;margin:0 auto;border-radius:20px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#4f7cff,#8b5cf6);color:#fff}
.lock-icon .icon{width:30px;height:30px}
.lock-input{text-align:center;font-size:20px;letter-spacing:4px}
.lock-err{color:#e11d48;font-size:13px}
body.pm-locked #root>:not(.lockscreen){display:none!important}
.stack{display:flex;flex-direction:column;gap:10px}
.switch-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.switch-row:first-of-type{border-top:0}
.btn-link{background:none;border:0;color:var(--accent,#4f46e5);cursor:pointer;text-decoration:underline;padding:4px}
.banner.warn{background:rgba(245,158,11,.1);border-color:rgba(245,158,11,.4)}
.device-list{display:flex;flex-direction:column;gap:6px;margin:10px 0}
.device-row{display:flex;align-items:center;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--inset)}
.device-row.current{border-color:rgba(99,102,241,.45)}
.device-row>.icon{width:22px;height:22px;opacity:.7;flex:none}
.this-device{display:inline-block;margin-left:8px;padding:1px 8px;border-radius:99px;background:rgba(99,102,241,.15);font-size:11px;font-weight:600;vertical-align:middle}


/* 4.6.0 appearance: dark theme, high contrast, reduced motion */
html[data-theme=dark]{color-scheme:dark}
html[data-theme=dark]{
  --text:#ece9ff;--muted:rgba(236,233,255,.7);--faint:rgba(236,233,255,.5);
  --glass:rgba(28,26,52,.86);--glass-2:rgba(129,140,248,.13);--glass-3:rgba(129,140,248,.24);
  --card:rgba(36,33,66,.85);--inset:rgba(129,140,248,.1);--field:#1d1b38;
  --line:rgba(190,185,255,.15);--line-2:rgba(190,185,255,.3);
  --shadow:0 18px 50px rgba(0,0,0,.5);
  --pop:rgba(33,30,60,.98);--solid:#28254a;--accent-text:#a5b4fc;--page:#100e24;
  --wash:linear-gradient(135deg,#14122e 0%,#17122f 50%,#1c1236 100%);
  --danger:#fb7185;--ok:#4ade80;--warn:#fbbf24;--focus:#a5b4fc;
}
html[data-theme=dark] body::after{opacity:.55}
html[data-theme=dark] *{scrollbar-color:rgba(190,185,255,.3) transparent}
html[data-theme=dark] ::selection{background:rgba(129,140,248,.5)}
html[data-theme=dark] .bubble.me .react-chip,html[data-theme=dark] .bubble.me .fmt-color{color:#1f1d3d}
html[data-theme=dark] .checker,html[data-theme=dark] .checker-bg{background-color:#3a3660;background-image:linear-gradient(45deg,#2f2b52 25%,transparent 25%),linear-gradient(-45deg,#2f2b52 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#2f2b52 75%),linear-gradient(-45deg,transparent 75%,#2f2b52 75%)}
html[data-theme=dark] .bubble.them .msg-link,html[data-theme=dark] .msg-link{color:#c7d2fe}
html[data-theme=dark] .fmt-color.c-blue{color:#93c5fd}
html[data-theme=dark] .fmt-color.c-red{color:#fda4af}

/* high contrast */
html[data-contrast=more]{--text:#000;--muted:rgba(0,0,0,.86);--faint:rgba(0,0,0,.72);--line:rgba(0,0,0,.55);--line-2:rgba(0,0,0,.8);--accent-text:#1e1b8f;--focus:#000;--glass:#fff;--card:#fff;--pop:#fff;--field:#fff;--solid:#fff;--page:#fff;--wash:#fff;--glass-2:rgba(0,0,0,.08);--glass-3:rgba(0,0,0,.16)}
html[data-contrast=more][data-theme=dark]{--text:#fff;--muted:rgba(255,255,255,.92);--faint:rgba(255,255,255,.8);--line:rgba(255,255,255,.65);--line-2:rgba(255,255,255,.9);--accent-text:#c7d2fe;--focus:#fff;--glass:#000;--card:#0b0b0b;--pop:#000;--field:#000;--solid:#111;--page:#000;--wash:#000;--glass-2:rgba(255,255,255,.14);--glass-3:rgba(255,255,255,.26)}
html[data-contrast=more] body::after{display:none}
html[data-contrast=more] a,html[data-contrast=more] .msg-link{text-decoration:underline}
html[data-contrast=more] .input,html[data-contrast=more] .btn,html[data-contrast=more] .icon-btn,html[data-contrast=more] .bubble.them{border-width:2px}
html[data-contrast=more] :focus-visible{outline-width:3px}
html[data-contrast=more] .bubble.me{background:#1e1b8f;color:#fff}
html[data-contrast=more][data-theme=dark] .bubble.me{background:#4338ca}

/* reduced motion: the Appearance setting, or the device's own setting when left on Automatic */
html[data-motion=reduce] *,html[data-motion=reduce] *::before,html[data-motion=reduce] *::after{animation-duration:.001ms!important;animation-delay:0s!important;animation-iteration-count:1!important;transition-duration:.001ms!important;transition-delay:0s!important;scroll-behavior:auto!important}
html[data-motion=reduce] .spinner{animation-duration:1.4s!important;animation-iteration-count:infinite!important}
.seg button{display:inline-flex;align-items:center;justify-content:center;gap:6px}
input[type=range]{width:100%;accent-color:var(--indigo)}

/* chat folders */
.folder-bar{display:flex;gap:6px;overflow-x:auto;overflow-y:hidden;flex:none;padding:2px 2px 6px;scrollbar-width:none}
.folder-bar::-webkit-scrollbar{display:none}
.folder-tab{display:inline-flex;align-items:center;gap:6px;flex:none;padding:5px 12px;border-radius:99px;border:1px solid var(--line);background:var(--glass-2);color:var(--muted);font-weight:700;font-size:13px;cursor:pointer;white-space:nowrap}
.folder-tab.on{background:var(--grad);border-color:transparent;color:#fff}
.folder-count{min-width:18px;padding:0 5px;border-radius:99px;background:var(--indigo);color:#fff;font-size:11px;line-height:18px;text-align:center}
.folder-tab.on .folder-count{background:rgba(255,255,255,.3)}
.folder-dot{display:inline-block;width:10px;height:10px;border-radius:50%;flex:none}
.folder-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:12px;background:var(--inset)}
.folder-colors{display:flex;gap:8px}
.folder-swatch{width:26px;height:26px;border-radius:50%;border:2px solid transparent;cursor:pointer}
.folder-swatch.on{border-color:var(--text);box-shadow:0 0 0 2px var(--solid) inset}
/* 5.10.0: folder strip (left column or bottom row) and folder pictures */
.conv-area{flex:1;min-height:0;display:flex}
.side-banner{padding:0 12px 6px}
.side-banner:empty{display:none}
.conv-area .conv-list{flex:1;min-width:0}
.folder-strip{flex:none;display:flex;gap:2px;scrollbar-width:none}
.folder-strip::-webkit-scrollbar{display:none}
.folder-strip.pos-left{flex-direction:column;width:78px;overflow-y:auto;overflow-x:hidden;padding:4px 4px 8px;border-right:1px solid var(--line)}
.folder-strip.pos-bottom{overflow-x:auto;overflow-y:hidden;padding:6px 8px 4px;border-top:1px solid var(--line)}
.folder-item{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;padding:8px 4px 6px;border:0;background:transparent;border-radius:12px;color:var(--muted);cursor:pointer;font:inherit;font-size:11px;font-weight:700;min-width:0}
.pos-bottom .folder-item{flex:none;min-width:66px;padding:6px 8px 4px}
.folder-item:hover{background:var(--glass-2)}
.folder-item.on{color:var(--text)}
.folder-pic{position:relative;display:grid;place-items:center;width:42px;height:32px;border-radius:12px;transition:background .15s}
.folder-ico{width:22px;height:22px}
.folder-item.on .folder-pic{background:var(--grad)}
.folder-item.on .folder-ico{color:#fff!important}
.folder-pic .folder-count{position:absolute;top:-5px;right:-8px;box-shadow:0 0 0 2px var(--solid)}
.folder-name{max-width:70px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.folder-item.drop-here,.folder-tab.drop-here{outline:2px dashed var(--indigo);outline-offset:-2px;background:var(--glass-2)}
.folder-icons{display:grid;grid-template-columns:repeat(auto-fill,minmax(38px,1fr));gap:6px}
.folder-icon-opt{height:38px;border-radius:10px;border:1px solid var(--line);background:var(--inset);color:var(--muted);display:grid;place-items:center;cursor:pointer}
.folder-icon-opt.on{border-color:var(--indigo);box-shadow:0 0 0 2px var(--indigo) inset}
.folder-row .folder-ico{flex:none}
.folder-row.editing{border-color:var(--indigo)}
.folder-row .icon-btn[disabled]{opacity:.35;cursor:default}


/* translation */
.translated{margin-top:6px;padding:7px 10px;border-radius:10px;background:var(--glass-2);border-left:3px solid var(--indigo);font-size:.95em}
.bubble.me .translated{background:rgba(255,255,255,.18);border-left-color:#fff}
.translated-text{white-space:pre-wrap;word-break:break-word}
.translated-foot{display:flex;align-items:center;gap:5px;margin-top:4px;opacity:.8}
.translated-foot .icon{width:13px;height:13px}
.bubble.me .translated-foot .link-btn{color:#fff}

/* keyboard shortcuts sheet */
.shortcuts{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px 28px}
.shortcuts h4{margin:0 0 6px;font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.shortcut-row{display:flex;align-items:center;gap:12px;padding:6px 0;border-top:1px solid var(--line);font-size:14px}
.shortcut-row .keys{display:flex;align-items:center;gap:4px;min-width:130px;flex:none}
.shortcut-row .plus{opacity:.5;font-size:12px}
kbd{display:inline-block;min-width:24px;padding:2px 7px;border-radius:7px;border:1px solid var(--line-2);border-bottom-width:2px;background:var(--solid);font:600 12px var(--font);text-align:center;color:var(--text)}

/* file and link previews (4.6.0) */
.file-tile{flex:none;display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:color-mix(in srgb,var(--fk,#64748b) 16%,transparent);color:var(--fk,#64748b)}
.file-tile .icon{width:20px;height:20px}
.bubble.me .file-tile{background:rgba(255,255,255,.9)}
.link-media{position:relative;display:block}
.link-play{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none}
.link-play .icon{width:46px;height:46px;padding:12px 10px 12px 14px;border-radius:50%;background:rgba(15,12,50,.62);color:#fff;fill:#fff;box-shadow:0 4px 14px rgba(0,0,0,.35)}
.link-site .link-out{width:12px;height:12px;flex:none;opacity:.6}
.link-site .link-ico{width:14px;height:14px;flex:none;border-radius:3px}

/* 4.7.0: topics, slow mode, usage reports */
.t0{--tc:#6366f1}.t1{--tc:#3b82f6}.t2{--tc:#0ea5e9}.t3{--tc:#10b981}.t4{--tc:#f59e0b}.t5{--tc:#f97316}.t6{--tc:#ef4444}.t7{--tc:#a855f7}
.topic-bar{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:6px 12px;border-bottom:1px solid var(--line);background:var(--glass)}
.topic-chips{display:flex;gap:6px;overflow-x:auto;flex:1;min-width:0;padding:2px 0;scrollbar-width:thin}
.topic-chip{flex:none;display:inline-flex;align-items:center;gap:4px;border:1px solid var(--line-2);background:var(--field);color:var(--text);border-radius:999px;padding:4px 12px;font:inherit;font-size:.85rem;cursor:pointer;white-space:nowrap}
.topic-chip[class*=" t"]::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--tc);flex:none}
.topic-chip.on[class*=" t"]::before{box-shadow:0 0 0 2px rgba(255,255,255,.7)}
.topic-chip .icon{width:12px;height:12px}
.topic-chip.on{background:var(--indigo);border-color:var(--indigo);color:#fff}
.topic-chip:focus-visible,.topic-tag:focus-visible,.usage-head:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.topic-note{flex-basis:100%}
.topic-tag-row{display:flex;justify-content:center;margin:8px 0 2px}
.topic-tag{border:0;border-radius:999px;padding:2px 10px;font:inherit;font-size:.75rem;font-weight:600;color:var(--tc,#6366f1);background:var(--glass-2);cursor:pointer}
.topic-dot{display:inline-block;width:10px;height:10px;border-radius:50%;background:var(--tc,#6366f1)}
.topic-swatch{width:26px;height:26px;border-radius:50%;border:2px solid transparent;background:var(--tc);cursor:pointer;padding:0}
.topic-swatch.on{border-color:var(--text);box-shadow:0 0 0 2px var(--solid) inset}
.topic-row{display:flex;align-items:center;gap:8px;padding:6px 0;flex-wrap:wrap}
.slow-hint{padding:2px 12px}
.usage-totals{display:flex;gap:24px;flex-wrap:wrap;margin-top:10px}
.usage-totals b{font-size:1.25rem}
.usage-user{padding:8px 0;border-bottom:1px solid var(--line)}
.usage-user:last-child{border-bottom:0}
.usage-head{display:flex;align-items:center;gap:10px;width:100%;background:none;border:0;padding:2px 0;color:var(--text);font:inherit;cursor:pointer}
.usage-bar{height:6px;border-radius:3px;background:var(--glass-3);overflow:hidden;margin-top:4px}
.usage-bar>div{height:100%;background:var(--indigo);border-radius:3px}
.usage-bar>div.hot{background:var(--danger)}
.usage-more{padding:8px 0 2px}
.usage-detail{margin-top:8px}
.usage-row{margin-top:8px}
.nowrap{white-space:nowrap}

/* ---- 5.0.0: group calls, call extras, editor ---- */
.gc-overlay .gc-card,.gc-overlay.state-starting .gc-card,.gc-overlay.state-ended .gc-card{width:min(1040px,100%);height:min(720px,calc(100vh - 32px));min-height:0}
.gc-head{padding:14px 56px 6px 18px;font-size:15px}
.gc-grid{flex:1;min-height:0;display:grid;gap:8px;padding:8px 12px 38px;grid-template-columns:1fr;grid-auto-rows:1fr}
.gc-grid.n2,.gc-grid.n3,.gc-grid.n4{grid-template-columns:repeat(2,1fr)}
.gc-grid.n5,.gc-grid.n6{grid-template-columns:repeat(3,1fr)}
.gc-grid.has-shared>.gc-tile:first-child{grid-column:1/-1;grid-row:span 2}
.gc-grid.has-shared.n2{grid-template-columns:1fr}
.gc-tile{position:relative;border-radius:14px;overflow:hidden;background:rgba(255,255,255,.08);display:grid;place-items:center;min-height:0}
.gc-tile video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:#000}
.gc-tile.has-video .gc-avatar{display:none}
.gc-tile.bad{outline:2px solid #fca5a5}
.gc-avatar .avatar.xl{width:84px;height:84px;font-size:28px}
.gc-name{position:absolute;left:8px;bottom:8px;display:flex;align-items:center;gap:5px;padding:3px 9px;border-radius:12px;background:rgba(0,0,0,.55);font-size:13px;z-index:2;max-width:calc(100% - 16px)}
.gc-name .icon{width:13px;height:13px}
.gc-controls{flex-wrap:wrap;gap:12px;padding:12px}
.gc-controls .call-btn{width:50px;height:50px}
.call-btn.on{background:#fff;color:#4c1d95}
.call-overlay.mini .gc-grid{padding:4px 6px 26px;gap:4px}
.call-overlay.mini .gc-head,.call-overlay.mini .gc-name{display:none}
.call-overlay.mini.gc-overlay .gc-card{width:340px;height:250px}
@media (max-width:640px){.gc-grid.n3,.gc-grid.n4,.gc-grid.n5,.gc-grid.n6{grid-template-columns:repeat(2,1fr)}.gc-controls .call-btn{width:44px;height:44px}}
.gcall-bar{display:flex;align-items:center;gap:10px;padding:8px 14px;background:rgba(16,185,129,.14);border-bottom:1px solid rgba(16,185,129,.35)}
.gcall-bar .icon{width:18px;height:18px;color:#059669}
.gcall-mark{color:#059669;display:inline-flex;margin-right:6px}
.gcall-mark .icon{width:15px;height:15px}
.cx-rec{position:absolute;top:44px;left:50%;transform:translateX(-50%);z-index:6;display:flex;align-items:center;gap:8px;padding:5px 14px;border-radius:16px;background:#be123c;color:#fff;font-size:13px;font-weight:600;box-shadow:0 4px 14px rgba(0,0,0,.35)}
.cx-dot{width:9px;height:9px;border-radius:50%;background:#fff;animation:cxblink 1.2s infinite}
@keyframes cxblink{50%{opacity:.25}}
.cx-src{position:absolute;top:50px;left:14px;z-index:6;display:flex;align-items:center;gap:6px;padding:3px 10px;border-radius:12px;background:rgba(0,0,0,.55);color:#fff;max-width:60%}
.cx-src .icon{width:14px;height:14px}
.cx-filebar{position:absolute;left:50%;transform:translateX(-50%);bottom:96px;z-index:6;display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:14px;width:min(460px,92%);color:#fff;background:rgba(18,14,56,.92);border:1px solid rgba(255,255,255,.22);box-shadow:0 8px 24px rgba(0,0,0,.45);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.cx-filebar .small{color:#fff;white-space:nowrap}
.cx-filebar .icon-btn{color:#fff;background:rgba(255,255,255,.16)}
.cx-filebar .icon-btn:hover{background:rgba(255,255,255,.3)}
.cx-filebar .icon{stroke:#fff}
.cx-filebar input[type=range]{accent-color:#c7d2fe}
.cx-src .cx-src-t{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cx-src .cx-fs{flex:none;display:grid;place-items:center;width:22px;height:22px;padding:0;border:0;border-radius:6px;background:rgba(255,255,255,.2);color:#fff;cursor:pointer}
.cx-src .cx-fs:hover{background:rgba(255,255,255,.35)}
.cx-src .cx-fs .icon{width:14px;height:14px}
.call-overlay.full .cx-filebar{bottom:116px}
.call-overlay:fullscreen.gc-overlay{padding:0;background:#000}
.call-overlay:fullscreen.gc-overlay .gc-card{width:100%;height:100%;max-width:none;max-height:none;border-radius:0;border:0}
.wb-overlay:fullscreen{background:#0f0c32;padding:12px}
.wb-overlay:fullscreen .wb-card{width:100%;max-width:none;height:100%}
.wb-overlay:fullscreen .wb-canvas{max-height:none;flex:1;min-height:0;aspect-ratio:auto;object-fit:contain}
.cx-filebar input[type=range]{flex:1}
.wb-overlay{position:fixed;inset:0;z-index:95;display:grid;place-items:center;padding:12px;background:rgba(15,12,50,.6)}
.wb-card{width:min(1100px,100%);max-height:100%;display:flex;flex-direction:column;border-radius:16px;overflow:hidden;background:var(--panel,#fff);color:var(--text,#111)}
.wb-bar{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 12px}
.wb-colors{display:inline-flex;gap:6px}
.wb-color{width:24px;height:24px;border-radius:50%;border:2px solid rgba(0,0,0,.25);cursor:pointer;padding:0}
.wb-color.on{outline:2px solid #6366f1;outline-offset:2px}
.wb-canvas{width:100%;aspect-ratio:16/9;max-height:calc(100vh - 150px);touch-action:none;background:#fff;cursor:crosshair;display:block;margin:0 auto;object-fit:contain}
.ed-overlay{position:fixed;inset:0;z-index:96;display:grid;place-items:center;padding:12px;background:rgba(10,8,35,.72)}
.ed-card{width:min(980px,100%);max-height:calc(100vh - 24px);display:flex;flex-direction:column;border-radius:16px;overflow:hidden;background:var(--panel,#fff);color:var(--text,#111)}
.ed-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 12px;border-bottom:1px solid rgba(0,0,0,.08)}
.ed-stage{flex:1;min-height:0;display:grid;place-items:center;background:#111;padding:8px;overflow:auto}
.ed-stage canvas,.ed-stage video{max-width:100%;max-height:calc(100vh - 230px);touch-action:none}
.ed-stage canvas.draw{cursor:crosshair}
.ed-foot{display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 12px;border-top:1px solid rgba(0,0,0,.08)}
.ed-foot label{display:inline-flex;align-items:center;gap:6px;font-size:13px}
.attach-edit{right:30px}
.wb-bar input[type=range],.ed-foot input[type=range]{width:150px;flex:none}
.ed-bar{row-gap:6px}

/* 5.2.0 channels */
.channel-bar{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 14px 14px;border-top:1px solid var(--line)}
.channel-bar .btn{min-width:150px;justify-content:center}
.channel-wait{text-align:center}
.channel-cards{display:flex;flex-direction:column;gap:8px;padding:8px 16px}
.channel-list{display:flex;flex-direction:column;gap:8px;margin-top:10px;max-height:55vh;overflow:auto}
.channel-card{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px;border:1px solid var(--line);background:var(--glass,rgba(255,255,255,.5))}
.channel-about{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.ann-label{display:flex;align-items:center;gap:6px;font-size:12px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;margin-bottom:4px;opacity:.95}
.ann-label .icon{width:14px;height:14px}
.bubble.announcement{box-shadow:0 0 0 2px #f59e0b inset}
.icon-btn.active.announce-on{color:#f59e0b}

/* pinned chats */
.conv-item.dragging{opacity:.45}
.conv-item.drop-here{box-shadow:0 -2px 0 0 var(--accent, #6366f1) inset;background:var(--glass-2)}
.conv-pin{width:13px;height:13px;opacity:.7}
.conv-item[draggable=true]{cursor:grab}

/* Group call full screen */
.call-overlay.gc-overlay.full{padding:0;background:#000;-webkit-backdrop-filter:none;backdrop-filter:none}
.call-overlay.gc-overlay.full .gc-card{width:100%;height:100%;max-width:none;max-height:none;border-radius:0;border:0;box-shadow:none}
.call-overlay.gc-overlay.full .gc-grid{padding:8px 8px 104px}
.call-overlay.gc-overlay.full .gc-controls{position:absolute;left:0;right:0;bottom:0;z-index:3;padding:26px 18px 22px;background:linear-gradient(transparent,rgba(0,0,0,.6));transition:opacity .35s}
.call-overlay.gc-overlay.full .call-e2e{display:none}
.call-overlay.gc-overlay.full.idle .gc-controls{opacity:0;pointer-events:none}
.call-overlay.gc-overlay.full.idle{cursor:none}

/* What search engines and slow connections see before the app starts (React replaces it) */
.boot-splash{max-width:560px;margin:12vh auto;padding:0 24px;text-align:center;color:#2b2a4a}
.boot-splash img{border-radius:24px}
.boot-splash h1{font-family:Sora,system-ui,sans-serif;font-size:32px;margin:18px 0 8px}
.boot-splash p{font-size:17px;line-height:1.5}
.boot-splash .boot-links{font-size:14px;margin-top:18px}

/* settings: categories + search */
.set-page{display:flex;flex-direction:column;gap:10px}
.set-search{position:relative}
.set-search>svg,.set-search>.icon{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:18px;height:18px;opacity:.6;pointer-events:none}
.set-search input{width:100%;padding-left:38px}
.set-list{display:flex;flex-direction:column;gap:8px}
.set-row{display:flex;align-items:center;gap:14px;width:100%;text-align:left;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--card,transparent);color:inherit;font:inherit;cursor:pointer}
.set-row:hover,.set-row:focus-visible{border-color:#6366f1}
.set-row .grow{flex:1;min-width:0}
.set-row .chev{opacity:.5;width:18px;height:18px}
.set-ico{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;flex:none}
.set-ico.sm{width:32px;height:32px;border-radius:10px}
.set-ico svg{width:20px;height:20px}
.set-back{align-self:flex-start;display:inline-flex;gap:6px;align-items:center}
.set-item.flash>.card{outline:2px solid #6366f1;outline-offset:2px}

/* menus: dividers, notes, drill-in rows */
.menu-div{height:1px;margin:5px 6px;background:var(--line)}
.menu-note{padding:6px 12px;font-size:12.5px;color:var(--muted)}
.menu-label{flex:1;min-width:0}
.menu-hint{font-size:12.5px;font-weight:500;color:var(--muted);white-space:nowrap}
.menu-chev{width:16px;height:16px;opacity:.5;flex:none}
.menu-back{border-bottom:1px solid var(--line);border-radius:9px 9px 0 0;margin-bottom:4px}
.menu-item.on{background:rgba(99,102,241,.12);font-weight:700}

@media (max-width:520px){.attach-btn{display:none}}

/* in-app confirm box */
.backdrop.ask-back{z-index:100001}
.ask-box{max-width:420px}
.ask-box h2{font-size:18px;margin:0}
.ask-box .row{align-items:center;gap:12px}
.ask-ico{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;flex:none}
.ask-ico.danger{background:linear-gradient(135deg,#f43f5e,#be123c)}
.ask-ico svg{width:20px;height:20px}
.ask-text{margin:0;line-height:1.5;color:var(--muted-strong,inherit)}

/* Personal sticker packs */
.my-pack { margin-bottom: 10px; }
.my-pack-head { align-items: center; gap: 6px; padding: 2px 2px 4px; }
.my-pack-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
/* Bulk add and shared packs (5.7.5) */
.bulk-list{display:flex;flex-direction:column;gap:6px;max-height:240px;overflow:auto;padding:2px}
.bulk-row{display:flex;align-items:center;gap:8px}
.bulk-row .input{flex:1;min-width:0}
.checker.bulk-thumb{width:44px;height:44px;border-width:1px;border-radius:10px;padding:3px;cursor:default}
.pack-card{display:flex;align-items:center;gap:10px;min-width:220px;max-width:100%;padding:8px 10px;border-radius:12px;background:var(--inset);border:1px solid rgba(120,110,200,.18);color:inherit}
.bubble.me .pack-card{background:rgba(255,255,255,.16);border-color:rgba(255,255,255,.28)}
.pack-card-icon{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:rgba(99,102,241,.14);flex:none}
.bubble.me .pack-card-icon{background:rgba(255,255,255,.2)}

.my-pack{border-radius:12px;transition:background .12s,outline-color .12s;outline:2px dashed transparent;outline-offset:2px}
.my-pack.drop{outline-color:rgba(99,102,241,.7);background:rgba(99,102,241,.08)}
.drop-hint{margin:0 0 6px}

.react-img{width:22px;height:22px;object-fit:contain;display:block;margin:0}
.react-chip .react-img{width:18px;height:18px;margin:0}
.react-custom{margin-top:4px;padding-top:4px;border-top:1px solid var(--line)}
.react-custom-title{padding:0 6px 2px}
.react-custom-grid{max-height:150px;overflow-y:auto}
.menu{max-height:calc(100vh - 16px);overflow-y:auto}
/* 5.7.12: location sharing */
.loc{display:flex;flex-direction:column;gap:6px;min-width:0}
.loc-map{position:relative;overflow:hidden;border-radius:10px;background:var(--inset);border:1px solid var(--line)}
.loc-map img{max-width:none;margin:0;border-radius:0;pointer-events:none;user-select:none}
.loc-map.dim img{filter:grayscale(.85) opacity(.8)}
.loc-map-wait{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.loc-pin{position:absolute;left:50%;top:50%;width:28px;height:28px;margin:-28px 0 0 -14px;color:var(--danger);filter:drop-shadow(0 1px 2px rgba(0,0,0,.45))}
.loc-pin .icon{width:28px;height:28px;fill:currentColor;stroke:#fff}
.loc-acc{position:absolute;border-radius:50%;background:rgba(80,120,255,.16);border:1px solid rgba(80,120,255,.45);pointer-events:none}
.loc-open{position:absolute;right:6px;top:6px;display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border-radius:999px;background:var(--solid);color:var(--text);font-size:12px;text-decoration:none;box-shadow:var(--shadow)}
.loc-open .icon{width:13px;height:13px}
.loc-credit{position:absolute;left:0;bottom:0;padding:1px 6px;font-size:10px;background:rgba(255,255,255,.8);color:#333;border-top-right-radius:6px}
.loc-credit a{color:#333}
.loc-info{display:flex;flex-direction:column;gap:2px}
.loc-title{display:flex;align-items:center;gap:6px;font-weight:600}
.loc-title .icon{width:16px;height:16px}
.loc-stop{align-self:flex-start}
.loc-ended{flex-direction:row;align-items:center;gap:10px;padding:2px 0}
.loc-ended .icon{width:22px;height:22px;color:var(--muted)}
.loc-choice{padding:8px 10px;border:1px solid var(--line);border-radius:10px;cursor:pointer}
.loc-choice.on{border-color:var(--blue);background:var(--inset)}
/* 5.7.13: shared to-do lists */
.todo-card{display:flex;flex-direction:column;gap:6px;min-width:210px}
.todo-card-title{display:flex;align-items:center;gap:8px;font-weight:600;word-break:break-word}
.todo-card-title .icon{width:18px;height:18px;flex:none}
.todo-open{align-self:flex-start}
.todo-bar{height:6px;border-radius:999px;background:var(--line);overflow:hidden}
.todo-bar span{display:block;height:100%;background:var(--ok);transition:width .2s}
.todo-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.todo-row{display:flex;align-items:flex-start;gap:8px;padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--card)}
.todo-row.editing{display:block}
.todo-row.done .todo-text{text-decoration:line-through;color:var(--muted)}
.todo-row.dragging{opacity:.45}
.todo-row.over{border-color:var(--blue);box-shadow:0 0 0 2px var(--blue) inset}
.todo-grip{color:var(--faint);cursor:grab;padding-top:3px;flex:none}
.todo-check{width:20px;height:20px;margin-top:2px;flex:none;accent-color:var(--ok)}
.todo-body{min-width:0}
.todo-text{white-space:pre-wrap;word-break:break-word}
.todo-actions{display:flex;flex:none;gap:0}
.todo-photo{display:block;max-width:100%;max-height:220px;border-radius:8px;margin-top:6px;object-fit:contain}
.todo-photo-btn{display:block;padding:0;border:0;background:none;cursor:zoom-in}
.todo-sticker{display:block;width:96px;height:96px;object-fit:contain;margin-top:4px}
.todo-row .icon-sticker{width:56px;height:56px}
.todo-compose{display:flex;flex-direction:column;gap:6px}
.todo-input{resize:none;min-height:38px;max-height:120px}
.todo-draft-media{display:flex;align-items:flex-start;gap:6px}
.todo-draft-media .todo-photo{max-height:120px;margin-top:0}
.todo-draft-media .todo-sticker{width:72px;height:72px;margin-top:0}
.todo-picker{position:relative;height:min(380px,50vh)}
.todo-picker .picker{position:static;width:100%;height:100%}
@media (max-width:520px){.todo-actions{flex-wrap:wrap;max-width:76px;justify-content:flex-end}}
.todo-input{height:42px}

/* 5.7.25 Analytics */
.an-chart svg{width:100%;height:130px;display:block}
.an-axis{display:flex;justify-content:space-between;margin-top:4px}
.an-tiles{grid-template-columns:repeat(4,1fr);margin:0}
.an-rank{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.an-row{display:grid;grid-template-columns:minmax(90px,38%) 1fr auto;gap:10px;align-items:center}
.an-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.an-bar{height:8px;border-radius:99px;background:rgba(127,127,127,.2);overflow:hidden}
.an-bar>i{display:block;height:100%;background:#4f7cff}
.an-n{white-space:nowrap}
@media(max-width:560px){.an-tiles{grid-template-columns:1fr 1fr}.an-row{grid-template-columns:minmax(80px,45%) 1fr auto}}

.clip-msg video:fullscreen{object-fit:contain;background:#000}
.clip-msg video:-webkit-full-screen{object-fit:contain;background:#000}

/* animated .tgs stickers and emoji (drawn by the Lottie player) */
.tgs{display:inline-block;line-height:0;overflow:hidden}
.tgs canvas{width:100%!important;height:100%!important;display:block}
.sticker-cell .tgs,.emoji-cell .tgs{width:100%;height:100%}
.emoji-inline.tgs{vertical-align:-5px}
.bulk-thumb .tgs,.checker .tgs{width:100%;height:100%}

/* 5.10.0: several accounts on one device */
.me-chev{width:16px;height:16px;color:var(--muted);flex:none}
.acct-count{flex:none;min-width:18px;height:18px;border-radius:99px;background:var(--inset);border:1px solid var(--line);color:var(--muted);font-size:11px;font-weight:700;display:grid;place-items:center;padding:0 4px}
.add-acct-head{display:flex;align-items:center;gap:8px;padding:10px 12px;border-radius:12px;background:var(--inset);border:1px solid var(--line)}
.acct-list{display:flex;flex-direction:column;gap:6px;margin-top:4px}
.acct-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:12px;border:1px solid var(--line);background:var(--glass-2);color:var(--text);cursor:pointer;font:inherit;text-align:left}
.acct-row:hover{border-color:var(--indigo)}

/* 5.10.1: drag handle on the right edge of the chat list */
.sidebar{position:relative}
.side-resize{position:absolute;top:0;right:0;bottom:0;width:8px;cursor:col-resize;z-index:6;touch-action:none}
.side-resize::after{content:'';position:absolute;top:50%;right:2px;width:4px;height:44px;margin-top:-22px;border-radius:4px;background:var(--line);opacity:0;transition:opacity .15s}
.side-resize:hover::after,.side-resize:focus-visible::after,.side-resize.on::after{opacity:1;background:var(--indigo)}
.side-resize:focus-visible{outline:none}
body.resizing,body.resizing *{cursor:col-resize!important;user-select:none!important}
@media (max-width:820px){.side-resize{display:none}}

.badges{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;align-items:center;margin:14px 0 4px}
.badges>.badge,.badges>.badge:hover{display:inline-block;line-height:0;border-radius:8px;background:none;border:0;padding:0;text-decoration:none;box-shadow:none}
.badges>.badge img{display:block;height:44px;width:auto}
.badges>.badge:focus-visible{outline:3px solid var(--indigo);outline-offset:2px}
.badges>.badge .btn{line-height:1.2}

/* ==================== 6.0.0 redesign: frosted glass, pill buttons, soft colour blobs ====================
   Everything below overrides the older rules above. Values come from the approved mockups (Nov 30 2026). */
:root{
  --grad:linear-gradient(90deg,#0369a1 0%,#4f46e5 55%,#7c3aed 100%);
  --grad-d:linear-gradient(135deg,#0369a1 0%,#4f46e5 55%,#7c3aed 100%);
  --grad-me:linear-gradient(90deg,#1d4ed8 0%,#6d28d9 100%);
  --grad-av:linear-gradient(135deg,#0369a1,#7c3aed);
  --grad-end:linear-gradient(90deg,#b91c1c,#be185d);
  --glass:rgba(255,255,255,.58);--glass-line:rgba(255,255,255,.85);
  --glass-2:rgba(255,255,255,.7);--glass-3:rgba(255,255,255,.92);
  --card:rgba(255,255,255,.7);--card-line:rgba(255,255,255,.9);
  --pill:#fff;--pill-line:rgba(62,52,130,.13);
  --tint:#ede9fe;--tint-text:#4338ca;
  --pop:rgba(255,255,255,.82);
  --r:36px;--r-card:24px;--r-sm:20px;
  --shadow:0 18px 50px rgba(70,60,150,.14),inset 0 1px 0 rgba(255,255,255,.9);
  --shadow-btn:0 4px 12px rgba(70,60,150,.1);--glow:0 8px 22px rgba(79,70,229,.36);
  --blob1:#67e8f9;--blob2:#c4b5fd;--blob3:#f0abfc;--blob-o:1;
  --accent-text:#4338ca;--accent-icon:#4f46e5;
  --danger:#b91c1c;
}
html[data-theme=dark]{
  --glass:rgba(30,27,58,.62);--glass-line:rgba(190,185,255,.16);
  --glass-2:rgba(255,255,255,.07);--glass-3:rgba(255,255,255,.13);
  --card:rgba(255,255,255,.06);--card-line:rgba(190,185,255,.12);
  --pill:#2a2750;--pill-line:rgba(190,185,255,.18);
  --tint:rgba(129,140,248,.2);--tint-text:#c7d2fe;
  --pop:rgba(36,33,66,.9);
  --shadow:0 18px 50px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.06);
  --shadow-btn:0 4px 12px rgba(0,0,0,.25);
  --blob1:#0e7490;--blob2:#5b21b6;--blob3:#9d174d;--blob-o:.55;
  --accent-text:#c7d2fe;--accent-icon:#a5b4fc;--danger:#fb7185;
}
/* the wash and three soft colour blobs behind every screen */
body::after{inset:0;background:
  radial-gradient(closest-side,var(--blob1),transparent) -140px 52vh/520px 520px no-repeat,
  radial-gradient(closest-side,var(--blob2),transparent) calc(100% + 120px) -140px/600px 600px no-repeat,
  radial-gradient(closest-side,var(--blob3),transparent) 45vw 64vh/520px 420px no-repeat;
  opacity:calc(.5*var(--blob-o));filter:blur(40px)}
html[data-theme=dark] body::after{opacity:calc(.5*var(--blob-o))}

h1,h2,h3,h4{font-weight:700}
.glass{background:var(--glass);border:1px solid var(--glass-line);border-radius:var(--r);
  -webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px);box-shadow:var(--shadow)}

/* buttons: white pills, gradient pills with a glow, round icon buttons */
.btn{height:44px;padding:0 22px;border-radius:999px;border:1px solid var(--pill-line);background:var(--pill);color:var(--text);
  font-weight:700;font-size:14px;box-shadow:var(--shadow-btn)}
.btn:hover{background:var(--pill);border-color:rgba(79,70,229,.35)}
.btn .icon{color:var(--accent-icon)}
.btn-primary{background:var(--grad);color:#fff;border-color:transparent;box-shadow:var(--glow)}
.btn-primary:hover{background:var(--grad);filter:brightness(1.08);border-color:transparent}
.btn-primary .icon{color:#fff}
.btn-danger{background:var(--pill);border-color:var(--pill-line);color:var(--danger)}
.btn-danger .icon{color:var(--danger)}
.btn-danger:hover{background:var(--pill);border-color:rgba(185,28,28,.4)}
.btn-sm{height:38px;padding:0 16px;font-size:13px}
.btn-block{width:100%}
.icon-btn{width:44px;height:44px;border-radius:50%;color:var(--accent-icon)}
.icon-btn:hover{background:var(--glass-2);border-color:var(--pill-line)}
.icon-btn.active{background:var(--glass-3);border-color:var(--pill-line)}
.icon-btn.danger,.icon-btn.danger .icon{color:var(--danger)}
.icon-btn.sm{width:36px;height:36px}
/* round white buttons in headers, toolbars and dialogs (as in the mockups) */
.pane-head .icon-btn,.side-head .icon-btn,.rail .icon-btn,.side-foot .icon-btn,.modal-head .icon-btn,.composer>.icon-btn,.info-head .icon-btn,.ci-head .icon-btn,.round-btn{
  background:var(--pill);border:1px solid var(--pill-line);box-shadow:var(--shadow-btn);color:var(--accent-icon)}
.pane-head .icon-btn:hover,.side-head .icon-btn:hover,.rail .icon-btn:hover,.side-foot .icon-btn:hover,.composer>.icon-btn:hover,.round-btn:hover{border-color:rgba(79,70,229,.35);background:var(--pill)}
.pane-head .icon-btn.active,.side-head .icon-btn.active{background:var(--pill)}

/* fields: white pills */
.input,select.input{height:48px;padding:0 20px;border-radius:999px;border:1px solid var(--pill-line);background:var(--pill)}
textarea.input{border-radius:22px;padding:12px 18px}
.input:focus{border-color:rgba(79,70,229,.55);box-shadow:0 0 0 3px rgba(99,102,241,.18)}
.input-icon .icon{left:18px;top:15px;color:var(--accent-icon)}
.input-icon .input{padding-left:46px}
.field>span,.label{font-size:14px;font-weight:700;color:var(--text)}
select.input{appearance:none;-webkit-appearance:none;padding-right:44px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234f46e5' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 18px center;font-weight:600}
html[data-theme=dark] select.input{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a5b4fc' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")}

/* toggles: 52 x 30, gradient when on */
.toggle{width:52px;height:30px}
.toggle i{background:#cbd0e6;border:0}
html[data-theme=dark] .toggle i{background:rgba(190,185,255,.25)}
.toggle i::after{top:3px;left:3px;width:24px;height:24px;box-shadow:0 2px 6px rgba(0,0,0,.25)}
.toggle input:checked+i{background:var(--grad);box-shadow:0 4px 12px rgba(79,70,229,.35)}
.toggle input:checked+i::after{transform:translateX(22px)}

/* small pills (Admin, Demo, Open now...) */
.badge{height:26px;padding:0 12px;border:0;background:var(--tint);color:var(--tint-text);font-size:12px}
.badge.grad{background:var(--grad);color:#fff}
.count,.folder-count{background:linear-gradient(90deg,#4f46e5,#7c3aed)}
.avatar{background:var(--grad-av);font-weight:700}
.avatar .dot{width:13px;height:13px;border-color:var(--pill)}

/* white cards inside glass panels */
.card{border-radius:var(--r-card);background:var(--card);border:1px solid var(--card-line);padding:18px 20px}
.setting>div:first-child b,.setting>label>b{font-family:var(--head);font-size:16px}
.banner{border-radius:22px}

/* menus: glass, pill rows, indigo icons */
.menu{border-radius:30px;padding:10px;background:var(--pop);border:1px solid var(--glass-line);
  -webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px);box-shadow:var(--shadow);min-width:240px}
.menu-item{gap:14px;min-height:48px;padding:0 16px;border-radius:999px;font-size:15px;font-weight:600;color:var(--text)}
.menu-item .icon{width:20px;height:20px;color:var(--accent-icon)}
.menu-item:hover,.menu-item:focus-visible{background:var(--glass-3);box-shadow:0 4px 14px rgba(70,60,150,.1)}
.menu-item.on{background:var(--glass-3);box-shadow:0 4px 14px rgba(70,60,150,.1)}
.menu-item.danger,.menu-item.danger .icon{color:var(--danger)}
.menu-div{margin:6px 12px}
.menu-chev{opacity:.6;color:var(--muted)}
.menu-back{border-bottom:0;border-radius:999px;margin-bottom:2px;font-family:var(--head);font-weight:700}

/* dialogs */
.backdrop{background:rgba(40,36,90,.22);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.modal{border-radius:36px;padding:28px;background:var(--pop);border:1px solid var(--glass-line);box-shadow:var(--shadow)}
.modal h2{font-size:22px}
.toast{border-radius:999px;padding:12px 20px;background:#26234f}

/* pill tab rows (settings, admin, chat info) */
.tabs{gap:8px;padding:0;border:0;background:none;border-radius:0}
.tabs{width:auto;flex-wrap:wrap;overflow:visible}
.tab{height:40px;padding:0 18px;border-radius:999px;border:1px solid var(--pill-line);background:var(--glass-2);font-weight:700;font-size:14px;color:var(--text)}
.tab .icon{color:var(--accent-icon)}
.tab:hover{background:var(--glass-3)}
.tab.active{background:var(--grad);color:#fff;border-color:transparent;box-shadow:0 6px 16px rgba(79,70,229,.34)}
.tab.active .icon{color:#fff}
.seg{padding:0;gap:8px;background:none;border:0;border-radius:0}
.seg button{height:38px;border-radius:999px;border:1px solid var(--pill-line);background:var(--glass-2);color:var(--text);padding:0 16px}
.seg button.on{background:var(--grad);color:#fff;border-color:transparent;box-shadow:0 6px 16px rgba(79,70,229,.3)}

/* ---- layout: rail | chat list | chat (desktop) ---- */
.app{gap:16px;padding:20px}
.app.with-rail{grid-template-columns:88px var(--side-w,340px) minmax(0,1fr)}
.sidebar,.pane{border-radius:32px}
.pane{border-radius:36px}
.rail{display:flex;flex-direction:column;align-items:center;min-height:0;padding:14px 0;gap:6px;border-radius:32px;overflow:hidden}
.rail-logo{width:44px;height:44px;border-radius:14px;margin-bottom:8px;flex:none;filter:drop-shadow(0 6px 14px rgba(79,70,229,.3))}
.rail-logo.staging{filter:drop-shadow(0 6px 14px rgba(220,38,38,.38))}
.rail .folder-strip.pos-rail{flex:1;min-height:0;width:100%;border:0;padding:0 12px;gap:6px;align-items:center}
.folder-strip .folder-item{width:64px;gap:4px;padding:8px 0;border-radius:18px;font-size:12px;font-weight:600;color:var(--muted)}
.folder-strip.pos-bottom .folder-item{width:auto;min-width:62px;padding:6px 0;font-size:11px}
.folder-item:hover{background:var(--glass-2)}
.folder-item.on{background:var(--glass-3);color:var(--text)}
.folder-pic{width:40px;height:40px;border-radius:14px;background:var(--pill);border:1px solid var(--pill-line)}
.folder-pic[style]{background:color-mix(in srgb,var(--fc) 16%,var(--pill));border-color:transparent}
.folder-ico{width:20px;height:20px;color:var(--accent-icon)}
.folder-item.on .folder-pic{background:var(--grad-d);border-color:transparent;box-shadow:0 6px 14px rgba(79,70,229,.3)}
.folder-item.on .folder-ico{color:#fff!important}
.folder-edit .folder-pic{border:1px dashed rgba(62,52,130,.35);background:var(--pill)}
html[data-theme=dark] .folder-edit .folder-pic{border-color:rgba(190,185,255,.35)}
.folder-pic .folder-count{top:-6px;right:-10px;box-shadow:0 0 0 2px var(--pill)}
.folder-strip.pos-bottom{border-top:1px solid var(--line);background:rgba(255,255,255,.35);justify-content:space-around;padding:8px 8px 4px}
.folder-strip.pos-left{border-right:1px solid var(--line)}
.folder-bar .folder-tab{height:36px;padding:0 16px;border-color:var(--pill-line);background:var(--glass-2);color:var(--text)}
.folder-bar .folder-tab.on{background:var(--grad);box-shadow:0 6px 16px rgba(79,70,229,.3)}
.rail-foot{display:flex;flex-direction:column;align-items:center;gap:8px;padding-top:12px;border-top:1px solid var(--line);width:56px;flex:none}
.rail-me{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;border:0;background:transparent;color:var(--text);cursor:pointer;padding:4px;border-radius:18px;font:inherit}
.rail-me:hover{background:var(--glass-2)}
.rail-me .avatar .dot{width:14px;height:14px;right:-1px;bottom:-1px;border:2px solid var(--pill)}
.rail-me .acct-count{position:absolute;top:0;right:-2px}
.rail-name{font-size:12px;font-weight:700;max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rail-foot .icon-btn{width:40px;height:40px}
.rail-foot .icon-btn .icon{width:18px;height:18px}

/* chat list panel */
.side-head{padding:18px 14px 10px;gap:12px}
.side-title-row{padding:0 6px}
.side-title{font-size:22px;font-weight:700}
.search-pill{position:relative}
.search-pill .input{height:46px;padding-right:50px}
.search-pill .in-field{position:absolute;right:4px;top:4px;width:38px;height:38px;background:transparent;border:0;box-shadow:none}
.search-pill .in-field .icon{position:static;color:var(--accent-icon)}
.conv-list{padding:2px 14px 10px}
.conv-item{gap:12px;padding:10px 12px;border-radius:22px;border:0;margin-bottom:4px}
.conv-item:hover{background:var(--glass-2)}
.conv-item.active{background:var(--glass-3);border:0;box-shadow:0 6px 18px rgba(70,60,150,.1)}
.conv-item b{font-family:var(--head);font-weight:700;font-size:15px}
.avatar{width:46px;height:46px}
.avatar.sm{width:38px;height:38px}
.side-foot{margin:6px 14px 14px;padding:10px 12px;border:1px solid var(--pill-line);border-top:1px solid var(--pill-line);border-radius:999px;background:rgba(255,255,255,.7);gap:10px}
html[data-theme=dark] .side-foot{background:rgba(255,255,255,.06)}
.side-foot .me-btn{gap:12px;padding:0;border-radius:999px}
.side-foot .me-btn:hover{background:transparent}
.side-foot .me-btn b{font-family:var(--head);font-size:14px}
.side-foot .icon-btn{width:40px;height:40px}
.side-banner{padding:0 14px 6px}

/* chat header */
.pane-head{margin:0 22px;padding:18px 0 14px;border-bottom:1px solid var(--line);gap:12px;min-height:80px}
.pane-head h3{font-family:var(--head);font-size:18px;font-weight:700}
.head-person{padding:0;margin:0;border-radius:999px}
.head-person:hover{background:transparent}
.head-person:hover h3{text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:3px}
.online-text{display:inline-flex;align-items:center;gap:6px;color:#15803d;font-weight:700}
html[data-theme=dark] .online-text{color:#4ade80}
.small.online-text::before{content:"";width:8px;height:8px;border-radius:50%;background:#16a34a;flex:none}
.head-e2e{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 14px;border-radius:999px;background:var(--pill);border:1px solid var(--pill-line);font-size:13px;font-weight:700;color:var(--text);white-space:nowrap;flex:none}
.head-e2e .icon{width:14px;height:14px;color:var(--accent-icon)}
@media (max-width:1100px){.head-e2e span{display:none}.head-e2e{width:36px;padding:0;justify-content:center}}

/* messages */
.msgs{padding:18px 22px 10px;gap:6px}
.day{padding:0 14px;height:30px;display:inline-flex;align-items:center;border:0;background:rgba(255,255,255,.7);font-size:13px;font-weight:600;color:var(--muted)}
html[data-theme=dark] .day{background:rgba(255,255,255,.08)}
.day .e2e{font-size:13px;font-weight:700;color:var(--text)}
.day .e2e .icon{color:var(--accent-icon);width:14px;height:14px}
.bubble{padding:12px 18px;border-radius:22px;font-size:16px;line-height:1.5;max-width:min(70%,600px)}
.bubble.them{background:var(--pill);border:0;border-bottom-left-radius:8px;box-shadow:0 4px 14px rgba(70,60,150,.1)}
.bubble.me{background:var(--grad-me);border-bottom-right-radius:8px;box-shadow:0 8px 20px rgba(79,70,229,.3)}
.bubble .meta{display:flex;float:none;margin:4px 0 0;font-size:12px;color:var(--muted)}
.bubble.me .meta{color:rgba(255,255,255,.88)}
.bubble .meta .icon{width:14px;height:14px}

/* message box: + | pill (text, emoji, formatting) | send */
.composer{margin:0 22px;padding:12px 0 18px;border-top:0;gap:12px;align-items:flex-end}
.composer>.icon-btn{width:44px;height:44px;flex:none;margin-bottom:2px}
.composer-box{flex:1;min-width:0;display:flex;align-items:flex-end;gap:2px;min-height:48px;padding:2px 6px 2px 4px;border-radius:24px;background:var(--pill);border:1px solid var(--pill-line);box-shadow:0 4px 12px rgba(70,60,150,.06)}
.composer-box:focus-within{border-color:rgba(79,70,229,.55);box-shadow:0 0 0 3px rgba(99,102,241,.15)}
.composer-box textarea,.composer textarea{border:0;background:transparent;border-radius:20px;padding:11px 14px;min-height:44px;font-size:16px}
.composer textarea:focus{border:0;box-shadow:none}
.composer-box .icon-btn{width:40px;height:40px;margin-bottom:2px;border:0;background:transparent;box-shadow:none}
.composer-box .icon-btn:hover,.composer-box .icon-btn.active{background:var(--glass-2)}
.send{width:48px;height:48px;border-radius:50%;background:var(--grad-d);box-shadow:0 8px 20px rgba(79,70,229,.38)}
.send .icon{width:20px;height:20px}
.attach-btn{display:none}
.composer-notes{padding:0 22px}
.anim-layer.still,.anim-layer.still *{animation-play-state:paused!important}

/* ---- settings ---- */
.settings-modal{max-width:760px;gap:16px}
.settings-modal .modal-head h2{font-size:26px;letter-spacing:.01em}
.set-page{gap:14px}
.set-tabs{gap:8px}
.set-search .input{height:48px}
.set-search>.icon{left:18px;opacity:1;color:var(--accent-icon)}
.set-search input{padding-left:46px}
.set-cards{display:flex;flex-direction:column;gap:14px}
.set-cards .card{background:transparent;border:0;padding:0;gap:10px;border-radius:0}
.set-cards .card>h3{font-size:16px;padding:4px 4px 0;color:var(--muted);font-weight:700}
.set-cards .card>.small.muted:not(.setting *){padding:0 4px}
.set-cards .setting,.set-cards .switch-row,.set-cards .card>.field,.set-cards .card>form,.set-cards .card>.folder-row{border-radius:24px;background:var(--card);border:1px solid var(--card-line);padding:14px 20px;margin:0}
.set-cards .switch-row:first-of-type{border-top:1px solid var(--card-line)}
.set-cards .setting b,.set-cards .switch-row b{font-family:var(--head);font-weight:700;font-size:16px}
.set-cards .setting .input,.set-cards .switch-row .input{max-width:none;width:auto;min-width:150px}
.set-cards form.card{background:var(--card);border:1px solid var(--card-line);padding:18px 20px;border-radius:24px}
.set-row{padding:12px 16px;border-radius:24px;border:1px solid var(--card-line);background:var(--card)}
.set-ico{border-radius:14px;background:var(--grad-d)}
.set-item.flash .setting,.set-item.flash>.card{outline:2px solid #6366f1;outline-offset:2px;border-radius:24px}
.textsize-sample{border-radius:24px;padding:14px;background:var(--card)}
.step-card{gap:12px;border-radius:26px}
.step-pill{display:inline-flex;align-items:center;height:28px;padding:0 14px;border-radius:999px;background:linear-gradient(90deg,#0369a1,#4f46e5);color:#fff;font-size:12px;font-weight:700;letter-spacing:.08em}
.key-pill{flex:1 1 260px;min-width:0;display:flex;align-items:center;min-height:46px;padding:8px 20px;border-radius:999px;background:var(--pill);border:1px solid var(--pill-line);font:600 15px ui-monospace,Consolas,monospace;letter-spacing:.06em;color:var(--text);user-select:all;word-break:break-all}
.card-title-row{padding:0 0 0 4px}
.acct-card{gap:14px}
.status-dot{width:10px;height:10px;border-radius:50%;background:#94a3b8;box-shadow:0 0 0 4px rgba(148,163,184,.2);flex:none}
.status-dot.on{background:#16a34a;box-shadow:0 0 0 4px rgba(22,163,74,.18)}
.folder-pos-row{flex-wrap:wrap}
.value-pill{display:flex;align-items:center;min-height:46px;padding:0 20px;border-radius:999px;background:var(--pill);border:1px solid var(--pill-line);font-weight:600;font-size:15px;min-width:140px}
.set-search>.icon{top:15px;transform:none}

/* ---- admin: own side menu, header with totals, user cards ---- */
.app.admin-mode{grid-template-columns:minmax(0,1fr)}
.app.admin-mode .rail,.app.admin-mode .sidebar{display:none}
.app.admin-mode>.pane{background:none;border:0;box-shadow:none;-webkit-backdrop-filter:none;backdrop-filter:none;border-radius:0;overflow:visible}
.admin-shell{flex:1;min-height:0;display:flex;gap:20px}
.admin-nav{flex:none;width:250px;display:flex;flex-direction:column;gap:2px;padding:20px 14px;border-radius:36px;min-height:0}
.admin-brand{display:flex;align-items:center;gap:12px;padding:0 8px 14px}
.admin-brand img{width:44px;height:44px;border-radius:14px}
.admin-brand b{font-family:var(--head);font-size:17px}
.admin-nav-list{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:2px;scrollbar-width:none}
.admin-nav-item{display:flex;align-items:center;gap:12px;min-height:44px;padding:0 16px;border-radius:999px;border:0;background:transparent;color:var(--text);font:700 14px var(--font);text-align:left;cursor:pointer;flex:none}
.admin-nav-item .icon{width:18px;height:18px;color:var(--accent-icon)}
.admin-nav-item:hover{background:var(--glass-2)}
.admin-nav-item.on{background:var(--grad);color:#fff;box-shadow:0 6px 16px rgba(79,70,229,.34)}
.admin-nav-item.on .icon{color:#fff}
.admin-back{margin-top:10px;width:100%}
.admin-main{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;gap:16px;overflow-y:auto;padding:0 2px 2px}
.admin-head{flex:none;border-radius:36px;padding:20px 26px;display:flex;flex-direction:column;gap:14px}
.admin-head h1{font-size:26px}
.admin-body{flex:none;border-radius:36px;padding:22px 26px;overflow:visible}
.admin-body.admin{overflow:visible}
.stat-row{display:flex;gap:14px;flex-wrap:wrap}
.stat-row .stat,.stats .stat{flex:1 1 150px;border-radius:28px;padding:18px 22px;background:var(--card);border:1px solid var(--card-line);display:flex;flex-direction:column;gap:6px}
.stat-row .stat b{font-family:var(--head);font-size:28px;font-weight:700;order:2}
.stats{gap:14px}
.stats .stat b{font-size:28px;font-weight:700}
.rf-sel{height:40px;padding:0 16px;border-radius:999px;border:1px solid var(--pill-line);background:var(--pill);font-weight:600}
.user-cards{display:flex;flex-direction:column;gap:10px}
.user-card{display:flex;align-items:center;gap:14px;padding:10px 16px;border-radius:24px;background:var(--card);border:1px solid var(--card-line)}
.uc-name{font-family:var(--head);font-size:15px;font-weight:700}
.uc-sub{margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.uc-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.uc-actions .btn{height:40px}
.uc-actions .icon-btn{width:40px;height:40px}
.round-btn.on{background:var(--tint);border-color:transparent}
.chip-btn{height:36px;padding:0 16px;border-radius:999px;border:1px solid var(--pill-line);background:var(--glass-2);font-weight:700;font-size:13px}
.chip-btn .n{opacity:.7;font-weight:600}
.chip-btn[aria-pressed=true]{background:var(--grad);box-shadow:0 6px 16px rgba(79,70,229,.3)}
.table-wrap{border-radius:24px;border:1px solid var(--card-line);background:var(--card)}
.admin details,.admin .card{border-radius:24px}
@media (max-width:820px){
  .admin-shell{flex-direction:column;gap:0;overflow-y:auto}
  .admin-nav{width:auto;border-radius:0;padding:12px;flex-direction:row;align-items:center;gap:8px}
  .admin-brand{display:none}
  .admin-nav-list{flex-direction:row;overflow-x:auto}
  .admin-back{width:auto;margin:0;flex:none}
  .admin-main{overflow:visible;padding:12px}
  .user-card{flex-wrap:wrap}
  .uc-actions{width:100%;justify-content:flex-start}
}

/* ---- calls: light glass frame, controls in a glass pill below, ringing card ---- */
.call-overlay{padding:20px;background:rgba(234,241,255,.55);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
html[data-theme=dark] .call-overlay{background:rgba(16,14,36,.6)}
.call-card{width:min(1240px,100%);height:min(860px,calc(100vh - 40px));background:none;border:0;box-shadow:none;border-radius:0;color:var(--text);overflow:visible;gap:16px}
.call-frame{position:relative;flex:1;min-height:0;display:flex;border-radius:40px;padding:14px;overflow:hidden}
.call-frame .call-stage{border-radius:30px;overflow:hidden;background:linear-gradient(135deg,#dbeafe,#e0e7ff 45%,#f3e8ff)}
html[data-theme=dark] .call-frame .call-stage{background:linear-gradient(135deg,#1e1b4b,#24215a 45%,#2e1a4d)}
.call-frame .call-stage::before{content:"";position:absolute;inset:0;pointer-events:none;background:
  radial-gradient(closest-side,rgba(103,232,249,.4),transparent) 18% 10%/340px 340px no-repeat,
  radial-gradient(closest-side,rgba(196,181,253,.6),transparent) 88% 95%/380px 380px no-repeat;filter:blur(30px)}
.call-stage.has-video::before{display:none}
.call-remote{border-radius:30px}
.call-person h2{color:var(--text);font-size:28px;font-weight:700}
.call-avatar{padding:0;background:none}
.call-avatar .avatar.xl{width:180px;height:180px;font-size:56px;box-shadow:0 20px 50px rgba(79,70,229,.35)}
.call-status{top:18px;left:50%;right:auto;transform:translateX(-50%);display:inline-flex;align-items:center;height:36px;padding:0 16px;border-radius:999px;background:rgba(255,255,255,.8);border:1px solid var(--pill-line);color:var(--text);font-size:13px;font-weight:600;text-shadow:none;white-space:nowrap}
html[data-theme=dark] .call-status{background:rgba(36,33,66,.85)}
.call-status b{font-weight:700}
.call-stage:not(.has-video) .call-status{position:absolute;order:0}
.call-status.warn{color:#b45309}
.call-mark{top:20px;left:22px;color:var(--text);opacity:.6;text-shadow:none;font:700 15px var(--head)}
.call-mark img{width:30px;height:30px;border-radius:10px;filter:none}
.call-stage.has-video .call-mark{color:#fff;text-shadow:0 1px 6px rgba(0,0,0,.55)}
.call-local,.call-you{top:20px;right:20px;bottom:auto;width:220px;height:150px;aspect-ratio:auto;border-radius:26px;border:1px solid var(--glass-line);box-shadow:var(--shadow)}
.call-you{position:absolute;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:linear-gradient(135deg,rgba(255,255,255,.75),rgba(224,231,255,.8));-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px);font-weight:700;font-size:13px}
html[data-theme=dark] .call-you{background:rgba(36,33,66,.8)}
.call-you .avatar{width:56px;height:56px}
.call-pills{position:absolute;left:22px;bottom:20px;z-index:2;display:flex;gap:10px;flex-wrap:wrap}
.call-e2e,.call-net,.pill-chip{position:static;opacity:1;display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 16px;border-radius:999px;background:rgba(255,255,255,.8);border:1px solid var(--pill-line);color:var(--text);font-size:13px;font-weight:700}
html[data-theme=dark] .call-e2e,html[data-theme=dark] .call-net,html[data-theme=dark] .pill-chip{background:rgba(36,33,66,.85)}
.call-e2e .icon,.pill-chip .icon{width:14px;height:14px;color:var(--accent-icon)}
.call-net i{width:8px;height:8px;border-radius:50%;background:#16a34a}
.call-net.fair i{background:#d97706}.call-net.poor i{background:#dc2626}
.call-corner{position:absolute;right:20px;bottom:20px;z-index:3;display:flex;gap:10px}
.call-round{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;background:var(--pill);border:1px solid var(--pill-line);box-shadow:var(--shadow-btn);color:var(--accent-icon);cursor:pointer}
.call-round .icon{width:20px;height:20px}
.call-bar{display:flex;justify-content:center;flex:none}
.call-bar-pill{border-radius:999px;padding:12px 20px}
.call-controls{background:none;padding:0;gap:14px;align-items:center}
.call-btn{width:58px;height:58px;background:var(--pill);border:1px solid var(--pill-line);box-shadow:0 4px 14px rgba(70,60,150,.12);color:var(--accent-icon)}
.call-btn:hover{background:var(--pill);transform:scale(1.04)}
.call-btn.on{border:0;color:#fff;background:var(--grad-d);box-shadow:0 8px 22px rgba(79,70,229,.4)}
.call-btn.off{background:var(--pill);color:#b91c1c}
.call-btn .icon{width:24px;height:24px}
.call-chev{background:var(--pill);border:1px solid var(--pill-line);color:var(--accent-icon)}
.call-chev .icon{color:var(--accent-icon)}
.call-end-pill{display:inline-flex;align-items:center;justify-content:center;gap:10px;height:58px;padding:0 28px;border-radius:999px;border:0;background:var(--grad-end);color:#fff;font:700 16px var(--font);box-shadow:0 8px 22px rgba(190,24,93,.38);cursor:pointer}
.call-end-pill .icon{width:22px;height:22px}
/* minimised corner call */
.call-overlay.mini{inset:auto 18px 18px auto}
.call-overlay.mini .call-card{width:320px;height:300px;gap:8px}
.call-overlay.mini .call-frame{padding:8px;border-radius:28px}
.call-overlay.mini .call-frame .call-stage{border-radius:22px}
.call-overlay.mini .call-bar-pill{padding:8px 10px}
.call-overlay.mini .call-controls{gap:8px}
.call-overlay.mini .call-btn{width:42px;height:42px}
.call-overlay.mini .call-btn .icon{width:18px;height:18px}
.call-overlay.mini .call-end-pill{height:42px;padding:0 14px}
.call-overlay.mini .call-end-pill span,.call-overlay.mini .call-pills,.call-overlay.mini .call-you,.call-overlay.mini .call-chev,.call-overlay.mini .call-status,.call-overlay.mini #cx-watch,.call-overlay.mini #cx-wb,.call-overlay.mini #cx-rec-btn,.call-overlay.mini #cx-screen{display:none}
.call-overlay.mini .call-avatar .avatar.xl{width:72px;height:72px;font-size:24px}
.call-overlay.mini .call-person h2{font-size:16px}
.call-overlay.mini .call-corner{right:10px;bottom:10px}
/* full screen keeps the picture on black */
.call-overlay.full .call-card{height:100%;gap:0}
.call-overlay.full .call-frame{border-radius:0;padding:0;border:0}
.call-overlay.full .call-frame .call-stage{border-radius:0;background:#000}
.call-overlay.full .call-bar{position:absolute;left:0;right:0;bottom:22px;z-index:4;transition:opacity .35s}
.call-overlay.full.idle .call-bar,.call-overlay.full.idle .call-corner,.call-overlay.full.idle .call-pills{opacity:0;pointer-events:none}
.call-overlay.full .call-local{bottom:auto}
/* ringing card */
.ring-card{width:min(480px,100%);border-radius:44px;padding:44px 36px 36px;display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center}
.ring-card h2{font-size:28px;margin-top:4px}
.ring-avatar{position:relative;display:grid;place-items:center;width:220px;height:220px}
.ring-avatar i{position:absolute;inset:0;border-radius:50%;border:2px solid rgba(79,70,229,.18);animation:ringpulse 2.4s ease-out infinite}
.ring-avatar i+i{inset:22px;border-color:rgba(79,70,229,.3);animation-delay:.4s}
.ring-avatar .avatar.xl{width:130px;height:130px;font-size:42px;box-shadow:0 20px 50px rgba(79,70,229,.35)}
@keyframes ringpulse{0%{transform:scale(.92);opacity:.4}50%{opacity:1}100%{transform:scale(1.04);opacity:.4}}
.ring-actions{display:flex;gap:16px;width:100%;margin-top:14px}
.ring-actions>*{flex:1}
.ring-answer{height:58px;font-size:16px}
.ring-answer .icon{width:22px;height:22px}
.call-overlay.mini .call-local{width:96px;height:72px;top:10px;right:10px;border-radius:16px}
.gc-stage{flex-direction:column}
.gc-stage .gc-grid{position:relative;z-index:1;width:100%;padding:70px 20px 76px;gap:12px}
.gc-tile{border-radius:24px;background:rgba(255,255,255,.6);border:1px solid var(--glass-line)}
html[data-theme=dark] .gc-tile{background:rgba(255,255,255,.06)}
.gc-tile video{border-radius:24px}
.gc-name{border-radius:999px;background:rgba(255,255,255,.85);color:var(--text);font-weight:700;padding:4px 12px}
html[data-theme=dark] .gc-name{background:rgba(36,33,66,.85)}
.gc-controls .call-btn{width:58px;height:58px}
.call-overlay.mini.gc-overlay .gc-card{width:340px;height:300px}
.call-overlay.mini .gc-stage .gc-grid{padding:8px}
.call-overlay.gc-overlay.full .gc-card{height:100%}
.call-overlay.gc-overlay.full .gc-stage .gc-grid{padding:70px 12px 120px}
.call-overlay.gc-overlay.full .gc-controls{position:static;background:none;padding:0;opacity:1}
.call-overlay.gc-overlay.full.idle .call-bar,.call-overlay.gc-overlay.full.idle .call-corner{opacity:0;pointer-events:none}

/* ---- chat / group info: its own glass panel on the right ---- */
.chat-info{top:14px;right:14px;bottom:14px;width:min(420px,calc(100% - 28px));border-radius:32px;background:var(--pop);border:1px solid var(--glass-line);box-shadow:var(--shadow);-webkit-backdrop-filter:blur(22px);backdrop-filter:blur(22px);overflow:hidden}
.info-head{margin:0 22px;min-height:76px}
.info-head h2{font-size:22px}
.info-profile{gap:8px;padding:18px 20px 14px}
.info-profile .avatar.xl{width:84px;height:84px;font-size:28px}
.info-profile h2{font-size:20px}
.info-tabs{display:flex;flex-wrap:wrap;gap:8px;padding:10px 20px 12px;background:var(--pop);border:0}
.info-tab{height:36px;padding:0 14px;border-radius:999px;border:1px solid var(--pill-line);background:var(--glass-2);color:var(--text);font-size:13px}
.info-tab .icon{color:var(--accent-icon)}
.info-tab.on{background:var(--grad);border-color:transparent;box-shadow:0 6px 16px rgba(79,70,229,.3)}
.info-tab.on .icon{color:#fff}
.info-list{gap:8px;padding:6px 20px 12px}
.info-row{border:1px solid var(--card-line);border-radius:22px;background:var(--card);padding:10px 14px}
.info-icon{border-radius:14px;background:var(--tint);color:var(--tint-text)}
.thumb-grid{padding:6px 20px;gap:6px}
.thumb{border-radius:14px}
.label{padding-left:20px!important}
@media (max-width:820px){.chat-info{top:0;right:0;bottom:0;width:100%;border-radius:0;border:0}}

/* ---- sign-in and other pre-sign-in cards ---- */
.auth-card{max-width:460px;border-radius:40px;padding:36px 36px 30px;gap:18px}
.auth-card .brand{gap:10px}
.auth-card .brand h1{font-size:26px}
.auth-badge{width:60px;height:60px;border-radius:18px;box-shadow:0 10px 26px rgba(79,70,229,.35)}
.auth-card .input-icon{display:block}
.auth-go{height:50px}
.auth-links{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;font-weight:700;font-size:14px}
.auth-links a,.auth-card a{color:var(--accent-text);text-decoration:none}
.auth-links a:hover,.auth-card a:hover{text-decoration:underline}
.acct-list.card{padding:12px 14px;border-radius:26px;gap:6px;margin:0}
.acct-list-title{font-weight:700;padding:0 8px}
.acct-row{gap:12px;padding:8px;border-radius:20px;border:0;background:transparent}
.acct-row:hover{background:var(--glass-3);border:0}
.acct-row .icon{color:var(--accent-icon)}
.block{display:block}
.auth-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;padding-top:14px;border-top:1px solid var(--line)}
.chip-link{display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 16px;border-radius:999px;background:rgba(255,255,255,.8);border:1px solid var(--pill-line);color:var(--text)!important;font-size:13px;font-weight:700;text-decoration:none!important}
html[data-theme=dark] .chip-link{background:rgba(255,255,255,.08)}
.chip-link .icon{width:14px;height:14px;color:var(--accent-icon)}
.chip-link:hover{border-color:rgba(79,70,229,.4)}
.add-acct-head{border-radius:22px;padding:10px 14px;background:var(--card);border:1px solid var(--card-line)}
.logo{border-radius:18px;background:var(--grad-d)}

/* ---- phones ---- */
.day{height:auto;min-height:30px;padding:5px 14px;text-align:center;max-width:90%}
@media (max-width:820px){
  .app,.app.with-rail{padding:0;gap:0;grid-template-columns:1fr}
  .app .glass.sidebar,.app .glass.pane{border-radius:0;border:0}
  .pane-head{margin:0 14px;padding:12px 0 10px;min-height:66px}
  .msgs{padding:14px 14px 8px}
  .composer{margin:0 12px;padding:10px 0 14px;gap:8px}
  .composer-notes{padding:0 12px}
  .side-foot{margin:6px 12px 12px}
  .conv-list{padding:2px 10px 10px}
}
@media (max-width:560px){
  .head-e2e{display:none}
  .pane-head .icon-btn{width:40px;height:40px}
  .composer-box .format-btn{display:none}
  .bubble{max-width:84%}
}

/* ---- message types ---- */
.poll{display:flex;flex-direction:column;gap:10px;min-width:260px;max-width:420px;padding:4px 0}
.poll-q{display:flex;align-items:center;gap:10px}
.poll-q .icon{width:20px;height:20px;color:var(--accent-icon);flex:none}
.poll-q b{font-family:var(--head);font-weight:700;font-size:15px}
.poll-kind{margin-top:-6px}
.poll-opt{display:flex;flex-direction:column;gap:6px;width:100%;padding:4px 0;border:0;background:transparent;color:inherit;text-align:left;cursor:pointer;font:inherit}
.poll-row{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600}
.poll-row .icon{width:16px;height:16px;color:var(--accent-icon);flex:none}
.poll-text{word-break:break-word}
.poll-pct{font-variant-numeric:tabular-nums}
.poll-bar{display:block;height:10px;border-radius:999px;background:rgba(62,52,130,.1);overflow:hidden}
.poll-bar i{display:block;height:100%;border-radius:999px;background:var(--grad);transition:width .2s}
.bubble.me .poll-row .icon,.bubble.me .poll-q .icon{color:#fff}
.bubble.me .poll-bar{background:rgba(255,255,255,.25)}
.bubble.me .poll-bar i{background:#fff}
.quote{border-left:3px solid var(--indigo);border-radius:12px;padding:8px 12px;background:rgba(99,102,241,.08)}
.bubble.me .quote{border-left-color:rgba(255,255,255,.7);background:rgba(255,255,255,.14)}
.react-chip{height:30px;padding:0 12px;border-radius:999px;border:1px solid var(--pill-line);background:rgba(255,255,255,.85);font-weight:700;box-shadow:var(--shadow-btn)}
html[data-theme=dark] .react-chip{background:rgba(255,255,255,.1)}
.react-chip.mine{background:var(--tint);border-color:rgba(79,70,229,.4)}
.event-pill{height:36px;padding:0 16px;border-radius:999px;background:rgba(255,255,255,.8);border:1px solid var(--pill-line);font-size:13px;font-weight:700;color:var(--text)}
html[data-theme=dark] .event-pill{background:rgba(255,255,255,.08)}
.event-pill .icon{color:var(--accent-icon)}
.file{gap:12px;padding:10px 14px;border-radius:20px;background:rgba(99,102,241,.06);border:1px solid var(--pill-line)}
.bubble.me .file{background:rgba(255,255,255,.14);border-color:rgba(255,255,255,.3)}
.file-tile{width:44px;height:44px;border-radius:14px}
.file b{font-family:var(--head);font-weight:700}
.link-card{width:340px;border-radius:22px;background:var(--pill);border:1px solid var(--pill-line);box-shadow:var(--shadow-btn)}
.bubble.me .link-card{color:var(--text)}
.vplay{width:42px;height:42px;background:var(--grad-d);box-shadow:0 8px 20px rgba(79,70,229,.38)}
.wf-bars.base{color:rgba(79,70,229,.3)}
.wf-bars.played{color:#4f46e5}
.loc-map{border-radius:18px;border:0}
.loc-pin{color:#4f46e5}
.loc-open{border-radius:999px;padding:4px 10px;font-weight:700}
.loc-stop{border-radius:999px}
.todo-row{border-radius:16px;border-color:var(--pill-line)}
.todo-bar span{background:var(--grad)}
.pin-bar{margin:8px 22px 0;border-radius:22px;background:var(--card);border:1px solid var(--card-line)}
.reply-bar,.edit-bar{border-radius:22px}
.jump-latest{width:44px;height:44px;border-radius:50%;background:var(--pill);border:1px solid var(--pill-line);box-shadow:var(--shadow-btn);color:var(--accent-icon)}
.typing{border-radius:22px 22px 22px 8px;border:0;background:var(--pill);box-shadow:0 4px 14px rgba(70,60,150,.1)}
.bubble.me .poll .muted,.bubble.me .poll .small{color:rgba(255,255,255,.88)}
.folder-row{border-radius:20px;border-color:var(--card-line);background:var(--card)}
.folder-icon-opt{border-radius:14px;border-color:var(--pill-line);background:var(--pill)}

/* ---- 6.0.1: calls in narrow windows (phones, small desktop windows): nothing stacks on top of anything ---- */
@media (max-width:720px){
  .call-overlay{padding:10px}
  .call-card{width:100%;height:calc(100vh - 20px);height:calc(100dvh - 20px);max-height:none}
  .call-frame{padding:8px;border-radius:30px}
  .call-frame .call-stage{border-radius:24px}
  .call-status{top:12px;height:32px;padding:0 12px;font-size:12px;max-width:calc(100% - 24px);overflow:hidden}
  .call-status>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
  .call-mark{display:none}
  .call-local,.call-you{top:56px;right:12px;width:104px;height:78px;border-radius:18px}
  .call-you .avatar{width:34px;height:34px}
  .call-you{gap:4px;font-size:11px}
  .call-stage:not(.has-video) .call-person{padding:70px 0 84px}
  .call-avatar .avatar.xl{width:128px;height:128px;font-size:42px}
  .call-person h2{font-size:22px;max-width:none;width:100%;padding:0 12px;text-align:center;overflow-wrap:anywhere}
  .call-pills{left:12px;bottom:12px;gap:8px;max-width:calc(100% - 112px)}
  .call-e2e,.call-net,.pill-chip{height:32px;padding:0 12px;font-size:12px}
  .call-corner{right:12px;bottom:12px;gap:8px}
  .call-round{width:40px;height:40px}
  .call-overlay.mini .call-status,.call-overlay.mini .call-mark{display:none}
}

/* 6.0.1: the old small card for calling / starting / connecting / ended (380 px) must not win over the glass call frame */
.call-overlay.state-calling:not(.mini):not(.full) .call-card,
.call-overlay.state-starting:not(.mini):not(.full) .call-card,
.call-overlay.state-connecting:not(.mini):not(.full) .call-card,
.call-overlay.state-ended:not(.mini):not(.full) .call-card{width:min(1240px,100%);height:min(860px,calc(100vh - 40px));min-height:0}
.call-overlay.state-calling.full .call-card,.call-overlay.state-starting.full .call-card,.call-overlay.state-connecting.full .call-card,.call-overlay.state-ended.full .call-card{width:100%;height:100%;min-height:0}
.call-overlay.state-calling.mini .call-card,.call-overlay.state-starting.mini .call-card,.call-overlay.state-connecting.mini .call-card,.call-overlay.state-ended.mini .call-card{width:320px;height:300px;min-height:0}
@media (max-width:720px){
  .call-overlay.state-calling:not(.mini):not(.full) .call-card,
  .call-overlay.state-starting:not(.mini):not(.full) .call-card,
  .call-overlay.state-connecting:not(.mini):not(.full) .call-card,
  .call-overlay.state-ended:not(.mini):not(.full) .call-card{width:100%;height:calc(100vh - 20px);height:calc(100dvh - 20px)}
}
/* 6.0.2: keep the name clear of the corner buttons in the minimised call */
.call-overlay.mini .call-stage:not(.has-video) .call-person{padding-bottom:46px}

/* 6.0.3: a dialog can never be wider than the screen (the dialog track was sized by its widest content, so Settings pushed past the right edge on phones) */
.backdrop{grid-template-columns:minmax(0,1fr)}
.modal{min-width:0;max-width:min(460px,100%)}
.modal.lg,.settings-modal{max-width:min(560px,100%)}
@media (max-width:560px){
  .settings-modal .profile-row{flex-direction:column;align-items:flex-start;gap:12px}
  .settings-modal .profile-row .col{width:100%;align-items:flex-start}
  .settings-modal .profile-row .label{text-align:left}
  .channel-card{flex-wrap:wrap}
  .channel-card .grow{flex:1 1 150px}
}

/* 6.0.10: chat-list "Get the app": one quiet pill that opens three platform tiles */
.get-apps{margin:0 0 8px}
.get-toggle{display:flex;align-items:center;justify-content:center;gap:8px;color:var(--indigo)}
.get-toggle .get-chev{width:15px;height:15px}
.get-panel{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px}
.get-panel.n1{grid-template-columns:minmax(0,1fr)}
.get-panel.n2{grid-template-columns:repeat(2,minmax(0,1fr))}
.get-tile{min-width:0;padding:10px 6px 8px;text-align:center;border:1px solid var(--pill-line);background:var(--pill);border-radius:16px}
.get-tile>.icon{display:block;width:24px;height:24px;margin:0 auto;color:var(--indigo)}
.get-tile>b{display:block;font-size:12px;font-weight:700;margin:2px 0 8px;color:var(--text)}
.get-opt{display:flex;align-items:center;justify-content:center;width:100%;min-height:28px;margin-top:4px;padding:0 6px;border:1px solid var(--pill-line);border-radius:999px;background:transparent;font-weight:600;font-size:11.5px;line-height:1;font-family:inherit;color:var(--text);text-decoration:none;cursor:pointer}
.get-opt:hover{background:var(--glass-3);text-decoration:none}
.get-opt:focus-visible{outline:3px solid var(--indigo);outline-offset:1px}
.get-opt.soon{background:var(--glass-2);color:var(--muted);border-color:transparent}
.get-note{display:block;margin-top:6px;font-size:11px;font-weight:600;color:var(--muted)}
