.card {
  display: grid;
  box-sizing: border-box;
  width: 100%;
  height: 80px;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  background: rgba(31, 22, 29, 0.48);
  color: #ffffff;
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  text-align: left;
  touch-action: manipulation;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 30px rgba(31, 17, 27, 0.2);
  backdrop-filter: blur(14px);
  animation: messageFloatIn 0.5s ease 0.08s backwards;
  transition:
    border-color 0.18s ease,
    filter 0.14s ease,
    box-shadow 0.18s ease,
    transform 0.14s ease;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 22px 48px rgba(46, 22, 38, 0.24);
  transform: translateY(-1px);
}

.card:active {
  border-color: rgba(255, 255, 255, 0.48);
  filter: brightness(0.9);
  box-shadow:
    inset 0 2px 8px rgba(22, 10, 20, 0.28),
    0 6px 16px rgba(28, 12, 24, 0.18);
  transform: translateY(2px) scale(0.97);
}

.card:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.avatarWrap {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 9999px;
  background: linear-gradient(145deg, #ffb36d, #ff5d95);
  box-shadow: 0 10px 24px rgba(255, 95, 128, 0.24);
  overflow: hidden;
  transition: transform 0.14s ease;
}

.card:active .avatarWrap {
  transform: scale(0.94);
}

.avatar {
  width: 100%;
  height: 100%;
}

.copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(11px, 2.593vw, 13px);
  font-weight: 820;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.message {
  display: -webkit-box;
  min-height: 2.6em;
  overflow: hidden;
  color: #ffffff;
  font-size: clamp(13px, 3.45vw, 16px);
  font-weight: 720;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.messageLoading {
  display: block;
  width: min(220px, 76%);
  height: 18px;
  border-radius: 999px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.16),
      rgba(255, 255, 255, 0.34),
      rgba(255, 255, 255, 0.16)
    );
  background-size: 180% 100%;
  animation: messageLoading 1.1s ease-in-out infinite;
}

@keyframes messageFloatIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes messageLoading {
  from {
    background-position: 100% 0;
  }

  to {
    background-position: 0 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .avatarWrap {
    transition-duration: 0.01ms;
  }

  .card {
    animation: none;
  }

  .card:active,
  .card:active .avatarWrap {
    transform: none;
  }
}
