:root {
  color-scheme: light;
  --bg: #fff;
  --text: #111;
  --muted: #666;
  --line: #ddd;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.brand {
  font-weight: 700;
  text-decoration: none;
}

.shell {
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 24px 16px 56px;
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.account-name {
  max-width: 160px;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
}

.avatar-small {
  width: 28px;
  height: 28px;
}

.avatar-fallback {
  display: inline-block;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #111;
  border-radius: 0;
  background: #fff;
  color: #111;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: #f5f5f5;
}

.button-primary {
  background: #111;
  color: #fff;
}

.button-primary:hover {
  background: #333;
}

.button-ghost {
  min-height: 32px;
  padding: 0 10px;
  border-color: var(--line);
  color: var(--muted);
}

.button-wide {
  width: 100%;
}

.login-panel,
.message-panel {
  display: grid;
  gap: 18px;
  max-width: 360px;
  margin: 18vh auto 0;
}

.login-panel h1,
.message-panel h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.lead,
.message-panel p {
  margin: 4px 0 0;
  color: var(--muted);
}

.composer {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.composer textarea {
  width: 100%;
  min-height: 96px;
  padding: 10px;
  resize: vertical;
  border: 1px solid var(--line);
  outline: none;
  background: #fff;
  color: var(--text);
}

.composer textarea:focus {
  border-color: #111;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.counter {
  min-width: 36px;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.notice {
  margin: 0;
  color: #111;
  font-size: 14px;
  font-weight: 600;
}

.timeline {
  display: grid;
}

.post {
  display: grid;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.post-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.author {
  display: flex;
  min-width: 0;
  gap: 10px;
}

.author-text {
  display: grid;
  min-width: 0;
  margin: auto 0;
}

.author-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.author-text span,
.post-header time,
.empty {
  color: var(--muted);
  font-size: 14px;
}

.post-body {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}

.text-button:hover {
  color: #111;
  text-decoration: underline;
}

.empty {
  margin: 40px 0;
  text-align: center;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 18px 0 0;
}

.pagination .button:first-child:not(:last-child) {
  margin-right: auto;
}

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

@media (max-width: 560px) {
  .topbar {
    padding: 0 12px;
  }

  .account-name {
    display: none;
  }

  .shell {
    padding-inline: 12px;
  }

  .login-panel,
  .message-panel {
    margin-top: 14vh;
  }

  .post-header {
    display: grid;
  }
}
