/* "Mastodon": the look visitors know from the live instance.
   Dark by default like Mastodon, light when the OS asks for it. */
:root {
  --bg: #191b22; --col: #282c37; --raise: #313543; --line: #393f4f;
  --text: #ffffff; --muted: #9baec8; --accent: #8c8dff; --accent-ink: #ffffff;
  --radius: 8px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #eff3f5; --col: #ffffff; --raise: #f3f5f9; --line: #e3e7ef;
    --text: #282c37; --muted: #606984; --accent: #6364ff;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Noto Sans CJK KR", sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 600px; margin: 0 auto; background: var(--col); min-height: 100vh; border-inline: 1px solid var(--line); }
.banner-archived { background: var(--accent); color: var(--accent-ink); text-align: center; font-size: 13px; font-weight: 600; padding: 8px 16px; }

/* profile */
.profile { border-bottom: 1px solid var(--line); }
.profile-banner { display: block; width: 100%; height: 200px; object-fit: cover; background: var(--raise); }
.profile-id { display: flex; align-items: flex-end; gap: 14px; padding: 0 16px; margin-top: -46px; }
.profile-avatar { width: 94px; height: 94px; border-radius: 12px; border: 4px solid var(--col); background: var(--col); }
.profile-id h1 { font-size: 20px; margin: 0; line-height: 1.2; }
.handle, .status-handle { color: var(--muted); font-size: 14px; margin: 2px 0 0; }
.profile-bio, .fields, .profile-stats { padding: 0 16px; }
.profile-bio p { margin: 12px 0; }
.fields { margin: 12px 16px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.field { display: grid; grid-template-columns: 30% 1fr; border-bottom: 1px solid var(--line); }
.field:last-child { border-bottom: 0; }
.field dt { color: var(--muted); font-weight: 600; font-size: 13px; padding: 10px; background: var(--raise); }
.field dd { margin: 0; padding: 10px; overflow-wrap: anywhere; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 14px; }
.profile-stats strong { color: var(--text); }
.tabs { display: flex; border-top: 1px solid var(--line); margin-top: 12px; }
.tabs a { flex: 1; text-align: center; padding: 14px 8px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.tabs a:hover { text-decoration: none; background: var(--raise); }

/* statuses */
.pinned h2 { font-size: 13px; color: var(--muted); margin: 0; padding: 12px 16px 0; font-weight: 600; }
.status { display: grid; grid-template-columns: 46px 1fr; column-gap: 10px; padding: 16px; border-bottom: 1px solid var(--line); }
.status.focus { background: var(--raise); }
.status-head { display: contents; }
.status-avatar { grid-row: span 4; width: 46px; height: 46px; border-radius: 8px; }
.status-who { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; min-width: 0; }
.status-name { font-weight: 700; }
.status-time { grid-column: 2; color: var(--muted); font-size: 13px; order: -1; justify-self: end; margin-top: -1.45em; }
.status-time .clock { display: none; }
.status.focus .status-time .clock { display: inline; }
.reply-to, .status-body, .status-foot { grid-column: 2; }
.reply-to { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.status-body { overflow-wrap: anywhere; }
.status-body p { margin: 6px 0; }
.status.focus .status-body { font-size: 17px; }
.status-body .invisible { display: none; }
.status-body .ellipsis::after { content: "…"; }
.status-foot { display: flex; flex-wrap: wrap; gap: 16px; color: var(--muted); font-size: 13px; margin-top: 8px; }
.status-foot:empty { display: none; }
.emoji { width: 1.25em; height: 1.25em; vertical-align: -0.25em; object-fit: contain; }
details.cw > summary, details.sensitive > summary {
  cursor: pointer; list-style: none; padding: 8px 12px; margin: 6px 0; border-radius: var(--radius);
  background: var(--raise); border: 1px solid var(--line); font-weight: 600;
}
details.cw > summary::after { content: " · Show more"; color: var(--accent); font-weight: 400; }
details.cw[open] > summary::after { content: " · Show less"; }
details > summary::-webkit-details-marker { display: none; }
.media-grid { display: grid; gap: 4px; margin-top: 8px; border-radius: var(--radius); overflow: hidden; }
.media-grid.n2, .media-grid.n4 { grid-template-columns: 1fr 1fr; }
.media-grid.n3 { grid-template-columns: 1fr 1fr; }
.media-grid.n3 .media-item:first-child { grid-row: span 2; }
.media-item { margin: 0; background: var(--raise); }
.media-item img, .media-item video { display: block; width: 100%; height: 100%; max-height: 360px; object-fit: cover; }
.media-grid.n1 .media-item img { object-fit: contain; height: auto; }
.card { display: flex; margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--text); }
.card img { width: 110px; object-fit: cover; }
.card-text { padding: 10px 12px; display: grid; gap: 2px; }
.card-host { color: var(--muted); font-size: 13px; }

/* thread + pages */
.back { margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.back a { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; }
.back-avatar { width: 28px; height: 28px; border-radius: 6px; }
.pager { display: flex; justify-content: space-between; padding: 16px; color: var(--muted); font-size: 14px; }
.site-head { padding: 24px 16px; border-bottom: 1px solid var(--line); }
.site-head h1 { margin: 0 0 4px; font-size: 22px; }
.site-head p { margin: 0; color: var(--muted); }
.account-card { display: flex; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.account-card:hover { background: var(--raise); text-decoration: none; }
.account-card .profile-avatar { width: 64px; height: 64px; border: 0; border-radius: 10px; }
.account-bio { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.account-count { display: block; color: var(--accent); font-size: 13px; margin-top: 4px; }
.search { padding: 16px; }
.search input { width: 100%; font: inherit; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.results { list-style: none; margin: 0; padding: 0; }
.results li { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.results p { margin: 4px 0 0; }
.results-count { color: var(--muted); font-size: 13px; }
.site-foot { padding: 24px 16px; text-align: center; color: var(--muted); font-size: 13px; }
@media (max-width: 600px) { .wrap { border-inline: 0; } .profile-banner { height: 140px; } }
