.chsa-root {
  --chsa-ink: #123438;
  --chsa-gold: #e2b264;
  font:
    15px/1.55 system-ui,
    sans-serif;
  color: var(--chsa-ink);
  text-align: left;
}
.chsa-root * {
  box-sizing: border-box;
}
.chsa-root [hidden] {
  display: none !important;
}
.chsa-floating {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.chsa-root button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--chsa-ink);
  color: #fffaf0;
}
.chsa-root button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.chsa-root button:focus-visible,
.chsa-root textarea:focus-visible {
  outline: 3px solid var(--chsa-gold);
  outline-offset: 2px;
}
.chsa-launcher {
  order: 2;
  box-shadow: 0 5px 24px #102d3233;
  font-weight: 700 !important;
}
.chsa-panel {
  width: 390px;
  max-width: calc(100vw - 36px);
  max-height: 75vh;
  max-height: min(680px, calc(100dvh - 110px));
  display: flex;
  flex-direction: column;
  background: #fffdf8;
  border: 1px solid #d7dfd6;
  border-radius: 18px;
  box-shadow: 0 12px 45px #102d3233;
  overflow: hidden;
}
.chsa-heading {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: var(--chsa-ink);
  color: #fff5df;
}
.chsa-heading strong {
  font-size: 23px;
}
.chsa-root .chsa-heading p {
  font-size: 13px;
  margin: 3px 0 0;
  color: inherit;
}
.chsa-root .chsa-close {
  margin-left: auto;
  font-size: 28px;
  padding: 0 12px;
  flex-shrink: 0;
}
.chsa-messages {
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 100px;
  flex: 1;
}
.chsa-root p {
  margin: 0 0 12px;
}
.chsa-question {
  background: #eaf0e5;
  padding: 12px;
  border-radius: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-weight: 600;
}
.chsa-answer {
  padding: 4px 0 16px;
  overflow-wrap: anywhere;
}
.chsa-root a {
  color: #77521e;
  text-decoration: underline;
}
.chsa-root ul {
  padding-left: 20px;
  margin: 12px 0;
}
.chsa-form {
  padding: 12px 16px;
  border-top: 1px solid #d7dfd6;
  flex-shrink: 0;
}
.chsa-form label {
  display: block;
  font-size: 13px;
  font-weight: 700;
}
.chsa-form textarea {
  width: 100%;
  border: 1px solid #a8b9b7;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: #123438;
  resize: vertical;
  min-height: 60px;
  max-height: 140px;
  font: inherit;
  margin: 5px 0 8px;
}
.chsa-form button {
  width: 100%;
}
.chsa-root .chsa-notice {
  font-size: 11px;
  line-height: 1.4;
  padding: 0 16px 12px;
  margin: 0;
  color: #52676a;
  flex-shrink: 0;
}
.chsa-feedback {
  background: #f4eddd;
  border-radius: 10px;
  padding: 12px;
  font-size: 13px;
  margin-top: 16px;
}
.chsa-feedback button {
  margin: 4px 4px 0 0;
  font-size: 13px;
}
.chsa-inline .chsa-panel {
  width: 100%;
  max-width: 100%;
  box-shadow: none;
  max-height: 700px;
}
.chsa-inline {
  max-width: 700px;
}
@media (max-width: 480px) {
  .chsa-floating {
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
  }
  .chsa-panel {
    max-width: calc(100vw - 24px);
  }
  .chsa-heading {
    padding: 12px;
  }
  .chsa-messages {
    padding: 12px;
  }
  .chsa-root .chsa-notice {
    font-size: 10px;
  }
}
