.app-shell:has(.portal-ai-chat) { height: 100dvh; min-height: 0; }
.portal:has(.portal-ai-chat) { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.portal:has(.portal-ai-chat) > .portal-header { flex: 0 0 auto; }
.portal:has(.portal-ai-chat) > .content { display: flex; flex: 1; flex-direction: column; min-height: 0; padding-bottom: 12px; }
.portal:has(.portal-ai-chat) > .content > :not(.portal-ai-chat) { flex-shrink: 0; }
.portal-ai-chat {
  --ai-ink: var(--text, #213247);
  --ai-muted: var(--muted, #66788d);
  --ai-blue: var(--blue, #285b8e);
  --ai-line: var(--line, #dfe6ee);
  color: var(--ai-ink);
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  font-size: 13px;
}
.portal-ai-chat *, .portal-ai-chat *::before, .portal-ai-chat *::after { box-sizing: border-box; }
.portal-ai-chat button, .portal-ai-chat textarea { font: inherit; }
.portal-ai-chat button { cursor: pointer; }
.portal-ai-chat button:disabled { cursor: default; opacity: .5; }
.portal-ai-chat button:focus-visible, .portal-ai-chat a:focus-visible { outline: 3px solid #90bce8; outline-offset: 3px; }
.portal-ai-chat svg { flex: 0 0 auto; }
.portal-ai-chat [hidden] { display: none !important; }
.ai-page-header { display: flex; position: relative; flex-shrink: 0; align-items: center; gap: 14px; min-width: 0; margin: 0 0 12px; padding: 3px 2px; overflow-x: auto; scrollbar-width: thin; }
.ai-page-header > * { flex-shrink: 0; }
.ai-page-heading { min-width: 0; }
.ai-page-header > .ai-provider-controls { margin: 0; }
.ai-page-header > .ai-connection { margin-left: auto; }
.ai-page-header h2 { display: flex; align-items: center; gap: 7px; margin: 0; font-size: 22px; letter-spacing: -.8px; }
.ai-page-header h2 svg { width: 24px; height: 24px; color: var(--ai-blue); }
.ai-page-header p { margin: 0; color: var(--ai-muted); font-size: 13px; }
.ai-page-header .ai-eyebrow, .ai-eyebrow { color: var(--ai-blue); font-size: 11px; font-weight: 650; letter-spacing: .6px; margin: 0; }
.ai-connection { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; color: var(--ai-muted); background: white; border: 1px solid var(--ai-line); border-radius: 20px; padding: 8px 11px; font-size: 11px; }
.ai-connection > span { width: 6px; height: 6px; border-radius: 50%; background: #b3bdc9; }
.ai-connection.is-ready > span { background: #238662; }
.ai-workspace { display: grid; flex: 1; grid-template-columns: 218px minmax(0, 1fr); position: relative; min-height: 0; border: 1px solid var(--ai-line); border-radius: 10px; background: #fff; overflow: hidden; box-shadow: 0 3px 12px #20314d05; }
.ai-sidebar { display: flex; flex-direction: column; min-height: 0; padding: 21px 12px 15px; border-right: 1px solid var(--ai-line); background: #f8fafc; }
.ai-sidebar-top { display: flex; align-items: center; justify-content: space-between; margin: 0 9px 15px; font-size: 12px; font-weight: 650; }
.ai-new-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; border: 1px solid #cbdae9; border-radius: 6px; background: #fff; color: var(--ai-blue); font-weight: 650 !important; width: 100%; }
.ai-new-button:hover:enabled { background: #eef5fc; }
.ai-history-list { margin-top: 20px; flex: 1; min-height: 0; overflow: auto; }
.ai-history-row { display: flex; flex-wrap: wrap; align-items: center; border: 1px solid transparent; border-radius: 6px; margin-bottom: 5px; }
.ai-history-row:hover { background: #edf2f7; }
.ai-history-row.is-active { background: #eaf2fb; border-color: #d9e5f2; }
.ai-history-open { flex: 1; text-align: left; background: none; border: 0; color: var(--ai-ink); padding: 11px 9px; min-width: 0; }
.ai-history-open > span { display: block; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: 100%; font-size: 12px; font-weight: 550; }
.ai-history-open small { display: block; margin-top: 5px; color: var(--ai-muted); font-size: 10px; }
.ai-history-delete { flex: 0 0 29px; margin-right: 3px; }
.ai-history-delete svg { width: 14px; height: 14px; }
.ai-history-empty { color: var(--ai-muted); text-align: center; font-size: 12px; line-height: 1.8; margin: 24px 3px; }
.ai-sidebar-note { display: flex; align-items: center; gap: 8px; padding: 14px 8px 0; border-top: 1px solid var(--ai-line); color: var(--ai-muted); font-size: 11px; }
.ai-sidebar-note svg { width: 15px; height: 15px; }
.ai-delete-confirm { flex: 0 0 100%; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding: 6px 8px 10px; }
.ai-delete-confirm span { flex: 0 0 100%; font-size: 11px; margin-bottom: 3px; }
.ai-delete-confirm button { padding: 4px 9px; font-size: 11px; border: 1px solid var(--ai-line); border-radius: 4px; color: var(--ai-muted); background: white; }
.ai-delete-confirm .ai-danger { color: #b33636; border-color: #e6bcbc; }
.ai-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.ai-chat-header { min-height: 67px; display: flex; flex-shrink: 0; align-items: center; gap: 9px; padding: 14px 28px; border-bottom: 1px solid #eef2f6; }
.ai-chat-header > div { display: flex; flex-direction: column; min-width: 0; gap: 4px; }
.ai-chat-header strong { font-weight: 650; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-chat-header > div > span { color: var(--ai-muted); font-size: 11px; }
.ai-icon-button { display: inline-flex; align-items: center; justify-content: center; padding: 5px; width: 30px; height: 30px; background: transparent; color: var(--ai-muted); border: 0; border-radius: 5px; }
.ai-icon-button:hover:enabled { background: #eaf0f6; color: var(--ai-blue); }
.ai-open-history, .ai-mobile-new, .ai-close-history, .ai-history-backdrop { display: none; }
.ai-transcript { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scroll-behavior: smooth; scrollbar-width: thin; }
.ai-welcome { max-width: 680px; margin: 0 auto; padding: clamp(25px, 5vh, 52px) 34px 28px; text-align: center; }
.ai-welcome-mark { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid #d5e4f3; border-radius: 14px; color: var(--ai-blue); background: #f0f6fc; margin-bottom: 17px; }
.ai-welcome-mark svg { width: 25px; height: 25px; }
.ai-welcome .ai-eyebrow { font-size: 11px; margin-bottom: 9px; }
.ai-welcome h3 { font-size: clamp(21px, 2vw, 27px); font-weight: 650; letter-spacing: -.7px; margin: 0 0 13px; }
.ai-welcome-description { font-size: 13px; color: var(--ai-muted); line-height: 1.8; margin: 0; }
.ai-prompt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 27px auto 0; text-align: left; }
.ai-prompt-card { display: grid; grid-template-columns: 25px 1fr 16px; align-items: center; column-gap: 9px; row-gap: 5px; padding: 15px 14px; background: #fff; color: var(--ai-ink); border: 1px solid var(--ai-line); border-radius: 7px; text-align: left; }
.ai-prompt-card:hover:enabled { border-color: #a5c0dc; background: #fafcff; }
.ai-prompt-card strong { font-size: 12px; font-weight: 650; }
.ai-prompt-icon { grid-row: 1 / 3; color: var(--ai-blue); }
.ai-prompt-card > span:nth-of-type(2) { grid-column: 2 / 4; color: var(--ai-muted); font-size: 11px; line-height: 1.6; }
.ai-prompt-card > svg { grid-column: 3; grid-row: 1; width: 13px; height: 13px; color: #8fa0b1; }
.ai-message-list { max-width: 900px; margin: 0 auto; padding: 28px clamp(18px, 3vw, 44px); }
.ai-message { margin-bottom: 28px; }
.ai-message:last-child { margin-bottom: 5px; }
.ai-message-author { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; font-size: 12px; }
.ai-message-author > strong { font-weight: 650; }
.ai-avatar, .ai-user-avatar { display: inline-flex; align-items: center; justify-content: center; width: 27px; height: 27px; border-radius: 8px; flex-shrink: 0; background: #eaf2fb; color: var(--ai-blue); }
.ai-user-avatar { background: #f0f2f5; color: #66788d; font-size: 11px; }
.ai-avatar svg { width: 17px; height: 17px; }
.ai-message-skill { margin-left: 2px; font-size: 10px; color: var(--ai-muted); border: 1px solid var(--ai-line); padding: 2px 6px; border-radius: 4px; }
.ai-message-provider { color: var(--ai-muted); font-size: 10px; }
.ai-message-failed { color: #a83b3b; font-size: 10px; }
.ai-message-content { padding-left: 36px; min-width: 0; }
.ai-message-text { font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; white-space: pre-wrap; }
.ai-message.is-user .ai-message-text { display: inline-block; max-width: 100%; background: #f2f5f9; border-radius: 0 8px 8px 8px; padding: 11px 15px; }
.ai-message-heading { display: inline-block; font-size: 15px; margin-top: 7px; }
.ai-message-text pre { max-width: 100%; overflow: auto; background: #f4f6f9; border: 1px solid var(--ai-line); border-radius: 6px; padding: 12px 15px; font-size: 12px; line-height: 1.7; white-space: pre; }
.ai-table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--ai-line); border-radius: 6px; margin: 10px 0; white-space: normal; }
.ai-table-scroll:focus-visible { outline: 2px solid #90bce8; outline-offset: 2px; }
.ai-table-scroll table { width: 100%; border-collapse: collapse; table-layout: auto; font-size: inherit; line-height: 1.65; }
.ai-table-scroll th, .ai-table-scroll td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--ai-line); min-width: 100px; overflow-wrap: anywhere; }
.ai-table-scroll th { background: #f3f7fb; color: var(--ai-ink); font-weight: 650; }
.ai-table-scroll tbody tr:last-child td { border-bottom: 0; }
.ai-copy-button { display: flex; align-items: center; gap: 5px; padding: 7px 0 0; margin-top: 3px; color: var(--ai-muted); font-size: 10px !important; border: 0; background: transparent; }
.ai-copy-button svg { width: 13px; height: 13px; }
.ai-copy-button:hover { color: var(--ai-blue); }
.ai-sources { margin-top: 16px; }
.ai-sources-label { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ai-muted); margin-bottom: 8px; }
.ai-sources-label svg { width: 13px; height: 13px; }
.ai-source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.ai-source { display: flex; align-items: flex-start; gap: 8px; padding: 10px; min-width: 0; text-decoration: none; border: 1px solid var(--ai-line); border-radius: 6px; color: var(--ai-ink); }
.ai-source:hover { background: #f7faff; border-color: #b5cce2; }
.ai-source-number { font-size: 10px; flex-shrink: 0; color: var(--ai-blue); width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 4px; background: #eaf2fb; }
.ai-source > span:nth-child(2) { min-width: 0; flex: 1; }
.ai-source strong { font-size: 11px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; font-weight: 550; }
.ai-source small { display: block; font-size: 10px; color: var(--ai-muted); margin-top: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-source > svg { width: 12px; height: 12px; color: var(--ai-muted); }
.ai-message-files { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 9px; }
.ai-message-attachment { display: flex; align-items: center; gap: 9px; padding: 8px 10px; color: var(--ai-ink); background: #fff; border: 1px solid var(--ai-line); border-radius: 6px; text-decoration: none; min-width: 0; max-width: 260px; }
.ai-message-attachment > span { min-width: 0; overflow-wrap: anywhere; font-size: 11px; }
.ai-message-attachment img { width: 48px; height: 48px; object-fit: cover; border-radius: 4px; }
.ai-message-attachment small { display: block; color: var(--ai-muted); margin-top: 4px; }
.ai-message-attachment > svg:last-child { width: 13px; height: 13px; }
.ai-thinking, .ai-detail-loading { display: flex; align-items: center; gap: 9px; font-size: 12px; color: var(--ai-muted); line-height: 1.6; }
.ai-detail-loading { justify-content: center; height: 100%; min-height: 120px; }
.ai-thinking > span:last-child { min-width: 0; }
.ai-spinner { display: inline-block; flex-shrink: 0; width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ai-spin .8s linear infinite; opacity: .7; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
.ai-compose-wrap { flex-shrink: 0; min-height: 0; max-height: min(60%, calc(100% - 100px)); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 12px clamp(18px, 3vw, 40px) 17px; width: 100%; max-width: 940px; align-self: center; background: #fff; }
.ai-provider-controls { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.ai-provider-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ai-provider-main > label { flex-shrink: 0; font-size: 11px; font-weight: 650; color: var(--ai-muted); }
.ai-provider-controls select { min-width: 0; max-width: 100%; border: 1px solid #d1deeb; border-radius: 5px; padding: 6px 25px 6px 9px; background: white; color: var(--ai-ink); font: inherit; font-size: 11px; }
.ai-provider-controls select:disabled { color: var(--ai-muted); background: #f6f8fb; opacity: 1; }
.ai-provider-controls select:focus { outline: 2px solid #acc9e6; outline-offset: 1px; }
.ai-provider-main > select { width: 185px; }
.ai-provider-main > .ai-icon-button { width: 28px; height: 28px; font-size: 20px; }
.ai-provider-help { display: inline-flex; position: relative; align-items: center; justify-content: center; flex-shrink: 0; width: 24px; height: 28px; color: var(--ai-muted); cursor: help; }
.ai-provider-help:focus-visible { outline: 2px solid #90bce8; outline-offset: 1px; border-radius: 4px; }
.ai-local-selection { display: flex; align-items: center; gap: 7px; }
.ai-local-selection label { color: var(--ai-muted); font-size: 10px; }
.ai-local-selection select { width: 185px; }
.ai-model-name { max-width: 185px; color: var(--ai-muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-local-admin { flex-shrink: 0; min-height: 0; max-height: 30%; overflow-y: auto; overscroll-behavior: contain; margin: 0 0 12px; background: #fff; border: 1px solid var(--ai-line); border-radius: 7px; }
.ai-admin-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; white-space: nowrap; background: #fff; border: 1px solid var(--ai-line); border-radius: 5px; padding: 6px 9px; color: var(--ai-muted); font-size: 11px !important; text-align: left; }
.ai-admin-toggle svg { width: 14px; height: 14px; }
.ai-admin-toggle > span { font-size: 14px; line-height: 1; }
.ai-admin-body { padding: 15px; }
.ai-admin-body > p { color: var(--ai-muted); font-size: 12px; line-height: 1.7; margin: 0 0 12px; }
.ai-station-form { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.ai-station-form > label { display: flex; flex: 1 1 180px; flex-direction: column; gap: 6px; color: var(--ai-muted); font-size: 11px; }
.ai-station-form input { width: 100%; min-width: 0; border: 1px solid #d1deeb; border-radius: 5px; padding: 9px 10px; color: var(--ai-ink); font: inherit; font-size: 12px; }
.ai-station-form input:focus { outline: 2px solid #acc9e6; outline-offset: 1px; }
.ai-station-form .ai-send-button { margin-bottom: 1px; }
.ai-admin-body .ai-admin-security { margin: 10px 0; color: #82602a; font-size: 11px; }
.ai-stations { display: grid; gap: 7px; margin-top: 13px; }
.ai-station-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--ai-line); background: #f8fafc; border-radius: 6px; }
.ai-station-row > div:first-child { flex: 1; min-width: 0; }
.ai-station-row strong { font-size: 12px; overflow-wrap: anywhere; }
.ai-station-row small { display: block; color: var(--ai-muted); font-size: 10px; margin-top: 5px; overflow-wrap: anywhere; }
.ai-station-status { display: inline-block; font-size: 10px; margin-left: 8px; color: #7c8896; }
.ai-station-status.is-online { color: #167553; }
.ai-admin-revoke, .ai-revoke-confirm button { flex-shrink: 0; background: #fff; color: #a83b3b; border: 1px solid #e2c7c7; border-radius: 4px; font-size: 10px !important; padding: 6px 8px; }
.ai-revoke-confirm { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; max-width: 250px; }
.ai-revoke-confirm span { flex: 0 0 100%; color: #a83b3b; font-size: 11px; line-height: 1.6; }
.ai-skills { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 11px; }
.ai-skill { display: inline-flex; align-items: center; gap: 6px; min-height: 31px; padding: 5px 9px; border: 1px solid #e2e8ef; border-radius: 5px; background: white; font-size: 11px !important; color: #5b6d80; }
.ai-skill svg { width: 14px; height: 14px; }
.ai-skill.is-active { background: #eaf2fb; color: var(--ai-blue); border-color: #c9dced; font-weight: 650; }
.ai-skill:hover:enabled { background: #f0f5fb; }
.ai-skill-unavailable { font-size: 9px; color: #7f8b99; }
.ai-search-field { margin: 0 0 10px; padding: 10px 12px; border: 1px solid #d9e5f2; border-radius: 6px; background: #f6faff; }
.ai-search-field label { display: flex; align-items: center; gap: 5px; margin: 0 0 6px; font-size: 11px; color: var(--ai-blue); font-weight: 650; }
.ai-search-field label svg { width: 13px; height: 13px; }
.ai-search-field input { font: inherit; display: block; width: 100%; min-width: 0; padding: 8px 9px; font-size: 12px; border: 1px solid #cfdeec; border-radius: 4px; color: var(--ai-ink); background: white; }
.ai-search-field input:focus { outline: 2px solid #acc9e6; outline-offset: 1px; }
.ai-search-field small { display: block; margin-top: 6px; color: var(--ai-muted); font-size: 10px; line-height: 1.6; }
.ai-composer { border: 1px solid #cbd8e6; border-radius: 9px; background: #fff; padding: 12px 14px 11px; box-shadow: 0 3px 10px #1d416408; }
.ai-composer:focus-within { border-color: #7d9ebe; box-shadow: 0 0 0 2px #e4eef8; }
.ai-input { width: 100%; min-height: 56px; max-height: 168px; display: block; resize: none; border: 0; outline: 0; padding: 2px; box-shadow: none !important; color: var(--ai-ink); background: transparent; font-size: 13px; line-height: 1.7; border-radius: 0; }
.ai-input:focus { outline: 0; }
.ai-input::placeholder { color: #8a97a7; }
.ai-input:disabled { opacity: .65; background: transparent; }
.ai-composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; }
.ai-composer-tools { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ai-attach-button { display: flex; align-items: center; gap: 5px; color: var(--ai-muted); background: transparent; border: 0; padding: 6px 0; font-size: 11px !important; white-space: nowrap; }
.ai-attach-button:hover:enabled { color: var(--ai-blue); }
.ai-attach-button svg { width: 17px; height: 17px; }
.ai-file-help { font-size: 10px; color: #8391a2; }
.ai-send-button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; padding: 8px 11px; min-height: 34px; white-space: nowrap; color: #fff; background: var(--ai-blue); border: 0; border-radius: 6px; font-size: 11px !important; font-weight: 650 !important; }
.ai-send-button:hover:enabled { background: #204c78; }
.ai-send-button svg { width: 17px; height: 17px; }
.ai-send-button:disabled { opacity: 1 !important; color: #8697aa; background: #e9eef4; }
.ai-composer-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; color: #7a899a; font-size: 10px; margin: 8px 2px 0; line-height: 1.5; }
.ai-data-note { margin: 10px 0 0; text-align: center; color: #7a899a; font-size: 10px; line-height: 1.6; }
.ai-attachment-list { display: flex; flex-wrap: wrap; gap: 7px; }
.ai-attachment-list:empty { display: none; }
.ai-attachment { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; flex: 1 1 245px; border: 1px solid var(--ai-line); background: #f8fafc; border-radius: 6px; padding: 7px 5px 7px 8px; margin-bottom: 10px; }
.ai-attachment > img, .ai-file-icon { width: 37px; height: 37px; flex-shrink: 0; border-radius: 4px; object-fit: cover; }
.ai-file-icon { display: flex; justify-content: center; align-items: center; background: #eaf1f8; color: var(--ai-blue); }
.ai-attachment-info { flex: 1; min-width: 0; }
.ai-attachment-info strong { display: block; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11px; font-weight: 550; }
.ai-attachment-info small { display: block; font-size: 10px; color: var(--ai-muted); line-height: 1.5; margin-top: 3px; overflow-wrap: anywhere; }
.ai-attachment-info progress { display: block; width: 100%; max-width: 160px; height: 3px; margin-top: 5px; accent-color: var(--ai-blue); }
.ai-attachment.is-error { border-color: #e6bcbc; background: #fff8f8; }
.ai-attachment.is-error small { color: #af4242; }
.ai-attachment .ai-icon-button { flex-shrink: 0; width: 25px; height: 25px; }
.ai-attachment .ai-icon-button svg { width: 14px; height: 14px; }
.ai-notice { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; border: 1px solid #e3d3ad; background: #fffbf1; color: #82602a; border-radius: 6px; padding: 10px 12px; font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.ai-notice.is-error { background: #fff6f6; border-color: #e7c7c7; color: #a83b3b; }
.ai-notice > span { flex: 1; min-width: 0; }
.ai-notice > button { flex-shrink: 0; border: 0; background: none; color: inherit; font-size: 11px; }
.ai-drop-overlay { display: none; position: absolute; z-index: 5; inset: 10px; border: 2px dashed #7e9fbe; border-radius: 8px; background: #f0f6fcf5; color: var(--ai-blue); align-items: center; justify-content: center; flex-direction: column; gap: 12px; pointer-events: none; }
.ai-drop-overlay svg { width: 32px; height: 32px; }
.ai-drop-overlay strong { font-size: 19px; }
.ai-drop-overlay > span { font-size: 12px; }
.portal-ai-chat.is-dragging .ai-drop-overlay { display: flex; }
.ai-sr { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
@media (max-width: 1100px) {
  .ai-workspace { grid-template-columns: 185px minmax(0, 1fr); }
  .ai-sidebar { padding-inline: 8px; }
  .ai-welcome { padding-inline: 24px; }
  .ai-compose-wrap { padding-inline: 20px; }
  .ai-file-help { display: none; }
}
@media (max-width: 760px) {
  .ai-page-header { margin-bottom: 10px; gap: 10px; }
  .ai-page-header h2 { font-size: 20px; }
  .ai-connection { font-size: 10px; padding: 6px 8px; }
  .ai-workspace { display: block; border-radius: 8px; }
  .ai-main { height: 100%; }
  .ai-sidebar { display: none; position: absolute; z-index: 12; inset: 0 auto 0 0; width: min(280px, 85%); padding: 16px 12px; box-shadow: 6px 0 20px #21324715; }
  .ai-workspace.is-history-open .ai-sidebar { display: flex; }
  .ai-workspace.is-history-open .ai-history-backdrop { display: block; position: absolute; z-index: 11; inset: 0; width: 100%; height: 100%; border: 0; background: #15283c44; }
  .ai-open-history, .ai-mobile-new, .ai-close-history { display: inline-flex; }
  .ai-mobile-new { margin-left: auto; flex-shrink: 0; }
  .ai-chat-header { min-height: 60px; padding: 10px 11px; }
  .ai-chat-header > div { flex: 1; }
  .ai-chat-header strong { font-size: 12px; }
  .ai-chat-header > div > span { font-size: 10px; }
  .ai-welcome { padding: 16px 16px 12px; }
  .ai-welcome h3 { font-size: 20px; margin-bottom: 8px; }
  .ai-welcome-description, .ai-welcome-mark { display: none; }
  .ai-prompt-grid { gap: 8px; margin-top: 14px; }
  .ai-prompt-card { padding: 12px 10px; grid-template-columns: 18px 1fr 13px; column-gap: 7px; }
  .ai-prompt-icon svg { width: 16px; height: 16px; }
  .ai-prompt-icon { grid-row: 1; }
  .ai-prompt-card strong { font-size: 11px; }
  .ai-prompt-card > span:nth-of-type(2) { display: none; }
  .ai-message-list { padding: 20px 13px; }
  .ai-message-content { padding-left: 0; }
  .ai-message-text { font-size: 14px; }
  .ai-message.is-user .ai-message-text { padding: 10px 12px; }
  .ai-source-grid { grid-template-columns: 1fr; }
  .ai-compose-wrap { padding: 10px 12px 12px; }
  .ai-provider-controls select { font-size: 12px; }
  .ai-station-row { flex-wrap: wrap; }
  .ai-station-row > div:first-child { flex-basis: 200px; }
  .ai-station-form .ai-send-button { width: 100%; min-height: 39px; }
  .ai-station-form input { font-size: 16px; }
  .ai-skills { gap: 5px; margin-bottom: 9px; }
  .ai-skill { padding: 5px 7px; min-height: 29px; font-size: 10px !important; gap: 4px; }
  .ai-skill svg { width: 12px; height: 12px; }
  .ai-composer { padding: 10px 10px 9px; }
  .ai-input { font-size: 16px !important; line-height: 1.6; }
  .ai-input::placeholder { font-size: 12px; }
  .ai-composer-caption > span:last-child { display: none; }
  .ai-data-note { text-align: left; margin-top: 7px; font-size: 11px; }
  .ai-attachment { flex-basis: 100%; }
  .ai-history-open { padding: 12px 10px; }
  .ai-history-open > span { font-size: 13px; }
  .ai-history-delete { width: 36px; height: 36px; flex-basis: 36px; }
}
@media (max-width: 380px) {
  .ai-prompt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-prompt-card { row-gap: 3px; padding-block: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .ai-transcript { scroll-behavior: auto; }
  .ai-spinner { animation-duration: 1.7s; }
}
@media (max-height: 600px) {
  .ai-chat-header { min-height: 36px; padding-block: 5px; }
  .ai-chat-header > div > span { display: none; }
  .ai-compose-wrap { max-height: min(65%, calc(100% - 48px)); padding-block: 6px; }
}
@media (max-height: 480px) {
  .ai-local-admin { flex: 1; max-height: none; margin-bottom: 0; }
  .ai-local-admin + .ai-workspace { display: none; }
}
