main {
  width: min(1420px, calc(100% - 28px));
}

.club-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  margin-top: 22px;
  align-items: start;
}

.activity-stack {
  min-width: 0;
}

.chat-panel {
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  min-height: 620px;
  max-height: 900px;
}

.online-panel {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.online-head {
  display: flex;
  justify-content: space-between;
}

.online-head strong {
  font: 800 10px/1 system-ui, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.online-head span {
  color: var(--muted);
  font: 12px/1 system-ui, sans-serif;
}

.online-list {
  display: grid;
  gap: 4px;
  max-height: 141px;
  margin: 9px 0 0;
  padding: 0;
  overflow-y: auto;
  scrollbar-gutter: stable;
  list-style: none;
}

.online-list li {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 5px 6px;
  min-height: 25px;
  color: var(--paper);
  font: 11px/1.2 system-ui, sans-serif;
}

.online-list li.self {
  background: #143b34;
}

.online-list strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-list small {
  color: var(--muted);
  font-size: 9px;
}

.online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 2px rgba(85, 217, 162, .15);
}

.username-form {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.username-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.username-row input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #143b34;
  color: var(--cream);
  padding: 10px;
}

.username-row .button {
  padding: 10px;
}

.username-form small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font: 9px/1.35 system-ui, sans-serif;
}

.chat-panel .messages {
  flex: 1;
  min-height: 190px;
  height: auto;
}

.chat-panel form[data-chat-form] {
  margin-top: 10px;
}

.chat-key-hint {
  display: block;
  margin: 7px 0 0;
  color: var(--muted);
  font: 9px/1.35 system-ui, sans-serif;
}

@media (max-width: 850px) {
  .club-body {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    position: static;
    height: auto;
    min-height: 620px;
    max-height: none;
  }

  .chat-panel .messages {
    height: 300px;
    flex: none;
  }
}
