#alert:not([hidden]) {position:sticky;top:0;z-index:9;padding:12px 16px;background:var(--error-soft);color:var(--error);border:2px solid var(--error);font-weight:600;}
#status:not(:empty){padding:10px 16px;background:var(--action-soft);color:var(--action-ink);}
[hidden]{display:none!important;}
.login {margin-top:20px;} .login button {width:100%;margin-top:16px;}
.composer {background:white;} .composer .actions button {flex:1;}
.inline-check {display:flex;gap:10px;align-items:center;font-size:14px;font-weight:400;} .inline-check input {width:22px;min-height:22px;}
.bubble p,.internal-note p {overflow-wrap:anywhere;white-space:pre-wrap;}
.local-meta {display:block;font-size:14px;color:var(--muted);}
.task form{margin-top:8px;} .task button{width:auto;}
main {padding-bottom:100px;} .control {top:0;} .brandbar span {overflow-wrap:anywhere;}
.pause-panel,.resume-panel {padding:12px 0;border-bottom:1px solid var(--line,#ddd);margin-bottom:12px;}
.pause-panel fieldset {border:0;padding:0;margin:0 0 10px;min-width:0;}
.pause-panel legend {font-weight:600;font-size:16px;margin-bottom:8px;}
.pause-choices {display:flex;flex-wrap:wrap;gap:8px;}
.pause-choices label {display:flex;align-items:center;gap:6px;border:1px solid #777;border-radius:8px;padding:8px;min-height:44px;cursor:pointer;font-size:14px;}
.pause-choices input {width:18px;height:18px;min-height:18px;margin:0;accent-color:var(--action,#145ac4);}
.pause-choices label:has(input:checked) {border:2px solid var(--action,#145ac4);padding:7px;background:var(--action-soft,#e8f0ff);}
.pause-choices label:focus-within {outline:2px solid var(--action,#145ac4);outline-offset:2px;}
.pause-panel>button,.resume-panel>button {width:100%;margin-top:8px;}
/* Keep the conversation primary; expand bot controls only when requested. */
.chat-topline {display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:10px;}
.chat-topline button {font-size:14px;padding:8px 10px;}
.control {position:static;padding:0 0 6px;}
.control .actions {align-items:center;margin:6px 0;}
.control .badge {flex:1;font-size:14px;}
.tabs {margin:10px 0;}
.bot-controls {margin:8px 0 12px;padding:0;border:1px solid var(--line);border-radius:10px;}
.bot-controls>summary {padding:10px 12px;font-size:14px;}
.bot-controls[open] {padding:0 12px 8px;}
.bot-controls[open]>summary {padding-inline:0;}
.bot-controls .pause-panel {margin:0;padding-top:0;}
.pause-choices label {margin:0;}
.compact-notice {padding:10px 12px;margin:8px 0;font-size:14px;}
.compact-notice p {margin-bottom:0;}
.action-feedback:empty {display:none;}
.action-feedback:not(:empty) {padding:10px 12px;margin:8px 0;border-left:4px solid var(--success);background:var(--success-soft);color:var(--success);font-size:16px;scroll-margin-block:16px;}
.action-feedback[data-tone="error"] {border-color:var(--error);background:var(--error-soft);color:var(--error);}
#alert:not([hidden]) {position:fixed;top:auto;bottom:calc(84px + var(--keyboard-gap,0px));left:50%;transform:translateX(-50%);width:min(calc(100% - 24px),406px);max-height:35dvh;overflow:auto;box-shadow:0 4px 18px #0002;border-radius:10px;}
.composer {margin-top:16px;}
.composer .primary {width:auto;}
.composer .actions {display:grid;grid-template-columns:1fr 1fr;}
.composer .actions button {min-width:0;padding-inline:8px;}
.simulator-panel {border:1px solid var(--line);border-radius:12px;padding:14px;}
.simulator-panel h2 {font-size:20px;}
.simulator-panel .primary {width:100%;}
input,textarea,select {font-size:16px;scroll-margin-block:20px;}
/* No fixed app navigation competing with the phone keyboard/accessory bar. */
body.editing-field #nav {display:none;}
body.editing-field main {padding-bottom:24px;}
body.editing-field #alert:not([hidden]) {bottom:calc(12px + var(--keyboard-gap,0px));}
.chat-summary {border-left:3px solid var(--action);background:var(--action-soft);padding:10px 12px;margin:10px 0 14px;border-radius:8px;}
.chat-summary p {margin:4px 0;font-size:14px;line-height:1.4;}
.chat-summary summary {font-size:14px;min-height:44px;display:flex;align-items:center;}
.summary-review {font-weight:600;}
.tabs button {padding-inline:6px;overflow-wrap:normal;}
.secondary-actions {grid-template-columns:60px 1fr!important;}
.quick-panel {padding:12px;border:1px solid var(--line);border-radius:10px;}
.quick-panel h2 {font-size:18px;}
.quick-panel>button {display:block;width:100%;text-align:left;margin:8px 0;}
.attachment-row {display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:14px;margin:8px 0;}
.attachment-preview {display:block;width:100%;max-height:220px;object-fit:contain;border-radius:8px;background:#f2f2f2;}
.attachment-row span {flex:1;overflow-wrap:anywhere;}
@media(max-width:360px){.tabs button{font-size:14px;}}
.chat-footer-controls {border-top:1px solid var(--line);margin-top:20px;padding-top:8px;}
.chat-footer-controls .bot-controls {margin-bottom:0;}
#chat-content {scroll-margin-top:12px;}
.inbox-filters {display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0;}
.inbox-filters button {min-height:44px;padding:8px;font-size:14px;}
.inbox-filters button[aria-pressed="true"] {background:var(--action);color:#fff;border-color:var(--action);box-shadow:inset 0 -3px 0 #0004;font-weight:700;}
#inbox-search {width:100%;min-height:44px;}
#inbox-results .conversation p {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;}
.live-update:not([hidden]) {border:1px solid var(--action);background:var(--action-soft);padding:12px;border-radius:10px;}
.live-update p {font-size:14px;margin:0 0 8px;}
#sync-status {font-size:14px;}
.panel:has(#alerts-enabled)>label {display:flex;align-items:center;gap:10px;min-height:44px;font-size:16px;}
.panel:has(#alerts-enabled) input:is([type="checkbox"],[type="radio"]) {width:22px;height:22px;min-height:22px;flex:0 0 22px;margin:0;accent-color:var(--action);}
.panel:has(#alerts-enabled) input[type="time"] {display:block;width:100%;min-width:0;min-height:48px;box-sizing:border-box;margin:0 0 12px;}
.choices {display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0;}
.choices label {display:flex;align-items:center;gap:8px;padding:10px;border:1px solid var(--line);border-radius:8px;min-height:44px;margin:0;font-size:14px;cursor:pointer;}
.choices label:has(input:checked) {border-color:var(--action);background:var(--action-soft);}
.choices label:focus-within {outline:2px solid var(--action);outline-offset:2px;}
/* One mobile workspace: only the history scrolls; the reply stays in reach. */
.sr-only {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
body.conversation-view {position:static;overflow:hidden;}
body.conversation-view .crm-shell {position:absolute;top:var(--chat-page-top,0px);left:50%;transform:translateX(-50%);height:var(--chat-height,100dvh);min-height:0;display:flex;flex-direction:column;}
body.conversation-view #nav,body.conversation-view .brandbar {display:none;}
body.conversation-view .lab {display:none;}
body.conversation-view main,body.conversation-view.editing-field main {position:relative;display:flex;flex-direction:column;flex:1;min-height:0;padding:0;overflow:hidden;}
.conversation-header {flex-shrink:0;padding:8px 12px 0;border-bottom:1px solid var(--line);background:white;}
.conversation-header .chat-topline {margin:0;gap:8px;}
.conversation-header h1 {font-size:18px;line-height:1.25;margin:0;flex:1;min-width:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.conversation-header button {min-width:44px;min-height:44px;}
.chat-mode {font-size:13px;margin:4px 0 6px;color:var(--muted);}
.chat-summary {margin:0 0 8px;padding:0 10px;background:#f5f5f5;border:1px solid var(--line);border-radius:8px;max-height:28dvh;overflow:auto;}
.chat-summary>summary {display:block;padding:7px 0;min-height:44px;font-size:14px;}
.summary-preview {display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-weight:400;margin-top:2px;}
.chat-summary[open] .summary-preview {display:block;}
.summary-toggle {color:var(--action-ink);}
body.conversation-view #chat-content {flex:1;min-height:0;overflow:auto;padding:12px;overscroll-behavior:contain;}
body.chat-view #chat-content {display:flex;flex-direction:column;overflow:hidden;padding:0;}
.chat-history {flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:0 12px 12px;overflow-anchor:none;}
.chat-history:focus-visible {outline-offset:-3px;}
.reply-dock {flex-shrink:0;max-height:55%;overflow-y:auto;background:white;border-top:1px solid var(--line);padding:8px 12px max(8px,env(safe-area-inset-bottom));overscroll-behavior:contain;}
.reply-dock .composer {border:0;padding:0;margin:0;}
.compose-line {display:flex;align-items:flex-end;gap:6px;}
.compose-line>button {flex-shrink:0;min-height:44px;padding:8px;}
.compose-line>button[data-action="attach"] {width:44px;font-size:24px;padding:0;}
.compose-line textarea {flex:1;min-width:0;min-height:58px;max-height:120px;height:58px;padding:8px;font-size:16px;resize:vertical;}
.reply-dock #draft-state {display:block;font-size:12px;margin:3px 0;color:var(--muted);}
.reply-dock .secondary-actions {margin:4px 0 0;gap:6px;}
.reply-dock .secondary-actions button {font-size:14px;min-height:44px;}
.composer-help {margin:2px 0 0;padding:0;border:0;}
.composer-help>summary {font-size:12px;font-weight:400;min-height:28px;padding:4px 0;}
.reply-dock .attachment-preview {max-height:100px;width:90px;}
.reply-dock .action-feedback:not(:empty) {margin:4px 0;padding:5px 8px;font-size:14px;}
.attention-dock button {width:100%;}
.chat-footer-controls {position:absolute;right:8px;top:8px;z-index:8;width:min(calc(100% - 16px),400px);max-height:calc(100% - 16px);overflow:auto;background:white;border:1px solid var(--line);border-radius:12px;padding:12px;margin:0;box-shadow:0 6px 24px #0003;}
.message-photo {display:block;}
.message-photo img {display:block;width:100%;height:auto;aspect-ratio:4/3;object-fit:contain;background:#fff;border-radius:8px;}
.media-download {font-size:13px;}
body.chat-view #sync-status {font-size:12px;margin:4px 0;}
body.conversation-view #status:not(:empty) {font-size:13px;max-height:64px;overflow:auto;padding:5px 12px;flex-shrink:0;}
body.conversation-view #alert:not([hidden]) {top:8px;bottom:auto;}
body.chat-view.keyboard-open .lab,body.chat-view.keyboard-open .chat-summary,body.chat-view.keyboard-open .chat-mode,body.chat-view.keyboard-open .composer-help {display:none;}
/* Compact only after the visible area shrinks, not during the first tap. */
body.chat-view.keyboard-open .reply-dock {max-height:70%;min-height:min(148px,70%);}
@media(max-height:500px){body.chat-view .chat-summary,body.chat-view .lab,body.chat-view .composer-help{display:none;}.reply-dock{max-height:65%;}}

#team-access-panel input,#team-access-panel button {width:100%;min-height:44px;}
#team-access-panel details {margin-block:12px;}
#team-access-panel summary {padding-block:12px;}

.classification-filter-group{display:flex;flex-wrap:wrap;gap:6px;width:100%;padding-top:10px;border-top:1px solid #ddd}.classification-filter-group>strong{width:100%}.classification-choices{display:flex;flex-wrap:wrap;gap:8px}.classification-choices label{display:flex;align-items:center;gap:8px;min-height:44px;padding:6px 10px;border:1px solid #999;border-radius:8px}.classification-choices input{width:auto;margin:0}.classification-panel fieldset{border:0;padding:8px 0;margin:0}.classification-panel blockquote{margin:8px 0;padding-left:12px;border-left:3px solid #777;overflow-wrap:anywhere}.classification-shortcut{padding:4px 8px;min-height:44px;width:fit-content;max-width:100%}

.evaluation-page{font-family:Arial,sans-serif;margin:0;padding:16px;color:#171717;background:#fff}.evaluation-page main{max-width:760px;margin:auto;min-width:0}.evaluation-page button,.evaluation-page select,.evaluation-page summary{min-height:44px}.evaluation-page button{padding:10px;margin:4px 4px 4px 0}.evaluation-page pre,.evaluation-page #results{white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}.evaluation-page details{margin:10px 0}.evaluation-page section{border:1px solid #ccc;border-radius:10px;padding:12px;margin-bottom:24px}.evaluation-page input,.evaluation-page select{max-width:100%}

#hot-comparison{white-space:pre-wrap;margin:16px 0}.evaluation-page fieldset label{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:6px}
