:root{--bg:#0c0c11;--surface:#16161d;--raised:#23232e;--well:#121218;--txt:#e9e9f0;--mute:#a0a0b2;--accent:#5b4a9e;--on-accent:#f4f2ff;--green:#34d399;--danger:#ffb4b4;color-scheme:dark}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{background:var(--bg);color:var(--txt);font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans",sans-serif;font-size:15px;line-height:1.45;-webkit-tap-highlight-color:transparent}
button,input,textarea,select{font:inherit;color:inherit}
button{border:0;cursor:pointer;-webkit-user-select:none;user-select:none}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #c4b5fd;outline-offset:2px}
h1,h2,p{margin:0}
#root{height:100%;max-width:520px;margin:0 auto;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}

/* promo */
.promo{flex:1;min-height:0;display:flex;flex-direction:column;background:#000}
.promo video{flex:1;min-height:0;width:100%;object-fit:contain;background:#000}
.promo-bar{display:flex;gap:10px;justify-content:center;padding:10px 16px}

/* shell */
.hdr{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px}
.brand{display:flex;align-items:center;gap:10px;min-width:0}
.brand img{width:40px;height:40px;border-radius:50%;object-fit:cover;box-shadow:0 6px 18px rgba(0,0,0,.55)}
.brand b{font-size:18px}
.hdr-r{display:flex;align-items:center;gap:8px}
.avatar{width:44px;height:44px;flex-shrink:0;border-radius:50%;background:#2a2440;color:var(--txt);font-weight:700;font-size:14px;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 6px 18px rgba(0,0,0,.5);padding:0}
.avatar img{width:100%;height:100%;object-fit:cover}
.avatar.sm{width:40px;height:40px;font-size:13px}
.avatar.lg{width:64px;height:64px;font-size:18px}
.pill{height:44px;padding:0 14px;border-radius:22px;background:var(--surface);font-weight:600;font-size:13px;box-shadow:0 6px 18px rgba(0,0,0,.5);display:flex;align-items:center;gap:6px;white-space:nowrap;max-width:120px;overflow:hidden;text-overflow:ellipsis}
.ticker{margin:0 16px;padding:10px 14px;border-radius:14px;box-shadow:0 8px 22px rgba(0,0,0,.45);display:flex;align-items:center;gap:10px;overflow:hidden}
.tag{flex-shrink:0;padding:3px 8px;border-radius:8px;background:#2a2a36;color:var(--txt);font-size:11px;font-weight:700;letter-spacing:.04em}
.tag.live{background:#12352f;color:#6ee7c0}
.tick-win{flex:1;min-width:0;overflow:hidden;white-space:nowrap}
.tick-run{display:inline-block;padding-left:100%;font-size:14px;animation:tick linear infinite}
@keyframes tick{from{transform:translateX(0)}to{transform:translateX(-100%)}}
@media (prefers-reduced-motion:reduce){.tick-run{animation:none;padding-left:0}}
.main{flex:1;min-height:0;overflow-y:auto;padding:14px 16px 16px;display:flex;flex-direction:column;gap:12px}
.nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;padding:8px;background:var(--well);box-shadow:0 -8px 26px rgba(0,0,0,.5)}
.nav button{height:54px;border-radius:14px;background:transparent;color:var(--mute);font-size:12px;font-weight:600;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}
.nav button[aria-current="page"]{background:var(--raised);color:var(--txt);font-weight:700}
.foot{padding:8px 16px 10px;background:var(--well);text-align:center;font-size:12px;color:var(--mute)}
.foot.plain{background:transparent}

/* pieces */
.btn{min-height:48px;padding:0 18px;border-radius:14px;background:var(--surface);font-weight:600;font-size:14px;box-shadow:0 6px 16px rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;gap:8px;text-align:center}
.btn.pri{background:var(--accent);color:var(--on-accent);font-weight:700;box-shadow:0 8px 22px rgba(0,0,0,.5)}
.btn.flat{background:var(--raised);box-shadow:none}
.btn.danger{background:#2a1a1a;color:var(--danger);box-shadow:none}
.btn.sm{min-height:44px;padding:0 14px;border-radius:12px;font-size:13px}
.btn.big{min-height:96px;border-radius:18px;flex-direction:column}
.btn[disabled]{opacity:.5}
.row2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.row3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.line{display:flex;gap:10px}
.line > input{flex:1;min-width:0}
.card{padding:14px;border-radius:18px;background:var(--surface);box-shadow:0 10px 26px rgba(0,0,0,.45);display:flex;flex-direction:column;gap:12px}
.card.ad{background:#14141a}
.item{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:18px;background:var(--surface);box-shadow:0 10px 26px rgba(0,0,0,.45);width:100%;text-align:left}
.item .grow{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.item b,.who b{font-size:15px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sub{font-size:13px;color:var(--mute)}
.tiny{font-size:12px;color:var(--mute)}
.h1{font-size:20px;font-weight:700}
.h2{font-size:13px;font-weight:700;letter-spacing:.06em;color:var(--mute);text-transform:uppercase;margin-top:4px}
.who{display:flex;align-items:center;gap:10px;background:transparent;padding:0;text-align:left;min-height:44px;min-width:0}
.who .grow{display:flex;flex-direction:column;gap:2px;min-width:0}
.seg{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:4px;border-radius:16px;background:var(--well)}
.seg button{height:44px;border-radius:12px;background:transparent;color:var(--mute);font-weight:600;font-size:14px}
.seg button[aria-pressed="true"]{background:var(--raised);color:var(--txt);font-weight:700;box-shadow:0 4px 12px rgba(0,0,0,.45)}
.field{display:flex;flex-direction:column;gap:6px}
.field label,.lbl{font-size:13px;font-weight:600;color:#c9c9d6}
input[type=text],input[type=tel],input[type=email],input[type=number],input[type=date],textarea{height:48px;padding:0 14px;border:0;border-radius:14px;background:var(--surface);box-shadow:inset 0 2px 6px rgba(0,0,0,.5);font-size:15px;width:100%;min-width:0}
textarea{height:auto;min-height:72px;padding:12px 14px;resize:vertical}
.sheet input[type=text],.sheet input[type=number],.sheet textarea{background:var(--well)}
input::placeholder,textarea::placeholder{color:#8f8fa3}
input[type=checkbox]{width:22px;height:22px;margin:0;accent-color:var(--accent);flex-shrink:0}
input[type=color]{width:48px;height:44px;border:0;border-radius:10px;background:transparent;padding:0}
.chk{display:flex;align-items:center;gap:10px;min-height:44px;font-size:14px}
.note{padding:12px 14px;border-radius:14px;font-size:13px;line-height:1.5}
.note.warn{background:#1d1712;color:#f3c98b}
.note.info{background:#131a22;color:#b9d4ee}
.note.err{background:#2a1a1a;color:var(--danger)}
.bal{padding:18px;border-radius:20px;background:var(--green);color:#06281d;text-align:left;box-shadow:0 12px 30px rgba(0,0,0,.55);display:flex;flex-direction:column;gap:6px;width:100%}
.bal .n{font-size:32px;font-weight:700}
.bal span{font-size:13px;font-weight:600}
.pack{min-height:68px;border-radius:16px;background:var(--accent);color:var(--on-accent);box-shadow:0 8px 22px rgba(0,0,0,.5);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}
.pack b{font-size:16px}.pack span{font-size:12px;font-weight:600}
.hist{padding:4px 14px;border-radius:18px;background:var(--surface);box-shadow:0 10px 26px rgba(0,0,0,.45)}
.hist div{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px}
.plus{color:#6ee7c0;font-weight:700}.minus{color:var(--danger);font-weight:700}
.kv{border-radius:14px;background:var(--well);padding:2px 14px}
.kv div{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px}
.kv span:first-child{font-size:13px;color:var(--mute)}
.kv span:last-child{font-size:14px;font-weight:600;text-align:right;overflow-wrap:anywhere}
.acts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.acts .btn{min-height:44px;padding:0 6px;font-size:13px;border-radius:12px}
.cnt{font-size:12px;color:var(--mute);font-weight:600}
.msgs{flex:1;min-height:120px;display:flex;flex-direction:column;gap:8px}
.msg{align-self:flex-start;max-width:86%;padding:10px 12px;border-radius:14px;background:var(--surface);font-size:14px;overflow-wrap:anywhere;text-align:left}
.msg.me{align-self:flex-end;background:#2a2440}
.msg small{display:block;font-size:11px;color:var(--mute);margin-bottom:2px}
.txt{font-size:15px;line-height:1.5;overflow-wrap:anywhere;white-space:pre-wrap}

/* sheets */
.veil{position:fixed;inset:0;background:rgba(0,0,0,.6);display:flex;align-items:flex-end;justify-content:center;z-index:20}
.sheet{width:100%;max-width:520px;max-height:88%;overflow-y:auto;padding:16px 16px calc(16px + env(safe-area-inset-bottom,0px));border-radius:22px 22px 0 0;background:#1b1b24;box-shadow:0 -14px 34px rgba(0,0,0,.6);display:flex;flex-direction:column;gap:12px}
.menu{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.menu .btn{min-height:56px;flex-direction:column;gap:4px;font-size:13px;padding:0 6px;background:var(--raised);box-shadow:none}
.menu .btn.pri{background:var(--accent)}
.toast{position:fixed;left:50%;bottom:110px;transform:translateX(-50%);padding:10px 16px;border-radius:14px;background:#2a2a36;color:var(--txt);font-size:14px;box-shadow:0 10px 26px rgba(0,0,0,.6);z-index:30;max-width:90%;text-align:center}
.langs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.rule{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px}
.rule label{font-size:14px;flex:1}
.rule input{width:96px;height:44px;text-align:right;background:var(--well)}
.center{flex:1;display:flex;flex-direction:column;justify-content:center;gap:14px;padding:16px}
.line > .btn{flex-shrink:0}

/* ---- compact sizes ---- */
.host{display:contents}
body{font-size:14px}
.hdr{padding:8px 12px;gap:6px}
.brand{flex:1;min-width:0;gap:8px}
.brand img{width:32px;height:32px}
.brand b{font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hdr-r{flex-shrink:0;gap:6px}
.hdr .avatar{width:36px;height:36px;font-size:12px}
.pill{height:36px;padding:0 10px;border-radius:18px;font-size:12px;max-width:none}
.pill.name{display:block;max-width:104px;overflow:hidden;text-overflow:ellipsis;line-height:36px}
.pill.pi,.btn.pi{background:#7a2a63;color:#fbeaf5;font-weight:700}
.btn.pi{box-shadow:0 8px 22px rgba(0,0,0,.5)}
.ticker{margin:0 12px;padding:7px 12px;border-radius:12px}
.tick-run{font-size:13px}
.main{padding:12px 12px 14px;gap:10px}
.btn{min-height:42px;padding:0 14px;border-radius:12px;font-size:13px}
.btn.sm{min-height:38px;padding:0 12px}
.btn.big{min-height:80px;border-radius:16px}
input[type=text],input[type=tel],input[type=email],input[type=number],input[type=date]{height:44px;font-size:14px;border-radius:12px}
.h1{font-size:18px}
.h2{font-size:12px}
.card{padding:12px;border-radius:16px;gap:10px}
.item{padding:10px 12px;border-radius:16px}
.item b,.who b{font-size:14px}
.txt{font-size:14px}
.avatar.sm{width:36px;height:36px;font-size:12px}
.avatar.lg{width:56px;height:56px;font-size:16px}
.seg button{height:38px;font-size:13px}
.acts .btn{min-height:38px}
.menu .btn{min-height:52px;font-size:12px}
.bal{padding:14px;border-radius:16px;gap:4px}
.bal .n{font-size:26px}
.bal span{font-size:12px}
.pack{min-height:56px;border-radius:14px}
.pack b{font-size:14px}.pack span{font-size:11px}
.hist div{min-height:48px}
.nav{padding:6px}
.nav button{height:48px;font-size:11px;border-radius:12px}
.foot{padding:6px 12px 8px;font-size:11px}
.center{padding:8px 0;justify-content:flex-start}

/* ---- ticker: endless loop ---- */
.tick-track{display:inline-flex;white-space:nowrap;will-change:transform}
.tick-track.go{animation:tickloop linear infinite}
.tick-grp{display:inline-flex}
.tick-unit{padding-right:48px;font-size:13px}
@keyframes tickloop{from{transform:translateX(0)}to{transform:translateX(-50%)}}
@media (prefers-reduced-motion:reduce){.tick-track.go{animation:none}}
.logo-big{width:88px;height:88px;border-radius:22px;align-self:center;box-shadow:0 10px 30px rgba(0,0,0,.45)}
/* day theme: the same layout, light colours, softer shadows */
:root[data-theme=light]{--bg:#f4f4f8;--surface:#ffffff;--raised:#ececf3;--well:#eeeef4;--txt:#1b1b24;--mute:#5d5d70;--accent:#5b4a9e;--on-accent:#ffffff;--green:#34d399;--danger:#b3261e;color-scheme:light}
:root[data-theme=light] .avatar,:root[data-theme=light] .msg.me{background:#e4def8}
:root[data-theme=light] .tag,:root[data-theme=light] .toast{background:#e6e6ee;color:var(--txt)}
:root[data-theme=light] .tag.live{background:#d6f5ea;color:#0b6b4c}
:root[data-theme=light] .btn.danger,:root[data-theme=light] .note.err{background:#fbe4e2;color:var(--danger)}
:root[data-theme=light] .card.ad{background:#f7f5ff}
:root[data-theme=light] .field label,:root[data-theme=light] .lbl{color:#3c3c4c}
:root[data-theme=light] input::placeholder,:root[data-theme=light] textarea::placeholder{color:#8a8a9c}
:root[data-theme=light] .note.warn{background:#fdf1de;color:#7a4b00}
:root[data-theme=light] .note.info{background:#e3eefb;color:#1d4f86}
:root[data-theme=light] .plus{color:#0b8a5f}
:root[data-theme=light] .sheet{background:#ffffff}
:root[data-theme=light] button:focus-visible,:root[data-theme=light] a:focus-visible,:root[data-theme=light] input:focus-visible,:root[data-theme=light] textarea:focus-visible{outline-color:#5b4a9e}
:root[data-theme=light] .pill,:root[data-theme=light] .avatar,:root[data-theme=light] .btn:not(.flat):not(.danger),:root[data-theme=light] .card,:root[data-theme=light] .hist,:root[data-theme=light] .ticker,:root[data-theme=light] .bal,:root[data-theme=light] .pack,:root[data-theme=light] .item{box-shadow:0 4px 14px rgba(30,30,60,.12)}
:root[data-theme=light] .sheet{box-shadow:0 -10px 30px rgba(30,30,60,.18)}
[dir=rtl] .pill.name,[dir=rtl] .foot,[dir=rtl] .bal .n,[dir=rtl] .pack b{direction:ltr;unicode-bidi:isolate}

/* ---------- 20 Nov 2026: chat room, writing box, send button, attachments, feed pen button ---------- */
.main>*{flex-shrink:0}
/* inside a chat the page itself does not scroll: header on top, messages scroll, writing box stays at the bottom */
.main.room{overflow:hidden;padding-bottom:10px}
.main.room .msgs{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:2px 2px 6px;flex-shrink:1}
.room-head{display:flex;align-items:center;gap:10px}
.ell{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.face-btn{padding:0;border-radius:50%;background:none;display:flex}
.msg-row{display:flex;align-items:flex-end;gap:8px;max-width:92%}
.msg-row .avatar{flex:none}
.msg-row .msg{max-width:100%}
.msg-t{display:block;white-space:pre-wrap}
.room-ad{position:relative}
.room-ad .card{padding:10px 12px;gap:6px}
.room-ad .ad-img{max-height:120px}
.room-ad .chip-x{position:absolute;top:8px;right:8px}
.composer{display:flex;flex-direction:column;gap:8px}
.comp-row{display:flex;align-items:center;gap:8px}
.comp-row input,.comp-row textarea{flex:1;min-width:0}
.composer.big .comp-row{align-items:flex-end}
.composer.big textarea{min-height:110px;resize:vertical}
.clip-btn{width:44px;height:44px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--raised);color:var(--txt);cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,.35)}
.attach-chip{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:14px;background:var(--raised)}
.attach-chip img{width:48px;height:48px;border-radius:10px;object-fit:cover}
.chip-x{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--well);color:var(--txt)}
/* the send button: Infinora colours, lifts and glows when sending */
.send-btn{position:relative;width:48px;height:48px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;
  background:linear-gradient(135deg,#ff9a3c 0%,#ff4fa3 55%,#a347ff 100%);box-shadow:0 6px 18px rgba(255,79,163,.35);transition:transform .15s}
.send-btn:active{transform:scale(.94)}
.send-btn svg{transition:transform .2s}
.send-btn.fly{animation:send-pop .6s cubic-bezier(.2,.8,.2,1)}
.send-btn.fly svg{animation:send-fly .6s ease-in-out}
.send-btn.fly::after{content:"";position:absolute;inset:-4px;border-radius:50%;border:2px solid #ff4fa3;animation:send-ring .6s ease-out forwards;pointer-events:none}
@keyframes send-pop{0%{transform:translateY(0) scale(1)}35%{transform:translateY(-8px) scale(1.12);box-shadow:0 14px 30px rgba(255,79,163,.55)}100%{transform:translateY(0) scale(1)}}
@keyframes send-fly{0%{transform:translate(0,0)}40%{transform:translate(14px,-14px);opacity:0}41%{transform:translate(-12px,12px);opacity:0}100%{transform:translate(0,0);opacity:1}}
@keyframes send-ring{0%{transform:scale(1);opacity:.9}100%{transform:scale(1.6);opacity:0}}
@media (prefers-reduced-motion:reduce){.send-btn.fly,.send-btn.fly svg{animation:none}.send-btn.fly::after{animation-duration:.01s}}
/* attached files */
.att-img{display:block;padding:0;margin:4px 0;border-radius:12px;overflow:hidden;background:var(--well);max-width:260px}
.att-img img{display:block;width:100%;max-height:320px;object-fit:cover}
.card .att-img{max-width:100%}
.att-pdf{display:flex;align-items:center;gap:10px;margin:4px 0;padding:10px 12px;border-radius:12px;background:var(--well);color:var(--txt);text-decoration:none}
.full-img{width:100%;max-height:70vh;object-fit:contain;border-radius:12px}
.cam-view{width:100%;max-height:50vh;border-radius:14px;background:#000;transform:scaleX(-1)}
/* ads with a picture */
.ad-img{width:100%;max-height:220px;object-fit:cover;border-radius:12px}
.ad-thumb{width:48px;height:48px;border-radius:10px;object-fit:cover;flex:none}
.places{display:flex;flex-direction:column;gap:2px}
.places .tiny{margin:0 0 8px 30px}
/* the round pen button for a new post: low on the right, above Rewards */
.fab{position:fixed;z-index:15;right:max(16px,calc(50vw - 244px));bottom:calc(env(safe-area-inset-bottom,0px) + 112px);width:58px;height:58px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;color:#fff;background:linear-gradient(135deg,#ff9a3c 0%,#ff4fa3 55%,#a347ff 100%);box-shadow:0 10px 26px rgba(255,79,163,.45)}
.fab:active{transform:scale(.94)}
.fab-space{height:70px}

/* ---------- 20 Nov 2026 (round 2) ---------- */
/* buttons sit higher, clear of the phone's own buttons; copyright line above them */
.nav{padding:6px 8px calc(10px + env(safe-area-inset-bottom,0px));margin-bottom:6px;border-radius:18px 18px 0 0}
.foot{background:transparent;padding:4px 12px 4px}
.nav button{position:relative}
.dot{display:inline-block;width:9px;height:9px;border-radius:50%;background:#ff4f6d;box-shadow:0 0 0 2px var(--bg);flex:none}
.nav-dot{position:absolute;top:6px;right:calc(50% - 18px)}
.seg.four{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
.seg.four button{font-size:12px;display:flex;align-items:center;justify-content:center;gap:4px;padding:0 4px}
/* chat list: last words, time, unread dot */
.item-top,.item-bot{display:flex;align-items:center;gap:8px;min-width:0}
.item-top b{flex:1;min-width:0}
.item-bot .sub{flex:1;min-width:0}
.item.unread .item-top b{font-weight:800}
.item.unread .item-bot .sub{color:var(--txt);font-weight:600}
.pin-ic{color:var(--mute);display:flex}
.sub.ell,.tiny.ell{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.head-t{background:none;padding:0;text-align:left;display:flex;flex-direction:column;gap:1px}
.icon-btn{width:38px;height:38px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--raised);color:var(--txt)}
/* glass send and attach buttons: light, like water */
.send-btn{width:40px;height:40px;background:rgba(255,255,255,.10);color:var(--txt);border:1px solid rgba(255,255,255,.16);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 4px 14px rgba(0,0,0,.28),inset 0 1px 0 rgba(255,255,255,.18)}
.send-btn.own-color{color:#fff;border-color:transparent}
.send-btn.fly::after{border-color:rgba(196,181,253,.8)}
.clip-btn{width:36px;height:36px;background:rgba(255,255,255,.07);border:1px solid rgba(255,255,255,.12);box-shadow:none;color:var(--mute)}
:root[data-theme=light] .send-btn{background:rgba(91,74,158,.10);border-color:rgba(91,74,158,.18);color:#3b2f7a;box-shadow:0 3px 10px rgba(30,30,60,.12)}
:root[data-theme=light] .clip-btn{background:rgba(0,0,0,.04);border-color:rgba(0,0,0,.08)}
.btn-sym{font-size:20px;line-height:1}
.btn-pic{width:70%;height:70%;object-fit:contain;border-radius:6px}
.fab .btn-sym{font-size:26px}
.send-btn.fly>*,.fab.fly>*{animation:send-fly .6s ease-in-out}
.send-btn[data-anim].fly>*,.fab[data-anim].fly>*{animation:none}
.send-btn[data-anim=pulse].fly,.fab[data-anim=pulse].fly{animation:b-pulse .6s ease}
.send-btn[data-anim=bounce].fly,.fab[data-anim=bounce].fly{animation:b-bounce .7s cubic-bezier(.3,1.6,.5,1)}
.send-btn[data-anim=spin].fly>*,.fab[data-anim=spin].fly>*{animation:b-spin .6s ease}
.send-btn[data-anim=heart].fly,.fab[data-anim=heart].fly{animation:b-heart .7s ease}
.send-btn[data-anim=fly].fly>*,.fab[data-anim=fly].fly>*{animation:send-fly .7s ease-in-out}
@keyframes b-pulse{50%{transform:scale(1.25)}}
@keyframes b-bounce{30%{transform:translateY(-12px)}60%{transform:translateY(0)}80%{transform:translateY(-4px)}}
@keyframes b-spin{to{transform:rotate(360deg)}}
@keyframes b-heart{15%{transform:scale(1.3)}30%{transform:scale(1)}45%{transform:scale(1.2)}60%{transform:scale(1)}}
.preview{pointer-events:none}
/* photos: whole picture, never cut */
.att-img{max-width:260px;background:#000}
.att-img img{width:auto;max-width:100%;max-height:340px;object-fit:contain;margin:0 auto}
.viewer{position:fixed;inset:0;z-index:50;background:#000;display:flex;align-items:center;justify-content:center;touch-action:none;overflow:hidden}
.viewer-img{max-width:100%;max-height:100%;object-fit:contain;user-select:none;-webkit-user-select:none;will-change:transform}
.viewer-x{position:absolute;top:calc(12px + env(safe-area-inset-top,0px));right:12px;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;display:flex;align-items:center;justify-content:center}
/* calls in a chat, and the Calls list */
.call-line{align-self:center;display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:14px;background:var(--well);font-size:12px;color:var(--mute)}
.call-line.miss,.sub.miss{color:#ff6b81}
.call-ic{display:inline-flex;align-items:center;justify-content:center;color:#6ee7c0;vertical-align:middle}
.call-ic.miss{color:#ff6b81}
/* the call screen */
.call-ov{position:fixed;inset:0;z-index:45;background:radial-gradient(circle at 50% 30%,#2a2147,#0b0b10 70%);color:#fff;display:flex;flex-direction:column;align-items:center;
  padding:calc(24px + env(safe-area-inset-top,0px)) 16px calc(24px + env(safe-area-inset-bottom,0px))}
.call-head{display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;z-index:2}
.avatar.xl{width:112px;height:112px;font-size:34px;margin-top:30px}
.call-name{font-size:22px}
.call-st{font-size:14px;color:#c9c3e6}
.call-grid{flex:1;width:100%;max-width:520px;display:grid;gap:6px;margin:12px 0;min-height:0;grid-template-columns:1fr;grid-auto-rows:1fr}
.call-grid:empty{visibility:hidden}
.call-grid[data-n="2"],.call-grid[data-n="3"],.call-grid[data-n="4"]{grid-template-columns:1fr 1fr}
.call-grid[data-n="5"],.call-grid[data-n="6"],.call-grid[data-n="7"],.call-grid[data-n="8"],.call-grid[data-n="9"]{grid-template-columns:1fr 1fr 1fr}
.tile{position:relative;border-radius:14px;overflow:hidden;background:#16161d;min-height:0}
.tile video{width:100%;height:100%;object-fit:cover}
.tile-n{position:absolute;left:8px;bottom:6px;font-size:12px;background:rgba(0,0,0,.5);padding:2px 8px;border-radius:8px}
.call-me{position:absolute;right:14px;bottom:calc(118px + env(safe-area-inset-bottom,0px));width:96px;height:132px;border-radius:14px;overflow:hidden;z-index:3}
.call-me:empty{display:none}
.call-me video{width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}
.call-ov.back .call-me video{transform:none}
.call-ov.video .call-head{position:absolute;top:calc(14px + env(safe-area-inset-top,0px));left:0;right:0}
.call-ov.video .call-head .avatar{display:none}
.call-bar{display:flex;gap:18px;justify-content:center;flex-wrap:wrap;z-index:2;margin-top:auto}
.call-btn{width:64px;display:flex;flex-direction:column;align-items:center;gap:6px;background:none;color:#fff;font-size:11px}
.call-btn svg{width:58px;height:58px;padding:16px;border-radius:50%;background:rgba(255,255,255,.14);box-sizing:border-box}
.call-btn.on svg{background:#fff;color:#111}
.call-btn.red svg{background:#e5484d}
.call-btn.green svg{background:#22a06b}
/* group and channel info */
.mem-list{display:flex;flex-direction:column;gap:6px}
.mem{display:flex;align-items:center;gap:8px}
.mem-n{flex:1;min-width:0;background:none;padding:0;text-align:left;display:flex;align-items:center;gap:8px}
.mem-n b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
/* Moments */
.fab2{bottom:calc(env(safe-area-inset-bottom,0px) + 182px);width:48px;height:48px;right:max(21px,calc(50vw - 239px));background:rgba(255,255,255,.12);
  border:1px solid rgba(255,255,255,.18);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 6px 18px rgba(0,0,0,.35)}
:root[data-theme=light] .fab2{background:rgba(91,74,158,.14);color:#3b2f7a}
.moment-box,.moment-frame{position:relative;align-self:center;width:min(240px,70vw);aspect-ratio:1;border-radius:50%;overflow:hidden;padding:0;background:#000;
  box-shadow:0 0 0 3px #a347ff,0 10px 26px rgba(0,0,0,.45)}
.moment-v{width:100%;height:100%;object-fit:cover;display:block}
.moment-v.mirror{transform:scaleX(-1)}
.moment-play{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:#fff;background:rgba(0,0,0,.18)}
.moment-box.on .moment-play{display:none}
.moment-hold{position:relative;align-self:center;width:84px;height:84px;border-radius:50%;background:#e5484d;color:#fff;font-weight:700;touch-action:none;
  box-shadow:0 0 0 6px rgba(229,72,77,.25)}
.moment-hold.rec{transform:scale(1.12);box-shadow:0 0 0 10px rgba(229,72,77,.35)}
.moment-ring{position:absolute;inset:-8px;border-radius:50%;background:conic-gradient(#fff calc(var(--p,0)*360deg),transparent 0);
  -webkit-mask:radial-gradient(circle,transparent 58%,#000 60%);mask:radial-gradient(circle,transparent 58%,#000 60%)}
.moment-secs{position:relative}
/* admin */
.card.hl{border:1px solid rgba(163,71,255,.45);box-shadow:0 0 0 3px rgba(163,71,255,.10),0 10px 26px rgba(0,0,0,.45)}
.card.hl.ticker-box{border-color:rgba(255,154,60,.55);box-shadow:0 0 0 3px rgba(255,154,60,.10),0 10px 26px rgba(0,0,0,.45)}
.card.inner{background:var(--well);box-shadow:none}
.tag.only{background:#3a2a10;color:#ffcf8a}
:root[data-theme=light] .tag.only{background:#fff1d6;color:#7a4b00}
.quick{display:flex;flex-wrap:wrap;gap:6px}
.quick .q{width:40px;height:40px;border-radius:10px;background:var(--raised);font-size:20px}
.quick .q.on{outline:2px solid #c4b5fd}
select{height:44px;border:0;border-radius:12px;background:var(--well);padding:0 10px;width:100%}
.aim{display:flex;flex-direction:column;gap:8px}
.aim-row{display:flex;gap:8px;align-items:center}
.aim-row input{flex:1;min-width:0;background:var(--well)}
.aim-chips{display:flex;flex-wrap:wrap;gap:6px}
.aim-chip{display:inline-flex;align-items:center;gap:4px;padding:4px 4px 4px 10px;border-radius:14px;background:var(--raised);font-size:13px}
.aim-chip.world{padding:4px 10px}
.aim-chip .chip-x{width:24px;height:24px}

/* ---------- 20 Nov 2026 (round 3) ---------- */
/* the bottom buttons sit above the phone's own ◀ ● ■ buttons (--navlift is set on Android phones, see main.js) */
.nav{margin-bottom:calc(6px + var(--navlift,0px))}
/* the writing box: no outer line, in any chat or post */
.comp-row input,.comp-row textarea,.comp-row input:focus,.comp-row textarea:focus,.comp-row input:focus-visible,.comp-row textarea:focus-visible{outline:none;box-shadow:none;border-color:transparent}
/* the three round buttons (Send, Moment ◎, new post ✎) share one look: dark glass, a little smaller */
.fab,.fab2{width:46px;height:46px;right:max(18px,calc(50vw - 242px));color:var(--txt);background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);
  -webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);box-shadow:0 6px 18px rgba(0,0,0,.35)}
.fab{bottom:calc(env(safe-area-inset-bottom,0px) + var(--navlift,0px) + 112px)}
.fab2{bottom:calc(env(safe-area-inset-bottom,0px) + var(--navlift,0px) + 168px)}
.fab.own-color{color:#fff;border-color:transparent}
:root[data-theme=light] .fab,:root[data-theme=light] .fab2{background:rgba(91,74,158,.14);color:#3b2f7a;border-color:rgba(91,74,158,.18)}
.send-btn{width:40px;height:40px;background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.18)}
/* microphone in place of Send while nothing is written */
.composer .mic-btn{display:none;touch-action:none;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
.composer:not(.has-text) .comp-row>.send-btn:not(.mic-btn){display:none}
.composer:not(.has-text) .mic-btn{display:flex}
.composer.rec .clip-btn,.composer.rec .comp-row>input,.composer.rec .comp-row>textarea,.composer.rec .comp-row>.send-btn:not(.mic-btn){display:none}
.composer.rec .mic-btn{display:flex;background:#e5484d;color:#fff;transform:scale(1.15)}
.composer.rec .rec-bar{flex:1}
.rec-bar{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 6px}
.rec-dot{width:10px;height:10px;border-radius:50%;background:#e5484d;animation:recblink 1s infinite}
@keyframes recblink{50%{opacity:.25}}
.rec-time{font-variant-numeric:tabular-nums;font-weight:700}
.rec-hint{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.composer.rec:has(.rec-ok) .mic-btn{display:none}
/* a voice message */
.voice{display:flex;align-items:center;gap:10px;min-width:200px;max-width:280px;padding:4px 2px}
.vo-btn{width:38px;height:38px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.14);color:var(--txt)}
.vo-bar{flex:1;height:4px;border-radius:2px;background:rgba(255,255,255,.18);overflow:hidden}
.vo-fill{display:block;height:100%;width:0;background:#c4b5fd;transition:width .2s linear}
.vo-time{font-size:12px;color:var(--mute);font-variant-numeric:tabular-nums;min-width:34px;text-align:right}
:root[data-theme=light] .vo-btn{background:rgba(91,74,158,.12)}
:root[data-theme=light] .vo-bar{background:rgba(0,0,0,.12)}
.moment-hold{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
/* when something goes wrong, a message instead of a black screen */
.center .note.err{max-width:320px;text-align:center}
/* Support & Query */
.tk{display:flex;flex-direction:column;gap:6px}
.tk .tk-reply{border-left:3px solid #c4b5fd;padding:6px 10px;background:var(--well);border-radius:8px}
.tk-img{max-width:160px;max-height:200px;border-radius:10px;object-fit:contain;background:#000}
.flash{animation:flash 1.1s ease-in-out infinite}
@keyframes flash{50%{box-shadow:0 0 0 6px rgba(255,79,109,.35);background:#ff4f6d;color:#fff}}
.pill .dot{margin-left:6px}
textarea.tk-in{width:100%;min-height:96px;background:var(--well);border:0;border-radius:12px;padding:10px;color:var(--txt);font:inherit;resize:vertical}

/* ---------- 21 Nov 2026 (round 4) ---------- */
:root{--tick:#e040fb}
/* message bubble: name (groups), photo/file, words, then time and ticks on the right */
.msg small.by{margin-bottom:4px;font-weight:600}
.msg .meta{display:flex;justify-content:flex-end;align-items:center;gap:4px;margin-top:4px;font-size:11px;color:var(--mute);white-space:nowrap}
.tick{display:inline-flex;color:var(--mute)}
.tick.read{color:var(--tick)}
.views{font-size:11px}
/* photos without any frame: their own shape, rounded corners; very tall ones are cut to a sensible height */
.att-img,.att-img img{background:transparent}
.att-img{max-width:100%;margin:2px 0 4px;border-radius:12px}
.att-img img{width:100%;max-width:100%;height:auto;max-height:420px;object-fit:cover;object-position:center;border-radius:12px;margin:0}
.msg.has-img{padding:4px 4px 6px;max-width:78%;width:280px}
.msg.has-img .msg-t,.msg.has-img small.by,.msg.has-img .meta{padding:0 8px}
.msg.bare{position:relative;padding:3px}
.msg.bare .att-img{margin:0}
.msg.bare .meta{position:absolute;right:10px;bottom:10px;margin:0;padding:2px 8px;border-radius:10px;background:rgba(0,0,0,.45);color:#fff}
.msg.bare .meta .tick{color:#fff}
.msg.bare .meta .tick.read{color:var(--tick)}
.card .att-img{margin:6px 0}
.card .att-img img{max-height:520px}
.att-video{position:relative}
.att-video video{display:block;width:100%;max-height:420px;object-fit:cover;border-radius:12px}
.att-video .moment-play{border-radius:12px}
/* a PDF: one clean line */
.att-pdf{width:100%;text-align:left;background:rgba(255,255,255,.06);border:0}
.att-pdf .grow{display:flex;flex-direction:column;min-width:0}
.att-pdf .ell{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pdf-ic{flex:none;width:38px;height:44px;border-radius:6px;background:#e5484d;color:#fff;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center}
:root[data-theme=light] .att-pdf{background:rgba(0,0,0,.05)}
/* the full-screen video and PDF */
.viewer-video{max-width:100%;max-height:100%;background:#000}
.viewer.pdf{flex-direction:column;justify-content:flex-start;touch-action:auto;overflow:auto;background:#1b1b22}
.pdf-top{position:sticky;top:0;z-index:2;width:100%;display:flex;align-items:center;gap:8px;padding:calc(10px + env(safe-area-inset-top,0px)) 12px 10px;background:#111;color:#fff}
.pdf-top b{flex:1;min-width:0}
.viewer-x.static{position:static}
.pdf-pages{display:flex;flex-direction:column;align-items:center;gap:8px;padding:8px}
.pdf-page{background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.4)}
.txt{display:block}
.msg-t a,.txt a{color:#c4b5fd;text-decoration:underline}
:root[data-theme=light] .msg-t a,:root[data-theme=light] .txt a{color:#5b3fd0}
/* admin: treasury and reports */
.stat3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.stat3 div{background:var(--well);border-radius:12px;padding:10px;text-align:center}
.stat3 b{display:block;font-size:18px}
.rep{display:flex;flex-direction:column;gap:6px}
.rep .q{border-left:3px solid #ff6b81;padding:4px 10px;background:var(--well);border-radius:8px}
textarea.tk-in.mono{font-family:ui-monospace,monospace;font-size:13px}
