:root {
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  --ink: #1c2931;
  --muted: #6d7d86;
  --line: #dce3e6;
  --canvas: #edf1f2;
  --surface: #fff;
  --sidebar: #172129;
  --accent: #087f74;
  --accent-strong: #05685f;
  --danger: #c8463b;
  --soft: #e9f5f3;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body, #app { height: 100%; min-height: 0; margin: 0; }
body { overflow: hidden; background: var(--canvas); color: var(--ink); }
button, input, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
.app-loading, .empty-page { min-height: 100%; display: grid; place-items: center; color: var(--muted); }

.login-shell { height: 100%; min-height: 0; overflow: auto; display: grid; place-items: center; padding: 24px; }
.login-panel { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line); padding: 30px; }
.brand { font-size: 26px; font-weight: 800; margin: 0 0 5px; }
.subtle { color: var(--muted); margin: 0; line-height: 1.65; }
.field { display: grid; gap: 7px; margin-top: 20px; }
.field label { font-weight: 600; }
.field input, .composer textarea, .remark-input { width: 100%; border: 1px solid #bac6cb; background: #fff; padding: 10px 12px; outline: none; }
.field input:focus, .composer textarea:focus, .remark-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(8,127,116,.12); }
.primary, .secondary, .danger, .icon-button { min-height: 38px; border: 1px solid transparent; padding: 0 16px; }
.primary { color: #fff; background: var(--accent); }
.primary:hover { background: var(--accent-strong); }
.secondary { color: var(--ink); background: #fff; border-color: #b8c5ca; }
.danger { color: var(--danger); background: #fff; border-color: #e4aaa5; }
.form-error { min-height: 22px; color: var(--danger); margin-top: 12px; }

.workspace { height: 100%; min-height: 0; overflow: hidden; display: grid; grid-template-columns: 300px minmax(0, 1fr); background: var(--surface); -webkit-user-select: none; user-select: none; }
.workspace input, .workspace textarea, .workspace [contenteditable="true"] { -webkit-user-select: text; user-select: text; }
.customer-workspace { grid-template-columns: 1fr; }
.customer-workspace .conversation-pane { display: none; }
.conversation-pane { min-width: 0; min-height: 0; overflow: hidden; background: var(--sidebar); color: #e9eef0; display: flex; flex-direction: column; }
.pane-brand { min-height: 82px; border-bottom: 1px solid #2b3740; padding: 18px 20px; }
.pane-brand-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pane-brand strong { display: block; font-size: 20px; }
.pane-status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.owner-logout { flex: none; min-height: 32px; padding: 0 10px; border: 1px solid #53616a; background: transparent; color: #d7e0e4; }
.owner-logout:hover, .owner-logout:focus-visible { border-color: #e4aaa5; color: #ffb8b2; outline: none; }
.connection { display: inline-flex; align-items: center; gap: 7px; color: #9fb0b9; margin-top: 8px; font-size: 12px; }
.connection::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #d4574d; }
.connection.online::before { background: #34b37c; }
.notification-settings-button { flex: none; min-width: 58px; min-height: 30px; padding: 0 9px; border: 1px solid #aab9bf; background: #fff; color: var(--ink); font-size: 12px; white-space: nowrap; }
.pane-status-row .notification-settings-button { border-color: #53616a; background: transparent; color: #d7e0e4; }
.notification-settings-button:hover, .notification-settings-button:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.notification-settings-button:disabled { opacity: .55; cursor: default; }
.chat-notification-settings.conversation-muted-setting { border-color: var(--accent); background: var(--soft); color: var(--accent); font-weight: 700; }
.pane-status-row .notification-settings-button:hover, .pane-status-row .notification-settings-button:focus-visible { border-color: #7bbdb6; color: #9ee0d9; }
.notification-settings-button.muted { color: var(--muted); }
.pane-status-row .notification-settings-button.muted { color: #91a0a8; }
.search-wrap { padding: 12px; border-bottom: 1px solid #2b3740; }
.search-wrap input { width: 100%; height: 36px; padding: 0 11px; border: 1px solid #3a4650; background: #111a20; color: #fff; outline: none; }
.conversations { min-height: 0; flex: 1; overflow: auto; }
.conversation { width: 100%; height: 68px; padding: 10px 14px; border: 0; border-bottom: 1px solid #26323a; color: inherit; background: transparent; text-align: left; display: grid; grid-template-columns: 42px minmax(0,1fr) 40px; align-items: center; gap: 10px; touch-action: pan-y; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.conversation:hover { background: #26343d; }
.conversation.pinned { box-shadow: inset 3px 0 0 var(--accent); background: #1d2b33; }
.conversation.pinned:hover { background: #293a44; }
.conversation.active, .conversation.pinned.active { background: var(--accent); }
.conversation.active:hover, .conversation.pinned.active:hover { background: var(--accent-strong); }
.conversation.active .conversation-preview,
.conversation.active .conversation-time,
.conversation.active .pin-label,
.conversation.active .conversation-status-label { color: #d8f0ed; }
.conversation.pinned.active { box-shadow: inset 3px 0 0 #b8ebe5; }
.conversation.dissolved { opacity: .72; }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; background: #34454f; color: #d8e3e7; font-weight: 800; }
.avatar-image { width: 100%; height: 100%; display: block; object-fit: cover; }
.avatar.system { background: var(--accent); color: #fff; }
.avatar.group { background: #45606f; color: #fff; }
.conversation-copy { min-width: 0; }
.conversation.has-account-profile { height: 92px; }
.conversation-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-name { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.conversation-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.account-count { flex: none; font-size: 10px; font-weight: 400; color: var(--muted); background: #eef3f4; border-radius: 3px; padding: 1px 4px; }
.profile-summary { display: block; max-width: 100%; margin: 5px 0 0; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: left; cursor: pointer; }
.profile-summary:hover, .profile-summary:focus-visible { color: var(--accent); }
.profile-dialog { max-height: calc(100dvh - 40px); display: flex; flex-direction: column; }
#profile-details { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.profile-total { font-size: 14px; }
.profile-account { border-top: 1px solid var(--line); padding: 12px 0; overflow-wrap: anywhere; }
.profile-account-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; font-size: 13px; }
.profile-account p, .profile-feature { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.conversation-preview { color: #9fb0b9; font-size: 11px; margin-top: 4px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation-quota { color: #d3e8e5; font-size: 12px; margin-top: 4px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conversation.active .conversation-quota { color: #e4fffb; }
.conversation-meta { width: 40px; height: 48px; min-width: 40px; display: flex; flex-direction: column; align-items: flex-end; }
.pin-label { color: #8ed4cc; font-size: 10px; line-height: 12px; white-space: nowrap; }
.conversation-status-label { color: #8ed4cc; font-size: 10px; line-height: 12px; white-space: nowrap; }
.conversation-status-label.muted { color: #a8b6bd; }
.conversation-time { color: #8fa0a9; font-size: 11px; line-height: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.conversation-meta .badge { margin-top: auto; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; background: #d85349; color: #fff; font-size: 11px; }
.summary-badge { min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; display: inline-grid; place-items: center; background: #e0544b; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.summary-badge[hidden] { display: none; }
.pane-footer { border-top: 1px solid #2b3740; padding: 12px 16px; color: #9fb0b9; font-size: 12px; }
.conversation-tools { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 10px 12px 0; }
.target-filter { min-width: 0; display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid #3a4650; }
.target-filter button { position: relative; min-width: 0; height: 32px; padding: 0 25px 0 5px; border: 0; border-right: 1px solid #3a4650; background: #111a20; color: #aebcc4; }
.filter-unread-badge { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); }
.target-filter button:last-child { border-right: 0; }
.target-filter button.active { background: var(--accent); color: #fff; }
.new-group { height: 34px; padding: 0 11px; border: 1px solid #53616a; background: transparent; color: #e9eef0; }
.new-group:hover, .new-group:focus-visible { border-color: #7bbdb6; color: #9ee0d9; outline: none; }

.chat-pane { position: relative; min-width: 0; min-height: 0; height: 100%; overflow: hidden; display: grid; grid-template-rows: 72px minmax(0,1fr) auto; background: #f4f6f7; }
.chat-header { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px; display: flex; align-items: center; gap: 14px; }
.mobile-back { display: none; border: 0; background: transparent; font-size: 20px; padding: 8px; }
.chat-heading { min-width: 0; flex: 1; position: relative; }
.chat-title { display: block; max-width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); font-size: 17px; font-weight: 700; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.chat-title:disabled { color: var(--ink); opacity: 1; }
.chat-title.has-actions { padding-right: 20px; position: relative; cursor: pointer; }
.chat-title.has-actions::after { content: "\25BE"; position: absolute; right: 2px; top: 50%; transform: translateY(-48%); color: var(--muted); font-size: 12px; }
.chat-title.has-actions:hover, .chat-title.has-actions:focus-visible { color: var(--accent); outline: none; }
.chat-heading p { font-size: 12px; color: var(--muted); margin: 5px 0 0; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.title-actions-menu { position: absolute; left: 0; top: calc(100% + 8px); z-index: 40; min-width: 156px; padding: 4px; border: 1px solid #c8d2d6; background: #fff; box-shadow: 0 10px 28px rgba(15,24,29,.2); }
.title-action { width: 100%; height: 40px; padding: 0 13px; border: 0; background: #fff; color: var(--ink); text-align: left; white-space: nowrap; }
.title-action:hover, .title-action:focus-visible { background: #edf5f4; color: var(--accent); outline: none; }
.title-action.danger { color: var(--danger); background: #fff; }
.title-action.danger:hover, .title-action.danger:focus-visible { color: var(--danger); background: #fff0f0; }
.dissolved-label { color: var(--danger); font-size: 12px; white-space: nowrap; }
.messages { min-height: 0; overflow: auto; overscroll-behavior: contain; scroll-padding-bottom: 14px; padding: 20px clamp(14px, 4vw, 48px) 34px; }
.retention-note { width: fit-content; max-width: 100%; margin: 0 auto 20px; color: var(--muted); background: #e5eaec; padding: 7px 12px; font-size: 12px; }
.message-row { display: flex; margin: 12px 0; content-visibility: auto; contain-intrinsic-size: auto 76px; }
.message-row.mine { justify-content: flex-end; }
.message-row.system { justify-content: center; }
.older-messages-wrap { display: flex; justify-content: center; margin: -8px 0 14px; }
.older-messages { min-height: 34px; padding: 0 14px; border: 1px solid #c8d2d6; background: #fff; color: var(--accent); }
.older-messages:hover, .older-messages:focus-visible { border-color: var(--accent); background: #edf5f4; outline: none; }
.older-messages:disabled { color: var(--muted); background: #f1f4f5; cursor: wait; }
.history-loading { align-self: center; justify-self: center; margin: auto; padding: 9px 14px; background: #e8edef; color: var(--muted); font-size: 12px; }
.scroll-bottom { position: absolute; right: clamp(16px,3vw,36px); z-index: 6; width: 42px; height: 42px; padding: 0; border: 1px solid #b8c5ca; border-radius: 50%; background: #fff; color: var(--accent); box-shadow: 0 5px 16px rgba(15,24,29,.2); font-size: 22px; line-height: 1; }
.scroll-bottom:hover, .scroll-bottom:focus-visible { border-color: var(--accent); background: #edf5f4; outline: none; }
.scroll-bottom[hidden] { display: none; }
.scroll-bottom-count { position: absolute; top: -7px; right: -7px; min-width: 21px; height: 21px; padding: 0 5px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 11px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; line-height: 1; }
.scroll-bottom-count[hidden] { display: none; }
.bubble { max-width: min(680px, 78%); }
.bubble-body { padding: 10px 13px; background: #fff; border: 1px solid #dde4e7; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-link { color: #087f74; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; overflow-wrap: anywhere; word-break: break-word; }
.message-link:hover, .message-link:focus-visible { color: #065b54; outline: none; }
.bubble-sender { margin: 0 2px 4px; color: #667780; font-size: 11px; }
.mine .bubble-sender { text-align: right; }
.mine .bubble-body { background: #dff1ed; border-color: #c3e4dd; }
.system .bubble-body { background: #e6eaec; color: #5f6e76; border: 0; font-size: 12px; }
.message-row.recalled .bubble-body { padding: 7px 11px; background: #e6eaec; color: #6c7a80; border: 0; font-size: 12px; }
.bubble-meta { color: #87949b; font-size: 11px; margin-top: 4px; }
.mine .bubble-meta { text-align: right; }
.bubble img { display: block; max-width: min(480px, 100%); max-height: 420px; object-fit: contain; background: #fff; border: 1px solid var(--line); }
.message-context-menu { position: fixed; z-index: 80; min-width: 154px; padding: 4px; border: 1px solid #c8d2d6; background: #fff; box-shadow: 0 10px 28px rgba(15,24,29,.2); }
.message-context-action { width: 100%; height: 38px; padding: 0 12px; border: 0; background: #fff; color: var(--ink); text-align: left; }
.message-context-action:hover, .message-context-action:focus-visible { background: #edf5f4; color: var(--accent); outline: none; }
.clipboard-helper { position: fixed; left: -10000px; top: 0; width: 1px; height: 1px; opacity: 0; }
.copy-notice { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 90; transform: translateX(-50%); padding: 9px 14px; background: #162129; color: #fff; box-shadow: 0 6px 18px rgba(15,24,29,.2); white-space: nowrap; }
.copy-notice.failed { background: var(--danger); }
.message-image { cursor: zoom-in; }
.message-image:focus-visible { outline: 3px solid rgba(8,127,116,.35); outline-offset: 3px; }
.image-viewer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(7,12,15,.94); }
.image-viewer-content { display: block; width: min(1200px, calc(100vw - 48px)); height: min(900px, calc(100vh - 48px)); object-fit: contain; object-position: center; }
.image-viewer-close { position: fixed; top: 16px; right: 16px; width: 44px; height: 44px; padding: 0; border: 1px solid rgba(255,255,255,.5); background: rgba(7,12,15,.7); color: #fff; font-size: 30px; line-height: 1; }
.image-viewer-close:hover, .image-viewer-close:focus-visible { background: #fff; color: var(--ink); outline: none; }
.file-card { display: flex; align-items: center; gap: 12px; min-width: min(340px, 70vw); color: inherit; text-decoration: none; }
.file-card.text-preview { width: 100%; padding: 0; border: 0; background: transparent; text-align: left; }
.file-mark { width: 38px; height: 42px; display: grid; place-items: center; background: #edf1f3; color: var(--accent); font-weight: 800; }
.file-copy { min-width: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--muted); font-size: 11px; margin-top: 4px; }

.text-viewer { position: fixed; inset: 0; z-index: 50; min-width: 0; min-height: 0; display: grid; grid-template-rows: 62px minmax(0,1fr) auto; background: #f7f9fa; }
.text-viewer-header { min-width: 0; display: flex; align-items: center; gap: 16px; padding: 9px 16px 9px 22px; border-bottom: 1px solid var(--line); background: #fff; }
.text-viewer-title { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.text-viewer-actions { display: flex; align-items: center; gap: 8px; }
.text-viewer-download { min-height: 42px; display: inline-flex; align-items: center; text-decoration: none; }
.text-viewer-close { width: 42px; height: 42px; padding: 0; border: 1px solid #b8c5ca; background: #fff; color: var(--ink); font-size: 28px; line-height: 1; }
.text-viewer-close:hover, .text-viewer-close:focus-visible { border-color: var(--accent); color: var(--accent); outline: none; }
.text-viewer-content { min-width: 0; min-height: 0; margin: 0; overflow: auto; padding: 22px clamp(16px,4vw,56px); background: #f7f9fa; color: var(--ink); font: 14px/1.75 Consolas, "Microsoft YaHei UI", monospace; white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 4; }
.text-viewer-note { min-height: 0; padding: 0 22px; background: #fff6dc; color: #765b15; line-height: 34px; }

.composer { border-top: 1px solid var(--line); background: #fff; padding: 10px 16px 14px; }
.composer-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 9px; align-items: end; }
.icon-button { width: 42px; padding: 0; background: #fff; border-color: #b8c5ca; font-size: 18px; }
.composer textarea { min-height: 42px; max-height: 130px; resize: vertical; }
.composer-hint { margin: 7px 0 0 52px; color: var(--muted); font-size: 11px; }
.composer.disabled { opacity: .62; }

.dialog-backdrop { position: fixed; inset: 0; background: rgba(15,24,29,.52); display: grid; place-items: center; padding: 20px; z-index: 20; }
.dialog { width: min(430px,100%); background: #fff; border: 1px solid var(--line); padding: 24px; }
.dialog h2 { margin: 0; font-size: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.notification-options { display: grid; gap: 1px; margin-top: 18px; border: 1px solid var(--line); background: var(--line); }
.notification-option { min-height: 52px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #fff; font-weight: 700; cursor: pointer; }
.notification-option-copy { min-width: 0; display: grid; gap: 3px; }
.notification-option-copy strong { font-size: 14px; }
.notification-option-copy small { color: var(--muted); font-size: 11px; font-weight: 400; }
.notification-option input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.notification-volume-control { min-width: 0; display: flex; align-items: center; gap: 9px; }
.notification-volume-control input[type="range"] { width: clamp(100px, 26vw, 150px); height: 24px; margin: 0; accent-color: var(--accent); }
.notification-volume-control output { width: 42px; color: var(--muted); font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; }
.member-search { display: grid; gap: 7px; margin-top: 16px; }
.member-search label, .member-section-title { font-size: 13px; font-weight: 700; }
.member-search-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.member-search input { width: 100%; min-width: 0; height: 40px; border: 1px solid #bac6cb; background: #fff; padding: 0 12px; outline: none; }
.member-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(8,127,116,.12); }
.member-search-row button { height: 40px; }
.member-search-results { max-height: min(30vh,230px); overflow: auto; margin-top: 10px; border: 1px solid var(--line); }
.member-section-title { margin: 18px 0 0; }
.member-choices { max-height: min(52vh,430px); overflow: auto; margin-top: 10px; border: 1px solid var(--line); }
.member-choice { min-width: 0; min-height: 54px; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; padding: 8px 11px; border-bottom: 1px solid var(--line); cursor: pointer; }
.member-action-row { grid-template-columns: minmax(0,1fr) auto; cursor: default; }
.member-choice.filtered-out { display: none; }
.member-choice:last-child { border-bottom: 0; }
.member-choice-copy { min-width: 0; display: grid; gap: 3px; }
.member-choice-copy strong, .member-choice-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-choice-copy small { color: var(--muted); }
.member-row-action { min-width: 72px; height: 34px; min-height: 34px; padding: 0 10px; }
.member-list-empty { padding: 16px 12px; margin: 0; }
.member-search-empty { margin: 10px 0 0; }
.member-feedback { min-height: 18px; margin: 10px 0 0; color: #218c57; font-size: 12px; }
.member-result-limit { margin: 0; padding: 9px 11px; border-top: 1px solid var(--line); }

.admin-grid { height: 100%; min-height: 0; overflow: auto; padding: 32px; }
.metric-row { display: grid; grid-template-columns: repeat(4,minmax(140px,1fr)); gap: 12px; margin-top: 24px; }
.metric { background: #fff; border: 1px solid var(--line); padding: 18px; }
.metric strong { display: block; font-size: 26px; margin-top: 8px; }
.admin-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; gap: 12px; }
.table-wrap { margin-top: 12px; overflow: auto; border: 1px solid var(--line); background: #fff; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 860px; }
.admin-table th, .admin-table td { padding: 11px 13px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.admin-table th { background: #f3f6f7; color: var(--muted); font-size: 12px; }
.status-text.online { color: #178b56; }
.status-text.disabled { color: var(--danger); }

@media (max-width: 720px) {
  input, textarea { font-size: 16px; }
  .workspace { grid-template-columns: 1fr; }
  .conversation-pane, .chat-pane { grid-column: 1; grid-row: 1; }
  .workspace.chat-open .conversation-pane { display: none; }
  .workspace:not(.chat-open) .chat-pane { display: none; }
  .chat-pane { grid-template-rows: auto minmax(0,1fr) auto; }
  .mobile-back { position: relative; display: inline-grid; place-items: center; flex: 0 0 58px; width: 58px; min-height: 42px; margin-right: 6px; padding: 0 10px; border: 1px solid #a9c9c5; background: #edf5f4; color: var(--accent); font-size: 14px; font-weight: 700; overflow: visible; }
  .back-unread-badge { position: absolute; top: -7px; right: -7px; }
  .chat-header { min-height: 72px; padding: 10px 9px; flex-wrap: wrap; gap: 7px 8px; align-content: center; }
  .chat-heading { flex: 1 1 0; }
  .chat-notification-settings { min-width: 54px; padding: 0 7px; }
  .header-actions { flex: 1 0 100%; max-width: 100%; min-width: 0; flex-wrap: wrap; overflow: visible; gap: 6px; }
  .header-actions button { min-width: 0; padding: 0 11px; white-space: nowrap; }
  .bubble { max-width: 88%; }
  .messages { padding: 14px 11px; }
  .scroll-bottom { right: 14px; width: 40px; height: 40px; }
  .composer { padding: 9px; padding-bottom: max(9px, env(safe-area-inset-bottom)); }
  .composer-row { grid-template-columns: 42px minmax(0, 1fr) 58px; gap: 6px; }
  .composer-row .primary { min-width: 0; padding: 0 8px; }
  .composer-hint { margin-left: 0; }
  .metric-row { grid-template-columns: 1fr 1fr; }
  .image-viewer { padding: 16px; }
  .image-viewer-content { width: calc(100vw - 32px); height: calc(100vh - 32px); }
  .text-viewer-header { padding-left: 12px; gap: 8px; }
  .text-viewer-download { min-height: 38px; padding: 0 10px; }
  .text-viewer-close { width: 38px; height: 38px; }
  .text-viewer-content { padding: 16px 12px; }
  .text-viewer-note { padding: 7px 12px; line-height: 1.5; }
}
