.hegic-chat {
  color-scheme: dark;
  box-sizing: border-box;
  max-width: 760px;
  min-width: 0;
  margin: 16px 0;
  padding: 20px;
  color: #ebfff5;
  background: #102019;
  border: 1px solid #527862;
  border-radius: 14px;
  font: 15px/1.6 system-ui, sans-serif;
  overflow-wrap: anywhere;
}
.hegic-chat *, .hegic-chat *::before, .hegic-chat *::after { box-sizing: border-box; }
.hegic-chat [hidden] { display: none !important; }
.hegic-chat h3 { margin: 0 0 12px; font-size: 21px; }
.hegic-chat p { margin: 12px 0; }
.hegic-chat label { display: block; margin: 12px 0; }
.hegic-chat label > span { display: block; margin-bottom: 6px; font-weight: 600; }
.hegic-chat input, .hegic-chat select {
  display: block; width: 100%; min-width: 0; padding: 10px 12px;
  border: 1px solid #719480; border-radius: 6px; color: inherit;
  background: #0b1811; font: inherit; font-size: 16px;
}
.hegic-chat button {
  min-height: 44px; max-width: 100%; white-space: normal;
  margin: 6px 8px 6px 0; padding: 10px 14px;
  color: #fff; background: #24543d; border: 1px solid #88b99b;
  border-radius: 7px; cursor: pointer; font: inherit; font-weight: 600;
}
.hegic-chat button:disabled { opacity: .5; cursor: not-allowed; }
.hegic-chat :is(button, input, select, summary):focus-visible {
  outline: 3px solid #f3cf72; outline-offset: 3px;
}
.hegic-chat__notice, .hegic-chat [data-hegic="status"], .hegic-chat [data-hegic="recovery"] {
  padding: 12px; border-left: 3px solid #f3cf72; background: #27291a;
}
.hegic-chat__tokens, .hegic-chat pre { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.hegic-chat pre {
  max-height: 320px; overflow: auto; min-width: 0; margin: 12px 0;
  padding: 12px; border: 1px solid #456652; border-radius: 6px;
  background: #0b1811; color: #d6f3e2; font-size: 13px; line-height: 1.6;
}
.hegic-chat [data-hegic="fees"] { max-height: none; }
.hegic-chat details { margin: 14px 0; }
.hegic-chat summary { cursor: pointer; padding: 6px 0; }
.hegic-chat output, .hegic-chat small { display: block; color: #c0dacb; }
.hegic-chat__actions { display: flex; flex-wrap: wrap; gap: 4px; }
@media (max-width: 550px) {
  .hegic-chat { padding: 14px; margin: 10px 0; }
  .hegic-chat button { width: 100%; margin-right: 0; }
  .hegic-chat__actions { display: block; }
}
