.hermes-entry{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;font-size:11px;min-height:44px;border-radius:7px}
.hermes-entry[aria-expanded=true]{background:var(--accent2,var(--hover));color:var(--accent)}
.hermes-panel{--h-bg:var(--paper,var(--surface,#f6f8fa));--h-soft:var(--paper2,var(--hover,#e4ebf3));--h-ink:var(--ink,var(--text,#242a33));--h-muted:var(--ink2,var(--muted,#5d6774));--h-line:var(--rule,var(--border,#cfd7e0));position:fixed;inset:12px 12px 12px auto;z-index:950;width:370px;max-width:calc(100vw - 24px);display:flex;flex-direction:column;min-height:0;background:var(--h-bg);color:var(--h-ink);border:1px solid var(--h-line);border-radius:12px;box-shadow:0 6px 24px #0002;font:14px/1.5 -apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo",sans-serif;overflow:hidden}
.hermes-panel[hidden],.hermes-panel [hidden]{display:none!important}.hermes-panel *{box-sizing:border-box}
.hermes-panel button{color:inherit;font:inherit;background:transparent;border:1px solid var(--h-line);border-radius:6px;padding:6px 10px;min-height:36px;cursor:pointer}.hermes-panel button:hover{background:var(--h-soft)}.hermes-panel button:disabled{opacity:.5;cursor:not-allowed}.hermes-panel :focus-visible,.hermes-entry:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.hermes-head{display:flex;align-items:center;gap:8px;padding:10px 14px;flex-shrink:0;border-bottom:1px solid var(--h-line)}.hermes-head h2{font-size:16px;font-weight:650;margin:0;flex:1}.hermes-head [data-close]{font-size:23px;border:0;width:36px;padding:0}
.hermes-content{padding:14px;flex:1;min-height:70px;overflow:auto;overscroll-behavior:contain}.hermes-content [data-status]{font-size:12px;color:var(--h-muted);margin:0 0 12px}.hermes-content [data-status]:empty{display:none}.hermes-notice{padding:14px;background:var(--h-soft);border-radius:8px;margin-bottom:16px}.hermes-notice strong{font-size:14px}.hermes-notice p{font-size:13px;margin:6px 0 0;color:var(--h-muted)}.hermes-content article{padding:12px 0;border-bottom:1px solid var(--h-line);overflow-wrap:anywhere}.hermes-content article strong{font-size:13px}.hermes-content article p{white-space:pre-wrap;font-size:13px;margin:5px 0}.hermes-content small{font-size:11px;color:var(--h-muted)}
.hermes-compose{padding:12px 14px;border-top:1px solid var(--h-line);flex-shrink:0}.hermes-compose label{display:block;font-size:12px;margin-bottom:6px}.hermes-compose textarea{display:block;resize:vertical;width:100%;min-height:72px;max-height:150px;border:1px solid var(--h-line);border-radius:7px;padding:10px;font:inherit;background:var(--h-bg);color:inherit}.hermes-compose>div{display:flex;gap:8px;align-items:center;justify-content:space-between;margin-top:8px}.hermes-compose small{color:var(--h-muted);font-size:11px;max-width:200px}.hermes-compose button{flex-shrink:0}
.hermes-space-open .thread-pane{display:none!important}.hermes-space-open #main{padding-right:min(370px,40vw)}.hermes-space-open .hermes-panel{top:43px;right:5px;bottom:5px;width:min(370px,40vw);border-radius:0 7px 7px 0;box-shadow:none}
@media(max-width:800px){.hermes-panel,.hermes-space-open .hermes-panel{inset:8px 8px auto;width:calc(100vw - 16px);max-width:none;height:calc(100dvh - 16px);border-radius:10px;box-shadow:0 4px 24px #0003}.hermes-space-open #main{padding-right:0}.hermes-compose textarea{font-size:16px}}
@media(max-height:580px){.hermes-panel .hermes-compose textarea{min-height:44px;height:44px}.hermes-panel .hermes-compose{padding-top:6px;padding-bottom:6px}.hermes-panel .hermes-notice{padding:8px}}

.hermes-compose .hermes-compose-title{margin:0 0 6px;min-height:26px}.hermes-compose-title label{margin:0}.hermes-compose-title [data-reset]{font-size:11px;min-height:26px;padding:2px 6px}.hermes-retention{font-size:11px;line-height:1.45;color:var(--h-muted);margin:7px 0 0}.hermes-content .hermes-message{padding:10px 12px;margin:10px 0;border:0;border-radius:8px;background:var(--h-soft)}.hermes-content .hermes-assistant{background:transparent;border:1px solid var(--h-line)}.hermes-message p{white-space:pre-wrap;overflow-wrap:anywhere}.hermes-content [data-chat]:empty{display:none}

/* User-owned agent connection, within the existing assistant panel. */
.hermes-connection{border:1px solid var(--h-line);border-radius:10px;padding:12px;margin:12px 0}
.hermes-connection-heading{display:flex;align-items:center;justify-content:space-between;gap:8px}
.hermes-connection-heading strong{overflow-wrap:anywhere;min-width:0}
.hermes-connection form{margin-top:12px}
.hermes-connection form[hidden]{display:none}
.hermes-connection label{display:block;margin:12px 0 4px;font-size:13px;font-weight:600}
.hermes-connection input,.hermes-connection select{box-sizing:border-box;width:100%;min-height:40px;padding:8px;border:1px solid var(--h-line);border-radius:7px;background:var(--h-bg);color:var(--h-ink);font:inherit;font-size:13px}
.hermes-connection p,.hermes-connection small{font-size:12px;line-height:1.6;overflow-wrap:anywhere;color:var(--h-muted)}
.hermes-connection-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px}
.hermes-connection button{min-height:36px}
.hermes-agent-name-row{display:flex;align-items:center;gap:8px}
.hermes-agent-name-row input{flex:1;min-width:0}
.hermes-agent-name-row button{flex:none;white-space:nowrap}
.hermes-connection a{color:var(--accent)}

@media(max-width:800px){.hermes-connection input,.hermes-connection select{font-size:16px}}

/* Agent credentials belong to the existing Planner Settings page. */
.hermes-settings{--h-bg:var(--paper);--h-ink:var(--ink);--h-muted:var(--ink2);--h-line:var(--rule);max-width:100%;min-width:0}
.hermes-settings form{max-width:640px}.hermes-settings button{font:inherit;color:var(--ink);border:1px solid var(--rule);border-radius:7px;background:var(--paper2);padding:7px 12px;cursor:pointer}
.hermes-settings button[type=submit]{background:var(--accent);color:#fff;border-color:var(--accent)}
.hermes-settings [hidden]{display:none!important}.hermes-settings input:focus-visible,.hermes-settings button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

.hermes-assist{font-size:13px}.hermes-assist-heading,.hermes-assist-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:8px 0}.hermes-assist-heading{justify-content:space-between}.hermes-assist label{display:block;font-size:12px;margin:8px 0}.hermes-assist input,.hermes-assist textarea,.hermes-assist select{display:block;width:100%;max-width:100%;min-height:38px;margin-top:4px;padding:7px;background:var(--h-bg);color:var(--h-ink);border:1px solid var(--h-line);border-radius:6px;font:inherit}.hermes-assist textarea{min-height:80px;resize:vertical}.hermes-assist small{display:block;overflow-wrap:anywhere}.hermes-assist summary{cursor:pointer;padding:8px 0}.hermes-assist-notice{background:var(--h-soft);padding:10px;border-radius:6px;font-size:12px}.hermes-assist [data-interim]{color:var(--h-muted)}.hermes-assist [data-assist-status]{white-space:pre-wrap;overflow-wrap:anywhere}.hermes-assist article.hermes-candidate{border:1px solid var(--h-line);border-radius:8px;padding:10px;margin:12px 0}.hermes-compose-title{flex-wrap:wrap}.hermes-compose-title [data-dictate]{font-size:11px;padding:3px 8px}.hermes-head [data-assist-open]{font-size:12px}.hermes-assist button[aria-pressed=true]{background:var(--h-soft)}@media(max-width:800px){.hermes-assist input,.hermes-assist textarea,.hermes-assist select{font-size:16px}.hermes-assist button{min-height:44px}}

.hermes-assist-notice p{margin:0 0 8px}.hermes-assist-notice a{color:var(--accent);text-underline-offset:3px}

.hermes-assist-languages{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px 0}.hermes-assist-languages label{font-size:12px;display:grid;gap:5px}.hermes-assist-languages select{width:100%;min-width:0;font:inherit;color:inherit;background:var(--h-bg);padding:7px 4px;border:1px solid var(--h-line);border-radius:6px}.hermes-assist [data-segments] article{padding:10px 0;border-bottom:1px solid var(--line,#ddd)}.hermes-assist [data-segments] p{white-space:pre-wrap;overflow-wrap:anywhere}.hermes-assist .hermes-translation{border-left:2px solid var(--accent,#89613b);padding-left:8px}
.hermes-assist [data-live-pair]{max-height:220px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}.hermes-assist [data-live-pending]{font-size:13px;opacity:.8;white-space:pre-wrap;overflow-wrap:anywhere}

.hermes-assist-summary { padding: 12px; margin: 12px 0; border: 1px solid var(--line, #ddd); border-radius: 10px; }
.hermes-assist-summary h3 { font-size: 14px; margin: 0 0 8px; }
.hermes-assist-summary [data-summary] { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; line-height: 1.65; font-size: 13px; }

.hermes-assist-history { display: grid; gap: 4px; font-size: 12px; margin: 8px 0; }
.hermes-assist-history select { width: 100%; min-width: 0; }

/* Compact voice entry: one microphone, explicit modes, reachable by mouse/keyboard/touch. */
.hermes-sr-only{position:absolute!important;width:1px;height:1px;padding:0!important;margin:-1px!important;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.hermes-panel button.hermes-icon-button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:9px;line-height:1}
.hermes-icon-button svg{display:block;pointer-events:none}.hermes-panel button.hermes-icon-button[aria-pressed=true]{background:var(--h-ink);color:var(--h-bg)}
.hermes-panel .hermes-compose-toolbar{gap:6px;justify-content:flex-start;margin-top:6px}
.hermes-compose-toolbar #hermes-keyboard-hint{flex:1;min-width:0;max-width:none;margin:0;line-height:1.4}
.hermes-panel .hermes-compose button[type=submit]{background:var(--accent,#6b7b4f);color:#fff}
.hermes-voice-control{position:relative;flex:0 0 44px;line-height:1}
.hermes-voice-menu{position:absolute;bottom:calc(100% + 8px);left:0;width:min(260px,calc(100vw - 64px));padding:5px;z-index:2;border:1px solid var(--h-line);border-radius:12px;background:var(--h-bg);box-shadow:0 4px 20px #0002;line-height:1.5}
.hermes-panel .hermes-voice-menu button{display:flex;align-items:center;gap:12px;width:100%;min-height:64px;padding:9px 12px;border:0;text-align:left;border-radius:7px}
.hermes-voice-menu svg{flex-shrink:0}.hermes-voice-menu span{min-width:0}.hermes-voice-menu small{display:block;max-width:none;font-size:11px;margin-top:2px}
.hermes-assist-actions [data-listening-state]{flex:1;min-width:90px;color:var(--h-muted);font-size:12px}

.hermes-assist-heading strong{flex:1}.hermes-assist-options{padding:10px 12px;margin-bottom:12px;background:var(--h-soft);border:1px solid var(--h-line);border-radius:9px}.hermes-assist-options .hermes-assist-notice{padding:0}

/* Listening is independent from panel visibility; minimized controls never expose transcript text. */
.hermes-listening-dock[hidden],.hermes-listening-dock [hidden]{display:none!important}
.hermes-listening-dock{position:fixed;right:16px;bottom:max(16px,env(safe-area-inset-bottom));z-index:950;display:flex;align-items:center;gap:4px;max-width:calc(100vw - 32px);padding:5px;border:1px solid var(--rule,#cfd7e0);border-radius:14px;background:var(--paper,#f6f8fa);color:var(--ink,#242a33);box-shadow:0 4px 18px #0002;font:13px/1.4 -apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo",sans-serif}
.hermes-listening-dock button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 12px;border:0;border-radius:9px;background:transparent;color:inherit;font:inherit;cursor:pointer}
.hermes-listening-dock button:hover{background:var(--paper2,#e4ebf3)}.hermes-listening-dock button:disabled{opacity:.5;cursor:not-allowed}.hermes-listening-dock button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.hermes-listening-dock .hermes-icon-button{width:44px;padding:0;flex:0 0 44px}
.hermes-session-bar{display:flex;align-items:center;gap:4px;padding:5px 12px;border-bottom:1px solid var(--h-line);flex-shrink:0}
.hermes-session-bar [data-listening-open]{display:flex;align-items:center;gap:8px;flex:1;min-width:0;border:0;font-size:12px;text-align:left}
.hermes-listening-dot{display:inline-block;flex:0 0 7px;width:7px;height:7px;background:var(--ink2,#777);border-radius:50%}.is-listening .hermes-listening-dot{background:var(--accent,#62764a)}
.hermes-head{gap:4px}.hermes-head>svg{margin-right:4px}.hermes-head h2{min-width:0}
.hermes-assist-options .hermes-assist-languages{margin:0}
.hermes-assist [data-assist-status]{font-size:12px;color:var(--h-muted);margin:6px 0}.hermes-assist [data-assist-status]:empty{display:none}
.hermes-assist [data-unconfirmed] article{border-top:1px solid var(--h-line);padding:8px 0}.hermes-assist [data-unconfirmed] summary{color:var(--h-muted);font-size:12px}.hermes-assist [data-unconfirmed] p{font-size:12px;overflow-wrap:anywhere}.hermes-assist [data-analysis-status]{overflow-wrap:anywhere}
.hermes-live{border-top:1px solid var(--h-line);margin-top:10px;padding-top:12px}.hermes-live h3{font-size:12px;font-weight:600;color:var(--h-muted);margin:0 0 8px}.hermes-live [data-live-empty]{color:var(--h-muted);font-size:13px;min-height:80px;padding-top:12px}
.hermes-live [data-live-pair]{max-height:210px}.hermes-live article{border:0;padding:0}.hermes-live [data-live-pending],.hermes-live [data-interim]{font-size:15px;line-height:1.7;margin:8px 0;overflow-wrap:anywhere}.hermes-live [data-live-pending]:empty,.hermes-live [data-interim]:empty{display:none}
.hermes-assist .hermes-help-actions{justify-content:flex-end;margin:0}.hermes-assist-summary{padding:0;border:0;border-top:1px solid var(--h-line);border-radius:0;margin:12px 0 0}.hermes-assist-summary>summary,.hermes-assist>[data-transcript-details]>summary{font-size:12px;color:var(--h-muted);min-height:44px;padding:12px 0}
.hermes-assist article.hermes-candidate{padding:0;margin:8px 0}.hermes-candidate>details>summary{list-style:none;padding:10px 12px;min-height:44px;display:grid;grid-template-columns:1fr auto;gap:4px 8px}.hermes-candidate>details>summary::-webkit-details-marker{display:none}.hermes-candidate>details>summary strong{grid-column:1/-1;grid-row:2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:14px;font-weight:500;line-height:1.5;white-space:pre-wrap}.hermes-candidate>details>summary:hover{background:var(--h-soft)}.hermes-candidate-editor{padding:0 12px 12px;border-top:1px solid var(--h-line)}

@media(max-width:800px){.hermes-listening-dock{left:12px;right:auto;bottom:calc(76px + env(safe-area-inset-bottom));max-width:calc(100vw - 88px)}}

/* Connection help is available even before a connection can be saved. */
.hermes-settings .hermes-settings-heading{flex-wrap:nowrap;gap:4px;padding:8px 10px}
.hermes-settings .hermes-settings-heading>.m-fold-sum:empty{display:none}
.hermes-settings .hermes-settings-heading>.m-fold-chev{margin-left:0;min-width:44px;min-height:44px}
.hermes-settings .hermes-settings-help{margin-left:auto;display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-height:44px;padding:0;border:0;background:transparent;border-radius:8px}
.hermes-settings-help>span{display:grid;place-items:center;width:22px;height:22px;border:1.5px solid currentColor;border-radius:50%;font:600 14px/1 sans-serif}
.hermes-settings .hermes-settings-help:hover{background:var(--paper3)}
.hermes-guide-dialog{box-sizing:border-box;width:min(820px,calc(100vw - 24px));height:min(820px,calc(100dvh - 24px));max-width:none;max-height:none;padding:0;border:1px solid var(--rule);border-radius:12px;background:var(--paper);color:var(--ink);box-shadow:0 12px 40px #0003;overflow:hidden}
.hermes-guide-dialog[open]{display:flex;flex-direction:column}
.hermes-guide-dialog::backdrop{background:#0005}
.hermes-guide-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px 6px 16px;border-bottom:1px solid var(--rule);flex-shrink:0}
.hermes-guide-dialog h2{font:600 16px/1.4 -apple-system,BlinkMacSystemFont,"Apple SD Gothic Neo",sans-serif;margin:0}
.hermes-guide-dialog>header button{flex:0 0 44px;width:44px;height:44px;border:0;border-radius:8px;padding:0;background:transparent;color:inherit;font-size:26px;cursor:pointer}
.hermes-guide-dialog>header button:hover{background:var(--paper2)}
.hermes-guide-dialog>header button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.hermes-guide-dialog iframe{display:block;width:100%;flex:1;min-height:0;border:0;background:var(--paper)}

.hermes-listening-dock .hermes-dock-handle{touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;cursor:grab}
.hermes-listening-dock.is-dragging{box-shadow:0 8px 24px #0003;outline:2px solid var(--accent,#8a5a2b);outline-offset:2px}
.hermes-listening-dock.is-dragging .hermes-dock-handle{cursor:grabbing}
.hermes-actions-help{min-height:44px;margin:6px 0;padding:8px 12px;border:1px solid var(--rule);border-radius:8px;background:var(--paper);color:var(--ink);font:inherit;cursor:pointer;text-align:left}
.hermes-actions-help[hidden]{display:none!important}
.hermes-actions-help:focus-visible{outline:2px solid var(--accent,#8a5a2b);outline-offset:2px}

.note-conflict-dialog{box-sizing:border-box;width:min(900px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:20px;border:1px solid var(--rule);border-radius:12px;background:var(--paper);color:var(--ink);overflow:auto}
.note-conflict-dialog::backdrop{background:#0005}.note-conflict-dialog header,.note-conflict-dialog footer{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.note-conflict-dialog h2{font-size:20px;flex:1;margin:0}.note-conflict-dialog button{min-width:44px;min-height:44px;padding:8px 12px;background:var(--paper);color:var(--ink);border:1px solid var(--rule);border-radius:6px;cursor:pointer}.note-conflict-dialog button:disabled{opacity:.5;cursor:default}.note-conflict-dialog label{display:block;font-size:14px}.note-conflict-dialog textarea{box-sizing:border-box;width:100%;min-height:160px;display:block;margin:6px 0 12px;padding:10px;font-family:inherit;font-size:16px;line-height:1.5;background:var(--paper);color:var(--ink);border:1px solid var(--rule);border-radius:6px}.note-conflict-columns{display:grid;grid-template-columns:1fr 1fr;gap:12px}.note-conflict-dialog [data-message]{font-size:14px;line-height:1.6}@media(max-width:600px){.note-conflict-columns{grid-template-columns:1fr}.note-conflict-dialog{padding:14px}.note-conflict-dialog footer button{flex:1 1 auto}}

.hermes-relay-setup{display:grid;gap:10px;margin:12px 0 18px}
.hermes-relay-setup p{margin:4px 0;line-height:1.55}
.hermes-relay-setup input{box-sizing:border-box;width:100%;min-width:0;font-family:ui-monospace,monospace;font-size:13px}
.hermes-relay-setup button{min-height:44px;max-width:100%;white-space:normal}
.hermes-relay-setup [hidden]{display:none!important}
.hermes-relay-setup [data-relay-pair]{padding:12px;border:1px solid var(--line,#ddd);border-radius:10px}
.hermes-relay-setup details{font-size:13px}
.hermes-relay-setup a{overflow-wrap:anywhere}
[data-direct-connection]>summary{cursor:pointer;padding:12px 0}

.hermes-agent-settings [hidden]{display:none!important}
.hermes-agent-settings .dialog-actions{flex-wrap:wrap}
.hermes-agent-settings .dialog-actions button{min-height:44px}

.hermes-relay-setup textarea{box-sizing:border-box;width:100%;max-width:100%;font-family:inherit;font-size:13px;line-height:1.5;resize:vertical;min-height:120px;overflow-wrap:anywhere}

/* Location recovery lives in Planner Settings, outside the chat composer. */
@media(max-width:380px){.hermes-compose-toolbar #hermes-keyboard-hint{display:none}}

.hermes-location-setting{margin:16px 0;padding:12px;border:1px solid var(--h-line);border-radius:8px}
.hermes-location-setting label{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer}
.hermes-location-setting input[type=checkbox]{width:20px;height:20px;min-height:20px;flex:0 0 20px;margin:0;padding:0;accent-color:var(--accent)}
.hermes-location-setting p{font-size:12px;line-height:1.6;margin:6px 0;overflow-wrap:anywhere}
.hermes-location-setting [data-location-preparation-status]:empty{display:none}

.hermes-location-recovery{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.hermes-location-recovery button{min-height:44px;padding:8px 12px;font:inherit;white-space:normal;border:1px solid var(--h-line);border-radius:8px;background:var(--paper);color:var(--ink);cursor:pointer}
.hermes-location-recovery button:disabled{opacity:.6;cursor:default}
.hermes-location-notice{pointer-events:none;position:fixed;z-index:11000;top:max(12px,env(safe-area-inset-top));left:50%;transform:translateX(-50%);box-sizing:border-box;width:min(560px,calc(100vw - 24px));padding:14px 16px;border:1px solid var(--rule,#d8d1c3);border-radius:12px;background:var(--paper,#fbf8f1);color:var(--ink,#2b2a26);box-shadow:0 4px 22px #0002;font-size:14px;line-height:1.6}
.hermes-location-notice p{margin:0 0 6px}.hermes-location-notice small{font-size:12px}.hermes-location-notice a{pointer-events:auto;color:inherit;text-decoration:underline}

/* Unified AI and voice setup. Technical fields stay inside optional details. */
.hermes-voice-settings{margin:12px 0;max-width:640px}
.hermes-voice-settings .hermes-connection-actions{justify-content:flex-start}
.hermes-voice-settings button,[data-connection-management]>summary{min-height:44px}
.hermes-voice-settings textarea{box-sizing:border-box;width:100%;max-width:100%;min-height:120px;padding:8px;font:inherit;font-size:13px;line-height:1.5;resize:vertical;border:1px solid var(--rule);border-radius:7px;background:var(--paper);color:var(--ink)}
[data-connection-management]>summary{cursor:pointer;padding:12px 0}
@media(max-width:800px){.hermes-voice-settings textarea{font-size:16px}}

/* Keep the conversation in view and the primary actions reachable on a phone. */
.hermes-listening-view .hermes-head{padding:6px 12px}
.hermes-listening-view .hermes-content{padding-top:6px}
.hermes-assist-heading{margin:0;min-height:44px}
.hermes-listening-status{padding:2px 0 8px;color:var(--h-muted);font-size:12px;border-bottom:1px solid var(--h-line)}
.hermes-listening-status [data-listening-state]{color:var(--h-ink);font-weight:600}
.hermes-listening-status [data-listening-state]:before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--h-muted);margin-right:6px}
.is-listening .hermes-listening-status [data-listening-state]:before{background:var(--accent,#62764a)}
.hermes-listening-status small:empty{display:none}
.hermes-assist .hermes-live{border:0;margin:8px 0;padding:0;min-height:160px}
.hermes-assist .hermes-live h3{display:none}
.hermes-assist .hermes-live [data-live-pair]{max-height:none;overflow:visible}
.hermes-assist .hermes-listening-controls{position:absolute;left:0;right:0;bottom:0;z-index:2;display:flex;gap:8px;margin:0;padding:10px 14px max(10px,env(safe-area-inset-bottom));border-top:1px solid var(--h-line);background:var(--h-bg);box-shadow:0 -6px 16px -12px #0005}
.hermes-panel button.hermes-labeled-button{width:auto;flex:1 1 auto;gap:6px;padding:8px 12px;line-height:1.4;border:1px solid var(--h-line);font-size:13px}
.hermes-panel .hermes-listening-controls [data-listen],.hermes-panel .hermes-listening-controls [data-pause]{background:var(--accent,#62764a);color:#fff;border-color:transparent}
.hermes-listening-controls [data-new-listening]{flex:1;min-height:44px}
.hermes-listening-more>button{margin:4px 0;width:100%}
.hermes-listening-more .hermes-assist-actions{display:block}
.hermes-listening-more .hermes-assist-actions button{margin:4px 0;width:100%}
.hermes-assist [data-voice-error-box]{margin:8px 0;padding:8px 10px}
.hermes-assist [data-voice-error]{margin:0}
.hermes-assist [data-assist-status]{margin:6px 0}
@media(max-width:800px){.hermes-assist .hermes-live{min-height:min(35dvh,240px)}.hermes-panel button.hermes-labeled-button{min-width:0;padding:8px;font-size:13px}}
.hermes-listening-view .hermes-content{padding-bottom:84px}
.hermes-listening-view .hermes-assist{display:flex;flex-direction:column;min-height:100%}
.hermes-listening-view .hermes-assist .hermes-live{flex:1}

/* Only the current utterance belongs in the live view. History stays in the menu. */
.hermes-assist .hermes-live [data-live-pending],.hermes-assist .hermes-live [data-interim]{font-size:17px;line-height:1.7;max-height:35dvh;overflow:auto;overflow-wrap:anywhere}
.hermes-assist .hermes-live [data-live-pair]{font-size:14px;max-height:22dvh;overflow:auto}
.hermes-live-help{flex:none;margin:12px 0;color:var(--h-muted);font-size:13px;line-height:1.6}
.hermes-live-help p{margin:0 0 8px}.hermes-live-help button{min-height:44px}
.hermes-assist-options>details{border-bottom:1px solid var(--h-line)}
.hermes-assist-options>.hermes-assist-summary{margin:0;border-top:0}
.hermes-assist-options [data-cues] article{padding:8px 0}

.hermes-live-settings{max-width:640px;margin:16px 0;border-top:1px solid var(--rule);padding-top:12px}
.hermes-live-settings .hermes-live-toggle{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:44px;cursor:pointer}
.hermes-live-toggle>span{display:flex;align-items:center;gap:8px}.hermes-live-toggle b{min-width:2em;font-size:13px}
.hermes-live-settings input[data-live-enabled]{appearance:none;display:inline-block;position:relative;flex:none;width:42px;height:24px;min-height:24px;padding:0;margin:0;border:1px solid var(--rule);border-radius:16px;background:var(--ink3,#999);cursor:pointer}
.hermes-live-settings input[data-live-enabled]::after{content:'';position:absolute;width:18px;height:18px;left:2px;top:2px;border-radius:50%;background:#fff}
.hermes-live-settings input[data-live-enabled]:checked{background:var(--accent);border-color:var(--accent)}.hermes-live-settings input[data-live-enabled]:checked::after{left:20px}
.hermes-live-settings input[data-live-enabled]:disabled{opacity:.5;cursor:wait}.hermes-live-settings p{font-size:13px;color:var(--ink2);line-height:1.5}.hermes-live-settings [data-live-preference-message]:empty{display:none}
.hermes-live-settings summary{cursor:pointer;padding:10px 0}.hermes-live-settings details>div{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.hermes-live-settings [data-live-key]{width:100%;box-sizing:border-box}

.hermes-interaction{padding:12px;margin:10px 0;border:1px solid currentColor;border-radius:10px;overflow-wrap:anywhere}.hermes-interaction[hidden]{display:none}.hermes-interaction p{white-space:pre-wrap;max-height:28vh;overflow:auto}.hermes-interaction-actions{display:flex;flex-wrap:wrap;gap:8px}.hermes-interaction-actions button,.hermes-interaction-actions input{min-height:44px;max-width:100%;font:inherit}.hermes-interaction-actions input{flex:1;min-width:120px}

/* Movable assistant, with corner and edge handles. Text remains scrollable. */
.hermes-head{cursor:grab;touch-action:none;user-select:none}
.hermes-panel.is-positioning .hermes-head{cursor:grabbing}
.hermes-window-edge{position:absolute;z-index:4;touch-action:none}
.hermes-window-edge[data-edge=n],.hermes-window-edge[data-edge=s]{height:7px;left:16px;right:16px;cursor:ns-resize}
.hermes-window-edge[data-edge=n]{top:0}.hermes-window-edge[data-edge=s]{bottom:0}
.hermes-window-edge[data-edge=e],.hermes-window-edge[data-edge=w]{width:7px;top:16px;bottom:16px;cursor:ew-resize}
.hermes-window-edge[data-edge=e]{right:0}.hermes-window-edge[data-edge=w]{left:0}
.hermes-window-edge[data-edge=ne],.hermes-window-edge[data-edge=nw],.hermes-window-edge[data-edge=se],.hermes-window-edge[data-edge=sw]{width:16px;height:16px}
.hermes-window-edge[data-edge=ne]{right:0;top:0;cursor:nesw-resize}.hermes-window-edge[data-edge=nw]{left:0;top:0;cursor:nwse-resize}
.hermes-window-edge[data-edge=se]{right:0;bottom:0;cursor:nwse-resize}.hermes-window-edge[data-edge=sw]{left:0;bottom:0;cursor:nesw-resize}
.hermes-window-edge[data-edge=se]::after{content:'';position:absolute;right:4px;bottom:4px;width:6px;height:6px;border-right:2px solid var(--h-muted);border-bottom:2px solid var(--h-muted);opacity:.55}

.hermes-panel{box-sizing:border-box}

.hermes-file-card{display:flex;flex-direction:column;gap:4px;margin-top:8px;padding:12px;border:1px solid currentColor;border-radius:10px;color:inherit;text-decoration:none;overflow-wrap:anywhere}.hermes-file-card small{opacity:.75}.hermes-file-card:focus-visible{outline:2px solid currentColor;outline-offset:3px}

.hermes-received-files{margin-bottom:12px;border-bottom:1px solid var(--h-line);padding-bottom:8px}.hermes-received-files>summary{cursor:pointer;min-height:44px;padding:10px 0}.hermes-received-files>p{font-size:12px;color:var(--h-muted)}.hermes-received-files nav{display:flex;gap:6px;flex-wrap:wrap;margin-top:10px}.hermes-received-files button{min-height:44px}.hermes-received-file{display:flex;align-items:center;gap:8px}.hermes-received-file .hermes-file-card{flex:1;min-width:0}.hermes-received-file>button{flex-shrink:0}

.hermes-source{border:1px solid var(--h-line);border-radius:8px;padding:10px;margin-bottom:12px;overflow-wrap:anywhere}
.hermes-source p{font-size:12px;color:var(--h-muted);margin:6px 0}
.hermes-message details{font-size:12px;margin-top:8px;max-height:180px;overflow:auto}
.hermes-message details a{color:var(--accent,#476e65)}
.hermes-sources section{margin:6px 0}.hermes-sources strong{display:block;font-size:12px}
.hermes-sources a{display:block;padding:3px 0;text-decoration:none;min-width:0}.hermes-sources a:hover .hermes-source-text{text-decoration:underline}
.hermes-source-meta{display:block;color:var(--ink2,#59645f)}.hermes-source-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Editable proposals are private and require an explicit save. */
.hermes-proposal{margin-top:12px;padding:12px;border:1px solid var(--border,#cbd5d1);border-radius:10px;min-width:0}
.hermes-proposal fieldset{min-width:0;margin:12px 0;padding:10px;border:1px solid #ccd5cf;border-radius:8px}
.hermes-proposal legend{font-weight:600}
.hermes-proposal label{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:6px 0;font-size:13px}
.hermes-proposal label>input:not([type=checkbox]),.hermes-proposal textarea,.hermes-proposal select{box-sizing:border-box;display:block;min-width:0;width:100%;padding:7px;border:1px solid #bdc9c2;border-radius:5px;font:inherit;background:var(--surface,#fff);color:inherit}
.hermes-proposal textarea{min-height:70px;resize:vertical}
.hermes-proposal button{margin:4px 6px 0 0;white-space:normal}
.hermes-proposal input[type=checkbox]{width:18px;height:18px}

/* AI·자료실 2번 A — 개인 AI 설정의 '스페이스에서 쓰기', 창 안 참고 안내 확인 */
.hermes-space-use{border:1px solid var(--rule,#ddd);border-radius:8px;padding:10px 12px;margin:12px 0}
.hermes-space-use p{margin:4px 0}.hermes-space-use ul{margin:6px 0 2px;padding-left:18px}.hermes-space-use li{margin:2px 0}
.space-personal-ai{margin:12px 0}.space-personal-ai label{display:flex;gap:8px;align-items:center;font-weight:600;min-height:36px}.space-personal-ai small{display:block;color:var(--ink2,#59645f)}
.hermes-space-note{margin:6px 0 0;font-size:12px;color:var(--ink2,#59645f)}
/* AI·자료실 3단계 — 공용 AI 한도 칸마다 한 줄, 위치 차단 단계 */
.space-limit{margin:10px 0}.space-limit label{display:block;font-weight:600}
.space-limit-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:4px 0}.space-limit-row input{max-width:140px}.space-limit-row span{font-size:13px;color:var(--ink2,#59645f)}
.space-limit small{display:block;color:var(--ink2,#59645f)}
.space-limit-help{margin:8px 0}.space-limit-help>summary{min-height:36px;display:flex;align-items:center;font-weight:600;cursor:pointer}
.hermes-location-steps{border-radius:8px;background:var(--paper2,#f2f1ec);padding:8px 12px;margin:6px 0}.hermes-location-steps ol{margin:6px 0;padding-left:20px}.hermes-location-steps li{margin:4px 0}
.hermes-settings .help-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
