:root {
  --bg: #f6f6f8;
  --surface: #ffffff;
  --text: #1c1c22;
  --muted: #6b6b78;
  --line: #e2e2e8;
  --accent: #c2417a;
  --overlay: rgba(10, 10, 14, 0.92);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f13;
    --surface: #18181f;
    --text: #ececf1;
    --muted: #9a9aa8;
    --line: #2a2a34;
    --accent: #ff7ab0;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  line-height: 1.7;
}
a { color: var(--accent); }
.gated body { overflow: hidden; }

.site-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-title { color: var(--text); font-weight: 700; text-decoration: none; }
.site-header nav { display: flex; gap: 14px; font-size: 14px; }
.site-header nav a { color: var(--muted); text-decoration: none; }

main { max-width: 600px; margin: 0 auto; padding: 16px; }
h1 { font-size: 22px; margin: 8px 0; }
h2 { font-size: 17px; margin-top: 28px; }
.feed-intro { color: var(--muted); margin: 0 0 8px; }

.feed { display: flex; flex-direction: column; gap: 20px; margin-top: 16px; }
.post {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
}
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; margin-bottom: 8px; }
.post-author { font-weight: 700; text-decoration: none; }
.post-tag { color: var(--muted); text-decoration: none; }
.post-comment { margin: 10px 2px 0; }

.embed { min-height: 120px; display: flex; flex-direction: column; justify-content: center; }
.embed .twitter-tweet { margin: 0 auto !important; }
.embed.loading { min-height: 400px; }
.embed-fallback, .embed.failed::before { color: var(--muted); text-align: center; display: block; padding: 24px 0; }
.embed.failed::before { content: "この投稿は表示できませんでした"; padding-bottom: 0; }

.linkcard {
  display: grid; gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
}
.linkcard-site { font-size: 13px; color: var(--muted); }
.linkcard-title { font-weight: 700; }
.linkcard-go { color: var(--accent); font-size: 14px; }

.ad {
  position: relative;
  padding: 24px 12px 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
}
.ad-label { position: absolute; top: 6px; left: 10px; font-size: 12px; color: var(--muted); }

.pager { display: flex; justify-content: space-between; align-items: center; margin: 28px 0; }
.list { padding-left: 20px; }
.count { color: var(--muted); font-size: 14px; }
.button { display: inline-block; padding: 10px 18px; border-radius: 8px; background: var(--accent); color: #fff; text-decoration: none; }

.site-footer { max-width: 600px; margin: 0 auto; padding: 24px 16px 40px; font-size: 13px; color: var(--muted); }

.agegate {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: var(--overlay);
}
.agegate[hidden] { display: none; }
.agegate-box { max-width: 420px; background: var(--surface); border-radius: 14px; padding: 24px; text-align: center; }
.agegate-title { font-size: 18px; font-weight: 700; margin-top: 0; }
.agegate-buttons { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 16px; }
.agegate-buttons button {
  font: inherit; padding: 10px 18px; border: 0; border-radius: 8px;
  background: var(--accent); color: #fff; cursor: pointer;
}
.agegate-buttons a { color: var(--muted); }
