:root{color-scheme:light;--bg:#f6f7f8;--surface:#fff;--ink:#202631;--muted:#747f8e;--line:#e5e8ec;--hover:#f0f3f5;--accent:#385e78;--me:#eaf1f4;--danger:#a44b4b;font:14px/1.5 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink)}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.4;cursor:not-allowed}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.shell{height:100dvh;min-height:450px;display:flex;flex-direction:column}.top{height:56px;flex:none;border-bottom:1px solid var(--line);background:var(--surface);display:flex;align-items:center;justify-content:space-between;padding:0 22px}.brand{font-size:13px;font-weight:700;letter-spacing:-.025em}.mark{color:var(--accent);padding-right:6px}.muted,.state{color:var(--muted)}.top-actions{display:flex;align-items:center;gap:17px}.state{font-size:11px}.state::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:#aeb7bf;margin-right:7px}.state.online::before{background:#68a88f}.state.error::before{background:#c78966}.subtle,.icon{border:0;background:transparent;color:var(--muted);padding:5px 6px}.subtle:hover,.icon:hover{color:var(--ink)}.workspace{flex:1;min-height:0;display:grid;grid-template-columns:minmax(230px,300px) minmax(0,1fr);max-width:1450px;width:100%;margin:0 auto;background:var(--surface);border-inline:1px solid var(--line)}.workspace[hidden],.connect-panel[hidden],.typing[hidden],.toast[hidden]{display:none}.side{border-right:1px solid var(--line);display:flex;flex-direction:column;min-width:0}.side-head,.side-foot{display:flex;align-items:center;justify-content:space-between;padding:17px 18px;color:var(--muted);font-size:10px;letter-spacing:.08em}.side-head{height:57px}.side-head .icon{font-size:18px}.side input{margin:0 12px 10px;border:1px solid var(--line);background:var(--bg);border-radius:5px;padding:9px 10px;width:calc(100% - 24px);font-size:12px;color:var(--ink)}.chat-list{overflow:auto;flex:1}.chat{width:100%;border:0;border-left:3px solid transparent;background:none;text-align:left;padding:12px 16px 12px 13px;color:var(--ink)}.chat:hover{background:var(--hover)}.chat.active{border-left-color:var(--accent);background:var(--me)}.chat-title,.chat-preview{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.chat-title{display:flex;gap:7px;align-items:baseline;font-size:12px;font-weight:600}.chat-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.chat-time{font-size:10px;color:var(--muted);font-weight:400}.chat-preview{font-size:11px;color:var(--muted);margin-top:3px}.side-foot{letter-spacing:0;border-top:1px solid var(--line);gap:10px}.thread{display:flex;flex-direction:column;min-width:0}.thread-head{height:57px;flex:none;border-bottom:1px solid var(--line);padding:9px 20px;display:flex;align-items:center;justify-content:space-between;gap:14px}.thread-head strong{display:block;font-size:13px;font-weight:600}.thread-head span{display:block;color:var(--muted);font-size:10px}.messages{flex:1;overflow:auto;padding:25px min(5%,50px);scroll-behavior:auto}.empty{color:var(--muted);font-size:12px;margin:35vh auto 0;text-align:center}.day{font-size:10px;letter-spacing:.06em;color:var(--muted);border-bottom:1px solid var(--line);margin:16px 0 12px;padding-bottom:5px;text-transform:uppercase}.line{display:grid;grid-template-columns:54px minmax(0,1fr);gap:12px;padding:4px 8px;margin:0 -8px;border-radius:5px}.line:hover{background:var(--hover)}.line.me{background:var(--me);border-radius:5px}.line.me+.line.me{margin-top:2px}.line .time{color:var(--muted);font-size:10px;padding-top:2px}.line .who{font-size:11px;font-weight:700;color:var(--accent)}.line.me .who{color:#547365}.body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px;line-height:1.6}.meta{color:var(--muted);font-size:10px;margin-top:2px}.reactions{display:inline-flex;gap:4px;margin-left:8px}.reaction{border:1px solid var(--line);border-radius:4px;padding:0 4px;color:var(--accent);font-size:10px}.react-button{border:0;background:none;color:var(--muted);font-size:10px;margin-left:8px;visibility:hidden}.line:hover .react-button,.react-button:focus-visible{visibility:visible}.reaction-menu{display:inline-flex;gap:3px;margin-left:7px}.reaction-menu button{background:var(--surface);border:1px solid var(--line);border-radius:4px;padding:0 4px}.attachment{display:inline-block;color:var(--accent);text-decoration:underline;text-underline-offset:2px;margin-top:2px}.attachment img{max-height:230px;max-width:min(100%,330px);border-radius:4px;display:block;margin-top:5px}.typing{padding:4px 20px;color:var(--muted);font-size:11px}.compose{border-top:1px solid var(--line);display:flex;align-items:flex-end;padding:14px 20px 7px;gap:10px}.compose textarea{flex:1;resize:none;max-height:150px;min-height:37px;padding:9px 11px;background:var(--bg);border:1px solid var(--line);border-radius:5px;color:var(--ink);font-size:12px}.compose button[type=submit],.connect-card button[type=submit]{background:var(--ink);color:#fff;border:0;border-radius:5px;padding:9px 15px;min-height:37px}.compose button[type=submit]:hover,.connect-card button[type=submit]:hover{background:var(--accent)}.compose .icon{font-size:22px;height:37px}.compose-note{font-size:10px;color:var(--muted);padding:0 20px 12px;text-align:right}.compose-note span{margin-left:15px}.connect-panel{flex:1;display:grid;place-items:center;padding:24px}.connect-card{width:min(100%,450px);padding:38px;background:var(--surface);border:1px solid var(--line);box-shadow:0 14px 55px #1f334008}.kicker{color:var(--accent);font-size:10px;letter-spacing:.14em}.connect-card h1{font-family:system-ui,-apple-system,Segoe UI,sans-serif;font-size:28px;letter-spacing:-.045em;line-height:1.15;margin:12px 0}.connect-card p{color:var(--muted);font-size:12px}.connect-card form{margin:25px 0 17px}.connect-card label{display:block;font-size:10px;letter-spacing:.08em;color:var(--muted);margin:14px 0}.connect-card input{display:block;margin-top:7px;width:100%;padding:11px;border:1px solid var(--line);border-radius:5px;background:var(--bg);color:var(--ink);font-size:12px;letter-spacing:0}.connect-card button[type=submit]{width:100%;display:flex;justify-content:space-between;margin-top:20px}.connect-card .small{font-size:10px;line-height:1.7}.toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#28313b;color:#fff;border-radius:5px;padding:9px 14px;font-size:11px;max-width:min(90vw,470px);box-shadow:0 8px 30px #0002}.back{display:none}@media(max-width:660px){.top{padding:0 12px}.workspace{grid-template-columns:1fr}.side{display:flex}.thread{display:none}.workspace.thread-open .side{display:none}.workspace.thread-open .thread{display:flex}.back{display:inline-block}.thread-head{padding:9px 12px}.thread-head strong{font-size:11px}.messages{padding:12px}.compose{padding:10px}.compose-note{padding:0 10px 7px}.side-foot{padding:12px}.line{grid-template-columns:43px minmax(0,1fr);gap:5px}}
/* Keep the grid row inside the viewport, and scroll each pane independently. */
.workspace{grid-template-rows:minmax(0,1fr);overflow:hidden}
.side,.thread{min-height:0;overflow:hidden}
.chat-list,.messages{min-height:0;overscroll-behavior:contain}

.pending-file{padding:6px 20px;color:var(--accent);font-size:11px;display:flex;justify-content:space-between;align-items:center}.pending-file[hidden]{display:none}

.load-older{display:block;margin:8px auto 20px;padding:6px 12px;background:var(--bg);border:1px solid var(--line);border-radius:4px;color:var(--accent);font-size:11px}

.reply-context{font-size:10px;color:var(--muted);border-left:2px solid var(--line);padding-left:7px;margin:3px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.sync-status{flex:none;padding:6px 17px;color:var(--accent);font-size:10px;border-top:1px solid var(--line)}.sync-status[hidden]{display:none}.chat.unread .chat-name{font-weight:800}.unread-badge{font-size:9px;background:var(--accent);color:#fff;border-radius:9px;min-width:17px;text-align:center;padding:0 4px;line-height:17px}

/* Compact tapbacks sit on the target message edge instead of reading as inline prose. */
.line.has-reaction{margin-bottom:11px}.line.has-reaction>div:last-child{position:relative}.reactions{position:absolute;right:9px;bottom:-15px;display:inline-flex;gap:2px;margin:0;z-index:1}.reaction{display:inline-flex;align-items:center;justify-content:center;min-width:21px;height:19px;padding:0 5px;background:var(--surface);color:var(--accent);border:1px solid #cbd7dd;border-radius:11px;box-shadow:0 1px 2px #0001;font-size:11px;font-weight:700}.line:not(.me) .reaction{background:#f4f7f8}

.workspace{grid-template-columns:var(--sidebar-width,300px) 5px minmax(0,1fr)}.sidebar-resize{background:var(--line);cursor:col-resize;touch-action:none;z-index:3}.sidebar-resize:hover,.sidebar-resize.dragging{background:var(--accent)}.sidebar-resize:focus-visible{outline:2px solid var(--accent)}
.attachment-preview{display:block;max-width:min(100%,300px);max-height:220px;object-fit:contain;border-radius:5px;cursor:pointer;margin:4px 0}.day{text-align:center;border:0;margin:19px 0 10px;font-size:10px}.line .time{font-size:9px}.line.has-reaction>div:last-child{position:relative;padding-bottom:4px}.line.has-reaction{margin-bottom:13px}
@media(max-width:660px){.workspace{grid-template-columns:minmax(0,1fr)}.sidebar-resize{display:none}}
@media(min-width:661px) and (max-width:900px){.top{height:42px}.side-head,.thread-head{height:44px}.messages{padding:14px}.compose{padding:8px 10px 3px}.compose-note{padding:0 10px 4px}}

/* Keep the tapback close to its message text, not the far edge of the thread. */
.line>div:last-child{width:fit-content;max-width:100%;min-width:0}.line .body{display:inline}.line.has-reaction>div:last-child{padding-right:15px}.line .reactions{right:-5px}

.compose textarea{overflow-y:auto;min-height:37px;max-height:min(40vh,220px)}.reply-context{max-width:400px}.connect-card .small{font-size:10px}

/* Chrome VDI: hide persistent bars, keep keyboard/wheel scrolling. */
.chat-list,.messages{scrollbar-width:none;-ms-overflow-style:none;overflow-x:hidden}.chat-list::-webkit-scrollbar,.messages::-webkit-scrollbar{width:0;height:0}.messages .line,.messages .line>div,.reply-context{min-width:0;max-width:100%}.line>div:last-child{overflow-wrap:anywhere}.reply-context{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.compose textarea{overflow-y:hidden;scrollbar-width:none}.compose textarea::-webkit-scrollbar{display:none}.workspace,.thread,.compose{min-width:0}.compose textarea{min-width:0}

.side-head{gap:6px}.side-head>span{margin-right:auto}.side-head .subtle{white-space:nowrap;font-size:10px}.compose textarea{max-height:65vh;scrollbar-width:none}.compose textarea::-webkit-scrollbar{width:0;height:0}.messages{overflow-x:hidden}.reply-context{max-width:100%;overflow:hidden;text-overflow:ellipsis}

.line .react-button{padding:0 4px}.pending-file{max-height:50px;overflow:hidden}.pending-file span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pending-file button{flex:none}

/* Text-only tapbacks: a quiet glyph tucked into the line, no hanging bubble. */
.line.has-reaction{margin-bottom:0}.line.has-reaction>div:last-child{padding-bottom:0;padding-right:0}.line .reactions{position:static;display:inline-flex;vertical-align:super;margin:0 0 0 5px;gap:3px}.line .reaction,.line:not(.me) .reaction{min-width:0;height:auto;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none;color:#718293;font-size:10px;font-weight:500}.line.me .reaction{color:#718293}

/* Slack/Discord-style reaction chips below the message. */
.line.has-reaction{margin-bottom:2px}.line.has-reaction>div:last-child{padding-bottom:0}.line .reactions{position:static;display:flex;flex-wrap:wrap;gap:4px;margin:4px 0 0;vertical-align:baseline}.line .reaction,.line:not(.me) .reaction,.line.me .reaction{display:inline-flex;align-items:center;min-width:26px;height:20px;padding:1px 6px;background:#f4f6f8;border:1px solid #dbe2e7;border-radius:10px;box-shadow:none;color:#536679;font-size:10px;font-weight:600}

.state{font-size:0}.state::before{margin-right:0;width:8px;height:8px}.server-info{position:fixed;top:48px;right:12px;z-index:5;background:var(--surface);border:1px solid var(--line);padding:8px 10px;font-size:10px;box-shadow:0 5px 20px #0001;max-width:90vw;overflow-wrap:anywhere}.server-info[hidden]{display:none}.top-actions{gap:10px}

.compose textarea{max-height:none}.send-state.sending{color:#75889a}.send-state.sent{color:#547365}.send-state.failed{color:#ad5555}.side-foot{justify-content:flex-start}

.attachment-link{border:0;background:transparent;color:var(--accent);font-size:11px;padding:0;text-decoration:underline;text-underline-offset:2px}.attachment-frame{display:block;width:min(260px,100%);height:190px;max-width:100%;margin:5px 0;background:var(--bg);border:1px solid var(--line);border-radius:5px;overflow:hidden}.attachment-frame img{width:100%;height:100%;object-fit:contain;cursor:zoom-in}.attachment-wrap{display:inline-block;max-width:100%}

.day{display:table;margin:20px auto 14px;padding:2px 10px;border:1px solid var(--line);border-radius:13px;background:var(--surface);text-transform:none;letter-spacing:0}.line{position:relative}.line.grouped{padding-top:1px;padding-bottom:1px}.line .time{visibility:hidden}.line:hover .time{visibility:visible}.message-stamp{font-size:9px;font-weight:400;color:var(--muted);margin-left:6px}.line .who{font-size:11px}.line .react-button{visibility:hidden}.line:hover .react-button,.line:focus-within .react-button{visibility:visible}.reaction-add{border:0;background:transparent;color:var(--muted);padding:0 3px;font-size:11px;cursor:pointer}.reaction-add:hover{color:var(--accent)}.compose #send{width:33px;padding:7px 0;flex:none;font-size:16px}.compose #send[hidden]{display:none}.line.me+.line.me{margin-top:0}

.message-header{display:flex;gap:8px;align-items:baseline;justify-content:space-between;margin-bottom:1px}.message-header .who{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-stamp{flex:none;margin-left:auto}.line .time{font-size:0}.line:hover .time{font-size:9px}.attachment-wrap{display:block;margin:2px 0}.attachment-frame{width:min(220px,100%);height:140px;display:block;margin:5px 0 3px;border-radius:4px}.attachment-frame[hidden]{display:none}.attachment-frame img{max-height:none;margin:0}.reply-context{display:block;border:0;border-left:2px solid #9fb7c5;border-radius:0;background:transparent;padding:2px 6px;margin:2px 0 5px;max-width:100%;text-align:left;cursor:pointer;font-size:10px;color:var(--muted)}.reply-context:hover{color:var(--accent);background:#f1f5f7}.reply-target{outline:2px solid #a8c2d0;outline-offset:2px}.line.grouped .message-header{display:none}
.line>div:last-child{width:100%;max-width:100%}.attachment-wrap{width:100%}.attachment-frame{width:min(220px,100%)}.message-header{width:100%}.message-stamp{margin-left:auto}

.line{grid-template-columns:minmax(0,1fr);gap:0;margin-left:0;margin-right:0}.line>div:last-child{width:100%}.line .time{display:none}@media(max-width:660px){.line{grid-template-columns:minmax(0,1fr)}}

.image-attachment{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.thumbnail-button{width:96px;height:64px;flex:none;border:1px solid var(--line);border-radius:4px;padding:0;background:#f3f5f6;overflow:hidden}.thumbnail{display:grid;place-items:center;width:100%;height:100%;font-size:10px;color:var(--muted)}.thumbnail img{display:block;width:100%;height:100%;object-fit:cover}.image-size{font-size:10px;color:var(--muted);white-space:nowrap}.image-attachment .attachment-link{font-size:10px}.image-attachment .attachment-frame{flex-basis:100%;height:140px;overflow:hidden}.image-attachment .attachment-frame[hidden]{display:none}

.thumbnail img{max-height:100%;max-width:100%;object-fit:cover;margin:0}.image-attachment .attachment-frame img{max-height:140px;max-width:100%;object-fit:contain}

/* Narrow VDI strips: keep the conversation flush with the available pane. */
@media(max-width:900px){.messages{padding:12px 6px}.line{padding:4px 5px;margin:0}.thread-head{padding-inline:8px}.compose{padding-inline:8px}}
@media(max-width:660px){.messages{padding:10px 5px}.line{padding-inline:4px}.day{margin-top:10px}}

/* Calm tapbacks: a small inline glyph, not a separate boxed row. */
.line,.line.grouped{padding-top:2px;padding-bottom:2px}.line.me+.line.me{margin-top:1px}.line.has-reaction{margin:0}.line .reactions{position:static;display:inline-flex;align-items:baseline;gap:2px;margin:0 0 0 6px;vertical-align:baseline}.line .reaction,.line:not(.me) .reaction,.line.me .reaction{display:inline;min-width:0;height:auto;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none;color:#758595;font-size:10px;font-weight:400;line-height:1}.line .reaction-add{display:none;font-size:10px;line-height:1;padding:0 2px}.line:hover .reaction-add,.line:focus-within .reaction-add{display:inline}.line .react-button{font-size:10px;color:#a4aeb6}.line .message-header{margin-bottom:0}.line.grouped .message-header{display:none}.day{border:0;background:transparent;color:#89939e;font-size:9px;padding:0 4px;margin:13px auto 8px}.reply-context{margin:1px 0 3px}.line.me{background:#f0f5f7}.line.me:hover{background:#eaf1f4}
.line .reaction,.line:not(.me) .reaction,.line.me .reaction{color:#627385}

/* A single quiet visibility control for received images. */
.image-attachment{display:block}.image-eye{display:inline-grid;place-items:center;border:0;background:transparent;padding:1px 5px;color:var(--accent);font:17px/1 ui-monospace,monospace}.image-eye:hover{color:var(--ink)}.image-attachment .attachment-frame{display:block;width:min(260px,100%);height:160px;margin:3px 0}.image-attachment .attachment-frame[hidden]{display:none}.image-attachment .attachment-frame img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;cursor:zoom-in}.outgoing-preview{width:64px;height:64px;object-fit:cover;border-radius:4px;border:1px solid var(--line)}.pending-file{display:flex;align-items:center;gap:8px;max-height:82px;padding:5px 10px}.pending-file[hidden]{display:none}
.recent-chats{display:none}@media(max-width:660px){.top{gap:9px}.brand{flex:none}.recent-chats:not([hidden]){display:flex;flex:1;min-width:0;align-items:center;gap:3px;overflow-x:auto;scrollbar-width:none}.recent-chats::-webkit-scrollbar{display:none}.recent-tab{max-width:115px;min-width:45px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:0 1 auto;border:0;border-bottom:1px solid transparent;border-radius:0;padding:4px 5px;background:transparent;color:#7a8792;font-size:10px}.recent-tab.active{color:var(--ink);border-bottom-color:var(--accent)}.recent-tab.unread{color:var(--accent);font-weight:700}.top-actions{flex:none;gap:5px}.top-actions .subtle{padding-inline:3px}}

.compose #send,.compose #send[hidden]{display:none!important}.compose textarea{width:100%}

.notification-setting{display:flex;align-items:center;gap:8px;margin-top:9px;cursor:pointer}.notification-note{color:var(--muted);margin-top:4px;max-width:260px}.notification-setting input{accent-color:var(--accent)}

/* Reserve the same action lane in every message so hover never reflows the text. */
.line .message-actions{display:flex;align-items:center;height:18px;gap:3px;margin-top:1px}.line .message-actions .react-button{visibility:visible;opacity:0;pointer-events:none;padding:0 4px;height:18px;line-height:18px;transition:opacity .12s ease}.line:hover .message-actions .react-button,.line:focus-within .message-actions .react-button{opacity:1;pointer-events:auto}.line .reaction-add{visibility:hidden;display:inline;opacity:0;pointer-events:none;width:15px;height:16px}.line:hover .reaction-add,.line:focus-within .reaction-add{visibility:visible;opacity:1;pointer-events:auto}
/* Grouped runs keep their actions in an overlay instead of a blank row per line. */
.line.grouped .message-actions,.line:has(+ .line.grouped) .message-actions{position:absolute;right:6px;bottom:0;height:18px;margin:0;z-index:2;background:var(--surface);border-radius:3px}.line.grouped.me .message-actions,.line.me:has(+ .line.grouped.me) .message-actions{background:var(--me)}.line.grouped,.line:has(+ .line.grouped){padding-bottom:1px}.line.grouped:hover .message-actions,.line:has(+ .line.grouped):hover .message-actions{background:var(--hover)}.line.grouped.me:hover .message-actions,.line.me:has(+ .line.grouped.me):hover .message-actions{background:#eaf1f4}

/* Mixed text and attachment: keep the eye next to the final word. */
.image-attachment{display:inline;vertical-align:baseline}.image-eye{display:inline-flex;vertical-align:middle;padding:0 2px;margin-left:1px}.image-attachment .attachment-frame{display:block}.line .meta:not(.send-state){margin:2px 0 0}.line .message-actions{margin-top:1px}

/* The six native tapback choices, floated above the action lane. */
.line>div:last-child{position:relative}.line .reaction-menu{position:absolute;z-index:20;left:0;bottom:20px;display:flex;align-items:center;gap:2px;margin:0;padding:4px;background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:0 4px 15px #17273725;max-width:min(240px,calc(100vw - 28px))}.line .reaction-choice{font-family:system-ui,sans-serif;font-size:16px;line-height:1.2;min-width:30px;height:27px;border:0;border-radius:14px;background:transparent;padding:1px 3px}.line .reaction-choice:hover,.line .reaction-choice:focus-visible{background:var(--hover)}

/* Tapbacks read as tiny metadata beside the time, not a new content row. */
.message-header .reactions{display:inline-flex;flex:none;align-items:center;gap:2px;margin:0 0 0 3px;vertical-align:baseline}.message-header .reaction{font-size:10px}.line.grouped .reaction-anchor{position:relative}.line.grouped .reaction-anchor>.reactions{position:absolute;right:0;top:0;margin:0;background:var(--surface);padding-left:3px}.line.grouped.me .reaction-anchor>.reactions{background:var(--me)}.line.grouped:hover .reaction-anchor>.reactions{background:var(--hover)}.line.grouped.me:hover .reaction-anchor>.reactions{background:#eaf1f4}.line .reaction-menu{bottom:22px}

/* Keep recent chats centered in the top bar and scroll its ten choices. */
@media(max-width:660px){.top{gap:8px}.brand{margin-right:5px}.recent-chats:not([hidden]){justify-content:flex-start;margin:0 auto;gap:5px}.recent-tab{flex:0 0 auto}.top-actions{margin-left:2px}}
.pending-file{overflow-x:auto;overflow-y:hidden;scrollbar-width:none;max-height:82px;min-width:0}.pending-file::-webkit-scrollbar{display:none}.pending-item{display:inline-flex;align-items:center;flex:none;gap:5px;max-width:125px;font-size:10px}.pending-item .outgoing-preview{flex:none}.pending-item .subtle{font-size:14px;padding:0 2px}
.pending-file{justify-content:flex-start}.pending-item{gap:4px;min-width:0;max-width:110px}.pending-item .outgoing-preview{width:56px;height:56px}.pending-item .subtle{flex:none}.pending-item>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

@media(max-width:660px){.top{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px}.top .brand{margin-right:4px}.top .recent-chats:not([hidden]){width:100%;justify-content:flex-start;margin:0;min-width:0}.top-actions{margin-left:0}}

.line.receipt-followup{padding-top:0}.line.receipt-followup .message-header{height:12px;line-height:12px;margin:0 0 1px}.line.receipt-followup .message-stamp{font-size:9px}.line.receipt-followup.me{margin-top:0}

/* Keep metadata inside the message grid even for long text and tapbacks. */
.messages{overflow-x:clip}.line{min-width:0}.line>div:last-child{min-width:0;overflow-wrap:anywhere}.message-header{min-width:0;max-width:100%;gap:4px}.message-header .who{flex:1 1 auto;min-width:0}.message-stamp{flex:none;margin-left:0;white-space:nowrap}.message-header .reactions{order:1;flex:none;margin-left:2px}.message-header .message-stamp{order:2;margin-left:0}.line.grouped .reaction-anchor>.reactions{right:4px;max-width:calc(100% - 8px)}.line .reaction-anchor{min-width:0;max-width:100%;overflow-wrap:anywhere}.line .reaction-menu{max-width:min(240px,calc(100vw - 28px));overflow:visible}

/* Reactions precede the timestamp; never float metadata beyond the pane. */
.message-header .reactions{order:1;margin-left:auto;min-width:0;max-width:32%;overflow:hidden;white-space:nowrap;justify-content:flex-end}.message-header .message-stamp{order:2;margin-left:2px}.line.grouped .reaction-anchor>.reactions{right:4px;max-width:34px;overflow:hidden}.line.grouped .reaction-anchor>.reactions .reaction-add{display:none}.line .message-header .reaction-add{display:none}
/* Incoming is lightly tinted; outgoing keeps the cool blue-gray. */
.line:not(.me){background:#f7f8fa}.line:not(.me):hover{background:#f0f3f5}.line:not(.me) .message-actions,.line.grouped:not(.me) .reaction-anchor>.reactions{background:#f7f8fa}.line:not(.me):hover .message-actions,.line.grouped:not(.me):hover .reaction-anchor>.reactions{background:#f0f3f5}

/* Reacted grouped messages get a real compact metadata line, never an absolute bubble overlay. */
.line.grouped.has-reaction .message-header{display:flex;height:12px;line-height:12px;margin:0 0 1px;justify-content:flex-end}.line.grouped.has-reaction .message-header .reactions{position:static;display:inline-flex;max-width:34%;padding:0;margin:0 3px 0 auto;overflow:visible;background:transparent}.line.grouped.has-reaction .message-header .message-stamp{order:2;white-space:nowrap}.line.grouped.has-reaction .reaction-anchor{position:relative}.line.grouped.has-reaction .message-header .reaction{line-height:1}.line.grouped.has-reaction .reaction-anchor>.reactions{position:static;background:transparent}
/* Never paint an action overlay across adjacent compact bubbles. */
.line.grouped .message-actions,.line:has(+ .line.grouped) .message-actions,.line.grouped.me .message-actions,.line.me:has(+ .line.grouped.me) .message-actions,.line.grouped:hover .message-actions,.line:has(+ .line.grouped):hover .message-actions,.line.grouped.me:hover .message-actions,.line.me:has(+ .line.grouped.me):hover .message-actions{background:transparent}
.line .reaction-menu{left:auto;right:0}
.line.grouped .message-actions,.line:has(+ .line.grouped) .message-actions{display:none}.line.grouped:hover .message-actions,.line.grouped:focus-within .message-actions,.line:has(+ .line.grouped):hover .message-actions,.line:has(+ .line.grouped):focus-within .message-actions{display:flex}

/* Stable per-sender muted fills in group chats; direct conversations remain neutral. */
.line.group-tone-0:not(.me){background:#f4f5f9}.line.group-tone-1:not(.me){background:#f1f6f3}.line.group-tone-2:not(.me){background:#f7f4f0}.line.group-tone-3:not(.me){background:#f2f5f7}
.line.group-tone-0:not(.me) .who{color:#626a8a}.line.group-tone-1:not(.me) .who{color:#53776a}.line.group-tone-2:not(.me) .who{color:#8a715b}.line.group-tone-3:not(.me) .who{color:#536f82}
.line.group-tone-0:not(.me):hover{background:#ebedf5}.line.group-tone-1:not(.me):hover{background:#e8f0eb}.line.group-tone-2:not(.me):hover{background:#f2ece5}.line.group-tone-3:not(.me):hover{background:#e9eff3}
.line.group-tone-0:not(.me) .message-actions,.line.group-tone-1:not(.me) .message-actions,.line.group-tone-2:not(.me) .message-actions,.line.group-tone-3:not(.me) .message-actions{background:transparent}

/* Back to white incoming bubbles. Group sender labels remain muted, but no fills. */
.line:not(.me),.line:not(.me):hover,.line.group-tone-0:not(.me),.line.group-tone-1:not(.me),.line.group-tone-2:not(.me),.line.group-tone-3:not(.me),.line.group-tone-0:not(.me):hover,.line.group-tone-1:not(.me):hover,.line.group-tone-2:not(.me):hover,.line.group-tone-3:not(.me):hover{background:#fff}
/* Actions share the right-side metadata, immediately before reaction and time. */
.line .message-header{position:relative}.line .message-header .message-actions{position:static;display:none;flex:none;align-items:center;height:12px;margin:0 2px 0 auto;padding:0;background:transparent;z-index:2}.line:hover .message-header .message-actions,.line:focus-within .message-header .message-actions{display:inline-flex}.line .message-header .message-actions .react-button{opacity:1;pointer-events:auto;visibility:visible;height:14px;line-height:14px;padding:0 2px;margin:0}.line .message-header .reactions{margin-left:0}.line.grouped.has-reaction .message-header .reactions{margin-left:0}.line.grouped.has-reaction:not(:hover):not(:focus-within) .message-header .reactions{margin-left:auto}
/* Grouped rows without a metadata header use a small overlay at top right, only on hover. */
.line.grouped:not(.has-reaction)>.message-header{display:none}.line.grouped:not(.has-reaction) .message-actions{position:absolute;right:6px;top:0;bottom:auto;display:none;height:16px;margin:0;background:#fff;z-index:2}.line.grouped:not(.has-reaction):hover .message-actions,.line.grouped:not(.has-reaction):focus-within .message-actions{display:flex}.line.grouped:not(.has-reaction) .message-actions .react-button{opacity:1;pointer-events:auto;visibility:visible}
/* No invisible action lane beneath a message. */
.line:not(.grouped) .message-actions{margin-top:0}.line:not(.grouped):not(:has(.message-header)) .message-actions{display:none}
/* 1:1 is white; groups retain sender-specific muted fills. */
.line.group-tone-0:not(.me),.line.group-tone-0:not(.me) .message-actions{background:#f4f5f9}.line.group-tone-1:not(.me),.line.group-tone-1:not(.me) .message-actions{background:#f1f6f3}.line.group-tone-2:not(.me),.line.group-tone-2:not(.me) .message-actions{background:#f7f4f0}.line.group-tone-3:not(.me),.line.group-tone-3:not(.me) .message-actions{background:#f2f5f7}
.line.group-tone-0:not(.me):hover{background:#ebedf5}.line.group-tone-1:not(.me):hover{background:#e8f0eb}.line.group-tone-2:not(.me):hover{background:#f2ece5}.line.group-tone-3:not(.me):hover{background:#e9eff3}
.line.group-tone-0:not(.me):hover .message-actions{background:#ebedf5}.line.group-tone-1:not(.me):hover .message-actions{background:#e8f0eb}.line.group-tone-2:not(.me):hover .message-actions{background:#f2ece5}.line.group-tone-3:not(.me):hover .message-actions{background:#e9eff3}
.line .message-header .message-actions,.line.group-tone-0:not(.me) .message-header .message-actions,.line.group-tone-1:not(.me) .message-header .message-actions,.line.group-tone-2:not(.me) .message-header .message-actions,.line.group-tone-3:not(.me) .message-header .message-actions{background:transparent}
/* A following grouped row must not pull the previous row's controls over its metadata. */
.line:has(+ .line.grouped) .message-header .message-actions{position:static!important;right:auto!important;top:auto!important;bottom:auto!important;display:none;height:12px;margin:0 2px 0 auto;background:transparent!important}
.line:has(+ .line.grouped):hover .message-header .message-actions,.line:has(+ .line.grouped):focus-within .message-header .message-actions{display:inline-flex}
.line.grouped:not(.has-reaction) .message-actions{position:absolute!important;top:0!important;bottom:auto!important;right:6px!important;display:none;background:transparent!important}
.line.grouped:not(.has-reaction):hover .message-actions,.line.grouped:not(.has-reaction):focus-within .message-actions{display:flex}

/* Only outgoing messages are filled. Eight quiet name accents distinguish group senders. */
.line:not(.me),.line:not(.me):hover,.line.group-tone-0:not(.me),.line.group-tone-1:not(.me),.line.group-tone-2:not(.me),.line.group-tone-3:not(.me),.line.group-tone-0:not(.me):hover,.line.group-tone-1:not(.me):hover,.line.group-tone-2:not(.me):hover,.line.group-tone-3:not(.me):hover{background:#fff}
.line.group-tone-4:not(.me) .who{color:#825e79}.line.group-tone-5:not(.me) .who{color:#6f6c48}.line.group-tone-6:not(.me) .who{color:#856354}.line.group-tone-7:not(.me) .who{color:#4f7582}
.line.group-tone-0:not(.me) .message-actions,.line.group-tone-1:not(.me) .message-actions,.line.group-tone-2:not(.me) .message-actions,.line.group-tone-3:not(.me) .message-actions{background:transparent}
/* A grouped tapback is in the message's first line, not a separate height-adding lane. */
.line.grouped.has-reaction>div:last-child{display:flow-root}.line.grouped.has-reaction .message-header{float:right;width:auto;max-width:75%;height:19px;min-height:19px;line-height:19px;margin:0 0 0 8px;align-items:center;justify-content:flex-end}.line.grouped.has-reaction .message-header .reactions{margin-left:0}.line.grouped.has-reaction .message-header .message-stamp{line-height:19px}.line.grouped.has-reaction .body{display:inline}

/* Give a newly named bubble a breath, but keep continuations tightly grouped. */
.line:not(.grouped){margin-top:4px}.line.grouped{margin-top:0}.line.me+.line.me:not(.grouped){margin-top:4px}
/* A continuing last message carries its receipt in the first text line, not above it. */
.line.grouped.receipt-followup>div:last-child{display:flow-root}.line.grouped.receipt-followup .message-header{float:right;display:flex;width:auto;max-width:78%;height:19px;line-height:19px;margin:0 0 0 8px;align-items:center;justify-content:flex-end}.line.grouped.receipt-followup .message-stamp{line-height:19px}.line.grouped.receipt-followup .body{display:inline}
/* Return quiet sender fills to groups, while direct incoming stays white. */
.line.group-tone-0:not(.me){background:#f4f5f9}.line.group-tone-1:not(.me){background:#f1f6f3}.line.group-tone-2:not(.me){background:#f7f4f0}.line.group-tone-3:not(.me){background:#f2f5f7}.line.group-tone-4:not(.me){background:#f8f2f6}.line.group-tone-5:not(.me){background:#f6f6ee}.line.group-tone-6:not(.me){background:#f8f4f1}.line.group-tone-7:not(.me){background:#f0f6f7}
/* Hover darkens every tinted bubble instead of washing it out. */
.line.group-tone-0:not(.me):hover{background:#ebedf5}.line.group-tone-1:not(.me):hover{background:#e8f0eb}.line.group-tone-2:not(.me):hover{background:#f2ece5}.line.group-tone-3:not(.me):hover{background:#e9eff3}
.line.group-tone-4:not(.me):hover{background:#f1e9ee}.line.group-tone-5:not(.me):hover{background:#ececde}.line.group-tone-6:not(.me):hover{background:#f0e9e4}.line.group-tone-7:not(.me):hover{background:#e5f0f1}
.line:not(.me):not([class*="group-tone-"]):hover{background:#f5f6f7}
/* Hover actions inherit the bubble's own fill, never a separate gray chip. */
.line .message-actions,.line:hover .message-actions,.line:focus-within .message-actions,.line.grouped .message-actions,.line.grouped:hover .message-actions,.line.grouped:focus-within .message-actions,.line.me .message-actions,.line.me:hover .message-actions,.line.me:focus-within .message-actions,.line:not(.me) .message-actions,.line:not(.me):hover .message-actions,.line:not(.me):focus-within .message-actions{background:transparent!important;box-shadow:none!important}
.line .message-actions .react-button,.line .message-actions .react-button:hover,.line .message-actions .react-button:focus-visible{background:transparent!important;box-shadow:none!important}
/* Outgoing rows darken too, regardless of grouped state. */
.line.me:hover,.line.me.grouped:hover{background:#dce8ed}

/* Rich links are one clickable item. Hidden Apple payload files are never downloads. */
.message-link{color:inherit;text-decoration:underline;overflow-wrap:anywhere}
.rich-link{display:flex;flex-direction:column;gap:5px;max-width:360px;margin-top:4px;padding:12px 14px;border:1px solid currentColor;border-radius:10px;color:inherit;text-decoration:none;overflow-wrap:anywhere;background:rgba(127,127,127,.06)}
.rich-link:hover{background:rgba(127,127,127,.12)}
.rich-link-domain{font-weight:600;font-size:13px}.rich-link-url{font-size:12px;opacity:.8}.rich-link-open{font-size:12px;margin-top:3px;text-decoration:underline}

/* Native URL-balloon artwork is one clickable card, never a second URL row. */
.rich-link{padding:0;gap:0;overflow:hidden;max-width:360px;width:100%;border:1px solid var(--line,#ddd);background:var(--panel,rgba(127,127,127,.06))}
.rich-link-image{display:block;width:100%;height:auto;max-height:420px;object-fit:contain;background:transparent}
.rich-link-domain{display:block;padding:10px 12px;font-size:12px;font-weight:500;color:inherit}

/* Preview art is opt-in; link navigation stays separate from the toggle. */
.rich-link-card{display:flex;flex-direction:column;max-width:360px;width:100%;margin-top:4px;border:1px solid var(--line,#ddd);border-radius:10px;overflow:hidden;background:var(--panel,rgba(127,127,127,.06))}
.rich-link-card .rich-link{border:0;border-radius:0;margin-top:0}
.rich-link-image[hidden]{display:none}
.rich-link-toggle{align-self:flex-start;border:0;border-top:1px solid var(--line,#ddd);border-radius:0;background:transparent;color:inherit;font:inherit;font-size:12px;padding:8px 12px;text-decoration:underline;cursor:pointer;width:100%;text-align:left}
.rich-link-toggle:hover{background:rgba(127,127,127,.08)}
