:root {
  --digamelon-green: #17745b;
  --digamelon-green-dark: #105443;
  --digamelon-ink: #17221f;
  --digamelon-muted: #66736f;
  --digamelon-line: #dde5e2;
  --digamelon-soft: #f1f6f4;
}

.digamelon-mount, .digamelon-mount * { box-sizing: border-box; }
.digamelon-chat { background: #fff; border: 1px solid var(--digamelon-line); border-radius: 18px; color: var(--digamelon-ink); display: flex; flex-direction: column; font-family: inherit; line-height: 1.45; overflow: hidden; }
.digamelon-embedded .digamelon-chat { min-height: 460px; width: 100%; }
.digamelon-header { align-items: center; background: #fff; border-bottom: 1px solid var(--digamelon-line); display: flex; gap: 10px; min-height: 66px; padding: 12px 14px; }
.digamelon-mark { align-items: center; background: var(--digamelon-green); border-radius: 12px; color: #fff; display: inline-flex; flex: 0 0 40px; font-size: 20px; font-weight: 750; height: 40px; justify-content: center; }
.digamelon-heading { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.digamelon-heading strong { font-size: 15px; font-weight: 700; }
.digamelon-heading small { color: var(--digamelon-muted); font-size: 12px; }
.digamelon-close { align-items: center; appearance: none; background: transparent; border: 0; border-radius: 50%; color: var(--digamelon-muted); cursor: pointer; display: inline-flex; font: 28px/1 Arial, sans-serif; height: 38px; justify-content: center; padding: 0; width: 38px; }
.digamelon-close:hover, .digamelon-close:focus-visible { background: var(--digamelon-soft); color: var(--digamelon-ink); outline: 2px solid transparent; }
.digamelon-messages { flex: 1 1 auto; min-height: 260px; overflow-y: auto; overscroll-behavior: contain; padding: 18px 14px; scroll-behavior: smooth; }
.digamelon-message { display: flex; flex-direction: column; margin: 0 0 12px; max-width: 88%; white-space: pre-wrap; }
.digamelon-message:last-child { margin-bottom: 0; }
.digamelon-assistant { align-items: flex-start; }
.digamelon-user { align-items: flex-end; margin-left: auto; }
.digamelon-bubble { background: var(--digamelon-soft); border-radius: 5px 16px 16px; font-size: 14px; overflow-wrap: anywhere; padding: 10px 12px; }
.digamelon-user .digamelon-bubble { background: var(--digamelon-green); border-radius: 16px 5px 16px 16px; color: #fff; }
.digamelon-links { display: flex; flex-direction: column; gap: 6px; margin-top: 7px; }
.digamelon-links a { color: var(--digamelon-green-dark); font-size: 13px; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.digamelon-form { align-items: flex-end; background: #fff; border-top: 1px solid var(--digamelon-line); display: flex; gap: 8px; padding: 10px; }
.digamelon-input { appearance: none; background: #fff; border: 1px solid #cbd7d3; border-radius: 12px; color: var(--digamelon-ink); flex: 1; font: inherit; font-size: 16px; line-height: 1.35; max-height: 100px; min-height: 44px; padding: 10px 12px; resize: vertical; }
.digamelon-input:focus { border-color: var(--digamelon-green); box-shadow: 0 0 0 3px rgba(23,116,91,.14); outline: none; }
.digamelon-send { appearance: none; background: var(--digamelon-green); border: 0; border-radius: 12px; color: #fff; cursor: pointer; flex: 0 0 auto; font: inherit; font-size: 13px; font-weight: 700; min-height: 44px; padding: 0 15px; }
.digamelon-send:hover { background: var(--digamelon-green-dark); }
.digamelon-send:focus-visible, .digamelon-toggle:focus-visible { outline: 3px solid rgba(23,116,91,.32); outline-offset: 2px; }
.digamelon-send:disabled, .digamelon-input:disabled { cursor: wait; opacity: .65; }
.digamelon-floating { bottom: max(18px, env(safe-area-inset-bottom)); position: fixed; right: max(18px, env(safe-area-inset-right)); z-index: 99990; }
.digamelon-floating .digamelon-chat { bottom: 70px; box-shadow: 0 20px 55px rgba(19,44,36,.2); height: min(560px, calc(100vh - 110px)); position: absolute; right: 0; width: min(380px, calc(100vw - 28px)); }
.digamelon-floating .digamelon-chat[hidden] { display: none; }
.digamelon-toggle { align-items: center; appearance: none; background: var(--digamelon-green); border: 0; border-radius: 50%; box-shadow: 0 8px 25px rgba(19,72,57,.28); color: #fff; cursor: pointer; display: flex; height: 58px; justify-content: center; margin-left: auto; padding: 0; width: 58px; }
.digamelon-toggle:hover { background: var(--digamelon-green-dark); transform: translateY(-1px); }
.digamelon-toggle svg { fill: currentColor; height: 27px; width: 27px; }
.digamelon-typing { align-items: center; display: flex; gap: 4px; height: 36px; }
.digamelon-typing i { animation: digamelon-pulse 1.1s infinite ease-in-out; background: #84918d; border-radius: 50%; display: block; height: 6px; width: 6px; }
.digamelon-typing i:nth-child(2) { animation-delay: .14s; }
.digamelon-typing i:nth-child(3) { animation-delay: .28s; }
.digamelon-sr-only { clip: rect(0,0,0,0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

@keyframes digamelon-pulse { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

@media (max-width: 480px) {
  .digamelon-floating { bottom: max(12px, env(safe-area-inset-bottom)); right: max(12px, env(safe-area-inset-right)); }
  .digamelon-floating .digamelon-chat { bottom: 66px; height: min(620px, calc(100dvh - 92px)); max-height: calc(100vh - 92px); right: -2px; width: calc(100vw - 20px); }
  .digamelon-toggle { height: 54px; width: 54px; }
  .digamelon-embedded .digamelon-chat { min-height: 520px; }
  .digamelon-message { max-width: 92%; }
}

@media (prefers-reduced-motion: reduce) {
  .digamelon-messages { scroll-behavior: auto; }
  .digamelon-typing i { animation: none; opacity: .65; }
  .digamelon-toggle { transition: none; }
}

