/* HIG-only private communication surfaces. Uses the current light/dark template tokens. */
html[data-teamilo-hig] body.hig-dm-open{overflow:hidden!important}
html[data-teamilo-hig] #hig-direct-root[hidden]{display:none!important}
html[data-teamilo-hig] #hig-direct-root{position:fixed;inset:0;z-index:30000;background:var(--hig-bg,#151719);color:var(--hig-text,#fafafa);display:flex;justify-content:center;align-items:stretch;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif}
html[data-teamilo-hig] #hig-direct-root .hig-dm-shell{width:min(100%,800px);height:100%;min-height:0;display:flex;flex-direction:column;background:var(--hig-bg,#17191b);border-inline:1px solid var(--hig-line,#434747);box-shadow:0 0 50px #0002}
html[data-teamilo-hig] #hig-direct-root .hig-dm-head{flex:none;display:flex;gap:12px;align-items:center;padding:14px clamp(14px,4vw,26px);border-bottom:1px solid var(--hig-line,#434747);background:var(--hig-surface,#222);min-height:80px}
html[data-teamilo-hig] #hig-direct-root .hig-dm-head>div{flex:1;min-width:0}
html[data-teamilo-hig] #hig-direct-root .hig-dm-head h2{margin:2px 0 0!important;font-size:1.45rem!important;overflow-wrap:anywhere}
html[data-teamilo-hig] #hig-direct-root .hig-dm-eyebrow{font-size:.68rem;font-weight:700;letter-spacing:.12em;color:var(--hig-muted,#aaa)}
html[data-teamilo-hig] #hig-direct-root .hig-dm-icon-btn{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;padding:0!important;display:grid;place-items:center;font-size:2rem!important;line-height:1!important;border-radius:12px;border:1px solid var(--hig-line,#444);color:var(--hig-text,#fafafa);background:var(--hig-soft,#333)}
html[data-teamilo-hig] #hig-direct-root .hig-dm-content{flex:1;min-height:0;overflow:auto;padding:20px clamp(14px,4vw,28px);overscroll-behavior:contain}
html[data-teamilo-hig] #hig-direct-root .hig-dm-content h3{font-size:1rem!important;margin:25px 0 10px!important;color:var(--hig-text,#fff)}
html[data-teamilo-hig] #hig-direct-root .hig-dm-tabs{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 22px}
html[data-teamilo-hig] #hig-direct-root .hig-dm-tab{background:var(--hig-soft,#333)!important;color:var(--hig-text,#fff)!important;border:1px solid var(--hig-line,#444)!important;min-height:44px;border-radius:12px;padding:10px 14px;font-size:.9rem!important}
html[data-teamilo-hig] #hig-direct-root .hig-dm-tab.selected{background:var(--hig-accent,#d5fb75)!important;color:var(--hig-on-button,#152010)!important}
html[data-teamilo-hig] #hig-direct-root button.hig-dm-primary,html[data-teamilo-hig] body .hig-dm-primary{background:var(--hig-button,#d5fb75)!important;color:var(--hig-on-button,#172010)!important;border:1px solid transparent!important;border-radius:11px!important;min-height:44px!important;padding:10px 16px!important;font-size:.9rem!important;font-weight:650!important;line-height:1.4!important;cursor:pointer}
html[data-teamilo-hig] #hig-direct-root button.hig-dm-secondary,html[data-teamilo-hig] #hig-direct-root .hig-dm-secondary{background:var(--hig-soft,#333)!important;color:var(--hig-text,#fff)!important;border:1px solid var(--hig-line,#444)!important;border-radius:11px!important;min-height:44px!important;padding:10px 14px!important;font-size:.875rem!important;font-weight:550!important;cursor:pointer}
html[data-teamilo-hig] #hig-direct-root .hig-dm-person{min-height:70px;display:flex;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--hig-line,#444);flex-wrap:wrap}
html[data-teamilo-hig] #hig-direct-root .hig-dm-avatar{height:44px;width:44px;flex:none;display:grid;place-items:center;background:var(--hig-soft,#444);border-radius:50%;font-size:1.15rem;font-weight:650;color:var(--hig-text,#fff)}
html[data-teamilo-hig] #hig-direct-root .hig-dm-grow{flex:1;min-width:120px;display:flex;flex-direction:column;gap:5px;text-align:left}
html[data-teamilo-hig] #hig-direct-root .hig-dm-grow strong{font-size:1rem;line-height:1.3;overflow-wrap:anywhere}
html[data-teamilo-hig] #hig-direct-root .hig-dm-grow small{font-size:.82rem!important;color:var(--hig-muted,#bbb)!important;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
html[data-teamilo-hig] #hig-direct-root .hig-dm-thread{display:flex;text-align:left;align-items:center;gap:12px;background:transparent!important;color:var(--hig-text,#fff)!important;width:100%;min-height:72px;padding:13px 5px;border:0!important;border-bottom:1px solid var(--hig-line,#444)!important;border-radius:0!important;cursor:pointer}
html[data-teamilo-hig] #hig-direct-root .hig-dm-badge,html[data-teamilo-hig] .hig-dm-notice{background:#ff675f;color:#2a100f;border-radius:99px;padding:3px 8px;font-size:.73rem!important;font-weight:700}
html[data-teamilo-hig] #hig-direct-root .hig-dm-empty{padding:22px 0;color:var(--hig-muted,#aaa)!important;font-size:.95rem!important}
html[data-teamilo-hig] #hig-direct-root .hig-dm-note{color:var(--hig-muted,#bbb)!important;margin:0 0 22px;line-height:1.55}
html[data-teamilo-hig] #hig-direct-root label{display:block;margin:17px 0 6px;font-weight:600;font-size:.9rem;color:var(--hig-text,#fafafa)}
html[data-teamilo-hig] #hig-direct-root input,html[data-teamilo-hig] #hig-direct-root select{width:100%;max-width:100%;background:var(--hig-surface,#2b2d2e)!important;color:var(--hig-text,#fafafa)!important;border:1px solid var(--hig-line,#444)!important;border-radius:11px;padding:12px 14px;min-height:48px;font-size:1rem}
html[data-teamilo-hig] #hig-direct-root .hig-dm-divider{height:1px;background:var(--hig-line,#444);margin:26px 0}
html[data-teamilo-hig] #hig-direct-root .hig-dm-messages{flex:1;overflow:auto;min-height:0;padding:20px clamp(14px,4vw,28px);display:flex;flex-direction:column;gap:12px;overscroll-behavior:contain}
html[data-teamilo-hig] #hig-direct-root .hig-dm-bubble{max-width:85%;padding:12px 15px;border-radius:16px;background:var(--hig-soft,#444);color:var(--hig-text,#fff);display:flex;flex-direction:column;gap:6px;overflow-wrap:anywhere;white-space:pre-wrap}
html[data-teamilo-hig] #hig-direct-root .hig-dm-bubble.mine{align-self:flex-end;background:var(--hig-button,#d5fb75);color:var(--hig-on-button,#172010)}
html[data-teamilo-hig] #hig-direct-root .hig-dm-bubble.theirs{align-self:flex-start}
html[data-teamilo-hig] #hig-direct-root .hig-dm-bubble small{font-size:.72rem!important;opacity:.8!important;color:inherit!important;align-self:end}
html[data-teamilo-hig] #hig-direct-root .hig-dm-compose{flex:none;display:flex;align-items:center;gap:9px;padding:12px clamp(14px,4vw,28px);background:var(--hig-surface,#242626);border-top:1px solid var(--hig-line,#444)}
html[data-teamilo-hig] #hig-direct-root .hig-dm-compose input{flex:1;min-width:0}
html[data-teamilo-hig] #hig-direct-root .hig-dm-footer{display:flex;justify-content:flex-end;gap:12px;padding:6px clamp(14px,4vw,28px) 12px;background:var(--hig-surface,#222)}
html[data-teamilo-hig] #hig-direct-root .hig-dm-text-danger{background:transparent!important;color:#ff938b!important;border:0!important;min-height:44px;padding:8px 10px;font-size:.84rem!important}
html[data-teamilo-hig] #hig-direct-root .hig-dm-actions{display:flex;gap:10px;margin:12px 0 22px;flex-wrap:wrap}
html[data-teamilo-hig] #hig-direct-root button:focus-visible,html[data-teamilo-hig] #hig-direct-root input:focus-visible,html[data-teamilo-hig] #hig-direct-root select:focus-visible{outline:3px solid var(--hig-focus,#b8a7ff)!important;outline-offset:3px!important}
html[data-teamilo-hig] .hig-dm-member-link{display:inline-flex;align-items:center;min-height:44px;margin-left:auto;padding:8px 10px;border:1px solid var(--hig-line,#444);border-radius:10px;background:var(--hig-soft,#303030);color:var(--hig-text,#fff);font-size:.83rem!important;cursor:pointer}
html[data-teamilo-hig] .hig-dm-channel{display:flex;justify-content:space-between;align-items:center;gap:10px}
html[data-teamilo-hig] #hig-direct-status:not(:empty){position:fixed;bottom:max(14px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);z-index:31000;background:var(--hig-surface,#333);border:1px solid var(--hig-line,#555);color:var(--hig-text,#fff);padding:12px 16px;border-radius:11px;max-width:min(95vw,550px);font-size:.875rem;box-shadow:0 8px 22px #0003}
html[data-teamilo-hig] #hig-direct-root .hig-dm-sr{position:absolute!important;width:1px;height:1px;clip:rect(0,0,0,0);overflow:hidden;white-space:nowrap;padding:0;margin:-1px;border:0}
@media(max-width:680px){html[data-teamilo-hig] #hig-direct-root .hig-dm-shell{border:0;box-shadow:none}html[data-teamilo-hig] #hig-direct-root .hig-dm-head{padding:12px 14px;min-height:68px}html[data-teamilo-hig] #hig-direct-root .hig-dm-head h2{font-size:1.25rem!important}html[data-teamilo-hig] #hig-direct-root .hig-dm-person{gap:9px}html[data-teamilo-hig] #hig-direct-root .hig-dm-person .hig-dm-primary,html[data-teamilo-hig] #hig-direct-root .hig-dm-person .hig-dm-secondary{padding:8px!important;font-size:.78rem!important}html[data-teamilo-hig] #hig-direct-root .hig-dm-bubble{max-width:90%}}
