:root {
  --bg: #f4f5f9;
  --surface: #ffffff;
  --text: #1c1d26;
  --muted: #646777;
  --line: #e2e4ec;
  --accent: #4b54c8;
  --accent-soft: #eceefe;
  --banner-bg: #fff6dc;
  --banner-text: #5a4300;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15161d;
    --surface: #1e2029;
    --text: #e8e9f0;
    --muted: #9a9db0;
    --line: #2e3140;
    --accent: #9aa2ff;
    --accent-soft: #272a45;
    --banner-bg: #3a3014;
    --banner-text: #f3dc9a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

.banner {
  background: var(--banner-bg);
  color: var(--banner-text);
  padding: 10px 16px;
  font-size: 14px;
  text-align: center;
}
header.site, main, footer.site { max-width: 680px; margin: 0 auto; padding: 0 16px; }
header.site {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between;
  padding-top: 16px; padding-bottom: 16px;
}
.brand { font-weight: 700; font-size: 18px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
header.site nav { display: flex; gap: 16px; font-size: 15px; }
footer.site { color: var(--muted); font-size: 13px; padding-top: 24px; padding-bottom: 40px; }

h1 { font-size: 24px; margin: 8px 0; }
h2.month {
  font-size: 13px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); margin: 28px 4px 8px;
}
.intro { padding: 4px 4px 8px; }
.intro p { margin: 4px 0; }
.note { color: var(--muted); font-size: 14px; }

.emoji { height: 1.25em; width: auto; vertical-align: -0.25em; margin: 0 .05em; }

.status {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 10px 0;
}
.status.focus { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.status > header { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.who { display: flex; gap: 10px; align-items: center; color: var(--text); min-width: 0; }
.who > span { display: flex; flex-direction: column; min-width: 0; }
.who strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.handle { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.when { color: var(--muted); font-size: 14px; white-space: nowrap; }
.edited { color: var(--muted); font-size: 13px; }
.boosted, .reply-to { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
.reply-to { margin: 8px 0 0; }

.avatar { border-radius: 8px; object-fit: cover; flex: none; background: var(--accent-soft); }
.avatar.md { width: 44px; height: 44px; }
.avatar.lg { width: 56px; height: 56px; }
.avatar.xl { width: 96px; height: 96px; border-radius: 14px; border: 4px solid var(--surface); }
.avatar.placeholder {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent); font-weight: 700;
}

.content { margin-top: 10px; overflow-wrap: anywhere; }
.content p { margin: 0 0 10px; }
.content p:last-child { margin-bottom: 0; }
.content blockquote { margin: 8px 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
.content pre, .content code { background: var(--accent-soft); border-radius: 4px; }
.content code { padding: 1px 4px; }
.content pre { padding: 10px; overflow-x: auto; }
.content .invisible { display: none; }
.content .ellipsis::after { content: "…"; }

details.cw, details.sensitive { margin-top: 10px; }
details.cw > summary, details.sensitive > summary { cursor: pointer; font-weight: 600; }
.cw-btn { font-size: 13px; font-weight: 500; color: var(--accent); margin-left: 6px; }

.media { display: grid; gap: 6px; margin-top: 10px; border-radius: 10px; overflow: hidden; }
.media.n2, .media.n3, .media.n4 { grid-template-columns: 1fr 1fr; }
.media img, .media video { width: 100%; height: 100%; max-height: 420px; object-fit: cover; display: block; background: var(--accent-soft); }
.media.n1 img, .media.n1 video { object-fit: contain; }
.media audio { width: 100%; }

.card {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 10px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--text);
}
.card:hover { text-decoration: none; border-color: var(--accent); }
.card-host { color: var(--muted); font-size: 13px; }
.card span:last-child:not(.card-host) { color: var(--muted); font-size: 14px; }

.poll { list-style: none; padding: 0; margin: 10px 0 4px; }
.poll li { position: relative; display: flex; justify-content: space-between; padding: 6px 10px; margin: 4px 0; border-radius: 6px; overflow: hidden; }
.poll .bar { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); z-index: 0; }
.poll .opt, .poll .pct { position: relative; }

.stats { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; color: var(--muted); font-size: 14px; }
.stats .origin { margin-left: auto; }
.reaction { display: inline-flex; align-items: center; gap: 4px; }

.thread-child { margin-left: 14px; padding-left: 10px; border-left: 2px solid var(--line); }

.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.person {
  display: flex; gap: 12px; align-items: center; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px;
}
.person:hover { text-decoration: none; border-color: var(--accent); }
.person > span { display: flex; flex-direction: column; min-width: 0; }
.note-snippet { color: var(--muted); font-size: 13px; }

.profile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.header-img { height: 160px; background: var(--accent-soft); }
.header-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-main { padding: 0 16px 16px; margin-top: -48px; }
.profile-main h1 { margin-bottom: 0; }
.profile-main .handle { margin: 0 0 10px; }
.bio p { margin: 0 0 8px; }
.tag { background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 0 6px; font-size: 12px; }
.fields { margin: 12px 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.field { display: grid; grid-template-columns: minmax(90px, 30%) 1fr; border-top: 1px solid var(--line); }
.field:first-child { border-top: 0; }
.field dt, .field dd { margin: 0; padding: 8px 10px; overflow-wrap: anywhere; }
.field dt { color: var(--muted); font-size: 14px; background: var(--bg); }
.field.verified dd { color: #2e8b57; }
.counts { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.counts b { color: var(--text); }

@media (max-width: 480px) {
  .status { padding: 12px; }
  .status > header { flex-direction: column; gap: 4px; }
  .thread-child { margin-left: 6px; padding-left: 6px; }
}
