.gy-chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--accent-dark); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(42,92,170,.4);
  transition: transform .2s ease, box-shadow .2s ease;
}
.gy-chat-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(42,92,170,.5); }
.gy-chat-fab[hidden], .gy-chat-panel[hidden] { display: none; }
.gy-chat-fab { animation: none; }
.gy-chat-fab-blink { animation: gy-chat-blink 1.2s ease-in-out 3; }
@keyframes gy-chat-blink {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(42,92,170,.4); }
  50% { transform: scale(1.14); box-shadow: 0 8px 30px rgba(42,92,170,.75), 0 0 0 8px rgba(42,92,170,.18); }
}

.gy-chat-panel {
  position: fixed; right: 20px; bottom: 88px; z-index: 60;
  width: 340px; max-width: calc(100vw - 40px);
  max-height: calc(100vh - 130px);
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  display: flex; flex-direction: column;
}

.gy-chat-head {
  background: var(--accent-dark); color: #fff; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; flex: none;
}
.gy-chat-name { font-weight: 700; font-size: 15px; }
.gy-chat-role { font-size: 12px; opacity: .85; }
.gy-chat-close {
  background: rgba(255,255,255,.2); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px;
}

.gy-chat-body {
  flex: 0 1 auto; overflow-y: auto; padding: 14px; background: var(--bg);
  display: flex; flex-direction: column; gap: 10px;
  min-height: 110px; max-height: 320px;
}
.gy-chat-msg {
  max-width: 82%; padding: 9px 12px; border-radius: 12px;
  font-size: 14px; line-height: 1.4; white-space: pre-wrap; word-break: break-word;
}
.gy-chat-msg-op {
  align-self: flex-start; background: #fff; color: var(--text);
  border: 1px solid var(--line); border-bottom-left-radius: 3px;
}
.gy-chat-msg-me {
  align-self: flex-end; background: var(--accent-light); color: var(--text);
  border-bottom-right-radius: 3px;
}

.gy-chat-contact {
  flex: none; margin: 0 10px 10px; border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 10px; font-size: 16px; font-family: inherit; color: var(--muted); outline: none;
}
.gy-chat-contact::placeholder { font-size: 12px; }
.gy-chat-contact:focus { border-color: var(--accent-dark); color: var(--text); }

.gy-chat-form {
  flex: none; display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); background: #fff;
}
.gy-chat-input {
  flex: 1; border: 1px solid var(--line); border-radius: 20px;
  padding: 9px 14px; font-size: 16px; font-family: inherit; outline: none;
}
.gy-chat-input:focus { border-color: var(--accent-dark); }
.gy-chat-send {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: none;
  background: var(--accent-dark); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.gy-chat-send svg { transform: translateX(-1px); }

@media (max-width: 760px) {
  .gy-chat-fab { display: none; }
  .gy-chat-panel { bottom: calc(76px + env(safe-area-inset-bottom)); }
}
@media (max-width: 480px) {
  .gy-chat-panel { right: 12px; width: 272px; max-width: calc(100vw - 24px); max-height: calc(100vh - 110px); }
  .gy-chat-body { max-height: 260px; }
  .gy-chat-fab { right: 16px; width: 48px; height: 48px; }
  .gy-chat-fab svg { width: 20px; height: 20px; }
  .gy-chat-msg { font-size: 13px; }
}
