:root {
  --bg: #ffffff; --fg: #1f2328; --muted: #6b7280; --line: #e5e7eb;
  --accent: #0f766e; --accent-soft: #ecfdf5; --card: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111418; --fg: #e6e8eb; --muted: #9aa3ad; --line: #2a3038; --accent: #34d399; --accent-soft: #10241e; --card: #171b20; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

.top { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 10; }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; padding-top: 12px; padding-bottom: 8px; }
.brand { font-weight: 800; font-size: 20px; color: var(--fg); text-decoration: none; }
.cats { display: flex; gap: 6px; overflow-x: auto; white-space: nowrap; max-width: 100%; padding-bottom: 4px; }
.cats a { font-size: 14px; color: var(--muted); text-decoration: none; padding: 2px 8px; border-radius: 999px; }
.cats a.on, .cats a:hover { color: var(--accent); background: var(--accent-soft); }

main.wrap { padding-top: 24px; padding-bottom: 40px; min-height: 60vh; }
.list-title { font-size: 22px; margin: 0 0 16px; }
.grid { display: grid; gap: 14px; }
.card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card); }
.card a { display: flex; gap: 14px; color: inherit; text-decoration: none; }
.card img { width: 160px; height: 120px; object-fit: cover; flex: none; }
.card-body { padding: 12px 14px 12px 0; min-width: 0; }
.card a:not(:has(img)) .card-body { padding-left: 14px; }
.card h2 { font-size: 17px; line-height: 1.45; margin: 2px 0 4px; }
.card p { margin: 0 0 4px; font-size: 14px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card time, .cat { font-size: 12px; color: var(--muted); }
.cat { color: var(--accent); font-weight: 600; }
@media (max-width: 560px) {
  .card a { flex-direction: column; gap: 0; }
  .card img { width: 100%; height: 180px; }
  .card-body, .card a:not(:has(img)) .card-body { padding: 12px 14px; }
}
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; font-size: 14px; }

.post h1 { font-size: 26px; line-height: 1.4; margin: 4px 0 6px; }
.crumb, .meta { font-size: 13px; color: var(--muted); margin: 0; }
.crumb a { color: var(--muted); }
.content { margin-top: 20px; font-size: 17px; }
.content h2 { font-size: 21px; margin: 36px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.content h3 { font-size: 18px; margin: 28px 0 8px; }
.content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-size: 15px; }
.content th, .content td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; }
.content th { background: var(--accent-soft); }
.content blockquote { margin: 16px 0; padding: 8px 16px; border-left: 4px solid var(--accent); background: var(--accent-soft); }
.content figure { margin: 20px 0; }
.content img { border-radius: 8px; }
.related { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line); }
.related h2 { font-size: 17px; }
.related ul { padding-left: 18px; }

.foot { border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.foot .wrap { padding-top: 16px; padding-bottom: 24px; }
.foot a { color: var(--muted); }
