:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --accent: #b45309;
  --accent-soft: #fef3c7;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18181b;
    --surface: #202024;
    --text: #f4f4f5;
    --muted: #a1a1aa;
    --line: #2f2f35;
    --accent: #facc15;
    --accent-soft: #2b2611;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard", "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.8;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: inherit; }
main { max-width: 680px; margin: 0 auto; padding: 8px 16px 48px; }
.top { max-width: 680px; margin: 0 auto; padding: 16px; }
.brand { font-weight: 800; text-decoration: none; color: var(--accent); }
.hero h1 { font-size: 26px; margin: 12px 0 4px; }
.hero p { color: var(--muted); margin: 0 0 20px; }
.list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.list a {
  display: block; text-decoration: none; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.list strong { display: block; font-size: 17px; }
.list span { display: block; color: var(--muted); font-size: 15px; line-height: 1.6; margin-top: 2px; }
.story h1 { font-size: 24px; line-height: 1.45; margin: 8px 0 20px; }
.story p { margin: 0 0 14px; }
.notice {
  font-size: 13px; color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px;
}
.divider { display: flex; align-items: center; gap: 12px; margin: 28px 0 22px; color: var(--accent); font-weight: 700; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ad-preview {
  margin: 18px 0; padding: 26px 12px; text-align: center; font-size: 13px; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.adsbygoogle { margin: 18px 0; }
.sns { font-size: 14px; margin: 0 0 16px; }
.hub { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.hub .block {
  display: flex; align-items: center; gap: 12px; text-decoration: none; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px 8px 8px;
}
.hub img, .hub .thumb-empty {
  width: 56px; height: 70px; object-fit: cover; border-radius: 10px; flex: none; background: var(--line);
}
.hub strong { font-size: 15px; line-height: 1.45; font-weight: 600; }
.ad-badge {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--muted);
  border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-right: 6px; vertical-align: 1px;
}
.captures img.capture { display: block; width: 100%; height: auto; border-radius: 10px; margin: 0 0 6px; }
.label { font-size: 13px; color: var(--muted); margin: -12px 0 18px; }
.review-banner {
  font-size: 13px; font-weight: 700; color: #9a3412; background: #ffedd5; border-radius: 10px; padding: 8px 12px;
}
/* Image / text switch: radio buttons + CSS, so it works without JavaScript. */
.view-toggle { position: absolute; opacity: 0; pointer-events: none; }
.view-switch { display: flex; gap: 6px; margin: 0 0 16px; }
.view-switch label {
  flex: 1; text-align: center; font-size: 14px; font-weight: 600; padding: 8px 0; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface);
}
#view-image:checked ~ .view-switch label[for="view-image"],
#view-text:checked ~ .view-switch label[for="view-text"] { color: var(--text); border-color: var(--accent); }
#view-image:focus-visible ~ .view-switch label[for="view-image"],
#view-text:focus-visible ~ .view-switch label[for="view-text"] { outline: 2px solid var(--accent); outline-offset: 2px; }
#view-image:checked ~ .views .view-text { display: none; }
#view-text:checked ~ .views .view-image { display: none; }
.comments { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); }
.comments h2 { font-size: 15px; margin: 0 0 8px; }
.comments ul { list-style: none; padding: 0; margin: 0; }
.comments li { font-size: 15px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.staged {
  font-size: 11px; font-weight: 600; color: var(--muted); border: 1px solid var(--line);
  border-radius: 4px; padding: 0 5px; margin-left: 6px; vertical-align: 2px;
}
.attribution {
  margin: 28px 0 0; padding: 14px 16px; font-size: 14px; line-height: 1.6;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.attribution h2 { font-size: 15px; margin: 0 0 6px; }
.attribution p { margin: 0 0 4px; }
.attribution .fine { color: var(--muted); font-size: 12px; margin-top: 8px; }
.repost-blocks blockquote {
  margin: 16px 0; padding: 8px 14px; border-left: 3px solid var(--line); color: var(--muted);
}
.repost-blocks h2 { font-size: 19px; margin: 24px 0 8px; }
.repost-blocks hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.media { margin: 18px 0; }
.media img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 6px; }
.media figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.ad-slot { margin: 18px 0; text-align: center; overflow: hidden; }
.coupang { margin: 28px 0; text-align: center; overflow: hidden; }
.coupang iframe, .coupang img { max-width: 100%; }
.ad-label { font-size: 11px; color: var(--muted); margin: 0 0 4px; text-align: left; }
.rail-preview { display: none; }
@media (min-width: 1200px) {
  .rail-preview {
    display: flex; align-items: center; justify-content: center; text-align: center;
    position: fixed; top: 120px; width: 160px; height: 600px; font-size: 13px; color: var(--muted);
    border: 1px dashed var(--line); border-radius: var(--radius);
  }
  .rail-preview.left { left: calc(50% - 340px - 200px); }
  .rail-preview.right { right: calc(50% - 340px - 200px); }
}
.more { margin-top: 36px; }
.more h2 { font-size: 18px; margin: 0 0 12px; }
.doc h1 { font-size: 24px; }
.doc h2 { font-size: 18px; margin-top: 24px; }
.foot {
  max-width: 680px; margin: 0 auto; padding: 20px 16px 40px; color: var(--muted);
  font-size: 13px; border-top: 1px solid var(--line);
}
.foot p { margin: 4px 0; }

/* hub finder: title search + topic filter (hub.js; without JS every story stays listed) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.finder { margin: 0 0 12px; }
.finder input[type=search] {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px;
}
.finder input[type=search]:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.topics { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; }
.topics button {
  flex: none; font: inherit; font-size: 13px; color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.topics button[aria-pressed=true] { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.no-match { font-size: 14px; color: var(--muted); margin: 10px 2px 0; }
