.room-chat-panel {
  margin: 1rem auto 0;
  max-width: min(56rem, 100%);
  border: 1px solid var(--border, #6aaa6a);
  border-radius: 6px;
  background: var(--panel, #f4fff4);
  color: var(--text, #113311);
  padding: 0.65rem 0.75rem 0.75rem;
}

.room-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.room-chat-title {
  margin: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.room-chat-unread {
  display: inline-flex;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: #c0392b;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.room-chat-log {
  height: 9rem;
  overflow-y: auto;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.45rem 0.55rem;
  font-size: 0.9rem;
  line-height: 1.35;
}

.room-chat-log:empty::before {
  content: "Ei viestejä vielä — sano hei!";
  color: #668866;
}

.room-chat-line {
  margin: 0.15rem 0;
  word-break: break-word;
}

.room-chat-line strong {
  font-weight: 700;
}

.room-chat-form {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.room-chat-form input {
  flex: 1;
  min-width: 0;
}

.room-chat-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #557755;
}

.room-chat-panel.hidden {
  display: none !important;
}

@media (max-width: 640px) {
  .room-chat-log {
    height: 7.5rem;
  }
}
