.left-rail {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 16px;
  min-width: 0;
}

.left-rail .side.left {
  position: static;
}

.room-chat {
  min-width: 0;
  background: #17130feb;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.room-chat.locked {
  opacity: 0.58;
  filter: grayscale(0.72);
}

.room-chat.locked .chat-form textarea,
.room-chat.locked .chat-form button {
  cursor: not-allowed;
}

.chat-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid #3f3327;
}

.chat-head h3 {
  margin: 3px 0 0;
  color: var(--gold);
  font-size: 19px;
  font-weight: 500;
}

.chat-role {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.chat-log {
  height: 270px;
  overflow-y: auto;
  padding: 12px;
  scrollbar-color: #68543d #17130f;
}

.chat-empty {
  padding: 54px 10px;
  color: #786f62;
  text-align: center;
  line-height: 1.8;
}

.chat-message {
  margin: 0 0 10px;
  padding: 10px 11px;
  background: #100e0d;
  border: 1px solid #392e24;
  border-radius: 9px;
}

.chat-message.own {
  border-color: #6d5331;
  background: #211a13;
}

.chat-message header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.chat-message strong {
  color: var(--gold);
  font-weight: 500;
}

.chat-message time {
  color: #746a5d;
  font-size: 10px;
}

.chat-message p {
  margin: 0;
  color: #ddd1bd;
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 11px;
  border-top: 1px solid #3f3327;
  background: #120f0d;
}

.chat-form textarea {
  min-width: 0;
  resize: none;
  border: 1px solid #51402f;
  background: #0d0b0a;
  color: var(--pale);
  border-radius: 8px;
  padding: 9px 10px;
  line-height: 1.45;
  outline: none;
  font: inherit;
}

.chat-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px #d8b97918;
}

.chat-form .btn {
  align-self: stretch;
  padding: 8px 13px;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 760px) {
  .left-rail {
    position: static;
  }

  .left-rail .side.left {
    display: grid;
    grid-template-columns: 115px 1fr;
  }

  .chat-log {
    height: 230px;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .chat-form .btn {
    justify-self: end;
  }
}
