/* Hoober Messages: Hoober Dark (black, #234430 green, #D4AF37 gold, #D4D4CF text).
   Conversations on the left, the open conversation on the right; one at a time on a phone. */
:root{
  --bg:#0b0b0b; --surface:#161616; --surface2:#1c1c1c; --field:#1f1f1f;
  --line:rgba(255,255,255,.08); --line2:rgba(255,255,255,.20);
  --ink:#d4d4cf; --muted:rgba(212,212,207,.62); --dim:rgba(212,212,207,.45);
  --green:#234430; --green-h:#2b5239; --gold:#d4af37; --red:#e07a6a;
  --shadow:0 10px 30px rgba(0,0,0,.45);
}
*{box-sizing:border-box}
html,body{margin:0}
body{min-height:100vh;background:var(--bg);color:var(--ink);font-family:'Instrument Sans','Inter',system-ui,sans-serif;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font:inherit;color:inherit}
a{color:inherit}
[hidden]{display:none!important}

.topbar{display:flex;align-items:center}
.brand{display:flex;align-items:center;gap:16px;text-decoration:none}
.brand-logo{display:block;height:34px;width:auto}
.brand-divider{display:block;width:1px;height:30px;background:rgba(212,175,55,.45)}
.brand-name{font-family:'Playfair Display',Georgia,serif;font-weight:500;font-size:28px;line-height:1}

h1{margin:0;font-family:'Playfair Display',Georgia,serif;font-weight:500;font-size:30px;letter-spacing:-.015em;line-height:1.1}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:44px;padding:0 20px;border-radius:999px;border:1px solid var(--line2);background:var(--surface);font-weight:600;font-size:14.5px;cursor:pointer;white-space:nowrap;color:var(--ink)}
.btn:hover{border-color:rgba(212,175,55,.55)}
.btn.gold{background:var(--green);border-color:rgba(212,175,55,.75);color:#f1efe6}
.btn.gold:hover{background:var(--green-h)}
.btn.small{height:36px;padding:0 15px;font-size:13.5px}
.btn svg{width:16px;height:16px}
.btn:disabled{opacity:.5;cursor:default}
.link-btn{background:none;border:0;padding:0;color:var(--gold);font-weight:600;font-size:13.5px;cursor:pointer}
.link-btn:hover{text-decoration:underline}
.link-btn.danger{color:var(--red)}
.mx-off{margin:40px auto;max-width:520px;padding:18px;border:1px dashed var(--line2);border-radius:14px;color:var(--muted);text-align:center}

/* ── Layout ── */
.mx{display:grid;grid-template-columns:340px minmax(0,1fr);gap:18px;padding:0 34px 24px 28px;height:calc(100vh - 84px);height:calc(100dvh - 84px);min-height:480px}
.mx-list,.mx-thread{min-height:0;border-radius:20px;background:var(--surface);border:1px solid var(--line)}
.mx-list{display:flex;flex-direction:column;padding:18px 14px 44px}
.mx-list-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 6px 14px}
.mx-search{display:flex;align-items:center;gap:9px;height:42px;padding:0 13px;margin:0 4px 12px;border-radius:12px;background:var(--field);border:1px solid var(--line)}
.mx-search:focus-within{border-color:rgba(212,175,55,.6)}
.mx-search svg{width:18px;height:18px;flex:none;color:var(--dim)}
.mx-search input{flex:1;min-width:0;border:0;outline:0;background:transparent;font-size:15px}
.mx-convs{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:4px;padding:0 2px}
.mx-prefs{align-self:center;margin-top:12px}

.conv{position:relative;display:flex;gap:12px;align-items:center;width:100%;text-align:left;padding:11px 12px;border-radius:14px;border:1px solid transparent;background:none;cursor:pointer;color:var(--ink)}
.conv:hover{background:rgba(255,255,255,.04)}
.conv.on{background:rgba(35,68,48,.55);border-color:rgba(212,175,55,.35)}
.conv-av{flex:none;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:var(--green);border:1.5px solid rgba(212,175,55,.4);font-weight:700;font-size:14px;color:#f1efe6}
.conv-av svg{width:20px;height:20px}
.conv-av.team{background:#2a2414;border-color:rgba(212,175,55,.6);color:var(--gold)}
.conv-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.conv-top{display:flex;justify-content:space-between;gap:8px}
.conv-top b{font-size:14.5px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conv-top time{flex:none;font-size:12px;color:var(--dim)}
.conv-last{font-size:13.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.conv.unread .conv-top b,.conv.unread .conv-last{color:var(--ink);font-weight:700}
.conv-badge{flex:none;min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:var(--gold);color:#16130a;font-size:12px;font-weight:700;display:flex;align-items:center;justify-content:center}
.mx-none{margin:6px;padding:16px;border:1px dashed var(--line2);border-radius:14px;color:var(--dim);font-size:14px;line-height:1.5}

/* ── Open conversation ── */
.mx-thread{display:flex;flex-direction:column;overflow:hidden}
.mx-empty{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--dim);text-align:center;padding:24px}
.mx-empty svg{width:46px;height:46px;color:#d4af37}
.mx-empty p{margin:0;font-size:15px}
.mx-open{flex:1;min-height:0;display:flex;flex-direction:column}
.mx-head{display:flex;align-items:center;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line)}
.mx-back{display:none;flex:none;width:38px;height:38px;border-radius:50%;border:1px solid var(--line2);background:none;cursor:pointer;place-items:center;color:var(--ink)}
.mx-back svg{width:20px;height:20px}
.mx-title{flex:1;min-width:0}
.mx-title h2{margin:0;font-family:'Playfair Display',Georgia,serif;font-weight:500;font-size:22px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mx-title p{margin:2px 0 0;font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.mx-posts{flex:1;min-height:0;overflow-y:auto;padding:18px 20px 10px;display:flex;flex-direction:column;gap:3px}
.day{align-self:center;margin:14px 0 8px;padding:3px 12px;border-radius:999px;background:rgba(255,255,255,.05);font-size:12px;font-weight:600;color:var(--dim)}
.post{display:flex;flex-direction:column;align-items:flex-start;max-width:72%;margin-top:2px}
.post.first{margin-top:12px}
.post.mine{align-self:flex-end;align-items:flex-end}
.post-who{font-size:12px;color:var(--muted);margin:0 6px 3px}
.bubble{padding:9px 14px;border-radius:18px;background:var(--surface2);border:1px solid var(--line);font-size:15px;line-height:1.45;word-break:break-word;white-space:pre-wrap}
.post.mine .bubble{background:rgba(35,68,48,.7);border-color:rgba(212,175,55,.3);color:#eceae2}
.bubble.gone{background:none;border-style:dashed;color:var(--dim);font-style:italic}
.post-meta{display:flex;align-items:center;gap:10px;margin:3px 6px 0;font-size:11.5px;color:var(--dim)}
.post-meta button{background:none;border:0;padding:0;font-size:11.5px;font-weight:600;color:var(--gold);cursor:pointer}
.post-meta button.del{color:var(--red)}
@media (hover:hover){ .post .post-meta button{opacity:0;transition:opacity .12s} .post:hover .post-meta button,.post .post-meta button:focus-visible{opacity:1} }
.post-meta button:hover{text-decoration:underline}
.post-edit{display:flex;flex-direction:column;gap:6px;width:min(480px,100%)}
.post-edit textarea{width:100%;min-height:70px;resize:vertical;background:var(--field);border:1px solid rgba(212,175,55,.6);border-radius:12px;padding:9px 12px;font-size:15px;line-height:1.45;outline:none}
.post-edit div{display:flex;justify-content:flex-end;gap:8px}
.seen{align-self:flex-end;margin:4px 6px 0;font-size:11.5px;color:var(--dim)}

.mx-compose{display:flex;align-items:flex-end;gap:10px;padding:12px 16px 16px;border-top:1px solid var(--line)}
.mx-compose textarea{flex:1;min-width:0;max-height:160px;resize:none;overflow-y:hidden;background:var(--field);border:1px solid var(--line2);border-radius:20px;padding:11px 16px;font-size:15px;line-height:1.4;outline:none}
.mx-compose textarea:focus{border-color:rgba(212,175,55,.6)}
.mx-send{flex:none;width:44px;height:44px;border-radius:50%;border:1px solid rgba(212,175,55,.75);background:var(--green);color:#f1efe6;display:grid;place-items:center;cursor:pointer}
.mx-send:hover{background:var(--green-h)}
.mx-send:disabled{opacity:.5;cursor:default}
.mx-send svg{width:19px;height:19px}

/* ── New conversation (modal) ── */
.modal-back{position:fixed;inset:0;z-index:80;background:rgba(0,0,0,.7);display:flex;align-items:flex-start;justify-content:center;padding:8vh 16px 24px;overflow-y:auto}
.modal{width:min(560px,100%);background:var(--surface);border:1px solid var(--line2);border-radius:20px;padding:22px;box-shadow:var(--shadow)}
.modal h2{margin:0 0 14px;font-family:'Playfair Display',Georgia,serif;font-weight:500;font-size:23px}
.modal p.note{margin:0 0 14px;font-size:13px;color:var(--muted);line-height:1.5}
.mfield{display:flex;flex-direction:column;gap:6px;margin-bottom:14px;min-width:0}
.mfield > span{font-size:11.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.mfield input,.mfield textarea{width:100%;min-width:0;background:var(--field);border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-size:15px;outline:none}
.mfield textarea{resize:vertical;line-height:1.5}
.mfield input:focus,.mfield textarea:focus{border-color:rgba(212,175,55,.6)}
.pick{display:flex;flex-direction:column;gap:2px;max-height:220px;overflow-y:auto;margin-top:6px;padding:6px;border:1px solid var(--line);border-radius:10px;background:var(--field)}
.pick label{display:flex;gap:10px;align-items:center;padding:7px 8px;border-radius:8px;cursor:pointer;font-size:14.5px}
.pick label:hover{background:rgba(255,255,255,.04)}
.pick input{width:16px;height:16px;accent-color:var(--gold)}
.pick small{color:var(--muted);font-size:12px;margin-left:4px}
.mactions{display:flex;justify-content:flex-end;gap:10px;margin-top:6px}
.toast{position:fixed;left:50%;bottom:26px;transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:90;background:#1c1c1c;border:1px solid rgba(212,175,55,.45);border-radius:999px;padding:12px 20px;font-size:14px;font-weight:500;box-shadow:var(--shadow);transition:.2s;max-width:calc(100vw - 32px);text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}

/* ── Footer: notifications on this device ── */
.mx-foot{display:flex;flex-direction:column;align-items:center;gap:10px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line)}
.mx-foot .mx-prefs{margin-top:0}
.mx-notif{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;font-size:13px;color:var(--muted)}
.mx-notif small{font-size:12.5px;line-height:1.45;color:var(--dim)}
.mx-notif .ok{color:#9ccfa8}

/* ── List extras: online dot, muted, mentions, search hits ── */
.conv-av{position:relative}
.dot{position:absolute;right:-1px;bottom:-1px;width:12px;height:12px;border-radius:50%;background:#4fbf6a;border:2px solid var(--surface)}
.dot.inline{position:static;display:inline-block;width:9px;height:9px;border:0;margin-left:4px;vertical-align:middle}
.conv.muted .conv-top b,.conv.muted .conv-last{opacity:.7}
.conv-mute{display:inline-flex;margin-left:4px;color:var(--dim)}
.conv-mute svg{width:14px;height:14px}
.conv-top b{min-width:0}
.conv-top time{margin-left:auto}
.conv-badge.quiet{background:rgba(255,255,255,.14);color:var(--ink)}
.mx-sec{margin:14px 10px 6px;font-size:11.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--dim)}
.hit{display:flex;flex-direction:column;gap:2px;width:100%;text-align:left;padding:10px 12px;border-radius:12px;border:0;background:none;cursor:pointer;color:var(--ink)}
.hit:hover{background:rgba(255,255,255,.04)}
.hit .conv-last{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
mark{background:rgba(212,175,55,.35);color:inherit;border-radius:3px;padding:0 1px}

/* ── Conversation menu ── */
.mx-menu-wrap{position:relative;flex:none}
.mx-more{width:38px;height:38px;border-radius:50%;border:1px solid var(--line2);background:none;cursor:pointer;display:grid;place-items:center;color:var(--ink)}
.mx-more:hover,.mx-more[aria-expanded="true"]{border-color:rgba(212,175,55,.55)}
.mx-more svg{width:18px;height:18px}
.mx-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:30;min-width:220px;padding:6px;border-radius:14px;background:#121212;border:1px solid var(--line2);box-shadow:var(--shadow);display:flex;flex-direction:column}
.mx-menu button{text-align:left;padding:10px 12px;border-radius:9px;border:0;background:none;color:var(--ink);font-size:14px;cursor:pointer}
.mx-menu button:hover{background:rgba(255,255,255,.06)}
.mx-menu button.danger{color:var(--red)}

/* ── Pinned ── */
.mx-pins{border-bottom:1px solid var(--line);background:rgba(212,175,55,.05)}
.pins-top{display:flex;align-items:center;gap:10px;width:100%;padding:10px 20px;border:0;background:none;color:var(--ink);font-size:13.5px;text-align:left;cursor:pointer}
.pins-top svg{width:16px;height:16px;flex:none;color:var(--gold)}
.pins-top span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}
.pins-top b{color:var(--gold);margin-right:4px}
.pins-list{display:flex;flex-direction:column;gap:4px;padding:0 14px 12px;max-height:220px;overflow-y:auto}
.pin-row{display:flex;align-items:flex-start;gap:10px;padding:8px 10px;border-radius:10px;background:var(--surface2)}
.pin-go{flex:1;min-width:0;text-align:left;border:0;background:none;color:var(--ink);font-size:13.5px;line-height:1.4;cursor:pointer}
.pin-go small{display:block;margin-top:2px;font-size:11.5px;color:var(--dim)}

/* ── Posts: system notes, replies, tags, reactions ── */
.sys{align-self:center;margin:10px 0;font-size:12.5px;color:var(--dim);text-align:center}
.post{position:relative}
.post.flash .bubble{box-shadow:0 0 0 2px var(--gold)}
.post.tagged:not(.mine) .bubble{border-color:rgba(212,175,55,.6)}
.quote{display:flex;flex-direction:column;gap:1px;max-width:100%;margin:0 0 3px;padding:6px 11px;border:0;border-left:3px solid var(--gold);border-radius:8px;background:rgba(255,255,255,.04);color:var(--muted);font-size:12.5px;text-align:left;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.quote b{color:var(--ink);font-size:12px}
.pinmark{display:inline-flex;margin-right:6px;color:var(--gold);vertical-align:-2px}
.pinmark svg{width:13px;height:13px}
.tag{font-weight:600;border-radius:6px;padding:0 3px}
.tag.person{color:var(--gold)}
.tag.person.me{background:rgba(212,175,55,.2)}
.tag.file{display:inline-flex;align-items:center;gap:4px;padding:1px 8px 1px 6px;border-radius:999px;background:rgba(212,175,55,.14);border:1px solid rgba(212,175,55,.45);color:#f0dca0;text-decoration:none;white-space:nowrap}
a.tag.file:hover{background:rgba(212,175,55,.26)}
.tag.file svg{width:13px;height:13px}
.reacts{display:flex;flex-wrap:wrap;gap:5px;margin:4px 4px 0}
.react{display:inline-flex;align-items:center;gap:4px;height:26px;padding:0 9px;border-radius:999px;border:1px solid var(--line2);background:var(--surface2);font-size:13px;cursor:pointer;color:var(--ink)}
.react span{font-size:12px;font-weight:600;color:var(--muted)}
.react.mine{border-color:rgba(212,175,55,.7);background:rgba(212,175,55,.12)}
.picker{position:absolute;bottom:100%;z-index:20;display:flex;gap:2px;padding:5px;border-radius:999px;background:#121212;border:1px solid var(--line2);box-shadow:var(--shadow)}
.post:not(.mine) .picker{left:0}
.post.mine .picker{right:0}
.picker button{width:36px;height:36px;border-radius:50%;border:0;background:none;font-size:19px;cursor:pointer}
.picker button:hover{background:rgba(255,255,255,.08)}

/* ── Under the posts: typing, replying, @ suggestions ── */
.mx-typing{min-height:20px;padding:0 22px;font-size:12.5px;font-style:italic;color:var(--dim)}
.mx-replying{display:flex;align-items:center;gap:10px;margin:0 16px;padding:8px 12px;border-left:3px solid var(--gold);border-radius:8px;background:rgba(255,255,255,.04)}
.mx-replying span{flex:1;min-width:0;display:flex;flex-direction:column;font-size:13px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mx-replying b{color:var(--ink);font-size:12.5px}
.mx-replying button{flex:none;width:28px;height:28px;border-radius:50%;border:0;background:rgba(255,255,255,.08);color:var(--ink);font-size:18px;cursor:pointer}
.mx-thread{position:relative}
.mx-suggest{position:absolute;left:16px;right:16px;bottom:76px;z-index:25;max-height:300px;overflow-y:auto;padding:6px;border-radius:14px;background:#121212;border:1px solid var(--line2);box-shadow:var(--shadow)}
.sug-h{margin:6px 8px 4px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--dim)}
.sug{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border-radius:9px;border:0;background:none;color:var(--ink);text-align:left;font-size:14px;cursor:pointer}
.sug svg{width:17px;height:17px;flex:none;color:var(--gold)}
.sug span{display:flex;flex-direction:column;min-width:0}
.sug small{font-size:12px;color:var(--dim)}
.sug.on,.sug:hover{background:rgba(255,255,255,.07)}

/* ── People in a group ── */
.plist{display:flex;flex-direction:column;gap:2px;margin-bottom:10px}
.prow{display:flex;align-items:center;justify-content:space-between;padding:9px 4px;border-bottom:1px solid var(--line);font-size:14.5px}
@media (max-width:820px){ .mx-suggest{left:8px;right:8px} .pins-top{padding:10px 14px} }

/* ── Phone: one side at a time ── */
@media (max-width:820px){
  .mx{grid-template-columns:minmax(0,1fr);padding:0 12px 12px;height:calc(100dvh - 70px)}
  .mx-list{padding-bottom:40px}
  .mx.reading .mx-list{display:none}
  .mx:not(.reading) .mx-thread{display:none}
  .mx-back{display:grid}
  .mx-head{padding:12px 14px}
  .mx-posts{padding:14px 12px 8px}
  .post{max-width:86%}
  .mx-compose{padding:10px 10px calc(10px + env(safe-area-inset-bottom))}
  .topbar{min-height:70px!important;padding:14px 16px!important}
}

/* Dark scrollbars */
.mx-posts,.mx-convs,.mx-suggest,.pins-list,.pick{scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.18) transparent}
.post-meta{flex-wrap:wrap}
.post-meta time{white-space:nowrap}

/* ════ Redesign (2026-11-29): one panel, cleaner messages, Mentions tab, pictures and shared documents ════ */
.mx-compose textarea{min-height:0}
@media (min-width:821px){
  .mx{max-width:1320px;width:calc(100% - 68px);margin:0 auto 24px;padding:0;column-gap:0;grid-template-columns:330px minmax(0,1fr);
    background:var(--surface);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow);overflow:hidden;height:calc(100vh - 108px);height:calc(100dvh - 108px)}
  .mx-list{border:0;border-radius:0;border-right:1px solid var(--line);background:var(--surface2);padding:0}
  .mx-thread{border:0;border-radius:0;background:var(--surface)}
}
.mx-list{display:flex;flex-direction:column;min-height:0}
.mx-list-top{display:flex;align-items:center;gap:8px;padding:16px 14px 12px}
.mx-list-top .mx-search{flex:1;min-width:0;margin:0;height:40px}
.mx-list-top .mx-search input{width:100%;min-width:0}
.mx-ibtn{flex:none;width:40px;height:40px;border-radius:12px;border:1px solid var(--line);background:var(--surface);color:var(--ink);display:grid;place-items:center;cursor:pointer}
.mx-ibtn svg{width:18px;height:18px}
.mx-ibtn:hover,.mx-ibtn[aria-expanded="true"]{border-color:rgba(212,175,55,.55)}
.mx-ibtn.green{background:var(--green);border-color:var(--green);color:#f6f4ee}
.mx-ibtn.green:hover{background:var(--green-h)}
.mx-pop-wrap{position:relative;flex:none}
.mx-pop{position:absolute;top:calc(100% + 8px);right:0;z-index:40;min-width:230px;padding:12px;border-radius:14px;background:var(--surface);border:1px solid var(--line2);box-shadow:var(--shadow);display:flex;flex-direction:column;align-items:flex-start;gap:10px}
.mx-pop.up{top:auto;bottom:calc(100% + 10px);padding:6px;gap:0}
.mx-pop.up button{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border:0;border-radius:10px;background:none;font-size:14px;text-align:left;cursor:pointer;color:var(--ink);white-space:nowrap}
.mx-pop.up button:hover{background:rgba(127,127,120,.1)}
.mx-pop.up svg{width:18px;height:18px;color:var(--gold);flex:none}
.mx-pop .mx-notif{align-items:flex-start;text-align:left}
.mx-tabs{display:flex;gap:4px;margin:0 14px 10px;padding:3px;border-radius:12px;background:rgba(127,127,120,.1)}
.mx-tabs button{flex:1;height:32px;border:0;border-radius:9px;background:none;font-weight:600;font-size:13.5px;color:var(--muted);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px}
.mx-tabs button.on{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.mx-tabs em{font-style:normal;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--gold);color:#1d1d1b;font-size:11px;font-weight:700;display:grid;place-items:center}
.mx-convs{padding:0 8px 12px}
.conv{border:0}
.conv.on{background:rgba(35,68,48,.35);border:0}
.conv:hover:not(.on){background:rgba(127,127,120,.08)}
/* Mentions list */
.mn{display:flex;gap:11px;width:100%;padding:10px;border:0;border-radius:14px;background:none;text-align:left;cursor:pointer;color:var(--ink)}
.mn:hover{background:rgba(127,127,120,.08)}
.mn.new{box-shadow:inset 3px 0 0 var(--gold)}
.mn .conv-av{width:36px;height:36px;font-size:12px}
.mn-t{flex:1;min-width:0}
.mn-top{display:flex;justify-content:space-between;gap:8px;font-size:13px;color:var(--muted)}
.mn-top b{color:var(--ink);font-weight:600}
.mn-top time{flex:none;font-size:12px;color:var(--dim)}
.mn-t p{margin:3px 0 0;font-size:13.5px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;word-break:break-word}
.mn.new .mn-top b,.mn.new p{font-weight:600}
.mn .tag.person.me{background:rgba(212,175,55,.22)}
/* Chat header */
.mx-head-av{flex:none;width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:var(--green);color:#f6f4ee;font-weight:700;font-size:14px}
.mx-head-av svg{width:20px;height:20px}
.mx-head-av.team{background:#2a2414;color:var(--gold)}
.mx-head-av:empty{display:none}
/* Messages: runs with a picture, the name and time once, soft bubbles */
.mx-posts{padding:20px 28px 12px}
.post{max-width:min(72%,640px);padding-left:42px}
.post.mine{padding-left:0}
.post.first{margin-top:14px}
.post-av{position:absolute;left:0;top:0;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--green);color:#f6f4ee;font-size:11.5px;font-weight:700}
.post.first.has-who .post-av{top:20px}
.post-who{display:flex;gap:6px;align-items:baseline;margin:0 4px 3px}
.post-who time{font-size:11.5px;color:var(--dim)}
.post.mine .post-who{justify-content:flex-end}
.bubble{position:relative;border:0;background:var(--surface2)}
.post.first:not(.mine) .bubble{border-top-left-radius:6px}
.post.first.mine .bubble{border-top-right-radius:6px}
.post.mine .bubble{background:var(--green);color:#f6f4ee;border:0}
.post.mine .tag.person{color:#f3d77a}
.post.tagged:not(.mine) .bubble:not(.gone){border:0;box-shadow:inset 3px 0 0 var(--gold)}
.post.tagged .bubble.gone{box-shadow:none}
.bubble.gone{border:1px dashed var(--line2)}
.post.r .bubble,.post.r .att-list{margin-top:14px}
/* Reactions sit on the top corner of the message, like iPhone Messages */
.reacts{position:absolute;top:-15px;right:-10px;display:flex;gap:3px;margin:0;z-index:2}
.post.mine .reacts{right:auto;left:-10px}
.react{height:24px;padding:0 7px;gap:3px;background:var(--surface);border:1px solid var(--line2);box-shadow:0 2px 6px rgba(0,0,0,.15);font-size:12.5px}
.react span{font-size:11.5px}
.react.mine{border-color:var(--gold);background:var(--surface)}
.post-meta{margin:2px 4px 0;min-height:16px}
/* Pictures and shared documents */
.att-list{display:flex;flex-direction:column;gap:6px;align-items:inherit;position:relative}
.post .bubble + .att-list{margin-top:4px}
.att-pic{display:block;max-width:300px;border-radius:16px;overflow:hidden;border:1px solid var(--line);background:var(--surface2);cursor:zoom-in;padding:0}
.att-pic img{display:block;max-width:300px;max-height:260px;width:auto;height:auto}
.att-pic.loading{width:220px;height:150px}
.att-card{display:flex;align-items:center;gap:10px;width:300px;max-width:100%;padding:10px 12px;border-radius:16px;border:1px solid var(--line2);background:var(--surface);cursor:pointer;text-align:left;color:var(--ink)}
.att-card:hover{border-color:rgba(212,175,55,.6)}
.att-ic{flex:none;width:36px;height:36px;border-radius:9px;display:grid;place-items:center;background:rgba(180,68,47,.14);color:#c0533c;font-size:10px;font-weight:700}
.att-t{flex:1;min-width:0}
.att-t b{display:block;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.att-t small{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--muted)}
.att-t small svg{width:12px;height:12px;color:var(--gold)}
.att-gone{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:14px;border:1px dashed var(--line2);color:var(--dim);font-size:13px;font-style:italic}
/* Writing: one rounded bar, paperclip and send inside */
.mx-compose{display:block;padding:10px 20px 16px;border-top:0}
.mx-bar{display:flex;align-items:flex-end;gap:6px;padding:5px 5px 5px 16px;border-radius:24px;border:1px solid var(--line2);background:var(--field)}
.mx-bar:focus-within{border-color:rgba(212,175,55,.6)}
.mx-bar textarea{flex:1;min-width:0;border:0!important;background:none!important;padding:9px 0!important;min-height:38px;max-height:160px;border-radius:0;outline:none;resize:none;font-size:15px;line-height:1.4;box-shadow:none}
.mx-att{width:38px;height:38px;border-radius:50%;border:0;background:none;color:var(--muted);display:grid;place-items:center;cursor:pointer}
.mx-att:hover,.mx-att[aria-expanded="true"]{color:var(--gold)}
.mx-att svg{width:19px;height:19px}
.mx-bar .mx-send{width:38px;height:38px;border:0}
.mx-bar .mx-send svg{width:17px;height:17px}
.mx-pending{display:flex;flex-wrap:wrap;gap:8px;padding:8px 20px 0}
.pend{position:relative;display:flex;align-items:center;gap:8px;max-width:240px;padding:6px 30px 6px 6px;border-radius:12px;border:1px solid var(--line2);background:var(--surface2);font-size:13px}
.pend img{width:44px;height:44px;border-radius:8px;object-fit:cover;flex:none}
.pend .att-ic{width:44px;height:44px}
.pend span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pend button{position:absolute;top:4px;right:4px;width:22px;height:22px;border-radius:50%;border:0;background:rgba(127,127,120,.2);color:var(--ink);cursor:pointer;font-size:14px;line-height:1}
.mx-drop{position:absolute;inset:0;z-index:30;display:grid;place-items:center;background:rgba(35,68,48,.12);border:2px dashed var(--gold);border-radius:inherit;font-weight:600;color:var(--ink);pointer-events:none}
/* Viewer */
.mx-viewer{position:fixed;inset:0;z-index:95;background:rgba(0,0,0,.72);display:flex;align-items:center;justify-content:center;padding:20px}
.vbox{width:min(980px,100%);height:min(92vh,100%);background:var(--surface);border-radius:18px;display:flex;flex-direction:column;overflow:hidden;box-shadow:var(--shadow)}
.vhead{display:flex;align-items:center;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}
.vhead .vt{flex:1;min-width:0}.vhead b{display:block;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.vhead small{display:block;font-size:12.5px;color:var(--muted)}
.vhead .vacts{display:flex;gap:8px;flex:none}
.vbody{flex:1;min-height:0;background:#e9e6dd;display:flex;align-items:center;justify-content:center;overflow:auto}
.vbody img{max-width:100%;max-height:100%;object-fit:contain}
.vbody iframe{width:100%;height:100%;border:0;background:#fff}
.vbody p{color:#555}
/* Pick a borrower's document */
.dpick{display:flex;flex-direction:column;gap:2px;max-height:300px;overflow-y:auto;margin-top:6px;padding:6px;border:1px solid var(--line);border-radius:10px;background:var(--field)}
.dpick button{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:0;border-radius:8px;background:none;color:var(--ink);text-align:left;cursor:pointer;font-size:14px}
.dpick button:hover{background:rgba(127,127,120,.1)}
.dpick small{display:block;color:var(--muted);font-size:12px}
.dpick .att-ic{width:30px;height:30px;font-size:9px}
@media (max-width:820px){
  .mx-posts{padding:14px 12px 8px}
  .post{max-width:88%;padding-left:38px}
  .post.mine{padding-left:0}
  .post-av{width:28px;height:28px;font-size:10.5px}
  .mx-compose{padding:8px 10px calc(10px + env(safe-area-inset-bottom))}
  .mx-pending{padding:8px 10px 0}
  .att-pic img{max-width:220px}.att-card{width:250px}
  .mx-list-top{padding:12px 10px 10px}.mx-tabs{margin:0 10px 8px}
  .vbox{height:100%;border-radius:14px}
  .vhead .vacts .btn span{display:none}
}
.vacts a.btn{text-decoration:none}
