/* Keep emergency controls reachable above the shell's modal-backdrop (300). */
#communicationsControls{position:relative;z-index:301;display:flex;align-items:center;gap:6px;flex-shrink:0}
#communicationsControls button{height:22px;min-height:0;padding:0 7px;border:1px solid var(--line);border-radius:5px;background:var(--surface);color:var(--text);font:inherit;font-size:11px;white-space:nowrap}
#communicationsControls #communicationsSOS{border-color:#b65a5a;color:#ffbaba;font-weight:650}
#communicationsControls #communicationsSOS[data-paused=true]{background:#542727;color:#fff}
#communicationsPanel{width:min(480px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:0;border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--bg);color:var(--text);overflow:auto}
#communicationsPanel::backdrop{background:#0008}
#communicationsPanel header,#communicationsPanel footer{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:12px 16px}
#communicationsPanel header{border-bottom:1px solid var(--line)}
#communicationsPanel footer{border-top:1px solid var(--line)}
#communicationsPanel h2{font-size:16px;line-height:24px;margin:0}
#communicationsPanel button{min-height:36px;padding:6px 10px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--text);font:inherit;font-size:12px}
#communicationsPanel [data-comms-pause]{border-color:#b65a5a;color:#ffbaba}
#communicationsPanel button:disabled{opacity:.5;cursor:default}
#communicationsPanel input{width:100%;min-width:0;min-height:36px;padding:8px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--text);font:inherit}
.communications-body{display:grid;gap:10px;padding:16px;font-size:13px;line-height:19px;overflow-wrap:anywhere}
.communications-body p{margin:0}
[data-comms-error]{color:var(--warning)}
#communicationsControls button:focus-visible,#communicationsPanel :focus-visible{outline:2px solid var(--accent-2);outline-offset:2px}
@media(max-width:620px){.app-footer:has(#communicationsControls){padding:0 8px;gap:6px}.app-footer:has(#communicationsControls) #updatedAt{display:none}.app-footer:has(#communicationsControls) #runtimeReadback{min-width:0;overflow:hidden;white-space:nowrap}.app-footer:has(#communicationsControls) #runtimeState{overflow:hidden;text-overflow:ellipsis}}
