/* Conversation UI, scoped to Inbox so the business workspaces keep their layout. */
#app .layout.os-layout-v10 .content:has(> .inbox-workspace) { min-height: 0; padding: 10px 12px; }
#app .inbox-workspace {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  gap: 0; margin: 0; height: var(--inbox-available-height, calc(100dvh - 130px)); min-height: 0;
  max-height: none; overflow: hidden; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); box-shadow: var(--shadow-soft); color: var(--text);
}
#app .inbox-workspace > * { min-width: 0; min-height: 0; }
#app .inbox-workspace :is(button, input, select, textarea) { font-family: inherit; }
#app .inbox-workspace button:focus-visible, #app .inbox-workspace summary:focus-visible, #app .inbox-workspace .inbox-attach:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }
#app .inbox-workspace .btn { flex: 0 0 auto; min-height: 32px; height: auto; padding: 6px 10px; font-size: 12px; }
#app .inbox-workspace .btn-icon { width: 32px; height: 32px; padding: 6px; }
#app .inbox-workspace .inbox-channel-rail {
  display: grid; grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
  gap: 0; width: auto; max-width: none; max-height: none; overflow: hidden; padding: 0;
  border: 0; border-right: 1px solid var(--line); border-radius: 0; background: var(--surface-2, #f6f8fc);
}
#app .inbox-workspace .inbox-rail-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 10px; gap: 8px; border: 0; }
#app .inbox-workspace .inbox-rail-head h1 { margin: 0; font-size: 21px; line-height: 1.25; letter-spacing: -.025em; }
#app .inbox-workspace .inbox-rail-head small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
#app .inbox-workspace .inbox-mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; margin: 0 12px 10px; padding: 3px; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; }
#app .inbox-workspace .inbox-mode-switch button { min-height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
#app .inbox-workspace .inbox-mode-switch button[aria-pressed=true] { color: var(--primary-strong); background: var(--primary-soft, #e8eefc); }
#app .inbox-workspace .inbox-search-field { display: flex; align-items: center; gap: 7px; margin: 0 12px 8px; padding: 0 9px; min-height: 34px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
#app .inbox-workspace .inbox-search-field input { width: 100%; min-width: 0; height: 32px; min-height: 32px; border: 0; background: transparent; padding: 0; font-size: 12px; color: var(--text); }
#app .inbox-workspace .inbox-filter-bar { display: flex; flex-wrap: nowrap; gap: 3px; width: auto; margin: 0; overflow-x: auto; scrollbar-width: thin; }
#app .inbox-workspace .inbox-channel-rail > .inbox-filter-bar { padding: 0 10px 9px; border-bottom: 1px solid var(--line); }
#app .inbox-workspace .inbox-filter-bar button { flex: 0 0 auto; min-height: 28px; height: auto; padding: 4px 7px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; }
#app .inbox-workspace .inbox-filter-bar button.active { color: var(--primary-strong); background: var(--primary-soft, #e8eefc); }
#app .inbox-workspace .inbox-channel-list { display: block; overflow-x: hidden; overflow-y: auto; min-height: 0; max-height: none; padding: 8px; scrollbar-width: thin; overscroll-behavior: contain; }
#app .inbox-workspace .inbox-rail-section { display: block; margin: 0 0 12px; padding: 0; min-width: 0; }
#app .inbox-workspace .inbox-rail-section h2 { display: flex; justify-content: space-between; margin: 10px 7px 6px; font-size: 11px; line-height: 1.4; font-weight: 700; color: var(--muted); }
#app .inbox-workspace .inbox-rail-section h2 span { font-weight: 500; }
#app .inbox-workspace :is(.inbox-channel-item, .inbox-person-item) { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 7px; align-items: center; width: 100%; min-width: 0; min-height: 36px; height: auto; margin: 2px 0; padding: 7px; border: 0; border-radius: 7px; text-align: left; color: var(--text); background: transparent; box-shadow: none; cursor: pointer; }
#app .inbox-workspace :is(.inbox-channel-item, .inbox-person-item):hover { background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
#app .inbox-workspace :is(.inbox-channel-item, .inbox-person-item).active { background: var(--primary-soft, #e8eefc); color: var(--primary-strong); box-shadow: inset 3px 0 var(--primary); }
#app .inbox-workspace :is(.inbox-channel-item, .inbox-person-item) strong { display: block; min-width: 0; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; line-height: 1.4; font-weight: 550; }
#app .inbox-workspace :is(.inbox-channel-item, .inbox-person-item).is-unread strong { font-weight: 800; }
#app .inbox-workspace .channel-copy { min-width: 0; }
#app .inbox-workspace .channel-copy small { display: none; }
#app .inbox-workspace .channel-hash { display: grid; place-items: center; width: 26px; height: 26px; min-width: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 22px; font-weight: 500; }
#app .inbox-workspace .channel-hash .icon { width: 15px; height: 15px; }
#app .inbox-workspace .channel-meta { display: flex; align-items: center; gap: 3px; min-width: 0; }
#app .inbox-workspace .inbox-person-item > span { min-width: 0; }
#app .inbox-workspace .inbox-person-item small { display: block; max-width: 100%; color: var(--muted); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app .inbox-workspace .inbox-person-item .avatar { width: 28px; height: 28px; min-width: 28px; font-size: 10px; }
#app .inbox-workspace .inbox-new-conversation { display: flex; align-items: center; gap: 8px; margin: 8px; padding: 10px; width: calc(100% - 16px); min-height: 38px; border: 1px dashed var(--line); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 12px; cursor: pointer; }
#app .inbox-workspace .inbox-rail-empty { margin: 14px 8px; font-size: 12px; line-height: 1.6; color: var(--muted); }
#app .inbox-workspace .inbox-chat-panel { position: relative; display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto; min-width: 0; min-height: 0; height: 100%; padding: 0; border: 0; border-radius: 0; background: var(--surface); overflow: hidden; }
#app .inbox-workspace .inbox-chat-head { grid-row: 1; display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; min-height: 65px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface); }
#app .inbox-workspace .inbox-chat-title { min-width: 0; flex: 1; }
#app .inbox-workspace .inbox-chat-title h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text); font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
#app .inbox-workspace .inbox-chat-title h2 > span { color: var(--muted); font-size: 22px; font-weight: 400; }
#app .inbox-workspace .inbox-chat-title p { margin: 3px 0 0; font-size: 11px; line-height: 1.4; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app .inbox-workspace .inbox-chat-head-actions { display: flex; gap: 6px; flex-shrink: 0; }
#app .inbox-workspace .inbox-mobile-chat-details { display: inline-flex; position: static; width: auto; align-items: center; gap: 5px; color: var(--text); background: var(--surface); border: 1px solid var(--line); }
#app .inbox-workspace .inbox-back { display: none; }
#app .inbox-workspace .inbox-star { font-size: 19px; }
#app .inbox-workspace .inbox-star.is-active { color: #b87508; }
#app .inbox-workspace .inbox-conversation-tools { grid-row: 2; display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 5px 10px; padding: 7px 14px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
#app .inbox-workspace .inbox-message-search { display: flex; align-items: center; gap: 5px; flex: 0 1 185px; min-width: 0; padding: 3px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); }
#app .inbox-workspace .inbox-message-search input { min-width: 0; width: 100%; min-height: 24px; height: 24px; padding: 0; border: 0; background: transparent; color: var(--text); font-size: 11px; }
#app .inbox-workspace .inbox-load-error { grid-row: 3; display: flex; gap: 8px; align-items: center; padding: 8px 14px; font-size: 12px; color: var(--text); background: var(--surface-2); }
#app .inbox-workspace .inbox-message-list, #app .inbox-workspace .inbox-thread-feed { display: block; gap: 0; grid-row: 4; height: auto; min-height: 0; max-height: none; overflow-y: auto; overflow-x: hidden; padding: 6px 8px 16px; overscroll-behavior: contain; scrollbar-gutter: stable; scrollbar-width: thin; background: var(--surface); }
#app .inbox-workspace .inbox-date-separator { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 8px 10px; color: var(--muted); font-size: 10px; font-weight: 700; }
#app .inbox-workspace .inbox-date-separator::before, #app .inbox-workspace .inbox-date-separator::after { content: ''; height: 1px; background: var(--line-soft); flex: 1; }
#app .inbox-workspace .inbox-message-thread { display: block; padding: 0; margin: 0 0 4px; border: 0; background: transparent; }
#app .inbox-workspace .inbox-message-card, #app .inbox-workspace .inbox-message-card.is-own { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start; width: 100%; max-width: 100%; min-width: 0; padding: 10px; margin: 0; border: 0; border-radius: 7px; color: var(--text); background: transparent; box-shadow: none; }
#app .inbox-workspace .inbox-message-card:is(:hover, :focus-within) { background: color-mix(in srgb, var(--surface-2) 65%, var(--surface)); }
#app .inbox-workspace .inbox-message-card.is-focused { background: var(--primary-soft); }
#app .inbox-workspace .inbox-message-avatar { grid-column: 1; grid-row: 1; padding: 0; }
#app .inbox-workspace .inbox-message-avatar .avatar { width: 32px; height: 32px; min-width: 32px; font-size: 11px; border-radius: 10px; }
#app .inbox-workspace .inbox-message-body { grid-column: 2; grid-row: 1; min-width: 0; overflow: visible; }
#app .inbox-workspace .inbox-message-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 3px; }
#app .inbox-workspace .inbox-message-head strong { color: var(--text); font-size: 12px; line-height: 1.4; font-weight: 750; }
#app .inbox-workspace .inbox-message-head > span:not(.badge) { color: var(--muted); font-size: 10px; line-height: 1.4; }
#app .inbox-workspace .inbox-message-body > p { margin: 0; font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
#app .inbox-workspace .inbox-message-foot { display: flex; gap: 8px; margin: 0; padding: 0; font-size: 10px; }
#app .inbox-workspace .inbox-message-foot:has(button) { margin-top: 5px; }
#app .inbox-workspace .inbox-message-toolbar { position: absolute; display: flex; flex-wrap: nowrap; align-items: center; gap: 2px; top: -10px; right: 10px; z-index: 12; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-soft); opacity: 0; pointer-events: none; transform: none; }
#app .inbox-workspace .inbox-message-card:is(:hover, :focus-within) > .inbox-message-toolbar, #app .inbox-workspace .inbox-message-toolbar:has(details[open]) { opacity: 1; pointer-events: auto; }
#app .inbox-workspace .inbox-message-toolbar :is(button, summary) { display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 28px; min-height: 28px; padding: 4px 6px; border: 0; background: transparent; color: var(--muted); font-size: 10px; border-radius: 5px; cursor: pointer; white-space: nowrap; }
#app .inbox-workspace .inbox-message-toolbar :is(button, summary):hover { color: var(--text); background: var(--surface-2); }
#app .inbox-workspace .inbox-message-action-menu { position: relative; }
#app .inbox-workspace .inbox-message-action-menu summary { list-style: none; }
#app .inbox-workspace .inbox-message-action-popover, #app .inbox-workspace .entity-reaction-options { position: absolute; z-index: 30; inset: auto 0 auto auto; top: calc(100% + 5px); min-width: 145px; max-width: min(260px, 70vw); padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-soft); }
#app .inbox-workspace .inbox-message-action-popover { display: grid; }
#app .inbox-workspace .inbox-message-action-popover button { justify-content: flex-start; width: 100%; }
#app .inbox-workspace .entity-reaction-options { display: flex; min-width: 210px; gap: 3px; }
#app .inbox-workspace .entity-reaction-options button { width: 29px; padding: 3px; font-size: 17px; }
#app .inbox-workspace .entity-reaction-bar { gap: 4px; margin: 4px 0 0; min-height: 0; }
#app .inbox-workspace .entity-reaction-bar:not(:has(.entity-reaction-chip)) { display: none; }
#app .inbox-workspace .entity-reaction-bar > .entity-reaction-picker { display: none; }
#app .inbox-workspace .entity-reaction-chip { padding: 2px 6px; min-height: 25px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); }
#app .inbox-workspace .entity-reaction-chip.is-mine { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-strong); }
#app .inbox-workspace .inbox-thread-link { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 7px 52px; padding: 3px 8px; max-width: calc(100% - 62px); min-height: 27px; border: 0; border-radius: 6px; background: transparent; color: var(--primary-strong); font-size: 11px; cursor: pointer; }
#app .inbox-workspace .inbox-thread-link > span { color: var(--muted); font-size: 10px; }
#app .inbox-workspace .inbox-history-button { display: block; margin: 8px auto; padding: 7px 12px; min-height: 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--primary-strong); font-size: 11px; cursor: pointer; }
#app .inbox-workspace .inbox-conversation-empty { display: grid; align-content: center; justify-items: center; min-height: min(280px, 100%); gap: 10px; padding: 24px; text-align: center; }
#app .inbox-workspace .inbox-conversation-empty > span { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); color: var(--primary); }
#app .inbox-workspace .inbox-conversation-empty h3 { margin: 0; font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
#app .inbox-workspace .inbox-conversation-empty p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
#app .inbox-workspace .inbox-composer { grid-row: 5; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 0 14px 12px; padding: 9px 10px; min-height: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: none; }
#app .inbox-workspace .inbox-composer:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 10%, transparent); }
#app .inbox-workspace .inbox-composer .mention-field { grid-column: 1; min-width: 0; margin: 0; }
#app .inbox-workspace .inbox-composer .field { margin: 0; gap: 0; }
#app .inbox-workspace .inbox-composer .field > span { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
#app .inbox-workspace .inbox-composer textarea { width: 100%; min-height: 48px; height: 48px; max-height: 120px; padding: 5px 3px; border: 0; border-radius: 0; resize: none; box-shadow: none; background: transparent; color: var(--text); font-size: 13px; line-height: 1.6; }
#app .inbox-workspace .inbox-composer textarea:focus { outline: none; box-shadow: none; }
#app .inbox-workspace .inbox-composer-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 8px; padding: 0; margin: 0; }
#app .inbox-workspace .inbox-composer-tools { display: flex; align-items: center; gap: 4px; min-width: 0; }
#app .inbox-workspace .inbox-composer-tools small { font-size: 9px; line-height: 1.35; color: var(--muted); }
#app .inbox-workspace .inbox-attach { display: inline-flex; position: relative; align-items: center; justify-content: center; flex-shrink: 0; margin: 0; cursor: pointer; }
#app .inbox-workspace .inbox-attach input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
#app .inbox-workspace .inbox-composer-options { position: relative; }
#app .inbox-workspace .inbox-composer-options summary { display: flex; align-items: center; justify-content: center; list-style: none; cursor: pointer; }
#app .inbox-workspace .inbox-composer-bar { position: absolute; z-index: 25; left: 0; bottom: calc(100% + 8px); display: grid; gap: 10px; width: 200px; max-width: 70vw; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: var(--shadow-soft); }
#app .inbox-workspace .inbox-composer-bar label { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 12px; }
#app .inbox-workspace .inbox-composer-bar select { min-width: 0; width: 130px; min-height: 30px; height: 30px; font-size: 12px; background: var(--surface); color: var(--text); }
#app .inbox-workspace .inbox-composer-bar input[type=checkbox] { width: 16px; height: 16px; }
#app .inbox-workspace .inbox-send-error { margin: 0; color: #b42318; font-size: 12px; line-height: 1.4; }
#app .inbox-workspace .inbox-draft-files { display: flex; flex-wrap: wrap; gap: 5px; }
#app .inbox-workspace .inbox-draft-files > span { display: flex; align-items: center; gap: 5px; max-width: 100%; padding: 4px 6px; border: 1px solid var(--line); border-radius: 7px; font-size: 11px; }
#app .inbox-workspace .inbox-draft-files > span > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#app .inbox-workspace .inbox-draft-files button { display: grid; place-items: center; width: 24px; height: 24px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
#app .inbox-workspace .inbox-read-only { grid-row: 5; margin: 10px; padding: 12px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
#app .inbox-workspace .inbox-jump-latest { position: absolute; left: 50%; bottom: calc(var(--inbox-composer-height, 114px) + 17px); z-index: 15; transform: translateX(-50%); padding: 7px 12px; border: 1px solid var(--line); border-radius: 20px; color: var(--primary-strong); background: var(--surface); box-shadow: var(--shadow-soft); font-size: 11px; cursor: pointer; }
#app .inbox-workspace .inbox-jump-latest[hidden] { display: none; }
#app .inbox-workspace:is(.is-thread-open, .is-details-open) { grid-template-columns: 240px minmax(0, 1fr) 350px; }
#app .inbox-workspace .inbox-thread-panel { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; overflow: hidden; border-left: 1px solid var(--line); background: var(--surface); }
#app .inbox-workspace .inbox-thread-header { display: flex; align-items: center; justify-content: space-between; min-height: 65px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
#app .inbox-workspace .inbox-thread-header h2 { margin: 0; font-size: 16px; }
#app .inbox-workspace .inbox-thread-header small { display: block; margin-top: 3px; max-width: 245px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--muted); }
#app .inbox-workspace .inbox-thread-feed { grid-row: 2; }
#app .inbox-workspace .inbox-thread-panel .inbox-composer { grid-row: 3; margin: 0 10px 10px; }
#app .inbox-workspace .inbox-thread-panel .inbox-composer-tools small { display: none; }
#app .inbox-workspace :is(.inbox-thread-empty, .inbox-loading) { padding: 16px; font-size: 12px; line-height: 1.5; color: var(--muted); }
#app .inbox-workspace .inbox-context-panel { position: relative; inset: auto; z-index: auto; display: flex; flex-direction: column; gap: 16px; width: auto; max-width: none; height: 100%; max-height: none; margin: 0; padding: 18px 14px; border: 0; border-left: 1px solid var(--line); border-radius: 0; overflow-y: auto; overflow-x: hidden; background: var(--surface); box-shadow: none; transform: none; visibility: visible; }
#app .inbox-workspace .inbox-mobile-context-backdrop { display: none; }
#app .inbox-workspace .inbox-mobile-context-close { display: inline-flex; position: absolute; top: 10px; right: 10px; }
#app .inbox-workspace .inbox-context-panel > * { flex-shrink: 0; }
#app .inbox-workspace .inbox-context-head { height: auto; padding-right: 30px; align-items: start; }
#app .inbox-workspace .inbox-context-head h2 { font-size: 15px; overflow-wrap: anywhere; }
#app .inbox-workspace .inbox-context-head p { font-size: 11px; line-height: 1.5; }
#app .inbox-workspace .inbox-context-actions { display: flex; flex-wrap: wrap; gap: 5px; }
#app .inbox-workspace .inbox-context-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#app .inbox-workspace .inbox-context-stats .key-item { min-width: 0; padding: 8px; }
#app .inbox-workspace .inbox-context-list { min-width: 0; }
#app .inbox-workspace .inbox-member-list { max-height: 240px; overflow-y: auto; }
#app .inbox-workspace .inbox-attachments button { max-width: 100%; overflow-wrap: anywhere; white-space: normal; }
html[data-theme=dark] #app .inbox-workspace { --primary-soft: #192438; --primary-strong: #a1baff; }
html[data-theme=dark] #app .inbox-workspace .inbox-send-error { color: #fda29b; }
@media (max-width: 1350px) {
  #app .layout.os-layout-v10 .inbox-workspace:is(.is-thread-open, .is-details-open) { grid-template-columns: minmax(0, 1fr) 350px; }
  #app .inbox-workspace:is(.is-thread-open, .is-details-open) > .inbox-channel-rail { display: none; }
}
@media (max-width: 1100px) {
  #app .layout.os-layout-v10 .inbox-workspace { grid-template-columns: 220px minmax(0, 1fr); }
  #app .inbox-workspace .inbox-conversation-tools { padding-inline: 10px; }
  #app .inbox-workspace .inbox-message-search { flex: 1 1 100%; }
  #app .inbox-workspace .inbox-composer-tools small { display: none; }
}
@media (max-width: 900px) {
  #app .layout.os-layout-v10 .inbox-workspace:is(.is-thread-open, .is-details-open) { grid-template-columns: minmax(0, 1fr); }
  #app .inbox-workspace:is(.is-thread-open, .is-details-open) > .inbox-chat-panel { display: none; }
  #app .inbox-workspace :is(.inbox-thread-panel, .inbox-context-panel) { border-left: 0; }
}
@media (max-width: 760px) {
  #app .layout.os-layout-v10 .content:has(> .inbox-workspace) { padding: 5px 5px calc(76px + env(safe-area-inset-bottom)); }
  #app .layout.os-layout-v10 .inbox-workspace { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); border-radius: 9px; }
  #app .inbox-workspace:not(.is-conversation-open) > .inbox-chat-panel { display: none; }
  #app .inbox-workspace.is-conversation-open > .inbox-channel-rail { display: none; }
  #app .inbox-workspace .inbox-channel-rail { border: 0; max-height: none; }
  #app .inbox-workspace .inbox-rail-head { padding: 12px 14px; }
  #app .inbox-workspace :is(.inbox-channel-item, .inbox-person-item) { min-height: 44px; padding: 9px; }
  #app .inbox-workspace .inbox-channel-item strong { font-size: 14px; }
  #app .inbox-workspace .inbox-search-field input, #app .inbox-workspace .inbox-message-search input { font-size: 16px; }
  #app .inbox-workspace .inbox-back { display: inline-flex; }
  #app .inbox-workspace .inbox-chat-head { min-height: 54px; padding: 8px; gap: 7px; }
  #app .inbox-workspace .inbox-chat-title h2 { font-size: 15px; }
  #app .inbox-workspace .inbox-chat-title p { max-width: 100%; font-size: 10px; }
  #app .inbox-workspace .inbox-star { display: none; }
  #app .inbox-workspace .inbox-conversation-tools { gap: 3px; padding: 4px 7px; }
  #app .inbox-workspace .inbox-filter-bar button { min-height: 28px; padding: 4px 7px; font-size: 10px; }
  #app .inbox-workspace .inbox-message-search { display: flex; padding: 2px 7px; }
  #app .inbox-workspace .inbox-message-search input { min-height: 24px; height: 24px; }
  #app .inbox-workspace .inbox-composer { margin: 0 7px 7px; padding: 7px; gap: 4px; }
  #app .inbox-workspace .inbox-composer textarea { min-height: 48px; font-size: 16px; }
  #app .inbox-workspace .inbox-message-card { gap: 7px; padding: 8px 4px; }
  #app .inbox-workspace .inbox-message-toolbar { grid-column: 2; grid-row: 2; position: static; justify-self: end; width: max-content; opacity: 1; pointer-events: auto; padding: 0; border: 0; background: transparent; box-shadow: none; }
  #app .inbox-workspace .inbox-message-toolbar > button > span, #app .inbox-workspace .inbox-message-toolbar summary > span { display: none; }
  #app .inbox-workspace .inbox-message-toolbar :is(button, summary) { min-width: 30px; min-height: 30px; }
  #app .inbox-workspace .inbox-message-thread { margin-bottom: 5px; }
  #app .inbox-workspace .inbox-thread-link { margin-left: 43px; }
  #app .inbox-workspace .inbox-thread-header { min-height: 54px; padding: 9px 12px; }
  #app .inbox-workspace .inbox-thread-panel .inbox-composer { margin: 0 7px 7px; }
  html[data-inbox-keyboard-open] #app .mobile-app-dock { display: none; }
  html[data-inbox-keyboard-open] #app .inbox-workspace .inbox-conversation-tools { display: none; }
  html[data-inbox-keyboard-open] #app .inbox-workspace .inbox-composer textarea { max-height: 80px; }
  #app .layout.os-layout-v10:has(.inbox-workspace) .ai-quick:not(.open) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #app .inbox-workspace *, #app .inbox-workspace *::before { scroll-behavior: auto !important; transition: none !important; }
}
#app .inbox-workspace .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }

/* Feedback must not cover Send or the thread composer. */
body:has(.inbox-workspace) .toast-region { bottom: 150px; }
@media (max-width: 760px) { body:has(.inbox-workspace) .toast-region { bottom: 210px; } }

#app .drawer[data-drawer-kind=inbox_channels] { width: min(680px, calc(100vw - 24px)); }
#app .inbox-channel-form, #app .inbox-channel-advanced .form-grid { align-items: start; gap: 14px; }
#app .inbox-channel-form .member-picker-grid { max-height: 244px; overflow-y: auto; overscroll-behavior: contain; }
#app .inbox-channel-form .member-picker-option { padding: 8px; min-height: 56px; }
#app .inbox-channel-form .member-picker-option small { font-size: 10px; }
#app .inbox-channel-form .field > span > small { text-transform: none; font-weight: 400; }
#app .inbox-channel-advanced summary { cursor: pointer; padding: 8px 0; font-size: 12px; color: var(--muted); }
#app .inbox-channel-advanced > .form-grid { padding-top: 8px; }
@media (max-width: 600px) {
  #app .inbox-channel-form { grid-template-columns: minmax(0, 1fr); }
  #app .inbox-channel-form .member-picker-grid { grid-template-columns: minmax(0, 1fr); max-height: 220px; }
}

/* Keep notification navigation visible without opening a record window. */
.inbox-workspace [data-message-id].is-notification-target {
  outline: 2px solid var(--primary, #2454dc);
  outline-offset: -2px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary, #2454dc) 7%, transparent);
}

.notification-center-copy .notification-context {display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:3px;white-space:normal;overflow:visible;}
.notification-center-copy .notification-context b {font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:var(--primary);}
.notification-center-copy .notification-context em {font-style:normal;font-size:11px;overflow-wrap:anywhere;}
.notification-center-copy .notification-preview {display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;white-space:pre-wrap;overflow:hidden;overflow-wrap:anywhere;line-height:1.5;}
.notification-center-copy .notification-meta {display:flex;gap:10px;flex-wrap:wrap;margin-top:4px;}
.notification-center-copy .notification-meta span {font-size:inherit;color:inherit;}
.notification-center-copy .notification-destination {color:var(--primary);font-weight:650;margin-top:3px;}
.notification-center-open:disabled {cursor:default;opacity:.75;}

/* Channel management and personal channel ordering. */
#app .inbox-channel-row { display:grid; grid-template-columns:26px minmax(0,1fr); align-items:center; position:relative; border-radius:8px; }
#app .inbox-channel-row .inbox-channel-item { min-width:0; width:100%; }
#app .inbox-channel-drag { display:grid; place-items:center; min-width:26px; width:26px; height:38px; border:0; border-radius:6px; padding:0; background:transparent; color:var(--muted); cursor:grab; touch-action:none; user-select:none; font:700 18px/1 sans-serif; }
#app .inbox-channel-drag:hover { background:var(--panel-soft); color:var(--primary); }
#app .inbox-channel-drag:active { cursor:grabbing; }
#app .inbox-channel-drag:focus-visible { outline:2px solid var(--primary); outline-offset:-2px; }
#app .inbox-channel-drag:disabled { opacity:.35; cursor:wait; }
#app .inbox-channel-row.is-order-dragging { opacity:.5; }
#app .inbox-channel-row.is-drop-before::before,#app .inbox-channel-row.is-drop-after::after { content:""; position:absolute; left:0; right:0; height:3px; background:var(--primary); border-radius:2px; pointer-events:none; z-index:2; }
#app .inbox-channel-row.is-drop-before::before { top:-2px; }
#app .inbox-channel-row.is-drop-after::after { bottom:-2px; }
#app .inbox-order-status { margin:4px 10px 8px; color:var(--muted); font-size:11px; line-height:1.5; }
#app .inbox-channel-management { display:grid; gap:10px; padding:14px 0; border-block:1px solid var(--line); }
#app .inbox-channel-management h3 { font-size:14px; margin:0; }
#app .inbox-channel-management-actions { display:flex; gap:6px; flex-wrap:wrap; }
#app .inbox-channel-editor { display:grid; gap:10px; }
#app .inbox-channel-editor label { display:grid; gap:5px; color:var(--text); font-size:12px; font-weight:650; }
#app .inbox-channel-editor :is(input,textarea,select) { width:100%; min-width:0; box-sizing:border-box; }
#app .inbox-channel-editor textarea { min-height:80px; resize:vertical; }
#app .inbox-channel-editor small { color:var(--muted); line-height:1.5; }
#app .inbox-channel-editor > div { display:flex; gap:8px; }
@media(pointer:coarse) {
  #app .inbox-channel-row { grid-template-columns:38px minmax(0,1fr); }
  #app .inbox-channel-drag { width:38px; min-width:38px; height:44px; }
}

/* Channel symbols are labels, not additional boxed actions. */
#app .layout.os-layout-v10 .inbox-workspace .channel-hash:not(.is-person) { border:0; background:transparent; box-shadow:none; border-radius:0; color:var(--muted); width:20px; height:24px; }
#app .inbox-workspace .inbox-channel-row .inbox-channel-item { grid-template-columns:20px minmax(0,1fr) auto; gap:6px; padding-left:4px; }

#app .inbox-workspace.is-channels .inbox-channel-rail { grid-template-rows:auto auto auto auto auto minmax(0,1fr) auto; }

/* Consecutive messages share an identity header but retain time and all actions. */
#app .inbox-workspace .inbox-message-card.is-continuation { padding-top: 3px; padding-bottom: 3px; }
#app .inbox-workspace .inbox-message-thread.is-continuation { margin-bottom: 2px; }
#app .inbox-workspace .inbox-continuation-time {
  grid-column: 1; grid-row: 1; align-self: start; padding-top: 3px;
  min-width: 0; text-align: center; color: var(--muted); font-size: 9px; line-height: 12px;
  font-variant-numeric: tabular-nums; overflow-wrap: normal;
}
