.fibo-card-avatar-only {
  justify-content: center;
  width: 100%;
}

.fibo-card-avatar-only .fibo-live2d-avatar {
  flex: 0 0 auto;
}

.fibo-bubble {
  display: none !important;
}

.message-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: min(760px, 100%);
}

.message-row.assistant {
  align-self: flex-start;
}

.message-row.user {
  align-self: flex-end;
  justify-content: flex-end;
}

.message-row.system {
  align-self: center;
  justify-content: center;
  max-width: min(640px, 94%);
}

.message-row.assistant > .message-avatar {
  display: block !important;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #fff8ee;
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.message-bubble {
  width: fit-content;
  max-width: min(680px, 100%);
  padding: 11px 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.message-row.assistant .message-bubble {
  border-bottom-left-radius: 4px;
  background: #fff;
}

.message-row.user .message-bubble {
  color: #fff;
  border-color: #0f766e;
  background: #0f766e;
  border-bottom-right-radius: 4px;
}

.message-row.system .message-bubble {
  color: var(--muted);
  background: #f8fafc;
  border-radius: 999px;
  text-align: center;
}

@media (max-width: 800px) {
  .message-row.assistant > .message-avatar {
    width: 36px;
    height: 36px;
  }

  .message-bubble {
    max-width: calc(100vw - 104px);
  }
}
