.pet-chat-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 85;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 1.5px solid var(--border-gold);
  background: radial-gradient(circle at 40% 35%, var(--gold), #c99700 72%);
  color: var(--navy-950);
  padding: 4px;
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .35);
  animation: chatPulse 2.2s ease-in-out infinite;
}

.pet-chat-toggle img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.pet-chat-hint {
  position: fixed;
  right: 96px;
  bottom: 31px;
  z-index: 85;
  min-height: 42px;
  border-radius: 999px;
  border: 1.5px solid var(--border-gold);
  background: var(--navy-800);
  color: var(--gold);
  padding: 8px 14px;
  font-weight: 900;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .35);
}

.pet-chat-hint::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: var(--navy-800);
  border-top: 1.5px solid var(--border-gold);
  border-right: 1.5px solid var(--border-gold);
  transform: translateY(-50%) rotate(45deg);
}

@keyframes chatPulse {
  0%, 100% { box-shadow: 0 14px 36px rgba(0, 0, 0, .35), 0 0 0 0 rgba(245, 200, 0, .35); }
  50% { box-shadow: 0 14px 36px rgba(0, 0, 0, .35), 0 0 0 11px rgba(245, 200, 0, 0); }
}

.pet-chat {
  position: fixed;
  right: 18px;
  bottom: 88px;
  z-index: 86;
  width: min(380px, calc(100vw - 28px));
  height: min(620px, calc(100vh - 120px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1.5px solid var(--border-gold);
  border-radius: 16px;
  background: var(--navy-900);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}

.pet-chat.open {
  display: flex;
}

.pet-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--navy-800);
}

.pet-chat-title {
  display: grid;
  gap: 2px;
}

.pet-chat-title b {
  color: var(--gold);
  font-size: 15px;
}

.pet-chat-title span {
  color: var(--text-muted);
  font-size: 11px;
}

.pet-chat-messages {
  flex: 1;
  overflow: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pet-chat-welcome-media {
  align-self: center;
  width: min(260px, 80%);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(245, 200, 0, .35);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
}

.pet-chat-welcome-media img {
  width: 100%;
  height: auto;
  display: block;
}

.pet-chat-msg {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 14px;
  line-height: 1.7;
  font-size: 13px;
  white-space: pre-wrap;
}

.pet-chat-msg.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, .07);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-bottom-right-radius: 4px;
}

.pet-chat-msg.user {
  align-self: flex-end;
  background: rgba(245, 200, 0, .16);
  color: var(--white);
  border: 1px solid rgba(245, 200, 0, .3);
  border-bottom-left-radius: 4px;
}

.pet-chat-suggestions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 14px 10px;
}

.pet-chat-suggestion {
  min-height: 31px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .05);
  color: var(--text-secondary);
  padding: 5px 10px;
  font-size: 12px;
}

.pet-chat-suggestion:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.pet-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
  background: var(--navy-800);
}

.pet-chat-input {
  min-height: 42px;
  max-height: 110px;
  resize: none;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: rgba(255, 255, 255, .05);
  color: var(--white);
  padding: 10px 12px;
  outline: none;
  font-family: inherit;
}

.pet-chat-input:focus {
  border-color: var(--gold);
}

.pet-chat-send {
  min-width: 64px;
}

.pet-chat-loading {
  display: none;
  padding: 0 14px 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.pet-chat-loading.open {
  display: block;
}

@media (max-width: 620px) {
  .pet-chat-toggle {
    right: 14px;
    bottom: 14px;
    width: 64px;
    height: 64px;
  }

  .pet-chat-hint {
    right: 88px;
    bottom: 24px;
    max-width: 190px;
    font-size: 12px;
  }

  .pet-chat {
    right: 10px;
    left: 10px;
    bottom: 82px;
    width: auto;
    height: min(610px, calc(100vh - 98px));
  }
}
