/* UI33: shared accessibility, drawer and messenger refinements. */
:root{--focus-ring:#1468ce}
html[data-theme=dark]{--focus-ring:#89c4ff}
:where(button,a,input,select,textarea,summary,[tabindex]):focus-visible{outline:3px solid var(--focus-ring)!important;outline-offset:3px!important;box-shadow:none!important}
html,body{max-width:100%;overflow-x:clip}
.app-shell,.app-body,main,.view,.module-panel,.chat-workspace,.chat-dialog-block,.chat-list-block{min-width:0}
.chat-workspace{overflow:hidden;border:1px solid var(--border);border-radius:14px;background:var(--surface)}
.chat-dialog-block{position:relative;display:flex;flex-direction:column}
.chat-dialog-head{gap:10px;flex-shrink:0;background:var(--surface);border-bottom:1px solid var(--border)}
.chat-dialog-head>div:first-of-type{min-width:0;flex:1}
.chat-dialog-head h3{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-dialog-head>div:last-child{display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end}
.chat-tabs{overflow-x:auto;scrollbar-width:thin;flex-shrink:0}
.chat-tabs>button{min-width:52px;flex-shrink:0}
.chat-message-content{min-width:0;overflow-wrap:anywhere;border-radius:12px}
.chat-message.own .chat-message-content{background:var(--ui-soft);border-color:var(--border)}
.chat-message-actions{display:flex;flex-wrap:wrap;gap:4px}
.chat-message-actions button{min-height:28px}
.chat-new-messages{position:absolute;bottom:132px;right:20px;max-width:calc(100% - 40px);z-index:5;padding:9px 14px;border-radius:20px;border:1px solid var(--border);background:var(--surface);color:var(--text-primary);box-shadow:var(--shadow-float)}
.chat-composer{flex-shrink:0;background:var(--surface)}
.chat-attachment b{overflow-wrap:anywhere}
.chat-load-older{margin:10px auto;display:block}
.notification-drawer{max-width:100vw;background:var(--surface);color:var(--text-primary)}
.notification-body,.notice-main span{min-width:0;overflow-wrap:anywhere}
.notification-filters{flex-wrap:wrap}
.notification-filters>button{white-space:nowrap;min-height:34px}
.notification-drawer footer{display:flex;flex-wrap:wrap;gap:8px}
.notification-drawer footer>span{display:flex;flex-wrap:wrap;gap:6px}
.process-actions{display:flex;flex-wrap:wrap;gap:8px;margin-block:12px}
.process-history article+article{border-top:1px solid var(--border);margin-top:14px;padding-top:14px}
.process-reason{padding:10px 12px;background:var(--tone-warning-bg);color:var(--tone-warning);border-radius:8px;white-space:pre-wrap;overflow-wrap:anywhere}
.process-differences>div{padding:10px 0;border-bottom:1px solid var(--border)}
.process-differences dd{margin:4px 0;display:grid;gap:6px}
.process-differences del,.process-differences ins{padding:6px 8px;border-radius:6px;white-space:pre-wrap;overflow-wrap:anywhere}
.process-differences del{background:var(--tone-danger-bg);color:var(--tone-danger)}
.process-differences ins{background:var(--tone-success-bg);color:var(--tone-success);text-decoration:none}
.process-route li{margin-block:8px}
.process-route small{display:block;color:var(--text-secondary)}
@media(max-width:1100px){body[data-design-system] main{padding:20px 18px 36px}.chat-workspace{grid-template-columns:240px minmax(0,1fr)}.chat-info-block{position:absolute;right:0;top:0;bottom:0;width:min(290px,100%);z-index:6;background:var(--surface);box-shadow:var(--shadow-float)}.chat-dialog-head>div:last-child button{font-size:12px;padding-inline:6px}}
@media(max-width:767px){body[data-design-system] main{padding:12px 10px 24px}.chat-workspace{display:flex;flex-direction:column}.chat-list-block{width:100%;max-height:220px;flex-shrink:0}.chat-list{overflow:auto}.chat-dialog-block{min-height:520px;width:100%}.chat-messages{min-height:240px;max-height:55dvh}.chat-dialog-head h3{font-size:14px}.chat-dialog-head small{font-size:11px}.chat-message-actions{gap:2px}.notification-drawer{width:100vw}.desk-detail-section,.process-form{min-width:0}.desk-result{position:static}.process-actions>*{flex:1 1 160px}}
@media(prefers-reduced-motion:reduce){.ws-skeleton *{animation:none!important}.chat-message.highlight{animation:none!important;outline:2px solid var(--focus-ring)}}
@media(max-width:767px){.chat-workspace[data-mobile-pane=list] .chat-list-block{max-height:none;flex:1}.chat-workspace[data-mobile-pane=dialog] .chat-dialog-block{min-height:0;flex:1}.chat-workspace[data-mobile-pane=dialog] .chat-messages{min-height:0;max-height:none;flex:1}}
