.chat-agent { position: fixed; right: 1rem; bottom: 1rem; z-index: 1000; width: min(25rem, calc(100vw - 2rem)); color: #efe6cf; font-family: Inter, system-ui, sans-serif; }
.chat-launcher { display: block; margin-left: auto; border: 1px solid #c9a454; border-radius: 999px; padding: .75rem 1rem; background: #101c2d; color: #f2d98d; box-shadow: 0 .8rem 2rem #02060c99; cursor: pointer; font: inherit; font-weight: 700; }
.chat-panel { overflow: hidden; border: 1px solid #b89143; border-radius: .75rem; background: #0d1725f5; box-shadow: 0 1.2rem 3.5rem #02060ccc; backdrop-filter: blur(12px); }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border-bottom: 1px solid #b8914355; background: #142238; }
.chat-head h2, .chat-kicker { margin: 0; }
.chat-head h2 { color: #f6e7bd; font: 700 1rem/1.2 Georgia, serif; }
.chat-kicker { color: #bca96f; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; }
.chat-close { border: 0; background: transparent; color: #e8d9b2; cursor: pointer; font-size: 1.5rem; }
.chat-budget { padding: .42rem 1rem; border-bottom: 1px solid #ffffff12; color: #aee2c6; font: 700 .75rem/1.3 ui-monospace, monospace; }
.chat-budget.capped { color: #ffb6a8; }
.chat-scope { padding: .55rem 1rem; border-bottom: 1px solid #ffffff12; font-size: .75rem; }
.chat-scope summary { color: #e4c876; cursor: pointer; font-weight: 700; }
.chat-scope p { margin: .45rem 0; color: #c8c2b3; line-height: 1.4; }
.chat-scope ul { display: flex; flex-wrap: wrap; gap: .3rem; margin: .45rem 0 0; padding: 0; list-style: none; }
.chat-scope li { border: 1px solid #ffffff1f; border-radius: 999px; padding: .2rem .42rem; color: #bfcde1; }
.chat-elsewhere { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; padding: .5rem 1rem; border-bottom: 1px solid #ffffff12; color: #9aa6ba; font-size: .72rem; }
.chat-pages { display: flex; flex-wrap: wrap; gap: .4rem; }
.chat-page-link { border: 1px solid #4d7a9f; border-radius: 999px; padding: .18rem .5rem; color: #a9d3f2; font-size: .7rem; text-decoration: none; }
.chat-page-link:hover { border-color: #7fb7e6; color: #d3ecff; }
.chat-transcript { max-height: min(24rem, 48vh); min-height: 8rem; overflow: auto; padding: .7rem; scrollbar-color: #8d743e #101a2a; }
.chat-welcome { margin: .3rem; color: #aeb7c5; font-size: .8rem; line-height: 1.45; }
.chat-row { margin: .45rem 0; border: 1px solid #ffffff16; border-radius: .45rem; padding: .5rem .6rem; background: #17243a; }
.chat-row.tool-call { border-left: 3px solid #d5ad52; }
.chat-row.tool-result { border-left: 3px solid #65b890; background: #122b2a; }
.chat-row.user-message { margin-left: 1.4rem; background: #243654; }
.chat-row.assistant-message { margin-right: 1.4rem; }
.chat-row.chat-error { border-left: 3px solid #d46c60; background: #351b24; }
.chat-row-head { display: flex; justify-content: space-between; gap: .5rem; margin: 0 0 .3rem; color: #efd488; font-size: .69rem; font-weight: 700; }
.chat-cost { color: #aee2c6; font-family: ui-monospace, monospace; }
.chat-row-body { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; color: #e0e4eb; font: .72rem/1.4 ui-monospace, monospace; }
.chat-result-summary { margin: 0; color: #e0e4eb; font-size: .78rem; line-height: 1.4; }
.chat-result-details { margin-top: .35rem; color: #9fcfb9; font-size: .7rem; }
.chat-result-details summary { cursor: pointer; }
.chat-result-details pre { margin-top: .35rem; }
.chat-form { padding: .65rem; border-top: 1px solid #b8914355; background: #111e31; }
.chat-mode { display: block; margin-bottom: .45rem; color: #dcc98f; font-size: .76rem; }
.chat-message textarea { box-sizing: border-box; width: 100%; resize: vertical; border: 1px solid #65718a; border-radius: .4rem; padding: .55rem; background: #08111e; color: #f5f0e5; font: inherit; }
.chat-compose { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .45rem; }
.chat-status { min-width: 0; margin: 0; color: #b8c1cf; font-size: .69rem; line-height: 1.3; }
.chat-send { flex: 0 0 auto; }
@media (max-width: 520px) {
  .chat-agent { right: .5rem; bottom: .5rem; width: calc(100vw - 1rem); }
  .chat-panel { max-height: calc(100vh - 1rem); }
  .chat-transcript { max-height: 38vh; }
}
