.athena-launch {
  position: fixed;
  right: max(14px, env(safe-area-inset-right));
  bottom: calc(46px + env(safe-area-inset-bottom));
  width: 60px; height: 60px; padding: 0;
  border-radius: 50%; background: #fff; border: 1px solid #a8b6ae;
  box-shadow: 0 3px 12px #0002; z-index: 5;
}
.athena-launch img { display: block; width: 100%; height: 100%; object-fit: contain; }
.athena-avatar { width: 36px; height: 36px; flex: 0 0 36px; object-fit: contain; }
.athena-sources { display: block; color: #53625c; margin-top: 8px; font-size: 12px; line-height: 1.5; white-space: pre-line; }
.athena-web-sources { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 12px; }
.athena-web-sources a { color: #075a8a; text-decoration: underline; overflow-wrap: anywhere; }
.athena-dialog {
  width: min(480px, calc(100vw - 20px));
  height: min(720px, calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  margin: auto max(10px, env(safe-area-inset-right)) auto auto;
  padding: 0; border: 1px solid #cddbd7; border-radius: 8px;
  background: #fff; color: #22312d; overflow: hidden; font-size: 14px; letter-spacing: 0;
}
.athena-dialog[open] { display: flex; flex-direction: column; }
.athena-dialog [hidden] { display: none !important; }
.athena-head { display: flex; gap: 6px; align-items: center; padding: 12px; border-bottom: 1px solid #dce5e1; }
.athena-head > div { min-width: 0; flex: 1; }
.athena-head h2 { margin: 0; font-size: 21px; }
.athena-head small { display: block; font-size: 12px; overflow-wrap: anywhere; }
.athena-head button, .athena-composer button { display: grid; place-items: center; width: 42px; min-width: 42px; height: 42px; padding: 9px; flex-shrink: 0; }
.athena-dialog button img { width: 22px; height: 22px; }
.athena-tabs { display: flex; padding: 8px 12px; gap: 6px; border-bottom: 1px solid #dce5e1; }
.athena-tabs button { flex: 1; min-width: 0; padding: 10px 4px; font-size: 13px; white-space: nowrap; }
.athena-tabs button:first-child { flex: 1.3; }
.athena-tabs button[aria-pressed="true"] { background: #e7f5ef; border-color: #257961; color: #205d49; }
#athenaMessage { margin: 0; padding: 10px 14px; background: #fff2d3; color: #574419; overflow-wrap: anywhere; }
.athena-content, #athenaSettings { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 14px; }
#athenaSettings { display: flex; flex-direction: column; background: #f5f8f7; padding: 0; overflow: hidden; }
#athenaSettingsForm { display: flex; flex-direction: column; min-width: 0; min-height: 0; flex: 1; }
.athena-settings-scroll { display: grid; grid-auto-rows: max-content; align-content: start; gap: 12px; padding: 16px; min-width: 0; min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: 12px; }
#athenaSettingsForm p { margin: 0; line-height: 1.55; font-size: 13px; color: #52665c; }
#athenaSettingsForm small { display: block; line-height: 1.5; font-size: 12px; color: #607168; font-weight: 400; }
.athena-settings-intro h3 { margin: 0 0 4px; font-size: 19px; color: #203d31; }
.athena-settings-activation { padding: 14px; display: grid; gap: 10px; background: #edf6f0; border: 1px solid #c7dfd0; border-radius: 12px; }
#athenaSettingsForm .athena-setting-switch { display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; }
.athena-setting-switch > span { min-width: 0; }
.athena-setting-switch strong { display: block; line-height: 1.45; font-size: 14px; color: #243e31; }
#athenaSettingsForm input[type="checkbox"] { appearance: none; -webkit-appearance: none; position: relative; flex: 0 0 42px; width: 42px; min-width: 42px; height: 26px; margin: 0; padding: 0; border: 1px solid #a6b8ac; border-radius: 20px; background: #dce5df; cursor: pointer; }
#athenaSettingsForm input[type="checkbox"]::before { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #203d3133; transition: transform .15s; }
#athenaSettingsForm input[type="checkbox"]:checked { background: #28734f; border-color: #28734f; }
#athenaSettingsForm input[type="checkbox"]:checked::before { transform: translateX(16px); }
#athenaSettingsForm :focus-visible { outline: 3px solid #8fbeab; outline-offset: 3px; }
.athena-settings-group { min-width: 0; background: #fff; border: 1px solid #dbe5df; border-radius: 12px; overflow: hidden; }
.athena-settings-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; min-height: 60px; cursor: pointer; list-style: none; }
.athena-settings-group > summary::-webkit-details-marker { display: none; }
.athena-settings-group > summary > span { min-width: 0; }
.athena-settings-group > summary strong { display: block; font-size: 14px; line-height: 1.4; color: #243e31; }
.athena-settings-group > summary::after { content: ""; flex: 0 0 7px; width: 7px; height: 7px; border-right: 2px solid #6a8274; border-bottom: 2px solid #6a8274; transform: rotate(45deg); margin: -4px 3px 0 0; }
.athena-settings-group[open] > summary { background: #f0f6f2; border-bottom: 1px solid #e0e9e3; }
.athena-settings-group[open] > summary::after { transform: rotate(225deg); margin-top: 4px; }
.athena-settings-body { display: grid; gap: 16px; padding: 14px; min-width: 0; overflow-wrap: anywhere; }
#athenaSettingsForm .athena-setting-field { display: grid; gap: 7px; min-width: 0; font-size: 13px; }
#athenaSettingsForm input:not([type="checkbox"]), #athenaSettingsForm select { display: block; width: 100%; min-width: 0; max-width: 100%; height: 46px; min-height: 46px; margin: 0; box-sizing: border-box; font: inherit; font-size: 16px; padding: 10px; }
#athenaSettingsForm input[type="time"] { -webkit-appearance: none; appearance: none; text-align: left; min-inline-size: 0; }
#athenaSettingsForm input[type="time"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
#athenaSettingsForm input[name="callPin"] { letter-spacing: .24em; }
.athena-quiet-hours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
.athena-quiet-hours legend { font-weight: 650; font-size: 13px; padding: 0 0 8px; }
.athena-call-pin { display: grid; gap: 10px; padding-top: 14px; border-top: 1px solid #e4ebe6; }
.athena-call-pin button { min-height: 44px; }
.athena-settings-note { padding: 10px; border-radius: 8px; background: #f5f8f6; }
.athena-key-actions { display: grid; gap: 8px; }
.athena-settings-body a { color: #28634b; text-underline-offset: 3px; font-size: 13px; }
.athena-settings-footer { flex-shrink: 0; padding: 12px 16px 16px; background: #f5f8f7; border-top: 1px solid #dbe5df; }
.athena-settings-footer button { width: 100%; min-height: 46px; border-radius: 9px; background: #28734f; border-color: #28734f; color: #fff; font-weight: 650; }
.athena-head button[aria-pressed="true"] { background: #e7f5ef; border-color: #79aa90; }
.athena-message { padding: 12px 0; border-bottom: 1px solid #edf0ee; overflow-wrap: anywhere; }
.athena-message strong { font-size: 12px; color: #416055; }
.athena-message p { margin: 6px 0 0; white-space: pre-wrap; line-height: 1.5; }
.athena-progress { padding-inline: 10px; border-left: 3px solid #2a8465; background: #f3f8f5; }
.athena-user strong { color: #276ba3; }
.athena-message-date { display: block; color: #66716c; font-size: 11px; margin-top: 6px; }
.athena-report { margin-top: 8px; font-size: 12px; }
.athena-report summary { cursor: pointer; color: #395d78; }
.athena-report form { display: grid; gap: 8px; margin-top: 8px; padding: 10px; background: #f6f8f7; border: 1px solid #dce5e1; border-radius: 5px; }
.athena-report label { display: grid; gap: 4px; }
.athena-report select, .athena-report textarea { width: 100%; min-width: 0; box-sizing: border-box; font: inherit; font-size: 16px; }
.athena-report button { justify-self: start; }
.athena-memory-head { display: flex; align-items: center; gap: 6px; }
.athena-memory-head h3, .athena-memory-head strong { flex: 1; margin: 0; font-size: 14px; }
.athena-memory-note { padding: 14px 0; border-bottom: 1px solid #dce5e1; overflow-wrap: anywhere; }
.athena-memory-note p { white-space: pre-wrap; line-height: 1.5; }
.athena-memory-note small { color: #66716c; font-size: 11px; }
.athena-memory-editor label { display: grid; gap: 6px; margin-bottom: 12px; }
.athena-memory-editor select, .athena-memory-editor textarea { width: 100%; min-width: 0; box-sizing: border-box; font-size: 16px; }
.athena-memory-editor textarea { min-height: 140px; resize: vertical; }
.athena-memory-footer { margin-top: 20px; padding-top: 12px; border-top: 1px solid #dce5e1; }
.athena-memory-footer button { max-width: 100%; white-space: normal; }
.athena-action { border: 1px solid #c9dcd3; border-left: 3px solid #2a8465; border-radius: 5px; margin: 12px 0; padding: 12px; overflow-wrap: anywhere; }
.athena-action p { margin: 6px 0; }
.athena-action dl { display: grid; grid-template-columns: minmax(80px, 28%) minmax(0, 1fr); gap: 7px 10px; margin: 12px 0; }
.athena-action dt { color: #53625c; font-size: 12px; }
.athena-action dd { margin: 0; white-space: pre-wrap; }
.athena-action[data-action-kind="measurement_write"] dl { grid-template-columns: minmax(0, 1fr); gap: 5px; }
.athena-action[data-action-kind="measurement_write"] dt { margin-top: 8px; font-weight: 700; }
.athena-preview-warnings { margin: 10px 0; padding-left: 18px; font-size: 13px; }
.athena-action del { color: #875c50; }
.athena-action-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.athena-action-buttons button { font-size: 13px; }
.athena-action-buttons button:has(img) { display: grid; place-items: center; width: 42px; height: 42px; padding: 9px; }
.athena-editor-fields { min-width: 0; padding: 0; margin: 0; border: 0; }
.athena-editor-fields > legend { padding: 0 0 12px; font-size: 15px; font-weight: 700; }
.athena-editor-object { display: grid; gap: 12px; }
.athena-editor-field, .athena-editor-row { min-width: 0; }
.athena-editor-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.athena-editor-icon { display: inline-grid; place-items: center; width: 36px; min-width: 36px; height: 36px; padding: 6px; flex-shrink: 0; }
.athena-editor input:not([type="checkbox"]), .athena-editor textarea, .athena-editor select { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; font-size: 16px; }
.athena-editor input[type="checkbox"] { width: 20px; height: 20px; }
.athena-editor textarea { min-height: 80px; resize: vertical; }
.athena-editor select { margin: 8px 0; }
.athena-editor-row { padding: 10px 0; border-bottom: 1px solid #dce5e1; }
.athena-editor-row > .athena-editor-label { margin-bottom: 10px; }
.athena-editor-commands { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; }
.athena-editor-commands button { max-width: 100%; white-space: normal; }
.athena-composer { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-top: 1px solid #dce5e1; flex-shrink: 0; }
.athena-input-row { display: flex; width: 100%; align-items: flex-end; gap: 8px; }
.athena-media-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
#athenaInputs { width: 100%; max-height: 120px; overflow-y: auto; }
#athenaInputs:empty { display: none; }
.athena-input { display: flex; align-items: flex-start; gap: 6px; border-bottom: 1px solid #dce5e1; padding: 6px 0; }
.athena-input > img { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.athena-input details { min-width: 0; flex: 1; overflow-wrap: anywhere; font-size: 12px; }
.athena-input summary { cursor: pointer; padding: 8px 0; }
.athena-input p { white-space: pre-wrap; margin: 6px 0; }
.athena-speech { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 6px; margin-top: 8px; }
.athena-message audio { display: block; width: 100%; max-width: 100%; height: 40px; margin-top: 8px; }
.athena-composer textarea { flex: 1; min-width: 0; min-height: 64px; height: 64px; max-height: 120px; resize: vertical; font-size: 16px; }
.athena-voice-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.athena-voice-bar[hidden] { display: none; }
.athena-composer .athena-voice-bar button { display: inline-flex; width: auto; min-width: 0; min-height: 36px; height: 36px; padding: 4px 8px; font-size: 12px; }
.athena-voice-bar [data-voice-status] { font-size: 12px; }
@media (max-width: 540px) {
  .athena-dialog { margin: auto; }
  .athena-head { padding: 10px; }
}
@media (max-width: 360px) {
  .athena-quiet-hours { grid-template-columns: minmax(0, 1fr); }
  .athena-head { gap: 4px; }
  .athena-avatar { width: 30px; height: 30px; flex-basis: 30px; }
  .athena-head h2 { font-size: 19px; }
}
