.gfac-chat, .gfac-chat * { box-sizing: border-box; }
.gfac-chat { max-width: 720px; margin: 1.5rem auto; border: 1px solid #d8e3ef; border-radius: 16px; background: #f3f7fc; color: #243852; font: 1rem/1.55 system-ui, sans-serif; overflow: hidden; }
.gfac-chat header { padding: 1.1rem 1.35rem; background: #102847; color: #fff; }
.gfac-chat header p { margin: 0; color: #c9dbef; font-weight: 650; }
.gfac-chat header h2 { color: #fff; margin: .25rem 0 0; font: 700 clamp(1.25rem, 3vw, 1.8rem)/1.2 system-ui, sans-serif; }
.gfac-chat .gfac-log { min-height: 9rem; max-height: 26rem; overflow: auto; padding: 1rem 1.35rem; overflow-wrap: anywhere; }
.gfac-chat .gfac-log p { margin: 0 0 .7rem; }
.gfac-chat .gfac-question, .gfac-chat .gfac-answer { width: fit-content; max-width: 95%; border-radius: .65rem; padding: .55rem .8rem; white-space: pre-wrap; }
.gfac-chat .gfac-log .gfac-question { margin-left: auto; background: #174f82; color: #fff; }
.gfac-chat .gfac-answer { background: #fff; border: 1px solid #d8e3ef; }
.gfac-chat .gfac-status { color: #445972; }
.gfac-chat .gfac-log ul { margin: 0 0 .8rem; padding-left: 1.4rem; }
.gfac-chat a { color: #174f82; text-decoration: underline; }
.gfac-chat form { display: flex; align-items: end; gap: .5rem; flex-wrap: wrap; padding: .85rem 1.35rem; border-top: 1px solid #d8e3ef; margin: 0; }
.gfac-chat label { flex: 1 1 14rem; font-weight: 650; margin: 0; }
.gfac-chat input { display: block; width: 100%; min-height: 44px; border: 1px solid #8b9fb5; border-radius: .45rem; background: white; color: #102847; font: inherit; padding: .45rem .6rem; }
.gfac-chat button { min-height: 44px; padding: .45rem .7rem; border: 1px solid #174f82; border-radius: .45rem; background: #174f82; color: white; font: inherit; cursor: pointer; }
.gfac-chat .gfac-clear { background: transparent; color: #174f82; }
.gfac-chat button:disabled { opacity: .6; cursor: wait; }
.gfac-chat :focus-visible { outline: 3px solid #5788bd; outline-offset: 2px; }
.gfac-chat footer { padding: 0 1.35rem .85rem; color: #445972; font-size: .85rem; }

.gfac-launcher {
  position: fixed;
  z-index: 9999;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-end;
  gap: .6rem;
}
.gfac-launcher .gfac-toggle {
  min-height: 44px;
  border: 1px solid #174f82;
  border-radius: 999px;
  padding: .5rem 1rem;
  background: #102847;
  color: #fff;
  box-shadow: 0 3px 12px #10284733;
  font: 700 1rem/1.25 system-ui, sans-serif;
  cursor: pointer;
}
.gfac-launcher .gfac-toggle:focus-visible {
  outline: 3px solid #5788bd;
  outline-offset: 2px;
}
.gfac-launcher .gfac-chat {
  display: flex;
  flex-direction: column;
  width: min(24rem, calc(100vw - 2rem));
  max-height: calc(100vh - 5rem);
  max-height: calc(100dvh - 5rem);
  margin: 0;
  overflow: auto;
  box-shadow: 0 5px 22px #10284733;
}
.gfac-launcher .gfac-chat[hidden] { display: none; }
.gfac-launcher .gfac-log { min-height: 5rem; flex: 1 1 auto; }
.gfac-launcher .gfac-chat > :not(.gfac-log) { flex: 0 0 auto; }
