/* Full-window adaptation of the reviewed two-device reference. */
html, body { margin: 0; min-height: 100%; }
#chatonion-connected { min-height: 100dvh; background: var(--cx-bg); }
#chatonion-connected .ch-frame { min-height: 100dvh; display: flex; flex-direction: column; border: 0; border-radius: 0; }
#chatonion-connected .ch-main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
#chatonion-connected .cx-bottom-nav { display: none; }
#chatonion-connected .cx-build-note { padding: 8px 24px; background: var(--cx-soft); color: var(--cx-muted); font-size: 13px; }
#chatonion-connected .cx-app-notice { padding: 0 24px; overflow-wrap: anywhere; }
#chatonion-connected .cx-module button.cx-app-back,
#chatonion-connected .cx-module button.cx-app-back:hover { border: 0; background: transparent; padding: 0; width: 44px; font-size: 26px; box-shadow: none; }
#chatonion-connected .cx-module .ch-search input { flex: 1; width: 0; min-width: 0; }
#chatonion-connected .cx-module .ch-search button { flex: 0 0 auto; white-space: nowrap; }
#chatonion-connected .cx-app-list { display: grid; gap: 10px; margin: 16px 0; }
#chatonion-connected .cx-app-list button { text-align: left; overflow-wrap: anywhere; }
#chatonion-connected .cx-app-list small { display: block; }
#chatonion-connected .cx-app-log { flex: 1; overflow-y: auto; min-height: 0; }
#chatonion-connected .cx-app-log article { margin: 16px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
#chatonion-connected .cx-app-chat { display: flex; flex-direction: column; min-height: 60dvh; }
#chatonion-connected .cx-app-composer { position: sticky; bottom: 0; background: var(--cx-paper); border: 1px solid var(--cx-line); border-radius: 14px; padding: 12px; }
#chatonion-connected .cx-app-composer textarea { width: 100%; min-height: 72px; resize: vertical; font: inherit; color: var(--cx-ink); background: var(--cx-paper); border: 0; }
#chatonion-connected .cx-app-composer button { background: transparent; border: 0; font-size: 24px; }
#chatonion-connected button:disabled { opacity: .6; cursor: default; }
#chatonion-connected .cx-unavailable { padding: 16px 0; }
@media(max-width: 700px) {
  #chatonion-connected .ch-top { grid-template-columns: 1fr auto; padding: 12px 18px; }
  #chatonion-connected .ch-top .ch-nav { display: none; }
  #chatonion-connected .ch-account { grid-column: 2; grid-row: 1; }
  #chatonion-connected .ch-main { padding: 20px 18px; }
  #chatonion-connected .ch-frame { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
  #chatonion-connected .cx-bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; }
  #chatonion-connected .cx-app-composer { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
/* Recovery codes and masked entry keep the reviewed full-width form spacing. */
.cx-account-recovery label { display: block; margin-top: 16px; margin-bottom: 8px; }
.cx-account-recovery input, .cx-account-recovery textarea { box-sizing: border-box; width: 100%; max-width: 620px; display: block; padding: 14px; font: inherit; border: 1px solid #777; border-radius: 8px; }
.cx-account-recovery textarea { min-height: 96px; font-family: monospace; overflow-wrap: anywhere; }
.cx-account-recovery button { margin-top: 14px; margin-right: 10px; }

/* Use the reviewed chat components in the actual viewport, without mock device heights. */
#chatonion-connected.cx-live-chat-screen { height: 100dvh; min-height: 0; overflow: hidden; }
#chatonion-connected.cx-live-chat-screen > .cx-module { height: 100%; min-height: 0; }
#chatonion-connected.cx-live-chat-screen .ch-frame { height: 100%; min-height: 0; box-sizing: border-box; overflow: hidden; }
#chatonion-connected.cx-live-chat-screen .ch-main { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
#chatonion-connected.cx-live-chat-screen .ch-top { flex: 0 0 auto; grid-template-columns: auto minmax(0, 1fr) auto; }
#chatonion-connected .cx-top-chat-tools { justify-self: end; align-self: center; gap: 4px; }
#chatonion-connected .cx-top-chat-tools[hidden] { display: none; }
#chatonion-connected .cx-top-chat-tools button { padding: 8px; width: 40px; height: 40px; border: 0; background: transparent; }
#chatonion-connected.cx-live-chat-screen .ch-account { grid-column: 4; }
#chatonion-connected .cx-live-conversation { flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
#chatonion-connected .cx-route-heading { padding: 10px 24px; flex: 0 0 auto; min-width: 0; }
#chatonion-connected .cx-route-heading h1 { margin: 0; font-size: 24px; }
#chatonion-connected .cx-route-heading p { margin: 0 0 3px; }
#chatonion-connected .cx-route-heading .cx-back-arrow { flex-shrink: 0; padding: 8px; width: 44px; height: 44px; border: 0; background: transparent; }
#chatonion-connected .cx-live-conversation .cx-group-layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 0; overflow: hidden; }
#chatonion-connected .cx-live-conversation .cx-topic-sidebar { display: flex; flex-direction: column; min-height: 0; position: static; width: auto; max-width: none; border-radius: 0; overflow-y: auto; }
#chatonion-connected .cx-topic-head { display: flex; justify-content: space-between; align-items: center; }
#chatonion-connected .cx-topic-head h2 { font-size: 16px; }
#chatonion-connected .cx-topic-sidebar > button { text-align: left; margin-bottom: 8px; }
#chatonion-connected .cx-topic-sidebar > button[aria-current] { background: var(--cx-soft); border-color: var(--cx-muted); }
#chatonion-connected .cx-topics-close { display: none; }
#chatonion-connected .cx-group-head { padding: 4px 4px 10px; border-bottom: 1px solid var(--ch-line); margin-bottom: 8px; }
#chatonion-connected .cx-group-head h2 { margin: 0 0 4px; font-size: 18px; overflow-wrap: anywhere; }
#chatonion-connected .cx-group-head p { margin: 0; font-size: 13px; color: var(--ch-muted); overflow-wrap: anywhere; }
#chatonion-connected .cx-module .cx-topic-sidebar > button.cx-group-tools { display: flex; align-items: center; gap: 8px; }
#chatonion-connected .cx-module .cx-topic-sidebar > button.cx-group-tools svg { width: 18px; height: 18px; flex: 0 0 18px; }
#chatonion-connected .cx-topic-row { position: relative; display: flex; align-items: stretch; flex-wrap: wrap; border-bottom: 1px solid var(--ch-line); }
#chatonion-connected .cx-live-conversation .cx-topic-sidebar .cx-topic-list .cx-topic-row > button:first-child { border-bottom: 0; }
#chatonion-connected .cx-topic-row > button:first-child { flex: 1; min-width: 0; }
#chatonion-connected .cx-module .cx-topic-row > button.cx-topic-menu-button { flex: 0 0 36px; width: 36px; min-height: 0; padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none; display: grid; place-items: center; color: var(--ch-muted); }
#chatonion-connected .cx-module .cx-topic-row > button.cx-topic-menu-button:hover, #chatonion-connected .cx-module .cx-topic-row > button.cx-topic-menu-button[aria-expanded="true"] { background: var(--ch-soft); color: var(--ch-ink); border-radius: 8px; }
#chatonion-connected .cx-topic-menu { flex: 0 0 100%; display: grid; gap: 2px; margin: 4px 0 10px 12px; padding: 6px; border: 1px solid var(--ch-line); border-radius: 10px; background: var(--ch-paper); box-shadow: 0 8px 24px #0004; }
#chatonion-connected .cx-module .cx-topic-menu > button { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; text-align: left; font-size: 14px; }
#chatonion-connected .cx-module .cx-topic-menu > button:hover { background: var(--ch-soft); }
#chatonion-connected .cx-module .cx-topic-menu > button svg { width: 18px; height: 18px; }
#chatonion-connected .cx-live-conversation .cx-chat { position: relative; display: flex; flex-direction: column; flex: 1; min-width: 0; min-height: 0; overflow: hidden; padding: 0 24px; border: 0; border-radius: 0; background: var(--cx-bg); }
#chatonion-connected .cx-chat-head { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; }
#chatonion-connected .cx-chat-head h2 { font-size: 16px; margin: 0; }
#chatonion-connected [data-chat-log] { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; overflow-anchor: none; padding: 12px 0 12px; scroll-padding: 16px; }
#chatonion-connected [data-chat-compose] { position: relative; flex: 0 0 auto; padding: 8px 0 12px; margin-top: auto; background: var(--cx-bg); }
#chatonion-connected .cx-compose-box { padding: 8px 10px; border-radius: 14px; }
#chatonion-connected .cx-compose-box textarea { box-sizing: border-box; width: 100%; min-height: 52px; height: 60px; max-height: min(130px, 25dvh); resize: vertical; font: inherit; }
#chatonion-connected .cx-chat-tools { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
#chatonion-connected .cx-chat-tools button { width: 40px; min-width: 36px; height: 40px; padding: 7px; background: transparent; border: 0; }
#chatonion-connected .cx-compose-spacer { flex: 1; }
#chatonion-connected [data-chat-queued] { max-height: 110px; overflow-y: auto; }
#chatonion-connected .cx-queued-file, #chatonion-connected .cx-reply-draft { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 8px; background: var(--cx-soft); border-radius: 8px; margin-bottom: 6px; }
#chatonion-connected .cx-queued-file span, #chatonion-connected .cx-reply-draft span { min-width: 0; overflow-wrap: anywhere; }
#chatonion-connected .cx-queued-file button, #chatonion-connected .cx-reply-draft button { flex-shrink: 0; width: 36px; height: 36px; padding: 6px; border: 0; background: transparent; }
#chatonion-connected .cx-message { position: relative; margin: 14px 0; padding: 8px 10px; border-radius: 10px; min-width: 0; }
#chatonion-connected .cx-chat .cx-message-selected { background: var(--cx-soft); padding: 58px 10px 8px; }
#chatonion-connected .cx-message-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
#chatonion-connected .cx-message-meta time { font-size: 12px; color: var(--cx-muted); }
#chatonion-connected button.cx-message-author { display: inline-flex; align-items: center; gap: 8px; font-weight: 650; border: 0; padding: 0; background: transparent; min-width: 0; max-width: 100%; overflow-wrap: anywhere; text-align: left; }
#chatonion-connected .cx-avatar-fallback { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: var(--cx-soft); border: 1px solid var(--cx-line); }
#chatonion-connected button.cx-message-trigger { display: block; width: 100%; text-align: left; padding: 8px 0; border: 0; background: transparent; border-radius: 4px; font-weight: 400; }
#chatonion-connected .cx-message-body, #chatonion-connected .cx-preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
#chatonion-connected .cx-message-actions { position: absolute; right: 4px; top: 6px; max-width: calc(100% - 8px); width: 352px; z-index: 2; }
/* The reviewed sheet gives these buttons width:0 for its fixed-width flex row.
   Give the runtime row a definite width and eight tracks, including on phones. */
#chatonion-connected .cx-message-actions .cx-reactions { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0; margin: 0; background: var(--cx-paper); border: 1px solid var(--cx-line); border-radius: 10px; padding: 3px; }
#chatonion-connected .cx-message-actions .cx-reactions > button { box-sizing: border-box; width: 100%; min-width: 0; height: 44px; min-height: 44px; padding: 4px; font-size: clamp(17px, 5vw, 24px); background: transparent; border: 0; }
#chatonion-connected .cx-message-actions .cx-reactions svg { width: 22px; height: 22px; max-width: 100%; flex-shrink: 1; }
#chatonion-connected .cx-message-menu { position: absolute; right: 0; top: 100%; width: 220px; max-height: 220px; overflow: auto; padding: 6px; background: var(--cx-paper); border: 1px solid var(--cx-line); border-radius: 8px; box-shadow: 0 8px 30px #0005; }
#chatonion-connected .cx-message-menu button { display: block; width: 100%; padding: 8px; text-align: left; border: 0; background: transparent; }
#chatonion-connected .cx-reply-reference { display: block; max-width: 100%; text-align: left; padding: 4px 8px; border-width: 0 0 0 2px; background: transparent; font-size: 13px; }
#chatonion-connected .cx-shared-item { display: inline-flex; align-items: center; gap: 8px; }
#chatonion-connected .cx-live-panel { position: absolute; z-index: 10; top: 0; bottom: 0; right: 0; width: 420px; max-width: 100%; box-sizing: border-box; display: flex; flex-direction: column; border: 1px solid var(--cx-line); background: var(--cx-paper); box-shadow: -12px 0 40px #0004; }
#chatonion-connected .cx-live-panel header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; flex-shrink: 0; border-bottom: 1px solid var(--cx-line); }
#chatonion-connected .cx-live-panel h2 { font-size: 20px; margin: 0; }
#chatonion-connected .cx-live-panel-body { overflow: auto; min-height: 0; padding: 18px; }
#chatonion-connected .cx-file-entry { display: flex; align-items: center; width: 100%; gap: 10px; margin-bottom: 10px; text-align: left; }
#chatonion-connected .cx-emoji-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
#chatonion-connected .cx-emoji-grid button { font-size: 26px; }
#chatonion-connected .cx-profile-banner { height: 90px; border-radius: 10px; background: var(--cx-soft); }
#chatonion-connected .cx-profile-avatar { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin-top: -28px; margin-left: 12px; border: 4px solid var(--cx-paper); background: var(--cx-bg); font-size: 26px; }
#chatonion-connected .cx-group-setup { max-width: 900px; margin: auto; }
#chatonion-connected .cx-send-status { margin: 6px 0 0; font-size: 13px; }
#chatonion-connected.cx-live-chat-screen .cx-app-notice { flex: 0 0 auto; margin: 0; font-size: 13px; max-height: 64px; overflow-y: auto; }
#chatonion-connected.cx-live-chat-screen .cx-app-notice:empty { display: none; }
@media(max-width: 700px) {
  #chatonion-connected.cx-live-chat-screen .ch-top { grid-template-columns: auto minmax(0, 1fr) auto; gap: 5px; padding: 6px 12px; }
  #chatonion-connected.cx-live-chat-screen .ch-account { grid-column: 3; grid-row: 1; }
  #chatonion-connected.cx-live-chat-screen .ch-brand { gap: 5px; min-width: 0; }
  #chatonion-connected.cx-live-chat-screen .ch-wordmark { font-size: 20px; }
  #chatonion-connected.cx-live-chat-screen .ch-logo { width: 28px; height: 28px; }
  #chatonion-connected.cx-live-chat-screen .ch-brand > span:last-child { font-size: 20px; }
  #chatonion-connected.cx-live-chat-screen .ch-rings { width: 28px; height: 28px; flex-shrink: 0; }
  #chatonion-connected.cx-live-chat-screen .cx-build-note { padding: 5px 12px; font-size: 11px; }
  #chatonion-connected .cx-route-heading { padding: 8px 12px; }
  #chatonion-connected .cx-route-heading h1 { font-size: 20px; }
  #chatonion-connected .cx-live-conversation .cx-group-layout { display: flex; position: relative; }
  #chatonion-connected .cx-live-conversation .cx-topic-sidebar { display: none; position: absolute; left: auto; right: 0; top: 0; bottom: 0; width: 256px; max-width: calc(100% - 24px); z-index: 8; box-shadow: -12px 0 30px #0005; }
  #chatonion-connected .cx-live-conversation .cx-topic-sidebar.cx-topics-open { display: flex; }
  #chatonion-connected .cx-topics-close { display: block; }
  #chatonion-connected .cx-live-conversation .cx-chat { padding: 0 12px; }
  #chatonion-connected .cx-message { padding-left: 4px; padding-right: 4px; }
  #chatonion-connected .cx-chat .cx-message-selected { padding: 58px 4px 8px; }
  #chatonion-connected .cx-live-panel { width: 100%; }
  #chatonion-connected [data-chat-compose] { padding-bottom: 8px; }
}

/* Remembered-browser access: opt-in before sign-in, return unlock, and the finish-setup step. */
#chatonion-connected .cx-remember-option { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 4px; cursor: pointer; }
#chatonion-connected .cx-remember-option input[type="checkbox"] { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--ch-action, var(--cx-action)); }
#chatonion-connected .cx-remembered { margin: 0 0 18px; padding: 16px; background: var(--ch-soft, var(--cx-soft)); border-radius: 12px; }
#chatonion-connected .cx-remembered h2 { margin-top: 0; }
#chatonion-connected .cx-remembered button { margin: 10px 10px 0 0; }
#chatonion-connected .cx-remembered button.ch-link { margin-left: 0; padding-left: 0; }
/* Signed out, the account spot carries Sign in as a pill instead of the round account icon. */
#chatonion-connected .cx-module .ch-account.cx-sign-in { width: auto; border-radius: 22px; padding: 9px 16px; font-weight: 600; white-space: nowrap; }

/* Personal companion: setup steps reuse the reviewed first-use classes; these cover the conversation and status rows. */
#chatonion-connected .cx-companion-history { display: grid; gap: 10px; margin: 16px 0; }
#chatonion-connected .cx-companion-history article { padding: 12px 14px; border-radius: 14px; background: var(--ch-paper, var(--cx-paper)); border: 1px solid var(--ch-line, var(--cx-line)); white-space: pre-wrap; overflow-wrap: anywhere; }
#chatonion-connected .cx-companion-history article.cx-companion-own { background: var(--ch-soft, var(--cx-soft)); border-color: transparent; margin-left: 12%; }
#chatonion-connected .cx-companion-history article small { display: block; margin-bottom: 4px; color: var(--ch-muted, var(--cx-muted)); font-size: 12px; }
#chatonion-connected .cx-companion-key { display: flex; gap: 8px; align-items: center; }
#chatonion-connected .cx-companion-key input { flex: 1; min-width: 0; }
#chatonion-connected .cx-companion-form textarea, #chatonion-connected .cx-companion-form input[type="text"], #chatonion-connected .cx-companion-form input[type="password"], #chatonion-connected .cx-companion-form select { box-sizing: border-box; width: 100%; max-width: 620px; display: block; font: inherit; font-size: 16px; color: var(--ch-ink, var(--cx-ink)); background: var(--ch-paper, var(--cx-paper)); border: 1px solid var(--ch-line, var(--cx-line)); border-radius: 12px; padding: 12px; }
#chatonion-connected .cx-companion-form textarea { min-height: 72px; resize: vertical; }
#chatonion-connected .cx-companion-form .ch-card-fields textarea { min-height: 70px; }
#chatonion-connected .cx-companion-form .ch-field-error:empty { display: none; }
#chatonion-connected .cx-companion-form .ch-field-error { color: var(--ch-action, var(--cx-action)); font-size: 13px; margin: 4px 0 0; }
#chatonion-connected .cx-companion-form details { border-top: 1px solid var(--ch-line, var(--cx-line)); padding: 14px 0; }
#chatonion-connected .cx-companion-form summary { cursor: pointer; font-weight: 600; min-height: 44px; display: list-item; align-content: center; }
#chatonion-connected .cx-companion-form .ch-field { display: block; font-size: 14px; font-weight: 500; margin: 12px 0 6px; }
#chatonion-connected .cx-companion-model { font-size: 13px; color: var(--ch-muted, var(--cx-muted)); margin: 6px 0 0; }
/* Companion avatars: the large tile in setup and settings, the small round mark beside a name in the conversation. */
#chatonion-connected .cx-companion-avatar { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; flex-shrink: 0; }
#chatonion-connected .cx-avatar-img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 6px; }
#chatonion-connected .cx-chat-head h2 .cx-avatar-img { width: 26px; height: 26px; }
#chatonion-connected .cx-live-conversation .cx-message-body.cx-preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
#chatonion-connected .cx-live-conversation .cx-message-author .ch-label { margin-left: 6px; }

/* Companion presence: the avatar docks beside the active area; the panel is a side column on desktop and replaces the page on phone. */
#chatonion-connected .ch-work { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
#chatonion-connected .ch-work[data-panel="true"] { grid-template-columns: minmax(0, 1fr) 320px; }
#chatonion-connected .ch-work .ch-main { min-width: 0; }
#chatonion-connected .ch-drawer { overflow-y: auto; min-height: 0; }
#chatonion-connected .ch-drawer .ch-section-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
#chatonion-connected .ch-drawer textarea { box-sizing: border-box; width: 100%; min-height: 84px; font: inherit; font-size: 15px; padding: 10px; border: 1px solid var(--ch-line, var(--cx-line)); border-radius: 10px; background: var(--ch-bg, var(--cx-bg)); color: var(--ch-ink, var(--cx-ink)); resize: vertical; }
#chatonion-connected .ch-drawer form button { margin-top: 10px; margin-right: 8px; }
#chatonion-connected .ch-drawer .ch-settings-menu button { text-align: left; display: flex; gap: 8px; align-items: center; }
#chatonion-connected .ch-peel { cursor: pointer; }
#chatonion-connected .ch-peel .cx-peel-default { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ch-soft, var(--cx-soft)); color: var(--ch-action, var(--cx-action)); }
#chatonion-connected .ch-peel-size-small .cx-peel-default { width: 40px; height: 40px; }
#chatonion-connected .ch-peel img { border-radius: 50%; object-fit: cover; }
#chatonion-connected .cx-context-row { display: flex; gap: 12px; align-items: flex-start; }
#chatonion-connected .cx-context-row > :first-child { flex: 1; min-width: 0; }
#chatonion-connected .cx-context-row .ch-dock:empty { display: none; }
#chatonion-connected .ch-section-head .ch-dock:empty { display: none; }
/* Runtime adapters for the connected mockup's supporting screens. Original reviewed.css remains authoritative. */
#chatonion-connected .cx-reviewed-screen { max-width: 1040px; margin-inline: auto; min-width: 0; }
#chatonion-connected .cx-reviewed-screen label:not(.cx-nr-check) { display: block; margin: 14px 0 6px; }
#chatonion-connected .cx-reviewed-screen input:not([type=checkbox]):not([type=range]):not([type=radio]),
#chatonion-connected .cx-reviewed-screen select { width: 100%; min-width: 0; padding: 10px; border: 1px solid var(--ch-line); border-radius: 10px; color: var(--ch-ink); background: var(--ch-paper); font: inherit; }
#chatonion-connected .cx-reviewed-screen input[type=range] { max-width: 100%; }
#chatonion-connected .cx-reviewed-screen .cx-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
#chatonion-connected .cx-reviewed-screen .cx-mod-section { margin: 20px 0; padding: 18px; border: 1px solid var(--ch-line); border-radius: 14px; background: var(--ch-paper); }
#chatonion-connected .cx-reviewed-screen pre { white-space: pre-wrap; overflow-wrap: anywhere; }
#chatonion-connected .cx-nr-check { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; }
#chatonion-connected .cx-nr-check input { margin-top: 6px; flex: 0 0 auto; }
#chatonion-connected .cx-group-links { display: grid; gap: 4px; margin-top: 18px; }
#chatonion-connected .cx-topic-sidebar .cx-call-dock { margin-top: auto; border-top: 1px solid var(--ch-line); padding-top: 12px; display: flex; flex-wrap: wrap; }
#chatonion-connected .cx-reviewed-screen .cx-call-video-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
#chatonion-connected .cx-reviewed-screen .cx-call-video-tile { background: var(--ch-soft); padding: 40px 12px; text-align: center; border-radius: 14px; }
@media (max-width: 700px) { #chatonion-connected .cx-reviewed-screen .cx-call-video-grid { grid-template-columns: minmax(0,1fr); } }
/* In a conversation the avatar floats at the right edge and slides toward the composer while typing, as in the reviewed chat. */
#chatonion-connected .cx-chat .cx-draft-dock { position: absolute; top: 44px; right: 10px; z-index: 8; width: auto; min-height: 0; transition: transform 420ms ease; pointer-events: none; }
#chatonion-connected .cx-chat .cx-draft-dock .ch-peel { pointer-events: auto; width: 52px; height: 52px; min-height: 52px; border: 2px solid var(--cx-action); background: var(--cx-paper); box-shadow: 0 4px 14px #0003; }
#chatonion-connected .cx-chat .cx-draft-dock .ch-peel img, #chatonion-connected .cx-chat .cx-draft-dock .cx-peel-default { width: 44px; height: 44px; }
#chatonion-connected .cx-chat.cx-typing .cx-draft-dock { transform: translateY(var(--cx-draft-shift, 0px)); }
@media (prefers-reduced-motion: reduce) { #chatonion-connected .cx-chat .cx-draft-dock { transition: none; } }
#chatonion-connected .cx-module button.ch-brand { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; text-align: left; cursor: pointer; }
#chatonion-connected .cx-module button.ch-brand:focus-visible { outline: 3px solid var(--ch-accent, #8cbaf4); outline-offset: 5px; }
#chatonion-connected .cx-module button.ch-account:has(> img) { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; box-shadow: none; }
#chatonion-connected .cx-module button.ch-account > img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
#chatonion-connected .cx-module button.ch-account:has(> img):focus-visible { outline: 3px solid var(--ch-accent, #8cbaf4); outline-offset: 3px; }
/* Avatar-sized file controls. The native chooser stays behind the image button. */
#chatonion-connected .cx-avatar-picker { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 72px; width: 72px; height: 72px; min-height: 72px; padding: 0; border: 0; border-radius: 18px; background: transparent; cursor: pointer; overflow: hidden; }
#chatonion-connected .cx-avatar-picker .ch-settings-avatar, #chatonion-connected .cx-avatar-picker .cx-companion-avatar { display: block; width: 72px; height: 72px; min-width: 72px; margin: 0; object-fit: cover; }
#chatonion-connected .cx-avatar-picker:focus-visible { outline: 3px solid var(--ch-accent, #8cbaf4); outline-offset: 3px; }
#chatonion-connected .cx-avatar-edit { position: absolute; right: 0; bottom: 0; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 8px 0 0 0; background: #203e59; color: #fff; font-size: 20px; line-height: 1; }
#chatonion-connected input[type="file"][hidden] { display: none !important; }
@media (max-width: 700px) {
  #chatonion-connected .ch-work[data-panel="true"] { grid-template-columns: minmax(0, 1fr); }
  #chatonion-connected .ch-work[data-panel="true"] .ch-main { display: none; }
  #chatonion-connected .ch-drawer { border-left: 0; }
}
/* The reviewed module rules pin .ch-work to align-items:start with a 700px floor, which left a blank band under the chat. On the chat screen the work area fills the window. */
#chatonion-connected.cx-live-chat-screen .cx-module-home .ch-work, #chatonion-connected.cx-live-chat-screen .cx-module-first .ch-work { align-items: stretch; min-height: 0; height: 100%; grid-template-rows: minmax(0, 1fr); }
#chatonion-connected.cx-live-chat-screen .cx-module-home .ch-main, #chatonion-connected.cx-live-chat-screen .cx-module-first .ch-main { height: 100%; min-height: 0; }
/* Owner and moderator links stay behind one button in the topic sidebar. */
#chatonion-connected .cx-topic-sidebar .cx-group-tools { margin-top: 18px; text-align: left; }
#chatonion-connected .cx-topic-sidebar .cx-group-tools[aria-expanded="true"] { background: var(--cx-soft); }

/* Ruled 2026-09-07: Owner and mods sits above Topics, and sidebar entries are a plain list with a divider between them, not bordered buttons. */
#chatonion-connected .cx-live-conversation .cx-topic-sidebar .cx-topic-list .cx-topic-row > button:first-child, #chatonion-connected .cx-live-conversation .cx-topic-sidebar .cx-group-links > button, #chatonion-connected .cx-live-conversation .cx-topic-sidebar .cx-group-tools { display: block; width: 100%; margin: 0; padding: 12px 10px; border: 0; border-bottom: 1px solid var(--ch-line); border-radius: 0; background: transparent; color: var(--ch-ink); text-align: left; font: inherit; }
#chatonion-connected .cx-live-conversation .cx-topic-sidebar .cx-group-tools { margin-top: 0; font-weight: 600; }
#chatonion-connected .cx-live-conversation .cx-topic-sidebar .cx-group-tools[aria-expanded="true"] { background: transparent; }
#chatonion-connected .cx-live-conversation .cx-topic-sidebar .cx-group-links { display: block; gap: 0; margin: 0 0 6px; }
#chatonion-connected .cx-live-conversation .cx-topic-sidebar .cx-group-links > button { padding-left: 22px; }
#chatonion-connected .cx-live-conversation .cx-topic-sidebar .cx-topic-list .cx-topic-row > button:first-child[aria-current] { background: transparent; border-color: var(--ch-line); font-weight: 600; box-shadow: inset 3px 0 0 var(--cx-action); }
#chatonion-connected .cx-live-conversation .cx-topic-sidebar .cx-topic-list .cx-topic-row > button:first-child:hover, #chatonion-connected .cx-live-conversation .cx-topic-sidebar .cx-group-links > button:hover, #chatonion-connected .cx-live-conversation .cx-topic-sidebar .cx-group-tools:hover { background: var(--ch-soft); }
#chatonion-connected .cx-live-conversation .cx-topic-sidebar .cx-topic-head { margin-top: 14px; }

/* Batch wiring, 2026-09-07: unread badges, in-app alert banners, thread links, saved reading size and motion preferences. */
#chatonion-connected .cx-alert-badge { display: inline-block; min-width: 18px; padding: 1px 6px; margin-left: 8px; border-radius: 999px; background: var(--cx-action, var(--ch-action)); color: var(--ch-on-action, #fff); font-size: 12px; line-height: 16px; text-align: center; vertical-align: middle; }
#chatonion-connected .cx-alerts:empty { display: none; }
#chatonion-connected .cx-notification-banner { display: flex; align-items: center; gap: 12px; margin: 8px 16px; padding: 10px 14px; border: 1px solid var(--ch-line); border-radius: 12px; background: var(--ch-paper); box-shadow: 0 6px 20px #0002; }
#chatonion-connected .cx-notification-banner > div { flex: 1; min-width: 0; }
#chatonion-connected .cx-notification-banner p { margin: 4px 0 0; font-size: 14px; overflow-wrap: anywhere; }
#chatonion-connected .cx-thread-link { display: inline-block; margin: 6px 0 0; padding: 4px 10px; border: 1px solid var(--ch-line); border-radius: 999px; background: var(--ch-soft); color: var(--ch-ink); font: inherit; font-size: 13px; }
#chatonion-connected .cx-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#chatonion-connected .cx-type-choices label { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; }
#chatonion-connected .cx-type-choices small { display: block; color: var(--ch-muted); }
#chatonion-connected .gj-review dt { font-weight: 600; margin-top: 10px; }
#chatonion-connected .gj-review dd { margin: 2px 0 0; }
#chatonion-connected[data-reading-size="larger"] .cx-module-home, #chatonion-connected[data-reading-size="larger"] .cx-module-first, #chatonion-connected[data-reading-size="larger"] .cx-module-group { font-size: 18px; }
#chatonion-connected[data-reading-size="largest"] .cx-module-home, #chatonion-connected[data-reading-size="largest"] .cx-module-first, #chatonion-connected[data-reading-size="largest"] .cx-module-group { font-size: 20px; }
#chatonion-connected[data-reduced-motion="true"] * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }

/* Layout ruling 2026-09-07: management screens are one organized frame, not bordered bubble buttons dropped on a page.
   A rail names the group and its six management sections in one consistent place; the body is a stack of labelled panels,
   each with one primary action, plain text secondary actions, and destructive actions in a panel of their own, last. */
#chatonion-connected .cx-manage { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; align-items: start; padding: 0 24px 24px; }
#chatonion-connected .cx-manage-rail { position: sticky; top: 84px; min-width: 0; }
#chatonion-connected .cx-manage-eyebrow { margin: 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ch-muted); }
#chatonion-connected .cx-manage-name { margin: 2px 0 10px; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
#chatonion-connected .cx-manage-body { min-width: 0; }
/* The divided list accepted for the sidebar, reused for every list of choices and entries. */
#chatonion-connected .cx-list { display: block; border-top: 1px solid var(--ch-line); }
#chatonion-connected .cx-module .cx-list > button, #chatonion-connected .cx-list-row { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; padding: 12px 8px; border: 0; border-bottom: 1px solid var(--ch-line); border-radius: 0; background: transparent; color: var(--ch-ink); text-align: left; font: inherit; box-sizing: border-box; box-shadow: none; }
#chatonion-connected .cx-module .cx-list > button:hover { background: var(--ch-soft); }
#chatonion-connected .cx-module .cx-list > button[aria-current="page"] { font-weight: 600; box-shadow: inset 3px 0 0 var(--ch-action); }
#chatonion-connected .cx-list-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
#chatonion-connected .cx-list-text small { font-size: 13px; color: var(--ch-muted); font-weight: 400; }
#chatonion-connected .cx-list > button > svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--ch-muted); }
#chatonion-connected .cx-module .cx-list > button.cx-list-back { color: var(--ch-action); }
#chatonion-connected .cx-list-row { flex-wrap: wrap; }
#chatonion-connected .cx-module .cx-list-row .cx-list-open { flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; text-align: left; display: flex; font: inherit; color: var(--ch-ink); }
#chatonion-connected .cx-module .cx-list-row .cx-list-open:hover { background: transparent; text-decoration: underline; }
#chatonion-connected .cx-list-row > .ch-link { flex-shrink: 0; padding: 6px 4px; }
#chatonion-connected .cx-list-row .cx-actions { flex-basis: 100%; margin: 4px 0 0; }
#chatonion-connected .cx-request-note { display: block; margin-top: 6px; padding: 10px 12px; background: var(--ch-soft); border-radius: 10px; font-size: 15px; color: var(--ch-ink); }
/* One panel per subject: a heading that says what it is, its content, then its actions. */
#chatonion-connected .cx-panel { margin: 0 0 18px; padding: 18px 20px 16px; border: 1px solid var(--ch-line); border-radius: 14px; background: var(--ch-paper); min-width: 0; }
#chatonion-connected .cx-panel > h2 { font-size: 18px; font-weight: 600; margin: 0 0 8px; }
#chatonion-connected .cx-panel > p { margin: 0 0 10px; }
#chatonion-connected .cx-panel .cx-list { margin: 8px 0 4px; }
#chatonion-connected .cx-panel .gj-review { margin: 0; }
#chatonion-connected .cx-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 4px; }
#chatonion-connected .cx-module .cx-actions .ch-link, #chatonion-connected .cx-module .cx-list-row > .ch-link { border: 0; background: transparent; color: var(--ch-action); padding: 6px 0; box-shadow: none; }
#chatonion-connected .cx-module .cx-actions .ch-link:hover, #chatonion-connected .cx-module .cx-list-row > .ch-link:hover { background: transparent; text-decoration: underline; }
#chatonion-connected .cx-panel-danger { border-color: light-dark(#e3b2b6, #7a3a40); }
#chatonion-connected .cx-panel-danger > h2 { color: light-dark(#b33139, #ff7b82); }
#chatonion-connected .cx-module button.cx-danger { border: 1px solid light-dark(#b33139, #ff7b82); color: light-dark(#b33139, #ff7b82); background: transparent; }
#chatonion-connected .cx-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#chatonion-connected .cx-plain-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
#chatonion-connected .cx-reviewed-screen .cx-panel textarea { width: 100%; box-sizing: border-box; }
#chatonion-connected .cx-reviewed-screen .cx-panel label:not(.cx-nr-check):first-of-type { margin-top: 6px; }
/* Group settings is the creation form in editing mode; inside the frame it takes the frame's width and its fields sit in panels. */
#chatonion-connected .cx-group-setup.cx-group-manage, #chatonion-connected .cx-module-group .cx-group-setup.cx-group-manage { max-width: 1040px; }
#chatonion-connected .cx-group-form { display: block; }
#chatonion-connected .cx-group-form label:not(.gj-choice) { display: block; margin: 12px 0 6px; }
#chatonion-connected .cx-group-form input:not([type=radio]):not([type=checkbox]), #chatonion-connected .cx-group-form textarea { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--cx-line); border-radius: 8px; background: var(--cx-paper); color: var(--cx-ink); font: inherit; }
#chatonion-connected .cx-group-form textarea { min-height: 90px; resize: vertical; }
#chatonion-connected .cx-group-form .cx-panel > label:first-of-type { margin-top: 4px; }
@media (max-width: 860px) {
  #chatonion-connected .cx-manage { display: block; padding: 0 12px 16px; }
  #chatonion-connected .cx-manage-rail { position: static; margin-bottom: 14px; }
  #chatonion-connected .cx-manage-rail .cx-list { display: flex; overflow-x: auto; border-top: 0; border-bottom: 1px solid var(--ch-line); scrollbar-width: thin; }
  #chatonion-connected .cx-module .cx-manage-rail .cx-list > button { width: auto; flex: 0 0 auto; border-bottom: 0; padding: 10px 12px; white-space: nowrap; }
  #chatonion-connected .cx-module .cx-manage-rail .cx-list > button[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--ch-action); }
  #chatonion-connected .cx-manage-rail .cx-list-text small, #chatonion-connected .cx-manage-rail .cx-list > button > svg { display: none; }
  #chatonion-connected .cx-panel { padding: 14px 14px 12px; }
}
/* Radio choices inside a management panel: a row with the button beside its label, never a full-width control. */
#chatonion-connected .cx-reviewed-screen input[type=radio], #chatonion-connected .cx-reviewed-screen input[type=checkbox] { width: 22px; height: 22px; min-width: 22px; padding: 0; margin: 0; flex-shrink: 0; accent-color: var(--ch-action); }
#chatonion-connected .cx-reviewed-screen .cx-type-choices label { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 12px; }
#chatonion-connected .cx-reviewed-screen .cx-type-choices label input { margin-top: 3px; }
#chatonion-connected .cx-reviewed-screen .cx-type-choices { margin: 0 0 4px; }
#chatonion-connected .cx-group-form > .ch-dock:empty { display: none; }
/* Members and moderation family under the same ruling: people rows carry a small avatar, the member profile header stands alone
   when there is no tool row, the evidence checklist is a divided list, and a destructive confirm is the red outline button in the red panel. */
#chatonion-connected .cx-list .cx-mod-avatar { width: 40px; height: 40px; flex: 0 0 40px; font-size: 17px; }
#chatonion-connected .cx-manage-body .cx-mod-person-header { border-radius: 16px 16px 0 0; }
#chatonion-connected .cx-manage-body .cx-mod-person-header.cx-header-alone { border-radius: 16px; margin-bottom: 18px; }
#chatonion-connected .cx-manage-body .cx-mod-person-header > .cx-mod-avatar { width: 56px; height: 56px; flex-basis: 56px; font-size: 24px; }
#chatonion-connected .cx-module .cx-manage-body .cx-mod-person-header > button { width: 40px; height: 40px; min-height: 40px; padding: 7px; border-radius: 50%; display: grid; place-items: center; }
#chatonion-connected .cx-module .cx-panel-danger .cx-actions button.cx-message-danger { border: 1px solid light-dark(#b33139, #ff7b82); color: light-dark(#b33139, #ff7b82); background: transparent; font-weight: 600; }
#chatonion-connected .cx-panel .cx-mod-evidence { gap: 0; margin: 8px 0 4px; border-top: 1px solid var(--ch-line); }
#chatonion-connected .cx-panel .cx-mod-evidence > label { border: 0; border-bottom: 1px solid var(--ch-line); border-radius: 0; background: transparent; padding: 12px 8px; margin: 0; }
#chatonion-connected .cx-panel .cx-mod-evidence > p { margin: 0; padding: 12px 8px; border-bottom: 1px solid var(--ch-line); }
#chatonion-connected .cx-panel .cx-power-layout { margin: 12px 0 8px; }
#chatonion-connected .cx-panel .cx-mod-detail-list, #chatonion-connected .cx-panel .cx-mod-role-chips { margin: 8px 0 4px; }
#chatonion-connected .cx-list-row.cx-report .cx-evidence-copy { margin: 8px 0 0; padding: 10px 12px; border: 1px solid var(--ch-line); border-radius: 10px; font-size: 14px; }
#chatonion-connected .cx-list-row.cx-report .cx-request-note:empty { display: none; }
@media (max-width: 700px) {
  #chatonion-connected .cx-manage-body .cx-mod-person-header { padding: 12px; gap: 10px; }
  #chatonion-connected .cx-manage-body .cx-mod-person-header h2 { font-size: 20px; }
  #chatonion-connected .cx-mod-actions button { font-size: 12px; padding: 10px 2px; }
}

/* Shell rulings 2026-09-07: symbol navigation, no bar over the chat, popups for the companion and every settings screen,
   and the account controls in the bottom-left corner on desktop and phone. Discord is the reference to beat while staying simpler. */
#chatonion-connected .cx-module .cx-symbol-nav button { width: 48px; height: 44px; padding: 8px; display: grid; place-items: center; }
#chatonion-connected .cx-module .cx-symbol-nav button svg { width: 24px; height: 24px; }
#chatonion-connected .cx-module .cx-symbol-nav button .cx-alert-badge { position: absolute; top: 2px; right: 2px; margin: 0; }
#chatonion-connected .cx-module .cx-symbol-nav button { position: relative; }
/* The open conversation's name sits in the top bar; the top bar is the only bar above the chat. */
#chatonion-connected .cx-top-title { min-width: 0; align-self: center; }
#chatonion-connected .cx-top-title[hidden] { display: none; }
#chatonion-connected .cx-top-title p { margin: 0; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#chatonion-connected .cx-top-title h1 { margin: 0; font-size: 18px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Walkthrough rulings 2026-09-07: Home and Messages moved to the corner, so the top bar is the logo, the room's name and Sign in, and it is shorter. */
#chatonion-connected .cx-module .ch-top { grid-template-columns: auto minmax(0, 1fr) auto; padding: 8px 24px; gap: 14px; }
#chatonion-connected.cx-live-chat-screen .ch-top { grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; padding: 6px 18px; }
#chatonion-connected.cx-live-chat-screen .cx-top-title { grid-column: 2; }
#chatonion-connected .cx-module .ch-account { grid-column: 3; }
#chatonion-connected.cx-live-chat-screen .ch-account[hidden] { display: none; }
#chatonion-connected .cx-top-title h1 { font-size: 17px; }
/* The back button floats at the top-right of the messages, with the pinned count beside it. */
#chatonion-connected .cx-float-tools { position: absolute; top: 8px; right: 12px; z-index: 3; display: flex; align-items: center; gap: 8px; pointer-events: none; }
#chatonion-connected .cx-float-tools > button { pointer-events: auto; }
#chatonion-connected .cx-module button.cx-float-back { width: 40px; height: 40px; min-height: 40px; padding: 7px; border-radius: 50%; background: color-mix(in srgb, var(--ch-paper) 85%, transparent); border: 1px solid var(--ch-line); display: grid; place-items: center; box-shadow: 0 4px 14px #0003; }
#chatonion-connected .cx-module button.cx-float-pill { min-height: 32px; padding: 4px 12px; border-radius: 999px; font-size: 13px; background: color-mix(in srgb, var(--ch-paper) 85%, transparent); }
#chatonion-connected.cx-live-chat-screen [data-chat-log] { padding-top: 52px; }
#chatonion-connected .cx-settings-state { margin: 52px 0 0; }
#chatonion-connected .cx-settings-state + [data-chat-log] { padding-top: 8px; }
/* Popups: a dimmed backdrop and one card, for the companion setup and every settings screen. */
#chatonion-connected #popup[hidden] { display: none; }
#chatonion-connected .cx-popup-backdrop { position: fixed; inset: 0; z-index: 30; background: #0009; }
#chatonion-connected .cx-popup { position: fixed; z-index: 31; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100% - 24px)); max-height: min(92dvh, 960px); overflow: auto; box-sizing: border-box; padding: 12px 22px 22px; background: var(--ch-bg); color: var(--ch-ink); border: 1px solid var(--ch-line); border-radius: 18px; box-shadow: 0 20px 60px #0007; }
#chatonion-connected .cx-popup:focus { outline: none; }
/* Group management popups: the rail is a left column when the popup is wide; when narrow, the rail is the first level and the section the second, never a strip on top. */
#chatonion-connected .cx-popup-wide { width: min(1100px, calc(100% - 24px)); height: min(92dvh, 900px); padding: 12px 22px 22px; }
#chatonion-connected .cx-popup-wide .cx-manage { padding: 0; gap: 24px; grid-template-columns: 230px minmax(0, 1fr); }
#chatonion-connected .cx-popup-wide .cx-manage-rail { top: 0; }
#chatonion-connected .cx-popup-wide .cx-route-heading .ch-small { display: none; }
#chatonion-connected .cx-module .cx-manage-up { display: none; }
@media (max-width: 900px) {
  #chatonion-connected .cx-popup-wide .cx-manage { display: block; }
  #chatonion-connected .cx-popup-wide .cx-manage-rail { position: static; margin-bottom: 0; }
  #chatonion-connected .cx-popup-wide .cx-manage-rail .cx-list { display: block; overflow: visible; border-bottom: 0; }
  #chatonion-connected .cx-module .cx-popup-wide .cx-manage-rail .cx-list > button { width: 100%; padding: 12px 8px; white-space: normal; border-bottom: 1px solid var(--ch-line); }
  #chatonion-connected .cx-module .cx-popup-wide .cx-manage-rail .cx-list > button[aria-current="page"] { box-shadow: none; background: var(--ch-soft); }
  #chatonion-connected .cx-popup-wide .cx-manage-rail .cx-list-text small, #chatonion-connected .cx-popup-wide .cx-manage-rail .cx-list > button > svg { display: revert; }
  #chatonion-connected .cx-popup-wide .cx-manage-rail { display: none; }
  #chatonion-connected .cx-popup-wide .cx-manage[data-rail="open"] .cx-manage-rail { display: block; position: absolute; top: 76px; left: 22px; width: min(400px, calc(100% - 44px)); max-height: calc(100% - 96px); margin: 0; padding: 12px 14px 14px; box-sizing: border-box; overflow: auto; background: var(--ch-paper); border: 1px solid var(--ch-line); border-radius: 14px; box-shadow: 0 16px 40px #0007; z-index: 4; scrollbar-width: thin; }
  #chatonion-connected .cx-module button.cx-rail-toggle { display: grid; }
}
#chatonion-connected .cx-module button.cx-rail-toggle { position: absolute; left: 18px; bottom: 18px; z-index: 5; width: 48px; height: 48px; min-height: 48px; padding: 0; border-radius: 50%; place-items: center; background: var(--ch-action); color: #fff; border: 0; box-shadow: 0 8px 24px #0006; }
#chatonion-connected .cx-module button.cx-rail-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (min-width: 901px) { #chatonion-connected .cx-module button.cx-rail-toggle { display: none; } }
#chatonion-connected .cx-module button.cx-rail-toggle svg { width: 24px; height: 24px; }
/* The profile card and the settings popup: the account's state is plain text, set apart from the buttons. */
#chatonion-connected .cx-popup-card { width: min(420px, calc(100% - 24px)); padding: 0 20px 20px; }
#chatonion-connected .cx-popup-card .cx-card-banner { margin: 0 -20px 0; }
#chatonion-connected .cx-module .cx-popup-card .cx-popup-close { margin-top: 10px; background: #0006; color: #fff; border: 0; }
#chatonion-connected .cx-card-avatar-account { overflow: hidden; }
#chatonion-connected .cx-card-avatar-account img { width: 100%; height: 100%; object-fit: cover; }
#chatonion-connected .cx-card-address { margin: -4px 0 10px; font-size: 13px; overflow-wrap: anywhere; }
#chatonion-connected .cx-account-state { margin: 0 0 14px; padding: 2px 0 2px 12px; border-left: 3px solid var(--ch-line); color: var(--ch-muted); font-size: 13px; }
#chatonion-connected .cx-account-state p { margin: 0 0 6px; }
#chatonion-connected .cx-account-state strong { color: var(--ch-ink); font-size: 15px; }
#chatonion-connected .cx-account-state small { overflow-wrap: anywhere; }
#chatonion-connected .cx-module .cx-account-state button { display: inline; padding: 0; min-height: 0; }
#chatonion-connected .cx-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 24px; align-items: start; }
@media (max-width: 700px) { #chatonion-connected .cx-settings-grid { display: block; } }
#chatonion-connected .cx-module button.cx-popup-close { position: sticky; top: 0; float: right; z-index: 2; width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; font-size: 24px; line-height: 1; margin: 0 -8px 0 0; }
#chatonion-connected .cx-popup .cx-reviewed-screen { max-width: none; }
#chatonion-connected .cx-popup .cx-route-heading { padding: 6px 0 10px; }
#chatonion-connected .cx-popup .cx-route-heading .cx-back-arrow { display: none; }
#chatonion-connected .cx-popup .cx-popup-head h1 { margin: 6px 0 10px; font-size: 24px; }
#chatonion-connected .cx-module .cx-popup .cx-list > button { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; padding: 12px 8px; border: 0; border-bottom: 1px solid var(--ch-line); border-radius: 0; background: transparent; color: var(--ch-ink); text-align: left; box-shadow: none; }
#chatonion-connected .cx-module .cx-popup .cx-list > button:hover { background: var(--ch-soft); }
#chatonion-connected .cx-danger-text { color: light-dark(#b33139, #ff7b82) !important; }
/* The companion card: a floating popup, not a side column. */
#chatonion-connected .ch-work[data-panel="true"], #chatonion-connected .cx-module-home .ch-work[data-panel="true"], #chatonion-connected .cx-module-first .ch-work[data-panel="true"] { grid-template-columns: minmax(0, 1fr); }
#chatonion-connected .ch-work[data-panel="true"] .ch-main { display: block; }
#chatonion-connected .cx-module .ch-drawer { position: fixed; right: 18px; bottom: 96px; z-index: 25; width: 380px; max-width: calc(100% - 24px); max-height: min(80dvh, 720px); overflow: auto; box-sizing: border-box; padding: 0 20px 20px; border: 1px solid var(--ch-line); border-radius: 18px; background: var(--ch-paper); box-shadow: 0 18px 50px #0006; }
#chatonion-connected .ch-drawer[hidden] { display: none; }
#chatonion-connected .cx-card-banner { position: relative; height: 84px; margin: 0 -20px 0; border-radius: 18px 18px 0 0; background: linear-gradient(120deg, var(--ch-action) 0%, #7a4bd6 60%, #e46aa7 100%); }
#chatonion-connected .cx-card-actions { position: absolute; right: 12px; top: 10px; display: flex; gap: 8px; }
#chatonion-connected .cx-module button.cx-card-action { position: relative; width: 44px; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 50%; background: #0006; color: #fff; display: grid; place-items: center; }
#chatonion-connected .cx-module button.cx-card-action:hover { background: #0009; }
#chatonion-connected .cx-card-action span { display: none; }
#chatonion-connected .cx-module button.cx-card-close { position: absolute; left: 10px; top: 10px; width: 36px; height: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 50%; background: #0006; color: #fff; display: grid; place-items: center; }
#chatonion-connected .cx-card-avatar { position: relative; z-index: 1; display: grid; place-items: center; width: 84px; height: 84px; margin: -42px 0 8px 4px; border-radius: 50%; border: 4px solid var(--ch-paper); background: var(--ch-soft); color: var(--ch-action); object-fit: cover; font-size: 30px; }
#chatonion-connected .cx-card-name { font-size: 20px; margin: 0 0 8px; }
#chatonion-connected .ch-drawer textarea { min-height: 70px; }
/* Account controls, bottom-left like the reference, on desktop; the phone bar carries the same control in its first slot. */
#chatonion-connected .cx-account-corner { position: fixed; left: 14px; bottom: 14px; z-index: 20; display: flex; align-items: center; padding: 5px 6px 5px 5px; border: 1px solid var(--ch-line); border-radius: 14px; background: var(--ch-paper); box-shadow: 0 6px 20px #0004; }
#chatonion-connected .cx-corner-nav { display: flex; align-items: center; gap: 2px; }
#chatonion-connected .cx-module .cx-corner-nav > button { width: 40px; height: 40px; min-height: 40px; padding: 6px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; display: grid; place-items: center; position: relative; }
#chatonion-connected .cx-module .cx-corner-nav > button:hover { background: var(--ch-soft); }
#chatonion-connected .cx-module .cx-corner-nav > button[aria-current="page"] { background: var(--ch-soft); color: var(--ch-action); }
#chatonion-connected .cx-module .cx-corner-nav > button svg { width: 22px; height: 22px; }
#chatonion-connected .cx-account-corner[hidden] { display: none; }
#chatonion-connected .cx-module .cx-corner-nav > button.cx-account-chip { padding: 4px; margin-right: 4px; }
#chatonion-connected .cx-module button.cx-account-chip:hover, #chatonion-connected .cx-module button.cx-account-gear:hover { background: var(--ch-soft); }
#chatonion-connected .cx-account-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: var(--ch-soft); overflow: hidden; }
#chatonion-connected .cx-account-avatar img { width: 100%; height: 100%; object-fit: cover; }
#chatonion-connected .cx-account-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
#chatonion-connected .cx-account-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#chatonion-connected .cx-account-text small { font-size: 12px; color: var(--ch-muted); }
#chatonion-connected .cx-module button.cx-account-gear { width: 40px; height: 40px; min-height: 40px; padding: 0; border: 0; border-radius: 10px; background: transparent; display: grid; place-items: center; box-shadow: none; }
#chatonion-connected .ch-main { padding-bottom: 88px; }
#chatonion-connected.cx-live-chat-screen .ch-main { padding-bottom: 0; }
#chatonion-connected.cx-live-chat-screen .cx-topic-sidebar { padding-bottom: 78px; }
#chatonion-connected .cx-module .cx-bottom-nav .cx-nav-account { width: 48px; padding: 4px; }
#chatonion-connected .cx-module .cx-bottom-nav .cx-nav-account img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
#chatonion-connected .cx-nav-gear[hidden] { display: none; }
#chatonion-connected .cx-nav-account[hidden] { display: none; }
@media (max-width: 700px) {
  #chatonion-connected .cx-account-corner { display: none; }
  #chatonion-connected .ch-main { padding-bottom: 20px; }
  #chatonion-connected.cx-live-chat-screen .cx-topic-sidebar { padding-bottom: 12px; }
  #chatonion-connected .cx-module .ch-drawer { left: 8px; right: 8px; bottom: calc(84px + env(safe-area-inset-bottom)); width: auto; max-height: 70dvh; }
  #chatonion-connected .cx-popup { top: auto; left: 0; right: 0; bottom: 0; transform: none; width: 100%; max-height: 94dvh; border-radius: 18px 18px 0 0; padding: 10px 14px 24px; }
  #chatonion-connected.cx-live-chat-screen .ch-top { grid-template-columns: auto minmax(0, 1fr) auto auto; }
  #chatonion-connected.cx-live-chat-screen .ch-top .ch-brand > span:last-child { display: none; }
  #chatonion-connected.cx-live-chat-screen .cx-top-title { grid-column: 2; }
  #chatonion-connected.cx-live-chat-screen .cx-top-chat-tools { grid-column: 3; grid-row: 1; }
  #chatonion-connected.cx-live-chat-screen .ch-account { grid-column: 4; }
  #chatonion-connected .ch-top .cx-symbol-nav { display: none; }
}

/* Walkthrough rulings 2026-09-07, second round: popups scroll inside a body with a thin bar; the back arrow has no bubble; the description sits in the top bar;
   explanations are hover bulbs; the corner's avatar, Home, microphone and sound expand panels out of their buttons. */
#chatonion-connected .cx-popup { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
#chatonion-connected .cx-popup-body { flex: 1; min-height: 0; overflow: auto; padding: 14px 22px 22px; scrollbar-width: thin; scrollbar-color: var(--ch-line) transparent; }
#chatonion-connected .cx-module button.cx-popup-close { position: absolute; top: 10px; right: 12px; float: none; margin: 0; z-index: 6; }
#chatonion-connected .cx-popup-card .cx-popup-body { padding: 0 20px 20px; }
#chatonion-connected .cx-topic-sidebar, #chatonion-connected [data-chat-log], #chatonion-connected .cx-live-panel-body, #chatonion-connected .ch-drawer { scrollbar-width: thin; scrollbar-color: var(--ch-line) transparent; }
#chatonion-connected .cx-module button.cx-float-back { background: transparent; border: 0; box-shadow: none; }
#chatonion-connected .cx-top-title { display: flex; align-items: center; gap: 18px; }
#chatonion-connected .cx-top-title > div { min-width: 0; flex: 0 1 auto; }
#chatonion-connected .cx-top-title .cx-top-desc { flex: 1 1 0; min-width: 0; margin: 0; font-size: 13px; color: var(--ch-muted); }
/* Files, Rules and the other in-chat panels are popups too. */
#chatonion-connected .cx-live-panel { position: fixed; top: 50%; left: 50%; right: auto; bottom: auto; transform: translate(-50%, -50%); width: min(560px, calc(100% - 24px)); max-height: 80dvh; border-radius: 18px; box-shadow: 0 20px 60px #0007; z-index: 31; }
#chatonion-connected .cx-live-backdrop { position: fixed; inset: 0; z-index: 30; background: #0009; }
/* Hover bulbs. */
#chatonion-connected .cx-hint { position: relative; display: inline-flex; align-items: center; vertical-align: middle; cursor: help; outline: none; }
#chatonion-connected .cx-hint-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #6b7280; box-shadow: 0 0 0 2px #6b728044; }
#chatonion-connected .cx-hint-info .cx-hint-dot { background: #5b8def; box-shadow: 0 0 0 2px #5b8def44; }
#chatonion-connected .cx-hint-pending .cx-hint-dot { background: #e2a93b; box-shadow: 0 0 0 2px #e2a93b44; }
#chatonion-connected .cx-hint-reading .cx-hint-dot { background: #9b6ddf; box-shadow: 0 0 0 2px #9b6ddf44; }
#chatonion-connected .cx-hint-good .cx-hint-dot { background: #3ac569; box-shadow: 0 0 0 2px #3ac56944; }
#chatonion-connected .cx-hint-warn .cx-hint-dot { background: #e2a93b; box-shadow: 0 0 0 2px #e2a93b44; }
#chatonion-connected .cx-hint-bad .cx-hint-dot { background: #e5484d; box-shadow: 0 0 0 2px #e5484d44; }
#chatonion-connected .cx-hint-off .cx-hint-dot { background: #6b7280; box-shadow: 0 0 0 2px #6b728044; }
#chatonion-connected .cx-hint:focus .cx-hint-dot { box-shadow: 0 0 0 3px var(--ch-action); }
#chatonion-connected .cx-hint-text { display: none; position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 45; width: max-content; max-width: min(320px, 80vw); padding: 10px 12px; border: 1px solid var(--ch-line); border-radius: 10px; background: var(--ch-paper); color: var(--ch-ink); font-size: 13px; font-weight: 400; line-height: 1.4; white-space: normal; box-shadow: 0 10px 30px #0006; }
#chatonion-connected .cx-hint-text { display: none !important; }
#chatonion-connected .cx-tip { position: fixed; z-index: 60; max-width: min(320px, 80vw); padding: 10px 12px; border: 1px solid var(--ch-line); border-radius: 10px; background: var(--ch-paper); color: var(--ch-ink); font-size: 13px; line-height: 1.4; box-shadow: 0 10px 30px #0006; pointer-events: none; }
#chatonion-connected .cx-tip[hidden] { display: none; }
#chatonion-connected .cx-hint-line { margin: 6px 0; line-height: 1; }
#chatonion-connected .cx-actions .cx-hint { margin-left: 4px; }
#chatonion-connected .cx-lights { display: flex; gap: 12px; margin: 4px 0 14px; }
#chatonion-connected .cx-lights .cx-hint-dot { width: 14px; height: 14px; }
#chatonion-connected .cx-beside { display: flex; align-items: center; gap: 8px; }
/* Status dot on the avatar and in the status picker. */
#chatonion-connected .cx-status-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ch-paper); background: #6b7280; }
#chatonion-connected .cx-status-good { background: #3ac569; } #chatonion-connected .cx-status-warn { background: #e2a93b; } #chatonion-connected .cx-status-bad { background: #e5484d; } #chatonion-connected .cx-status-off { background: #6b7280; }
#chatonion-connected .cx-account-avatar { position: relative; overflow: visible; }
#chatonion-connected .cx-account-avatar img { border-radius: 50%; }
#chatonion-connected .cx-card-avatar-account { overflow: visible; }
#chatonion-connected .cx-card-avatar-account img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
#chatonion-connected .cx-card-avatar-account .cx-status-dot { width: 20px; height: 20px; right: 2px; bottom: 2px; border-width: 3px; }
#chatonion-connected .cx-card-row { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; flex-wrap: wrap; }
#chatonion-connected .cx-status-pick { display: inline-flex; align-items: center; gap: 8px; }
#chatonion-connected .cx-status-pick .cx-status-dot { position: static; border: 0; flex: 0 0 12px; }
#chatonion-connected .cx-status-pick select { font: inherit; color: var(--ch-ink); background: var(--ch-bg); border: 1px solid var(--ch-line); border-radius: 10px; padding: 8px 10px; }
/* The corner and its panels. */
#chatonion-connected .cx-account-corner { overflow: visible; }
#chatonion-connected .cx-module .cx-corner-nav button { width: 40px; height: 40px; min-height: 40px; padding: 6px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; display: grid; place-items: center; position: relative; margin: 0; }
#chatonion-connected .cx-module .cx-corner-nav button:hover { background: var(--ch-soft); }
#chatonion-connected .cx-module .cx-corner-nav button[aria-current="page"], #chatonion-connected .cx-module .cx-corner-nav button[aria-expanded="true"] { background: var(--ch-soft); color: var(--ch-action); }
#chatonion-connected .cx-module .cx-corner-nav button svg { width: 22px; height: 22px; }
#chatonion-connected .cx-module .cx-corner-nav button.cx-account-chip { padding: 4px; margin-right: 4px; }
#chatonion-connected .cx-corner-pair { display: inline-flex; align-items: center; }
#chatonion-connected .cx-module .cx-corner-nav .cx-corner-pair > button:first-child { width: 34px; border-radius: 10px 0 0 10px; }
#chatonion-connected .cx-module .cx-corner-nav button.cx-corner-arrow { width: 18px; padding: 0; border-radius: 0 10px 10px 0; }
#chatonion-connected .cx-module .cx-corner-nav button.cx-corner-arrow svg { width: 14px; height: 14px; }
#chatonion-connected .cx-module .cx-corner-nav button[aria-pressed="true"] { color: #ff7b82; background: #ff7b8226; }
#chatonion-connected .cx-corner-pop { position: absolute; bottom: calc(100% + 10px); left: 0; z-index: 22; width: 340px; max-width: calc(100vw - 28px); overflow: visible; box-sizing: border-box; padding: 12px 16px 16px; background: var(--ch-paper); color: var(--ch-ink); border: 1px solid var(--ch-line); border-radius: 16px; box-shadow: 0 18px 50px #0006; scrollbar-width: thin; scrollbar-color: var(--ch-line) transparent; }
#chatonion-connected .cx-corner-card { padding: 0 16px 16px; }
#chatonion-connected .cx-corner-pop .cx-card-banner { margin: 0 -16px 0; height: 72px; }
#chatonion-connected .cx-corner-pop .cx-card-avatar { margin-top: -36px; }
#chatonion-connected .cx-pop-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 600; }
#chatonion-connected .cx-corner-pop label { display: grid; gap: 6px; margin: 10px 0; font-size: 14px; }
#chatonion-connected .cx-corner-pop select { width: 100%; min-width: 0; font: inherit; color: var(--ch-ink); background: var(--ch-bg); border: 1px solid var(--ch-line); border-radius: 10px; padding: 8px 10px; }
#chatonion-connected .cx-corner-pop input[type="range"] { width: 100%; }
#chatonion-connected .cx-module .cx-corner-pop .cx-list > button { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--ch-line); border-radius: 0; background: transparent; color: var(--ch-ink); text-align: left; box-shadow: none; }
#chatonion-connected .cx-module .cx-corner-pop .cx-list > button:hover { background: var(--ch-soft); }
#chatonion-connected .cx-corner-pop .cx-list { max-height: 50dvh; overflow: auto; scrollbar-width: thin; }
#chatonion-connected .cx-module .cx-corner-pop .cx-pop-search, #chatonion-connected .cx-module .cx-corner-pop .cx-pop-link { display: flex; align-items: center; gap: 8px; width: 100%; margin: 10px 0 0; }
#chatonion-connected .cx-module .cx-corner-pop .cx-pop-search svg, #chatonion-connected .cx-module .cx-corner-pop .cx-pop-link svg { width: 20px; height: 20px; }
@media (max-width: 700px) { #chatonion-connected .cx-popup-body { padding: 10px 14px 24px; } }

/* Third round, 2026-09-07: the companion docks at the chosen message or the draft box; hidden topics; larger phone bar with the status dot. */
#chatonion-connected .cx-message .cx-message-dock, #chatonion-connected .cx-compose-dock { width: auto; min-height: 0; }
#chatonion-connected .cx-message .cx-message-dock:empty, #chatonion-connected .cx-compose-dock:empty { display: none; }
#chatonion-connected .cx-message .cx-message-dock .ch-peel, #chatonion-connected .cx-compose-dock .ch-peel { width: 44px; height: 44px; min-height: 44px; }
#chatonion-connected .cx-message .cx-message-dock .ch-peel img, #chatonion-connected .cx-compose-dock .ch-peel img { width: 42px; height: 42px; }
#chatonion-connected .cx-compose-box { position: relative; }
#chatonion-connected .cx-compose-dock { position: absolute; right: 12px; top: -26px; z-index: 2; }
#chatonion-connected .cx-chat .cx-draft-dock { position: absolute; right: 16px; bottom: 150px; top: auto; left: auto; z-index: 2; }
#chatonion-connected .cx-module .cx-topic-list button.cx-topic-hidden-head { display: flex; align-items: center; gap: 6px; width: 100%; margin: 6px 0 0; padding: 10px 6px; border: 0; background: transparent; box-shadow: none; font-size: 13px; color: var(--ch-muted); text-align: left; }
#chatonion-connected .cx-module .cx-topic-list button.cx-topic-hidden-head svg { width: 16px; height: 16px; }
#chatonion-connected .cx-topic-hidden > button:first-child { opacity: .55; }
#chatonion-connected .cx-nav-account { position: relative; }
#chatonion-connected .cx-nav-account .cx-status-dot { right: 4px; bottom: 6px; }
@media (max-width: 700px) {
  #chatonion-connected .cx-module .cx-bottom-nav button { min-height: 62px; padding: 8px 4px; }
  #chatonion-connected .cx-module .cx-bottom-nav button svg { width: 30px; height: 30px; }
  #chatonion-connected .cx-module .cx-bottom-nav .cx-nav-account img { width: 40px; height: 40px; }
  #chatonion-connected .cx-module .cx-bottom-nav .cx-nav-account { width: auto; font-size: 30px; }
}
#chatonion-connected .cx-message .cx-message-dock .ch-peel, #chatonion-connected .cx-compose-dock .ch-peel { border-radius: 50%; border: 2px solid var(--ch-action); background: var(--ch-paper); box-shadow: 0 4px 14px #0004; overflow: hidden; }

/* Fourth round, 2026-09-07: the bubble docks beside the message text; on a phone the section list and its arrow sit on the right, on a desktop on the left. */
#chatonion-connected .cx-chat .cx-message { padding-right: 64px; }
#chatonion-connected .cx-message .cx-message-dock { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  #chatonion-connected .cx-module button.cx-rail-toggle { left: auto; right: 18px; }
  #chatonion-connected .cx-popup-wide .cx-manage[data-rail="open"] .cx-manage-rail { left: auto; right: 0; border-right: 0; border-left: 1px solid var(--ch-line); box-shadow: -12px 0 40px #0006; }
}

/* Fifth round, 2026-09-07: when the window is too narrow for the topic sidebar, an arrow unhides it. On a desktop (a mouse) the arrow and the panel are on the left; on a phone (touch) both are on the right. */
#chatonion-connected .cx-module button.cx-topics-arrow { display: none; position: absolute; top: 8px; left: 8px; z-index: 9; width: 40px; height: 40px; min-height: 40px; padding: 7px; border: 0; border-radius: 50%; background: color-mix(in srgb, var(--ch-paper) 85%, transparent); box-shadow: 0 4px 14px #0003; place-items: center; }
@media (max-width: 700px) {
  #chatonion-connected .cx-module button.cx-topics-arrow { display: grid; }
  #chatonion-connected .cx-live-conversation .cx-topic-sidebar.cx-topics-open + .cx-chat .cx-topics-arrow { z-index: 9; }
  #chatonion-connected .cx-live-conversation .cx-topic-sidebar { z-index: 10; }
}
@media (max-width: 700px) and (pointer: fine) {
  #chatonion-connected .cx-live-conversation .cx-topic-sidebar { left: 0; right: auto; box-shadow: 12px 0 30px #0005; }
}
@media (max-width: 700px) and (pointer: coarse) {
  #chatonion-connected .cx-module button.cx-topics-arrow { left: auto; right: 8px; }
  #chatonion-connected .cx-module button.cx-topics-arrow svg { transform: scaleX(-1); }
  #chatonion-connected .cx-chat .cx-float-tools { right: 56px; }
}
@media (max-width: 700px) { #chatonion-connected .cx-nav-account .cx-status-dot { right: auto; left: calc(50% + 8px); bottom: 12px; } }

/* Sixth round, 2026-09-07: the card holds the bubble in a corner; the topics arrow stays outside the open panel; the narrow management title is a drop-down of sections. */
#chatonion-connected .cx-card-peel { position: absolute; z-index: 3; width: 48px; height: 48px; display: grid; place-items: center; }
#chatonion-connected .cx-card-peel:empty { display: none; }
#chatonion-connected .cx-card-peel .ch-peel { width: 48px; height: 48px; min-height: 48px; border-radius: 50%; border: 2px solid var(--ch-action); background: var(--ch-paper); box-shadow: 0 4px 14px #0004; overflow: hidden; }
#chatonion-connected .cx-card-peel .ch-peel img { width: 44px; height: 44px; }
#chatonion-connected .ch-drawer[data-corner="tl"] .cx-card-peel { top: 10px; left: 10px; } #chatonion-connected .ch-drawer[data-corner="tr"] .cx-card-peel { top: 10px; right: 10px; }
#chatonion-connected .ch-drawer[data-corner="bl"] .cx-card-peel { bottom: 10px; left: 10px; } #chatonion-connected .ch-drawer[data-corner="br"] .cx-card-peel { bottom: 10px; right: 10px; }
#chatonion-connected .cx-module .ch-drawer[data-corner="tl"] button.cx-card-close { left: 66px; }
#chatonion-connected .ch-drawer[data-corner="tr"] .cx-card-actions { right: 66px; }
#chatonion-connected .ch-drawer[data-corner^="b"] { padding-bottom: 64px; }
#chatonion-connected .cx-module .cx-manage-pick { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; color: inherit; text-align: left; cursor: default; }
#chatonion-connected .cx-manage-pick h1 { margin: 0; }
#chatonion-connected .cx-manage-pick svg { display: none; }
@media (max-width: 900px) {
  #chatonion-connected .cx-module .cx-manage-pick { cursor: pointer; }
  #chatonion-connected .cx-manage-pick svg { display: block; width: 22px; height: 22px; transform: rotate(90deg); }
  #chatonion-connected .cx-manage-pick[aria-expanded="true"] svg { transform: rotate(-90deg); }
  #chatonion-connected .cx-module button.cx-rail-toggle { display: none; }
}
@media (max-width: 700px) {
  #chatonion-connected .cx-topics-close { display: none; }
  #chatonion-connected .cx-module .cx-topic-sidebar.cx-topics-open + .cx-chat button.cx-topics-arrow { left: 264px; right: auto; }
  #chatonion-connected .cx-live-conversation .cx-topic-sidebar.cx-topics-open { z-index: 8; }
}
@media (max-width: 700px) and (pointer: coarse) {
  #chatonion-connected .cx-module .cx-topic-sidebar.cx-topics-open + .cx-chat button.cx-topics-arrow { left: auto; right: 264px; }
}

/* Seventh round, 2026-09-07: one avatar size everywhere, the size of the picture the card used to show over its banner. Change --cx-avatar to change them all. */
#chatonion-connected { --cx-avatar: 84px; }
#chatonion-connected .cx-live-conversation .cx-message-author .cx-avatar-img, #chatonion-connected .cx-live-conversation .cx-avatar-fallback { width: var(--cx-avatar); height: var(--cx-avatar); flex: 0 0 var(--cx-avatar); font-size: 28px; margin-right: 8px; }
#chatonion-connected .cx-live-conversation .cx-message-author { max-width: none; }
#chatonion-connected .cx-account-avatar { width: var(--cx-avatar); height: var(--cx-avatar); flex: 0 0 var(--cx-avatar); font-size: 30px; }
#chatonion-connected .cx-module .cx-corner-nav button.cx-account-chip { width: auto; height: auto; }
#chatonion-connected .cx-account-avatar .cx-status-dot { width: 20px; height: 20px; right: 2px; bottom: 2px; border-width: 3px; }
#chatonion-connected .cx-module .cx-bottom-nav .cx-nav-account img { width: var(--cx-avatar); height: var(--cx-avatar); }
#chatonion-connected .cx-module .cx-bottom-nav .cx-nav-account { font-size: 30px; }
#chatonion-connected .cx-list .cx-mod-avatar, #chatonion-connected .cx-mod-avatar, #chatonion-connected .cx-manage-body .cx-mod-person-header > .cx-mod-avatar { width: var(--cx-avatar); height: var(--cx-avatar); flex: 0 0 var(--cx-avatar); font-size: 30px; }
#chatonion-connected .cx-profile-avatar, #chatonion-connected .cx-card-avatar-account { width: var(--cx-avatar); height: var(--cx-avatar); }
#chatonion-connected .cx-card-peel, #chatonion-connected .cx-card-peel .ch-peel, #chatonion-connected .cx-message .cx-message-dock .ch-peel, #chatonion-connected .cx-compose-dock .ch-peel, #chatonion-connected .cx-chat .cx-draft-dock .ch-peel { width: var(--cx-avatar); height: var(--cx-avatar); min-height: var(--cx-avatar); }
#chatonion-connected .cx-card-peel .ch-peel img, #chatonion-connected .cx-message .cx-message-dock .ch-peel img, #chatonion-connected .cx-compose-dock .ch-peel img, #chatonion-connected .cx-chat .cx-draft-dock .ch-peel img, #chatonion-connected .cx-chat .cx-draft-dock .cx-peel-default { width: calc(var(--cx-avatar) - 6px); height: calc(var(--cx-avatar) - 6px); }
#chatonion-connected .cx-chat .cx-message { padding-right: calc(var(--cx-avatar) + 24px); min-height: var(--cx-avatar); }
#chatonion-connected .cx-compose-dock { top: calc(-1 * var(--cx-avatar) / 2 - 8px); }
#chatonion-connected .cx-module .ch-drawer[data-corner="tl"] button.cx-card-close { left: calc(var(--cx-avatar) + 20px); }
#chatonion-connected .ch-drawer[data-corner="tr"] .cx-card-actions { right: calc(var(--cx-avatar) + 20px); }
#chatonion-connected .ch-drawer[data-corner^="b"] { padding-bottom: calc(var(--cx-avatar) + 20px); }
#chatonion-connected .ch-drawer .cx-card-name { margin-top: 12px; }
@media (max-width: 700px) { #chatonion-connected { --cx-avatar: 56px; } #chatonion-connected .cx-nav-account .cx-status-dot { left: calc(50% + 14px); } }
/* Eighth round, 2026-09-07: the corner's avatar is a rounded square the height of its neighbours, so the chip stays short; the other corner buttons match it. */
#chatonion-connected .cx-corner-nav .cx-account-avatar { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 12px; font-size: 22px; }
#chatonion-connected .cx-corner-nav .cx-account-avatar img { border-radius: 12px; }
#chatonion-connected .cx-corner-nav .cx-account-avatar .cx-status-dot { width: 14px; height: 14px; right: -3px; bottom: -3px; border-width: 2px; }
#chatonion-connected .cx-module .cx-corner-nav button { width: 48px; height: 48px; min-height: 48px; }
#chatonion-connected .cx-module .cx-corner-nav button svg { width: 26px; height: 26px; }
#chatonion-connected .cx-module .cx-corner-nav .cx-corner-pair > button:first-child { width: 40px; }
#chatonion-connected .cx-module .cx-corner-nav button.cx-corner-arrow { width: 20px; }
#chatonion-connected .cx-module .cx-corner-nav button.cx-account-chip { width: auto; padding: 0; }
