/* Relaxtay Chat — styles. Design tokens follow My Tasks (system font, violet accent, soft neutrals, rounded corners);
   the layout follows a Slack-style workspace: dark sidebar, conversation in the middle, threads on the right. */
:root{
  --bg:#ffffff; --surface:#ffffff; --surface2:#f6f5fb; --hover:#f7f6fb; --text:#1d1b2e; --muted:#6c6987; --line:#e6e3f1; --line2:#efedf6;
  --accent:#6a5ae0; --accent-ink:#ffffff; --accent-soft:#ebe8fd; --link:#4b3fc4;
  --red:#e0525e; --red-soft:#fde9eb; --green:#2fb57d; --amber:#e39a2d; --mention:#fff4d6; --mention-ink:#8a5a00;
  --side:#2f1f45; --side-top:#271936; --side-ink:rgba(255,255,255,.74); --side-ink-hi:#fff; --side-hover:rgba(255,255,255,.07); --side-sel:#6a5ae0; --side-line:rgba(255,255,255,.1);
  --shadow:0 1px 2px rgba(30,24,70,.06),0 6px 20px rgba(30,24,70,.08); --shadow-lg:0 20px 50px rgba(30,24,70,.22);
  --r:10px; --r-lg:16px; --tabbar:60px; --side-w:264px; --thread-w:420px;
  --safe-b:env(safe-area-inset-bottom,0px); --safe-t:env(safe-area-inset-top,0px);
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--text);font-family:var(--font);font-size:15px;line-height:1.46;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%}
body{overflow:hidden;overscroll-behavior:none}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer}
a{color:var(--link);text-decoration:none}
input,textarea,select{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}
.ic{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
.muted{color:var(--muted)} .small{font-size:13px} .grow{flex:1} .pad{padding:12px 4px}
.hidden,[hidden]{display:none!important}
#chat-root{height:100%}
.loading{padding:28px;text-align:center;color:var(--muted)}

/* buttons & inputs */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;height:38px;padding:0 16px;border-radius:9px;border:1px solid var(--line);background:var(--surface);font-weight:600;font-size:14.5px;white-space:nowrap;transition:background .15s,border-color .15s}
.btn:hover{background:var(--surface2)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff} .btn.primary:hover{background:#5b4bd4}
.btn.danger{background:var(--red);border-color:var(--red);color:#fff}
.btn.ghost{background:transparent} .btn.small{height:32px;padding:0 12px;font-size:13.5px} .btn.block{width:100%;height:44px;font-size:15.5px}
.btn.light{background:#fff;color:var(--text);border-color:#fff}
.btn:disabled{opacity:.55;cursor:default}
.danger-text{color:var(--red)!important}
.link-btn{color:var(--link);font-weight:600;font-size:13.5px;padding:6px 4px}
.icon-btn{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:8px;color:var(--muted)} .icon-btn:hover{background:var(--surface2);color:var(--text)}
.icon-btn.light{color:var(--side-ink)} .icon-btn.light:hover{background:var(--side-hover);color:#fff} .icon-btn.sm{width:26px;height:26px} .icon-btn.sm .ic{width:16px;height:16px}
.input{width:100%;height:42px;padding:0 12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);outline:none;font-size:15px;transition:border-color .15s,box-shadow .15s}
textarea.input{height:auto;padding:10px 12px;resize:vertical}
.input:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.input.small{height:36px;font-size:14px}
select.input{appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);background-position:calc(100% - 16px) 18px,calc(100% - 11px) 18px;background-size:5px 5px;background-repeat:no-repeat;padding-right:30px}
.field{display:flex;flex-direction:column;gap:6px;margin:0 0 14px} .field>span{font-weight:600;font-size:14px} .field small{font-size:12.5px}
.form-err{color:var(--red);font-size:14px;min-height:0;margin:2px 0 10px}
.form-err:empty{margin:0}
.row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:6px 0} .row.end{justify-content:flex-end} .row .input{flex:1;min-width:140px}

/* auth */
.auth{min-height:100%;display:grid;place-items:center;padding:24px;background:linear-gradient(160deg,#f3f1fc,#ffffff 60%);overflow:auto;height:100%}
.auth-card{width:100%;max-width:400px;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);padding:30px 28px}
.auth-logo img{width:52px;height:52px;border-radius:13px;display:block;margin-bottom:16px}
.auth h1{font-size:23px;line-height:1.25;margin:0 0 6px;letter-spacing:-.01em} .auth-form>p{margin:0 0 20px}

/* top bar (desktop) */
.topbar{height:44px;background:var(--side-top);display:grid;grid-template-columns:1fr minmax(240px,720px) 1fr;align-items:center;padding:0 12px;gap:12px}
.tb-search{height:28px;border-radius:7px;background:rgba(255,255,255,.14);color:rgba(255,255,255,.8);display:flex;align-items:center;gap:8px;padding:0 12px;font-size:13.5px;transition:background .15s}
.tb-search:hover{background:rgba(255,255,255,.2)} .tb-search .ic{width:15px;height:15px}
.tb-right{display:flex;justify-content:flex-end} .tb-me{border-radius:7px;padding:2px}

/* shell */
.shell{display:grid;grid-template-columns:var(--side-w) minmax(0,1fr) 0;height:calc(100dvh - 44px);position:relative}
body.thread-open .shell{grid-template-columns:var(--side-w) minmax(0,1fr) var(--thread-w)}
.side{background:var(--side);color:var(--side-ink);display:flex;flex-direction:column;min-height:0;border-right:1px solid rgba(0,0,0,.12)}
.ws-head{display:flex;align-items:center;justify-content:space-between;padding:12px 12px 10px 16px;border-bottom:1px solid var(--side-line)}
.ws-name{color:#fff;font-weight:800;font-size:18px;display:flex;align-items:center;gap:4px;letter-spacing:-.01em;border-radius:6px;padding:2px 4px;margin-left:-4px}
.ws-name:hover{background:var(--side-hover)} .ws-name .ic{width:15px;height:15px}
.side-scroll{flex:1;overflow-y:auto;padding:10px 8px 16px;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.2) transparent}
.m-search{display:none}
.side-nav{margin-bottom:14px}
.si{display:flex;align-items:center;gap:9px;height:30px;padding:0 10px;border-radius:7px;color:var(--side-ink);font-size:15px;width:100%;text-align:left;position:relative}
.si:hover{background:var(--side-hover)}
.si.sel{background:var(--side-sel);color:#fff}
.si.unread{color:#fff;font-weight:700}
.si.muted{opacity:.5}
.si-ic{width:18px;display:grid;place-items:center;opacity:.85} .si-ic .ic{width:16px;height:16px}
.si-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.si-st{font-size:13px}
.si-count{width:20px;height:20px;border-radius:5px;background:rgba(255,255,255,.18);color:#fff;font-size:11.5px;font-weight:700;display:grid;place-items:center;flex:none}
.si-count.big{width:44px;height:44px;border-radius:12px;background:var(--accent-soft);color:var(--accent);font-size:16px}
.badge{min-width:20px;height:19px;padding:0 6px;border-radius:10px;background:#e2445c;color:#fff;font-size:11.5px;font-weight:700;display:inline-grid;place-items:center}
.si.add{opacity:.75;font-weight:400} .si.add .si-ic{background:rgba(255,255,255,.1);border-radius:5px;height:20px;width:20px}
.sec{margin-bottom:14px}
.sec-head{display:flex;align-items:center;justify-content:space-between;padding:0 4px 2px 2px}
.sec-toggle{display:flex;align-items:center;gap:4px;color:var(--side-ink);font-size:14.5px;font-weight:600;padding:4px 6px;border-radius:6px} .sec-toggle:hover{background:var(--side-hover)}
.sec-toggle .ic{width:14px;height:14px;transition:transform .15s}
.sec.collapsed .sec-toggle .ic{transform:rotate(-90deg)} .sec.collapsed .si:not(.sel):not(.unread){display:none}
.side .av{--s:20px}
.side-me{display:flex;align-items:center;gap:10px;padding:10px 14px;border-top:1px solid var(--side-line);text-align:left;color:var(--side-ink)}
.side-me:hover{background:var(--side-hover)} .sm-txt{display:flex;flex-direction:column;min-width:0} .sm-txt b{color:#fff;font-size:14px} .sm-txt small{font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* avatars & presence */
.av{--s:36px;width:var(--s);height:var(--s);border-radius:calc(var(--s) * .22);position:relative;display:inline-block;flex:none}
.av>img,.av>span{width:100%;height:100%;border-radius:inherit;display:grid;place-items:center;object-fit:cover;color:#fff;font-weight:700;font-size:calc(var(--s) * .4);letter-spacing:.02em}
.av.del>span{background:var(--surface2);color:var(--muted)} .av.del .ic{width:16px}
.pres{position:absolute;right:-2px;bottom:-2px;width:10px;height:10px;border-radius:50%;background:var(--surface);border:2px solid #9a97ad;box-shadow:0 0 0 2px var(--surface)}
.pres.on{background:var(--green);border-color:var(--green)}
.side .pres{box-shadow:0 0 0 2px var(--side);background:var(--side)} .side .pres.on{background:#3ec98a;border-color:#3ec98a} .side .si.sel .pres{box-shadow:0 0 0 2px var(--side-sel);background:var(--side-sel)} .side .si.sel .pres.on{background:#3ec98a}
.av .pres{width:calc(var(--s) * .34 + 2px);height:calc(var(--s) * .34 + 2px);min-width:9px;min-height:9px;max-width:11px;max-height:11px}

/* main conversation */
.main{display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--bg);position:relative}
.conv-head{display:flex;align-items:center;gap:10px;height:52px;padding:0 14px 0 18px;border-bottom:1px solid var(--line);flex:none}
.conv-head .back{display:none}
.hd-title{display:flex;align-items:center;gap:6px;font-weight:800;font-size:17px;padding:4px 8px;margin-left:-8px;border-radius:8px;min-width:0;white-space:nowrap;letter-spacing:-.01em}
.hd-title:not(.static):hover{background:var(--surface2)} .hd-title span{overflow:hidden;text-overflow:ellipsis} .hd-title .ic{width:15px;height:15px;color:var(--muted)}
.hd-ic .ic{width:17px;height:17px;color:var(--text)} .hd-st{font-size:15px}
.hd-topic{flex:1;min-width:0;color:var(--muted);font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:4px}
.hd-actions{display:flex;align-items:center;gap:4px}
.hd-members{display:flex;align-items:center;gap:6px;height:30px;padding:0 10px;border:1px solid var(--line);border-radius:8px;font-size:13.5px;font-weight:600;color:var(--muted)} .hd-members:hover{background:var(--surface2)} .hd-members .ic{width:16px}
.hd-muted{color:var(--muted);display:grid;place-items:center;padding:0 4px}
.msg-scroll{flex:1;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.msg-list{padding:8px 0 14px;min-height:100%;display:flex;flex-direction:column;justify-content:flex-end}
.intro{padding:28px 20px 18px}
.intro h2{font-size:24px;margin:10px 0 6px;letter-spacing:-.015em} .intro p{margin:0 0 12px;max-width:640px} .intro-actions{display:flex;gap:8px;flex-wrap:wrap} .intro-avs{display:flex;gap:6px}
.day-div{position:relative;text-align:center;margin:14px 0 6px;height:26px}
.day-div:before{content:"";position:absolute;left:0;right:0;top:13px;border-top:1px solid var(--line)}
.day-div span{position:relative;display:inline-block;background:var(--bg);border:1px solid var(--line);border-radius:14px;padding:3px 14px;font-size:12.5px;font-weight:700}
.new-div{position:relative;height:16px;margin:6px 0}
.new-div:before{content:"";position:absolute;left:0;right:0;top:8px;border-top:1px solid var(--red)}
.new-div span{position:absolute;right:16px;top:0;background:var(--bg);color:var(--red);font-size:11.5px;font-weight:700;padding:0 6px;line-height:16px}
.msg{position:relative;display:grid;grid-template-columns:36px minmax(0,1fr);gap:10px;padding:7px 20px 7px 20px}
.msg.cont{padding-top:2px;padding-bottom:3px}
.msg:hover,.msg.pressed{background:var(--hover)}
.msg.flash{animation:flash 2.2s ease}
@keyframes flash{0%,40%{background:#fff3cc}100%{background:transparent}}
.msg.pinned,.msg.saved{background:#fffaf0} .msg.pinned:hover,.msg.saved:hover{background:#fdf5e4}
.msg-flag{grid-column:1/-1;font-size:12.5px;color:var(--mention-ink);display:flex;align-items:center;gap:4px;margin:-2px 0 2px 46px} .msg-flag .ic{width:13px;height:13px}
.gutter{padding-top:2px}
.hover-time{display:block;opacity:0;font-size:11.5px;color:var(--muted);text-align:right;line-height:22px;white-space:nowrap}
.msg:hover .hover-time{opacity:1}
.meta{display:flex;align-items:baseline;gap:7px;flex-wrap:wrap;line-height:1.3}
.name{font-weight:800;font-size:15px;color:var(--text)} .name:hover{text-decoration:underline}
.meta time{font-size:12px;color:var(--muted)} .st-e{font-size:14px}
.tag{font-size:11px;font-weight:700;background:var(--surface2);color:var(--muted);border-radius:4px;padding:1px 5px}
.text{overflow-wrap:anywhere;word-break:break-word}
.text.jumbo{font-size:34px;line-height:1.25}
.text ul,.text ol{margin:2px 0;padding-left:24px} .text blockquote{margin:2px 0;border-left:4px solid var(--line);padding-left:10px;color:#3d3a52}
.text code{font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;font-size:12.5px;background:#f6f4fa;border:1px solid var(--line);border-radius:4px;padding:1px 4px;color:#c2185b}
.code-block{font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;font-size:12.5px;background:#f8f7fb;border:1px solid var(--line);border-radius:6px;padding:8px 10px;margin:4px 0;white-space:pre-wrap;overflow-x:auto}
.text a{text-decoration:none} .text a:hover{text-decoration:underline}
.mention{background:#e8f1fd;color:#1264a3;border-radius:4px;padding:0 3px;font-weight:600;font:inherit;font-weight:600}
.mention.me,.mention.all{background:var(--mention);color:var(--mention-ink)}
.chlink{background:#e8f1fd;color:#1264a3;border-radius:4px;padding:0 3px}
.edited{font-size:12px;color:var(--muted)}
.also-note{font-size:12.5px;color:var(--muted);margin-bottom:1px}
.msg.deleted .text{font-style:italic}
.files{display:flex;flex-direction:column;gap:6px;margin-top:6px;align-items:flex-start}
.imgs{display:grid;gap:4px;max-width:min(420px,100%)}
.imgs.n1 .img{max-width:100%}
.imgs.n2{grid-template-columns:1fr 1fr} .imgs.n3,.imgs.n4{grid-template-columns:1fr 1fr}
.imgs.n2 .img,.imgs.n3 .img,.imgs.n4 .img{width:100%;height:160px;min-width:130px}
.img{border-radius:10px;overflow:hidden;border:1px solid var(--line);background:var(--surface2);display:block;max-width:100%}
.img img{width:100%;height:100%;object-fit:cover;display:block}
.imgs.n1 .img img{object-fit:cover}
.vid{max-width:min(420px,100%);border-radius:10px;background:#000}
.fcard{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--surface);color:var(--text);min-width:240px;max-width:380px}
.fcard:hover{border-color:#d3cfe6;background:var(--surface2)}
.fcard.wide{max-width:none;width:100%;margin-bottom:8px}
.fc-ic{width:40px;height:40px;border-radius:9px;background:#5b6b8c;color:#fff;font-size:11px;font-weight:800;display:grid;place-items:center;flex:none;letter-spacing:.02em}
.fc-ic.pdf{background:#e2445c}
.fc-thumb{width:40px;height:40px;border-radius:8px;object-fit:cover;flex:none}
.fc-txt{display:flex;flex-direction:column;min-width:0;flex:1} .fc-txt b{font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .fc-txt small{color:var(--muted);font-size:12.5px}
.fc-dl{color:var(--muted)}
.rxs{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}
.rx{position:relative;display:inline-flex;align-items:center;gap:5px;height:26px;padding:0 8px;border-radius:13px;background:#f2f1f6;border:1px solid transparent;font-size:12.5px;font-weight:600;color:#4c4965}
.rx:hover{border-color:#cdc9de;background:#fff}
.rx.mine{background:#ecebfd;border-color:#a59bf0;color:#3d30b5}
.rx-e{font-size:15px;line-height:1}
.rx.add{opacity:0;color:var(--muted);padding:0 7px} .rx.add .ic{width:15px;height:15px} .rx.add span{display:none}
.msg:hover .rx.add{opacity:1}
.rx-tip{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translateX(-50%);background:#1d1b2e;color:#fff;font-weight:500;font-size:12px;padding:5px 9px;border-radius:7px;white-space:nowrap;pointer-events:none;opacity:0;transition:opacity .12s;z-index:5;max-width:260px;overflow:hidden;text-overflow:ellipsis}
.rx:hover .rx-tip{opacity:1}
.replies{display:flex;align-items:center;gap:6px;margin-top:5px;padding:4px 8px 4px 4px;margin-left:-4px;border-radius:8px;border:1px solid transparent;font-size:13px;max-width:100%}
.replies b{color:var(--link)} .replies .av{--s:22px}
.replies:hover{background:#fff;border-color:var(--line)}
.replies .view{display:none;color:var(--muted)} .replies:hover .view{display:inline} .replies:hover .muted{display:none}
.actions{position:absolute;top:-16px;right:18px;display:none;align-items:center;gap:1px;background:var(--surface);border:1px solid var(--line);border-radius:9px;box-shadow:var(--shadow);padding:2px;z-index:3}
.msg:hover .actions{display:flex}
.msg.editing .actions,.msg.deleted .actions{display:none!important}
.actions button{width:32px;height:30px;border-radius:7px;display:grid;place-items:center;color:var(--muted)}
.actions button:hover{background:var(--surface2);color:var(--text)} .actions button.on{color:var(--amber)}
.actions .qa{font-size:16px}
.edit-box{border:1px solid var(--accent);border-radius:10px;background:#fff;margin-top:4px;box-shadow:0 0 0 3px var(--accent-soft)}
.edit-ta{width:100%;border:0;outline:0;resize:none;padding:9px 11px;font-size:15px;line-height:1.46;background:transparent;display:block}
.edit-foot{display:flex;align-items:center;gap:8px;justify-content:flex-end;padding:6px 8px;border-top:1px solid var(--line2)} .edit-foot .muted{margin-right:auto}
.new-pill{position:absolute;left:50%;transform:translateX(-50%);bottom:120px;background:var(--accent);color:#fff;font-size:13px;font-weight:700;border-radius:16px;padding:6px 14px;display:flex;align-items:center;gap:4px;box-shadow:var(--shadow);cursor:pointer;z-index:4} .new-pill .ic{width:15px;height:15px}
.empty-state{max-width:420px;margin:12vh auto 0;text-align:center;padding:20px}
.empty-state.small{margin:20px auto}
.empty-state h2{font-size:20px;margin:12px 0 6px}
.es-ic{width:56px;height:56px;border-radius:16px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;margin:0 auto} .es-ic .ic{width:26px;height:26px}

/* composer */
.composer-wrap{padding:0 20px 18px;flex:none}
.composer{border:1px solid #cfcbe0;border-radius:12px;background:#fff;transition:border-color .15s,box-shadow .15s}
.composer:focus-within{border-color:#9d94d9;box-shadow:0 1px 6px rgba(60,40,140,.08)}
.fmt-bar{display:flex;align-items:center;gap:2px;padding:4px 6px;background:#fbfafd;border-bottom:1px solid var(--line2);border-radius:12px 12px 0 0}
.fmt-bar.hide{display:none}
.fbtn{width:30px;height:30px;border-radius:7px;display:grid;place-items:center;color:var(--muted)} .fbtn:hover{background:var(--surface2);color:var(--text)} .fbtn .ic{width:17px;height:17px}
.fbtn.plus{background:var(--surface2);border-radius:50%;width:28px;height:28px}
.sep{width:1px;height:18px;background:var(--line);margin:0 4px}
.comp-ta{display:block;width:100%;border:0;outline:0;resize:none;padding:11px 14px 6px;font-size:15px;line-height:1.46;background:transparent;max-height:260px;min-height:44px}
.comp-ta::placeholder{color:#9a97ad}
.comp-foot{display:flex;align-items:center;gap:2px;padding:4px 6px 6px}
.also{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);margin-left:8px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.also input{accent-color:var(--accent);width:15px;height:15px;flex:none}
.send{width:34px;height:30px;border-radius:7px;display:grid;place-items:center;color:#b3b0c4;background:transparent;transition:background .15s,color .15s}
.send.ready{background:#2f9e6f;color:#fff} .send .ic{width:17px;height:17px}
.typing{height:18px;font-size:12px;color:var(--muted);padding:2px 4px 0}
.tray{display:flex;gap:8px;flex-wrap:wrap;padding:10px 12px 0}
.tray-item{position:relative;display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:10px;padding:6px 26px 6px 6px;max-width:220px;background:#fff;overflow:hidden}
.tray-item.img{padding:0;width:64px;height:64px} .tray-item.img img{width:100%;height:100%;object-fit:cover} .tray-item.img .tray-name{display:none}
.tray-item .fc-ic{width:34px;height:34px;font-size:10px}
.tray-name{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tray-item .bar{position:absolute;left:0;right:0;bottom:0;height:3px;background:rgba(0,0,0,.08)} .tray-item .bar b{display:block;height:100%;width:0;background:var(--accent);transition:width .2s}
.tray-item.done .bar{display:none} .tray-item.err{border-color:var(--red)}
.tray-x{position:absolute;top:3px;right:3px;width:20px;height:20px;border-radius:50%;background:rgba(29,27,46,.75);color:#fff;display:grid;place-items:center} .tray-x .ic{width:12px;height:12px}
.join-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid var(--line);background:var(--surface2);border-radius:12px;padding:14px 16px}
.join-bar p{margin:2px 0 0;font-size:13.5px}
.drop-ov{position:fixed;inset:0;background:rgba(106,90,224,.12);border:3px dashed var(--accent);z-index:90;display:grid;place-items:center;pointer-events:none}
.drop-ov>div{background:#fff;border-radius:16px;padding:22px 30px;display:flex;flex-direction:column;align-items:center;gap:8px;box-shadow:var(--shadow-lg);color:var(--accent)} .drop-ov .ic{width:30px;height:30px}

/* thread pane */
.thread-pane{display:none;flex-direction:column;min-height:0;border-left:1px solid var(--line);background:var(--bg)}
body.thread-open .thread-pane{display:flex}
.th-head{display:flex;align-items:center;gap:8px;height:52px;padding:0 10px 0 18px;border-bottom:1px solid var(--line);flex:none}
.th-head .back{display:none}
.th-title{flex:1;display:flex;align-items:baseline;gap:8px;min-width:0} .th-title b{font-size:17px} .th-title small{color:var(--muted);font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.th-scroll{flex:1;overflow-y:auto;padding:10px 0;overscroll-behavior:contain}
.th-count{display:flex;align-items:center;gap:10px;padding:6px 20px;font-size:13px;color:var(--muted)}
.th-count:after{content:"";flex:1;border-top:1px solid var(--line)}
#threadComposer{padding:0 16px 16px}

/* menus, modals, sheets, toasts */
.menu-pop{position:fixed;z-index:80;min-width:230px;max-width:320px;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-lg);padding:6px}
.menu-pop button{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border-radius:7px;font-size:14.5px;text-align:left}
.menu-pop button:hover{background:var(--accent);color:#fff} .menu-pop button:hover .ic{color:#fff}
.menu-pop button .ic{color:var(--muted);width:17px;height:17px} .menu-pop .danger{color:var(--red)}
.menu-pop kbd{margin-left:auto;font-family:inherit;font-size:12px;color:var(--muted)}
.menu-pop hr,.sheet-body hr{border:0;border-top:1px solid var(--line2);margin:5px 4px}
.menu-me{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 10px 10px} .menu-me>span{display:flex;flex-direction:column} .menu-me small{font-size:12.5px}
.menu-status{flex-basis:100%;display:flex!important;gap:8px;border:1px solid var(--line)!important;border-radius:8px;padding:7px 10px!important;color:var(--muted)} .menu-pop .menu-status:hover{background:var(--surface2);color:var(--text)}
.modal-wrap{position:fixed;inset:0;z-index:70;background:rgba(24,20,40,.45);display:grid;place-items:center;padding:20px;animation:fade .15s}
.modal-wrap.closing{opacity:0;transition:opacity .15s}
@keyframes fade{from{opacity:0}}
.modal{width:100%;max-width:520px;max-height:min(86dvh,760px);background:#fff;border-radius:16px;box-shadow:var(--shadow-lg);display:flex;flex-direction:column;overflow:hidden;animation:pop .18s ease}
.modal-wrap.wide .modal{max-width:720px}
@keyframes pop{from{transform:translateY(8px) scale(.98);opacity:.6}}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 10px 24px}
.modal-head h2{margin:0;font-size:20px;letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.modal-body{padding:6px 24px 20px;overflow-y:auto}
.modal-foot{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:16px}
.modal-wrap.sheet .modal-head h2:empty{display:none}
.sheet-body{padding:4px 10px 12px;overflow-y:auto}
.sheet-item{display:flex;align-items:center;gap:14px;width:100%;padding:13px 12px;border-radius:10px;font-size:16px;text-align:left}
.sheet-item:hover,.sheet-item:active{background:var(--surface2)} .sheet-item .ic{color:var(--muted);width:20px;height:20px} .sheet-item.danger{color:var(--red)}
.sheet-rx{display:flex;justify-content:space-between;gap:6px;padding:4px 4px 10px;border-bottom:1px solid var(--line2);margin-bottom:6px}
.sheet-rx button{width:46px;height:46px;border-radius:50%;background:var(--surface2);font-size:23px;display:grid;place-items:center} .sheet-rx .ic{width:22px;height:22px;color:var(--muted)}
#toasts{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:100;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none}
.toast{background:#1d1b2e;color:#fff;padding:10px 16px;border-radius:10px;font-size:14px;box-shadow:var(--shadow-lg);pointer-events:auto;display:flex;gap:12px;align-items:center;transition:opacity .3s,transform .3s;max-width:90vw}
.toast.err{background:#b4233a} .toast.out{opacity:0;transform:translateY(6px)} .toast button{color:#c9c2ff;font-weight:700}
.update-banner{position:fixed;left:50%;transform:translateX(-50%);top:calc(10px + var(--safe-t));z-index:95;background:var(--accent);color:#fff;border-radius:22px;padding:6px 6px 6px 16px;display:flex;align-items:center;gap:12px;font-weight:700;font-size:14px;box-shadow:var(--shadow-lg)}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin:0 -24px 14px;padding:0 20px;overflow-x:auto;scrollbar-width:none}
.tabs button{padding:10px 10px;font-weight:600;font-size:14px;color:var(--muted);border-bottom:2px solid transparent;margin-bottom:-1px;white-space:nowrap}
.tabs button.sel{color:var(--text);border-color:var(--accent)}
.about-row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-bottom:8px}
.about-row.col{flex-direction:column;align-items:stretch} .about-row p{margin:3px 0 0} .about-row b{font-size:14px}
.about-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.seg{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px} .seg button{border:1px solid var(--line);border-radius:18px;padding:6px 12px;font-size:13.5px;font-weight:600} .seg button.sel{background:var(--accent);border-color:var(--accent);color:#fff}
.pick{display:flex;align-items:center;gap:12px;width:100%;padding:8px 8px;border-radius:10px;text-align:left;cursor:pointer}
.pick:hover{background:var(--surface2)} .pick>span,.pick-main>span{display:flex;flex-direction:column;min-width:0} .pick small{font-size:12.5px}
.pick-main{display:flex;align-items:center;gap:12px;flex:1;text-align:left;min-width:0}
.pick.off{opacity:.55} .pick input{accent-color:var(--accent);width:17px;height:17px}
.pick.add{color:var(--link)} .add-ic{width:32px;height:32px;border-radius:8px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center}
.pick-list{max-height:46dvh;overflow-y:auto;margin:8px -8px 0}
.to-row{display:flex;align-items:center;flex-wrap:wrap;gap:6px;border:1px solid var(--line);border-radius:10px;padding:6px 10px;min-height:46px}
.to-row .input{border:0;box-shadow:none;flex:1;min-width:120px;height:32px;padding:0 4px}
.chips{display:contents} .chip{display:inline-flex;align-items:center;gap:6px;background:var(--accent-soft);color:#3d30b5;border-radius:6px;padding:3px 4px 3px 4px;font-size:13.5px;font-weight:600} .chip button{display:grid;place-items:center} .chip .ic{width:13px;height:13px} .chip .av{--s:18px}
.switch-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 0;border-top:1px solid var(--line2);cursor:pointer}
.switch-row>span{display:flex;flex-direction:column} .switch-row small{font-size:12.5px} .switch-row input{width:20px;height:20px;accent-color:var(--accent);flex:none}
.browse-list{margin-top:12px}
.brow{display:flex;align-items:center;gap:10px;padding:12px 8px;border-top:1px solid var(--line2);color:var(--text)}
.brow-main{flex:1;display:flex;flex-direction:column;min-width:0;color:var(--text)} .brow-main b{display:flex;align-items:center;gap:4px} .brow-main .ic{width:15px;height:15px} .brow-main small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ok{color:var(--green);font-weight:600}
.profile{display:flex;flex-direction:column;padding:0 24px 20px}
.pf-photo{width:100%;max-width:240px;aspect-ratio:1;border-radius:16px;overflow:hidden;margin:0 auto 16px} .pf-photo img,.pf-photo>span{width:100%;height:100%;object-fit:cover;display:grid;place-items:center;color:#fff;font-size:64px;font-weight:700}
.pf-photo.small{width:96px;height:96px;margin:0} .pf-photo.busy{opacity:.5}
.pf-main h3{margin:0;font-size:22px} .pf-main p{margin:4px 0} .pf-pres{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:14px} .pf-pres .pres{position:static;box-shadow:none}
.pf-status{background:var(--surface2);border-radius:8px;padding:6px 10px;display:inline-block}
.profile dl{display:grid;grid-template-columns:auto 1fr;gap:6px 16px;margin:14px 0 0;font-size:14px} .profile dt{color:var(--muted)} .profile dd{margin:0}
.pf-edit{display:flex;align-items:center;gap:16px;margin-bottom:18px} .pf-edit>div{display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.st-row{display:flex;gap:8px;margin-bottom:12px} .st-emoji{width:42px;height:42px;border:1px solid var(--line);border-radius:9px;font-size:20px;flex:none}
.presets{display:flex;flex-direction:column;margin-bottom:12px} .preset{display:flex;gap:10px;padding:8px 6px;border-radius:8px;text-align:left;font-size:14.5px} .preset:hover{background:var(--surface2)}
.prefs .pref-box,.pref-box{border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:10px;display:flex;flex-direction:column;gap:8px;align-items:flex-start} .pref-box p{margin:0} .pref-box .input{max-width:none}
.pref-box>.row{width:100%}
.ch-picks,.prop-list{display:flex;flex-direction:column;max-height:38dvh;overflow-y:auto;border:1px solid var(--line);border-radius:10px;padding:4px;width:100%}
.cpick,.prop{display:flex;align-items:center;gap:10px;padding:7px 8px;border-radius:7px;cursor:pointer;font-size:14px} .cpick:hover,.prop:hover{background:var(--surface2)}
.prop>span{display:flex;flex-direction:column} .prop small{font-size:12px} .prop.exists{opacity:.55} .cpick input,.prop input{accent-color:var(--accent);width:17px;height:17px}
.prop-list{max-height:44dvh}
.invite-out{width:100%}
h4{margin:16px 0 6px;font-size:14px}

/* autocomplete & emoji */
.ac-pop{position:fixed;z-index:85;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-lg);padding:5px;max-height:300px;overflow-y:auto}
.ac-item{display:flex;align-items:center;gap:9px;width:100%;padding:7px 9px;border-radius:7px;text-align:left;font-size:14.5px;white-space:nowrap;overflow:hidden}
.ac-item .muted{font-size:13px;overflow:hidden;text-overflow:ellipsis} .ac-item.sel{background:var(--accent);color:#fff} .ac-item.sel .muted{color:rgba(255,255,255,.8)}
.ac-ic{width:22px;display:grid;place-items:center} .ac-emoji{font-size:18px;width:22px;text-align:center}
.emoji-pop{position:fixed;z-index:88;width:340px;height:380px;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-lg);display:flex;flex-direction:column;overflow:hidden}
.ep-head{display:flex;gap:6px;padding:10px 10px 6px}
.emoji-tabs{display:flex;padding:0 6px;border-bottom:1px solid var(--line2);overflow-x:auto;scrollbar-width:none} .emoji-tabs button{font-size:17px;padding:5px 6px;border-radius:6px;filter:grayscale(.6);opacity:.8} .emoji-tabs button:hover{filter:none;opacity:1;background:var(--surface2)}
.emoji-grid{flex:1;overflow-y:auto;padding:4px 8px 10px}
.eg-title{font-size:12px;font-weight:700;color:var(--muted);padding:8px 2px 4px;position:sticky;top:-4px;background:#fff}
.eg{display:grid;grid-template-columns:repeat(auto-fill,minmax(36px,1fr))} .eg button{font-size:23px;height:38px;border-radius:7px;line-height:1} .eg button:hover{background:var(--surface2)}

/* lightbox */
.lightbox{position:fixed;inset:0;z-index:96;background:rgba(14,12,22,.94);display:flex;flex-direction:column}
.lb-top{display:flex;justify-content:space-between;align-items:center;padding:calc(10px + var(--safe-t)) 14px 10px;color:#fff}
.lb-cap{display:flex;flex-direction:column;min-width:0} .lb-cap span{font-size:12.5px;opacity:.7} .lb-cap b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb-tools{display:flex;gap:4px} .lightbox .icon-btn.light{color:#fff}
.lb-stage{flex:1;display:grid;place-items:center;padding:10px 10px calc(20px + var(--safe-b));min-height:0} .lb-stage img{max-width:100%;max-height:100%;object-fit:contain;border-radius:4px}
.lb-nav{position:absolute;top:50%;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.14);color:#fff;display:grid;place-items:center} .lb-nav.l{left:14px} .lb-nav.r{right:14px} .lb-nav.r .ic{transform:rotate(180deg)}

/* list views */
.view-scroll{flex:1;overflow-y:auto}
.view-body{max-width:820px;margin:0 auto;padding:16px 20px 40px}
.rcard,.tcard{display:block;border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-bottom:10px;color:var(--text);background:#fff;position:relative}
a.rcard:hover{border-color:#d3cfe6;box-shadow:var(--shadow)}
.rcard.unread,.tcard.unread{border-left:3px solid var(--accent)}
.rc-where{font-size:13px;font-weight:600;color:var(--muted);margin-bottom:6px;display:flex;align-items:center;gap:8px;flex-wrap:wrap} .rc-where b{color:var(--text)}
.rc-msg{display:flex;gap:10px;margin:6px 0} .rc-msg>div{min-width:0;flex:1} .rc-msg b{font-size:14.5px}
.rcard .link-btn{position:absolute;top:8px;right:10px}
.dot-new{background:var(--accent-soft);color:var(--accent);font-size:11.5px;font-weight:700;border-radius:10px;padding:1px 8px}
.more-replies{padding:2px 0 2px 38px}
.tcard .btn{margin-top:6px}
.chips-row{display:flex;gap:6px;margin:0 0 14px;flex-wrap:wrap} .fchip{border:1px solid var(--line);border-radius:16px;padding:5px 13px;font-size:13.5px;font-weight:600} .fchip.sel{background:var(--text);color:#fff;border-color:var(--text)}
.search-inline{margin-bottom:12px}
.search-modal .input{margin-bottom:10px}
.search-sugg{display:flex;flex-direction:column}
.sg{display:flex;align-items:center;gap:10px;padding:9px 8px;border-radius:8px;color:var(--text);font-size:14.5px;text-align:left} .sg:hover{background:var(--surface2)} .sg.go{color:var(--link);font-weight:600}
.m-home{flex:1;display:flex;min-height:0}
.dm-list{padding:4px 0 20px}
.dm-row{display:flex;align-items:center;gap:12px;padding:10px 16px;color:var(--text)} .dm-row:active{background:var(--surface2)}
.dm-txt{flex:1;min-width:0;display:flex;flex-direction:column} .dm-top{display:flex;justify-content:space-between;gap:8px} .dm-top time{font-size:12.5px;color:var(--muted);flex:none}
.dm-prev{color:var(--muted);font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .dm-row.unread b,.dm-row.unread .dm-prev{color:var(--text);font-weight:700}
.you{max-width:620px;margin:0 auto;padding:16px 16px 40px;display:flex;flex-direction:column;gap:6px}
.you-card{display:flex;align-items:center;gap:14px;padding:10px 4px 14px;text-align:left} .you-card>span{display:flex;flex-direction:column} .you-card b{font-size:19px}
.you-status{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:12px;padding:12px 14px;color:var(--muted);text-align:left;margin-bottom:8px} .ys-e{font-size:18px}
.you-item{display:flex;align-items:center;gap:14px;padding:13px 6px;border-radius:10px;font-size:16px;text-align:left} .you-item:active{background:var(--surface2)} .you-item .ic{width:21px;height:21px;color:var(--muted)} .you-item>span{display:flex;flex-direction:column} .you-item small{font-size:13px}
.tabbar{display:none}

/* ---------- tablet: sidebar + conversation, thread slides over ---------- */
@media (max-width:1099px) and (min-width:701px){
  :root{--side-w:240px}
  body.thread-open .shell{grid-template-columns:var(--side-w) minmax(0,1fr) 0}
  .thread-pane{position:absolute;top:0;right:0;bottom:0;width:min(420px,62%);z-index:20;box-shadow:-12px 0 30px rgba(30,24,70,.14)}
  .hd-topic{display:none}
}
/* ---------- phone: Slack-mobile style ---------- */
@media (max-width:700px){
  html,body{font-size:16px}
  .topbar{display:none}
  .shell{display:block;height:100dvh}
  body.thread-open .shell{display:block}
  .side{display:none}
  .main{position:absolute;inset:0;padding-top:var(--safe-t)}
  body[data-route=home] .main,body[data-route=dms] .main,body[data-route=activity] .main,body[data-route=you] .main,body[data-route=threads] .main,body[data-route=saved] .main,body[data-route=search] .main{bottom:calc(var(--tabbar) + var(--safe-b))}
  .tabbar{display:flex;position:fixed;left:0;right:0;bottom:0;height:calc(var(--tabbar) + var(--safe-b));padding-bottom:var(--safe-b);background:rgba(255,255,255,.96);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-top:1px solid var(--line);z-index:30}
  body[data-route=channel] .tabbar{display:none}
  .tab{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:var(--muted);font-size:11px;font-weight:600;position:relative}
  .tab .ic{width:24px;height:24px} .tab.sel{color:var(--text)} .tab.sel .ic{stroke-width:2.3}
  .tab-av .av{--s:24px} .tab.sel .tab-av .av{box-shadow:0 0 0 2px var(--text);border-radius:6px}
  .tbadge{position:absolute;top:5px;left:calc(50% + 6px);min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#e2445c;color:#fff;font-size:11px;font-style:normal;font-weight:700;display:grid;place-items:center;border:2px solid #fff}
  .side.as-home{display:flex;flex:1;border:0;padding-top:0}
  .side.as-home .ws-head{padding:14px 12px 12px 18px}
  .side.as-home .ws-name{font-size:21px}
  .side.as-home .m-search{display:block;padding:0 6px 12px}
  .m-search-btn{display:flex;align-items:center;gap:8px;width:100%;height:40px;border-radius:10px;background:rgba(255,255,255,.12);color:rgba(255,255,255,.75);padding:0 12px;font-size:15px}
  .side.as-home .side-scroll{padding:6px 8px 20px}
  .side.as-home .si{height:42px;font-size:16.5px;padding:0 12px} .side.as-home .side .av,.side.as-home .si .av{--s:24px}
  .side.as-home .sec-toggle{font-size:15.5px}
  .side.as-home .side-nav .si[href="#/activity"]{display:none}
  .conv-head{height:54px;padding:0 8px 0 4px;gap:4px}
  .conv-head .back{display:inline-grid;width:40px;height:40px} .conv-head .back .ic{width:22px;height:22px}
  .view-head .back{display:none}
  body[data-route=threads] .view-head .back,body[data-route=saved] .view-head .back,body[data-route=search] .view-head .back{display:inline-grid}
  .view-head{padding-left:16px}
  .hd-title{font-size:17px;flex:1;margin-left:0} .hd-topic{display:none}
  .hd-members{display:none}
  .msg{padding:7px 14px;gap:10px} .msg.cont{padding-top:1px}
  .actions{display:none!important}
  .rx.add{display:none}
  .hover-time{display:none}
  .composer-wrap{padding:6px 10px calc(8px + var(--safe-b));border-top:1px solid var(--line2);background:#fff}
  .composer{border-radius:20px;display:flex;flex-direction:column}
  .comp-ta{font-size:16px;padding:10px 14px 4px;max-height:140px}
  .typing{height:14px;font-size:11.5px;padding:1px 6px 0}
  .new-pill{bottom:110px}
  .imgs.n1 .img{width:min(300px,100%)}
  .thread-pane{position:fixed;inset:0;z-index:40;border:0;padding-top:var(--safe-t)}
  .th-head{padding:0 8px 0 4px} .th-head .back{display:inline-grid;width:40px;height:40px} .th-head .back .ic{width:22px;height:22px} #thClose{display:none}
  #threadComposer{padding:6px 10px calc(8px + var(--safe-b));border-top:1px solid var(--line2)}
  .modal-wrap{padding:0;align-items:end}
  .modal{max-width:none!important;border-radius:18px 18px 0 0;max-height:92dvh;padding-bottom:var(--safe-b);animation:up .22s ease}
  @keyframes up{from{transform:translateY(40px);opacity:.5}}
  .modal-wrap.sheet .modal{max-height:80dvh}
  .modal-body{padding:4px 18px 18px} .modal-head{padding:14px 12px 8px 18px} .tabs{margin:0 -18px 12px;padding:0 14px}
  .emoji-pop.sheet{left:0!important;right:0;bottom:0;top:auto!important;width:auto;height:min(62dvh,460px);border-radius:18px 18px 0 0;padding-bottom:var(--safe-b)}
  .eg{grid-template-columns:repeat(auto-fill,minmax(42px,1fr))} .eg button{height:44px;font-size:27px}
  .view-body{padding:12px 14px 30px}
  .lb-nav{display:none}
  #toasts{bottom:calc(var(--tabbar) + 16px + var(--safe-b))}
  .fcard{min-width:0;max-width:100%}
}
@media (hover:none){ .msg:hover{background:transparent} .msg.pressed{background:var(--hover)} .msg:hover .rx.add{opacity:0} }

/* ===================== v2 ===================== */
/* rich composer */
.rte{outline:0;white-space:normal;word-break:break-word;overflow-wrap:anywhere;overflow-y:auto;cursor:text}
.rte.empty:before{content:attr(data-ph);color:var(--muted);pointer-events:none;position:absolute}
.comp-ta.rte{max-height:260px;min-height:44px;position:relative}
.edit-ta.rte{min-height:40px;max-height:300px;position:relative}
.rte ul,.rte ol{margin:2px 0;padding-left:24px} .rte blockquote{margin:2px 0;border-left:3px solid var(--line);padding-left:10px;color:var(--muted)}
.rte pre{background:var(--code-bg);border:1px solid var(--line2);border-radius:6px;padding:8px 10px;margin:4px 0;font:13px/1.45 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre-wrap}
.rte code{background:var(--code-bg);color:var(--code-ink);border:1px solid var(--line2);border-radius:4px;padding:0 3px;font:0.88em ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.rte a{color:var(--link);text-decoration:underline}
.rchip{border-radius:4px;padding:0 3px;font-weight:600;white-space:nowrap;user-select:all}
.rchip.user,.rchip.ch{background:var(--mention-bg);color:var(--mention-blue)} .rchip.special{background:var(--mention);color:var(--mention-ink)}
@media (max-width:700px){.comp-ta.rte{max-height:140px}}
.fbtn.on{background:var(--accent-soft);color:var(--accent)}
.send-group{display:flex;align-items:center;border-radius:7px;transition:background .15s}
.send-group .send{border-radius:7px 0 0 7px}
.send-more{width:22px;height:30px;display:grid;place-items:center;color:#b3b0c4;border-radius:0 7px 7px 0;border-left:1px solid transparent}
.send-more .ic{width:14px;height:14px}
.send-group.ready{background:#2f9e6f} .send-group.ready .send{background:transparent} .send-group.ready .send-more{color:#fff;border-left-color:rgba(255,255,255,.35)}
.send-group.ready .send-more:hover,.send-group.ready .send:hover{background:rgba(0,0,0,.12)}
.sched-note{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);padding:0 4px 6px}
.sched-note .ic{width:15px;height:15px} .sched-note a{font-weight:600;margin-left:4px}
.dt-row{display:flex;gap:12px} .dt-row>*{flex:1}
.form-err{color:var(--red);font-size:13.5px;margin:6px 0 0}
/* scheduled & reminders */
.view-sec{font-size:12.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin:18px 2px 8px}
.view-sec:first-child{margin-top:4px}
.sched-card{display:block;border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin-bottom:10px;background:var(--surface);color:var(--text)}
.sched-card.failed{border-color:var(--red)} .sched-card.sent{opacity:.8}
.sc-head{display:flex;align-items:center;gap:6px;font-size:13.5px;font-weight:600;margin-bottom:6px;flex-wrap:wrap} .sc-head .ic{width:15px;height:15px;color:var(--muted)}
.sc-head .muted{font-weight:400}
.sc-text{font-size:15px;word-break:break-word}
.sc-actions{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}
.rc-where .ic{width:14px;height:14px;vertical-align:-2px}
/* workflow / app tag */
.tag.app{background:var(--accent-soft);color:var(--accent);margin-left:2px}
/* link previews */
.lps{display:flex;flex-direction:column;gap:6px;margin-top:6px;max-width:520px}
.lp{display:flex;gap:10px;position:relative;padding-right:22px}
.lp-bar{width:4px;border-radius:2px;background:var(--line);flex:none}
.lp-body{min-width:0;display:flex;flex-direction:column;gap:1px}
.lp-site{font-size:13px;font-weight:700;color:var(--text)}
.lp-title{font-weight:700;color:var(--link);font-size:14.5px;line-height:1.35}
.lp-desc{font-size:14px;color:var(--text);opacity:.85;line-height:1.4;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.lp-img{display:block;margin-top:6px} .lp-img img{max-width:min(360px,100%);max-height:220px;border-radius:8px;border:1px solid var(--line2);display:block;object-fit:cover}
.lp-x{position:absolute;right:0;top:0;width:22px;height:22px;border-radius:6px;display:none;place-items:center;color:var(--muted)} .lp-x .ic{width:14px;height:14px}
.msg:hover .lp-x{display:grid} .lp-x:hover{background:var(--surface2)}
@media (hover:none){.lp-x{display:grid}}
/* sidebar sections */
.si-more{display:none;margin-left:auto;width:22px;height:22px;border-radius:5px;place-items:center;color:var(--side-ink);flex:none}
.si-more .ic{width:16px;height:16px}
.si:hover .si-more{display:grid} .si:hover .badge{display:none} .si-more:hover{background:rgba(255,255,255,.14);color:#fff}
@media (hover:none){.si-more{display:none!important}}
.si.dragging{opacity:.45}
.sec.drop-on>.sec-head{background:rgba(255,255,255,.08);border-radius:7px}
.sec.drop-on .sec-list{outline:2px dashed rgba(255,255,255,.28);outline-offset:-2px;border-radius:8px}
.sec-empty{font-size:13px;color:var(--side-ink);opacity:.6;padding:4px 12px 6px 30px}
.side.as-home .sec-empty{color:var(--muted)}
/* segmented control */
.seg{display:inline-flex;background:var(--surface2);border:1px solid var(--line);border-radius:10px;padding:3px;gap:2px;margin-top:8px}
.seg button{padding:6px 14px;border-radius:7px;font-size:14px;font-weight:600;color:var(--muted)}
.seg button.sel{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.12)}
:root{--code-bg:#f6f4fa;--code-ink:#c2185b;--mention-bg:#e8f1fd;--mention-blue:#1264a3}

/* ---------- dark mode ---------- */
[data-theme=dark]{
  color-scheme:dark;
  --bg:#1a1d21; --surface:#222529; --surface2:#2c2f34; --hover:#26292e; --text:#e8e8ea; --muted:#a4a6ab; --line:#3a3d42; --line2:#303338;
  --accent:#8b7ff0; --accent-soft:#2f2a52; --link:#9fb8ff;
  --red:#f0707a; --red-soft:#3b2226; --mention:#4a3b12; --mention-ink:#f5d27a;
  --side:#19171f; --side-top:#141218; --side-line:rgba(255,255,255,.08); --side-sel:#5b4fd0;
  --shadow:0 1px 2px rgba(0,0,0,.4),0 6px 20px rgba(0,0,0,.35); --shadow-lg:0 20px 50px rgba(0,0,0,.6);
  --code-bg:#2b2e33; --code-ink:#f28fb1; --mention-bg:#1d3550; --mention-blue:#8fc3ff;
}
[data-theme=dark] .composer,[data-theme=dark] .edit-box,[data-theme=dark] .tray-item,[data-theme=dark] .drop-ov>div,[data-theme=dark] .menu-pop,[data-theme=dark] .modal,
[data-theme=dark] .ac-pop,[data-theme=dark] .emoji-pop,[data-theme=dark] .eg-title,[data-theme=dark] .rcard,[data-theme=dark] .tcard,[data-theme=dark] .composer-wrap,[data-theme=dark] .auth-card{background:var(--surface)}
[data-theme=dark] .composer{border-color:#4a4d53}
[data-theme=dark] .fmt-bar{background:#26292e}
[data-theme=dark] .btn.light{background:var(--surface2);color:var(--text);border-color:var(--surface2)}
[data-theme=dark] .btn.primary:hover{background:#7a6de6}
[data-theme=dark] .msg.pinned,[data-theme=dark] .msg.saved{background:#2a2618} [data-theme=dark] .msg.pinned:hover,[data-theme=dark] .msg.saved:hover{background:#312c1b}
[data-theme=dark] .text code{background:var(--code-bg);color:var(--code-ink);border-color:var(--line)}
[data-theme=dark] .code-block{background:#24272b;border-color:var(--line)}
[data-theme=dark] .mention,[data-theme=dark] .chlink{background:var(--mention-bg);color:var(--mention-blue)}
[data-theme=dark] .mention.me,[data-theme=dark] .mention.all{background:var(--mention);color:var(--mention-ink)}
[data-theme=dark] .rx{background:#2c2f34;color:#d5d6da;border-color:#3a3d42} [data-theme=dark] .rx:hover{background:#33363b;border-color:#4a4d53}
[data-theme=dark] .rx.mine{background:#2f2a52;border-color:#6d61d8;color:#cfc8ff}
[data-theme=dark] .replies:hover{background:var(--surface2)}
[data-theme=dark] .fcard:hover,[data-theme=dark] a.rcard:hover{border-color:#4a4d53}
[data-theme=dark] .modal-wrap{background:rgba(0,0,0,.6)}
[data-theme=dark] .send-more{color:#6f7177} [data-theme=dark] .send{color:#6f7177}
[data-theme=dark] input.input,[data-theme=dark] .input,[data-theme=dark] select,[data-theme=dark] textarea{background:var(--surface2);border-color:var(--line);color:var(--text)}
[data-theme=dark] img.av,[data-theme=dark] .lp-img img{border-color:var(--line)}
[data-theme=dark] .topbar{background:var(--side-top)}

/* v2b: Slack import */
.imp-box { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 12px 0; }
.imp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.imp-bar { height: 8px; border-radius: 4px; background: var(--hover, rgba(0,0,0,.06)); overflow: hidden; }
.imp-bar i { display: block; height: 100%; background: var(--accent, #1264a3); border-radius: 4px; transition: width .4s ease; }
.imp-stage { margin-top: 8px; font-size: 14px; color: var(--muted); } .imp-stage.err { color: #c0392b; }
.imp-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin-top: 14px; }
.imp-stats div { background: var(--hover, rgba(0,0,0,.04)); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; }
.imp-stats b { font-size: 18px; } .imp-stats small { color: var(--muted); font-size: 12px; }
.imp-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 140px; border: 2px dashed var(--line); border-radius: 12px; cursor: pointer; text-align: center; padding: 16px; }
.imp-drop.over, .imp-drop:hover { border-color: var(--accent, #1264a3); background: var(--hover, rgba(18,100,163,.04)); }
.imp-person { flex-wrap: wrap; } .imp-person select { max-width: 220px; }
.imp-person img.av { border-radius: 6px; object-fit: cover; }
.fcard.ext { opacity: .85; cursor: default; } .fcard.ext small { font-style: italic; }
.sec-title { font-weight: 700; font-size: 13px; color: var(--muted); margin: 18px 0 6px; text-transform: none; }

/* v2b: channel tabs */
.ch-tabs { display: flex; align-items: center; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; background: var(--surface); min-height: 38px; flex-shrink: 0; }
.ch-tabs::-webkit-scrollbar { display: none; }
.ch-tabs .ct { display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; max-width: 220px; }
.ch-tabs .ct span { overflow: hidden; text-overflow: ellipsis; } .ch-tabs .ct svg { width: 15px; height: 15px; flex-shrink: 0; }
.ch-tabs .ct.sel { color: var(--text); border-bottom-color: var(--accent); } .ch-tabs .ct:hover { color: var(--text); }
.ch-tabs .ct-docs { display: contents; }
.ch-tabs .ct.add { border: 0; background: none; cursor: pointer; padding: 6px; border-radius: 6px; } .ch-tabs .ct.add:hover { background: var(--hover); }
/* canvases */
.cv-head .cv-status { font-size: 12px; margin-left: auto; margin-right: 8px; white-space: nowrap; }
.cv-tools { display: flex; gap: 2px; padding: 6px 16px; border-bottom: 1px solid var(--line); overflow-x: auto; background: var(--surface); flex-shrink: 0; scrollbar-width: none; }
.cv-tools button { border: 0; background: none; color: var(--muted); font: 600 12px var(--font); min-width: 34px; height: 30px; border-radius: 6px; cursor: pointer; padding: 0 6px; }
.cv-tools button:hover { background: var(--hover); color: var(--text); }
.cv-scroll { background: var(--surface); }
.cv-page { max-width: 760px; margin: 0 auto; padding: 28px 28px 120px; }
.cv-title { font-size: 30px; font-weight: 800; line-height: 1.2; outline: none; margin-bottom: 4px; word-break: break-word; }
.cv-title:empty::before, .blk .bt:empty::before { content: attr(data-ph); color: var(--muted); opacity: .6; pointer-events: none; }
.blk .bt:empty::before { opacity: 0; } .blk:focus-within .bt:empty::before, .blk.t-h1 .bt:empty::before { opacity: .55; }
.cv-meta { font-size: 12px; margin-bottom: 18px; }
.cv-blocks { display: flex; flex-direction: column; gap: 2px; min-height: 200px; cursor: text; }
.blk { position: relative; display: flex; align-items: flex-start; gap: 8px; border-radius: 6px; }
.blk .bt { flex: 1; outline: none; padding: 3px 2px; line-height: 1.55; font-size: 15.5px; white-space: pre-wrap; word-break: break-word; min-height: 1.55em; }
.blk.t-h1 .bt { font-size: 24px; font-weight: 800; margin-top: 14px; } .blk.t-h2 .bt { font-size: 19px; font-weight: 750; margin-top: 10px; } .blk.t-h3 .bt { font-size: 16px; font-weight: 700; margin-top: 6px; }
.blk.t-bullet::before { content: '•'; width: 18px; text-align: center; padding-top: 3px; line-height: 1.55; color: var(--muted); }
.blk.t-number::before { content: attr(data-n); width: 22px; text-align: right; padding-top: 3px; line-height: 1.55; color: var(--muted); font-variant-numeric: tabular-nums; }
.blk.t-quote { border-left: 3px solid var(--line); padding-left: 12px; } .blk.t-quote .bt { color: var(--muted); }
.blk.t-code .bt { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13.5px; background: var(--hover); padding: 10px 12px; border-radius: 8px; }
.blk.t-callout { background: var(--accent-soft); padding: 8px 12px; border-radius: 10px; } .blk.t-callout .emo { padding-top: 3px; }
.blk.t-divider { padding: 8px 0; } .blk.t-divider hr { flex: 1; border: 0; border-top: 1px solid var(--line); margin: 0; } .blk.t-divider:focus { outline: 2px solid var(--accent-soft); }
.blk .chk { width: 20px; height: 20px; margin-top: 4px; border: 1.5px solid var(--muted); border-radius: 5px; background: none; display: grid; place-items: center; cursor: pointer; padding: 0; color: transparent; flex-shrink: 0; }
.blk .chk svg { width: 14px; height: 14px; } .blk.done .chk { background: var(--green); border-color: var(--green); color: #fff; } .blk.done .bt { text-decoration: line-through; color: var(--muted); }
.cv-blocks.ro { cursor: default; }
.cv-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); margin-bottom: 14px; font-size: 14px; }
.cv-banner.warn { background: color-mix(in srgb, var(--amber) 18%, transparent); } .cv-banner span { flex: 1; min-width: 200px; }
.cv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; padding: 16px; }
.cv-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); background: var(--surface); }
.cv-card:hover { box-shadow: var(--shadow); } .cv-card .cv-ic svg { width: 22px; height: 22px; color: var(--accent); }
.cv-preview { padding: 0; } .ty-g { display: inline-block; width: 26px; font: 700 12px var(--font); color: var(--muted); }
/* lists */
.lst-page { padding: 12px 16px 80px; }
.lst-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; } .lst-q { max-width: 240px; } .lst-filters { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.input.small { padding: 6px 8px; font-size: 13px; width: auto; }
.lst-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table.lst { border-collapse: collapse; width: 100%; font-size: 14px; }
table.lst th { text-align: left; font-weight: 650; font-size: 12.5px; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line); cursor: pointer; white-space: nowrap; user-select: none; background: var(--bg); position: sticky; top: 0; }
table.lst th:hover, table.lst th.sorted { color: var(--text); } .th-ic { display: inline-block; min-width: 18px; opacity: .7; font-size: 11px; }
table.lst td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; cursor: default; min-width: 90px; height: 38px; }
table.lst tr:last-child td { border-bottom: 0; } table.lst tbody tr:hover td { background: var(--hover); }
table.lst td.t-number { text-align: right; font-variant-numeric: tabular-nums; } table.lst td.t-text:first-child { font-weight: 600; min-width: 180px; }
table.lst td.editing { padding: 2px 4px; } .cell-ed { width: 100%; padding: 6px; border: 1.5px solid var(--accent); border-radius: 6px; font: inherit; background: var(--surface); color: var(--text); }
.cbx { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid var(--muted); border-radius: 4px; font-size: 12px; color: #fff; } .cbx.on { background: var(--green); border-color: var(--green); }
.th-add { width: 36px; text-align: center !important; } .td-del { width: 36px; opacity: 0; } tr:hover .td-del { opacity: 1; }
.lst-foot { padding: 8px 12px; border-top: 1px solid var(--line); }
.lst-cards { display: flex; flex-direction: column; gap: 10px; padding: 10px; }
.lst-card { position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface); }
.lc-title { font-weight: 700; font-size: 16px; margin-bottom: 6px; padding-right: 32px; } .lc-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 14px; } .lc-v { text-align: right; min-width: 60px; }
.lc-del { position: absolute; top: 8px; right: 8px; }
/* workflows */
.wf-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; } .wf-card.off { background: var(--bg); }
.wf-top { display: flex; align-items: center; gap: 10px; } .wf-ic svg { width: 18px; height: 18px; color: var(--amber); } .wf-desc { margin: 6px 0 2px; font-size: 14px; } .wf-meta { margin-bottom: 8px; } .wf-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.wf-sec { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 12px 0; } .wf-sec > b { display: block; margin-bottom: 6px; }
.wf-step { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 10px; } .wf-step:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.switch { position: relative; display: inline-block; width: 40px; height: 24px; flex-shrink: 0; } .switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 12px; transition: .2s; cursor: pointer; } .switch i::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + i { background: var(--green); } .switch input:checked + i::before { transform: translateX(16px); }
.pill { display: inline-block; font-size: 12px; font-weight: 650; padding: 2px 8px; border-radius: 10px; background: var(--hover); color: var(--muted); } .pill.ok { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); } .pill.warn { background: color-mix(in srgb, var(--amber) 18%, transparent); color: var(--amber); }
.empty-state.small { padding: 24px; }
/* AI */
.ai-text { line-height: 1.6; font-size: 15px; white-space: normal; } .ai-out { min-height: 80px; margin-top: 8px; }
/* clips */
.clip-btns { display: inline-flex; align-items: center; } .clip-wrap { position: relative; display: inline-flex; }
.clip-mic.on { color: #fff; background: var(--red); border-radius: 50%; }
.clip-rec { position: absolute; bottom: calc(100% + 8px); left: 0; display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: 22px; padding: 6px 8px 6px 14px; white-space: nowrap; z-index: 20; }
.clip-rec.cancel { border-color: var(--red); } .clip-rec .rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: recpulse 1s infinite; }
@keyframes recpulse { 50% { opacity: .3; } } .clip-time { font-variant-numeric: tabular-nums; font-weight: 650; } .clip-hint { font-size: 12px; }
.clip { margin-top: 6px; } .aclip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); max-width: 340px; width: 100%; }
.clip-play { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; padding: 0; } .clip-play svg { width: 16px; height: 16px; fill: currentColor; }
.wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 30px; cursor: pointer; } .wave i { flex: 1; background: var(--muted); opacity: .45; border-radius: 2px; min-width: 2px; } .wave i.on { background: var(--accent); opacity: 1; }
.clip-len { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 32px; text-align: right; }
.vclip { position: relative; display: inline-block; max-width: min(360px, 100%); } .vclip video { width: 100%; max-height: 420px; border-radius: 12px; background: #000; display: block; }
.vclip .clip-len { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.6); color: #fff; padding: 1px 6px; border-radius: 8px; }
.clip-modal video.clip-live { width: 100%; max-height: 60vh; background: #000; border-radius: 12px; display: block; }
.clip-bar { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin-top: 10px; } .clip-bar .clip-time { margin-right: auto; }
.btn.danger { background: var(--red); color: #fff; border-color: var(--red); } .btn svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.composer.recording .comp-ta { opacity: .5; }
/* message tagged as from a workflow */
.via-wf { font-size: 11px; font-weight: 650; color: var(--muted); background: var(--hover); padding: 1px 6px; border-radius: 6px; margin-left: 6px; }
@media (max-width: 700px) { .cv-page { padding: 18px 16px 120px; } .cv-title { font-size: 24px; } .ch-tabs { padding: 0 8px; } .lst-page { padding: 8px 0 80px; } .lst-wrap { border: 0; background: none; } .lst-bar { padding: 0 10px; } .lst-q { max-width: none; flex: 1; } }

/* v2b: canvas tables, pictures, mentions and links */
.blk.t-table { display: block; padding: 6px 0; } .blk.t-table .tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.cv-table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
.cv-table th, .cv-table td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 7px 10px; min-width: 90px; text-align: left; vertical-align: top; outline: none; white-space: pre-wrap; word-break: break-word; }
.cv-table tr > :last-child { border-right: 0; } .cv-table tr:last-child > * { border-bottom: 0; }
.cv-table th { background: var(--hover); font-weight: 650; } .cv-table td:focus, .cv-table th:focus { box-shadow: inset 0 0 0 2px var(--accent-soft); }
.blk.t-table .tbl-more { position: absolute; top: 8px; right: -38px; opacity: 0; transition: opacity .15s; }
.blk.t-table:hover .tbl-more, .blk.t-table:focus-within .tbl-more { opacity: 1; }
@media (max-width: 900px) { .blk.t-table .tbl-more { position: static; opacity: 1; margin-top: 4px; } }
.blk.t-image { display: block; padding: 6px 0; } .blk.t-image figure { margin: 0; }
.blk.t-image img { display: block; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); }
.blk.t-image:focus { outline: none; } .blk.t-image:focus img { box-shadow: 0 0 0 3px var(--accent-soft); }
.blk.t-image .cap { font-size: 13px; color: var(--muted); padding: 6px 2px 0; outline: none; min-height: 1.4em; }
.blk.t-image .cap:empty::before { content: attr(data-ph); opacity: 0; } .blk.t-image:focus-within .cap:empty::before { opacity: .6; }
.blk.t-image .img-up { padding: 30px; text-align: center; border: 1px dashed var(--line); border-radius: 10px; }
.blk .bt .mention { background: var(--mention); color: var(--mention-ink); border-radius: 4px; padding: 0 3px; cursor: pointer; font-weight: 600; }
.blk .bt a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.cv-ac { position: fixed; z-index: 400; }
/* list filters: the arrow sits clear of the words */
.lst-bar select.input { background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; padding-right: 32px; }

/* v2b: custom emoji, @groups, catch-up */
img.cemoji { width: 1.35em; height: 1.35em; object-fit: contain; vertical-align: -0.3em; display: inline-block; }
.rx .rx-e img.cemoji { width: 16px; height: 16px; vertical-align: -3px; }
.eg button img.cemoji { width: 24px; height: 24px; vertical-align: middle; }
.mention.grp { background: var(--mention); color: var(--mention-ink); border-radius: 4px; padding: 0 2px; font-weight: 600; }
.cemoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; margin-top: 10px; }
.cemoji-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; } .cemoji-item img.cemoji { width: 28px; height: 28px; }
.grp-people { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; margin-top: 6px; }
.grp-people .pick { cursor: pointer; } .row.wrap { flex-wrap: wrap; }
.ai-page { max-width: 720px; padding: 16px 20px 60px; } .ai-page .ai-text { font-size: 15px; line-height: 1.6; }

/* ---------- v2c: huddles ---------- */
.hd-huddle { display: inline-flex; align-items: center; gap: 6px; height: 32px; min-width: 32px; padding: 0 7px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; }
.hd-huddle:hover { background: var(--hover); color: var(--text); }
.hd-huddle.on { background: var(--green); color: #fff; padding: 0 10px; }
.hd-huddle.on:hover { filter: brightness(1.05); background: var(--green); color: #fff; }
.hd-huddle.mine { box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.si-hud { display: inline-flex; margin-left: 4px; color: var(--green); flex: none; }
.si-hud svg { width: 14px; height: 14px; }
.hud-audio { display: none; }
.hud-bar { position: fixed; z-index: 60; left: 10px; bottom: calc(10px + var(--safe-b)); width: calc(var(--side-w) - 20px); display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 12px; background: #1d2b24; color: #fff; box-shadow: var(--shadow-lg); }
.hud-bar .hb-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 2px 4px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.hud-bar .hb-ic { display: inline-flex; width: 30px; height: 30px; border-radius: 8px; align-items: center; justify-content: center; background: var(--green); flex: none; }
.hud-bar .hb-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.hud-bar .hb-txt b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-bar .hb-txt small { font-size: 11.5px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-bar .hb-faces { display: flex; flex: none; }
.hud-bar .hb-face { margin-left: -6px; border-radius: 50%; box-shadow: 0 0 0 2px #1d2b24; display: inline-flex; transition: box-shadow .12s; }
.hud-bar .hb-face.talking, .hs-tile.talking .hs-av { box-shadow: 0 0 0 2px var(--green), 0 0 0 4px rgba(46,182,125,.35); }
.hud-bar .hb-btn { width: 34px; height: 34px; flex: none; border: 0; border-radius: 9px; background: rgba(255,255,255,.1); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.hud-bar .hb-btn:hover { background: rgba(255,255,255,.18); }
.hud-bar .hb-btn.off { background: #fff; color: #1d2b24; }
.hud-bar .hb-leave { background: var(--red); }
.hud-bar .hb-leave:hover { background: var(--red); filter: brightness(1.08); }
.hud-stage { position: fixed; inset: 0; z-index: 90; background: rgba(10,14,12,.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.hs-card { width: min(760px, 100%); max-height: 100%; overflow: auto; background: #16201b; color: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 12px; }
.hs-head { display: flex; align-items: center; justify-content: space-between; }
.hs-title { font-weight: 700; font-size: 15px; }
.hs-head .icon-btn { color: #fff; }
.hs-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.hs-grid[data-n="1"] { grid-template-columns: 1fr; }
.hs-grid[data-n="5"], .hs-grid[data-n="6"] { grid-template-columns: repeat(3, 1fr); }
.hs-tile { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; background: #24312a; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.hs-tile .hs-av { border-radius: 50%; display: inline-flex; transition: box-shadow .12s; }
.hs-tile .hs-av .avatar, .hs-tile .hs-av img { width: 64px !important; height: 64px !important; border-radius: 50%; }
.hs-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.hs-tile video.mirror { transform: scaleX(-1); }
.hs-tile.has-video .hs-av { display: none; }
.hs-tile.talking { box-shadow: inset 0 0 0 3px var(--green); }
.hs-name { position: absolute; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 16px); padding: 3px 8px; border-radius: 7px; background: rgba(0,0,0,.45); font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-st { display: inline-flex; align-items: center; gap: 4px; }
.hs-st svg { width: 14px; height: 14px; color: #ffb4b4; }
.hs-st em { font-style: normal; font-weight: 500; opacity: .8; }
.hs-ctrl { display: flex; justify-content: center; gap: 10px; }
.hs-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 16px; border: 0; border-radius: 20px; background: rgba(255,255,255,.12); color: #fff; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.hs-btn:hover { background: rgba(255,255,255,.2); }
.hs-btn.off { background: #fff; color: #16201b; }
.hs-btn.on { background: var(--green); }
.hs-btn.hs-leave { background: var(--red); }
.hs-note { margin: 0; font-size: 11.5px; opacity: .6; text-align: center; }
@media (max-width: 700px) {
  .hd-huddle span { display: none; }
  .hd-huddle.on { padding: 0 8px; }
  .hud-bar { left: auto; right: 8px; bottom: auto; top: calc(var(--safe-t) + 58px); width: auto; max-width: calc(100% - 16px); border-radius: 22px; padding: 4px; }
  .hud-bar .hb-txt small, .hud-bar .hb-faces { display: none; }
  .hud-bar .hb-txt { max-width: 110px; }
  .hud-bar .hb-ic { width: 28px; height: 28px; border-radius: 50%; }
  .hud-bar .hb-btn { width: 32px; height: 32px; border-radius: 50%; }
  .hud-stage { padding: 0; align-items: stretch; }
  .hs-card { border-radius: 0; padding: calc(var(--safe-t) + 12px) 12px calc(var(--safe-b) + 12px); }
  .hs-grid, .hs-grid[data-n="5"], .hs-grid[data-n="6"] { grid-template-columns: repeat(2, 1fr); }
  .hs-grid[data-n="1"] { grid-template-columns: 1fr; }
  .hs-card { min-height: 100%; }
  .hs-grid { flex: 1; align-content: center; }
  .hs-btn span { display: none; } .hs-btn { width: 52px; height: 52px; padding: 0; justify-content: center; border-radius: 50%; }
}
@media (max-width:1099px) and (min-width:701px) { .hud-bar .hb-faces { display: none; } }

/* ================= v2d: Slack-style left rail, sidebar sections, Files, More ================= */
:root{--rail-w:72px;--rail:#3f0e40;--rail-sel:rgba(255,255,255,.2);--rail-ink:rgba(255,255,255,.82)}
[data-theme=dark]{--rail:#3b153c;--side:#1a1d21;--side-top:#121016}
.rail{display:none}
.hd-side{display:none}
.hd-info{display:none}
@media (min-width:701px){
  .rail{display:flex;flex-direction:column;align-items:center;position:fixed;left:0;top:0;bottom:0;width:var(--rail-w);background:var(--rail);padding:calc(10px + var(--safe-t)) 0 calc(12px + var(--safe-b));z-index:6;color:var(--rail-ink)}
  .shell{margin-left:var(--rail-w)}
  .topbar{margin-left:var(--rail-w)}
  .ri-ws{width:40px;height:40px;border-radius:10px;background:#fff;display:grid;place-items:center;overflow:hidden;margin:2px 0 14px;flex:none;box-shadow:0 0 0 2px rgba(255,255,255,.0)}
  .ri-ws img{width:100%;height:100%;object-fit:cover;display:block}
  .ri-ws:focus-visible{box-shadow:0 0 0 2px #fff}
  .ri-list{display:flex;flex-direction:column;align-items:center;gap:8px;flex:1;min-height:0}
  .ri{display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--rail-ink);font-size:11px;font-weight:600;width:64px;text-decoration:none;-webkit-touch-callout:none}
  .ri-ic{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;position:relative;transition:background .12s}
  .ri-ic .ic{width:21px;height:21px;stroke-width:1.8}
  .ri:hover .ri-ic{background:rgba(255,255,255,.12)}
  .ri.sel .ri-ic{background:var(--rail-sel)} .ri.sel{color:#fff}
  .ri-lb{line-height:1;letter-spacing:.01em}
  .ri-dot{position:absolute;top:6px;right:6px;width:9px;height:9px;border-radius:50%;background:#e2445c;box-shadow:0 0 0 2px var(--rail)}
  .ri-badge{position:absolute;top:-3px;right:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#e2445c;color:#fff;font-size:10.5px;font-style:normal;font-weight:700;display:grid;place-items:center;box-shadow:0 0 0 2px var(--rail)}
  .ri-foot{display:flex;flex-direction:column;align-items:center;gap:12px;flex:none}
  .ri-new{width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.16);color:#fff;display:grid;place-items:center} .ri-new:hover{background:rgba(255,255,255,.26)} .ri-new .ic{width:18px;height:18px}
  .ri-me{border-radius:9px;padding:0;position:relative} .ri-me .av{--s:36px} .ri-me .pres{box-shadow:0 0 0 2px var(--rail);background:var(--rail)} .ri-me .pres.on{background:#3ec98a;border-color:#3ec98a}
  /* sidebar hide / show */
  body.side-hidden .shell{grid-template-columns:0 minmax(0,1fr) 0} body.side-hidden.thread-open .shell{grid-template-columns:0 minmax(0,1fr) var(--thread-w)}
  body.side-hidden .side{display:none}
  body.side-hidden .hd-side{display:inline-grid}
}
@media (min-width:701px) and (max-width:1099px){
  .topbar{display:none}
  .shell{height:100dvh}
  body.side-hidden.thread-open .shell{grid-template-columns:0 minmax(0,1fr) 0}
  .side{padding-top:var(--safe-t)} .main{padding-top:var(--safe-t)}
}
@media (min-width:1100px){ .rail{top:44px;padding-top:12px} .topbar{margin-left:0} }
/* sidebar header: name + filter + hide-sidebar */
.ws-head{border-bottom:0;padding:14px 10px 8px 16px}
.ws-tools{display:flex;gap:2px}
.ws-tools .icon-btn{width:32px;height:32px;border-radius:8px} .ws-tools .icon-btn .ic{width:19px;height:19px}
.ws-tools .icon-btn.on{background:rgba(255,255,255,.16);color:#fff}
.side.as-home .side-tg{display:none}
.side-flt{display:flex;align-items:center;justify-content:space-between;margin:0 4px 10px;padding:6px 10px;border-radius:8px;background:rgba(255,255,255,.08);font-size:13px}
.side-flt button{color:#fff;font-weight:700;font-size:13px}
.side-nav{padding-bottom:10px;margin-bottom:6px;border-bottom:1px solid var(--side-line)}
/* sections: "Name >"  ……  "^" like Slack */
.side .sec{margin:0;padding:8px 0 10px;border-bottom:1px solid var(--side-line)}
.side .sec:last-child{border-bottom:0}
.sec-head{display:flex;align-items:center;gap:0;padding:0 2px 4px 2px;justify-content:flex-start;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:pan-y}
.sec-toggle{display:flex;align-items:center;gap:7px;min-height:32px;padding:4px 4px 4px 8px;font-weight:700;color:var(--side-ink-hi);min-width:0}
.sec-toggle>span:not(.sec-ic){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sec-toggle .ic{transform:none!important}
.sec-ic{display:grid;place-items:center;opacity:.8} .sec-ic .ic{width:15px;height:15px}
.sec-go{width:26px;height:32px;display:grid;place-items:center;color:var(--side-ink);border-radius:6px;flex:none} .sec-go .ic{width:15px;height:15px} .sec-go:hover{background:var(--side-hover);color:#fff}
.sec-sp{flex:1;align-self:stretch;min-width:12px}
.sec-caret{width:34px;height:32px;display:grid;place-items:center;color:var(--side-ink);border-radius:6px;flex:none} .sec-caret:hover{background:var(--side-hover)}
.sec-caret .ic{width:17px;height:17px;transition:transform .15s}
.sec.collapsed .sec-caret .ic{transform:rotate(180deg)}
.sec.collapsed .sec-head{padding-bottom:0}
.side .si{touch-action:pan-y;-webkit-touch-callout:none;-webkit-user-drag:none;user-select:none;-webkit-user-select:none}
.side .si.lifting,.side .sec.lifting>.sec-head{background:var(--side-hover);transform:scale(1.02);transition:transform .12s}
body.side-dragging{cursor:grabbing} body.side-dragging .side{user-select:none}
.drag-ghost{position:fixed;left:0;top:0;z-index:200;pointer-events:none;opacity:.92;background:var(--side-sel)!important;color:#fff!important;border-radius:8px;box-shadow:0 10px 30px rgba(0,0,0,.35);list-style:none}
.drag-ghost .si-more{display:none!important}
.side .si.drop-before{box-shadow:inset 0 2px 0 #fff} .side .si.drop-after{box-shadow:inset 0 -2px 0 #fff}
.side .sec.drop-before{box-shadow:inset 0 2px 0 #fff} .side .sec.drop-after{box-shadow:inset 0 -2px 0 #fff}
.side .sec.drop-on{background:rgba(255,255,255,.06);border-radius:8px}
.sec-empty{padding:4px 12px 6px 34px}
/* floating compose (phone home) */
.fab{display:none}
@media (max-width:700px){
  .side.as-home{position:relative}
  .side.as-home .fab{display:grid;place-items:center;position:fixed;right:18px;bottom:calc(var(--tabbar) + 18px + var(--safe-b));width:54px;height:54px;border-radius:16px;background:#fff;color:#1d1c1d;box-shadow:0 6px 20px rgba(0,0,0,.28);z-index:25}
  .side.as-home .fab .ic{width:22px;height:22px}
  body[data-route=more] .main,body[data-route=files] .main,body[data-route=huddles] .main,body[data-route=lists] .main,body[data-route=canvases] .main{bottom:calc(var(--tabbar) + var(--safe-b))}
  body[data-route=files] .view-head .back,body[data-route=huddles] .view-head .back,body[data-route=lists] .view-head .back,body[data-route=you] .view-head .back{display:inline-grid}
  .tdot{position:absolute;top:8px;left:calc(50% + 7px);width:9px;height:9px;border-radius:50%;background:#e2445c;border:2px solid #fff}
  .side.as-home .sec-head{padding-left:4px}
}
[data-theme=dark] .side.as-home .fab{background:#2c2d30;color:#fff}
/* header: AI + huddle icons like Slack */
.hd-ai .ic{width:20px;height:20px}
/* Files */
.files-top{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
.files-top .input{max-width:520px}
.files-all{display:flex;align-items:center;gap:8px;font-size:13.5px;color:var(--muted)}
.files-list{display:flex;flex-direction:column}
.fl-row{display:flex;align-items:center;gap:12px;padding:9px 6px;border-radius:10px;color:var(--text);text-decoration:none;min-height:56px}
.fl-row:hover{background:var(--surface2)}
.fl-th{width:44px;height:44px;border-radius:9px;display:grid;place-items:center;background:var(--surface2);color:var(--muted);font-size:11px;font-weight:800;flex:none;overflow:hidden}
.fl-th.img img{width:100%;height:100%;object-fit:cover}
.fl-th.pdf{background:#fde8e8;color:#c62828} .fl-th.media{background:var(--accent-soft);color:var(--accent)} .fl-th .ic{width:20px;height:20px}
.fl-txt{flex:1;min-width:0;display:flex;flex-direction:column} .fl-txt b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .fl-txt small{color:var(--muted);font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fl-row.ext{opacity:.7}
.fl-open{flex:none}
.files-more{margin:12px auto;display:block}
/* More */
.more-body{max-width:640px;margin:0 auto}
.more-grp{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;overflow:hidden;margin-bottom:14px;background:var(--surface)}
.more-item{display:flex;align-items:center;gap:12px;padding:12px 14px;text-align:left;color:var(--text);text-decoration:none;border-bottom:1px solid var(--line2);min-height:56px}
.more-grp>.more-item:last-child{border-bottom:0}
.more-item:hover{background:var(--surface2)}
.mi-ic{width:34px;height:34px;border-radius:9px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;flex:none} .mi-ic .ic{width:19px;height:19px}
.mi-txt{flex:1;min-width:0;display:flex;flex-direction:column} .mi-txt b{font-weight:600} .mi-txt small{color:var(--muted);font-size:13px}
.more-item>.ic{width:16px;height:16px;color:var(--muted)}
.more-me{display:flex;align-items:center;gap:12px;padding:6px 4px 16px;text-align:left;width:100%} .more-me>span{flex:1;display:flex;flex-direction:column} .more-me b{font-size:18px} .more-me>.ic{width:16px;color:var(--muted)}
.pick-list{display:flex;flex-direction:column;max-height:52dvh;overflow:auto;margin-top:10px}
.pick-list .pick{display:flex;align-items:center;gap:10px;padding:9px 8px;border-radius:8px;text-align:left} .pick-list .pick:hover{background:var(--surface2)}
.pk-ic{width:24px;display:grid;place-items:center;color:var(--muted)} .si-count.dark{background:var(--surface2);color:var(--text);width:24px;height:24px}

.m-home{min-width:0;max-width:100vw;overflow-x:hidden} .m-home>.side{min-width:0;max-width:100%} .side .sec-head,.side .sec-list,.side .side-nav{min-width:0}

/* v2e: Slack sync */
.ss-box{gap:10px}.ss-line{display:flex;flex-direction:column;gap:4px}.ss-log{width:100%}.ss-log>div{padding:4px 0;border-top:1px solid var(--line2)}

/* v2f: quiet placeholder the first time a conversation opens on this device (never shown once it is cached) */
.msg-list .loading.skel{display:flex;flex-direction:column;gap:14px;padding:22px 20px;color:transparent;animation:skelIn .2s .25s both}
.msg-list .loading.skel i{display:block;height:12px;border-radius:6px;background:var(--line,#e6e3f1);opacity:.7}
.msg-list .loading.skel i:nth-child(1){width:46%}.msg-list .loading.skel i:nth-child(2){width:72%}.msg-list .loading.skel i:nth-child(3){width:58%}
@keyframes skelIn{from{opacity:0}to{opacity:1}}

/* ===== v2f: Threads — Unreads · All switch, and the catch-up cards ===== */
.th-seg{display:inline-flex;gap:0;margin:0;padding:2px;border-radius:10px;background:var(--surface2);border:1px solid var(--line);flex-wrap:nowrap}
.th-seg button{border:0;border-radius:8px;padding:5px 12px;font-size:13px;font-weight:600;color:var(--muted);background:transparent;white-space:nowrap}
.th-seg button.sel{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.hd-topic.cu-left{font-weight:600;color:var(--muted)}
.view-scroll.cu-scroll{overflow:hidden;display:flex;flex-direction:column;background:var(--surface2)}
.view-body.cu-body{flex:1;min-height:0;width:100%;max-width:760px;padding:14px 16px 12px;display:flex;flex-direction:column}
.cu{flex:1;min-height:0;display:flex;flex-direction:column;gap:12px}
.cu-stage{position:relative;flex:1;min-height:0}
.cu-card{position:absolute;inset:0;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:0 2px 10px rgba(30,20,70,.07);overflow:hidden;
  transition:transform .24s cubic-bezier(.2,.7,.2,1),opacity .24s;touch-action:pan-y;will-change:transform}
.cu-card.dragging{transition:none}
.cu-card.in-r{transform:translateX(105%);opacity:.4}.cu-card.in-l{transform:translateX(-105%);opacity:.4}
.cu-card.out-l{transform:translateX(-105%) rotate(-2deg);opacity:0;pointer-events:none}.cu-card.out-r{transform:translateX(105%) rotate(2deg);opacity:0;pointer-events:none}
.cu-card.nudge{animation:cuNudge .3s}
@keyframes cuNudge{30%{transform:translateX(-10px)}60%{transform:translateX(8px)}100%{transform:none}}
.cu-head{display:flex;align-items:center;gap:8px;padding:12px 10px 10px 18px;border-bottom:1px solid var(--line2);flex:none}
.cu-ttl{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.25}
.cu-ttl b{font-size:16px}.cu-ttl .muted{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cu-msgs{flex:1;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:8px 0 10px;overscroll-behavior:contain}
.cu-more{display:block;padding:4px 18px 6px 64px}
.cu-new{display:flex;align-items:center;gap:8px;margin:6px 16px;color:var(--red);font-size:12px;font-weight:700}
.cu-new::before,.cu-new::after{content:"";flex:1;height:1px;background:var(--red);opacity:.45}
.cu-comp.composer-wrap{padding:0 12px 12px;flex:none;background:transparent}
.cu-bar{display:flex;gap:10px;flex:none}
.cu-bar .btn{flex:1;justify-content:center;min-height:46px;font-size:15px;border-radius:12px}
.cu-bar .cu-keep{background:var(--surface);border:1px solid var(--line)}
.cu-skel{padding:24px}
.cu-done{justify-content:center}
.cu-done .es-ic{color:var(--green)}
@media (max-width:700px){
  .view-body.cu-body{padding:8px 8px 8px}
  .cu{gap:8px}.cu-card{border-radius:14px}
  .cu-bar .btn{min-height:44px}
  .th-seg button{padding:5px 10px}
}
[data-theme=dark] .cu-card{box-shadow:none}
/* ===== v2f: Create task ===== */
.tk-sheet{display:flex;flex-direction:column;gap:12px}
.tk-row{display:flex;flex-direction:column;gap:5px;width:100%}
.tk-lab{font-size:12.5px;font-weight:600;color:var(--muted)}
.tk-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.tk-grid .tk-row:nth-child(2){grid-column:1/-1}
.tk-chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.tk-chips .tk-date{width:auto;flex:1;min-width:140px;max-width:190px;padding:5px 10px;height:32px;border-radius:16px}
.tk-chips .tk-date.sel{border-color:var(--text)}
.tk-src{margin-top:-2px}
#tkTitle{font-size:16px}
@media (max-width:520px){.tk-grid{grid-template-columns:1fr}}
#tkChips{position:fixed;left:50%;bottom:calc(84px + env(safe-area-inset-bottom));transform:translateX(-50%);z-index:300;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none}
.tk-chip{pointer-events:auto;display:flex;align-items:center;gap:10px;background:var(--text);color:var(--bg);padding:9px 10px 9px 14px;border-radius:22px;box-shadow:0 6px 20px rgba(0,0,0,.18);font-weight:600;font-size:14px;transition:opacity .3s,transform .3s}
.tk-chip.out{opacity:0;transform:translateY(8px)}
.tk-chip .tk-ok{display:inline-flex;width:20px;height:20px;border-radius:50%;background:var(--green);color:#fff;align-items:center;justify-content:center}
.tk-chip .tk-ok .ic{width:14px;height:14px}
.tk-chip .tk-open{color:var(--bg);background:rgba(255,255,255,.18);padding:4px 12px;border-radius:14px;text-decoration:none}
[data-theme=dark] .tk-chip .tk-open{background:rgba(0,0,0,.12)}
.tk-chip .tk-x{color:inherit;opacity:.7;display:inline-flex;padding:2px}
.tk-chip .tk-x .ic{width:16px;height:16px}
.cu-count{font-size:13.5px;font-weight:700;color:var(--muted);margin-right:8px;white-space:nowrap}
.bf-bar{width:100%;height:8px;border-radius:5px;background:var(--surface2);overflow:hidden}.bf-bar i{display:block;height:100%;background:var(--accent);border-radius:5px;transition:width .4s}
.imgx{background:var(--surface2);border-radius:10px;position:relative;min-height:90px;min-width:140px}.imgx>img{opacity:0}.imgx::after{content:'Photo isn\2019t available';position:absolute;inset:0;display:grid;place-items:center;color:var(--muted);font-size:13px;pointer-events:none}

/* ---------- v2g: two-step sign-in & Security ---------- */
.st-chip{display:inline-flex;align-items:center;height:22px;padding:0 8px;border-radius:11px;font-size:12px;font-weight:600;margin-left:8px;vertical-align:middle;background:var(--surface2);color:var(--muted)}
.st-chip.on{background:#e3f6ee;color:#16784f}
[data-theme=dark] .st-chip.on{background:rgba(47,181,125,.18);color:#6fe0ae}
.check{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--text);margin:10px 0 2px;cursor:pointer}
.check input{width:18px;height:18px;accent-color:var(--accent)}
.linkish{color:var(--link);font-size:14px;font-weight:500;padding:6px 0}
.linkish:hover{text-decoration:underline}
.auth-links{display:flex;justify-content:space-between;gap:12px;margin-top:14px;flex-wrap:wrap}
.input.mfa-code{font-size:26px;letter-spacing:.18em;text-align:center;height:56px;font-variant-numeric:tabular-nums;width:100%}
.mfa-login .input.mfa-code{margin-top:4px}
.mfa-body{max-width:520px}
.mfa-steps{margin:0;padding:0;list-style:none;counter-reset:st;display:flex;flex-direction:column;gap:18px}
.mfa-steps>li{counter-increment:st;position:relative;padding-left:38px;display:flex;flex-direction:column;gap:8px}
.mfa-steps>li::before{content:counter(st);position:absolute;left:0;top:-1px;width:26px;height:26px;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-weight:700;font-size:14px;display:grid;place-items:center}
.mfa-steps p{margin:0}
.mfa-qr{width:184px;height:184px;background:#fff;border-radius:12px;border:1px solid var(--line);padding:6px;display:grid;place-items:center}
.mfa-qr svg{width:100%;height:100%;display:block}
.mfa-manual summary{cursor:pointer;color:var(--link);font-size:14px;font-weight:500;list-style:none}
.mfa-manual summary::-webkit-details-marker{display:none}
.mfa-key{margin-top:8px;display:flex;flex-direction:column;gap:4px}
.mfa-key-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.mfa-key code{font-size:15px;letter-spacing:.06em;background:var(--surface2);padding:6px 10px;border-radius:8px;word-break:break-all}
.mfa-setup .btn.primary.block{margin-top:6px}
.mfa-step{display:flex;flex-direction:column;gap:12px}
.mfa-step p{margin:0}
.mfa-codes{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;background:var(--surface2);border-radius:12px;padding:14px}
.mfa-codes code{font-size:16px;letter-spacing:.08em;text-align:center;font-variant-numeric:tabular-nums}
.mfa-forced{margin-top:6px}
.auth-card:has(.mfa-forced){max-width:520px}
.sec-body{display:flex;flex-direction:column;gap:2px}
.sec-head{display:flex;align-items:center;justify-content:space-between;width:100%;gap:10px}
.sec-row{display:flex;align-items:center;justify-content:space-between;width:100%;gap:10px;padding:6px 0;border-top:1px solid var(--line2)}
.sec-row>span,.sess .grow,.slog .grow{display:flex;flex-direction:column;min-width:0}
.danger-ink{color:var(--red)!important}
.sess{display:flex;align-items:center;gap:12px;width:100%;padding:8px 0;border-top:1px solid var(--line2)}
.sess-ic{font-size:20px;width:28px;text-align:center}
.slog{display:flex;align-items:flex-start;gap:10px;width:100%;padding:6px 0;border-top:1px solid var(--line2);font-size:14px}
.slog b{font-weight:600}
.slog-dot{width:8px;height:8px;border-radius:50%;background:var(--green);margin-top:7px;flex:none}
.slog.bad .slog-dot{background:var(--red)}
.radio-list{display:flex;flex-direction:column;gap:6px;width:100%}
.radio{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;cursor:pointer}
.radio.sel{border-color:var(--accent);background:var(--accent-soft)}
.radio input{margin-top:3px;accent-color:var(--accent);width:18px;height:18px}
.radio>span{display:flex;flex-direction:column}
.radio:has(input:disabled){opacity:.6;cursor:default}
.mfa-login .check{margin:12px 0 16px}

/* ===================== v2j: Find anything (search chips, tabs, recent searches), PDF viewer, Drafts & sent, slash commands, reminders ===================== */
.v2j-bar{margin-bottom:8px}
.v2j-chips{display:flex;gap:6px;margin:0 0 10px;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-bottom:2px}
.v2j-chips::-webkit-scrollbar{display:none}
.v2j-chip{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;min-height:34px;background:var(--surface)}
.v2j-chip .v2j-x{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:50%;font-size:15px;line-height:1;margin-right:-6px;background:rgba(255,255,255,.2)}
.v2j-sort{display:flex;gap:4px}
.v2j-sort button{padding:5px 10px;font-size:13px}
.v2j-tabs{display:flex;gap:2px;overflow-x:auto;border-bottom:1px solid var(--line);margin:4px 0 10px;scrollbar-width:none}
.v2j-tabs::-webkit-scrollbar{display:none}
.v2j-n{margin-left:5px;font-weight:600;color:var(--muted);font-size:12.5px}
.v2j-tabs button.sel .v2j-n{color:var(--accent)}
.v2j-note{margin:0 2px 6px}
.v2j-more{display:block;margin:12px auto}
mark.v2j-hl{background:var(--mention);color:inherit;border-radius:3px;padding:0 1px}
.v2j-sec{display:flex;align-items:center;justify-content:space-between}
.v2j-rrow{display:flex;align-items:center;gap:4px}
.v2j-rrow .sg{flex:1;min-width:0}
.v2j-rrow .sg span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v2j-tipgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:6px}
.v2j-tip{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;padding:9px 11px;border:1px solid var(--line);border-radius:10px;min-height:44px}
.v2j-tip code{font-size:13px;color:var(--link);background:none;padding:0}
.v2j-tip span{font-size:12.5px}
.v2j-picker .input{margin-bottom:8px}
.v2j-pick-list{max-height:min(60vh,460px);overflow-y:auto}
.v2j-date .sheet-item{padding:11px 12px;font-size:15px}
.v2j-row{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;margin-bottom:6px}
.v2j-row select{width:auto;min-width:96px}
.v2j-row .field{flex:1;min-width:130px;margin:0}
.v2j-file .fl-open,.v2j-doc .fl-open{margin-left:auto}
/* PDF viewer */
body.pv-open{overflow:hidden}
.pv-wrap{position:fixed;inset:0;z-index:120;background:#2b2a33;display:flex;flex-direction:column;color:#fff;animation:pvIn .14s ease-out}
@keyframes pvIn{from{opacity:0}to{opacity:1}}
.pv-head{display:flex;align-items:center;gap:10px;padding:calc(8px + var(--safe-t)) 12px 8px;background:#1f1e26;box-shadow:0 1px 0 rgba(255,255,255,.06)}
.pv-head .icon-btn{color:#fff;width:40px;height:40px;display:grid;place-items:center;border-radius:10px;font-size:22px;font-weight:600}
.pv-head .icon-btn:hover{background:rgba(255,255,255,.1)}
.pv-title{flex:1;min-width:0;display:flex;flex-direction:column}
.pv-title b{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:15px}
.pv-title small{color:rgba(255,255,255,.66);font-size:12.5px}
.pv-tools{display:flex;align-items:center;gap:2px}
.pv-zoom-v{min-width:46px;text-align:center;font-size:13px;color:rgba(255,255,255,.8)}
.pv-scroll{flex:1;overflow:auto;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y;outline:none;padding-bottom:var(--safe-b)}
.pv-pages{display:flex;flex-direction:column;align-items:center;gap:12px;padding:12px;min-width:min-content;transform-origin:0 0}
.pv-pages.zoomed{align-items:flex-start}
.pv-page{background:#fff;box-shadow:0 2px 10px rgba(0,0,0,.35);max-width:none;position:relative;flex:none;color:#666;display:grid;place-items:center;font-size:13px}
.pv-canvas{display:block;width:100%;height:100%}
.pv-msg{margin:20vh auto;text-align:center;color:rgba(255,255,255,.85);max-width:360px;line-height:1.6}
.pv-msg a{color:#c9c2ff;text-decoration:underline}
.pv-spin{display:inline-block;width:16px;height:16px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;margin-right:8px;vertical-align:-3px;animation:pvSpin .8s linear infinite}
@keyframes pvSpin{to{transform:rotate(360deg)}}
@media (max-width:600px){.pv-zoom-v{display:none}.pv-head{gap:4px;padding-left:6px;padding-right:6px}}
/* slash commands */
.v2j-slash{padding:5px;max-height:320px}
.v2j-cmd{display:grid;grid-template-columns:auto 1fr;column-gap:8px;row-gap:1px;white-space:normal;align-items:baseline;min-height:40px}
.v2j-cmd .muted{font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v2j-cmd-d{grid-column:1 / -1;color:var(--muted);font-size:12.5px}
body.v2j-collapse #main .imgs,body.v2j-collapse #main .vid,body.v2j-collapse #main .lps{display:none}
body.v2j-collapse #main .msg-list::before,body.v2j-collapse #msgList::before{content:"Images and link previews are hidden here · /expand to show";display:block;text-align:center;font-size:12.5px;color:var(--muted);padding:6px}
.v2j-who{max-height:60vh;overflow-y:auto}
/* reminders + drafts */
.v2j-rem.due{border-color:var(--amber)}
.v2j-rem.done .sc-text{color:var(--muted);text-decoration:line-through}
.v2j-when{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.v2j-when .fchip{min-height:36px}
.v2j-remsheet .field{margin-bottom:10px}
.v2j-saved-rem{margin-bottom:6px}
.v2j-draft .sc-text{display:block;color:var(--text)}
[data-theme=dark] .v2j-tip{border-color:var(--line)}
[data-theme=dark] mark.v2j-hl{background:rgba(227,154,45,.32)}


/* ===================== v2k "Your way": sidebar colors, compact view, text size, reduce motion, channel tabs & panes, channel settings,
   back/forward, shortcuts sheet, offline queue, accessibility ===================== */
:root[data-side="ocean"]{--side:#0f3550;--side-top:#0a2a40;--rail:#0b3d5c;--side-sel:#2a7dbd}
:root[data-side="forest"]{--side:#1b3a2d;--side-top:#142e23;--rail:#183d2e;--side-sel:#3f8f5f}
:root[data-side="slate"]{--side:#2b3038;--side-top:#22262d;--rail:#30353e;--side-sel:#5a6b85}
:root[data-side="sunset"]{--side:#4a1f2a;--side-top:#3c1822;--rail:#5a2330;--side-sel:#c4553f}
:root[data-side="midnight"]{--side:#151a2e;--side-top:#0f1324;--rail:#1a2038;--side-sel:#4b5bd6}
/* text size */
:root[data-size="s"] .msg .text,:root[data-size="s"] .comp-ta{font-size:13.5px} :root[data-size="s"] .name{font-size:13.5px} :root[data-size="s"] .si{font-size:14px}
:root[data-size="l"] .msg .text,:root[data-size="l"] .comp-ta{font-size:17.5px;line-height:1.5} :root[data-size="l"] .name{font-size:17px} :root[data-size="l"] .si{font-size:16.5px;height:34px} :root[data-size="l"] .msg time{font-size:13px}
/* compact messages */
.v2k-compact .msg{grid-template-columns:22px minmax(0,1fr);gap:8px;padding-top:3px;padding-bottom:3px}
.v2k-compact .msg>.gutter .av{--s:22px!important}
.v2k-compact .msg>.gutter{padding-top:0}
.v2k-compact .msg .meta{line-height:1.2}
.v2k-compact .msg.cont{padding-top:1px;padding-bottom:1px}
.v2k-compact .msg .hover-time{line-height:18px;font-size:10.5px}
/* reduce motion */
.v2k-reduce *,.v2k-reduce *::before,.v2k-reduce *::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
/* back / forward (desktop) */
.v2k-nav{display:none;gap:2px;align-items:center}
@media (hover:hover) and (pointer:fine) and (min-width:701px){.v2k-nav{display:inline-flex}}
.v2k-nav .icon-btn{width:30px;height:30px} .v2k-nav .icon-btn:disabled{opacity:.35;cursor:default;background:none} .v2k-fwd .ic{transform:scaleX(-1)}
/* channel header: "8 members · 4 tabs" under the name on touch screens */
.hd-title .v2k-sub{display:none}
@media (hover:none),(max-width:1100px){.hd-title.v2k-two{flex-wrap:wrap;row-gap:0;line-height:1.2}.hd-title .v2k-sub{display:block;flex-basis:100%;font-size:12.5px;font-weight:500;color:var(--muted);letter-spacing:0;margin-top:1px;overflow:hidden;text-overflow:ellipsis}}
/* channel tabs */
.ch-tabs button.ct{background:none;cursor:pointer}
.ch-tabs .ct-emoji{font-size:14px;line-height:1}
.ch-tabs .ct .ic+span+.ic{width:12px;height:12px;margin-left:-2px}
#main.v2k-pane-open>.msg-scroll,#main.v2k-pane-open>.new-pill,#main.v2k-pane-open>.composer-wrap,#main.v2k-pane-open>.pins-bar,#main.v2k-pane-open>.typing{display:none!important}
.v2k-pane{flex:1;min-height:0;overflow-y:auto;padding:14px 20px 24px;background:var(--bg)}
.v2k-pane-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:2px 0 12px;flex-wrap:wrap}
.v2k-pane-head h2{font-size:17px;margin:0}
.v2k-pane-head .seg{margin-top:0}
.v2k-pane .fcard.wide{max-width:none;margin-bottom:8px}
.v2k-pane .rcard{margin-bottom:8px}
.v2k-link{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:12px;padding:6px 6px 6px 12px;margin-bottom:8px;background:var(--surface)}
.v2k-link-main{display:flex;align-items:center;gap:12px;flex:1;min-width:0;color:var(--text);padding:4px 0}
.v2k-link-main b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.v2k-link-main small{color:var(--muted)}
.v2k-link-ic{width:36px;height:36px;border-radius:9px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;flex:none}
.fc-txt{min-width:0}
/* tab editor, emoji row */
.v2k-tabedit{display:flex;flex-direction:column;gap:4px;margin:8px 0}
.v2k-te-row{display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:10px;padding:6px 6px 6px 10px;min-height:46px}
.v2k-te-row.off{opacity:.55} .v2k-te-row.fixed{background:var(--surface2)}
.v2k-te-ic{display:grid;place-items:center;width:22px;color:var(--muted)}
.v2k-te-row .icon-btn:disabled{opacity:.3}
.v2k-emoji-row{display:flex;flex-wrap:wrap;gap:4px;align-items:center}
.v2k-emoji-in{width:64px!important;text-align:center;font-size:18px}
.v2k-qe{width:36px;height:36px;border-radius:8px;font-size:18px} .v2k-qe:hover{background:var(--surface2)}
/* channel settings */
.v2k-settings{gap:6px}
.v2k-set{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:4px 0}
.v2k-set>span{font-size:14px}
.v2k-set .seg{margin-top:0}
.join-bar.v2k-ro{background:var(--surface2)}
/* preferences */
.v2k-row{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;flex-wrap:wrap;padding:2px 0}
.v2k-row.col{flex-direction:column;align-items:stretch}
.v2k-row-l{display:flex;flex-direction:column;min-width:0}
.v2k-row-l>span{font-size:14px;font-weight:600}
.v2k-row .seg{margin-top:0}
.v2k-swatches{display:flex;gap:8px;flex-wrap:wrap}
.v2k-sw{width:34px;height:34px;border-radius:50%;padding:3px;border:2px solid transparent}
.v2k-sw span{display:block;width:100%;height:100%;border-radius:50%;background:var(--sw)}
.v2k-sw.sel{border-color:var(--accent)}
.v2k-vips{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.v2k-chip{display:inline-flex;align-items:center;gap:4px;background:var(--surface2);border:1px solid var(--line);border-radius:16px;padding:3px 4px 3px 10px;font-size:13.5px}
.v2k-chip button{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;color:var(--muted)} .v2k-chip .ic{width:14px;height:14px}
.pick-list .pick.on{background:var(--accent-soft)}
/* shortcuts sheet */
.v2k-keys h3{font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:14px 0 6px}
.v2k-keys h3:first-child{margin-top:0}
.v2k-keys dl{display:grid;grid-template-columns:minmax(150px,auto) 1fr;gap:6px 14px;margin:0;align-items:center}
.v2k-keys dt{white-space:nowrap} .v2k-keys dd{margin:0;color:var(--text)}
.v2k-keys kbd,.menu-pop kbd{display:inline-block;min-width:22px;padding:1px 6px;margin-right:3px;border:1px solid var(--line);border-bottom-width:2px;border-radius:6px;background:var(--surface2);font:600 12px/18px var(--font);text-align:center;color:var(--text)}
/* profiles */
.v2k-pron{font-size:14px;font-weight:500;color:var(--muted);margin-left:6px}
/* offline */
.msg.v2k-queued .text{opacity:.6}
.v2k-wait{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--muted);margin-top:2px}
.v2k-wait-dot{width:7px;height:7px;border-radius:50%;background:var(--amber)}
.v2k-offline{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(var(--safe-b) + 14px);z-index:60;background:#2b2a33;color:#fff;font-size:13.5px;font-weight:600;padding:9px 16px;border-radius:20px;box-shadow:var(--shadow-lg);max-width:calc(100vw - 24px);text-align:center}
@media (max-width:700px){.v2k-offline{bottom:auto;top:calc(env(safe-area-inset-top,0px) + 62px);font-size:13px;padding:7px 14px}}
.v2k-offline{pointer-events:none}
/* accessibility: visible keyboard focus everywhere, bigger touch targets */
.side :focus-visible,.rail :focus-visible,.topbar :focus-visible{outline:2px solid #fff;outline-offset:-2px}
.ch-tabs .ct:focus-visible,.seg button:focus-visible,.pick:focus-visible,.sheet-item:focus-visible,.menu-pop button:focus-visible,.msg .actions button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.msg:focus-within .actions{display:flex}
@media (hover:none){
  .icon-btn{min-width:40px;min-height:40px}
  .icon-btn.sm{min-width:36px;min-height:36px}
  .ch-tabs .ct{min-height:40px}
  .seg button{min-height:36px}
  .link-btn{min-height:36px}
  .v2k-chip button{width:32px;height:32px}
}
/* ===== v2h: the + panel, forwarded messages, clip speed, who reacted ===== */
.fbtn.plus.on{background:var(--accent-soft);color:var(--accent)}
.plus-pop{position:fixed;z-index:60;width:360px;max-width:calc(100vw - 16px);max-height:min(560px,calc(100vh - 24px));overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-lg);padding:6px 0 8px;-webkit-overflow-scrolling:touch;animation:plusIn .14s ease-out}
@keyframes plusIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.plus-pop.sheet{left:0;right:0;bottom:0;top:auto;width:auto;max-width:none;max-height:82vh;border-radius:16px 16px 0 0;padding-bottom:calc(10px + var(--safe-b));animation:plusUp .18s ease-out}
@keyframes plusUp{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
.plus-scrim{position:fixed;inset:0;z-index:59;background:rgba(20,16,40,.32)}
.plus-grab{width:36px;height:5px;border-radius:3px;background:var(--line);margin:4px auto 6px}
.plus-head{display:flex;align-items:center;justify-content:space-between;padding:8px 16px 6px}
.plus-head b{font-size:15px}
.plus-lib{color:var(--link);font-weight:600;font-size:14.5px;background:none;border:0;padding:4px 0;cursor:pointer}
.plus-strip{display:flex;gap:8px;overflow-x:auto;padding:4px 16px 12px;scroll-padding-inline:16px;scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;scrollbar-width:none}
.plus-strip::-webkit-scrollbar{display:none}
.pv-tile{flex:0 0 auto;width:76px;height:76px;border-radius:10px;overflow:hidden;position:relative;border:0;padding:0;background:var(--surface2);scroll-snap-align:start;cursor:pointer}
.pv-tile img,.pv-tile video{width:100%;height:100%;object-fit:cover;display:block;pointer-events:none}
.pv-tile.busy{opacity:.5}
.pv-tile:active{transform:scale(.97)}
.pv-cam{display:flex;align-items:center;justify-content:center;background:var(--surface2);border:1px solid var(--line);color:var(--text)}
.pv-cam .ic{width:28px;height:28px}
.pv-dur{position:absolute;left:5px;bottom:5px;display:inline-flex;align-items:center;gap:2px;background:rgba(0,0,0,.55);color:#fff;font-size:11px;font-weight:600;padding:1px 5px 1px 3px;border-radius:6px;font-variant-numeric:tabular-nums}
.pv-dur svg{width:11px;height:11px}
.pv-empty{align-self:center;font-size:13px;padding:0 6px;white-space:nowrap}
.plus-rows{border-top:1px solid var(--line2);padding-top:4px}
.plus-rows hr{border:0;border-top:1px solid var(--line2);margin:4px 0}
.plus-row{display:flex;align-items:center;gap:14px;width:100%;min-height:48px;padding:0 16px;background:none;border:0;text-align:left;font-size:15.5px;color:var(--text);cursor:pointer}
.plus-row:hover{background:var(--hover)} .plus-row:active{background:var(--surface2)}
.plus-row .pr-ic{display:inline-flex;width:24px;justify-content:center} .plus-row .pr-ic .ic{width:22px;height:22px;color:var(--text)}
.plus-row .pr-l{flex:1}
.plus-row .pr-chev .ic{width:18px;height:18px;color:var(--muted)}
.plus-row.quiet{color:var(--muted);font-size:14.5px} .plus-row.quiet .pr-ic .ic{color:var(--muted)}
.plus-subhead{display:flex;align-items:center;gap:6px;padding:2px 10px 6px;border-bottom:1px solid var(--line2)}
.plus-subhead b{font-size:15px}
.plus-list{padding:4px 0}
.plus-loading{padding:16px;font-size:14px}
.plus-item{display:flex;align-items:center;gap:12px;width:100%;padding:8px 16px;background:none;border:0;text-align:left;cursor:pointer;color:var(--text)}
.plus-item:hover{background:var(--hover)}
.plus-item .pi-ic{flex:0 0 36px;height:36px;border-radius:8px;background:var(--surface2);display:flex;align-items:center;justify-content:center;color:var(--muted)}
.plus-item .pi-ic.fext{font-size:10px;font-weight:700;letter-spacing:.02em} .plus-item .pi-ic.pdf{background:var(--red-soft);color:var(--red)}
.plus-item .pi-t{display:flex;flex-direction:column;min-width:0} .plus-item .pi-t b{font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis} .plus-item .pi-t small{color:var(--muted);font-size:12.5px}
/* forwarded message card */
.fwd{margin-top:6px;border-left:4px solid var(--line);padding:4px 0 4px 12px;cursor:pointer;max-width:560px;border-radius:2px}
.fwd:hover{border-left-color:var(--accent)}
.fwd-head{display:flex;align-items:center;gap:8px;font-size:14px}
.fwd-head .av{flex:0 0 auto}
.fwd-text{margin-top:2px}
.fwd-foot{font-size:12.5px;margin-top:4px}
.fwd .files{margin-top:6px}
.fw-src .fwd{cursor:default;max-height:140px;overflow:hidden}
.fw-body{display:flex;flex-direction:column;gap:10px}
.fw-list{display:flex;flex-direction:column;max-height:260px;overflow:auto;border:1px solid var(--line);border-radius:10px;padding:4px}
.fw-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;background:none;border:0;text-align:left;width:100%;min-height:44px;cursor:pointer;color:var(--text)}
.fw-row:hover{background:var(--hover)} .fw-row.on{background:var(--accent-soft)}
.fw-hash{width:24px;text-align:center;color:var(--muted);font-weight:600}
.fw-name{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fw-check{color:var(--accent);font-weight:700;width:16px}
.fw-chips{display:flex;flex-wrap:wrap;gap:6px} .fw-chips:empty{display:none}
.fw-chip{display:inline-flex;align-items:center;gap:4px;background:var(--accent-soft);color:var(--link);border-radius:14px;padding:3px 4px 3px 10px;font-size:13.5px;font-weight:600}
.fw-chip button{border:0;background:none;color:inherit;font-size:16px;line-height:1;padding:0 4px;cursor:pointer}
.fw-empty{padding:12px}
.fw-priv{margin:0}
/* clip speed */
.clip-rate{border:1px solid var(--line);background:var(--surface);border-radius:10px;font-size:12px;font-weight:700;padding:2px 7px;min-width:38px;color:var(--muted);cursor:pointer;font-variant-numeric:tabular-nums}
.clip-rate.on{color:var(--accent);border-color:var(--accent)}
.vclip .clip-rate{position:absolute;top:8px;right:8px;background:rgba(0,0,0,.6);color:#fff;border-color:transparent}
.vclip .clip-rate.on{background:var(--accent)}
/* who reacted */
.who-pop{position:fixed;z-index:70;min-width:180px;max-width:280px;max-height:320px;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-lg);padding:6px 0}
.who-head{display:flex;align-items:center;gap:8px;padding:4px 12px 8px;border-bottom:1px solid var(--line2);font-size:13px;color:var(--muted);font-weight:600}
.who-e{font-size:20px}
.who-row{display:flex;align-items:center;gap:10px;padding:6px 12px;font-size:14.5px}
.rx{-webkit-touch-callout:none;user-select:none;-webkit-user-select:none}
u{text-decoration:underline;text-underline-offset:2px}
/* ===================== v2i: Catch up fast — Unreads, To-dos, Activity clear, drafts, photo viewer, quick switcher, notifications ===================== */
/* sidebar: Unreads row, draft pencil, Jump to… on iPad/desktop */
.si .si-draft{display:inline-grid;place-items:center;margin-left:auto;opacity:.75} .si .si-draft .ic{width:14px;height:14px}
.si .si-draft + .badge{margin-left:6px}
@media (min-width:701px){ .side .m-search{display:block;padding:2px 8px 8px} .side .m-search-btn{display:flex;align-items:center;gap:8px;width:100%;height:32px;border-radius:8px;background:rgba(255,255,255,.12);color:rgba(255,255,255,.78);padding:0 10px;font-size:13.5px} .side .m-search-btn:hover{background:rgba(255,255,255,.2)} .side .m-search-btn .ic{width:15px;height:15px} }
/* Unreads list */
.un-grp{border:1px solid var(--line);border-radius:12px;margin-bottom:12px;background:var(--surface);overflow:hidden;transition:opacity .2s, transform .2s}
.un-grp.gone{opacity:.35;transform:scale(.99)}
.un-head{display:flex;align-items:center;gap:8px;padding:10px 10px 8px 14px;border-bottom:1px solid var(--line2)}
.un-title{flex:1;min-width:0;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .un-title b{font-size:15px}
.un-msgs{padding:4px 0} .un-msgs .msg .actions{display:none}
.un-all{display:block;padding:8px 14px 12px 64px;font-size:13.5px;font-weight:600}
.un-more-btn{display:block;margin:4px auto 20px}
.un-seg{margin-top:0}
/* To-dos */
.td-top{display:flex;align-items:center;gap:10px;margin-bottom:6px} .td-tabs{margin-top:0}
.td-filters{margin:6px 0 10px} .fchip.drop{display:inline-flex;align-items:center;gap:6px} .fchip.drop .ic{width:14px;height:14px}
.td-row{display:flex;align-items:flex-start;gap:8px;padding:6px 0;border-bottom:1px solid var(--line2)}
.td-chk{flex:none;width:40px;height:40px;display:grid;place-items:center;border-radius:50%;color:var(--muted)} .td-chk .ic{width:24px;height:24px} .td-chk:hover{color:var(--accent)}
.td-row.done .td-chk{color:var(--green)} .td-row.done .td-title,.td-row.done .td-card .text{text-decoration:line-through;opacity:.6}
.td-main{flex:1;min-width:0;padding-top:4px} .td-title{font-size:15px;line-height:1.35;padding:6px 0 2px;word-break:break-word}
.td-card{margin-bottom:4px} .td-meta{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin:2px 0 4px}
.td-due{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;font-weight:600;color:var(--muted);background:var(--surface2);border-radius:6px;padding:2px 8px} .td-due .ic{width:13px;height:13px}
.td-due.over{color:var(--red);background:var(--red-soft)}
.td-more{flex:none;margin-top:4px}
.td-over-note{display:inline-block;margin:0 0 8px;font-size:13px;font-weight:600;color:var(--red);background:var(--red-soft);border-radius:8px;padding:4px 10px}
.td-sv{margin-bottom:10px} .td-sv .td-card{margin-bottom:2px} .td-sv-acts{display:flex;gap:14px;padding:0 4px 4px}
.td-add-due{gap:10px;align-items:center;margin-top:6px}
/* Activity */
.act-unread{display:inline-flex;align-items:center;gap:6px;font-size:13.5px;font-weight:600;color:var(--muted);padding:0 6px;cursor:pointer} .act-unread input{width:16px;height:16px;accent-color:var(--accent)}
.act-tabs{overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;scrollbar-width:none} .act-tabs::-webkit-scrollbar{display:none} .act-tabs .fchip{flex:none}
.act-item{position:relative;transition:transform .2s, opacity .2s;touch-action:pan-y} .act-item.dragging{transition:none} .act-item.gone{opacity:0;transform:translateX(-30%)}
.act-item .rcard{padding-right:44px}
.act-clear{position:absolute;top:8px;right:6px;width:32px;height:32px;opacity:.55} .act-clear:hover{opacity:1} .act-clear .ic{width:16px;height:16px}
@media (hover:hover){ .act-clear{opacity:0} .act-item:hover .act-clear,.act-clear:focus-visible{opacity:.8} }
.act-restore{position:absolute;top:10px;right:12px}
/* keyword highlight */
mark.kw{background:var(--mention);color:var(--mention-ink);border-radius:3px;padding:0 1px}
/* notifications preferences */
.np-box .seg{margin:6px 0 4px} .np-row{display:flex;align-items:center;gap:8px;margin:10px 0 2px;font-size:14px} .np-row input{width:18px;height:18px;accent-color:var(--accent)}
.np-sec{margin-top:10px} .np-sec input{margin-top:6px}
.np-days{display:flex;flex-direction:column;gap:4px;margin:6px 0 0 26px} .np-day{display:flex;align-items:center;gap:8px;font-size:14px} .np-day.off input[type=time]{opacity:.4}
.np-day input[type=time]{border:1px solid var(--line);border-radius:6px;padding:3px 6px;background:var(--surface);color:var(--text);font:inherit} .np-dn{width:34px} .np-foot{margin-top:10px;justify-content:flex-end}
/* photo viewer */
.pv{background:rgba(8,8,12,.97)}
.pv .pv-stage{position:relative;overflow:hidden;padding:0;display:block;touch-action:none}
.pv-track{position:absolute;inset:0;display:flex;transform:translateX(-100%);will-change:transform}
.pv-slide{flex:0 0 100%;width:100%;height:100%;display:grid;place-items:center;padding:10px 10px calc(20px + var(--safe-b));overflow:hidden}
.pv-slide img{width:100%;height:100%;object-fit:contain;border-radius:4px;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;transform-origin:center center}
.pv-count{color:rgba(255,255,255,.8);font-size:13px;align-self:center;padding:0 8px;font-variant-numeric:tabular-nums}
.pv.zoomed .lb-nav{opacity:.25} .pv.dropping{background:rgba(14,12,22,.7)} .pv.dropping .pv-track{translate:0 var(--pv-drop,0)} .pv.closing{opacity:0;transition:opacity .15s}
/* quick switcher */
.qs-modal{padding-top:6px} .qs-list{display:flex;flex-direction:column;margin-top:8px;max-height:min(60vh,440px);overflow-y:auto}
.qs-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:8px;text-align:left;min-height:42px} .qs-row.sel{background:var(--accent-soft)}
.qs-row .qs-name{flex:none;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500} .qs-row.unread .qs-name{font-weight:800} .qs-row small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qs-row .si-ic{width:22px;display:inline-grid;place-items:center;color:var(--muted)} .qs-row .si-ic .ic{width:16px;height:16px}
.qs-sec{padding:4px 10px 2px} .qs-empty{padding:10px} .qs-hint{margin:8px 0 0;text-align:right}
[data-theme=dark] .td-due{background:rgba(255,255,255,.07)} [data-theme=dark] .qs-row.sel{background:rgba(140,120,255,.18)}
@media (max-width:700px){body[data-route=unreads] .main{bottom:calc(var(--tabbar) + var(--safe-b))}body[data-route=unreads] .view-head .back{display:inline-grid}}
/* ===================== v2l "Together": polls, huddle extras, canvas comments, list board/calendar, skin tones, analytics ===================== */
.poll-card{margin:6px 0 2px;max-width:440px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--surface)}
.poll-card .pc-sub{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted);margin-bottom:8px}
.poll-card .pc-sub svg{width:15px;height:15px;color:var(--accent)}
.pc-opts{display:flex;flex-direction:column;gap:6px}
.pc-opt{position:relative;display:flex;align-items:center;gap:10px;min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);text-align:left;overflow:hidden;font-size:14.5px;color:var(--text);cursor:pointer;width:100%}
.pc-opt:not(:disabled):hover{border-color:var(--accent)}
.pc-opt:disabled{cursor:default}
.pc-fill{position:absolute;left:0;top:0;bottom:0;background:var(--accent-soft);transition:width .25s;z-index:0}
.pc-opt>*:not(.pc-fill){position:relative;z-index:1}
.pc-mark{flex:none;width:20px;height:20px;border-radius:50%;border:2px solid var(--line);display:grid;place-items:center;background:var(--surface)}
.pc-mark.sq{border-radius:5px}
.pc-mark svg{width:13px;height:13px}
.pc-opt.mine{border-color:var(--accent)} .pc-opt.mine .pc-mark{background:var(--accent);border-color:var(--accent);color:#fff}
.pc-t{flex:1;min-width:0;overflow-wrap:anywhere}
.pc-n{flex:none;font-size:12.5px;color:var(--muted);font-weight:600}
.pc-faces{display:inline-flex;flex:none} .pc-faces>*{margin-left:-5px;border-radius:50%;box-shadow:0 0 0 2px var(--surface)}
.pc-foot{display:flex;align-items:center;gap:14px;margin-top:8px;font-size:13px;flex-wrap:wrap}
.linkish{background:none;border:0;padding:4px 0;color:var(--link);font:inherit;font-weight:600;cursor:pointer} .linkish.danger{color:var(--red,#d33)}
.poll-card.closed .pc-opt{opacity:.9}
.pc-new .pc-edit-opts{display:flex;flex-direction:column;gap:8px;margin-top:6px}
.pc-edit-row{display:flex;align-items:center;gap:6px}
.pc-add{align-self:flex-start;margin-top:6px}
.pc-toggle{display:flex;align-items:center;gap:10px;min-height:40px;font-size:14.5px} .pc-toggle input{width:20px;height:20px;accent-color:var(--accent)}
.pc-who-o{padding:8px 0;border-bottom:1px solid var(--line2)} .pc-who-h{display:flex;justify-content:space-between;margin-bottom:4px}
.pc-who-u{display:flex;align-items:center;gap:8px;padding:3px 0;font-size:14px}
.snip-ta{height:auto;min-height:180px;padding:10px 12px;font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace;font-size:13px;line-height:1.45}
/* huddle line in the channel */
.hud-line{display:flex;align-items:center;gap:10px;margin:6px 0 2px;flex-wrap:wrap}
.hud-line:empty{display:none}
.hl-live{display:inline-flex;align-items:center;gap:6px;font-size:13px} .hl-live svg{color:var(--green,#2eb67d)} .hl-live b{color:var(--green,#2eb67d)}
.hl-faces{display:inline-flex} .hl-faces>*{margin-left:-5px;border-radius:50%;box-shadow:0 0 0 2px var(--bg)}
.hud-line .btn.small{height:32px;padding:0 14px}
/* huddle: reactions, raise hand, screen share */
.hs-card{position:relative}
.hs-reacts{display:flex;justify-content:center;gap:4px;flex-wrap:wrap}
.hs-reacts button{width:44px;height:44px;border:0;border-radius:22px;background:rgba(255,255,255,.1);font-size:22px;cursor:pointer;transition:transform .1s}
.hs-reacts button:active{transform:scale(.9)} .hs-reacts button.on{background:var(--green)}
.hud-float{position:absolute;bottom:70px;font-size:34px;pointer-events:none;animation:hudFloat 2.5s ease-out forwards;display:flex;flex-direction:column;align-items:center;z-index:5}
.hud-float small{font-size:11px;font-weight:600;background:rgba(0,0,0,.45);color:#fff;border-radius:6px;padding:1px 6px;margin-top:2px}
.hud-bar .hud-float{bottom:40px}
@keyframes hudFloat{0%{opacity:0;transform:translateY(10px) scale(.7)}12%{opacity:1;transform:translateY(0) scale(1.1)}100%{opacity:0;transform:translateY(-200px) scale(1)}}
@media (prefers-reduced-motion:reduce){.hud-float{animation-duration:1.6s}}
.hs-grid.has-screen{grid-template-columns:repeat(4,1fr)}
.hs-grid.has-screen .hs-tile{aspect-ratio:4/3}
.hs-grid.has-screen .hs-tile.is-screen{grid-column:1/-1;aspect-ratio:16/9;order:-1}
.hs-tile.is-screen video{object-fit:contain}
.hs-tile.hand::after{content:"✋";position:absolute;top:8px;right:8px;font-size:22px;background:rgba(0,0,0,.4);border-radius:50%;width:36px;height:36px;display:grid;place-items:center}
.hs-tile.self-hidden{display:none}
.hs-card .hs-head{gap:4px} .hs-card .hs-head .hs-title{flex:1}
@media (max-width:700px){.hs-reacts button{width:40px;height:40px;font-size:20px}.hs-grid.has-screen{grid-template-columns:repeat(2,1fr)}}
/* canvas comments */
.cvc-btn{position:relative;width:auto;padding:0 8px;gap:4px;display:inline-flex}
.cvc-count{font-size:12px;font-weight:700;color:var(--accent)}
.cvc-add{position:absolute;right:-6px;width:32px;height:32px;border-radius:8px;border:1px solid var(--line);background:var(--surface);color:var(--muted);display:grid;place-items:center;box-shadow:var(--shadow);z-index:2}
.cvc-add[hidden]{display:none}
.cvc-add svg,.cvc-dot svg{width:16px;height:16px}
.blk{position:relative}
.cvc-dot{position:absolute;right:-44px;top:2px;display:inline-flex;align-items:center;gap:3px;height:26px;padding:0 7px;border-radius:13px;border:1px solid #f2d27a;background:#fff7dc;color:#7a5b00;font-size:12px;font-weight:700;cursor:pointer}
.blk.has-cvc .bt{background:rgba(255,213,79,.2);border-radius:4px;box-shadow:-6px 0 0 rgba(255,213,79,.2),6px 0 0 rgba(255,213,79,.2)}
.blk.cvc-flash{animation:cvcFlash 1.4s}
@keyframes cvcFlash{0%,60%{background:rgba(255,213,79,.35)}100%{background:transparent}}
.cvc-panel{position:fixed;right:0;top:0;bottom:0;width:340px;max-width:100%;z-index:70;background:var(--surface);border-left:1px solid var(--line);box-shadow:var(--shadow-lg);display:flex;flex-direction:column;padding-top:var(--safe-t,0px)}
.cvc-head{display:flex;align-items:center;gap:8px;padding:10px 10px 10px 16px;border-bottom:1px solid var(--line)} .cvc-head>b{font-size:15px}
.seg{display:inline-flex;background:var(--surface2);border-radius:9px;padding:2px;margin-left:auto}
.seg button{height:30px;padding:0 10px;border-radius:7px;border:0;background:none;font-weight:600;font-size:13px;color:var(--muted)} .seg button.on{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.08)}
.cvc-list{flex:1;overflow:auto;padding:8px 12px}
.cvc-empty{padding:16px 4px;font-size:13.5px}
.cvc-item{padding:10px 8px;border-radius:10px;border-bottom:1px solid var(--line2)} .cvc-item.target{background:var(--accent-soft)}
.cvc-meta{display:flex;align-items:center;gap:8px;font-size:13.5px} .cvc-meta .muted{font-size:12px}
.cvc-quote{display:block;margin:6px 0 2px;padding:2px 0 2px 8px;border:0;border-left:3px solid #f2c94c;background:none;color:var(--muted);font-size:13px;text-align:left;cursor:pointer}
.cvc-text{font-size:14.5px;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:4px}
.cvc-acts{display:flex;gap:14px;margin-top:4px;font-size:13px}
.cvc-new{border-top:1px solid var(--line);padding:10px 12px calc(10px + var(--safe-b,0px));display:flex;flex-direction:column;gap:8px}
.cvc-ta{height:auto;min-height:64px;padding:8px 10px;resize:vertical}
.cvc-target{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted)} .cvc-target span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (min-width:1100px){body.cvc-open .cv-scroll{padding-right:340px}}
@media (max-width:700px){.cvc-panel{top:auto;height:72%;width:100%;border-left:0;border-top:1px solid var(--line);border-radius:16px 16px 0 0}.cvc-dot{right:-4px;top:-10px}.cvc-add{right:0}}
/* list views */
.lv-sw{display:inline-flex;background:var(--surface2);border-radius:9px;padding:2px;flex:none}
.lv-sw button{display:inline-flex;align-items:center;gap:6px;height:34px;padding:0 12px;border:0;border-radius:7px;background:none;color:var(--muted);font-weight:600;font-size:13.5px}
.lv-sw button.on{background:var(--surface);color:var(--text);box-shadow:0 1px 2px rgba(0,0,0,.08)}
@media (max-width:700px){.lv-sw button span{display:none}.lv-sw button{padding:0 10px}}
.lv-top{display:flex;align-items:center;gap:10px;margin:4px 0 10px;flex-wrap:wrap}
.lv-group{display:inline-flex;align-items:center;gap:8px} .lv-group select{width:auto}
.lv-hint{margin-left:auto}
.lv-empty{padding:24px 8px;display:flex;flex-direction:column;align-items:flex-start;gap:8px;color:var(--muted)}
.lst-wrap.lv-wrap{display:block;overflow:visible;border:0;background:none;padding:0}
.lv-board{display:flex;gap:12px;overflow-x:auto;padding-bottom:12px;align-items:flex-start;-webkit-overflow-scrolling:touch}
.lv-col{flex:1 0 230px;max-width:340px;background:var(--surface2);border-radius:12px;padding:8px;display:flex;flex-direction:column;max-height:calc(100vh - 230px);transition:box-shadow .12s}
.lv-col header{display:flex;align-items:center;gap:8px;padding:4px 6px 8px;font-size:14px}
.lv-n{font-size:12px;color:var(--muted);background:var(--surface);border-radius:10px;padding:0 7px;line-height:20px}
.lv-cards{display:flex;flex-direction:column;gap:8px;overflow-y:auto;min-height:40px}
.lv-col.lv-over{box-shadow:inset 0 0 0 2px var(--accent);background:var(--accent-soft)}
.lv-card{background:var(--surface);border:1px solid var(--line);border-radius:10px;padding:10px 12px;cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:pan-x pan-y}
.lv-card:hover{border-color:#cfcae6}
.lv-ct{font-weight:600;font-size:14.5px;overflow-wrap:anywhere}
.lv-meta{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:6px;font-size:12.5px;color:var(--muted)}
.lv-p{display:inline-flex;align-items:center;gap:4px}
.lv-add{border:0;background:none;color:var(--muted);text-align:left;padding:8px 6px;border-radius:8px;font-weight:600;font-size:13.5px} .lv-add:hover{background:var(--surface);color:var(--text)}
.lv-dragging{opacity:.35}
.lv-ghost{position:fixed;left:0;top:0;z-index:200;pointer-events:none;box-shadow:var(--shadow-lg);transform-origin:center;opacity:.95;rotate:2deg}
.lv-caltop .icon-btn{font-size:22px;color:var(--text)} .lv-month{font-size:16px;min-width:150px;text-align:center}
.lv-cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--line)}
.lv-cal>div{background:var(--surface)}
.lv-wd{padding:6px 8px;font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.03em;background:var(--surface2)!important}
.lv-day{min-height:96px;padding:4px 5px;display:flex;flex-direction:column;gap:3px;gap:3px;cursor:default;margin:0 0 1px 1px}
.lv-cal{gap:1px}
.lv-day.out{background:var(--surface2)!important;color:var(--muted)}
.lv-day.today .lv-dn{background:var(--accent);color:#fff;border-radius:11px;padding:0 7px}
.lv-day.lv-over{box-shadow:inset 0 0 0 2px var(--accent);background:var(--accent-soft)!important}
.lv-dn{font-size:12.5px;font-weight:700;align-self:flex-start;line-height:22px;padding:0 3px}
.lv-chip{font-size:12.5px;line-height:1.3;padding:4px 7px;border-radius:6px;background:var(--accent-soft);color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:pan-x pan-y}
.lv-more{border:0;background:none;color:var(--muted);font-size:12px;text-align:left;padding:2px 4px}
.lv-nodate{margin-top:10px}
.lv-daylist{display:flex;flex-direction:column;gap:6px} .lv-dl-item{text-align:left;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-weight:600}
.lv-row .lv-cb{display:flex;align-items:center;gap:10px;min-height:40px} .lv-row .lv-cb input{width:20px;height:20px;accent-color:var(--accent)}
.lv-row .modal-foot .grow{flex:1}
@media (max-width:700px){.lst-wrap.lv-wrap{padding:0 10px}.lv-day{min-height:64px}.lv-chip{font-size:11px;padding:2px 4px}.lv-col{flex-basis:78vw}}
/* emoji skin tones */
.ep-tone-wrap{position:relative;flex:none}
.ep-tone{font-size:20px;width:38px;height:38px}
.ep-tones{position:absolute;right:0;top:42px;z-index:5;display:flex;gap:2px;padding:4px;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:var(--shadow)}
.ep-tones[hidden]{display:none}
.ep-tones button{width:38px;height:38px;border-radius:8px;font-size:22px;border:0;background:none}
.ep-tones button.on{background:var(--accent-soft)}
.ep-head{display:flex;align-items:center;gap:6px}
/* analytics */
.an-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:10px 0}
.an-stat{border:1px solid var(--line);border-radius:12px;padding:12px;display:flex;flex-direction:column;gap:2px} .an-stat b{font-size:22px} .an-stat span{font-size:12.5px}
.an-bars{display:flex;align-items:flex-end;gap:3px;height:110px;margin-top:10px;align-self:stretch;width:100%}
.an-bars i{display:block;flex:1;background:var(--accent);border-radius:3px 3px 0 0;min-height:2px;opacity:.85}
.an-row{align-self:stretch;width:100%;display:flex;gap:12px;justify-content:space-between;padding:6px 0;border-bottom:1px solid var(--line2);font-size:14px}
[data-theme=dark] .poll-card,[data-theme=dark] .pc-opt,[data-theme=dark] .lv-card,[data-theme=dark] .cvc-panel,[data-theme=dark] .ep-tones{background:var(--surface)}
[data-theme=dark] .cvc-dot{background:#3a3218;border-color:#6b5a1f;color:#f2d27a}

/* ===================== v2n: Workflows ===================== */
.wf-emoji{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--surface2);font-size:22px;flex-shrink:0;line-height:1}
.wf-emoji.sm{width:26px;height:26px;border-radius:8px;font-size:15px}
.wf-page{padding:18px 22px 40px;max-width:860px}
.wf-page-top{display:flex;align-items:center;gap:14px;margin-bottom:6px}
.wf-h{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:22px 0 10px}
.wf-run-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.wf-run-card{display:flex;flex-direction:column;align-items:flex-start;gap:6px;text-align:left;padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface);min-height:110px}
@media (hover:hover){.wf-run-card:hover{border-color:var(--accent);box-shadow:var(--shadow)}} .wf-run-card small{line-height:1.35}
.wf-row{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:14px;padding:6px 8px 6px 6px;margin:8px 0;background:var(--surface)}
.wf-row.off .wf-emoji{filter:grayscale(1);opacity:.7}
.wf-row-main{display:flex;align-items:center;gap:12px;text-align:left;flex:1;min-width:0;padding:6px;border-radius:10px}
.wf-row-main .grow{display:flex;flex-direction:column;min-width:0} .wf-row-main small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (hover:hover){.wf-row-main:hover{background:var(--hover)}} .wf-meta{font-size:12px}
.wf-builders{display:flex;align-items:center;gap:12px;width:100%;text-align:left;margin-top:18px;padding:12px;border:1px dashed var(--line);border-radius:14px}
.wf-builders .grow{display:flex;flex-direction:column}
.wf-picks{display:flex;flex-direction:column;gap:2px;margin-top:12px;max-height:300px;overflow:auto} .wf-pick{display:flex;align-items:center;gap:10px;padding:8px;border-radius:8px} .wf-pick:hover{background:var(--hover)}
/* builder */
.wf-builder-wrap .modal{max-width:720px}
.wf-b{background:var(--surface2)}
.wf-b-head{display:flex;gap:12px;align-items:flex-start;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px}
.wf-b-head .grow{display:flex;flex-direction:column;gap:6px} .wf-b-head #wfName{font-size:18px;font-weight:700;border-color:transparent;padding-left:4px} .wf-b-head #wfName:focus{border-color:var(--accent)}
.wf-b-head .input.small{border-color:transparent;padding-left:4px} .wf-b-head .input.small:focus{border-color:var(--accent)}
.wf-icon-btn{width:52px;height:52px;border-radius:14px;background:var(--surface2);font-size:28px;border:1px solid var(--line);flex-shrink:0}
.wf-b-sec{margin-top:14px}
.wf-card2{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:12px 12px;box-shadow:0 1px 2px rgba(30,24,70,.04)}
.wf-card2.trig{border-left:4px solid var(--accent)}
.wf-card2 .grow{display:flex;flex-direction:column;min-width:0;gap:1px}
.wf-card2-ic{display:inline-grid;place-items:center;width:38px;height:38px;border-radius:10px;background:var(--accent-soft);font-size:19px;flex-shrink:0}
.wf-card2.step{padding:4px 6px 4px 4px}
.wf-card2.step.needs{border-color:var(--amber)}
.wf-card2-main{display:flex;align-items:center;gap:12px;flex:1;min-width:0;text-align:left;padding:8px;border-radius:10px}
@media (hover:hover){.wf-card2-main:hover{background:var(--hover)}}
.wf-sub2{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wf-prob{color:var(--amber);font-weight:600}
.wf-card2-acts{display:flex;gap:2px} .wf-card2-acts .icon-btn{width:36px;height:36px}
.wf-card2-acts .icon-btn:disabled{opacity:.3}
.wf-conn{width:2px;height:14px;background:var(--line);margin:0 0 0 30px}
.wf-addstep{display:flex;align-items:center;gap:8px;justify-content:center;width:100%;padding:12px;border:1.5px dashed var(--line);border-radius:14px;color:var(--accent);font-weight:650;background:var(--surface)}
.wf-addstep svg{width:18px;height:18px} .wf-addstep:hover{border-color:var(--accent)}
.wf-trig-ed{background:var(--surface);border:1px solid var(--line);border-top:0;border-radius:0 0 14px 14px;margin-top:-8px;padding:16px 12px 8px}
.wf-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;margin-bottom:6px}
.wf-tile{display:flex;flex-direction:column;align-items:flex-start;gap:4px;text-align:left;padding:10px;border:1px solid var(--line);border-radius:12px;font-size:13.5px;font-weight:600;min-height:72px}
.wf-tile.sel{border-color:var(--accent);background:var(--accent-soft)} .wf-tile-ic{font-size:20px}
.wf-slash{display:flex;align-items:center;gap:4px} .wf-slash span{font-weight:700;color:var(--muted)}
.wf-emoji-btn{font-size:22px;min-width:56px}
.wf-emoji-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(48px,1fr));gap:6px} .wf-emoji-opt{font-size:26px;height:48px;border-radius:10px} .wf-emoji-opt:hover{background:var(--hover)}
.wf-b-foot{position:sticky;bottom:0;background:var(--surface2);padding-top:10px}
/* step editor */
.wf-stack{z-index:1002}
.wf-step-ed .seg.wf-seg{display:flex;flex-wrap:wrap}
.wf-vars{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:-4px 0 10px}
.wf-var{font-size:12.5px;font-weight:600;padding:5px 10px;border-radius:14px;background:var(--accent-soft);color:var(--link);min-height:30px}
.wf-inline{display:flex;gap:8px;align-items:center} .wf-inline > .input{flex:1}
.wf-fields{display:flex;flex-direction:column;gap:8px;margin:6px 0 10px}
.wf-field{border:1px solid var(--line);border-radius:12px;padding:10px;display:flex;flex-direction:column;gap:8px;background:var(--surface)}
.wf-req{display:flex;align-items:center;gap:6px;font-size:13.5px}
.wf-sub{display:block;margin-top:12px}
.wf-warn{background:var(--mention);color:var(--mention-ink);border-radius:10px;padding:8px 10px;font-size:13.5px}
.wf-add{display:flex;flex-direction:column;gap:6px}
.wf-add-item,.wf-tpl-item,.wf-run-item{display:flex;align-items:center;gap:12px;width:100%;text-align:left;padding:10px;border-radius:12px;border:1px solid var(--line);background:var(--surface)}
.wf-add-item .grow,.wf-tpl-item .grow,.wf-run-item .grow{display:flex;flex-direction:column}
@media (hover:hover){.wf-add-item:hover,.wf-tpl-item:hover,.wf-run-item:hover{border-color:var(--accent)}}
.wf-add-ic{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:10px;background:var(--accent-soft);font-size:20px}
.wf-tpl-h{display:block;margin:16px 0 8px}
.wf-tpl-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:8px}
.wf-tpl-item.scratch{border-style:dashed}
.wf-run-list{display:flex;flex-direction:column;gap:8px}
.wf-run-go{font-weight:700;color:var(--accent);font-size:14px;padding:6px 10px;border-radius:8px;background:var(--accent-soft)}
.wf-tab-n{margin-left:4px;font-size:11px;background:var(--accent-soft);color:var(--link);border-radius:8px;padding:0 6px}
/* form sheet */
.wf-form-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.wf-form .field{margin-bottom:12px}
/* message cards */
.wf-msgcard{margin-top:6px;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:10px;padding:10px 12px;max-width:440px;background:var(--surface)}
.wf-mc-head{display:flex;align-items:center;gap:8px;font-size:14px} .wf-mc-head .muted{margin-left:auto;font-size:12px}
.wf-card-acts{display:flex;gap:8px;margin-top:10px} .wf-card-acts .btn{min-height:38px;padding:0 18px}
.wf-card-acts .wf-ok{background:var(--green);border-color:var(--green)}
.wf-card-st{margin-top:8px;font-size:13.5px;font-weight:600} .wf-card-st.approved,.wf-card-st.done{color:var(--green)} .wf-card-st.denied{color:var(--red)}
/* history */
.wf-hist-row{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:10px;border-bottom:1px solid var(--line2)}
.wf-hist-row .grow{display:flex;flex-direction:column} @media (hover:hover){.wf-hist-row:hover{background:var(--hover)}}
.pill.bad{background:var(--red-soft);color:var(--red)}
.wf-hist-step{display:flex;gap:12px;align-items:flex-start;padding:10px 4px;border-bottom:1px solid var(--line2)}
.wf-hist-step .grow{display:flex;flex-direction:column}
.wf-hs-ic{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:50%;font-weight:800;font-size:13px;background:var(--surface2);color:var(--muted);flex-shrink:0}
.wf-hist-step.s-ok .wf-hs-ic{background:color-mix(in srgb,var(--green) 18%,transparent);color:var(--green)}
.wf-hist-step.s-bad .wf-hs-ic{background:var(--red-soft);color:var(--red)}
.wf-hist-step.s-wait .wf-hs-ic{background:color-mix(in srgb,var(--amber) 18%,transparent);color:var(--amber)}
.wf-link{text-align:center} .wf-link-ic{font-size:44px;margin:6px 0 10px}
@media (max-width: 640px){
  .wf-page{padding:12px 14px 40px} .wf-page-top{flex-direction:column;align-items:stretch}
  .wf-run-grid,.wf-tpl-grid{grid-template-columns:1fr}
  .wf-run-card{min-height:0;flex-direction:row;align-items:center} .wf-run-card small{display:none}
  .wf-card2-acts .icon-btn{width:32px;height:40px}
  .wf-tiles{grid-template-columns:1fr 1fr}
}
[data-theme=dark] .wf-msgcard,[data-theme=dark] .wf-card2,[data-theme=dark] .wf-row{background:var(--surface)}
.wf-tok{display:inline-block;padding:0 6px;border-radius:6px;background:var(--accent-soft);color:var(--link);font-weight:600;font-size:.92em;line-height:1.45}
.wf-builder-wrap .modal{max-height:min(94dvh,1180px)}
.wf-b{padding-bottom:0} .wf-b-foot{margin:14px -24px 0;padding:12px 24px;border-top:1px solid var(--line);z-index:2}
@media (max-width: 640px){ .wf-b-foot{margin:14px -18px 0;padding:10px 18px} .wf-b-foot > .muted{display:none} }
/* v2m — Lists & Canvas */
.lx-page{display:flex;flex-direction:column;flex:1;min-height:0;position:relative}
.lx-head{flex:none}
.lx-bar{display:flex;align-items:center;gap:6px;padding:8px 16px;border-bottom:1px solid var(--line2);flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;flex:none}
.lx-bar::-webkit-scrollbar{display:none}
.lx-sw{position:relative;display:flex;align-items:center;min-width:120px;max-width:220px;flex:0 1 200px}
.lx-si{position:absolute;left:9px;top:50%;transform:translateY(-50%);color:var(--muted);display:flex}.lx-si .ic{width:15px;height:15px}
.lx-search{height:34px;padding-left:30px !important;font-size:14px;width:100%;border-radius:8px}
.lx-tb{display:inline-flex;align-items:center;gap:5px;height:34px;padding:0 10px;border-radius:8px;color:var(--muted);font-size:14px;white-space:nowrap;flex:none}
.lx-tb:hover{background:var(--hover);color:var(--text)}.lx-tb .ic{width:16px;height:16px}.lx-tb svg{flex:none}
.lx-tb.on{color:var(--accent);background:var(--accent-soft)}
.lx-tb em{font-style:normal;font-size:11px;font-weight:700;background:var(--accent);color:#fff;border-radius:9px;min-width:17px;height:17px;display:inline-flex;align-items:center;justify-content:center;padding:0 4px}
.lx-new-btn{display:inline-flex;align-items:center;gap:4px;flex:none;height:34px}.lx-new-btn .ic{width:15px;height:15px}.lx-pl{display:flex}
.lx-body{flex:1;min-height:0;display:flex;position:relative}
.lx-scroll{flex:1;min-width:0;overflow:auto;-webkit-overflow-scrolling:touch}
.lx-wrap{min-width:100%;display:inline-block}
.lx-t{border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:14px}
.lx-t th,.lx-t td{border-right:1px solid var(--line2);border-bottom:1px solid var(--line2);height:40px;padding:0 10px;text-align:left;vertical-align:middle;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.lx-t thead th{position:sticky;top:0;z-index:3;background:var(--surface);font-weight:600;color:var(--muted);font-size:13px;cursor:pointer;user-select:none;-webkit-user-select:none;border-bottom:1px solid var(--line)}
.lx-t thead th:hover{color:var(--text);background:var(--hover)}
.lx-th0,.lx-td0{position:sticky;left:0;z-index:2;background:var(--surface);text-align:center !important;padding:0 !important}
.lx-t thead .lx-th0{z-index:4}
.lx-th .lx-ti{margin-right:6px;vertical-align:-3px;color:var(--muted);display:inline-flex}
.lx-tn{vertical-align:middle}.lx-dir{margin-left:4px;color:var(--accent)}
.lx-th.sorted{color:var(--accent)}
.lx-rs{position:absolute;right:-4px;top:0;bottom:0;width:10px;cursor:col-resize;z-index:5;touch-action:none}
.lx-rs::after{content:"";position:absolute;left:4px;top:8px;bottom:8px;width:2px;border-radius:2px;background:transparent}
.lx-th:hover .lx-rs::after,.lx-th.resizing .lx-rs::after{background:var(--accent)}
.lx-thadd{width:46px;text-align:center !important;padding:0 !important}
.lx-td{cursor:default}.lx-td:not(.auto):hover{background:var(--hover);cursor:pointer}
.lx-td.auto{color:var(--muted);font-size:13px}
.lx-t tbody tr:hover .lx-td0{background:var(--hover)}
.lx-t tr.done td[data-col]:first-of-type{color:var(--muted)}
.lx-open{width:30px;height:28px;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;gap:2px;color:var(--muted);opacity:.55}
.lx-open:hover,.lx-open.has{opacity:1}.lx-open.has{color:var(--accent);font-size:11px}.lx-open .ic{width:14px;height:14px}
.lx-tdx{width:46px;padding:0 !important;text-align:center !important}.lx-tdx .icon-btn{opacity:.4}.lx-t tr:hover .lx-tdx .icon-btn{opacity:1}
.lx-td.editing,.lx-fv.editing{padding:0 !important;background:var(--surface) !important;box-shadow:inset 0 0 0 2px var(--accent)}
.cell-ed{width:100%;height:100%;min-height:38px;border:0;outline:0;background:transparent;padding:0 10px;font:inherit;color:inherit}
textarea.cell-ed{padding:8px 10px;resize:vertical;min-height:80px}
.lx-addrow td{border-right:0 !important;height:38px;padding-left:46px !important}
.lx-add{color:var(--muted);font-size:14px;padding:6px 10px;border-radius:8px}.lx-add:hover{color:var(--accent);background:var(--accent-soft)}
.lx-gh td{background:var(--surface2);border-right:0 !important;height:40px;position:sticky;left:0}
.lx-gt{display:inline-flex;align-items:center;gap:8px;font-size:14px;padding:4px 6px;border-radius:6px;position:sticky;left:8px}
.lx-car{display:inline-flex;transition:transform .15s}.lx-car .ic{width:14px;height:14px}.lx-gt.coll .lx-car{transform:rotate(-90deg)}
.lx-empty{padding:28px 20px;text-align:center}
.lx-pill{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 9px;border-radius:11px;font-size:12.5px;font-weight:500;margin-right:4px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
.lx-pill i{width:7px;height:7px;border-radius:50%;background:currentColor;flex:none}
.c-gray{background:#eeedf3;color:#57536e}.c-blue{background:#e1ecfd;color:#1f5fbf}.c-green{background:#dff5ea;color:#1c7a4f}.c-orange{background:#fdebd9;color:#ad5a12}.c-purple{background:#ece7fd;color:#5b45c4}
.c-red{background:#fde4e6;color:#b42a37}.c-teal{background:#d9f3f1;color:#127a72}.c-yellow{background:#fbf3cf;color:#8a6a00}.c-pink{background:#fde4f1;color:#b02a73}
[data-theme=dark] .c-gray{background:#3a3a44;color:#d4d3dc}[data-theme=dark] .c-blue{background:#1d3550;color:#8fc3ff}[data-theme=dark] .c-green{background:#173d2c;color:#7fdcae}[data-theme=dark] .c-orange{background:#4a2f17;color:#f5b77a}[data-theme=dark] .c-purple{background:#2f2a52;color:#b9adff}
[data-theme=dark] .c-red{background:#4a1f25;color:#ff9aa4}[data-theme=dark] .c-teal{background:#123d3a;color:#7fded5}[data-theme=dark] .c-yellow{background:#4a3b12;color:#f5d27a}[data-theme=dark] .c-pink{background:#4a1f37;color:#ff9fd0}
.lx-who{display:inline-flex;align-items:center;gap:6px;margin-right:8px;vertical-align:middle}.lx-who .avatar,.lx-who img{flex:none}
.lx-cb{width:20px;height:20px;border-radius:6px;border:1.5px solid var(--line);display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;background:var(--surface)}
.lx-cb.on{background:var(--accent);border-color:var(--accent);color:#fff}.lx-cb .ic{width:14px;height:14px;stroke-width:2.6}
.lx-stars{display:inline-flex;gap:1px}.lx-star{font-size:17px;line-height:1;color:var(--line);padding:2px}.lx-star.on{color:#f5b400}.lx-stars.big .lx-star{font-size:28px;padding:4px}
.lx-a{color:var(--link)}.lx-a:hover{text-decoration:underline}
.lx-files{display:inline-flex;align-items:center;gap:5px;color:var(--muted)}.lx-files .ic{width:15px;height:15px}
.lx-date.late{color:var(--red)}.lx-num{font-variant-numeric:tabular-nums}
.t-number .lx-num{display:block;text-align:right}
/* popovers & panels */
.lx-pop{position:fixed;z-index:60;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-lg);min-width:240px;max-width:min(340px,calc(100vw - 16px));max-height:min(420px,70vh);overflow:auto;padding:6px}
.lx-pop.wide{max-width:min(560px,calc(100vw - 16px))}
.lx-picker{display:flex;flex-direction:column;gap:4px}.lx-q{height:34px;font-size:14px}
.lx-opts{display:flex;flex-direction:column}
.lx-opt{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 8px;border-radius:8px;text-align:left;min-height:40px}.lx-opt:hover{background:var(--hover)}
.lx-opt.add{color:var(--accent);font-weight:500}.lx-tick{color:var(--accent);display:flex}.lx-tick .ic{width:16px;height:16px}
.lx-clear{color:var(--muted);font-size:13px;padding:8px;text-align:left;border-top:1px solid var(--line2);margin-top:2px}
.lx-panel{padding:6px 6px 4px;min-width:280px}.lx-ph{display:flex;align-items:baseline;gap:8px;margin-bottom:8px}.lx-ph b{font-size:14px}
.lx-fl{display:flex;flex-direction:column;gap:8px}.lx-fr{display:flex;gap:6px;align-items:center}.lx-fr .input{min-width:0;flex:1;height:34px;font-size:14px}
.lx-fsp{flex:1}.lx-pf{display:flex;gap:6px;margin-top:10px;border-top:1px solid var(--line2);padding-top:8px}
.lx-fld{display:flex;align-items:center;gap:8px;padding:7px 4px;border-radius:8px;font-size:14px;cursor:pointer}.lx-fld:hover{background:var(--hover)}.lx-fld .lx-ti{color:var(--muted);display:flex}
.lx-tog{appearance:none;-webkit-appearance:none;width:34px;height:20px;border-radius:10px;background:var(--line);position:relative;cursor:pointer;transition:background .15s;flex:none;margin:0}
.lx-tog::after{content:"";position:absolute;left:2px;top:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform .15s;box-shadow:0 1px 2px rgba(0,0,0,.2)}
.lx-tog:checked{background:var(--accent)}.lx-tog:checked::after{transform:translateX(14px)}.lx-tog:disabled{opacity:.5}
/* field editor & template picker */
.lx-types{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.lx-type{display:flex;align-items:center;gap:7px;padding:8px 9px;border-radius:9px;border:1px solid var(--line2);font-size:13.5px;text-align:left;min-height:40px}
.lx-type:hover{background:var(--hover)}.lx-type.on{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}.lx-type svg{flex:none}
.lx-optbox{display:flex;flex-direction:column;gap:6px}.lx-orow{display:flex;align-items:center;gap:6px}.lx-orow .input{flex:1;height:34px}
.lx-orow.add{flex-wrap:wrap}
.lx-dot{width:22px;height:22px;border-radius:50%;flex:none;border:2px solid var(--surface);box-shadow:0 0 0 1px var(--line)}
.lx-dot.c-gray{background:#9a97ab}.lx-dot.c-blue{background:#3b82f6}.lx-dot.c-green{background:#22a06b}.lx-dot.c-orange{background:#f08c2e}.lx-dot.c-purple{background:#7c5cf0}.lx-dot.c-red{background:#e5484d}.lx-dot.c-teal{background:#14a39a}.lx-dot.c-yellow{background:#e8b500}.lx-dot.c-pink{background:#e5489b}
.lx-new .lx-sub{margin:0 0 8px}
.lx-tpl{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px;margin-bottom:12px}
.lx-tc{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:12px;border-radius:12px;border:1px solid var(--line);text-align:left;min-height:96px}
.lx-tc:hover{background:var(--hover)}.lx-tc.on{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent);background:var(--accent-soft)}
.lx-tic{font-size:22px;line-height:1;margin-bottom:4px}.lx-tc b{font-size:14px}.lx-tc small{font-size:12.5px;line-height:1.3}
.lx-ex{display:flex;align-items:center;gap:8px;font-size:14px;margin:-2px 0 12px}
.lx-row2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
/* item pane */
.lx-pane{width:420px;max-width:46%;flex:none;border-left:1px solid var(--line);background:var(--surface);display:flex;flex-direction:column;min-height:0;position:relative}
.lx-pt{display:flex;align-items:center;gap:4px;padding:8px 10px 8px 16px;border-bottom:1px solid var(--line2);flex:none}
.lx-pcrumb{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lx-pscroll{flex:1;overflow:auto;padding:14px 16px 10px;-webkit-overflow-scrolling:touch}
.lx-ptitle{font-size:20px;font-weight:700;line-height:1.3;padding:4px 6px;margin:0 -6px 10px;border-radius:8px;min-height:36px;word-break:break-word;white-space:normal}
.lx-ptitle.ed:hover{background:var(--hover);cursor:text}.lx-ptitle.editing .cell-ed{font-size:20px;font-weight:700;min-height:40px}
.lx-pf2{display:grid;grid-template-columns:132px 1fr;gap:8px;align-items:start;min-height:38px;padding:2px 0}
.lx-fl2{display:flex;align-items:center;gap:7px;color:var(--muted);font-size:13.5px;min-height:36px;overflow:hidden}.lx-fl2 span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lx-fl2 .lx-ti{display:flex;flex:none}
.lx-fv{min-height:36px;padding:6px 8px;border-radius:8px;font-size:14px;display:flex;flex-wrap:wrap;align-items:center;gap:4px;word-break:break-word}
.lx-fv[tabindex="0"]:hover{background:var(--hover);cursor:pointer}.lx-fv.t-longtext{white-space:pre-wrap}
.lx-rep{height:32px;font-size:13.5px;width:auto}.lx-rhint{width:100%}
.lx-meta{margin:12px 0 4px;border-top:1px solid var(--line2);padding-top:10px}
.lx-att{display:flex;flex-wrap:wrap;gap:8px;width:100%}
.lx-af{position:relative;width:96px}.lx-afl{display:flex;flex-direction:column;gap:4px;color:var(--text);font-size:12px}
.lx-afl img,.lx-afi{width:96px;height:72px;border-radius:8px;object-fit:cover;background:var(--surface2);border:1px solid var(--line2);display:flex;align-items:center;justify-content:center;color:var(--muted)}
.lx-afl span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lx-fx{position:absolute;top:2px;right:2px;background:var(--surface) !important;border-radius:50%;box-shadow:var(--shadow)}
.lx-af.add{display:flex;align-items:center;width:auto}
.lx-csec{margin-top:8px}.lx-csec h3{font-size:14px;margin:6px 0 10px}
.lx-cm1{display:flex;gap:10px;margin-bottom:14px}.lx-cmb{flex:1;min-width:0}
.lx-cmh{display:flex;align-items:center;gap:8px}.lx-cmh b{font-size:14px}.lx-cmore{margin-left:auto;opacity:.5}.lx-cm1:hover .lx-cmore{opacity:1}
.lx-cmt{font-size:14px;word-break:break-word}.lx-cmt .mention{background:var(--mention);color:var(--mention-ink);border-radius:4px;padding:0 2px}
.lx-cf{display:flex;gap:8px;align-items:flex-end;padding:10px 12px calc(10px + var(--safe-b));border-top:1px solid var(--line2);flex:none;background:var(--surface)}
.lx-cin{flex:1;resize:none;min-height:38px;max-height:140px;font-size:15px;line-height:1.35;padding:8px 10px}
.lx-ac{position:absolute;left:12px;right:12px;bottom:64px;z-index:5}
/* phone cards */
.lx-cards{display:flex;flex-direction:column;gap:8px;padding:12px}
.lx-card{display:flex;flex-direction:column;gap:6px;text-align:left;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);position:relative}
.lx-card.done .lx-ct b{color:var(--muted);text-decoration:line-through}
.lx-ct{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.lx-ct b{font-size:15px;word-break:break-word}
.lx-cm{display:flex;flex-wrap:wrap;gap:6px 10px;font-size:13px;color:var(--muted)}.lx-cmi{display:inline-flex;align-items:center;gap:4px}
.lx-cc{position:absolute;right:12px;bottom:10px;display:inline-flex;align-items:center;gap:3px;color:var(--accent);font-size:12px}.lx-cc .ic{width:14px;height:14px}
.lx-cgh{display:flex;align-items:center;gap:8px;padding:8px 2px 0}
.lx-add.card{border:1px dashed var(--line);border-radius:12px;padding:12px}
.lx-sheet{padding:4px 12px 16px}
.lx-pane-sheet{padding:0 !important}.lx-pane-sheet .lx-pane{width:100%;max-width:none;border:0;max-height:78vh}
.lx-pane-sheet .lx-pt{padding-left:16px}
@media (max-width:1100px){.lx-pane{width:380px}}
@media (max-width:700px){.lx-bar{padding:8px 10px}.lx-tbl{display:none}.lx-tb{padding:0 8px}.lx-sw{flex:1 1 120px;max-width:none}.lx-new-btn span:last-child{display:none}.lx-new-btn{padding:0 10px}.lx-row2{grid-template-columns:1fr}.lx-types{grid-template-columns:repeat(2,minmax(0,1fr))}.lx-pf2{grid-template-columns:110px 1fr}}

.cr-pop{min-width:230px;padding:6px}.cr-h{font-weight:700;font-size:15px;padding:6px 10px 8px}
.cr-i{display:flex !important;align-items:center;gap:10px;padding:6px 10px !important;min-height:42px;border-radius:8px;width:100%;text-align:left;font-size:15px}
.cr-ic{width:30px;height:30px;border-radius:8px;background:var(--surface2);display:inline-flex;align-items:center;justify-content:center;color:var(--text);flex:none}.cr-ic .ic,.cr-ic svg{width:17px;height:17px}
.cr-i:hover .cr-ic{background:var(--accent-soft);color:var(--accent)}
.ri-new.open{background:var(--side-sel);color:#fff}
.lx-head .hd-actions{margin-left:auto}
@media (max-width:1180px){.lx-tbl{display:none}.lx-tb{padding:0 9px}}

/* v2m canvas */
.blk[data-ind="1"]{margin-left:26px}.blk[data-ind="2"]{margin-left:52px}.blk[data-ind="3"]{margin-left:78px}.blk[data-ind="4"]{margin-left:104px}
.blk.t-bullet[data-ind="1"]::before,.blk.t-bullet[data-ind="3"]::before{content:'◦'}.blk.t-bullet[data-ind="2"]::before,.blk.t-bullet[data-ind="4"]::before{content:'▪';font-size:11px}
.blk .bt b{font-weight:700}.blk .bt code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.88em;background:var(--hover);color:var(--red);padding:1px 4px;border-radius:4px}
.blk .bt a{color:var(--link);text-decoration:underline;text-underline-offset:2px}
.chref{color:var(--link);background:var(--accent-soft);border-radius:4px;padding:0 3px;cursor:pointer;white-space:nowrap}
.blk.t-callout[data-color=blue]{background:#e1ecfd}.blk.t-callout[data-color=green]{background:#dff5ea}.blk.t-callout[data-color=yellow]{background:#fbf3cf}.blk.t-callout[data-color=orange]{background:#fdebd9}.blk.t-callout[data-color=red]{background:#fde4e6}.blk.t-callout[data-color=purple]{background:#ece7fd}.blk.t-callout[data-color=gray]{background:var(--surface2)}
[data-theme=dark] .blk.t-callout[data-color]{background:var(--surface2)}
.blk.t-callout .emo[role=button]{cursor:pointer;border-radius:6px}.blk.t-callout .emo[role=button]:hover{background:rgba(0,0,0,.06)}
.blk.t-toggle{flex-wrap:wrap}.blk .tgl{width:24px;height:26px;display:inline-flex;align-items:center;justify-content:center;border-radius:6px;color:var(--muted);transform:rotate(90deg);transition:transform .15s;flex:none;margin-top:1px}
.blk .tgl:hover{background:var(--hover)}.blk.t-toggle.open .tgl{transform:rotate(180deg)}.blk .tgl .ic,.blk .tgl svg{width:14px;height:14px}
.blk .tg-body{display:none;flex-basis:100%;margin-left:32px;padding:4px 8px;border-left:2px solid var(--line2);outline:none;white-space:pre-wrap;line-height:1.55;font-size:15px;min-height:1.6em;color:var(--text)}
.blk.t-toggle.open .tg-body{display:block}.blk .tg-body:empty::before{content:attr(data-ph);color:var(--muted);opacity:.55}
.blk.t-file,.blk.t-msg,.blk.t-link{margin:6px 0;outline:none}
.blk.t-file:focus-visible,.blk.t-msg:focus-visible,.blk.t-link:focus-visible{box-shadow:0 0 0 2px var(--accent);border-radius:12px}
.cv-file{display:flex;align-items:center;gap:12px;padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--text);max-width:420px;flex:1;text-decoration:none}
.cv-file:hover{background:var(--hover)}.cvf-ic{width:40px;height:40px;border-radius:9px;background:var(--accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center;flex:none}
.cvf-t{display:flex;flex-direction:column;min-width:0}.cvf-t b{font-size:14.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cv-msg{flex:1;max-width:560px;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:12px;padding:10px 14px;background:var(--surface);cursor:pointer}
.cv-msg:hover{background:var(--hover)}.cvm-h{display:flex;align-items:center;gap:8px;margin-bottom:4px}.cvm-h b{font-size:14px}.cvm-t{font-size:14.5px;line-height:1.45;word-break:break-word;white-space:pre-wrap}.cvm-f{margin-top:4px;display:flex;align-items:center;gap:4px}.cvm-f svg{width:14px;height:14px}
.cv-link{flex:1;max-width:560px;display:flex;gap:12px;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface);color:var(--text);text-decoration:none;min-height:72px}
.cv-link:hover{background:var(--hover)}.cvl-img{width:120px;object-fit:cover;flex:none;background:var(--surface2)}
.cvl-t{display:flex;flex-direction:column;gap:2px;padding:10px 14px 10px 4px;min-width:0}.cv-link .cvl-t:first-child{padding-left:14px}.cvl-t b{font-size:14.5px;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.cvl-d{font-size:13px;color:var(--muted);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.cv-x{opacity:0;align-self:center;flex:none}.blk:hover .cv-x,.blk:focus-within .cv-x,.blk:focus .cv-x{opacity:.7}@media (hover:none){.cv-x{opacity:.45}}
.cv-slash{min-width:230px;max-height:min(360px,60vh);padding:4px}.cvs-h{padding:6px 10px 4px}
.cvs-i{display:flex;align-items:center;gap:10px;width:100%;padding:6px 10px;border-radius:8px;text-align:left;font-size:14.5px;min-height:38px}
.cvs-i:hover,.cvs-i.sel{background:var(--hover)}.cvs-i.sel{box-shadow:inset 0 0 0 1px var(--line)}
.cvs-i .ty-g{width:28px;height:28px;border-radius:7px;border:1px solid var(--line2);display:inline-flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:var(--muted);flex:none;background:var(--surface)}
.cv-fbar{position:fixed;z-index:70;display:flex;align-items:center;gap:2px;padding:4px;border-radius:10px;background:#1f1d2b;color:#fff;box-shadow:var(--shadow-lg)}
.cv-fbar[hidden]{display:none}.cv-fbar button{min-width:34px;height:34px;border-radius:7px;color:#fff;font-size:15px;display:inline-flex;align-items:center;justify-content:center}
.cv-fbar button:hover{background:rgba(255,255,255,.12)}.cv-fbar button.on{background:rgba(255,255,255,.2)}.cv-fbar svg{width:17px;height:17px}.cv-fbar .fb-sep{width:1px;height:20px;background:rgba(255,255,255,.25);margin:0 3px}
.cv-fbar button[hidden],.cv-fbar .fb-sep[hidden]{display:none}
.cv-chac{position:fixed;z-index:70;min-width:220px}
.cv-tpl{grid-template-columns:repeat(3,minmax(0,1fr))}@media (max-width:700px){.cv-tpl{grid-template-columns:repeat(2,minmax(0,1fr))}}
.lx-fv.lx-ptitle{font-size:20px;font-weight:700}.lx-rep{padding-right:30px}
.lv-wrap.lst-wrap{display:block;padding:12px 16px 24px;min-width:0}.lv-top .input.small{padding-right:30px;height:32px}
@media (max-width:700px){.view-head.lx-head .back{display:inline-grid;width:40px;height:40px}.view-head.lx-head .back .ic{width:22px;height:22px}}
.lx-pane-sheet .lx-pcrumb{visibility:hidden}.lx-fv .lx-rep{padding-right:34px !important;min-width:176px}.cvm-h{flex-wrap:wrap;row-gap:0}.cvm-h b{white-space:nowrap}
.cv-tchips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:0 0 14px}.cv-tchips>span{width:100%;margin-bottom:2px}.cv-tchip{height:32px;padding:0 12px;border-radius:16px;border:1px solid var(--line);font-size:13.5px;background:var(--surface)}.cv-tchip:hover{background:var(--hover);border-color:var(--accent)}
.lx-pf2{grid-template-columns:132px minmax(0,1fr)}.lx-fv .lx-rep{max-width:100%}@media (max-width:700px){.lx-pf2{grid-template-columns:110px minmax(0,1fr)}}
.lx-fv .lx-rep{min-width:0 !important;width:100%;max-width:230px}
.lx-pane-wrap .modal-head h2{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lx-pane-wrap .modal-head{gap:2px}

/* ===== v2p: WhatsApp guest inbox ===== */
.view-scroll.wa-host{overflow:hidden;display:flex;flex-direction:column}
.view-body.wa-body{flex:1;min-height:0;width:100%;max-width:none;margin:0;padding:0;overflow:hidden;display:flex;flex-direction:column}
.wa-root{flex:1;min-height:0;display:grid;grid-template-columns:340px 1fr;height:100%}
.wa-side{display:flex;flex-direction:column;min-height:0;border-right:1px solid var(--line)}
.wa-side-head{padding:10px 12px 6px;display:flex;flex-direction:column;gap:8px;border-bottom:1px solid var(--line2)}
.wa-search{height:38px}
.wa-filters{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none}
.wa-filters button{height:30px;padding:0 12px;border-radius:15px;font-size:13.5px;font-weight:600;color:var(--muted);white-space:nowrap}
.wa-filters button.sel{background:var(--accent-soft);color:var(--accent)}
.wa-list{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:4px 6px}
.wa-row{display:flex;gap:10px;align-items:center;padding:9px 8px;border-radius:10px;color:var(--text)}
.wa-row:hover{background:var(--hover)} .wa-row.sel{background:var(--accent-soft)}
.wa-row-mid{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.wa-row-top,.wa-row-bot{display:flex;align-items:center;gap:8px}
.wa-row-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.wa-row.unread .wa-row-name{font-weight:800}
.wa-row-time{font-size:12px;color:var(--muted);flex:none}
.wa-row-prev{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13.5px;color:var(--muted)}
.wa-row.unread .wa-row-prev{color:var(--text)}
.wa-row-as{font-size:11.5px;color:var(--muted);background:var(--surface2);border-radius:8px;padding:1px 7px;flex:none}
.wa-ava{display:inline-grid;place-items:center;border-radius:50%;font-weight:700;font-size:14px;flex:none}
.wa-pane{display:flex;flex-direction:column;min-height:0;min-width:0;background:var(--surface2)}
.wa-head{display:flex;align-items:center;gap:10px;padding:8px 14px;background:var(--surface);border-bottom:1px solid var(--line);min-height:60px}
.wa-head-who{flex:1;min-width:0;display:flex;flex-direction:column;line-height:1.25}
.wa-head-who b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wa-head-acts{display:flex;gap:6px;flex:none}
.wa-head-acts .btn span{display:inline-flex}
.wa-back{display:none}
.wa-win{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600;margin-top:2px;white-space:nowrap}
.wa-win i{width:7px;height:7px;border-radius:50%;background:currentColor}
.wa-win.open{color:var(--green)} .wa-win.closed{color:var(--amber)}
.wa-scroll{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:14px 16px}
.wa-msgs{display:flex;flex-direction:column;gap:6px;max-width:760px;margin:0 auto}
.wa-day{text-align:center;margin:10px 0 4px} .wa-day span{font-size:12px;color:var(--muted);background:var(--surface);border-radius:10px;padding:2px 10px;box-shadow:var(--shadow)}
.wa-msg{max-width:78%;padding:7px 10px 5px;border-radius:12px;background:var(--surface);box-shadow:0 1px 1px rgba(30,24,70,.06);align-self:flex-start;display:flex;flex-direction:column;gap:4px;overflow-wrap:anywhere}
.wa-msg.out{align-self:flex-end;background:#e9e6fd}
.wa-text{white-space:pre-wrap;word-break:break-word}
.wa-link{color:var(--link);text-decoration:underline;word-break:break-all}
.wa-meta{display:flex;align-items:center;justify-content:flex-end;gap:3px;font-size:11.5px;color:var(--muted)}
.wa-tick{width:16px;height:11px} .wa-st{display:inline-flex;align-items:center}
.wa-st.read{color:#3b82f6} .wa-st.pending .ic{width:12px;height:12px}
.wa-st.failed{color:#fff;background:var(--red);border-radius:50%;width:15px;height:15px;justify-content:center;font-weight:800;font-size:11px}
.wa-err{font-size:12px;color:var(--red)}
.wa-img img{display:block;max-width:min(320px,100%);max-height:320px;border-radius:9px;object-fit:cover;background:var(--surface2)}
.wa-audio{width:min(280px,100%)} .wa-video{max-width:min(320px,100%);border-radius:9px}
.wa-file{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:9px;background:var(--surface2);color:var(--text);min-width:200px}
.wa-file b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:220px}
.wa-tpl-tag{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:700;color:var(--accent)} .wa-tpl-tag .ic{width:14px;height:14px}
.wa-note{align-self:stretch;background:var(--mention);color:var(--mention-ink);border:1px dashed #e8c66a;border-radius:10px;padding:7px 10px;font-size:14px}
.wa-note-top{display:flex;align-items:center;gap:5px;font-size:12px;margin-bottom:2px} .wa-note-top .ic{width:14px;height:14px}
.wa-compose{background:var(--surface);border-top:1px solid var(--line);padding:6px 12px calc(8px + var(--safe-b))}
.wa-modes{display:flex;gap:4px;margin-bottom:6px}
.wa-modes button{display:inline-flex;align-items:center;gap:4px;height:28px;padding:0 10px;border-radius:14px;font-size:13px;font-weight:600;color:var(--muted)}
.wa-modes button .ic{width:14px;height:14px}
.wa-modes button.sel{background:var(--accent-soft);color:var(--accent)}
.wa-compose.note .wa-modes button.sel{background:var(--mention);color:var(--mention-ink)}
.wa-edit{border:1px solid var(--line);border-radius:12px;padding:6px 8px 4px;background:var(--surface)}
.wa-compose.note .wa-edit{background:#fffbea;border-color:#ecd28a}
.wa-ta{width:100%;border:0;outline:none;resize:none;background:transparent;font-size:15px;line-height:1.4;max-height:160px;padding:4px 2px;display:block}
.wa-tools{display:flex;align-items:center;gap:2px}
.wa-compose.note .reply-only{display:none}
.wa-compose.sendoff:not(.note) .wa-send{opacity:.5;pointer-events:none}
.wa-closed{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:8px 10px;border-radius:10px;background:#fff6e6;color:#7a5200;font-size:13.5px}
.wa-closed p{margin:0;flex:1;min-width:200px}
.wa-closed .btn span{display:inline-flex}
.wa-empty{padding:40px 20px;text-align:center;color:var(--muted);margin:auto}
.wa-empty.small{padding:20px 12px;font-size:13.5px}
.wa-empty-ic .ic{width:44px;height:44px;color:var(--line)}
.wa-off{margin:10px 12px 0;padding:9px 11px;border-radius:10px;background:#fff6e6;color:#7a5200;font-size:13px}
.wa-off .link-btn{padding:0;font-size:13px}
.wa-warn{background:#fff6e6;color:#7a5200;border-radius:9px;padding:8px 10px}
.wa-tpls{display:flex;flex-direction:column;gap:8px;margin:8px 0}
.wa-tpl{display:flex;flex-direction:column;gap:3px;text-align:left;padding:10px 12px;border:1px solid var(--line);border-radius:10px}
.wa-tpl:hover{border-color:var(--accent)} .wa-tpl.off{opacity:.55}
.wa-tpl-top{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}
.wa-tpl-body{font-size:13.5px;color:var(--muted);white-space:pre-wrap}
.wa-tpl-prev{max-width:100%;align-self:stretch;margin:4px 0 8px}
.wa-tpl-btn{text-align:center;color:var(--link);font-weight:600;font-size:13.5px;border-top:1px solid var(--line2);padding-top:5px}
.wa-prev{max-width:100%;max-height:50vh;border-radius:10px;display:block;margin:0 auto 8px}
.wa-snip-text{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap}
.wa-set-status{border-radius:12px;padding:0 12px;margin-bottom:8px} .wa-set-status .switch-row{border-top:0}
.wa-set-status.on{background:#e8f7f0} .wa-set-status.off{background:var(--surface2)}
.wa-form,.wa-hook{display:flex;flex-direction:column;gap:2px}
.wa-hook{margin:10px 0;padding:10px 12px;border:1px solid var(--line2);border-radius:12px}
.wa-copyrow{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.wa-code{flex:1;min-width:180px;font-size:13px;background:var(--surface2);padding:7px 9px;border-radius:8px;overflow-wrap:anywhere;user-select:all}
.wa-copyrow .btn span{display:inline-flex}
.wa-test{font-size:13.5px;padding:8px 10px;border-radius:9px;margin-top:6px} .wa-test.ok{background:#e8f7f0;color:#166c47} .wa-test.bad{background:var(--red-soft);color:#9b1c28}
.row.gap{gap:8px} .row.wrap{flex-wrap:wrap}
.wa-guide{margin-top:12px;border:1px solid var(--line2);border-radius:12px;padding:10px 12px}
.wa-guide summary{font-weight:700;cursor:pointer}
.wa-step{margin-top:10px} .wa-step ul{margin:4px 0 0;padding-left:20px} .wa-step li{margin:3px 0;font-size:14px}
.wa-step .unconf{color:var(--amber);font-size:12px;font-weight:600}
.wa-audit{display:flex;flex-direction:column}
.wa-audit-row{display:flex;flex-direction:column;padding:8px 2px;border-bottom:1px solid var(--line2)}
@media (max-width:1100px){.wa-root{grid-template-columns:300px 1fr}}
@media (max-width:860px) and (min-width:701px){.wa-head-acts .btn .wa-lbl{display:none}}
@media (max-width:700px){
  .wa-root{grid-template-columns:1fr}
  .wa-root .wa-pane{display:none} .wa-root.has-convo .wa-side{display:none} .wa-root.has-convo .wa-pane{display:flex}
  .wa-back{display:inline-grid}
  .wa-msg{max-width:88%}
  .wa-head{padding:6px 8px;gap:8px}
  .wa-head-acts .btn .wa-lbl{display:none}
  .wa-head-acts .btn{padding:0 10px}
  .wa-win{font-size:11.5px}
  body[data-route="wa"].wa-in-convo .conv-head.view-head{display:none}
  body[data-route="wa"].wa-in-convo .tabbar{display:none}
  body[data-route="wa"]:not(.wa-in-convo) .main{bottom:calc(var(--tabbar) + var(--safe-b))}
}

/* v2q: Email inbox (reuses the WhatsApp inbox layout) */
.em-root>.wa-side,.em-root>.wa-pane{min-width:0}
.em-row{align-items:flex-start}
.em-row .wa-ava{margin-top:2px}
.em-row-subj{font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}
.em-row.unread .em-row-subj{font-weight:700}
.em-count{font-size:11.5px;font-weight:600;color:var(--muted);margin-left:5px}
.em-clip{display:inline-flex;color:var(--muted);flex:none} .em-clip .ic{width:14px;height:14px}
.em-synced{display:flex;align-items:center;gap:8px;font-size:12px}
.em-synced .muted{flex:1;min-width:0}
.em-sync{display:inline-flex;align-items:center;gap:4px;height:26px;padding:0 9px;border-radius:13px;font-size:12.5px;font-weight:600;color:var(--accent);background:var(--accent-soft);flex:none}
.em-sync .ic{width:14px;height:14px} .em-sync.spin .ic{animation:emspin 1s linear infinite}
@keyframes emspin{to{transform:rotate(360deg)}}
.em-head-who .em-subj{font-size:15.5px}
.em-scroll{padding:12px 14px}
.em-msgs{display:flex;flex-direction:column;gap:10px;max-width:860px;margin:0 auto}
.em-card{background:var(--surface);border-radius:12px;box-shadow:0 1px 2px rgba(30,24,70,.08);overflow:hidden}
.em-card.out{box-shadow:inset 3px 0 0 var(--accent),0 1px 2px rgba(30,24,70,.08)}
.em-card-head{display:flex;gap:10px;align-items:flex-start;padding:10px 12px 6px}
.em-card.collapsed .em-card-head{cursor:pointer;padding-bottom:10px}
.em-card-who{flex:1;min-width:0}
.em-card-top{display:flex;align-items:baseline;gap:8px} .em-card-top b{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.em-card-time{font-size:12px;flex:none}
.em-card-to,.em-card-snip{font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.em-card-body{padding:2px 12px 12px 54px}
.em-frame{display:block;width:100%;border:0;height:60px;background:#fff;border-radius:6px}
.em-text{white-space:pre-wrap;word-break:break-word;font-size:15px;line-height:1.5}
.em-dots{display:inline-block;margin-top:6px;padding:0 8px;height:18px;line-height:16px;border-radius:9px;background:var(--surface2);color:var(--muted);font-size:12px;letter-spacing:1px}
.em-dots.on{background:var(--accent-soft);color:var(--accent)}
.em-quote{margin-top:6px;padding-left:10px;border-left:3px solid var(--line);color:var(--muted);white-space:pre-wrap;font-size:14px}
.em-imgbar{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--muted);background:var(--surface2);border-radius:8px;padding:5px 8px;margin-bottom:8px}
.em-imgbar .ic{width:16px;height:16px;flex:none}
.em-files{padding:0 12px 12px 54px;display:flex;flex-wrap:wrap;gap:8px}
.em-files-h{width:100%;font-size:12px}
.em-file{min-width:0;max-width:280px;flex:1 1 220px;border:1px solid var(--line2)}
.em-file.off{opacity:.6}
.em-file b{max-width:none}
.em-file .grow{min-width:0}
.em-thumb{width:36px;height:36px;border-radius:6px;object-fit:cover;flex:none;background:#fff}
.em-ext{width:36px;height:36px;border-radius:6px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent);font-size:10.5px;font-weight:800;flex:none}
.em-note{margin:0}
.em-to{display:flex;align-items:center;gap:4px;flex-wrap:wrap;font-size:13px;margin:0 2px 6px}
.em-to-who{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
.em-all{display:inline-flex;align-items:center;gap:4px;margin-left:auto;font-size:12.5px;color:var(--muted)}
.em-ta{max-height:200px}
.em-chips{display:flex;flex-wrap:wrap;gap:6px}
.em-chips:empty{display:none}
.em-chip{display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:3px 4px 3px 8px;border-radius:8px;background:var(--surface2);font-size:12.5px}
.em-chip .ic{width:14px;height:14px} .em-chip .icon-btn{width:26px;height:26px}
.em-chip-n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:180px;font-weight:600}
.em-chip.up{opacity:.6}
.em-people{display:flex;flex-direction:column;border:1px solid var(--line2);border-radius:10px;margin-top:6px;max-height:260px;overflow-y:auto}
.em-person{display:flex;align-items:center;gap:10px;padding:9px 12px;border-bottom:1px solid var(--line2);min-height:44px}
.em-person:last-child{border-bottom:0} .em-person.admin{opacity:.75}
.em-person input{width:18px;height:18px}
.em-syncstat{font-size:13.5px;margin-top:8px;padding:8px 10px;border-radius:9px;background:var(--surface2)}
@media (max-width:700px){
  .em-card-body,.em-files{padding-left:12px}
  .em-scroll{padding:10px 8px}
  .em-file{flex-basis:100%;max-width:none}
  body[data-route="em"].wa-in-convo .conv-head.view-head{display:none}
  body[data-route="em"].wa-in-convo .tabbar{display:none}
  body[data-route="em"]:not(.wa-in-convo) .main{bottom:calc(var(--tabbar) + var(--safe-b))}
}

/* v2q: when the inbox itself is narrow (iPad portrait with the sidebar open), show the list or the thread, not both */
.view-body.em-body{container-type:inline-size}
@container (max-width:740px){
  .em-root{grid-template-columns:minmax(0,1fr)}
  .em-root .wa-pane{display:none} .em-root.has-convo .wa-side{display:none} .em-root.has-convo .wa-pane{display:flex}
  .em-root .wa-back{display:inline-grid}
  .em-root .em-card-body,.em-root .em-files{padding-left:12px}
}

/* v2r2: Google file link card */
a.fcard.ext.link{text-decoration:none;color:inherit;cursor:pointer}
a.fcard.ext.link small{color:var(--accent,#1264a3)}

/* v2r3: the one-line "what's new" on the update banner */
.update-banner .upd-txt{display:flex;flex-direction:column;line-height:1.25;min-width:0}
.update-banner .upd-note{font-weight:500;font-size:13px;opacity:.9;white-space:normal}
.update-banner .upd-note[hidden]{display:none}
.update-banner.has-note{width:max-content;max-width:calc(100vw - 24px);border-radius:18px;padding:8px 8px 8px 16px}
.update-banner.has-note button{flex:none}
