/* 문서 사이트 스타일 티스토리 스킨의 전체 스타일 (토큰·레이아웃·컴포넌트·반응형) */

/* ===== 디자인 토큰 ===== */
:root {
  --accent: #E8572A;
  --accent-soft: #FBF4F3;
  --text: #1F1F1F;
  --text-2: #4A4A4A;
  --muted: #6B6B6B;
  --faint: #9A9A9A;
  --border: #ECECEC;
  --bg: #FFFFFF;
  --bg-hover: #F7F7F7;
  --radius: 12px;
  --header-h: 72px;
  --tab-h: 52px;
  --sidebar-w: 280px;
  --rail-w: 200px;
  --content-max: 960px;
  --font: "Pretendard", "Inter", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
}

/* ===== 리셋 ===== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--tab-h) + 16px); }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
.blind { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ===== 공통 버튼 ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: 10px; font-size: 15px; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn-outline { border: 1px solid var(--border); background: var(--bg); color: var(--text-2); }
.btn-outline:hover { background: var(--bg-hover); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-icon { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; color: var(--text-2); }
.btn-icon:hover { background: var(--bg-hover); }

/* ===== 헤더 ===== */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; gap: 12px; height: var(--header-h); padding: 0 40px; }
.logo { display: flex; align-items: center; gap: 8px; min-width: 0; width: calc(var(--sidebar-w) + 160px); flex-shrink: 0; }
.logo-mark { color: var(--text); flex-shrink: 0; }
.logo-img { height: 32px; width: auto; }
.logo-text { font-size: 24px; font-weight: 700; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.header-search { flex: 1; max-width: 540px; }
.header-search { position: relative; display: flex; align-items: center; height: 44px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); transition: border-color .15s, box-shadow .15s; }
.header-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.ico-search { position: absolute; left: 14px; color: var(--faint); pointer-events: none; }
.header-search input { width: 100%; height: 100%; padding: 0 90px 0 42px; border: 0; background: none; outline: none; font-size: 16px; }
.header-search input::placeholder { color: var(--muted); }
.kbd-group { position: absolute; right: 8px; display: flex; gap: 4px; }
.kbd-group kbd { padding: 1px 6px; border: 1px solid var(--border); border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); background: var(--bg); }
.header-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* ===== 탭 메뉴 ([##_blog_menu_##]) ===== */
.tab-menu { padding: 0 40px; overflow-x: auto; scrollbar-width: none; }
.tab-menu::-webkit-scrollbar { display: none; }
.tab-menu ul { display: flex; gap: 32px; height: var(--tab-h); }
.tab-menu li { display: flex; flex-shrink: 0; }
.tab-menu a { position: relative; display: flex; align-items: center; color: var(--text-2); font-size: 16px; white-space: nowrap; }
.tab-menu a:hover { color: var(--text); }
.tab-menu a.is-active { color: var(--accent); font-weight: 500; }
.tab-menu a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); border-radius: 2px; }

/* ===== 3단 레이아웃 ===== */
.layout { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--rail-w); gap: 64px; max-width: 1600px; margin: 0 auto; padding: 0 40px; }
.content { width: 100%; max-width: var(--content-max); padding: 40px 0 80px; min-width: 0; }
.rail { padding-top: 40px; }

/* 글 상세: 본문 폭 최대화 (사이드바·목차 폭을 화면에 비례, 본문 최대폭 해제) */
#tt-body-page { --sidebar-w: clamp(220px, 16vw, 280px); --rail-w: clamp(160px, 12vw, 220px); }
#tt-body-page .layout { gap: 40px; max-width: 1800px; padding: 0 32px; }
#tt-body-page .content { max-width: none; }
/* 글 본문에 붙여넣은 <style>의 body 규칙(max-width·margin 등)이 페이지 전체를 줄이지 않도록 */
body#tt-body-page { max-width: none; width: auto; margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.6; }
/* ===== 좌측 사이드바 ===== */
.sidebar { position: sticky; top: calc(var(--header-h) + var(--tab-h) + 1px); align-self: start; height: calc(100vh - var(--header-h) - var(--tab-h) - 1px); overflow-y: auto; padding: 40px 0; scrollbar-width: thin; }
.sidebar-inner { border-left: 1px solid var(--border); }
.side-box { margin-top: 32px; padding-left: 16px; }
.side-label { margin-bottom: 8px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.side-list li a { display: block; padding: 6px 0; font-size: 15px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-list li a:hover { color: var(--accent); }
.side-meta { font-size: 13px; color: var(--faint); }
.side-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.side-tags a { padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; color: var(--muted); }
.side-tags a:hover { border-color: var(--accent); color: var(--accent); }
.side-count { display: flex; gap: 20px; }
.side-count dt { font-size: 12px; color: var(--faint); }
.side-count dd { font-size: 15px; font-weight: 600; }

/* 카테고리 ([##_category_list_##] 출력: .tt_category > li > .link_tit + .category_list > li > .link_item + .sub_category_list) */
.side-category .tt_category > li > .link_tit { display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 15px; color: var(--text-2); }
.side-category .category_list > li { margin-top: 4px; }
.side-category a { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 16px; font-size: 16px; color: var(--text-2); transition: color .15s; }
.side-category a::before { content: ""; flex-shrink: 0; width: 16px; height: 16px; border-radius: 4px; background: #D6D6D6; -webkit-mask: var(--ico-doc) center / contain no-repeat; mask: var(--ico-doc) center / contain no-repeat; }
.side-category a:hover { color: var(--text); }
.side-category a:hover::before { background: var(--muted); }
.side-category .c_cnt { margin-left: auto; font-size: 12px; color: var(--faint); }
.side-category .c_cnt::before { content: ""; }
/* 하위 분류가 있는 1차 카테고리 → 섹션 라벨 */
.side-category .category_list > li:has(> .sub_category_list) { margin-top: 28px; }
.side-category .category_list > li:has(> .sub_category_list) > .link_item { padding-top: 0; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.side-category .category_list > li:has(> .sub_category_list) > .link_item::before { display: none; }
/* 현재 위치 */
.side-category a.is-active { color: var(--accent); font-weight: 500; }
.side-category a.is-active::before { background: var(--accent); }
.side-category a.is-active::after { content: ""; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 2px; background: var(--accent); border-radius: 2px; }
:root { --ico-doc: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 1h7l3 3v10a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1Z'/%3E%3C/svg%3E"); }

/* ===== 페이지 헤드 (eyebrow + 제목 + 리드) ===== */
.page-head { margin-bottom: 32px; }
.eyebrow { margin-bottom: 8px; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.eyebrow a:hover { color: var(--accent); }
.page-title { margin: 0; color: var(--text); font-size: 40px; font-weight: 700; line-height: 1.25; letter-spacing: -.025em; word-break: keep-all; }
.page-lead { margin-top: 16px; font-size: 20px; line-height: 1.7; color: var(--muted); word-break: keep-all; }
.page-lead:empty { display: none; }
.home-head { display: none; }
#tt-body-index .home-head { display: block; }
.section-title { margin-bottom: 16px; font-size: 20px; font-weight: 700; }

/* ===== 홈커버 ===== */
.cover-wrap { display: flex; flex-wrap: wrap; gap: 20px; }
.cover { width: 100%; }
.cover-cards { margin-bottom: 28px; }
.cover-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.cover-title { font-size: 20px; font-weight: 700; }
.cover-title:empty { display: none; }
.cover-more { font-size: 14px; color: var(--muted); }
.cover-more:hover { color: var(--accent); }

.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); transition: border-color .2s, box-shadow .2s; }
.card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: 0 6px 20px rgba(0,0,0,.05); }
.card-thumb { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: var(--accent-soft); background: color-mix(in srgb, var(--accent) 6%, #fff); overflow: hidden; }
.card-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.card-icon { width: 88px; height: 88px; color: var(--accent); }
.card-body { padding: 24px 20px 32px; }
.card-title { display: block; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.card-desc { margin-top: 12px; font-size: 16px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.cover-links { width: calc((100% - 40px) / 3); padding: 20px 20px 24px; border: 1px solid var(--border); border-radius: var(--radius); }
.links-title { margin-bottom: 12px; font-size: 17px; font-weight: 700; }
.links-list li { position: relative; padding: 6px 0 6px 22px; }
.links-list li::before { content: ""; position: absolute; left: 6px; top: 50%; width: 5px; height: 5px; margin-top: -2px; border-radius: 50%; background: var(--text-2); }
.links-list a { font-size: 16px; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: #BDBDBD; }
.links-list a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ===== 글 목록 (카드형 행) ===== */
.post-list { display: flex; flex-direction: column; gap: 16px; }
.post-item { display: flex; gap: 24px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s; }
#tt-body-index .content > .post-item, .content > .post-item { margin-bottom: 16px; }
.post-item:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); box-shadow: 0 6px 20px rgba(0,0,0,.05); }
.post-item-body { flex: 1; min-width: 0; }
.post-item-cate { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.post-item-title { display: block; margin-top: 4px; font-size: 20px; font-weight: 700; line-height: 1.4; word-break: keep-all; }
.post-item-summary { margin-top: 8px; font-size: 15px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.post-item-meta { display: block; margin-top: 12px; font-size: 13px; color: var(--faint); }
.post-item-thumb { flex-shrink: 0; width: 160px; aspect-ratio: 4 / 3; border-radius: 8px; overflow: hidden; background: var(--accent-soft); }
.post-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }
/* 목록 표시를 "목록+내용"으로 설정하면 같은 글이 목록·내용 카드로 두 번 나오므로, 목록이 있을 때는 내용 카드를 숨김 */
.content > .list-area ~ .post-item { display: none; }
/* 홈에서는 상단 소개(WELCOME)와 겹치는 목록 머리말 숨김 */
#tt-body-index .list-area .page-head { display: none; }

/* ===== 글 상세 ===== */
.post-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.post-head .btn-copy { flex-shrink: 0; margin-top: 2px; }
.btn-copy.is-done { color: var(--accent); border-color: var(--accent); }
.post-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 16px 0 40px; font-size: 14px; color: var(--faint); }
.post-meta:empty { display: none; }
.post-admin a { margin-left: 6px; color: var(--muted); }

/* 대표 이미지(썸네일) */
.post-thumb { margin: -16px 0 40px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--accent-soft); }
.post-thumb img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; }
.post-thumb.is-hidden { display: none; }
/* 이미지 주소가 비어 있으면 깨진 이미지 칸이 생기지 않도록 숨김 */
.post-thumb:has(img[src=""]), .post-item-thumb:has(img[src=""]) { display: none; }
.post-admin a:hover { color: var(--accent); }

/* 본문 타이포그래피 */
.entry-content { font-size: 17px; line-height: 1.85; color: var(--text); word-break: break-word; overflow-wrap: anywhere; }
/* 티스토리 본문 래퍼·미디어가 폭을 줄이거나 화면 밖으로 넘치지 않도록 */
.entry-content .tt_article_useless_p_margin, .entry-content .contents_style { width: 100%; max-width: none; }
.entry-content figure { max-width: 100%; margin-left: 0; margin-right: 0; }
.entry-content iframe, .entry-content video, .entry-content embed { max-width: 100%; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content h2 { margin: 2.2em 0 .8em; font-size: 28px; line-height: 1.35; letter-spacing: -.02em; }
.entry-content h3 { margin: 1.8em 0 .6em; font-size: 22px; line-height: 1.4; }
.entry-content h4 { margin: 1.6em 0 .5em; font-size: 18px; }
.entry-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin: .3em 0; }
.entry-content blockquote { margin: 1.5em 0; padding: 4px 20px; border-left: 3px solid var(--accent); color: var(--text-2); background: var(--accent-soft); border-radius: 0 8px 8px 0; }
.entry-content code { padding: 2px 6px; border-radius: 6px; background: #F3F3F3; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
.entry-content pre { margin: 1.5em 0; padding: 18px 20px; border-radius: var(--radius); background: #1E1E1E; color: #EDEDED; overflow-x: auto; font-size: 14px; line-height: 1.7; }
.entry-content pre code { padding: 0; background: none; color: inherit; }
.entry-content table { width: 100%; margin: 1.5em 0; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { padding: 10px 12px; border: 1px solid var(--border); }
.entry-content th { background: #FAFAFA; }
.entry-content img { border-radius: 8px; }
.entry-content hr { margin: 2.5em 0; border: 0; border-top: 1px solid var(--border); }

.post-tags { margin-top: 48px; font-size: 0; }
.post-tags a { display: inline-block; margin: 0 6px 6px 0; padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; font-size: 13px; color: var(--muted); }
.post-tags a::before { content: "#"; }
.post-tags a:hover { border-color: var(--accent); color: var(--accent); }

/* 이전 / 다음 글 */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.post-nav-item { position: relative; display: block; padding: 20px 52px 20px 20px; border: 1px solid var(--border); border-radius: var(--radius); transition: border-color .2s; }
.post-nav-item:hover { border-color: var(--accent); }
.post-nav-item.next { grid-column: 2; text-align: left; }
.post-nav-item.prev { grid-column: 1; }
.post-nav-label { display: block; font-size: 13px; color: var(--faint); }
.post-nav-title { display: block; margin-top: 4px; font-size: 17px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-nav-arrow { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.updated { margin-top: 32px; font-size: 15px; color: var(--muted); }

/* 관련 글 */
.related { margin-top: 56px; }
.related-list { border-top: 1px solid var(--border); }
.related-list a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.related-list strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.related-list span { flex-shrink: 0; font-size: 13px; color: var(--faint); }
.related-list a:hover strong { color: var(--accent); }

/* 댓글 / 방명록 (티스토리 기본 위젯 색상 보정) */
.comments { margin-top: 56px; }
.comments:not(:has(*)) { display: none; }
.guestbook .tt-btn_register, .comments .tt-btn_register { background: var(--accent) !important; border-color: var(--accent) !important; color: #fff !important; }

/* 보호글 */
.protected-box { margin-top: 24px; padding: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--accent-soft); color: var(--text-2); }
.protected-form { display: flex; gap: 8px; margin-top: 16px; }
.protected-form input { flex: 1; max-width: 280px; height: 40px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; outline: none; }
.protected-form input:focus { border-color: var(--accent); }

/* 태그 클라우드 */
.tag-cloud-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud-list a { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-2); }
.tag-cloud-list a:hover { border-color: var(--accent); color: var(--accent); }
.tag-cloud-list .cloud1 { font-size: 20px; font-weight: 700; color: var(--accent); }
.tag-cloud-list .cloud2 { font-size: 18px; font-weight: 600; }
.tag-cloud-list .cloud3 { font-size: 16px; }
.tag-cloud-list .cloud4, .tag-cloud-list .cloud5 { font-size: 14px; color: var(--muted); }

/* ===== 페이징 ===== */
.paging { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 48px; }
.paging-nums { display: flex; gap: 4px; }
.paging a { display: flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 8px; font-size: 15px; color: var(--text-2); }
.paging a:hover { background: var(--bg-hover); }
.paging .selected, .paging .paging-num:has(.selected) { background: var(--accent); color: #fff; }
.paging .no-more-prev, .paging .no-more-next { opacity: .3; pointer-events: none; }
#tt-body-page .paging { display: none; }

/* ===== 우측 레일: 목차 ===== */
.toc { position: sticky; top: calc(var(--header-h) + var(--tab-h) + 40px); max-height: calc(100vh - var(--header-h) - var(--tab-h) - 80px); overflow-y: auto; scrollbar-width: thin; }
.toc-label { margin-bottom: 12px; font-size: 15px; color: var(--text-2); }
.toc-list { border-left: 1px solid var(--border); }
.toc-list a { display: block; margin-left: -1px; padding: 5px 0 5px 14px; border-left: 2px solid transparent; font-size: 14px; color: var(--muted); line-height: 1.45; }
.toc-list .toc-h3 a { padding-left: 26px; font-size: 13px; }
.toc-list a:hover { color: var(--text); }
.toc-list a.is-active { border-left-color: var(--accent); color: var(--accent); }

/* ===== 푸터 ===== */
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 28px 40px; border-top: 1px solid var(--border); font-size: 14px; color: var(--faint); }
.site-footer a:hover { color: var(--accent); }
.dim { display: none; }

/* ===== 반응형 ===== */
@media (max-width: 1440px) {
  .logo { width: calc(var(--sidebar-w) + 40px); }
  .layout { gap: 48px; }
}

/* 태블릿 가로: 우측 레일 숨김 */
@media (max-width: 1279px) {
  .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .rail { display: none; }
}

/* 글 상세: 데스크톱(1200px 이상)에서만 목차 표시, 태블릿·모바일에서는 숨김 */
@media (min-width: 1200px) {
  #tt-body-page .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--rail-w); }
  #tt-body-page .rail { display: block; }
}
@media (max-width: 1199px) {
  #tt-body-page .layout { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  #tt-body-page .rail { display: none; }
}

/* 태블릿 세로 이하: 사이드바 오프캔버스 */
@media (max-width: 1023px) {
  :root { --header-h: 60px; --tab-h: 48px; }
  .header-inner { padding: 0 16px; gap: 8px; }
  .tab-menu { padding: 0 16px; }
  .tab-menu ul { gap: 24px; }
  .btn-menu { display: inline-flex; }
  .logo { width: auto; }
  .logo-text { font-size: 20px; }
  .header-search { margin-left: auto; }
  .btn-write { display: none; }
  .header-right { margin-left: 0; }

  .layout, #tt-body-page .layout { display: block; padding: 0 20px; }
  .sidebar { position: fixed; top: 0; left: 0; bottom: 0; z-index: 70; width: min(300px, 85vw); height: 100%; padding: 24px 16px; background: var(--bg); box-shadow: 0 0 40px rgba(0,0,0,.12); transform: translateX(-105%); transition: transform .25s ease; }
  .sidebar-open .sidebar { transform: none; }
  .sidebar-open .dim { display: block; position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.3); }
  .sidebar-open { overflow: hidden; }
  .content { margin: 0 auto; padding: 32px 0 64px; }
  .site-footer { padding: 24px; }
  .cover-links { width: calc((100% - 20px) / 2); }
}

/* 모바일 */
@media (max-width: 639px) {
  .layout, #tt-body-page .layout { padding: 0 16px; }
  .header-search { display: none; position: absolute; left: 16px; right: 16px; top: calc(var(--header-h) - 4px); max-width: none; z-index: 5; box-shadow: 0 8px 24px rgba(0,0,0,.08); }
  .search-open .header-search { display: flex; }
  .kbd-group { display: none; }
  .header-search input { padding-right: 16px; }
  .btn-search-toggle { display: inline-flex; }
  .header-right { margin-left: auto; }
  .header-right .btn { height: 36px; padding: 0 12px; font-size: 14px; }

  .page-title { font-size: 30px; }
  .page-lead { font-size: 17px; }
  .card-grid { grid-template-columns: 1fr; gap: 16px; }
  .card-icon { width: 64px; height: 64px; }
  .card-body { padding: 20px 18px 24px; }
  .card-title { font-size: 20px; }
  .cover-links { width: 100%; }

  .post-item { gap: 16px; padding: 18px; }
  .post-item-thumb { width: 88px; }
  .post-item-title { font-size: 17px; }
  .post-item-summary { -webkit-line-clamp: 2; font-size: 14px; }

  .post-head { flex-direction: column; }
  .post-head .btn-copy { display: none; }
  .post-thumb { margin: -8px 0 28px; border-radius: 10px; }
  .post-thumb img { max-height: 320px; }
  .entry-content { font-size: 16px; }
  .entry-content h2 { font-size: 23px; }
  .entry-content h3 { font-size: 19px; }
  .post-nav { grid-template-columns: 1fr; }
  .post-nav-item.next, .post-nav-item.prev { grid-column: auto; }
  .protected-form { flex-direction: column; }
  .protected-form input { max-width: none; }
  .site-footer { flex-direction: column; gap: 4px; padding: 20px 16px; }
}
