.chat-page {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: calc(100dvh - 88px);
  padding: 8px;
  box-shadow: none;
}
.chat-board {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 2px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg1);
}
.chat-empty {
  color: var(--muted);
  text-align: center;
  padding: 24px 8px;
  font-size: 0.78rem;
}
.chat-item {
  border: 0;
  border-radius: 6px;
  padding: 5px 8px;
  background: transparent;
}
.chat-item:nth-child(even) { background: rgba(255, 255, 255, 0.7); }
.chat-item:hover { background: #fff; }
.chat-meta {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 1px;
  font-size: 0.64rem;
  color: var(--muted);
  line-height: 1.2;
}
.chat-nick { color: var(--accent); font-weight: 700; }
.chat-time { color: var(--muted); }
.chat-rel {
  margin-left: 6px;
  color: #94a3b8;
  font-size: 0.95em;
}
.chat-rel::before {
  content: "·";
  margin-right: 6px;
  color: #cbd5e1;
}
.chat-id {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.58rem;
  color: #cbd5e1;
  letter-spacing: 0.01em;
  user-select: all;
}
.chat-body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.35;
  font-size: 0.8rem;
}
.chat-form {
  margin: 0;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 6px;
  align-items: stretch;
}
.chat-form input,
.chat-form textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 6px 8px;
  font: inherit;
  resize: none;
}
.chat-form textarea { min-height: 34px; max-height: 72px; line-height: 1.35; }
.chat-form input:focus,
.chat-form textarea:focus {
  outline: 2px solid rgba(15, 159, 122, 0.25);
  border-color: var(--accent);
}
.chat-form .btn { padding: 0 14px; min-height: 34px; }
.chat-status {
  margin: 0;
  font-size: 0.64rem;
  color: var(--muted);
  line-height: 1.2;
}

[data-ui="mobile"] .chat-form { grid-template-columns: 1fr auto; }
[data-ui="mobile"] .chat-form #chatNick { grid-column: 1 / -1; }
