[hidden]{display:none!important}
/* Layout: two-pane messenger shell — chat list left, conversation right; one pane at a time on phones */
:root{
  --bg:#F6F7FB; --panel:#FFFFFF; --line:#DDE1EA; --fg:#0E1424; --muted:#5B6475;
  --accent:#3D5AFE; --accent-ink:#FFFFFF; --accent-soft:#E6EAFF; --mark:#D4401F;
  --out:#3D5AFE; --out-ink:#FFFFFF; --in:#FFFFFF; --chat-bg:#F6F7FB; --dots:transparent;
  --hover:#EEF1F8; --sel:#E6EAFF; --ok:#12805C; --danger:#B8321C; --shadow:0 1px 2px rgba(14,20,36,.06);
  --display:"Unbounded","Manrope",system-ui,sans-serif;
  --body:"Manrope",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#0F1420; --panel:#161C2C; --line:#2A3247; --fg:#F2F4F8; --muted:#A3ACBD;
  --accent:#8196FF; --accent-ink:#0E1424; --accent-soft:#1E2742; --mark:#EF6A47;
  --out:#3D5AFE; --out-ink:#FFFFFF; --in:#1E2638; --chat-bg:#0F1420; --dots:transparent;
  --hover:#1B2235; --sel:#222B45; --ok:#4CC79A; --danger:#F08A76; --shadow:0 1px 2px rgba(0,0,0,.4);
  color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0F1420; --panel:#161C2C; --line:#2A3247; --fg:#F2F4F8; --muted:#A3ACBD;
  --accent:#8196FF; --accent-ink:#0E1424; --accent-soft:#1E2742; --mark:#EF6A47;
  --out:#3D5AFE; --out-ink:#FFFFFF; --in:#1E2638; --chat-bg:#0F1420; --dots:transparent;
  --hover:#1B2235; --sel:#222B45; --ok:#4CC79A; --danger:#F08A76; --shadow:0 1px 2px rgba(0,0,0,.4);
  color-scheme:dark}
*{box-sizing:border-box}
html,body{height:100%;overscroll-behavior:none}
body{background:var(--bg);color:var(--fg);font:15px/1.42 var(--body);overflow:hidden}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer;padding:0}
input,textarea{font:inherit;color:var(--fg)}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
svg{display:block}
.ico{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Fixed to the visible area (--vv-* come from app.js): on phones the header stays put and the composer rides on top of the keyboard. */
#app{position:fixed;left:0;right:0;top:var(--vv-top,0px);height:var(--vv-h,100%);display:grid;grid-template-columns:minmax(300px,370px) minmax(0,1fr);padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
@media (max-width:760px){#app{grid-template-columns:minmax(0,1fr)} #app.in-chat #side{display:none} #app:not(.in-chat) #main{display:none}}

/* ---------- sidebar ---------- */
#side{display:flex;flex-direction:column;min-height:0;background:var(--panel);border-right:1px solid var(--line)}
.side-head{display:flex;align-items:center;gap:10px;padding:calc(14px + env(safe-area-inset-top,0px)) 16px 10px}
.logo{font-family:var(--display);font-weight:600;font-size:18px;letter-spacing:-.01em;flex:1;display:flex;align-items:center;gap:8px}
.logo-mark{width:26px;height:26px;border-radius:8px 8px 8px 2px;background:var(--accent);display:grid;place-items:center;color:var(--accent-ink)}
.logo-mark svg{width:16px;height:16px}
.icon-btn{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;color:var(--muted);flex:none}
.icon-btn:hover{background:var(--hover);color:var(--fg)}
.icon-btn:disabled{opacity:.4;cursor:default;background:none}
.me-btn{border-radius:50%}
.search-wrap{padding:0 16px 10px}
.field{width:100%;border:1px solid var(--line);background:var(--bg);border-radius:12px;padding:9px 12px;outline:none}
.field:focus{border-color:var(--accent)}
#list{flex:1;overflow-y:auto;min-height:0;padding-bottom:8px}
.item{display:grid;grid-template-columns:50px minmax(0,1fr) auto;gap:12px;padding:8px 16px;align-items:center;cursor:pointer;width:100%;text-align:left}
.item:hover{background:var(--hover)}
.item.active{background:var(--sel)}
.item .t{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item .p{color:var(--muted);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.item .p b{color:var(--fg);font-weight:500}
.item .p.typing{color:var(--accent)}
.item .meta{display:flex;flex-direction:column;align-items:flex-end;gap:5px;font-size:12px;color:var(--muted);font-variant-numeric:tabular-nums}
.badge{min-width:21px;height:21px;padding:0 6px;border-radius:11px;background:var(--accent);color:var(--accent-ink);font-size:12px;font-weight:600;display:grid;place-items:center}
.sec-label{padding:12px 16px 4px;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.list-empty{padding:28px 20px;color:var(--muted);font-size:14px;line-height:1.5}
.list-empty h3{color:var(--fg);font-size:15px;margin:0 0 6px}
.list-empty .btn{margin-top:14px}

/* ---------- avatars ---------- */
.av{position:relative;flex:none;border-radius:50%;display:grid;place-items:center;color:#fff;font-weight:600;overflow:visible}
.av .face{width:100%;height:100%;border-radius:50%;display:grid;place-items:center;overflow:hidden;background-size:cover;background-position:center}
.av img{width:100%;height:100%;object-fit:cover}
.av .dot{position:absolute;right:1px;bottom:1px;width:13px;height:13px;border-radius:50%;background:var(--ok);border:2.5px solid var(--panel)}

/* ---------- main / chat ---------- */
#main{display:flex;flex-direction:column;min-height:0;min-width:0;background:var(--chat-bg);background-image:radial-gradient(var(--dots) 1.2px,transparent 1.3px);background-size:22px 22px}
.chat-head{display:flex;align-items:center;gap:12px;padding:calc(8px + env(safe-area-inset-top,0px)) 16px 8px;min-height:calc(60px + env(safe-area-inset-top,0px));flex:none;background:var(--panel);border-bottom:1px solid var(--line)}
.chat-head .who{flex:1;min-width:0;text-align:left;display:flex;align-items:center;gap:12px;border-radius:10px;padding:2px 4px}
.chat-head .who:hover{background:var(--hover)}
.chat-head .name{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-head .status{font-size:13px;color:var(--muted)}
.chat-head .status.on{color:var(--accent)}
.back{display:none}
@media (max-width:760px){.back{display:grid}}
#msgs{flex:1;overflow-y:auto;min-height:0;padding:14px max(16px,4%) 10px;display:flex;flex-direction:column;gap:3px}
.day{align-self:center;margin:12px 0 8px;padding:4px 12px;border-radius:12px;background:var(--panel);color:var(--muted);font-size:12.5px;font-weight:500;box-shadow:var(--shadow)}
.msg{max-width:min(560px,80%);align-self:flex-start;background:var(--in);border-radius:16px 16px 16px 6px;padding:7px 11px 6px;box-shadow:var(--shadow);position:relative;min-width:0}
.msg.out{align-self:flex-end;background:var(--out);border-radius:16px 16px 6px 16px}
.msg.cont{border-top-left-radius:16px}
.msg.out.cont{border-top-right-radius:16px}
.msg.gap{margin-top:8px}
.msg .from{font-size:13px;font-weight:600;margin-bottom:2px}
.msg .txt{white-space:pre-wrap;overflow-wrap:anywhere}
.msg .txt a{color:var(--accent)}
.msg .txt.deleted{color:var(--muted);font-style:italic}
.msg .foot{float:right;margin:6px 0 -2px 10px;display:flex;align-items:center;gap:3px;font-size:11.5px;color:var(--muted);font-variant-numeric:tabular-nums;user-select:none}
.msg .foot svg{width:17px;height:12px}
.msg .foot .read{color:var(--accent)}
.msg .del{position:absolute;top:4px;left:-34px;width:28px;height:28px;border-radius:50%;display:none;place-items:center;color:var(--muted);background:var(--panel);box-shadow:var(--shadow)}
.msg .del svg{width:15px;height:15px}
.msg.out:hover .del,.msg.out:focus-within .del{display:grid}
.att-img{display:block;margin:-3px -7px 6px;border-radius:12px;overflow:hidden;cursor:zoom-in;background:var(--line);max-width:calc(100% + 14px)}
.att-img img{display:block;width:100%;height:auto;max-height:360px;object-fit:cover}
.att-video{display:block;margin:-3px -7px 6px;border-radius:12px;max-width:calc(100% + 14px);max-height:360px;background:#000}
.att-file{display:flex;align-items:center;gap:10px;margin:2px 0 6px;padding:8px 10px;border-radius:12px;background:var(--accent-soft);text-decoration:none;color:var(--fg);min-width:0}
.att-file .fi{width:38px;height:38px;border-radius:10px;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;flex:none;font-size:11px;font-weight:700;letter-spacing:.04em}
.att-file .fn{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.att-file .fs{font-size:12.5px;color:var(--muted)}
.att-missing{margin:2px 0 6px;padding:14px;border-radius:12px;background:var(--accent-soft);color:var(--muted);font-size:13px}

.composer{flex:none;display:flex;gap:6px;align-items:flex-end;padding:8px 12px calc(8px + env(safe-area-inset-bottom,0px));background:var(--panel);border-top:1px solid var(--line)}
.composer textarea{flex:1;min-width:0;resize:none;border:1px solid var(--line);background:var(--bg);border-radius:20px;padding:9px 14px;max-height:160px;outline:none;line-height:1.4}
.composer textarea:focus{border-color:var(--accent)}
.send{width:40px;height:40px;border-radius:50%;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;flex:none}
.send:disabled{opacity:.35;cursor:default}
.send svg{width:20px;height:20px}
.upload-note{padding:6px 16px;font-size:13px;color:var(--muted);background:var(--panel);border-top:1px solid var(--line)}
.drop-hint{position:absolute;inset:0;display:grid;place-items:center;background:color-mix(in srgb,var(--accent) 14%,transparent);border:2px dashed var(--accent);border-radius:16px;font-weight:600;color:var(--accent);pointer-events:none}
.chat-wrap{position:relative;flex:1;display:flex;flex-direction:column;min-height:0}

.blank{flex:1;display:grid;place-items:center;padding:24px}
.blank-card{max-width:400px;text-align:center;background:var(--panel);border-radius:20px;padding:28px 26px;box-shadow:var(--shadow)}
.blank-card h2{font-family:var(--display);font-weight:600;font-size:20px;margin:0 0 10px;text-wrap:balance;letter-spacing:-.01em}
.blank-card p{margin:0 0 8px;color:var(--muted);font-size:14.5px;line-height:1.5}
.banner{padding:8px 16px;background:var(--accent-soft);color:var(--fg);font-size:13.5px;border-bottom:1px solid var(--line)}

/* ---------- buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:40px;padding:0 18px;border-radius:20px;background:var(--accent);color:var(--accent-ink);font-weight:600}
.btn:disabled{opacity:.45;cursor:default}
.btn.ghost{background:var(--accent-soft);color:var(--fg)}
.btn.danger{background:none;color:var(--danger);padding:0 6px}

/* ---------- modal ---------- */
#modal{position:fixed;left:0;right:0;top:var(--vv-top,0px);height:var(--vv-h,100%);z-index:20;background:rgba(15,8,22,.45);display:grid;place-items:center;padding:16px}
.sheet{width:min(440px,100%);max-height:min(640px,100%);display:flex;flex-direction:column;background:var(--panel);border-radius:20px;box-shadow:0 20px 60px rgba(0,0,0,.3);overflow:hidden}
.sheet-head{display:flex;align-items:center;gap:8px;padding:14px 12px 10px 20px}
.sheet-head h2{flex:1;margin:0;font-family:var(--display);font-weight:600;font-size:17px;letter-spacing:-.01em}
.sheet-body{padding:4px 20px 16px;overflow-y:auto;display:flex;flex-direction:column;gap:12px;min-height:0}
.sheet-foot{padding:12px 20px 18px;display:flex;gap:10px;justify-content:flex-end;border-top:1px solid var(--line)}
.lbl{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:5px;display:block}
.hint{font-size:13px;color:var(--muted);line-height:1.45}
.err{font-size:13px;color:var(--danger)}
.tabs{display:flex;gap:4px;background:var(--bg);padding:4px;border-radius:12px}
.tabs button{flex:1;height:34px;border-radius:9px;font-weight:500;color:var(--muted)}
.tabs button[aria-selected="true"]{background:var(--panel);color:var(--fg);box-shadow:var(--shadow)}
.people{display:flex;flex-direction:column;margin:0 -20px}
.person{display:flex;align-items:center;gap:12px;padding:8px 20px;text-align:left;width:100%}
.person:hover{background:var(--hover)}
.person .pn{font-weight:500}
.person .ph{font-size:13px;color:var(--muted)}
.person .grow{flex:1;min-width:0}
.check{width:22px;height:22px;border-radius:50%;border:2px solid var(--line);display:grid;place-items:center;flex:none}
.person[aria-checked="true"] .check{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.check svg{width:13px;height:13px}
.photo-row{display:flex;align-items:center;gap:14px}

#lightbox{position:fixed;inset:0;z-index:30;background:rgba(8,4,12,.88);display:grid;place-items:center;padding:20px;cursor:zoom-out}
#lightbox img{max-width:100%;max-height:100%;border-radius:8px}
#toast{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:40;background:var(--fg);color:var(--bg);padding:10px 16px;border-radius:12px;font-size:14px;max-width:calc(100% - 32px);box-shadow:0 8px 24px rgba(0,0,0,.25)}
.loading{color:var(--muted);font-size:14px;padding:24px;text-align:center}
@media (prefers-reduced-motion:no-preference){.msg.new{animation:pop .18s ease-out}@keyframes pop{from{transform:translateY(6px);opacity:.4}}}

/* ---------- auth screen ---------- */
#auth{position:fixed;left:0;right:0;top:var(--vv-top,0px);height:var(--vv-h,100%);z-index:15;overflow-y:auto;background:var(--chat-bg);background-image:radial-gradient(var(--dots) 1.2px,transparent 1.3px);background-size:22px 22px;display:grid;place-items:center;padding:24px 16px}
.auth-card{width:min(400px,100%);background:var(--panel);border-radius:22px;padding:28px 24px 24px;box-shadow:0 10px 40px rgba(40,20,60,.12);display:flex;flex-direction:column;gap:14px}
.auth-card .logo{font-size:22px;justify-content:center;flex:none;margin-bottom:2px}
.auth-card .logo-mark{width:32px;height:32px}
.auth-card .logo-mark svg{width:19px;height:19px}
.auth-card .sub{text-align:center;color:var(--muted);font-size:14px;margin:-6px 0 4px}
.auth-card form{display:flex;flex-direction:column;gap:12px}
.auth-card .btn{width:100%;height:44px}
.load-more{align-self:center;margin:6px 0;font-size:13px;color:var(--muted)}
.btn.small{height:32px;padding:0 12px;font-size:13.5px}
.auth-card .link{align-self:center;color:var(--accent);font-size:14px;font-weight:500;padding:4px 8px}
.auth-card .btn:disabled{opacity:.6;cursor:default}
.push-banner{display:flex;align-items:flex-start;gap:6px;margin:0 12px 8px;padding:10px 6px 10px 12px;border-radius:14px;background:var(--accent-soft)}
.push-banner .pb-text{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:8px;font-size:13.5px;line-height:1.4}
.push-banner .icon-btn{flex:none;width:28px;height:28px}
.contacts-block{display:flex;flex-direction:column;gap:8px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.contacts-block .cb-actions{display:flex}
.contacts-block .link{color:var(--accent);font-size:inherit;font-weight:500;padding:0;text-align:left}
/* Keyboard open: it already covers the home indicator, so drop the safe-area gap under the composer. */
.kb-open .composer{padding-bottom:8px}
/* iPhone zooms into any field with text under 16px and the page jumps; keep fields at 16px on touch screens. */
@media (pointer:coarse){.field,.composer textarea{font-size:16px}}
/* ---------- round video messages ---------- */
.msg.round{background:none;box-shadow:none;padding:0}
.msg.round .txt{display:flex;justify-content:flex-end}
.msg.round .foot{float:none;margin:4px 4px 0;padding:1px 7px;border-radius:9px;background:var(--panel);box-shadow:var(--shadow)}
.att-round{position:relative;display:block;width:min(240px,62vw);aspect-ratio:1;border-radius:50%;overflow:hidden;background:#000;padding:0;box-shadow:var(--shadow)}
.att-round video{display:block;width:100%;height:100%;object-fit:cover}
.att-round.playing{box-shadow:0 0 0 3px var(--accent)}
.round-dur{position:absolute;left:50%;bottom:10px;transform:translateX(-50%);padding:1px 8px;border-radius:9px;background:rgba(0,0,0,.5);color:#fff;font-size:12px;font-variant-numeric:tabular-nums}
.round-sound{position:absolute;right:16%;top:16%;width:24px;height:24px;border-radius:50%;background:rgba(0,0,0,.5);color:#fff;display:grid;place-items:center}
.round-sound svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.att-round.playing .round-sound{display:none}
.rec-overlay{position:fixed;left:0;right:0;top:var(--vv-top,0px);height:var(--vv-h,100%);z-index:25;background:rgba(15,8,22,.88);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;padding:24px 16px calc(24px + env(safe-area-inset-bottom,0px))}
.rec-circle{position:relative;width:min(300px,76vw);aspect-ratio:1}
.rec-preview{width:100%;height:100%;border-radius:50%;object-fit:cover;background:#000;transform:scaleX(-1)}
.rec-ring{position:absolute;inset:-9px;width:calc(100% + 18px);height:calc(100% + 18px);transform:rotate(-90deg);pointer-events:none}
.rec-ring circle{fill:none;stroke:var(--accent);stroke-width:2.6;stroke-linecap:round;stroke-dasharray:301.6;stroke-dashoffset:301.6;transition:stroke-dashoffset .2s linear}
.rec-time{display:flex;align-items:center;gap:8px;color:#fff;font-size:18px;font-variant-numeric:tabular-nums}
.rec-dot{width:10px;height:10px;border-radius:50%;background:#E5484D;animation:recblink 1s steps(2,start) infinite}
@keyframes recblink{to{visibility:hidden}}
.rec-actions{display:flex;gap:12px}
.rec-actions .btn{min-width:130px;height:44px}
.rec-actions .btn.ghost{background:rgba(255,255,255,.14);color:#fff}
/* ---------- calls ---------- */
.call{position:fixed;left:0;right:0;top:var(--vv-top,0px);height:var(--vv-h,100%);z-index:30;background:#1B1222;color:#fff;display:flex;flex-direction:column;align-items:center;overflow:hidden;padding:calc(48px + env(safe-area-inset-top,0px)) 16px calc(28px + env(safe-area-inset-bottom,0px))}
.call-remote{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000;opacity:0;pointer-events:none}
.call.has-video .call-remote{opacity:1}
.call-top{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center}
.call-av{margin-bottom:12px}
.call.has-video .call-av{display:none}
.call-name{font-family:var(--display);font-weight:600;font-size:22px;text-shadow:0 1px 3px rgba(0,0,0,.5)}
.call-status{font-size:15px;opacity:.8;font-variant-numeric:tabular-nums;text-shadow:0 1px 3px rgba(0,0,0,.5)}
.call-local{position:absolute;right:16px;top:calc(16px + env(safe-area-inset-top,0px));width:min(110px,28vw);aspect-ratio:3/4;object-fit:cover;border-radius:14px;background:#000;transform:scaleX(-1);box-shadow:0 4px 16px rgba(0,0,0,.4)}
.call-btns{position:relative;margin-top:auto;display:flex;gap:22px;justify-content:center;flex-wrap:wrap}
.call-btn{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:12.5px;color:#fff;width:72px}
.call-btn svg{width:60px;height:60px;padding:17px;border-radius:50%;background:rgba(255,255,255,.18);fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.call-btn.on svg{background:#fff;color:#1B1222}
.call-btn.green svg{background:#2EB05E}
.call-btn.red svg{background:#E5484D;transform:rotate(135deg)}
/* ---------- stories ---------- */
.stories{display:flex;gap:12px;overflow-x:auto;padding:2px 14px 10px;scrollbar-width:none;flex:none}
.stories::-webkit-scrollbar{display:none}
.story-bubble{display:flex;flex-direction:column;align-items:center;gap:4px;width:64px;flex:none}
.story-ring{position:relative;padding:2.5px;border-radius:50%;border:2.5px solid transparent}
.story-ring.unseen{border-color:var(--accent)}
.story-ring.seen{border-color:var(--line)}
.story-plus{position:absolute;right:-2px;bottom:-2px;width:22px;height:22px;border-radius:50%;background:var(--accent);color:var(--accent-ink);border:2px solid var(--panel);display:grid;place-items:center;font-size:16px;font-weight:600;line-height:1}
.story-name{font-size:12px;color:var(--muted);max-width:64px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.story-prev{width:100%;max-height:50vh;object-fit:contain;border-radius:14px;background:#000}
.story-view{position:fixed;left:0;right:0;top:var(--vv-top,0px);height:var(--vv-h,100%);z-index:26;background:#000;display:grid;place-items:center}
.sv-frame{position:relative;width:min(100%,calc(var(--vv-h,100vh) * 9 / 16));height:100%;overflow:hidden;color:#fff}
.sv-stage{position:absolute;inset:0;display:grid;place-items:center;user-select:none;-webkit-user-select:none;touch-action:manipulation}
.sv-stage img,.sv-stage video{width:100%;height:100%;object-fit:contain;pointer-events:none}
.sv-top{position:absolute;left:0;right:0;top:0;padding:calc(10px + env(safe-area-inset-top,0px)) 10px 24px;background:linear-gradient(rgba(0,0,0,.55),transparent);pointer-events:none}
.sv-bars{display:flex;gap:4px}
.sv-bars span{flex:1;height:2.5px;border-radius:2px;background:rgba(255,255,255,.35);overflow:hidden}
.sv-bars i{display:block;height:100%;width:0;background:#fff}
.sv-head{display:flex;align-items:center;gap:10px;margin-top:10px}
.sv-who{flex:1;display:flex;align-items:center;gap:10px;min-width:0}
.sv-name{font-weight:600;font-size:14.5px}
.sv-time{font-size:12.5px;opacity:.8}
.sv-close{color:#fff;pointer-events:auto}
.sv-close:hover{background:rgba(255,255,255,.15);color:#fff}
.sv-caption{position:absolute;left:0;right:0;bottom:calc(72px + env(safe-area-inset-bottom,0px));padding:10px 16px;text-align:center;font-size:15px;background:linear-gradient(transparent,rgba(0,0,0,.5));pointer-events:none}
.sv-foot{position:absolute;left:0;right:0;bottom:0;display:flex;gap:8px;align-items:center;padding:10px 12px calc(12px + env(safe-area-inset-bottom,0px))}
.sv-btn{height:38px;padding:0 16px;border-radius:19px;background:rgba(255,255,255,.16);color:#fff;font-weight:500}
.sv-reply{flex:1;min-width:0;height:42px;border-radius:21px;border:1px solid rgba(255,255,255,.4);background:rgba(0,0,0,.3);color:#fff;padding:0 16px;outline:none}
.sv-reply::placeholder{color:rgba(255,255,255,.7)}
.sv-send{width:42px;height:42px;border-radius:50%;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;flex:none}
.sv-send svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sv-panel{position:absolute;left:0;right:0;bottom:0;max-height:60%;overflow-y:auto;background:var(--panel);color:var(--fg);border-radius:18px 18px 0 0;padding:6px 8px calc(12px + env(safe-area-inset-bottom,0px))}
.sv-panel-head{display:flex;align-items:center;justify-content:space-between;padding:6px 8px 6px 12px}
@media (pointer:coarse){.sv-reply{font-size:16px}}
/* ---------- message menu, forward, edit ---------- */
.msg .fwd{font-size:12.5px;font-weight:500;color:var(--accent);margin-bottom:3px}
.msg.round .fwd{padding:2px 8px;border-radius:9px;background:var(--panel);display:inline-block;margin-bottom:6px}
.msg{cursor:default}
.msg img,.msg video{-webkit-touch-callout:none}
.menu{display:flex;flex-direction:column;margin:-4px -8px 0}
.menu-item{text-align:left;padding:13px 12px;border-radius:12px;font-size:15.5px}
.menu-item:hover{background:var(--hover)}
.menu-item.danger{color:var(--danger)}
.edit-bar{display:flex;align-items:center;gap:10px;padding:6px 8px 6px 16px;background:var(--panel);border-top:1px solid var(--line);color:var(--accent)}
.edit-bar>svg{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.eb-text{flex:1;min-width:0;font-size:13.5px;color:var(--fg)}
.eb-text b{color:var(--accent);font-weight:600}
.eb-text div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--muted)}
/* swipe a message left to reply to it */
#msgs{overflow-x:hidden}
.msg{touch-action:pan-y;transition:transform .2s ease-out}
.msg.swiping{transition:none}
.swipe-ico{position:absolute;right:-46px;top:50%;margin-top:-17px;width:34px;height:34px;border-radius:50%;background:var(--panel);color:var(--muted);box-shadow:var(--shadow);display:grid;place-items:center;opacity:0;transition:opacity .15s,color .15s,transform .15s;pointer-events:none}
.swipe-ico svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.swipe-ico.armed{color:var(--accent);transform:scale(1.12)}
/* ---------- reels ---------- */
.reels{position:fixed;left:0;right:0;top:var(--vv-top,0px);height:var(--vv-h,100%);z-index:18;background:#000;color:#fff}
.reels-scroll{height:100%;overflow-y:auto;scroll-snap-type:y mandatory;overscroll-behavior:contain;scrollbar-width:none}
.reels-scroll::-webkit-scrollbar{display:none}
.reel{position:relative;height:100%;scroll-snap-align:start;scroll-snap-stop:always;display:grid;place-items:center;overflow:hidden}
.reel-stage{position:absolute;inset:0;margin:0 auto;width:min(100%,calc(var(--vv-h,100vh) * 9 / 16));display:grid;place-items:center;cursor:pointer;-webkit-tap-highlight-color:transparent}
.reel-video{width:100%;height:100%;object-fit:cover;background:#000;-webkit-touch-callout:none}
@media (min-aspect-ratio:3/4){.reel-video{object-fit:contain}}
.reels-top{position:absolute;left:0;right:0;top:0;display:flex;align-items:center;gap:8px;padding:calc(8px + env(safe-area-inset-top,0px)) 10px 20px;background:linear-gradient(rgba(0,0,0,.5),transparent);pointer-events:none}
.reels-title{flex:1;font-family:var(--display);font-weight:600;font-size:18px}
.reels-tbtn{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;color:#fff;pointer-events:auto}
.reels-tbtn svg,.reel-act svg,.reel-sound svg,.reel-burst svg{fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.reels-tbtn svg{width:24px;height:24px}
.reel-actions{position:absolute;right:max(8px,calc(50% - var(--vv-h,100vh) * 9 / 32 + 8px));bottom:calc(96px + env(safe-area-inset-bottom,0px));display:flex;flex-direction:column;gap:16px;align-items:center}
.reel-act{display:flex;flex-direction:column;align-items:center;gap:3px;color:#fff;font-size:12.5px;font-weight:600;text-shadow:0 1px 3px rgba(0,0,0,.6);min-width:52px}
.reel-act svg{width:30px;height:30px;filter:drop-shadow(0 1px 2px rgba(0,0,0,.5))}
.reel-act.liked{color:#FF3B5C}
.reel-act.liked svg{fill:currentColor}
.reel-info{position:absolute;left:max(0px,calc(50% - var(--vv-h,100vh) * 9 / 32));right:max(72px,calc(50% - var(--vv-h,100vh) * 9 / 32 + 72px));bottom:0;padding:40px 14px calc(18px + env(safe-area-inset-bottom,0px));background:linear-gradient(transparent,rgba(0,0,0,.55));display:flex;flex-direction:column;gap:6px;pointer-events:none}
.reel-author{display:flex;align-items:center;gap:8px;color:#fff;font-size:14.5px;pointer-events:auto;align-self:flex-start;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.reel-when{opacity:.8;font-size:13px}
.reel-caption{font-size:14.5px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere;max-height:6.2em;overflow:hidden;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.reel-views{font-size:12.5px;opacity:.75}
.reel-sound{position:absolute;top:calc(64px + env(safe-area-inset-top,0px));right:14px;width:32px;height:32px;border-radius:50%;background:rgba(0,0,0,.45);display:grid;place-items:center;pointer-events:none}
.reel-sound svg{width:18px;height:18px}
.reel-sound.flash{animation:reelflash .6s ease-out}
@keyframes reelflash{0%{transform:scale(1.5)}100%{transform:scale(1)}}
.reel-burst{position:absolute;left:50%;top:50%;width:110px;height:110px;margin:-55px 0 0 -55px;color:#fff;opacity:0;pointer-events:none}
.reel-burst svg{width:100%;height:100%;fill:#fff;stroke:none;filter:drop-shadow(0 4px 12px rgba(0,0,0,.4))}
.reel-burst.go{animation:reelburst .8s ease-out}
@keyframes reelburst{0%{opacity:0;transform:scale(.4)}15%{opacity:1;transform:scale(1.1)}30%{transform:scale(.95)}70%{opacity:1}100%{opacity:0;transform:scale(1)}}
.reels-empty{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:24px;text-align:center}
.reels-empty h3{margin:0;font-size:18px}
.reels-empty p{margin:0 0 6px;opacity:.75}
.reel-comments{display:flex;flex-direction:column;gap:12px;max-height:50vh;overflow-y:auto}
.rc{display:flex;gap:10px;align-items:flex-start}
.rc-body{flex:1;min-width:0;font-size:14px}
.rc-when{color:var(--muted);font-size:12.5px}
.rc-text{white-space:pre-wrap;overflow-wrap:anywhere;margin-top:1px}
.rc .icon-btn{width:30px;height:30px}
.rc .icon-btn svg{width:16px;height:16px}
.sheet-foot .field{flex:1;min-width:0}
/* ---------- bottom tab bar: floating glass capsule ---------- */
:root{--side-w:350px;--glass:rgba(255,255,255,.72);--glass-line:rgba(30,23,38,.08);--glass-pill:rgba(30,23,38,.08)}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--glass:rgba(34,28,42,.72);--glass-line:rgba(255,255,255,.1);--glass-pill:rgba(255,255,255,.12)}}
:root[data-theme="dark"]{--glass:rgba(34,28,42,.72);--glass-line:rgba(255,255,255,.1);--glass-pill:rgba(255,255,255,.12)}
@media (min-width:761px){#app{grid-template-columns:var(--side-w) minmax(0,1fr)}}
#reelsBtn,#meBtn{display:none}
.tabbar{position:fixed;z-index:19;left:calc(14px + env(safe-area-inset-left,0px));right:calc(14px + env(safe-area-inset-right,0px));bottom:calc(10px + env(safe-area-inset-bottom,0px));
  height:62px;padding:6px;display:flex;gap:4px;border-radius:31px;background:var(--glass);border:1px solid var(--glass-line);
  -webkit-backdrop-filter:blur(24px) saturate(1.8);backdrop-filter:blur(24px) saturate(1.8);box-shadow:0 10px 32px rgba(20,10,30,.18),0 1px 2px rgba(20,10,30,.08)}
@media (min-width:761px){.tabbar{right:auto;width:calc(var(--side-w) - 28px)}}
.tab{flex:1;height:100%;border-radius:25px;display:grid;place-items:center;color:var(--fg);transition:background .2s;-webkit-tap-highlight-color:transparent}
.tab[aria-current="page"]{background:var(--glass-pill)}
.tab:active{transform:scale(.94)}
.tab-ico{position:relative;display:grid;place-items:center}
.tab-ico svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.tab[aria-current="page"] .tab-ico svg{stroke-width:2.4}
.tab .av{box-shadow:0 0 0 1.5px var(--glass-line)}
.tab[aria-current="page"] .av{box-shadow:0 0 0 2px var(--fg)}
.tab-dot{position:absolute;right:-4px;bottom:-2px;width:10px;height:10px;border-radius:50%;background:#FF3040;border:2px solid var(--panel)}
.kb-open .tabbar{display:none}
@media (max-width:760px){.in-chat .tabbar{display:none}}
/* Room for the capsule under the last chat and over reel captions */
#list{padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))}
.reel-info{padding-bottom:calc(92px + env(safe-area-inset-bottom,0px))}
.reel-actions{bottom:calc(170px + env(safe-area-inset-bottom,0px))}
.tab-pad{padding:4px 16px 8px}
.profile-tab{padding:18px 16px 24px;display:flex;flex-direction:column;gap:18px}
.pt-card{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
.pt-name{font-family:var(--display);font-weight:600;font-size:20px;margin-top:6px}
.pt-group{display:flex;flex-direction:column;background:var(--bg);border-radius:16px;overflow:hidden}
.pt-row{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;text-align:left;font-size:15px;border-bottom:1px solid var(--line)}
.pt-row:last-child{border-bottom:0}
.pt-row:hover{background:var(--hover)}
.pt-row svg{width:18px;height:18px;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.pt-row.danger{color:var(--danger)}
/* ---------- METOCH brand ---------- */
.logo{font-weight:800;letter-spacing:-.02em}
.logo-mark{width:30px;height:30px;background:none;border-radius:0;display:block}
.auth-card .logo-mark{width:40px;height:40px}
.logo-mark .logo-svg{width:100%;height:100%;display:block}
.logo-svg .lb{fill:#3D5AFE}
.logo-svg .lm{fill:none;stroke:#fff;stroke-width:6;stroke-linecap:round;stroke-linejoin:round}
.logo-svg .ld{fill:var(--mark);stroke:var(--panel);stroke-width:4}
#main{background-image:none}
/* round avatars everywhere */
.av,.av .face{border-radius:50%}
.story-ring{border-radius:50%}
.badge{background:var(--mark);color:#fff}
.tab-dot{background:var(--mark)}
/* incoming: white with a hairline; own: brand blue with white text */
.msg{border:1px solid var(--line);box-shadow:none;border-radius:20px 20px 20px 6px;padding:8px 12px 6px}
.msg.out{color:var(--out-ink);border-color:transparent;border-radius:20px 20px 6px 20px}
.msg.out .foot,.msg.out .txt.deleted{color:rgba(255,255,255,.78)}
.msg.out .foot .read{color:#fff}
.msg.out .txt a{color:#fff;text-decoration:underline}
.msg.out .fwd{color:#DCE3FF}
.msg.out .att-file{background:rgba(255,255,255,.16);color:#fff}
.msg.out .att-file .fs{color:rgba(255,255,255,.78)}
.msg.out .att-file .fi{background:#fff;color:#3D5AFE}
.msg.round,.msg.round.out{border-color:transparent;color:var(--fg)}
.msg.round.out .foot{color:var(--muted)}
.msg.round.out .foot .read{color:var(--accent)}
.msg.round.out .fwd{color:var(--accent)}
.send{background:#3D5AFE;color:#fff}
.btn{border-radius:14px}
.btn.small{border-radius:12px}
.field{border-radius:14px}
:root{--glass:rgba(255,255,255,.74)}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--glass:rgba(22,28,44,.74)}}
:root[data-theme="dark"]{--glass:rgba(22,28,44,.74)}
/* ---------- avatar photo editor ---------- */
.photo-btns{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.photo-sub{display:flex;gap:6px;flex-wrap:wrap}
.ae{position:fixed;left:0;right:0;top:var(--vv-top,0px);height:var(--vv-h,100%);z-index:22;background:#0B0F19;color:#fff;display:flex;flex-direction:column;padding:env(safe-area-inset-top,0px) 0 calc(14px + env(safe-area-inset-bottom,0px))}
.ae-head{display:flex;align-items:center;justify-content:space-between;padding:10px 8px;font-size:16px}
.ae-link{min-width:72px;height:44px;padding:0 12px;color:#fff;font-size:16px}
.ae-link.strong{color:#8FA2FF;font-weight:700}
.ae-stage{position:relative;flex:1;min-height:0;display:grid;place-items:center;margin:0 auto;width:min(100%,560px);overflow:hidden}
.ae-canvas{display:block;touch-action:none;cursor:grab;border-radius:6px}
.ae-canvas:active{cursor:grabbing}
.ae-frame{position:absolute;pointer-events:none;border-radius:50%;box-shadow:0 0 0 2px rgba(255,255,255,.9),0 0 0 9999px rgba(11,15,25,.62)}
.ae-holder{position:relative;overflow:hidden;border-radius:6px}
.ae-zoomrow{display:flex;align-items:center;gap:12px;width:min(100% - 48px,420px);margin:14px auto 4px;color:rgba(255,255,255,.7)}
.ae-zoomrow svg{width:22px;height:22px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.ae-zoom{flex:1;accent-color:#3D5AFE;height:44px}
.ae-tools{display:flex;justify-content:center;gap:28px;padding-top:6px}
.ae-tool{display:flex;flex-direction:column;align-items:center;gap:4px;color:#fff;font-size:12.5px;min-width:64px}
.ae-tool svg{width:44px;height:44px;padding:11px;border-radius:50%;background:rgba(255,255,255,.12);fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* touch screens: the hover-only delete button would stick after a tap; the message menu covers deleting */
@media (hover:none){.msg .del{display:none!important}}
/* swipe right in a chat to go back: the chat slides away, the list comes in from under it */
@media (max-width:760px){
  #app.swipe-back #side{display:flex;position:absolute;inset:0;z-index:1;transform:translateX(calc((var(--sb,0px) - 100vw) * .3))}
  #app.swipe-back #main{position:absolute;inset:0;z-index:2;transform:translateX(var(--sb,0px));box-shadow:-12px 0 32px rgba(14,20,36,.18)}
  #app.swipe-anim #side,#app.swipe-anim #main{transition:transform .22s ease-out}
}
/* ---------- logo: icon + the "mesech" wordmark ---------- */
.logo{font-family:"Geologica",var(--display);font-weight:800;font-size:23px;letter-spacing:-.045em;gap:9px}
.logo-mark{width:32px;height:32px}
.auth-card .logo{font-size:34px;gap:12px}
.auth-card .logo-mark{width:48px;height:48px}
.wordmark{display:inline-flex;align-items:baseline;line-height:1}
.auth-card .logo-mark svg.logo-svg,.logo-mark svg.logo-svg{width:100%;height:100%}

/* ================= METOCH bento theme (brand screens "iOS — чаты" / "iOS — переписка") ================= */
:root{
  --bg:#FFFFFF; --panel:#FFFFFF; --fill:#F2F2F7; --line:#E5E5EA; --sep:#C6C6C8; --fg:#15122B; --muted:#6C6C70;
  --accent:#6E4BFF; --accent-ink:#FFFFFF; --accent-soft:#EEEBFF; --mark:#FF3B30;
  --out:#6E4BFF; --out-ink:#FFFFFF; --in:#E9E9EB; --chat-bg:#FFFFFF; --head:rgba(249,249,251,.94);
  --hover:#F6F5FA; --sel:#EEEBFF; --ok:#12805C; --danger:#E0262D; --shadow:0 1px 2px rgba(21,18,43,.06);
  --display:"Geologica",-apple-system,system-ui,sans-serif;
  --body:-apple-system,"SF Pro Text",system-ui,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;
  --glass:rgba(255,255,255,.92); --glass-line:rgba(21,18,43,.1); --glass-pill:#EEEBFF;
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#0F0D1C; --panel:#15122B; --fill:#241F3D; --line:#2C2747; --sep:#3A3456; --fg:#F4F2FF; --muted:#A39FBA;
  --accent:#8B6DFF; --accent-ink:#FFFFFF; --accent-soft:#2A2352; --mark:#FF453A;
  --out:#6E4BFF; --out-ink:#FFFFFF; --in:#262140; --chat-bg:#0F0D1C; --head:rgba(21,18,43,.94);
  --hover:#1E1A36; --sel:#2A2352; --ok:#4CC79A; --danger:#FF6B6B; --shadow:0 1px 2px rgba(0,0,0,.4);
  --glass:rgba(21,18,43,.9); --glass-line:rgba(255,255,255,.1); --glass-pill:#2A2352;
  color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0F0D1C; --panel:#15122B; --fill:#241F3D; --line:#2C2747; --sep:#3A3456; --fg:#F4F2FF; --muted:#A39FBA;
  --accent:#8B6DFF; --accent-ink:#FFFFFF; --accent-soft:#2A2352; --mark:#FF453A;
  --out:#6E4BFF; --out-ink:#FFFFFF; --in:#262140; --chat-bg:#0F0D1C; --head:rgba(21,18,43,.94);
  --hover:#1E1A36; --sel:#2A2352; --ok:#4CC79A; --danger:#FF6B6B; --shadow:0 1px 2px rgba(0,0,0,.4);
  --glass:rgba(21,18,43,.9); --glass-line:rgba(255,255,255,.1); --glass-pill:#2A2352;
  color-scheme:dark}
body{font-size:16px;-webkit-font-smoothing:antialiased}

/* fields and buttons: grey tiles and pills */
.field{background:var(--fill);border:1px solid transparent;border-radius:12px;padding:10px 14px}
.field:focus{border-color:var(--accent);background:var(--panel)}
.search-wrap .field{height:40px;padding:8px 14px}
.btn{border-radius:22px;height:44px;padding:0 20px}
.btn.small{border-radius:16px;height:34px;padding:0 14px}
.btn.ghost{background:var(--fill);color:var(--fg)}
#newBtn{background:var(--accent);color:#fff;width:40px;height:40px}
#newBtn:hover{background:var(--accent);color:#fff;filter:brightness(1.08)}
#newBtn svg{width:19px;height:19px}

/* avatars: pastel circles, dark Geologica letters */
.av{color:#15122B;font-family:var(--display);font-weight:800}
.av .dot{background:#34C759;border-color:var(--panel)}

/* chat list: taller rows, hairline separators */
.item{grid-template-columns:52px minmax(0,1fr) auto;min-height:74px;padding:8px 16px;position:relative}
.item::after{content:"";position:absolute;left:80px;right:0;bottom:0;height:1px;background:var(--sep);transform:scaleY(.5);transform-origin:bottom}
.item .t{font-size:17px;font-weight:600}
.item .p{font-size:15px}
.item .meta{font-size:14px}
.item.active{background:var(--sel)}
.badge{background:var(--accent);color:#fff;min-width:22px;height:22px;border-radius:11px;font-size:13px}
.sec-label{color:var(--muted)}

/* conversation */
#main{background:var(--chat-bg)}
.chat-head{background:var(--head);-webkit-backdrop-filter:saturate(1.6) blur(18px);backdrop-filter:saturate(1.6) blur(18px);border-bottom:0;box-shadow:inset 0 -.5px 0 var(--sep)}
.chat-head .icon-btn{color:var(--accent)}
.chat-head .name{font-size:17px}
.chat-head .status.on{color:var(--ok)}
.day{background:none;box-shadow:none;padding:4px 0 6px;font-size:12px;font-weight:600}
.msg,.msg.out,.msg.cont,.msg.out.cont{border:0;border-radius:18px;padding:8px 13px 6px;box-shadow:none;font-size:16px;line-height:1.32}
.msg.out .att-file .fi{color:#6E4BFF}
.msg .fwd{color:var(--accent)}
.msg.out .fwd{color:#E6DFFF}

/* composer: round grey tools, hairline field, violet send circle */
.composer{background:var(--panel);border-top:0;gap:8px;align-items:flex-end}
.composer .icon-btn{width:40px;height:40px;background:var(--fill);color:var(--fg);margin-bottom:2px}
.composer textarea{background:var(--panel);border:1px solid var(--sep);border-radius:22px;padding:10px 16px;min-height:44px}
.composer textarea:focus{border-color:var(--accent)}
.send{background:var(--accent);color:#fff;width:40px;height:40px;margin-bottom:2px}
.send svg{width:18px;height:18px;stroke-width:2.6}
.upload-note,.edit-bar{border-top:0}

/* sheets, sign-in, profile tab */
.sheet{border-radius:24px}
#auth{background:var(--fill)}
.auth-card{box-shadow:0 10px 40px rgba(21,18,43,.10)}
.pt-group{background:var(--fill)}
.blank-card{box-shadow:none;background:var(--fill)}

/* tab bar capsule: lilac pill and violet icon for the open tab */
.tab[aria-current="page"]{color:var(--accent)}
.tab[aria-current="page"] .av{box-shadow:0 0 0 2px var(--accent)}

/* call screen and editors in brand night */
.call{background:#15122B}
.ae{background:#0F0D1C}
.ae-zoom{accent-color:#6E4BFF}
.ae-link.strong{color:#B7A6FF}
.item{-webkit-touch-callout:none;user-select:none}
/* ---------- chat folders: Telegram-style tabs ---------- */
.ftabs{flex:none;display:flex;gap:2px;overflow-x:auto;padding:0 10px;border-bottom:1px solid var(--line);scrollbar-width:none}
.ftabs::-webkit-scrollbar{display:none}
.ftab{position:relative;flex:none;height:42px;padding:0 12px;display:flex;align-items:center;gap:6px;font-size:15px;font-weight:600;color:var(--muted);white-space:nowrap;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;user-select:none}
.ftab.on{color:var(--accent)}
.ftab.on::after{content:"";position:absolute;left:10px;right:10px;bottom:0;height:3px;border-radius:3px 3px 0 0;background:var(--accent)}
.fcount{min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:var(--muted);color:var(--panel);font-size:12px;font-weight:700;display:grid;place-items:center}
.ftab.on .fcount{background:var(--accent);color:#fff}
#list.slide-l{animation:fslidel .22s ease-out}
#list.slide-r{animation:fslider .22s ease-out}
@keyframes fslidel{from{transform:translateX(28px);opacity:.3}}
@keyframes fslider{from{transform:translateX(-28px);opacity:.3}}
.frow{display:flex;gap:12px;align-items:flex-start;padding:6px 0;cursor:pointer}
.frow input{width:20px;height:20px;accent-color:var(--accent);margin-top:2px;flex:none}
.fset{display:flex;align-items:center;gap:4px;padding:8px 0;border-bottom:1px solid var(--line)}
.fset-main{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left}
.fset .icon-btn{width:36px;height:36px}
.fset .icon-btn svg{width:18px;height:18px}
.menu-item.fmenu{display:flex;align-items:center;justify-content:space-between}
.menu-item.fmenu svg{width:20px;height:20px;fill:none;stroke:var(--accent);stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.menu-item:disabled{opacity:.6;cursor:default}
.person:disabled{opacity:.75;cursor:default}
/* ---------- stories fold like Telegram: small stack in the header, big row when pulled down ---------- */
.stories{max-height:0;padding-top:0;padding-bottom:0;opacity:0;overflow-y:hidden;transition:max-height .28s ease,opacity .2s ease,padding .28s ease}
.stories.open{max-height:110px;padding:2px 14px 10px;opacity:1}
.story-mini{display:flex;align-items:center;padding:4px 6px;margin-right:2px;border-radius:20px;-webkit-tap-highlight-color:transparent}
.story-mini:hover{background:var(--hover)}
.sm-ring{display:block;padding:1.5px;border-radius:50%;border:2px solid var(--line);background:var(--panel)}
.sm-ring.unseen{border-color:var(--accent)}
.sm-ring+.sm-ring{margin-left:-11px}
.sm-ring .av{font-size:10px!important}
/* small story circles sit right after the logo; the compose button stays at the right edge */
.side-head .logo{flex:none}
.side-head .story-mini{margin-left:2px}
.side-head #newBtn{margin-left:auto}
/* ---------- voice messages ---------- */
/* the composer shows the mic while the field is empty and the send arrow once there is text */
.composer:has(#sendBtn:disabled) #sendBtn{display:none}
.composer:not(:has(#sendBtn:disabled)) #micBtn{display:none}
.mic{touch-action:none;-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
.mic svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.composer.rec textarea,.composer.rec #attBtn,.composer.rec #roundBtn{display:none}
.vrec{flex:1;min-width:0;height:44px;display:flex;align-items:center;gap:10px;padding:0 6px;font-variant-numeric:tabular-nums}
.vrec .rec-dot{width:10px;height:10px;border-radius:50%;background:#FF3B30;animation:recblink 1s steps(2,start) infinite}
.vr-time{font-weight:600;min-width:40px}
.vr-hint{flex:1;text-align:center;color:var(--muted);font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.composer.cancel .vr-hint{color:#FF3B30}
.composer.rec:not(.locked) #micBtn{transform:scale(1.35);box-shadow:0 0 0 8px var(--accent-soft)}
.composer.rec #micBtn{transition:transform .15s}
.composer.locked #micBtn{display:none!important}
.vrec .vr-trash{margin-left:auto;color:#FF3B30}
.vrec .vr-send{width:40px;height:40px}
.vrec .vr-send svg{width:18px;height:18px}
.voice{display:flex;align-items:center;gap:10px;min-width:min(240px,62vw);padding:2px 0 4px}
.vplay{width:42px;height:42px;border-radius:50%;flex:none;display:grid;place-items:center;background:var(--accent);color:#fff}
.vplay svg{width:20px;height:20px;fill:currentColor;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round}
.msg.out .vplay{background:#fff;color:var(--out)}
.vmid{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.vwave{display:flex;align-items:center;gap:2px;height:28px;cursor:pointer}
.vwave i{flex:1;max-width:3px;min-width:2px;border-radius:2px;background:currentColor;opacity:.32}
.vwave i.on{opacity:1}
.msg:not(.out) .vwave{color:var(--accent)}
.vfoot{display:flex;align-items:center;gap:8px;font-size:12px;font-variant-numeric:tabular-nums;opacity:.85}
.vspeed{height:20px;padding:0 7px;border-radius:10px;font-size:11.5px;font-weight:700;background:rgba(127,127,127,.18);color:inherit}
/* chat list: last message shown on up to two lines, like Telegram */
.item{align-items:start;min-height:80px;padding-top:10px;padding-bottom:10px}
.item>.av{align-self:center}
.item .p{white-space:normal;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;line-height:1.3;overflow-wrap:anywhere}
.item .meta{padding-top:2px}
/* capsule sits low like Instagram: into the home-indicator zone, just above the bar (iPhone: ~17pt from the edge) */
.tabbar{bottom:calc(4px + env(safe-area-inset-bottom,0px) * .4)}
#list{padding-bottom:calc(78px + env(safe-area-inset-bottom,0px) * .4)}
.reel-info{padding-bottom:calc(80px + env(safe-area-inset-bottom,0px) * .4)}
/* App-like: long presses never select interface text (menus, buttons, lists, tabs, titles) or pop the iOS
   copy/look-up callout. Selecting stays where it is useful: message text, fields, comments, captions. */
html{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}
.msg .txt,.rc-text,.reel-caption,.sv-caption,input,textarea,[contenteditable]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}
.msg .txt .foot{-webkit-user-select:none;user-select:none}
/* ---------- chat peek + action menu (long press on a chat, Telegram-style) ---------- */
.peek{position:fixed;left:0;right:0;top:var(--vv-top,0px);height:var(--vv-h,100%);z-index:21;display:flex;flex-direction:column;justify-content:center;gap:12px;
  padding:calc(16px + env(safe-area-inset-top,0px)) 12px calc(16px + env(safe-area-inset-bottom,0px));background:rgba(10,8,25,.42);
  -webkit-backdrop-filter:blur(18px) saturate(1.2);backdrop-filter:blur(18px) saturate(1.2);animation:peekin .18s ease-out}
@keyframes peekin{from{opacity:0}}
.peek-card{width:min(560px,100%);align-self:center;height:min(52vh,460px);display:flex;flex-direction:column;background:var(--chat-bg);border-radius:28px;overflow:hidden;box-shadow:0 18px 50px rgba(0,0,0,.28);text-align:left;animation:peekcard .2s ease-out}
@keyframes peekcard{from{transform:scale(.94);opacity:.6}}
.peek-head{display:flex;flex-direction:column;align-items:center;gap:1px;padding:10px 12px 8px;background:var(--head)}
.peek-head b{font-size:17px}
.peek-head span{font-size:13px;color:var(--muted)}
.peek-msgs{flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column;justify-content:flex-end;gap:4px;padding:8px 12px 12px}
.pm{max-width:78%;align-self:flex-start;padding:6px 11px;border-radius:16px;background:var(--in);font-size:14.5px;line-height:1.3;overflow-wrap:anywhere;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
.pm.out{align-self:flex-end;background:var(--out);color:var(--out-ink)}
.peek-menu{align-self:flex-end;width:min(300px,82%);background:var(--panel);border-radius:22px;padding:6px;box-shadow:0 12px 40px rgba(0,0,0,.25);animation:peekcard .2s ease-out}
@media (min-width:761px){.peek-menu{align-self:center;width:min(320px,100%)}}
.pk-item{display:flex;align-items:center;gap:14px;width:100%;min-height:48px;padding:10px 14px;border-radius:14px;font-size:16px;text-align:left;color:var(--fg)}
.pk-item:hover{background:var(--hover)}
.pk-item:disabled{opacity:.55}
.pk-item svg{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.pk-item.danger{color:var(--danger)}
.pk-item.muted{color:var(--muted)}
.pk-item[aria-checked="true"] svg{stroke:var(--accent);stroke-width:2.4}
.pk-sep{height:1px;background:var(--line);margin:4px 10px}
/* chat list marks */
.item .t{display:flex;align-items:center;gap:5px}
.item .t>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ico.t-muted{width:15px;height:15px;flex:none;color:var(--muted);stroke-width:2}
.badge.muted{background:var(--muted)}
.badge.dot{min-width:12px;width:12px;height:12px;padding:0;margin-top:5px}
.ico.pinned{width:18px;height:18px;color:var(--muted);stroke-width:1.9}
.peek-head,.peek-msgs{align-self:stretch;width:100%}
/* ---------- channels ---------- */
.msg .foot .views{display:inline-flex;align-items:center;gap:3px;margin-right:6px}
.msg .foot .views svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8}
.channel-bar{flex:1;height:44px;border-radius:22px;background:var(--fill);color:var(--accent);font-weight:600;font-size:16px}
.ch-link{display:flex;align-items:center;gap:0;background:var(--fill);border-radius:12px;padding-left:14px;color:var(--muted);font-size:15px}
.ch-link .field{background:transparent;padding-left:2px}
.ch-card{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;padding:4px 0 8px}
.ch-card b{font-family:var(--display);font-size:20px;font-weight:800}
.ch-desc{margin:4px 0 0;white-space:pre-wrap;line-height:1.4}
.ch-linkrow{display:flex;align-items:center;gap:8px;justify-content:space-between;background:var(--fill);border-radius:14px;padding:8px 8px 8px 14px;font-size:14.5px;color:var(--accent);overflow:hidden}
.ch-linkrow span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ch-posts{display:flex;flex-direction:column;gap:6px;max-height:40vh;overflow-y:auto;background:var(--fill);border-radius:16px;padding:10px}
.ch-post{background:var(--panel);border-radius:14px;padding:8px 12px;font-size:15px;line-height:1.35;white-space:pre-wrap;overflow-wrap:anywhere}
.ch-post-meta{display:block;text-align:right;font-size:12px;color:var(--muted);margin-top:2px}
.tabs button{white-space:nowrap}
.ch-link span{white-space:nowrap;flex:none}
.msg.post{max-width:min(560px,88%);border-radius:18px 18px 18px 6px}
/* group / channel photo in their info cards */
.photo-pick{position:relative;border-radius:50%}
.photo-cam{position:absolute;right:-2px;bottom:-2px;width:30px;height:30px;border-radius:50%;background:var(--accent);color:#fff;border:3px solid var(--panel);display:grid;place-items:center}
.photo-cam svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2}
.ch-card .photo-sub{justify-content:center}
/* official metoch channel */
.official-av{border-radius:50%;overflow:hidden;display:block;flex:none}
.official-av svg{width:100%;height:100%;display:block}
.official-title{display:inline-flex;align-items:center;gap:5px;min-width:0}
.official-title .wordmark{font-family:"Geologica",var(--display);font-weight:800;letter-spacing:-.045em;font-size:1.08em}
.ico.verified{width:17px;height:17px;flex:none;fill:var(--accent);stroke:#fff;stroke-width:2}
.chat-head .official-title .wordmark{font-size:19px}

/* ---------- profiles and following (Instagram-style header) ---------- */
.ig-wrap{display:flex;flex-direction:column;gap:8px}
.ig-head{display:flex;align-items:center;gap:14px}
.ig-pic{position:relative;flex:none;border-radius:50%;padding:0}
.ig-pic.ring{padding:3px;box-shadow:0 0 0 2.5px var(--accent)}
.ig-plus{position:absolute;right:-2px;bottom:-2px;width:26px;height:26px;border-radius:50%;background:var(--fg);color:var(--panel);border:3px solid var(--panel);display:grid;place-items:center}
.ig-plus svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round}
.ig-right{flex:1;min-width:0;display:flex;flex-direction:column;gap:8px}
.ig-name{font-weight:600;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ig-stats{display:flex;gap:8px}
.ig-stat{flex:1;min-width:0;display:flex;flex-direction:column;align-items:flex-start;text-align:left;color:var(--fg)}
.ig-stat b{font-size:18px;font-weight:700}
.ig-stat span{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
button.ig-stat:hover b{color:var(--accent)}
.ig-bio{font-size:15px;white-space:pre-wrap;overflow-wrap:anywhere}
.ig-btns{display:flex;gap:8px}
.ig-btns .btn{flex:1}
.ig-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:2px;margin:4px -20px 0}
.ig-cell{position:relative;aspect-ratio:3/4;overflow:hidden;background:#000;padding:0;border-radius:0}
.ig-cell video{width:100%;height:100%;object-fit:cover;pointer-events:none}
.ig-views{position:absolute;left:6px;bottom:5px;display:flex;align-items:center;gap:4px;color:#fff;font-size:13px;font-weight:600;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.ig-views svg{width:15px;height:15px;fill:none;stroke:#fff;stroke-width:2}
.ig-play{width:100%;max-height:70vh;border-radius:12px;background:#000}

/* ---------- channel page (Instagram-style) ---------- */
#msgs.ch-page{padding:0;display:block;overflow-y:auto}
.ch-head{display:flex;flex-direction:column;gap:12px;padding:16px 16px 4px}
.ch-head .ig-pic{padding:0}
.ch-tabs{display:flex;margin-top:14px;border-bottom:1px solid var(--line)}
.ch-tab{flex:1;height:44px;display:grid;place-items:center;color:var(--muted);position:relative}
.ch-tab svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ch-tab.on{color:var(--fg)}
.ch-tab.on::after{content:"";position:absolute;left:28%;right:28%;bottom:-1px;height:1.5px;background:var(--fg)}
.ch-grid{margin:2px 0 0}
.ch-grid .ig-cell img{width:100%;height:100%;object-fit:cover}
.ch-kind{position:absolute;right:6px;top:5px;color:#fff;font-size:12px;font-weight:700;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.ch-feed{display:flex;flex-direction:column}
.ch-post{display:flex;flex-direction:column;gap:10px;padding:14px 0;border-bottom:1px solid var(--line)}
.ch-post-head{display:flex;align-items:center;gap:10px;padding:0 16px}
.ch-post-head .grow{flex:1;min-width:0;display:flex;flex-direction:column}
.ch-post-head b{font-size:14px}
.ch-post-head span{font-size:12px;color:var(--muted)}
.ch-time{font-size:13px;color:var(--muted);white-space:nowrap}
.ch-media{width:100%;max-height:75vh;object-fit:cover;background:#000;display:block}
img.ch-media{cursor:zoom-in}
.ch-att{padding:0 16px}
.ch-text{padding:0 16px;font-size:15px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere}
.ch-foot{display:flex;gap:14px;padding:0 16px;font-size:13px;color:var(--muted)}
.ch-foot .views{display:inline-flex;align-items:center;gap:4px}
.ch-foot svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2}
.ch-empty{display:flex;flex-direction:column;align-items:center;gap:6px;padding:36px 32px;text-align:center}
.ch-empty b{font-size:19px}
.ch-empty span{color:var(--muted);font-size:15px}
.ch-end{height:24px}
.np-prev{display:flex;align-items:flex-end;gap:10px}
.np-prev img,.np-prev video{width:110px;height:110px;object-fit:cover;border-radius:12px;background:#000}

/* replies: the quote inside a bubble */
.reply-q{display:block;width:100%;text-align:left;border:0;margin:0 0 4px;padding:4px 8px;border-left:3px solid var(--accent);border-radius:8px;background:rgba(108,92,231,.10);color:inherit;font:inherit;font-size:13px;line-height:1.3;cursor:pointer;min-width:0}
.reply-q b{display:block;color:var(--accent);font-weight:600}
.reply-q span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;opacity:.8}
.reply-q span.gone{font-style:italic}
.msg.out .reply-q{border-left-color:#fff;background:rgba(255,255,255,.18)}
.msg.out .reply-q b{color:#fff}
.msg.round .reply-q{background:var(--panel);max-width:240px}
.msg.round.out .reply-q{border-left-color:var(--accent)}
.msg.round.out .reply-q b{color:var(--accent)}
.msg.flash{animation:msgflash 1.2s ease-out}
@keyframes msgflash{0%,40%{filter:brightness(.85) saturate(1.3)}100%{filter:none}}
#replyBar>svg{fill:currentColor;stroke:none}


/* "human" mark by the names of people who passed the liveness check */
.human-tag{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:7px;background:#1FAF6B;color:#fff;font-size:10.5px;font-weight:700;letter-spacing:.2px;line-height:15px;vertical-align:2px;text-transform:lowercase}

/* orange "AI" mark by the official metoch channel */
.ai-tag{display:inline-block;padding:1px 6px;border-radius:7px;background:#FF8A00;color:#fff;font-size:10.5px;font-weight:800;letter-spacing:.3px;line-height:15px;flex:none}

/* ---------- parity with the iOS app ---------- */
/* few messages sit at the bottom, by the composer */
#msgs:not(.ch-page)>:first-child{margin-top:auto}
/* the round-video button goes away while typing, like in the app */
.composer:not(:has(#sendBtn:disabled)) #roundBtn{display:none}
/* own last message: read ticks by the time instead of "Вы:" */
.item .meta .lt{display:inline-flex;align-items:center;gap:3px}
.lt-tick{display:inline-flex;color:var(--muted)}
.lt-tick svg{width:18px;height:12px}
/* channel header: "@handle" in the middle, no photo or subscriber count, "⋯" on the right */
.chat-head.chan-head .who .av,.chat-head.chan-head #chatStatus{display:none}
.chat-head.chan-head .who{justify-content:center}
.chat-head.chan-head .who>div{text-align:center}
.chat-head.chan-head .name{display:inline-flex;align-items:center;gap:5px;font-weight:700}
.chat-head.chan-head .name .ico.verified{width:16px;height:16px}
/* profile row in the accent colour ("Подтвердить, что я человек") */
.pt-row.accent span{color:var(--accent)}
.human-info{display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;padding:6px 4px 10px}
.human-info p{margin:0}
.human-tag.big{font-size:18px;line-height:26px;padding:1px 10px;border-radius:10px;margin:0}
/* "Друзья из контактов" card */
.contacts-block{background:var(--fill);border-radius:18px;padding:16px;border-bottom:0;display:flex;flex-direction:column;gap:8px}
.contacts-block .cb-title{font-size:17px;font-weight:600;color:var(--fg)}
.contacts-block .cb-text{font-size:15px;color:var(--muted);line-height:1.35}
.contacts-block .cb-actions{margin-top:4px}
.contacts-block .cb-btn{width:100%;min-height:50px;border-radius:25px;font-size:17px;font-weight:600}

/* group page: "Удалить" next to a member (admins) */
.person .danger-text{color:var(--danger);flex:none}

/* "human" check */
.hc-wrap{display:flex;flex-direction:column;align-items:center;gap:16px;padding:6px 0 12px}
.hc-circle{position:relative;width:min(260px,70vw);aspect-ratio:1}
.hc-video{width:100%;height:100%;object-fit:cover;border-radius:50%;transform:scaleX(-1);background:#000}
.hc-ring{position:absolute;inset:-6px;width:calc(100% + 12px);height:calc(100% + 12px);transform:rotate(-90deg);pointer-events:none}
.hc-ring circle{fill:none;stroke:#1FAF6B;stroke-width:3;stroke-linecap:round;transition:stroke-dashoffset .3s}
.hc-prompt{font-size:19px;font-weight:600;text-align:center;min-height:52px}
.hc-dots{display:flex;gap:8px}
.hc-dots span{width:28px;height:6px;border-radius:3px;background:var(--fill)}
.hc-dots span.on{background:#1FAF6B}
.hc-problem{color:var(--danger);font-weight:500}
.hc-done{width:64px;height:64px;border-radius:50%;background:#1FAF6B;color:#fff;font-size:36px;line-height:64px;font-weight:700}

/* reports, blocking */
.report-reason{display:flex;align-items:center;gap:10px;cursor:pointer}
.report-reason input{accent-color:var(--accent)}
.auth-consent{font-size:12.5px;margin-top:10px}
.auth-consent a{color:var(--accent)}
.report{border:1px solid var(--line);border-radius:14px;padding:12px;margin-bottom:10px;display:flex;flex-direction:column;gap:6px}
.report.closed{opacity:.55}
.report-head{display:flex;flex-direction:column;gap:2px}
.report-body{white-space:pre-line;overflow-wrap:anywhere}
.btn.danger-text{color:var(--danger)}

/* channel posts, as on Instagram */
.ch-post{gap:0;padding:6px 0 18px}
.ch-post-head{padding:6px 6px 8px 14px}
.ch-post-head b{display:inline-flex;align-items:center;gap:5px}
.ch-post-head .ico.verified{width:14px;height:14px}
.ch-media-wrap{position:relative}
.ch-actions{display:flex;align-items:center;gap:16px;padding:10px 14px 0}
.ch-actions .pa{display:inline-flex;align-items:center;gap:6px;padding:0;color:var(--fg)}
.ch-actions .pa b{font-size:15px}
.pa-ico svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;display:block}
.pa-ico.liked svg{fill:#FF3B5C;stroke:#FF3B5C}
.ch-actions .views{display:inline-flex;align-items:center;gap:5px;color:var(--muted);font-size:14px;font-weight:600}
.ch-caption{padding:6px 14px 0;font-size:15px;line-height:1.4;white-space:pre-wrap;overflow-wrap:anywhere}
.ch-caption.folded{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;white-space:normal}
.ch-more{padding:0 14px;color:var(--muted);font-size:15px}
.ch-ago{padding:6px 14px 0;font-size:12px;color:var(--muted)}
.pa-flash{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%) scale(.4);opacity:0;pointer-events:none}
.pa-flash svg{width:96px;height:96px;fill:#fff;stroke:none;filter:drop-shadow(0 2px 8px rgba(0,0,0,.35))}
.pa-flash.on{animation:paflash .9s ease-out}
@keyframes paflash{15%{opacity:.95;transform:translate(-50%,-50%) scale(1)}70%{opacity:.95;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) scale(1)}}

/* channel page: posts right under the header; Instagram-like comments */
.ch-sep{height:1px;background:var(--line);margin-top:14px}
.ch-allc{display:block;padding:6px 14px 0;color:var(--muted);font-size:14px;text-align:left}
.pc-list{display:flex;flex-direction:column;gap:14px;max-height:55vh;overflow-y:auto}
.pc-item{display:flex;align-items:flex-start;gap:10px}
.pc-item .grow{flex:1;min-width:0}
.pc-head{display:flex;align-items:center;gap:6px;font-size:14px}
.pc-head .human-tag{margin-left:0}
.pc-text{font-size:15px;white-space:pre-wrap;overflow-wrap:anywhere}
.pc-foot{gap:8px}
.pc-foot .field{flex:1;min-width:0}
