.message-text{white-space:pre-wrap;overflow-wrap:anywhere}.queue-list{overflow:auto}.conversation{cursor:default}.conversation-select{border:0;background:transparent;text-align:left;padding:0;width:100%;color:inherit;cursor:pointer}.conversation-select:focus-visible{outline-offset:3px}.app-connection{margin-bottom:16px}.field textarea{width:100%;min-height:140px;padding:12px;border:1px solid var(--line);border-radius:8px;resize:vertical}.modal-error{margin-top:12px}.collection-empty{padding:32px;text-align:center;color:var(--muted)}.list-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.knowledge-item .row-actions{margin-top:12px}.knowledge-full{padding:24px}.knowledge-full .comparison{margin-top:16px}.knowledge-full+.knowledge-full{border-top:1px solid var(--line)}.detail-toolbar{display:flex;align-items:center;gap:4px}.login-progress{font-size:12px;color:var(--muted)}.notification-note{margin:16px 0}.login-secondary{margin-top:12px}.page-status{margin-bottom:16px}.macro-dialog[open]{display:block}.modal-field-error{color:var(--red);font-size:12px;margin-top:12px}.sidebar-note{overflow-wrap:anywhere}.footer-action{display:flex;justify-content:flex-end;margin-top:14px}.retry-pending{margin:10px 0}.employee-table td{overflow-wrap:anywhere}@media(max-width:650px){.knowledge-full{padding:18px 16px}.detail-toolbar .icon-button{width:38px}.page-head h1{font-size:22px}.mobile-nav a{font-size:9px}.inbox-layout{min-height:500px}.chat-mode .inbox-layout{min-height:450px}} 

.history-pagination{display:flex;justify-content:center;margin-bottom:20px}.delivery-instruction{font-size:11px;color:var(--muted);margin:8px 0}.delivery-resolution{justify-content:flex-end}.delivery-resolution .icon-button{width:44px;height:44px}.manual-check{display:flex;align-items:flex-start;gap:10px;min-height:44px;margin-top:18px;font-size:13px}.manual-check input{width:18px;height:18px;flex:none;accent-color:var(--bronze)}

.panel{min-width:0}.table-wrap{max-width:100%;overflow-x:auto}.employee-mobile{display:none}@media(max-width:650px){.employee-table{display:none}.employee-mobile{display:block}.employee-card .person{min-width:0}.employee-card .person strong,.employee-card .person p{overflow-wrap:anywhere}}

.macro-picker-row[hidden],#macro-search-empty[hidden]{display:none}@media(max-width:650px){.macro-manager-row .row-actions .icon-button,.knowledge-full .row-actions .icon-button{width:44px;height:44px;min-width:44px;min-height:44px}}

.public-reply-note {display:block; margin:0 0 12px;}
.public-reply-note p,.public-preview p {margin:6px 0 0;}
.public-choice {margin-bottom:12px; min-width:0;}
.public-choice select {width:100%; max-width:100%; min-height:44px; border-color:var(--muted);}
.public-preview {border:1px solid var(--line,#e5dfd4); border-radius:12px; padding:12px; margin-bottom:12px;}
.public-preview p {overflow-wrap:anywhere; white-space:pre-wrap;}
.composer .info-strip p {margin:6px 0 0;}
.composer .channel-policy-note {display:block;}
#reply-length-error[hidden] {display:none;}
.detail > .detail-header,.detail > .conversation-status {flex-shrink:0;}
.detail > .messages {min-height:0;}
.detail > .composer {flex-shrink:0; max-height:65%; overflow:auto;}

/* One compact header row: title, availability indicator and actions. */
.workspace{padding-top:20px}
.workspace .page-head.compact-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 12px;margin-bottom:12px}
.compact-head .page-title{display:contents}
.compact-head h1{grid-column:1;grid-row:1;min-width:0;overflow-wrap:anywhere}
.compact-head .environment-badge{display:none}
.compact-head .head-actions{grid-column:2;grid-row:1;display:flex;align-items:center;gap:0;align-self:center}
.compact-head .head-actions>.icon-button{display:inline-flex;width:44px;height:44px;min-width:44px;min-height:44px}
.compact-head .shift-switch{padding:0}
.compact-head .shift-track{display:block;position:relative;flex:none;width:36px;height:22px;border-radius:12px;background:var(--muted)}
.compact-head .shift-thumb{display:block;position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:#fff}
.compact-head .shift-switch.on .shift-track{background:var(--green)}
.compact-head .shift-switch.on .shift-thumb{left:17px}
.compact-head .head-actions .icon{width:22px;height:22px;stroke-width:1.6}
.compact-head .head-actions .icon-button[data-tooltip]::after{bottom:auto;top:calc(100% + 6px)}
.logout-dialog{width:370px;background:var(--cream);padding:24px}
.logout-dialog .macro-dialog-head h2{font-size:21px;line-height:1.3}
.logout-dialog .macro-dialog-head>.icon-button{display:none}
.logout-dialog>p{font-size:14px;line-height:1.6;color:var(--muted)}
.logout-dialog .modal-actions{margin-top:24px}
.logout-dialog #dialog-error:empty{display:none}
@media(max-width:650px){
  .toast{bottom:calc(120px + env(safe-area-inset-bottom))}
  .workspace{padding-top:8px}
  .chat-mode .workspace{padding-top:0}
  .chat-mode .page-head.compact-head{display:none}
  .workspace .page-head.compact-head{gap:0 4px;margin-bottom:8px}
  .compact-head h1{font-size:24px;line-height:1.2}
  .inbox-toolbar{margin-bottom:12px}
  .logout-dialog{padding:24px}
}
@media(max-width:340px){.compact-head h1{font-size:20px}}

/* Context help is disclosed on demand; recoverable page errors stay compact. */
.section-toolbar.context-toolbar{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-start;gap:8px;margin-bottom:12px}
.section-toolbar.context-toolbar>.button{flex:0 1 auto;width:auto;min-width:0}
.section-toolbar.context-toolbar>.section-help{flex:0 0 44px;width:44px;height:44px}
.page-issue{display:flex;align-items:center;gap:8px;min-height:44px;margin-bottom:12px;color:var(--red);font-size:12px;line-height:1.4}
.page-issue-summary{flex:1;min-width:0;margin:0;overflow-wrap:anywhere}
.page-issue-actions{display:flex;align-items:center;gap:4px;flex:none}
.page-issue-actions>.icon-button{color:inherit;width:44px;height:44px}
.page-issue-actions>.text-button{min-height:44px;padding:8px 3px;white-space:nowrap}
.queue>.page-issue{padding:0 16px;margin:0;border-bottom:1px solid var(--line)}
.page-notice-dialog{width:430px}
.page-notice-dialog .notice-detail{font-size:14px;line-height:1.65;overflow-wrap:anywhere}
.page-notice-dialog .notice-help{font-size:12px;line-height:1.6;color:var(--muted);margin-top:16px}
@media(max-width:650px){.section-toolbar.context-toolbar>.button{flex:1}.page-issue{gap:4px}.page-notice-dialog .macro-dialog-head h2{font-size:18px}}

.detail>.page-issue{padding:0 16px;margin:0;border-bottom:1px solid var(--line);flex-shrink:0}

/* Branded channel marks and compact inbox rows; other cards keep their spacing. */
.channel.channel-brand{background:transparent;border-radius:0;overflow:visible}
.channel.channel-brand img{display:block;width:23px;height:23px;object-fit:contain}
.queue-list .conversation{padding:0;cursor:pointer}
.queue-list .conversation-select{display:flex;flex-direction:column;gap:6px;min-height:80px;padding:12px;text-align:left;border-radius:0}
.queue-list .conversation-select:focus-visible{outline-offset:-3px}
.queue-list .conversation-top{display:flex;align-items:flex-start;gap:10px;width:100%;margin:0}
.queue-list .conversation-topic{display:flex;align-items:flex-start;gap:6px;min-width:0;flex:1;font-size:13px;line-height:1.4;font-weight:400;overflow-wrap:anywhere}
.queue-list .conversation-topic>span:last-child{min-width:0}
.queue-list .conversation-topic .channel{flex:none;width:16px;height:18px;min-width:16px}
.queue-list .conversation-topic .channel img{width:16px;height:16px;margin-top:1px}
.queue-list .conversation-time{flex:none;white-space:nowrap}
.queue-list .conversation-bottom{display:flex;align-items:center;flex-wrap:wrap;justify-content:space-between;gap:4px 10px;width:100%;margin:0}
.queue-list .conversation-bottom .pill{max-width:100%;white-space:normal;padding:2px 7px}
.queue-list .conversation-escalation{display:block;margin:0;font-size:11px;color:var(--muted);overflow-wrap:anywhere}
.queue-list .conversation.unread{background:#f6efe2}
.queue-list .conversation.unread:hover{background:#f1e7d5}
.queue-list .conversation.unread .conversation-topic{font-weight:700}
.queue-list .conversation.selected{background:#faf6ee;box-shadow:inset 3px 0 var(--bronze)}
.queue-list .conversation.selected::before{pointer-events:none}
.queue-list .conversation.selected.unread{background:#f6efe2}

/* Approved variant 1: compact desktop title/actions, tabs/search below. */
@media(min-width:651px){
  .compact-head .page-title{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-width:0;grid-column:1;grid-row:1}
  .compact-head .environment-badge{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border-radius:5px;background:#f3ede3;color:var(--bronze-dark);font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;white-space:nowrap}
  .inbox-workspace{display:flex;flex-direction:column;height:100vh;height:100dvh;padding-top:12px;padding-bottom:24px}
  .inbox-workspace .page-head.compact-head{min-height:44px;margin-bottom:4px}
  .inbox-workspace .page-title h1{font-size:24px}
  .inbox-workspace #page-content{display:flex;flex-direction:column;flex:1;min-height:0}
  .inbox-workspace .inbox-toolbar{flex:none;min-height:44px;margin-bottom:10px}
  .inbox-workspace .inbox-layout{flex:1;height:auto;max-height:none}
}

/* Approved compact reply composer: equal input and action heights at all widths. */
.claim-composer{display:flex;justify-content:flex-end}
.reply-input-row{display:flex;align-items:center;gap:10px;min-width:0}
.composer .reply-input-row textarea{flex:1;min-width:0;width:auto;height:44px;min-height:44px;max-height:44px;resize:none;padding:10px 12px}
.reply-input-actions{display:flex;align-items:center;gap:8px;flex:none}
.reply-input-actions button{width:44px;height:44px;min-height:44px;padding:0;flex:none}
.reply-send{border-radius:9px}
.public-composer-actions{justify-content:flex-end}
.quick-macro-popup{position:fixed;z-index:60;width:430px;max-width:calc(100vw - 32px);display:flex;flex-direction:column;overflow:hidden;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 30px #292d2726}
.quick-macro-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 14px;flex:none}
.quick-macro-heading h2{font:600 14px Arial,sans-serif;letter-spacing:0}
.quick-macro-popup input[type=search]{width:calc(100% - 28px);margin:0 14px 10px;border:1px solid #dcd8cc;border-radius:8px;padding:10px 12px;min-height:44px;flex:none}
.quick-macro-list{max-height:265px;min-height:0;overflow:auto;scrollbar-gutter:stable}
.quick-macro-item{display:block;width:100%;text-align:left;border:0;border-top:1px solid var(--line);background:#fff;padding:12px 14px;color:var(--ink)}
.quick-macro-item:hover{background:#faf6ee}
.quick-macro-item strong,.quick-macro-item span{display:block;overflow-wrap:anywhere}
.quick-macro-item strong{font-size:13px;margin-bottom:4px}
.quick-macro-item span{font-size:12px;color:#626960;line-height:1.5;white-space:pre-wrap}
.quick-macro-status{padding:12px 14px;font-size:12px;color:var(--muted)}
.quick-macro-popup footer{border-top:1px solid var(--line);padding:10px 14px;color:#626960;font-size:11px;flex:none}
@media(max-width:650px){.reply-input-actions{gap:6px}.quick-macro-list{max-height:200px}}

/* The mobile shell owns the viewport; only its content may scroll. The
   navigation row sizes itself, including the owner's second row and safe area. */
@media(max-width:650px){
  .layout{position:fixed;inset:0;display:grid;grid-template-rows:minmax(0,1fr) auto;min-height:0;height:100vh;height:100dvh;overflow:clip;overscroll-behavior:none}
  .layout .workspace{min-width:0;min-height:0;width:100%;margin:0;padding:17px 16px 20px;overflow-x:hidden;overflow-y:auto;overscroll-behavior-y:contain;overflow-wrap:anywhere}
  .layout .mobile-nav{position:static;min-width:0;max-width:100%;overflow:clip;overscroll-behavior:none;padding:8px max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
  .layout .mobile-nav a{min-width:0;min-height:44px;overflow-wrap:anywhere;text-align:center}
  .layout.owner-workspace .workspace{padding-bottom:20px}
  .chat-mode .layout .workspace{padding:0;overflow:hidden;display:flex;flex-direction:column}
  .chat-mode #page-content{flex:1;min-height:0;min-width:0}
  .chat-mode .inbox-layout{height:100%;min-height:0;max-height:none}
  .chat-mode .detail{min-height:0;overflow-y:auto;overscroll-behavior-y:contain}
  .chat-mode .detail>.messages{min-height:80px}
  .chat-mode .preview{min-height:0;overflow-y:auto}
  .chat-mode .detail-header h2{overflow-wrap:anywhere}
}
