.chat-card {
  min-height: 520px;
  padding: 16px;
  border-radius: 32px;
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(255,255,255,.82);
  box-shadow: 0 20px 60px rgba(214,112,184,.18);
  backdrop-filter: blur(18px);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 12px;
}

.chat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.chat-top strong {
  display: block;
}

.chat-top span,
.chat-note {
  color: #9b6fa5;
  font-size: .86rem;
}

.chat-mini-button {
  border: 0;
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  color: #b7488a;
  font-weight: 900;
  cursor: pointer;
}

.chat-messages {
  min-height: 280px;
  max-height: 420px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.chat-empty {
  margin: auto;
  color: #9b6fa5;
  text-align: center;
}

.chat-message {
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.7);
  overflow-wrap: anywhere;
}

.chat-name {
  display: block;
  margin-bottom: 4px;
  color: #bf5f98;
  font-weight: 900;
}

.chat-text {
  white-space: pre-wrap;
}

.chat-gif {
  display: block;
  max-width: 100%;
  max-height: 180px;
  margin-top: 8px;
  border-radius: 16px;
  object-fit: contain;
  background: #fff;
}

.chat-form {
  display: grid;
  gap: 8px;
}

.chat-input {
  width: 100%;
  border: 1px solid rgba(255,255,255,.95);
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255,255,255,.82);
  color: #5c3b68;
  outline: none;
}

.chat-input:focus {
  border-color: #ff8bc7;
  box-shadow: 0 0 0 4px rgba(255,139,199,.18);
}

.gif-details {
  color: #9b6fa5;
}

.gif-details summary {
  cursor: pointer;
  font-weight: 900;
}

.gif-details .chat-input {
  margin-top: 8px;
}

.chat-send {
  width: 100%;
}

.chat-note {
  margin: 0;
  text-align: center;
}

@media(max-width:900px) {
  .chat-card {
    min-height: auto;
  }
}
