/* 뉴스 세줄요약 — 티스토리 '심플 뉴스' 스킨과 같은 느낌: 흰 바탕 · Pretendard 고딕 · 강조색 하나, 한 줄(760px) 목록과 읽기 편한 글 */
:root {
  --accent: #2563eb;
  --bg: #ffffff;
  --ink: #111827;
  --text: #1f2937;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --line2: #d1d5db;
  --soft: #f5f6f8;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 16px/1.7 var(--font); word-break: keep-all; overflow-wrap: anywhere; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
img { max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(760px, 100%); margin: 0 auto; padding-left: 20px; padding-right: 20px; }

/* 위: 블로그 이름 · 검색 · 카테고리 줄 */
.hd { border-bottom: 1px solid var(--line); background: var(--bg); }
.hd-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { font-size: 20px; font-weight: 800; letter-spacing: -.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { display: flex; align-items: center; width: min(260px, 50vw); height: 38px; padding: 0 4px 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); }
.search:focus-within { border-color: var(--accent); background: var(--bg); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 14.5px var(--font); color: var(--ink); }
.search input::-webkit-search-cancel-button { display: none; }
.search button { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.search button:hover { color: var(--accent); }
.cats { border-top: 1px solid var(--line); }
.cats-in { display: flex; align-items: center; gap: 4px; height: 46px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
.cats-in::-webkit-scrollbar { display: none; }
.cat { flex: none; padding: 6px 12px; border-radius: 999px; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.cat:hover { color: var(--ink); background: var(--soft); }
.cat.on { color: var(--bg); background: var(--ink); }

/* 목록 */
.main { flex: 1; width: min(760px, 100%); padding-top: 24px; padding-bottom: 48px; }
.list-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.list-title { font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: var(--ink); }
.list-count { color: var(--faint); font-size: 14px; }
.item { border-bottom: 1px solid var(--line); }
.item-link { display: flex; align-items: flex-start; gap: 18px; padding: 20px 0; }
.item-text { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.item-title { color: var(--ink); font-size: 18px; font-weight: 700; line-height: 1.45; letter-spacing: -.3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-link:hover .item-title { color: var(--accent); }
.item-sum { color: var(--muted); font-size: 14.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-sum:empty { display: none; }
.item-meta { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 13px; }
.item-cat { color: var(--accent); font-weight: 600; }
.item-cat + time::before { content: "·"; margin-right: 8px; color: var(--line2); }
.item-thumb { flex: none; width: 132px; height: 88px; border-radius: 8px; object-fit: cover; background: var(--soft); }
.empty { padding: 48px 0; color: var(--muted); text-align: center; }
.home-link { color: var(--accent); font-weight: 700; }
.paging { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 32px; }
.pg { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.pg:hover { background: var(--soft); color: var(--ink); }
.pg.on { background: var(--soft); color: var(--accent); font-weight: 800; }
mark { background: #fff3bf; color: inherit; padding: 0 1px; }

/* 글 */
.post-head { padding-bottom: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.post-cat { display: inline-block; margin-bottom: 8px; color: var(--accent); font-size: 14px; font-weight: 700; }
.post-title { color: var(--ink); font-size: clamp(26px, 4vw, 34px); font-weight: 800; line-height: 1.35; letter-spacing: -.8px; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 12px; color: var(--faint); font-size: 14px; }
.post-meta .views { font-variant-numeric: tabular-nums; }
.editlink { padding: 1px 9px; border: 1px solid var(--line2); border-radius: 6px; color: var(--muted); font-size: 12.5px; }
.editlink:hover { color: var(--accent); border-color: var(--accent); }

/* 본문(글쓰기 화면으로 쓴 글: 사진 나란히 · 크기 · 설명, 구분선 5가지, 인용구 3가지, 글자 크기 · 정렬) */
.post-body { color: var(--text); font-size: 17px; line-height: 1.85; }
.post-body p { margin: 0 0 1.1em; }
.post-body h2, .post-body h3 { color: var(--ink); line-height: 1.45; letter-spacing: -.4px; margin: 1.8em 0 .6em; font-weight: 800; }
.post-body h2 { font-size: 24px; }
.post-body h3 { font-size: 20px; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-body strong { color: var(--ink); }
.post-body ul, .post-body ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li { margin: .25em 0; }
.post-body img { border-radius: 8px; }
.post-body figure { margin: 1.6em auto; }
.post-body .pics.w-s { max-width: 50%; }
.post-body .pics.w-m { max-width: 75%; }
.pics-row { display: flex; gap: 6px; }
.pics-row + .pics-row { margin-top: 6px; }
.post-body .pics-row img { min-width: 0; width: 100%; height: auto; margin: 0; }
.post-body figcaption { margin-top: 8px; color: var(--faint); font-size: 13.5px; line-height: 1.5; text-align: center; }
.post-body blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.post-body blockquote.q-mark { margin: 1.8em auto; padding: 10px 0; max-width: 34em; border: 0; text-align: center; color: var(--ink); font-size: 19px; }
.post-body blockquote.q-mark::before { content: "\201C"; display: block; height: 28px; color: var(--line2); font: 52px/1 Georgia, serif; }
.post-body blockquote.q-box { padding: 16px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--text); }
.post-body blockquote p:last-of-type { margin-bottom: 0; }
.post-body blockquote cite { display: block; margin-top: 8px; color: var(--faint); font-size: 13.5px; font-style: normal; }
.post-body blockquote cite::before { content: "— "; }
.post-body hr { margin: 2em auto; border: 0; }
.post-body hr:not([class]), .post-body hr.d-line { border-top: 1px solid var(--line2); }
.post-body hr.d-dash { border-top: 1px dashed var(--line2); }
.post-body hr.d-short { width: 56px; border-top: 2px solid var(--ink); }
.post-body hr.d-bold { border-top: 3px solid var(--ink); }
.post-body hr.d-dots { height: 1.4em; text-align: center; overflow: visible; }
.post-body hr.d-dots::after { content: "· · ·"; color: var(--faint); font-size: 22px; letter-spacing: 6px; line-height: 1; }
.post-body .fs-s { font-size: .85rem; }
.post-body .fs-l { font-size: 1.25rem; }
.post-body .fs-xl { font-size: 1.6rem; line-height: 1.5; }
.post-body .ta-c { text-align: center; }
.post-body .ta-r { text-align: right; }
.post-body table { width: 100%; margin: 1.4em 0; border-collapse: collapse; font-size: 15px; }
.post-body th, .post-body td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.post-body th { background: var(--soft); font-weight: 700; white-space: nowrap; }
.terms .post-body { font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.terms .post-body h3 { margin: 18px 0 4px; font-size: 14px; }
.terms .post-body p { margin: 0 0 4px; }
.terms .post-body table { font-size: 13px; }
.terms .post-body th, .terms .post-body td { padding: 5px 8px; }

/* 글 아래: 궁금한 점 · 이전/다음 · 같은 카테고리 */
.ask { margin-top: 28px; }
.ask a { display: inline-block; padding: 10px 16px; border: 1px solid var(--line2); border-radius: 10px; color: var(--ink); font-size: 14.5px; font-weight: 600; }
.ask a:hover { border-color: var(--accent); color: var(--accent); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 32px; }
.post-nav a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; }
.post-nav a:hover { border-color: var(--accent); }
.post-nav span { color: var(--faint); font-size: 12.5px; }
.post-nav strong { color: var(--ink); font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nav-next { grid-column: 2; text-align: right; }
.sec-title { margin-bottom: 10px; color: var(--ink); font-size: 18px; font-weight: 800; letter-spacing: -.3px; }
.related { margin-top: 40px; }
.related-list li { border-bottom: 1px solid var(--line); }
.related-list a { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; font-size: 15.5px; }
.related-list a:hover .rel-title { color: var(--accent); }
.related-list time { flex: none; color: var(--faint); font-size: 13px; }

/* 아래: 많이 본 글 · 바닥글 */
.popular-in { padding-top: 28px; padding-bottom: 32px; border-top: 1px solid var(--line); }
.popular-list { counter-reset: pop; display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.popular-list li { counter-increment: pop; border-bottom: 1px solid var(--line); }
.popular-list a { display: flex; gap: 12px; padding: 12px 0; font-size: 15px; line-height: 1.5; }
.popular-list a::before { content: counter(pop); flex: none; width: 18px; color: var(--accent); font-weight: 800; }
.popular-list a:hover { color: var(--accent); }
.ft { border-top: 1px solid var(--line); background: var(--soft); }
.ft-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding-top: 20px; padding-bottom: 28px; color: var(--faint); font-size: 13.5px; }
.ft-links { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ft-links a:hover { color: var(--ink); }

/* 폰 */
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .hd-in { height: 56px; gap: 10px; }
  .logo { font-size: 18px; }
  .search { width: 46vw; height: 36px; padding-left: 12px; }
  .cats-in { height: 44px; }
  .main { padding-top: 16px; }
  .item-link { gap: 14px; padding: 16px 0; }
  .item-title { font-size: 16.5px; }
  .item-sum { -webkit-line-clamp: 1; font-size: 14px; }
  .item-thumb { width: 96px; height: 72px; }
  .post-body { font-size: 16.5px; }
  .post-body .pics.w-s { max-width: 80%; }
  .post-body .pics.w-m { max-width: none; }
  .post-nav { grid-template-columns: 1fr; }
  .nav-next { grid-column: auto; text-align: left; }
  .popular-list { grid-template-columns: 1fr; }
}
