/* 심플 뉴스 스킨 — 흰 바탕 · Pretendard 고딕 · 강조색 하나(스킨 옵션 '강조 색'). 한 줄(760px) 목록과 읽기 편한 글 */
:root {
  --accent: #2563eb;
  --bg: #ffffff;
  --ink: #111827;
  --text: #1f2937;
  --muted: #6b7280;
  --faint: #9ca3af;
  --line: #e5e7eb;
  --soft: #f5f6f8;
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; 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; }
img { max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
.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; }
.cats-in ul { display: contents; }
.cats-in li { display: contents; }
.cats-in .link_tit, .cats-in .c_cnt, .cats-in .sub_category_list { display: none; }
.cat-all, .cats-in .link_item { flex: none; padding: 6px 12px; border-radius: 999px; color: var(--muted); font-size: 14.5px; font-weight: 600; }
.cat-all:hover, .cats-in .link_item:hover { color: var(--ink); background: var(--soft); }
.cats-in a.on { color: var(--bg); background: var(--ink); } /* 지금 보는 카테고리(skin.html 아래 작은 스크립트가 표시) */

/* 목록 */
.main { padding-top: 24px; padding-bottom: 48px; min-height: 60vh; }
.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-title:empty, .list-title:empty + .list-count { display: none; }
.list-count { color: var(--faint); font-size: 14px; }
.list-count::before { content: "글 "; }
.items { margin: 0; }
.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:empty { display: none; }
.item-cat:not(:empty) + time::before { content: "·"; margin-right: 8px; color: var(--line); }
.item-thumb { flex: none; width: 132px; height: 88px; border-radius: 8px; object-fit: cover; background: var(--soft); }
.no-thumb .item-thumb { display: none; }
.badge { display: inline-block; margin-right: 8px; padding: 1px 7px; border-radius: 5px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 700; vertical-align: 2px; }
.empty { padding: 48px 0; color: var(--muted); text-align: center; }

/* 쪽 번호 */
.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 .selected { color: var(--accent); font-weight: 800; }
.pg-num:has(.selected) { background: var(--soft); }
.no-more-prev, .no-more-next { opacity: .3; pointer-events: none; }

/* 글 */
.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: 12px; margin-top: 12px; color: var(--faint); font-size: 14px; }
.post-admin { display: inline-flex; gap: 10px; }
.post-admin a { color: var(--muted); }
.post-admin a:hover { color: var(--accent); }

/* 본문(티스토리 편집기 글) */
.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, .post-body h4 { 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 h4 { font-size: 18px; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-body strong, .post-body b { 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 figure { margin: 1.6em 0; }
.post-body figure img, .post-body .imageblock img { border-radius: 8px; }
.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[data-ke-style="style1"] { padding: 10px 0; border: 0; text-align: center; color: var(--ink); font-size: 19px; }
.post-body blockquote[data-ke-style="style1"]::before { content: "\201C"; display: block; height: 28px; color: var(--line); font: 52px/1 Georgia, serif; }
.post-body blockquote[data-ke-style="style3"] { padding: 16px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); color: var(--text); }
.post-body hr { margin: 2em auto; border: 0; border-top: 1px solid var(--line); }
.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; }
.post-body pre { overflow-x: auto; padding: 14px 16px; border-radius: 10px; background: #0f172a; color: #e5e7eb; font-size: 14px; line-height: 1.6; }
.post-body code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .9em; }
.post-body :not(pre) > code { padding: 2px 6px; border-radius: 5px; background: var(--soft); color: #be123c; }
.post-body iframe { max-width: 100%; }
.post-body [data-ke-type="video"], .post-body figure[data-ke-type="opengraph"] { max-width: 100%; }
.post-body .revenue_unit_wrap, .revenue_unit_wrap { margin: 28px auto; }

/* 태그 · 이전/다음 · 같은 카테고리 · 댓글 */
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; font-size: 0; }
.post-tags a { padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 13.5px; }
.post-tags a::before { content: "#"; }
.post-tags a:hover { color: var(--accent); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 32px; }
.post-nav:empty { display: none; }
.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; }
.comments { margin-top: 44px; }
.another_category { margin-top: 32px; }

/* 보호글 · 방명록 · 태그 */
.protected-msg { margin: 8px 0 14px; color: var(--muted); }
.protected-input { width: 220px; height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; font: 15px var(--font); }
.guest .list-title, .tagcloud .list-title { margin-bottom: 16px; }
.tagcloud ul { display: flex; flex-wrap: wrap; gap: 8px; }
.tagcloud a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 14px; }
.tagcloud .cloud1 { color: var(--accent); font-weight: 800; }
.tagcloud .cloud2 { color: var(--ink); font-weight: 700; }

/* 아래: 많이 본 글 · 바닥글 */
.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, .ft-links ul { 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; margin: 0 -4px; }
  .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-nav { grid-template-columns: 1fr; }
  .nav-next { grid-column: auto; }
  .popular-list { grid-template-columns: 1fr; }
}
