.chat-launch {
  position: fixed;
  z-index: 4;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 17px;
  border-radius: 28px;
  background: #284630;
  color: #fff;
  box-shadow: 0 4px 16px #19231b33;
  font-size: .9rem;
  font-weight: 700;
}
.chat-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 19px;
  width: 19px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 5px;
}
.chat-icon::after {
  position: absolute;
  bottom: -4px;
  left: 3px;
  width: 5px;
  height: 5px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  background: #284630;
  transform: skewY(-34deg);
  content: "";
}
.support-chat {
  position: fixed;
  inset: auto max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) auto;
  width: min(390px, calc(100% - 36px));
  height: min(540px, calc(100dvh - 36px));
  max-width: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border-radius: 17px;
  background: #f4f5f0;
  box-shadow: 0 16px 60px #19231b44;
}
.support-chat[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
.support-chat::backdrop { background: #14211726; }
.chat-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 13px 12px 19px;
  background: #284630;
  color: #fff;
}
.chat-header h2 { font-size: 1rem; }
.chat-header p { margin-top: 3px; color: #d9e7d6; font-size: .75rem; }
.support-chat button.chat-close {
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  font-size: 1.65rem;
}
.chat-history { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 18px 14px; }
.chat-messages { display: grid; gap: 14px; }
.chat-row { display: grid; justify-items: start; gap: 4px; }
.chat-own { justify-items: end; }
.chat-row small { color: #4e5d4f; font-size: .73rem; }
.chat-bubble {
  width: fit-content;
  max-width: 90%;
  padding: 9px 12px;
  border-radius: 4px 13px 13px;
  background: #fff;
  line-height: 1.5;
  font-size: .9rem;
  white-space: pre-wrap;
}
.chat-own .chat-bubble { border-radius: 13px 4px 13px 13px; background: #dcebd9; }
.support-chat button.chat-older {
  margin: 0 0 14px;
  border: 0;
  color: #284630;
  font-size: .8rem;
  text-decoration: underline;
}
.chat-composer { padding: 12px; background: #fff; border-top: 1px solid #d4dcd1; }
.chat-status:not(:empty) { margin-bottom: 8px; font-size: .8rem; color: #68502c; }
.support-chat .chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: 0;
}
.chat-form textarea {
  min-height: 44px;
  max-height: 96px;
  resize: vertical;
  padding: 10px;
  border: 1px solid #aeb8a9;
  border-radius: 7px;
}
.support-chat .chat-form button {
  min-height: 44px;
  border: 0;
  border-radius: 7px;
  background: #284630;
  color: #fff;
  font-weight: 650;
}
.support-chat :is(button, textarea):focus-visible { outline: 2px solid #037775; outline-offset: 2px; }
.support-chat .chat-close:focus-visible { outline-color: #fff; }
@media (max-width: 500px) {
  .support-chat {
    inset: auto max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    width: auto;
    height: min(520px, calc(100dvh - 24px));
  }
}
