.nuggy-support-chat {
  position: fixed;
  z-index: 10020;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(88px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100dvh - 112px));
  min-height: 260px;
  overflow: hidden;
  border: 1px solid var(--graphite-10, #dedfd8);
  border-radius: 14px;
  background: var(--warm-cream, #fffdf6);
  color: var(--graphite-ink, #222);
  box-shadow: 0 12px 44px #153e2926;
  font: 14px/1.45 "Urbanist", sans-serif;
}
.nuggy-support-chat[hidden], .nuggy-support-chat [hidden] { display: none; }
.nuggy-support-chat button, .nuggy-support-chat textarea { font: inherit; }
.nuggy-support-chat button { min-width: 44px; min-height: 44px; cursor: pointer; }
.nuggy-support-chat button:disabled { cursor: default; opacity: .55; }
.nuggy-support-chat button:focus-visible, .nuggy-support-chat textarea:focus-visible { outline: 2px solid var(--primary-green, #006644); outline-offset: 2px; }
.nuggy-support-chat__header { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--graphite-10, #dedfd8); }
.nuggy-support-chat__header > div { flex: 1; min-width: 0; }
.nuggy-support-chat__header h2 { margin: 0; font: 700 16px/1.3 "Urbanist", sans-serif; }
.nuggy-support-chat__header p { margin: 2px 0 0; font-size: 12px; color: #58665e; }
.nuggy-support-chat__header button { border: 0; border-radius: 8px; background: transparent; color: var(--deep-forest, #1e5631); font-size: 23px; }
.nuggy-support-chat__header button:hover { background: #0066440d; }
.nuggy-support-chat__messages { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 14px; }
.nuggy-support-chat__intro { margin: 0 0 12px; color: #58665e; }
.nuggy-support-chat__prompt { display: block; width: 100%; margin-top: 8px; padding: 9px 12px; border: 1px solid var(--graphite-10, #dedfd8); border-radius: 9px; background: white; text-align: left; color: var(--deep-forest, #1e5631); }
.nuggy-support-chat__message { white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 12px; margin: 0 0 12px; border-radius: 10px; background: #f0f2eb; }
.nuggy-support-chat__message--user { margin-left: 24px; background: #e5efe6; }
.nuggy-support-chat__message small { display: block; margin-bottom: 3px; font-weight: 700; color: #486352; }
.nuggy-support-chat__feature-link { display: flex; align-items: center; min-height: 44px; margin-top: 8px; color: var(--primary-green, #006644); font-weight: 700; }
.nuggy-support-chat__waiting { margin: 0; color: #58665e; }
.nuggy-support-chat__status { margin: 0; padding: 0 14px; font-size: 12px; color: #58665e; }
.nuggy-support-chat__status:not(:empty) { padding-bottom: 10px; }
.nuggy-support-chat__retry, .nuggy-support-chat__continue { margin: 0 14px 10px; border: 1px solid #9cbba9; border-radius: 8px; background: white; color: var(--deep-forest, #1e5631); }
.nuggy-support-chat__form { padding: 10px 12px; border-top: 1px solid var(--graphite-10, #dedfd8); }
.nuggy-support-chat__form label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 600; }
.nuggy-support-chat__form > div { display: flex; gap: 8px; align-items: flex-end; }
.nuggy-support-chat__form textarea { flex: 1; min-width: 0; min-height: 54px; max-height: 100px; resize: vertical; padding: 9px; border: 1px solid #b8c5ba; border-radius: 8px; background: white; color: inherit; }
.nuggy-support-chat__form button { border: 0; border-radius: 8px; padding: 9px 12px; background: var(--primary-green, #006644); color: white; }
.nuggy-support-chat__form p { margin: 7px 0 0; font-size: 11px; color: #58665e; }
@media (max-width: 620px) {
  .nuggy-support-chat { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); height: min(520px, calc(100dvh - 24px)); }
  .nuggy-support-chat__form textarea { font-size: 16px; }
}
@media (max-height: 360px) {
  .nuggy-support-chat { bottom: 8px; min-height: 0; height: calc(100dvh - 16px); }
  .nuggy-support-chat__form p { display: none; }
}
