.message-meta{flex-wrap:wrap;gap:6px 10px}
.message-meta .message-author{font-weight:500;color:inherit}
.guest-chat-page{height:var(--guest-height,100dvh)}
.guest-chat-page .guest-topbar{padding-top:max(12px,env(safe-area-inset-top))}
.guest-chat-page .channel-compose-input textarea{resize:none}
.chat-invite-trigger:focus-visible,.composer-attach:focus-visible,.chat-code button:focus-visible,.chat-file-draft button:focus-visible{outline:2px solid #087f8c;outline-offset:3px}
.guest-chat-page .conversation-stream,.invite-panel,.guest-api-details{overscroll-behavior:contain}
.agent-label{font-size:14px;line-height:1.5;padding:1px 6px;border-radius:4px;background:#dcebef;color:#246877}
.chat-message-text{overflow-wrap:anywhere;line-height:1.75;min-width:0}
.chat-message-text:empty{display:none}.chat-message-text h4{font-size:16px;margin:14px 0 6px;font-weight:500}.chat-line{min-height:1em;white-space:pre-wrap}.chat-bullet{position:relative;padding-left:18px;white-space:pre-wrap}.chat-bullet::before{content:'•';position:absolute;left:2px}.chat-message-text code{font-family:ui-monospace,Consolas,monospace;font-size:.92em;white-space:break-spaces}.chat-line code{background:#0001;border-radius:4px;padding:1px 4px}.chat-code{margin-block:12px;border:1px solid #ffffff36;border-radius:7px;overflow:hidden;background:#111e25;color:#edf5f8}.chat-code header{display:flex;justify-content:space-between;gap:12px;padding:8px 12px;background:#24343d;font-size:14px}.chat-code header button{background:none;color:inherit;border:0;min-height:30px;padding:3px 8px;cursor:pointer}.chat-code pre{max-width:100%;overflow:auto;padding:12px;margin:0;text-align:left}.chat-code code{white-space:pre}.chat-file,.chat-file.deleted{display:flex;align-items:center;gap:12px;padding:12px;margin-top:12px;max-width:100%;background:#ffffff16;border:1px solid currentColor;border-radius:7px;color:inherit;text-decoration:none;overflow-wrap:anywhere}.chat-file-symbol{font-size:24px;flex-shrink:0}.chat-file-info{display:grid;gap:3px;min-width:0}.chat-file strong{font-weight:500}.chat-file small{display:block;opacity:.75}.chat-file.deleted{opacity:.65;border-style:dashed}.chat-image{margin:12px 0 0;max-width:440px}.chat-image button{border:0;background:none;padding:0;cursor:zoom-in;display:block;max-width:100%}.chat-image img{display:block;width:auto;max-width:100%;max-height:260px;object-fit:contain;border-radius:6px}.chat-image figcaption{display:flex;flex-wrap:wrap;gap:5px 10px;margin-top:6px;font-size:14px;overflow-wrap:anywhere}.chat-image figcaption a{color:inherit}.chat-file-drafts{display:grid;gap:6px;padding:0 12px}.chat-file-drafts:not(:empty){padding-bottom:10px}.chat-file-draft{display:flex;align-items:center;gap:8px;padding:8px 10px;background:#edf4f5;border-radius:5px;color:#273d46;font-size:14px}.chat-file-draft span{flex:1;min-width:0;overflow-wrap:anywhere}.chat-file-draft button{border:0;background:none;cursor:pointer;min-width:32px;min-height:32px;color:inherit}.composer-left-actions{display:flex;align-items:center;gap:4px}.composer-attach{width:36px;min-height:36px;border:0!important;background:none!important;box-shadow:none!important}.agent-roster{display:flex;gap:8px;flex-wrap:wrap;padding:10px clamp(14px,3vw,32px);background:#f7fafb;border-bottom:1px solid #e0e7ea;font-size:14px;max-height:100px;overflow:auto}.agent-person{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.agent-person strong{font-weight:500}.agent-person>span{color:#71838c}.agent-person i{width:7px;height:7px;border-radius:50%;background:#a4b1b7}.agent-person.online i{background:#12876a}.chat-image-viewer{width:min(1000px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:16px;border:0;border-radius:10px}.chat-image-viewer::backdrop{background:#101d26c9}.chat-image-viewer header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:12px}.chat-image-viewer>img{max-width:100%;max-height:calc(100dvh - 160px);object-fit:contain;display:block;margin:auto auto 16px}.invite-panel{display:grid;gap:20px;padding:20px;min-width:0}.invite-panel form{display:grid;gap:12px}.invite-links{display:grid;gap:16px}.invite-row{display:grid;gap:8px;padding-bottom:16px;border-bottom:1px solid var(--line,#d8dee1)}.invite-row:last-child{border-bottom:0}.invite-row input{min-width:0;width:100%;font-size:14px}.invite-row .button-row{flex-wrap:wrap}.invite-row small{color:var(--muted,#677782)}.invite-panel .invite-feedback{margin:0}.invite-member{display:flex;align-items:center;justify-content:space-between;gap:8px}.storage-summary{display:grid;gap:10px}.storage-summary meter{width:100%;height:10px}.guest-chat-page{height:100dvh;overflow:hidden;background:#ecf2f4}.guest-chat-page #guest-chat-root{height:100%;display:flex;flex-direction:column}.guest-connecting{margin:auto;padding:32px;text-align:center}.guest-topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 24px;background:#fff;border-bottom:1px solid #d8e0e4}.guest-topbar h1{font-size:18px;margin:0}.guest-topbar p{font-size:14px;margin:4px 0 0;color:#687c86}.guest-topbar .button{white-space:nowrap}.guest-chat-page .conversation-panel{flex:1;min-height:0;display:flex;flex-direction:column;margin:0;border:0;border-radius:0}.guest-chat-page .conversation-stream{flex:1;min-height:0;overflow:auto;padding:24px clamp(14px,5vw,80px)}.guest-chat-page .channel-composer{flex-shrink:0}.guest-chat-page .message-row{margin-bottom:16px}.guest-chat-page .message-meta{display:flex;font-size:14px;margin-bottom:8px}.guest-chat-page .own-message .message-bubble{background:#17262f;color:#f3f8fa}.guest-chat-page .message-bubble{max-width:min(760px,calc(100vw - 80px));padding:14px 16px}.guest-chat-page .guest-feedback{margin:0;padding:8px 20px;background:#fff2dc;color:#6e4a05;font-size:14px}.guest-chat-page .guest-feedback:empty{display:none}.guest-api-details{max-width:760px;max-height:85dvh;overflow:auto;padding:24px;border:0;border-radius:10px}.guest-api-details pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#eef3f5;padding:14px}.guest-api-details::backdrop{background:#0008}
@media(max-width:767px){.guest-topbar{padding:12px 14px;gap:8px}.guest-topbar h1{font-size:16px}.guest-topbar p{max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.guest-chat-page .channel-composer{padding:10px 10px max(10px,env(safe-area-inset-bottom));display:block}.guest-chat-page .channel-compose-input textarea{min-height:64px;width:100%}.guest-chat-page .channel-composer .composer-bottom-actions{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;background:#fff}.guest-chat-page .channel-compose-input{border-radius:8px}.guest-chat-page .composer-attach{width:40px;min-height:40px}.guest-chat-page .message-bubble{max-width:calc(100vw - 72px)}.guest-chat-page .conversation-stream{padding:16px 10px}.chat-image img{max-height:220px}.invite-panel{padding:16px}.chat-invite-trigger span{display:none}.chat-invite-trigger{padding:8px;min-width:36px}.agent-roster{max-height:78px}}

.guest-chat-page .channel-composer{display:block}.guest-chat-page .channel-compose-input textarea{width:100%;min-height:64px;max-height:220px;resize:vertical}.guest-chat-page .composer-bottom-actions{display:flex;align-items:center;justify-content:space-between;padding:8px 12px}.guest-chat-page .channel-compose-input>.field>span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}

.guest-chat-page{height:var(--guest-height,100dvh)}
.chat-image img{height:auto}

/* Conversation layout: identity, message and timestamp have separate roles. */
.agent-chat-layout .conversation-title p { display:none; }
.agent-chat-layout .conversation-header { min-height:72px; }
.agent-chat-layout .agent-roster { padding:9px 24px; gap:6px 18px; background:#fff; border-bottom:1px solid #e8edef; }
.agent-chat-layout .agent-person { gap:5px; }
.agent-chat-layout .agent-person>span { color:#667980; }
.agent-chat-layout .conversation-stream { background:#f3f6f7; padding:20px 28px 24px; }
.agent-chat-layout .chat-feed, .agent-chat-layout #guest-messages { display:block; width:100%; margin-inline:auto; }
.agent-chat-layout .chat-day-divider { display:flex; align-items:center; justify-content:center; gap:16px; max-width:var(--chat-content-width); margin:8px auto 24px; color:#64747b; font-size:14px; }
.agent-chat-layout .chat-day-divider::before, .agent-chat-layout .chat-day-divider::after { content:''; flex:1; height:1px; background:#dce4e7; }
.agent-chat-layout { --chat-content-width:1040px; }
.agent-chat-layout .chat-message.message-row { display:flex; flex-direction:row; align-items:flex-start; gap:10px; width:100%; max-width:var(--chat-content-width); margin:20px auto 0; min-height:0; }
.agent-chat-layout .message-stack { display:flex; flex-direction:column; align-items:flex-start; min-width:0; max-width:min(680px,calc(100% - 94px)); }
.agent-chat-layout .chat-message .message-avatar { display:grid; place-items:center; flex:0 0 32px; width:32px; height:32px; margin-top:27px; background:#e0ecef; color:#39717c; border:0; border-radius:50%; }
.agent-chat-layout .message-avatar svg { width:18px; height:18px; }
.agent-chat-layout .chat-message .message-meta { justify-content:flex-start; align-items:center; gap:7px; margin:0 0 6px 2px; color:#344b54; line-height:1.4; font-size:14px; }
.agent-chat-layout .message-meta .agent-label { background:transparent; padding:0; font-size:14px; color:#54757f; }
.agent-chat-layout .chat-message .message-bubble { width:fit-content; max-width:100%; padding:11px 15px; background:#fff; color:#23363e; border:1px solid #e3e9eb; border-radius:3px 14px 14px 14px; box-shadow:none; text-align:left; }
.agent-chat-layout .chat-message.own-message { justify-content:flex-end; }
.agent-chat-layout .own-message .message-stack { align-items:flex-end; max-width:min(680px,calc(100% - 52px)); }
.agent-chat-layout .own-message .message-meta { display:none; }
.agent-chat-layout .chat-message.own-message .message-bubble { background:#203f48; border-color:#203f48; color:#fff; border-radius:14px 3px 14px 14px; }
.agent-chat-layout .chat-message .message-time { display:block; color:#63777f; font-size:14px; line-height:1.4; margin:5px 2px 0; font-variant-numeric:tabular-nums; }
.agent-chat-layout .chat-message .chat-message-text { font-size:16px; font-weight:400; line-height:1.6; text-align:left; }
.agent-chat-layout .chat-line { min-height:0; }
.agent-chat-layout .chat-message .chat-code { margin:10px 0 0; border:0; background:#172c34; border-radius:7px; }
.agent-chat-layout .chat-code:first-child { margin-top:0; }
.agent-chat-layout .chat-code header { padding:5px 12px; background:#29404a; }
.agent-chat-layout .chat-code pre { padding:12px; }
.agent-chat-layout .chat-code code { font-size:14px; }
.agent-chat-layout .chat-message.message-continuation { margin-top:7px; }
.agent-chat-layout .message-continuation .message-meta { display:none; }
.agent-chat-layout .message-continuation .message-avatar { visibility:hidden; margin-top:0; }
.agent-chat-layout .chat-file { border:1px solid #dae5e8; background:#f4f8f9; color:#294751; padding:10px 12px; margin-top:10px; }
.agent-chat-layout .chat-file:first-child { margin-top:0; }
.agent-chat-layout .own-message .chat-file { background:#ffffff12; border-color:#ffffff30; color:#fff; }
.agent-chat-layout .chat-image { margin-top:8px; }
.agent-chat-layout .channel-composer { display:block; padding:10px 24px max(10px,env(safe-area-inset-bottom)); border-top:1px solid #e3eaed; }
.agent-chat-layout .channel-compose-input { width:100%; max-width:var(--chat-content-width); margin-inline:auto; border:1px solid #d7e1e5; border-radius:12px; overflow:visible; }
.agent-chat-layout .channel-compose-input:focus-within { border-color:#d7e1e5; box-shadow:none; }
.agent-chat-layout .channel-compose-input>.field { margin:0; }
.agent-chat-layout .channel-compose-input textarea { display:block; width:100%; min-height:44px; height:44px; max-height:120px; padding:9px 14px; font-size:16px; font-weight:400; line-height:1.5; background:transparent; resize:none; overflow-y:auto; }
.agent-chat-layout .channel-compose-input .composer-bottom-actions { display:flex; align-items:center; justify-content:space-between; padding:0 7px 6px; border-radius:0 0 12px 12px; }
.agent-chat-layout .composer-bottom-actions .composer-more, .agent-chat-layout .composer-bottom-actions .composer-attach { width:40px; height:40px; min-height:40px; padding:10px; }
.agent-chat-layout .composer-bottom-actions button[type=submit] { width:auto; min-width:94px; height:36px; min-height:36px; padding:0 13px; border-radius:8px; font-size:14px; background:#203f48; }
.agent-chat-layout .composer-bottom-actions button[type=submit] svg { width:17px; height:17px; }
.agent-chat-layout .chat-file-drafts:not(:empty) { padding:4px 12px 10px; }
@media(max-width:767px) {
  .agent-chat-layout .conversation-header { min-height:62px; }
  .agent-chat-layout .agent-roster { padding:8px 14px; max-height:68px; gap:5px 14px; }
  .agent-chat-layout .conversation-stream { padding:14px 12px 18px!important; }
  .agent-chat-layout .chat-message.message-row { gap:8px; margin-top:17px; }
  .agent-chat-layout .chat-message .message-avatar { flex-basis:28px; width:28px; height:28px; }
  .agent-chat-layout .message-stack { max-width:calc(100% - 74px); }
  .agent-chat-layout .own-message .message-stack { max-width:calc(100% - 40px); }
  .agent-chat-layout .chat-message .message-bubble { padding:10px 12px; }
  .agent-chat-layout .chat-message.message-continuation { margin-top:6px; }
  .agent-chat-layout .channel-composer { padding:8px 10px max(8px,env(safe-area-inset-bottom)); }
  .agent-chat-layout .channel-compose-input textarea { padding:10px 12px; min-height:44px; }
  .agent-chat-layout .composer-bottom-actions button[type=submit] { min-width:84px; padding:0 10px; }
}

.agent-chat-layout .chat-day-divider+.chat-message { margin-top:0; }
.agent-chat-layout .own-message .message-time { align-self:flex-end; }

.agent-chat-layout .chat-message.message-selected .message-bubble { box-shadow:none; }

/* Compact send control; the transparent hit area remains comfortable to tap. */
body .channel-composer .composer-bottom-actions .send-icon-button,
body .outgoing-composer .composer-bottom-actions .send-icon-button,
.agent-chat-layout .channel-compose-input .composer-bottom-actions button[type=submit] {
  position:relative; min-width:72px; height:34px; min-height:34px;
  padding:0 10px; gap:6px; font-size:14px; border-radius:7px;
}
.agent-chat-layout .channel-compose-input .composer-bottom-actions button[type=submit]::before {
  content:''; position:absolute; inset:-5px 0;
}
.agent-chat-layout .channel-compose-input .composer-bottom-actions button[type=submit] svg { width:16px; height:16px; }

/* One room-settings dialog with separate settings and invitation panels. */
.topic-edit-dialog .room-settings-content { display:block; padding:0; }
.room-settings-tabs { position:sticky; top:0; z-index:2; display:flex; width:100%; background:#fff; border-bottom:1px solid #e3eaed; }
.room-settings-tabs [role=tab] { flex:1; position:relative; padding:14px 12px; min-height:48px; border:0; background:transparent; color:#63777f; font:inherit; font-size:15px; cursor:pointer; }
.room-settings-tabs [role=tab][aria-selected=true] { color:#203f48; font-weight:500; }
.room-settings-tabs [role=tab][aria-selected=true] { background:#edf4f5; }
.room-settings-tabs [role=tab]:hover { background:#f6f9fa; }
.room-settings-tabs [role=tab]:focus-visible { outline:2px solid #087e8b; outline-offset:-4px; }
.room-settings-content>[role=tabpanel] { padding:22px 24px 24px; min-width:0; }
.room-settings-content>[role=tabpanel][hidden] { display:none!important; }
.room-settings-content [role=tabpanel] > .invite-panel { padding:0; gap:22px; }
.room-settings-content .invite-panel form { gap:16px; }
.room-settings-content .invite-links { gap:20px; }
.room-settings-content .invite-row { gap:12px; }
.room-settings-content [role=tabpanel].invite-panel { gap:14px; }
.room-settings-content .invite-members-section h3 { margin:0 0 8px; }
.room-settings-content .invite-members-section p { margin:0; }
.room-settings-content [data-refresh-members] { justify-self:start; }
.room-settings-content .members-feedback:empty { display:none; }
.room-settings-content .invite-panel>p { margin:0; color:#586c75; font-size:14px; line-height:1.7; }
.room-settings-content .invite-row .button-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 36px; align-items:center; gap:8px; }
.room-settings-content .invite-row .button-row .button { min-width:0; padding-inline:8px; }
.room-settings-content .invite-row .button-row .icon-button { width:36px; height:40px; min-height:40px; border:0; background:transparent; }
.room-settings-content .invite-row input { font-size:14px; }
@media(max-width:767px) {
 .room-settings-content>[role=tabpanel] { padding:18px 16px 20px; }
 .room-settings-tabs [role=tab] { min-height:46px; padding:12px 8px; font-size:14px; }
}

/* Long content wraps inside the conversation rather than creating a sideways track. */
.agent-chat-layout .chat-code pre, .agent-chat-layout .chat-code code {
 white-space:pre-wrap; overflow-wrap:anywhere; word-break:break-word;
}
.agent-chat-layout .chat-code pre { overflow:visible; }
.agent-chat-layout .message-link { min-width:0; max-width:100%; word-break:break-word; }
.agent-chat-layout .chat-file-info { overflow-wrap:anywhere; }
/* Keep controls and message metadata from starting text selection or native dragging. */
:is(#app-root,.app-mobile-header,.chat-sidebar,.mobile-chat-drawer,.guest-chat-page,.chat-message-menu)
:is(button,a,summary,[role=button],[role=tab],.message-time,.message-meta,.message-avatar) {
 -webkit-user-select:none; user-select:none; -webkit-user-drag:none; -webkit-tap-highlight-color:transparent;
}
:is(#app-root,.app-mobile-header,.chat-sidebar,.mobile-chat-drawer,.guest-chat-page) :is(button,a) :is(img,svg) {
 -webkit-user-drag:none;
}
.chat-message-menu button:focus { outline:0; box-shadow:none; }

/* Pointer interaction never introduces an outline, ring or changing border. */
body #app-root :is(button,a,summary,input,textarea,select):focus:not(:focus-visible),
body .app-mobile-header :is(button,a):focus:not(:focus-visible),
body .chat-sidebar :is(button,a):focus:not(:focus-visible),
body.guest-chat-page :is(button,a,input,textarea):focus:not(:focus-visible) {
 outline:0!important; box-shadow:none!important;
}
body #app-root .room-settings-tabs [role=tab]:is(:hover,:active,:focus,:focus-visible) {
 outline:0!important; box-shadow:none!important; border:0;
}
body #app-root .room-settings-tabs [role=tab]:focus-visible { background:#dcecef; color:#134f5a; }
body #app-root .agent-chat-layout .chat-message:focus:not(:focus-visible) { outline:0!important; box-shadow:none!important; }
body #app-root .icon-button, body .app-mobile-header .icon-button, body .chat-sidebar .icon-button { border-color:transparent!important; }
body #app-root .button.primary { border-color:transparent!important; }
body #app-root .button.secondary { border-color:#cfd6d9!important; }
body #app-root :is(input,textarea,select):not([aria-invalid=true]) { border-color:#cfd6d9; }
body #app-root :is(input,textarea,select):not([aria-invalid=true]):is(:hover,:focus,:active) { border-color:#cfd6d9; outline:0!important; box-shadow:none!important; }
body #app-root :is(input,select):focus-visible { background:#f0f7f8; }
body #app-root :is(button,a,summary,.chat-message):focus-visible,
body .app-mobile-header :is(button,a):focus-visible,
body .chat-sidebar :is(button,a):focus-visible,
body.guest-chat-page :is(button,a):focus-visible {
 outline:0!important; box-shadow:none!important; background:#dcecef; color:#134f5a;
}
body #app-root .button.primary:focus-visible,
body #app-root .send-icon-button:focus-visible,
body.guest-chat-page .button.primary:focus-visible { background:#315e69; color:#fff; }
body.guest-chat-page .button.primary { border-color:transparent!important; }
body.guest-chat-page .button.secondary { border-color:#cfd6d9!important; }
body.guest-chat-page :is(input,textarea,select):not([aria-invalid=true]) { border-color:#cfd6d9; outline:0!important; box-shadow:none!important; }

.conversation-header:has(#ai-room-manage){display:flex;justify-content:space-between;gap:12px}
#ai-room-manage{flex:none}
.invite-member small{display:block;overflow-wrap:anywhere}
.invite-member>div{min-width:0}
.invite-member>button{flex:none;white-space:nowrap}

.chat-message .message-bubble { position:relative; }
.chat-message-actions { position:absolute; inset-inline-start:100%; bottom:0; padding-inline:3px; display:flex; opacity:0; pointer-events:none; }
.own-message .chat-message-actions { inset-inline-start:auto; inset-inline-end:100%; }
.chat-message .message-bubble:hover .chat-message-actions, .chat-message:focus-within .chat-message-actions { opacity:1; pointer-events:auto; }
.chat-message-actions button, .chat-reply-preview button { display:grid; place-items:center; width:32px; height:32px; padding:0; flex:none; border:0; border-radius:6px; background:none; color:#526870; cursor:pointer; }
.chat-message-actions button:hover, .chat-reply-preview button:hover { background:#e2ebee; }
.chat-message-actions svg { width:17px; height:17px; }
body .agent-chat-layout .chat-message[data-message-id] .message-bubble.is-touch-pressed { background-image:linear-gradient(#80868b26,#80868b26); }
.chat-message-menu { position:fixed; z-index:2000; display:grid; width:124px; padding:4px; background:#fff; border:1px solid #dce5e8; border-radius:9px; box-shadow:0 6px 20px #203f4826; }
.chat-message-menu button { min-height:36px; border:0; border-radius:5px; background:none; color:#23363e; padding:5px 10px; text-align:left; cursor:pointer; }
.chat-message-menu button:hover, .chat-message-menu button:focus-visible { background:#edf3f5; }
.chat-message-menu button:disabled { opacity:.45; cursor:default; }
.chat-message-menu [data-chat-delete] { color:#a92929; }
.chat-quote { margin:0 0 7px; padding:5px 8px; border-inline-start:2px solid currentColor; background:#647e861c; font-size:14px; overflow-wrap:anywhere; }
.chat-quote strong, .chat-quote span { display:block; }
.chat-quote span { opacity:.8; }
.own-message .chat-quote { background:#ffffff20; }
.chat-reply-preview { display:flex; align-items:center; justify-content:space-between; gap:8px; margin:8px 10px 0; color:#294751; }
.chat-reply-preview[hidden] { display:none; }
.chat-reply-preview div { min-width:0; }
.chat-reply-preview span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (hover:none), (pointer:coarse) {
  .chat-message-actions { opacity:1; pointer-events:auto; }
  .chat-message-actions button { width:32px; height:32px; }
  .chat-message .message-bubble { -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
  .agent-chat-layout .message-stack { max-width:calc(100% - 108px); }
  .agent-chat-layout .own-message .message-stack { max-width:calc(100% - 72px); }
}

.new-chat-panels [role=tabpanel]:not([hidden]) { display:grid; gap:16px; min-width:0; }
.new-chat-panels [role=tabpanel] > p { margin:0; }
.chat-quote button[data-chat-jump] { display:block; width:100%; padding:0; border:0; background:none; color:inherit; font:inherit; text-align:start; cursor:pointer; overflow-wrap:anywhere; }
.chat-quote button[data-chat-jump]:hover span { text-decoration:underline; text-underline-offset:2px; }
.chat-quote button[data-chat-jump]:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
.agent-chat-layout .chat-message.chat-quote-target { animation:chat-quote-bounce ease-in-out; animation-duration:800ms!important; }
@keyframes chat-quote-bounce {
  0%, 50%, 100% { transform:translateY(0); }
  21%, 71% { transform:translateY(-9px); }
  36%, 86% { transform:translateY(3px); }
}

.webhook-guide-trigger { justify-self:start; min-height:44px; }
.webhook-guide-dialog .delivery-dialog-content { line-height:1.65; overflow-wrap:anywhere; }
.webhook-guide-dialog .delivery-dialog-content > p, .webhook-guide-dialog dl { margin:0; }
.webhook-guide-dialog dt { font-weight:500; }
.webhook-guide-dialog dt:not(:first-child) { margin-block-start:14px; }
.webhook-guide-dialog dd { margin:4px 0 0; }

#external-webhook-create > .advanced-disclosure { border-inline:1px solid var(--line); min-width:0; }
#external-webhook-create > .advanced-disclosure > summary { padding-inline:14px; }

.new-chat-dialog { max-height:min(784px,calc(100dvh - 20px)); }
body:has(>.chat-sidebar) .new-chat-dialog .recipient-dialog-card { max-height:min(782px,calc(100dvh - 22px)); }
.new-chat-dialog .room-settings-tabs { flex:none; }
.new-chat-dialog .delivery-dialog-content { padding-bottom:28px; scrollbar-gutter:stable; }
.webhook-guide-dialog .delivery-dialog-content { padding-bottom:32px; }
#external-webhook-create .advanced-disclosure > .field-group { min-width:0; margin:0; padding:12px 14px 10px; }
#external-webhook-create .advanced-disclosure > .field-group > legend { padding:0; margin-inline-start:0; }
#external-webhook-create .advanced-disclosure > .field-group:first-of-type { margin-top:14px; }
#external-webhook-create .key-value > input { min-width:0; }
#external-webhook-create .key-value > input:first-child { grid-column:1;grid-row:1; }
#external-webhook-create .key-value > [data-value] { grid-column:2;grid-row:1; }
#external-webhook-create .key-value > .icon-button { grid-column:3;grid-row:1; }
.new-chat-dialog [role=tabpanel] > .button-row { display:flex;justify-content:flex-end; }
.new-chat-dialog [data-connect-received] { white-space:nowrap; }
.storage-files { display:grid; gap:12px; margin-top:22px; }
.storage-files h3 { margin:0; }
.storage-files [data-storage-more] { justify-self:start; }
.storage-file-row { display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--line); }
.storage-file-row > div { flex:1; min-width:0; overflow-wrap:anywhere; }
.storage-file-row img { display:block; width:48px; height:48px; object-fit:cover; border-radius:6px; }
.storage-file-row small { display:block; margin-top:3px; color:var(--muted); }
@media(max-width:480px) {
  #external-webhook-create .key-value { grid-template-columns:minmax(0,1fr) 36px; gap:8px; }
  #external-webhook-create .key-value > [data-value] { grid-column:1;grid-row:2; }
  #external-webhook-create .key-value > .icon-button { grid-column:2;grid-row:1/3;align-self:center; }
}

.agent-chat-layout .chat-message.message-group-before .message-time { display:none; }
.room-chat-with-people { position:relative; }
.room-chat-with-people .room-people-toggle { position:absolute; inset-block-start:10px; inset-inline-end:12px; z-index:4; background:var(--paper,#fff); }
.room-people { position:absolute; inset-block-start:58px; inset-inline-end:12px; z-index:4; width:min(calc(100% - 24px),296px); min-width:0; max-height:min(360px,calc(100% - 70px)); overflow:auto; overscroll-behavior:contain; border:1px solid var(--line); border-radius:12px; padding:12px 14px; background:var(--paper,#fff); box-shadow:0 3px 14px #18232712; }
.room-people > header { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.room-people h2 { font-size:16px; margin:0; }
.room-people-status { margin:8px 0 12px; font-size:14px; color:var(--muted); }
.room-people-list ul { list-style:none; padding:0; margin:0; }
.room-people-list li { display:grid; gap:2px; padding:1px 0; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.room-people-list small { color:var(--muted); }
.room-people > footer { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:10px; padding-top:10px; border-top:1px solid var(--line); }

#guest-chat-root:has(>.guest-connecting) { overflow:auto; padding:max(20px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); }
.guest-connecting.guest-entrance { width:min(100%,420px); padding:clamp(22px,6vw,34px); background:#fff; border:1px solid #dfe7e9; border-radius:16px; box-shadow:0 12px 32px #20363d0e; text-align:start; }
.guest-entrance-brand { display:flex; align-items:center; gap:10px; color:#2e4b54; font-size:15px; font-weight:500; margin-bottom:20px; }
.guest-entrance-brand img { display:block; object-fit:contain; }
.guest-entrance h1 { margin:0; font-size:clamp(23px,5vw,28px); line-height:1.3; letter-spacing:-.035em; }
.guest-entrance-description { margin:9px 0 0; color:#526770; line-height:1.6; overflow-wrap:anywhere; }
.guest-entrance-form { display:grid; gap:12px; margin-top:24px; }
.guest-entrance-form .field { margin:0; gap:7px; }
.guest-entrance-form input { min-height:48px; font-size:16px; }
.guest-entrance-form button { width:100%; min-height:46px; }
.guest-entrance-form input[aria-invalid=true] { border-color:#a93e3e; }
.guest-entrance-feedback { margin:0; color:#a02d2d; font-size:14px; overflow-wrap:anywhere; }
.guest-entrance-feedback:empty { display:none; }
.guest-entrance-home { margin-top:22px; }

.sidebar-room-label { position:fixed; z-index:60; max-width:min(260px,calc(100vw - 90px)); padding:7px 10px; border-radius:6px; background:#203f48; color:#fff; font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; pointer-events:none; }
.storage-files-dialog .storage-files { margin-top:0; }
.storage-files-dialog .storage-feedback:empty { display:none; }
.storage-select, .storage-file-actions { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.storage-select label { display:flex; align-items:center; gap:8px; }
.storage-files-dialog input[type=checkbox] { width:18px; height:18px; flex:none; }
.storage-files-dialog .storage-file-actions { flex:none; }
.storage-files-dialog .storage-file-actions .button { min-height:36px; padding:5px 9px; }
@media(max-width:560px){
  .storage-files-dialog .storage-file-row { flex-wrap:wrap; }
  .storage-files-dialog .storage-file-actions { width:100%; justify-content:flex-end; }
}

.chat-message-text a { color:inherit; text-decoration:underline; text-underline-offset:2px; overflow-wrap:anywhere; }
.chat-link-card { display:block; width:100%; max-width:360px; min-width:0; margin-top:8px; color:inherit; border:1px solid #819ba447; border-radius:8px; overflow:hidden; text-decoration:none; background:#f4f8f9; }
.chat-link-card:hover strong { text-decoration:underline; }
.chat-link-card img { display:block; width:100%; max-height:150px; object-fit:cover; background:#e5edef; }
.chat-link-card > div { padding:8px 10px; display:grid; gap:3px; }
.chat-link-card strong, .chat-link-card p, .chat-link-card small { margin:0; overflow-wrap:anywhere; }
.chat-link-card strong { font-size:15px; }
.chat-link-card p, .chat-link-card small { font-size:13px; opacity:.8; }
.own-message .chat-link-card { background:#8fa7ae15; }

.guest-topbar-identity { display:flex; align-items:center; gap:8px; min-width:0; }
.guest-topbar-identity > img { flex:none; object-fit:contain; }
.guest-topbar-identity > div { min-width:0; }
.guest-topbar-identity h1 { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.guest-topbar-identity p { max-width:100%; }

.guest-connecting.guest-connection-guide { width:min(100%,640px); flex:none; }
.guest-connection-guide > :is(.button,.button-row) { margin:18px 0 4px; }
.guest-connection-guide .button-row { justify-content:flex-start; }
#agent-reply { scroll-margin-block-start:20px; }
.guest-connection-guide > section { margin-top:22px; padding-top:18px; border-top:1px solid #e2eaeb; }
.guest-connection-guide h2 { margin:0 0 8px; font-size:17px; }
.guest-connection-guide ol { padding-inline-start:22px; margin:0; }
.guest-connection-guide li, .guest-connection-guide section p { margin-bottom:9px; line-height:1.55; overflow-wrap:anywhere; }
.guest-connection-guide > .text-link { margin-top:12px; }

.agent-guide-messages p { white-space:pre-wrap; }
.guest-connection-guide pre { white-space:pre-wrap; overflow-wrap:anywhere; }

.chat-task-status { display:block; margin-top:8px; font-weight:500; font-size:13px; }
.room-people-list [data-assign-participant] { justify-self:start; }

.room-people-list li:is(.room-person-compact,.room-person-owner) { grid-template-columns:9px minmax(0,1fr) auto; align-items:center; column-gap:8px; }
.room-people-list li.room-person-compact { border-top:0; }
.room-person-status { display:block; width:8px; height:8px; border-radius:50%; background:#d69b26; }
.room-person-status.active { background:#319365; }
.room-people-list li.room-person-owner { padding-top:16px; }
.room-people-quota { color:var(--muted); }
.room-owner-icon { display:inline-flex; justify-self:center; color:var(--muted); }
.room-owner-icon svg { width:14px; height:14px; }
.room-person-status { justify-self:center; }
.room-people-list button.room-person-name { min-height:28px; padding:0; }
.room-person-name { min-width:0; text-align:start; font-weight:500; overflow-wrap:anywhere; }
.room-person-compact .icon-button { width:30px; min-width:30px; height:30px; min-height:30px; }
.room-person-compact .icon-button svg { width:17px; height:17px; }
.participant-task { padding:10px 0; border-bottom:1px solid var(--line); }
.participant-task summary { display:flex; align-items:center; gap:12px; cursor:pointer; }
.participant-task summary span { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
.participant-task summary small { flex:none; color:var(--muted); }
.participant-task p { margin:8px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.agent-guide-form { display:grid; gap:10px; margin-block:10px; }
.agent-guide-form .field { margin:0; }
.agent-guide-form button { justify-self:start; }
.agent-guide-status-actions { display:flex; flex-wrap:wrap; gap:8px; }
