.hermes-bubble { position: fixed; right: 24px; bottom: 24px; z-index: 180; border: 0; border-radius: 28px; padding: 15px 22px; background: var(--accent, #9d2948); color: #fff; font: inherit; font-weight: 600; box-shadow: 0 8px 24px #26313b26; cursor: pointer; }
.hermes-bubble:hover { background: var(--accent-dark, #7f1736); color: #fff; }
.hermes-panel { position: fixed; right: 24px; bottom: 88px; z-index: 181; width: min(440px, calc(100vw - 32px)); height: min(680px, calc(100dvh - 120px)); display: flex; flex-direction: column; border-radius: 20px; background: var(--surface, #fff); color: var(--ink, #26313b); box-shadow: 0 16px 50px #26313b33; overflow: hidden; font-family: inherit; font-size: 14px; line-height: 1.5; }
.hermes-panel[hidden], .hermes-bubble[hidden], .hermes-panel form[hidden] { display: none; }
.hermes-panel header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line, #e2e4e1); }
.hermes-panel h2 { font-size: 20px; margin: 0; }
.hermes-panel small, .hermes-notice, .hermes-status { color: var(--muted, #5f6871); }
.hermes-panel button { cursor: pointer; border: 1px solid var(--line, #e2e4e1); border-radius: 12px; background: var(--surface, #fff); color: var(--accent, #9d2948); padding: 10px 12px; font: inherit; }
.hermes-panel button:hover { background: var(--accent-soft, #f6e9ed); }
.hermes-panel :focus-visible, .hermes-bubble:focus-visible { outline: 2px solid var(--accent-dark, #7f1736); outline-offset: 3px; }
.hermes-notice { padding: 12px 20px; margin: 0; font-size: 12px; background: var(--surface-muted, #f9f9f7); }
.hermes-log { overflow-y: auto; flex: 1; min-height: 70px; padding: 20px; scrollbar-color: #858c87 transparent; }
.hermes-message { margin-bottom: 20px; overflow-wrap: anywhere; }
.hermes-message strong { font-size: 12px; }
.hermes-message p { margin: 6px 0; white-space: pre-wrap; }
.hermes-message.user { background: var(--accent-soft, #f6e9ed); padding: 12px 15px; border-radius: 15px; }
.hermes-welcome h3 { font-size: 21px; margin: 0 0 10px; }
.hermes-welcome button { display: block; margin-top: 12px; text-align: left; }
.hermes-status { margin: 0; padding: 0 20px; font-size: 12px; }
.hermes-status:not(:empty) { padding-bottom: 12px; }
.hermes-panel form { padding: 14px 20px 18px; border-top: 1px solid var(--line, #e2e4e1); }
.hermes-panel label { display: block; font-size: 12px; }
.hermes-panel textarea { display: block; width: 100%; resize: vertical; max-height: 140px; margin: 6px 0 10px; border: 1px solid var(--control-border, #858c87); border-radius: 12px; padding: 10px; color: inherit; background: #fff; font: inherit; }
.hermes-attachments input { display: block; width: 100%; margin: 5px 0 12px; font-size: 12px; }
.hermes-actions { display: flex; gap: 12px; justify-content: space-between; }
.hermes-actions button[type=submit] { background: var(--accent, #9d2948); color: #fff; border-color: transparent; }
.hermes-panel button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 640px) { .hermes-bubble { right: 16px; bottom: 100px; } .hermes-panel { right: 12px; bottom: 164px; width: calc(100vw - 24px); height: calc(100dvh - 182px); } }

body:has(#portal-more-drawer:not([hidden]), #cc-more-drawer:not([hidden])) .hermes-bubble { visibility: hidden; }

[data-hermes-open][hidden], [data-hermes-dashboard-open][hidden] { display: none !important; }
.hermes-activity { margin: 8px 0 12px; padding: 8px 10px; border: 1px solid var(--line, #e2e4e1); border-radius: 10px; font-size: 12px; color: var(--muted, #5f6871); }
.hermes-activity summary { cursor: pointer; font-weight: 600; }
.hermes-activity ul { padding-left: 18px; margin: 8px 0 0; }
.hermes-activity li + li { margin-top: 4px; }
.hermes-live { border-left: 2px solid var(--accent, #9d2948); padding-left: 12px; }
.hermes-live p:empty { display: none; }
