.haydev-chat {
  --chat-ink: #f2f6f7;
  --chat-muted: #aab8bd;
  --chat-panel: rgba(10, 16, 20, .96);
  --chat-line: rgba(202, 226, 231, .17);
  --chat-cyan: #8eeaf1;
  position: fixed;
  z-index: 10020;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  color: var(--chat-ink);
  font: 400 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.haydev-chat *, .haydev-chat *::before, .haydev-chat *::after { box-sizing: border-box; }
.haydev-chat button, .haydev-chat textarea { font: inherit; }
.haydev-chat__launcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 58px;
  height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(194, 244, 248, .75);
  border-radius: 999px;
  color: #091114;
  background: linear-gradient(135deg, #e9fbfc, #8eeaf1 65%, #a8c9ff);
  box-shadow: 0 10px 36px #0008, 0 0 26px #73dce72e;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.haydev-chat__launcher:hover { transform: translateY(-2px); box-shadow: 0 13px 40px #0009, 0 0 35px #73dce74d; filter: brightness(1.04); }
.haydev-chat__launcher:focus-visible, .haydev-chat button:focus-visible, .haydev-chat textarea:focus-visible { outline: 2px solid var(--chat-cyan); outline-offset: 3px; }
.haydev-chat__launcher svg { width: 21px; height: 21px; flex: 0 0 auto; }
.haydev-chat__launcher-label { font-size: 12px; font-weight: 650; letter-spacing: .015em; white-space: nowrap; }
.entry-page .haydev-chat__launcher { width: 58px; padding: 0; }
.entry-page .haydev-chat__launcher-label { display: none; }
.haydev-chat__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 32px));
  height: min(590px, calc(100svh - 120px));
  min-height: 360px;
  overflow: hidden;
  border: 1px solid rgba(202, 226, 231, .24);
  border-radius: 24px;
  background:
    radial-gradient(ellipse at 100% 0, rgba(82, 117, 143, .20), transparent 46%),
    linear-gradient(155deg, rgba(17, 25, 30, .99), var(--chat-panel));
  box-shadow: 0 26px 100px #000b, inset 0 1px #ffffff10;
  backdrop-filter: blur(24px) saturate(1.25);
  -webkit-backdrop-filter: blur(24px) saturate(1.25);
  transform-origin: bottom right;
  animation: haydev-chat-in .22s ease-out both;
}
.haydev-chat__panel[hidden] { display: none; }
@keyframes haydev-chat-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.haydev-chat__header { position: relative; padding: 22px 54px 18px 22px; border-bottom: 1px solid var(--chat-line); }
.haydev-chat__eyebrow { margin: 0 0 7px; color: var(--chat-cyan); font-size: 9px; font-weight: 700; letter-spacing: .17em; }
.haydev-chat__header h2 { margin: 0; color: var(--chat-ink); font-size: 22px; font-weight: 500; letter-spacing: -.035em; line-height: 1.2; }
.haydev-chat__subhead { margin: 7px 0 0; color: var(--chat-muted); font-size: 11px; }
.haydev-chat__close { position: absolute; top: 18px; right: 18px; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--chat-line); border-radius: 50%; color: var(--chat-ink); background: #ffffff09; cursor: pointer; font-size: 21px; line-height: 1; }
.haydev-chat__close:hover { background: #ffffff15; }
.haydev-chat__messages { display: flex; flex: 1 1 auto; flex-direction: column; gap: 12px; overflow: auto; padding: 18px 16px 12px; overscroll-behavior: contain; scrollbar-color: #78949b55 transparent; scrollbar-width: thin; }
.haydev-chat__message { max-width: 88%; padding: 11px 13px; border: 1px solid var(--chat-line); border-radius: 15px 15px 15px 4px; color: #e8eff0; background: #e8f4f508; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; white-space: pre-wrap; }
.haydev-chat__message--user { align-self: flex-end; border-color: #8eeaf13c; border-radius: 15px 15px 4px 15px; color: #f4fbfc; background: linear-gradient(140deg, #184651a8, #203a50bd); }
.haydev-chat__message--error { border-color: #ff9b9b50; color: #ffd2d2; }
.haydev-chat__suggestions { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 16px 14px; }
.haydev-chat__suggestions button { border: 1px solid #8eeaf13c; border-radius: 999px; padding: 7px 10px; color: #d9f5f7; background: #6dcbd00c; font-size: 10px; cursor: pointer; transition: background .16s ease, border-color .16s ease; }
.haydev-chat__suggestions button:hover { border-color: #8eeaf1a0; background: #6dcbd01c; }
.haydev-chat__composer { padding: 13px 15px 14px; border-top: 1px solid var(--chat-line); background: #080d11a8; }
.haydev-chat__form { display: flex; align-items: flex-end; gap: 9px; }
.haydev-chat__input { flex: 1; min-height: 44px; max-height: 108px; resize: none; margin: 0; border: 1px solid #cadde02c; border-radius: 14px; padding: 12px 13px; color: var(--chat-ink); background: #f5ffff08; font-size: 12px; line-height: 1.45; }
.haydev-chat__input::placeholder { color: #9baeb4; }
.haydev-chat__send { display: grid; flex: 0 0 44px; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 14px; color: #081114; background: linear-gradient(135deg, #dffbfc, var(--chat-cyan)); cursor: pointer; }
.haydev-chat__send:disabled { cursor: wait; opacity: .55; }
.haydev-chat__send svg { width: 18px; height: 18px; }
.haydev-chat__fineprint { margin: 9px 2px 0; color: #93a3a8; font-size: 9px; line-height: 1.5; }
.haydev-chat__fineprint a { color: #bdeef1; text-decoration: underline; text-underline-offset: 2px; }
.haydev-chat__typing { display: inline-flex; align-items: center; gap: 4px; min-height: 18px; }
.haydev-chat__typing i { width: 4px; height: 4px; border-radius: 50%; background: #bdeef1; animation: haydev-chat-dot 1s ease-in-out infinite; }
.haydev-chat__typing i:nth-child(2) { animation-delay: .12s; }
.haydev-chat__typing i:nth-child(3) { animation-delay: .24s; }
@keyframes haydev-chat-dot { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@media (max-width: 520px) {
  .haydev-chat { right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); }
  .haydev-chat__panel { position: fixed; inset: auto 12px max(82px, calc(env(safe-area-inset-bottom) + 70px)); width: auto; height: min(72svh, 590px); min-height: min(380px, calc(100svh - 112px)); border-radius: 21px; transform-origin: bottom right; }
  .haydev-chat__header { padding: 19px 50px 15px 18px; }
  .haydev-chat__messages { padding-inline: 13px; }
  .haydev-chat__suggestions { padding-inline: 13px; }
  .haydev-chat__composer { padding-inline: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .haydev-chat *, .haydev-chat *::before, .haydev-chat *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
