.ch-root { position: fixed; right: 16px; bottom: 96px; z-index: 50; font: inherit; }
.ch-open { border: 0; border-radius: 999px; padding: 12px 18px; background: #1f3d2f; color: #fff; font-weight: 700; font-size: 15px; box-shadow: 0 6px 18px rgba(0,0,0,.18); cursor: pointer; }
.ch-root.is-open .ch-open { display: none; }
.ch-panel { width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100vh - 140px)); display: flex; flex-direction: column; background: #fffdf8; color: #1d1d1b; border: 1px solid #d9d3c4; border-radius: 16px; box-shadow: 0 14px 40px rgba(0,0,0,.22); overflow: hidden; }
.ch-panel[hidden] { display: none; }
.ch-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; background: #1f3d2f; color: #fff; }
.ch-head strong { display: block; font-size: 16px; }
.ch-head span { font-size: 12px; opacity: .85; }
.ch-close { border: 1px solid rgba(255,255,255,.5); background: transparent; color: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.ch-disclosure { margin: 0; padding: 10px 12px; border-bottom: 1px solid #d9d3c4; background: #fff4d6; color: #3c321b; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.ch-disclosure[hidden] { display: none; }
.ch-list { list-style: none; margin: 0; padding: 12px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.ch-msg { max-width: 88%; padding: 10px 12px; border-radius: 12px; white-space: pre-wrap; line-height: 1.55; font-size: 15px; word-break: keep-all; overflow-wrap: anywhere; }
.ch-assistant { background: #efeadc; align-self: flex-start; }
.ch-user { background: #1f3d2f; color: #fff; align-self: flex-end; }
.ch-starters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.ch-starters[hidden] { display: none; }
.ch-starters button { border: 1px solid #c9c1ad; background: #fff; border-radius: 999px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.ch-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e3ddcf; }
.ch-form textarea { flex: 1; resize: none; border: 1px solid #c9c1ad; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 16px; }
.ch-form button { border: 0; border-radius: 10px; padding: 0 16px; background: #1f3d2f; color: #fff; font-weight: 700; cursor: pointer; }
.ch-note { margin: 0; padding: 0 12px 10px; font-size: 12px; color: #6b6556; }
.ch-reset { border: 0; background: none; color: inherit; text-decoration: underline; padding: 0; font-size: 12px; cursor: pointer; }
.ch-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 600px) {
  .ch-root { right: 12px; bottom: 84px; }
  .ch-root.is-open { inset: 0; right: 0; bottom: 0; }
  .ch-root.is-open .ch-panel { width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
}
.ch-link { display: inline-block; margin: 2px 2px; padding: 2px 8px; border-radius: 999px; background: #e8f1fb; color: #1f4f78; font-weight: 700; text-decoration: underline; word-break: keep-all; }
.ch-link:focus-visible { outline: 2px solid #326b98; outline-offset: 2px; }

.ch-form textarea { min-width: 0; }
.ch-form button:disabled, .ch-reset:disabled { opacity: .55; cursor: wait; }
.ch-list { min-height: 0; }
.ch-head, .ch-form, .ch-disclosure, .ch-note { flex-shrink: 0; }
