/* V13: quiet, accessible overlays and intentional desktop/mobile chat layout. */
.hd13-dialog{width:min(94vw,440px);max-width:440px;max-height:min(86dvh,600px);border:1px solid #dfe9f4;border-radius:22px;padding:0;background:#fff;box-shadow:0 30px 90px #153a6b38;color:#203c60;overflow:auto;position:fixed;inset:0;margin:auto}
.hd13-dialog::backdrop{background:rgba(24,49,80,.39);backdrop-filter:blur(5px)}
.hd13-dialog-body{padding:clamp(21px,4vw,32px)}.hd13-dialog-top{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:16px}
.hd13-dialog-icon{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;background:#eaf3ff;color:#1872da;font-size:24px;font-weight:800}
.hd13-dialog[data-kind=error] .hd13-dialog-icon{background:#fff0f0;color:#c94654}.hd13-dialog[data-kind=success] .hd13-dialog-icon{background:#e8f8f0;color:#138a65}.hd13-dialog[data-kind=warning] .hd13-dialog-icon{background:#fff5e8;color:#b5721e}
.hd13-x{border:0;border-radius:10px;background:#f2f6fc;color:#68819e;cursor:pointer;min-width:38px;min-height:38px;font-size:25px;line-height:1}.hd13-x:hover{background:#e6effa}
.hd13-dialog h2{font:800 clamp(19px,3vw,23px)/1.25 system-ui,-apple-system,sans-serif;margin:0 0 10px;letter-spacing:-.02em;color:#152f50}
.hd13-dialog p{color:#5f7995;font:400 14px/1.65 system-ui,-apple-system,sans-serif;white-space:pre-line;margin:0 0 27px;overflow-wrap:anywhere}
.hd13-dialog-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.hd13-dialog-actions button{border:1px solid #d8e5f1;background:#f5f8fc;color:#345572;border-radius:10px;padding:12px 19px;font-size:13px;font-weight:750;cursor:pointer;min-height:44px}
.hd13-dialog-actions .hd13-dialog-accept{color:#fff;background:#2977d3;border-color:#2977d3;box-shadow:0 7px 18px #2977d324}.hd13-dialog-actions .hd13-dialog-accept:hover{background:#155faf}.hd13-dialog-actions .hd13-dialog-cancel:hover{background:#e8eff7}
.hd13-dialog :focus-visible{outline:3px solid #9fcbff;outline-offset:2px}
#hd13-toast-host{position:fixed;right:18px;top:86px;z-index:9999;pointer-events:none;max-width:min(420px,calc(100vw - 24px))}.hd13-toast{display:flex;align-items:center;gap:11px;padding:13px 14px;background:#fff;border:1px solid #dae6f3;box-shadow:0 15px 50px #163f6929;border-radius:13px;color:#2d4b6d;font-size:13px;line-height:1.45;pointer-events:auto;animation:hd13-in .2s ease;overflow-wrap:anywhere}
.hd13-toast-symbol{flex:none;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#eaf3ff;color:#2175cf;font-weight:bold}.hd13-toast-success .hd13-toast-symbol{background:#dff7ec;color:#168c62}.hd13-toast-error .hd13-toast-symbol{background:#ffedf0;color:#be3348}.hd13-toast button{margin-left:auto;border:0;background:transparent;color:#7991aa;font-size:23px;cursor:pointer}
@keyframes hd13-in{from{transform:translateY(-9px);opacity:0}to{transform:translateY(0);opacity:1}}
.hd13-password{display:flex;align-items:center;border:1px solid #c9d8e8;border-radius:9px;overflow:hidden;background:#fbfdff}
.hd13-password:focus-within{outline:3px solid #bfdcff;border-color:#1780f6}.hd13-password input{border:0!important;outline:0!important;flex:1;min-width:0;background:transparent}.hd13-password button{border:0;background:transparent;color:#276db9;padding:13px;cursor:pointer;font-weight:700}.hd13-auth-card .guest-note p{margin:5px 0 10px}.hd13-auth-card{padding-bottom:24px}
/* Touch devices: keep readable, distinct views and the composer above bottom navigation. */
body.rolework-v10 .hd-role-workspace{box-shadow:0 10px 35px #29557f12!important;border-color:#dfebf6!important}
body.rolework-v10 .hd-chat-feed .chat-body{font-size:14px!important;line-height:1.6!important}
body.rolework-v10 .hd-chat-feed .chat-who{font-size:12px!important}
body.rolework-v10 .hd-thread-title{font-size:13px!important}
body.rolework-v10 .hd-conversation-col .hd-chat-panel{min-height:0;overflow:hidden}
@media(max-width:780px){
 body.rolework-v10:has(.hd-role-workspace) .app-content{padding:60px 0 56px!important;height:100dvh!important;height:var(--hd13-visual-height,100dvh)!important;min-height:0!important;overflow:hidden!important}
 body.rolework-v10 .hd-role-workspace{height:calc(var(--hd13-visual-height,100dvh) - 115px)!important;max-height:calc(var(--hd13-visual-height,100dvh) - 115px)!important;min-height:0!important;width:100%;border-radius:0!important;border-left:0!important;border-right:0!important}
 body.rolework-v10 .hd-role-workspace .hd-conversation-col{min-height:0!important;overflow:hidden}
 body.rolework-v10 .hd-chat-feed{min-height:0!important;overflow-y:auto!important;padding:14px!important;overscroll-behavior:contain}
 body.rolework-v10 .hd-chat-feed .chat-message{max-width:92%!important}
 body.rolework-v10 .hd-chat-feed .chat-bubble{padding:11px 13px!important}
 body.rolework-v10 .hd-role-workspace .hd-conversation-head{min-height:64px;padding:11px 14px;gap:9px}
 body.rolework-v10 .hd-conversation-title strong{font-size:15px!important}
 body.rolework-v10 .hd-conversation-title small{font-size:11px!important}
 body.rolework-v10 .hd-chat-subhead{font-size:11px!important;padding:10px 14px!important}
 body.rolework-v10 .hd-inbox-head h2{font-size:19px!important}
 body.rolework-v10 .hd-role-workspace .hd-thread{min-height:86px;padding:14px 12px}
 body.rolework-v10 .hd-inbox-col{height:100%;min-height:0}
 body.rolework-v10 .hd-conversation-col form[data-chat-form],body.rolework-v10 .hd-chat-compose{position:relative;bottom:auto;flex:none;padding-bottom:max(8px,env(safe-area-inset-bottom))!important;background:#fff}
 body.rolework-v10 .hd-conversation-col form[data-chat-form] textarea,body.rolework-v10 .hd-conversation-col .hd-chat-compose textarea{font-size:16px!important;min-height:42px!important;max-height:105px!important}
 body.rolework-v10 .mobile-bottom{min-height:56px!important;padding-bottom:env(safe-area-inset-bottom)!important;z-index:30!important}
 .hd13-dialog-actions button{flex:1}.hd13-dialog-body{padding:23px}
 #hd13-toast-host{top:68px;left:12px;right:12px;max-width:none}
}
@media(max-width:380px){body.rolework-v10 .hd-chat-subhead{flex-wrap:wrap;row-gap:4px}}
@media(prefers-reduced-motion:reduce){.hd13-toast{animation:none}}

@media(max-width:780px){
body.rolework-v10.hd13-keyboard-open .mobile-bottom{display:none!important}
body.rolework-v10.hd13-keyboard-open .app-content{padding-bottom:0!important}
body.rolework-v10.hd13-keyboard-open .hd-role-workspace{height:calc(var(--hd13-visual-height,100dvh) - 60px)!important;max-height:calc(var(--hd13-visual-height,100dvh) - 60px)!important}
}

body [aria-invalid="true"]{border-color:#db6474!important;box-shadow:0 0 0 3px #fce6e9!important}
