.chat-launcher { position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); z-index: 60; width: 56px; height: 56px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--accent); color: #08131d; box-shadow: 0 6px 28px #0006; }
.chat-launcher svg, .chat-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.chat-panel { --chat-accent: var(--accent); position: fixed; right: max(24px, env(safe-area-inset-right)); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 60; width: 440px; max-width: calc(100% - 32px); height: 600px; max-height: calc(100dvh - 120px - env(safe-area-inset-bottom)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--background); box-shadow: 0 16px 60px #0009; font-size: 14px; text-align: start; }
.chat-panel p { margin: 0; font-size: inherit; line-height: 1.5; }
.chat-header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface); flex-shrink: 0; }
.chat-heading { flex: 1; min-width: 130px; }
.chat-heading strong { font-size: 14px; }
.chat-heading p { font-size: 12px; color: var(--muted); }
.chat-modes { display: flex; gap: 2px; border-radius: 20px; padding: 3px; background: #ffffff08; }
.chat-modes button { border: 0; border-radius: 20px; padding: 7px 10px; background: transparent; font-size: 12px; }
.chat-modes button[aria-pressed="true"] { background: #ff12121f; color: var(--accent); }
.chat-icon { border: 0; background: transparent; width: 36px; height: 36px; display: grid; place-items: center; padding: 6px; }
.chat-log { flex: 1; min-height: 70px; padding: 16px; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; overscroll-behavior: contain; }
.chat-message { padding: 11px 14px; max-width: 88%; border-radius: 16px 16px 16px 4px; background: var(--surface); color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; flex-shrink: 0; }
.chat-message--user { margin-inline-start: auto; border-radius: 16px 16px 4px 16px; background: #ff12121f; color: var(--text); }
.chat-message a { color: var(--accent); text-decoration: underline; }
.chat-form { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); flex-shrink: 0; }
.chat-form input { flex: 1; min-width: 0; background: var(--surface); color: var(--text); border: 1px solid var(--muted); border-radius: 22px; padding: 12px 14px; font: inherit; }
.chat-form input::placeholder { color: var(--muted); }
.chat-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chat-send { border-radius: 50%; background: #ff12121f; color: var(--accent); }
.chat-send:disabled { opacity: .35; cursor: default; }
.chat-footer { flex-shrink: 0; display: flex; justify-content: center; gap: 14px; padding: 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.chat-status { padding: 0 16px 8px; font-size: 12px !important; flex-shrink: 0; }
.chat-voice { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 22px 16px; }
.chat-voice-button { width: 76px; height: 76px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid var(--accent); border-radius: 50%; background: #ff12121f; color: var(--accent); }
.chat-voice-button svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.chat-voice-button[aria-pressed="true"] { background: var(--accent); color: var(--background); }
.chat-voice-caption { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 450px) {
  .chat-launcher { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .chat-panel { right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 100px - env(safe-area-inset-bottom)); }
  .chat-header { display: grid; grid-template-columns: minmax(0, 1fr) 36px; }
  .chat-heading { grid-column: 1; grid-row: 1; min-width: 0; }
  .chat-close { grid-column: 2; grid-row: 1; }
  .chat-modes { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}
@media (max-height: 480px) { .chat-panel { bottom: calc(78px + env(safe-area-inset-bottom)); max-height: calc(100dvh - 90px - env(safe-area-inset-bottom)); } .chat-header { padding: 8px 12px; } .chat-voice { gap: 10px; } }
.chat-panel { --line: #383838; --surface: #1b1b1b; }
#rotor-chat { font-family: "Rotorlash Condensed", Arial, sans-serif; }
#rotor-chat [hidden] { display: none !important; }
#rotor-chat button { font-family: inherit; }
#rotor-chat button:focus-visible, #rotor-chat .chat-log:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
#rotor-chat .chat-modes button { width: auto; height: auto; min-width: 60px; min-height: 38px; }
#rotor-chat .chat-icon { width: 42px; height: 42px; }
#rotor-chat .chat-footer { width: auto; margin: 0; justify-content: center; }
#rotor-chat .chat-footer .wiserelay-credit { font-size: 12px; }
#rotor-chat .chat-topics { display: flex; flex-wrap: wrap; gap: 8px; }
#rotor-chat .chat-topics button { width: auto; height: auto; min-height: 40px; padding: 8px 12px; border: 1px solid #454545; border-radius: 8px; font-size: 13px; }
#rotor-chat .chat-message { max-width: 95%; font-family: "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.6; color: #dedede; }
#rotor-chat .chat-message--user { max-width: 88%; color: var(--text); }
#rotor-chat .chat-message code { font: 0.9em Consolas, monospace; }
#rotor-chat .chat-heading strong { font-size: 17px; }
#rotor-chat .chat-form input { font-family: "Segoe UI", Arial, sans-serif; font-size: 14px; }
#rotor-chat .chat-status, #rotor-chat .chat-voice-caption { font-family: "Segoe UI", Arial, sans-serif; }
#rotor-chat .chat-launcher, #rotor-chat .chat-panel { transition: none; }
body:has(.consent-banner:not([hidden])) #rotor-chat .chat-launcher { bottom: calc(24px + var(--chat-consent-offset, 0px)); }
body:has(.consent-banner:not([hidden])) #rotor-chat .chat-panel { bottom: calc(96px + var(--chat-consent-offset, 0px)); max-height: calc(100dvh - 120px - var(--chat-consent-offset, 0px)); }
