:root {
  color-scheme: dark;
  --bg: #0b0d10;
  --panel: #12151a;
  --hairline: #2a3038;
  --text: #e8eaed;
  --subtle: #9aa3ad;
  --brand: #e85d4c;
  font-family: system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--hairline);
}

.eyebrow {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--subtle);
}

h1 {
  margin: 0.2rem 0 0;
  font-size: 1.35rem;
  font-weight: 500;
}

.viewer-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.meta {
  margin: 0;
  font-size: 0.85rem;
  color: var(--subtle);
  text-align: right;
}

.logout {
  font-size: 0.8rem;
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.logout:hover {
  color: var(--text);
}

main {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 5rem);
}

@media (max-width: 720px) {
  main {
    grid-template-columns: 1fr;
  }
}

.boards {
  border-right: 1px solid var(--hairline);
  padding: 1rem;
}

.board-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.35rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.board-btn:hover,
.board-btn.active {
  border-color: var(--hairline);
  background: var(--panel);
}

.board-btn small {
  display: block;
  color: var(--subtle);
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
}

.thread {
  padding: 1rem 1.25rem 2rem;
}

.banner {
  font-size: 0.8rem;
  color: var(--subtle);
  margin: 0 0 1rem;
  padding: 0.6rem 0.75rem;
  border-left: 3px solid var(--brand);
  background: var(--panel);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.msg {
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  background: var(--panel);
}

.msg-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--subtle);
  margin-bottom: 0.45rem;
}

.msg-body {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
  line-height: 1.45;
}

.err {
  color: var(--brand);
  padding: 1rem;
}