/* 티스토리 ilutoo 스킨의 style.css 를 그대로 옮기고 'Jekyll 판' 주석이 붙은 곳만 바꿨다. 다시 옮겨 올 때 그곳을 살린다. Jekyll 전용 꾸밈은 jekyll.css 에 둔다. */
/* =========================================================
   ilutoo Journal - Tistory skin
   심플하고 잘 읽히는 개인 블로그 스킨
   ========================================================= */

:root {
  --accent-base: #f06a28;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-muted: #f2f4f6;
  --text: #191f28;
  --text-2: #333d4b;
  --text-3: #6b7684;
  --muted: #8b95a1;
  --line: #e5e8eb;
  --line-soft: #f2f4f6;
  --accent: var(--accent-base);
  --accent-soft: color-mix(in srgb, var(--accent-base) 10%, transparent);
  --header-bg: rgba(255, 255, 255, .88);
  --shadow: 0 2px 8px rgba(0, 0, 0, .06), 0 12px 32px rgba(0, 0, 0, .06);
  --sans: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'D2Coding', Consolas, monospace;
  --wrap: 1120px;
  --measure: 720px;
  --header-h: 60px;
  color-scheme: light;
  color-scheme: only light;
}

[data-theme="dark"] {
  --bg: #101214;
  --bg-soft: #17191c;
  --bg-muted: #1f2226;
  --text: #f2f4f6;
  --text-2: #d1d6db;
  --text-3: #a3abb5;
  --muted: #8b95a1;
  --line: #2c3035;
  --line-soft: #1f2226;
  --accent: color-mix(in srgb, var(--accent-base) 72%, #ffffff);
  --accent-soft: color-mix(in srgb, var(--accent-base) 20%, transparent);
  --header-bg: rgba(16, 18, 20, .86);
  --shadow: 0 2px 8px rgba(0, 0, 0, .3), 0 12px 32px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s ease, color .2s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 300;
  padding: 8px 14px; border-radius: 8px; background: var(--text); color: var(--bg);
}
.skip-link:focus { top: 12px; }

.read-progress {
  position: fixed; top: 0; left: 0; z-index: 210;
  height: 3px; width: 0; background: var(--accent);
}

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner {
  max-width: var(--wrap); height: var(--header-h);
  margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; gap: 8px;
}
.brand { font-weight: 700; font-size: 19px; letter-spacing: -.02em; white-space: nowrap; margin-right: 16px; }
.gnb { flex: 1; min-width: 0; }
.gnb ul { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.gnb ul::-webkit-scrollbar { display: none; }
.gnb li a {
  display: block; padding: 8px 12px; border-radius: 8px;
  font-size: 15px; font-weight: 500; color: var(--text-3); white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.gnb li a:hover { background: var(--bg-muted); color: var(--text); }
.gnb li a.is-current { color: var(--text); font-weight: 700; }
.header-tools { display: flex; gap: 2px; margin-left: auto; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px;
  background: transparent; cursor: pointer; color: var(--text-3);
  transition: background-color .15s ease, color .15s ease;
}
.icon-btn:hover { background: var(--bg-muted); color: var(--text); }
#drawerOpen { margin-left: -10px; }
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: block; }
[data-theme="dark"] .i-moon { display: none; }

/* ---------- 검색 ---------- */
.search-layer {
  position: fixed; inset: 0; z-index: 220;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 16vh 16px 0;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility .2s;
}
.search-layer.is-open { opacity: 1; visibility: visible; }
.search-inner { width: 100%; max-width: 600px; text-align: center; }
.search-box {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 6px 6px 18px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--bg); box-shadow: var(--shadow); color: var(--muted);
}
.search-box input {
  flex: 1; min-width: 0; padding: 12px 0; border: 0; outline: 0;
  background: transparent; color: var(--text); font: inherit; font-size: 17px;
}
.search-submit {
  padding: 10px 18px; border: 0; border-radius: 10px;
  background: var(--accent); color: #fff; cursor: pointer; font-size: 15px; font-weight: 600;
}
.search-close {
  margin-top: 18px; padding: 6px 14px; border: 0; background: none;
  color: var(--muted); cursor: pointer; font-size: 14px;
}

/* ---------- 서랍 메뉴 ---------- */
.drawer-dim {
  position: fixed; inset: 0; z-index: 180; background: rgba(0, 0, 0, .4);
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s;
}
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 190;
  width: min(320px, 86vw); padding: 20px 20px 32px; overflow-y: auto;
  background: var(--bg); border-right: 1px solid var(--line);
  transform: translateX(-102%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
body.drawer-open .drawer { transform: none; }
body.drawer-open .drawer-dim { opacity: 1; visibility: visible; }
body.drawer-open { overflow: hidden; }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.profile { display: flex; align-items: center; gap: 12px; min-width: 0; }
.profile-img { width: 48px; height: 48px; flex: none; border-radius: 50%; object-fit: cover; background: var(--bg-muted); }
.profile-name { display: block; font-size: 16px; font-weight: 700; }
.profile-desc { margin: 2px 0 0; color: var(--text-3); font-size: 13px; line-height: 1.5; }
.drawer-menu ul { margin: 0 0 16px; padding: 0 0 16px; list-style: none; border-bottom: 1px solid var(--line); }
.drawer-menu li a { display: block; padding: 10px 8px; border-radius: 8px; font-size: 16px; font-weight: 600; }
.drawer-menu li a:hover { background: var(--bg-muted); }
.drawer-label { margin: 0 0 8px 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.drawer-section { padding-bottom: 16px; border-bottom: 1px solid var(--line); }

/* [##_category_list_##]: ul.tt_category > li > a.link_tit + ul.category_list > li > a.link_item + ul.sub_category_list */
.drawer-cat ul { margin: 0; padding: 0; list-style: none; }
.drawer-cat .tt_category > li > .link_tit { display: flex; justify-content: space-between; padding: 8px; border-radius: 8px; color: var(--text-2); font-size: 15px; }
.drawer-cat .link_item { display: flex; justify-content: space-between; padding: 8px; border-radius: 8px; font-size: 15px; font-weight: 600; }
.drawer-cat .sub_category_list { margin: 0 0 4px 12px !important; }
.drawer-cat .link_sub_item { display: flex; justify-content: space-between; padding: 6px 8px; border-radius: 8px; color: var(--text-3); font-size: 14.5px; }
.drawer-cat .c_cnt { margin-left: auto; padding-left: 8px; color: var(--muted); font-size: 12.5px; font-weight: 400; }
/* 티스토리가 새 글 카테고리에 넣는 12px N 그림은 flex 세 번째 칸이 되어 글 수를 가운데로 밀고 흐리게 늘어난다.
   그림은 숨기고 script.js가 이름 옆에 글자 배지를 넣는다 */
.drawer-cat .tt_category a { align-items: center; justify-content: flex-start; }
.drawer-cat .tt_category a > img { display: none; }
.drawer-cat .cat-new { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 16px; height: 16px; margin-left: 6px; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: 9.5px; font-weight: 700; line-height: 1; }
.drawer-cat a:hover { background: var(--bg-muted); color: var(--text); }
.drawer-links { display: flex; flex-wrap: wrap; gap: 4px 4px; padding-top: 14px; }
.drawer-links a { padding: 6px 8px; border-radius: 8px; font-size: 14px; color: var(--text-3); }
.drawer-links a:hover { background: var(--bg-muted); color: var(--text); }

/* ---------- 레이아웃 ---------- */
.site-main { max-width: calc(var(--measure) + 48px); margin: 0 auto; padding: 0 24px 80px; min-height: 60vh; }

/* ---------- 홈 커버 (잡지 표지처럼 큰 제목 + 최근 글 카드 띠) ---------- */
.cover { display: none; overflow: hidden; padding: 64px 0 28px; }
#tt-body-index .cover { display: block; }
body.is-paged .cover { display: none !important; }
.cover-head {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 32px;
}
.cover-title {
  margin: 0; font-size: clamp(64px, 11.5vw, 160px); font-weight: 900; line-height: .92; letter-spacing: -.055em;
  text-wrap: balance; /* 긴 이름은 두 줄로 고르게 나눔 */
}
.cover-desc { max-width: 320px; margin: 0 0 .7em; color: var(--text-3); font-size: 15px; line-height: 1.65; }

/* 최근 글 카드 띠: 두 줄이 반대 방향으로 흐름. 마우스를 올리면 멈춤 */
.cover-reel { width: 112%; margin: 48px 0 0 -6%; transform: rotate(-3deg); }
.cover-reel:not(.is-ready) { visibility: hidden; }
.cover-reel.is-empty { display: none; }
.reel-track {
  display: flex; gap: 14px; width: max-content; min-height: 244px; padding: 7px 0;
  will-change: transform; animation: reel-left 80s linear infinite;
}
.reel-track + .reel-track { animation-name: reel-right; }
/* 마우스를 올려도 멈추지 않고 천천히 흐른다(assets/skin/lb.js 가 속도를 낮춘다). 띠가 화면 아래를 넓게 차지해서
   마우스를 내려 보는 순간 멈춰 "안 움직인다"로 보였고, 휴대폰은 한 번 건드리면 :hover 가 남아 계속 멈췄다 (2026-12-05) */
@keyframes reel-left { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-50%, 0, 0); } }
@keyframes reel-right { from { transform: translate3d(-50%, 0, 0); } to { transform: translate3d(0, 0, 0); } }
.reel-item {
  position: relative; flex: none; display: flex; flex-direction: column;
  width: 184px; height: 230px; padding: 18px 16px; overflow: hidden; border-radius: 18px;
  background: var(--bg-soft); color: var(--text); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .25s ease;
}
.reel-item:hover { transform: translateY(-4px); }
.reel-item:nth-child(3n+2) { background: var(--text); color: var(--bg); box-shadow: none; }
.reel-item:nth-child(3n) { background: var(--accent); color: #fff; box-shadow: none; }
.reel-item.has-photo { padding: 0; background: var(--bg-muted); box-shadow: none; }
.reel-item img { width: 100%; height: 100%; object-fit: cover; }
.reel-cat { font-size: 12.5px; font-weight: 700; opacity: .7; }
.reel-title {
  margin-top: 10px; font-size: 18px; font-weight: 800; line-height: 1.38; letter-spacing: -.025em;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.reel-date { margin-top: auto; font-size: 12.5px; opacity: .6; }
.reel-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 14px 14px;
  color: #fff; font-size: 13.5px; font-weight: 700; line-height: 1.4;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6)); opacity: 0; transition: opacity .2s ease;
}
.reel-item:hover .reel-cap { opacity: 1; }

/* 홈 글 목록 머리(최근 글, 카테고리 칩), 일기장 목록, 다른 블로그는 아래 '2026-12 홈 글 목록' 절에 있다 */
.home-bar, .home-blogs { display: none; }

/* ---------- 목록 머리말 ---------- */
.list-head { padding: 56px 0 16px; }
#tt-body-index .list-head, #tt-body-index .list-rows, #tt-body-index .empty-note { display: none; }
.list-kicker { margin: 0 0 6px; color: var(--accent); font-size: 14px; font-weight: 600; }
.list-title { margin: 0; font-size: clamp(26px, 4vw, 34px); font-weight: 800; letter-spacing: -.03em; line-height: 1.3; }
.list-count { margin-left: 6px; color: var(--muted); font-size: .6em; font-weight: 600; vertical-align: middle; }
.list-desc { margin: 10px 0 0; color: var(--text-3); }
.list-desc:empty { display: none; }
.list-rows { margin: 8px 0 32px; padding: 0; list-style: none; }
.list-rows.is-hidden { display: none; }
.list-rows a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.list-rows a:hover .row-title { color: var(--accent); }
.row-date { flex: none; color: var(--muted); font-size: 14px; }
.empty-note { padding: 64px 0; text-align: center; color: var(--muted); }

/* ---------- 글 목록 ---------- */
.entries:not(:has(*)) { display: none; }
body:not(#tt-body-page) .entries { border-top: 1px solid var(--line-soft); }
body#tt-body-index .entries { border-top: 0; }

.card-link {
  display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 28px; align-items: center;
  padding: 28px 0; border-bottom: 1px solid var(--line-soft);
}
.card:not(:has(.card-media img)) .card-link { grid-template-columns: minmax(0, 1fr); }
.card-media { order: 2; width: 140px; aspect-ratio: 1; overflow: hidden; border-radius: 12px; background: var(--bg-muted); }
.card-media:not(:has(img)) { display: none; }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card-link:hover .card-media img { transform: scale(1.04); }
.card-body { min-width: 0; }
.card-meta { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13.5px; color: var(--muted); }
.card-cat { color: var(--accent); font-weight: 600; }
.card-cat:not(:empty)::after { content: ""; display: inline-block; width: 2px; height: 2px; margin-left: 8px; vertical-align: middle; border-radius: 50%; background: var(--muted); }
.card-title {
  margin: 0; font-size: 20px; font-weight: 700; line-height: 1.45; letter-spacing: -.02em; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  transition: color .15s ease;
}
.card-link:hover .card-title { color: var(--accent); }
.card-summary {
  margin: 8px 0 0; color: var(--text-3); font-size: 15px; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 보호글 ---------- */
.protected { padding: 28px 0; border-bottom: 1px solid var(--line-soft); }
#tt-body-page .protected { margin: 72px auto; padding: 40px 24px; border: 1px solid var(--line); border-radius: 16px; text-align: center; }
.protected .post-cat { margin: 0 0 6px; font-size: 13.5px; }
.protected-title { margin: 0 0 6px; font-size: 20px; font-weight: 700; line-height: 1.45; }
.protected-desc { margin: 0 0 16px; color: var(--text-3); font-size: 15px; }
.protected-form { display: flex; gap: 8px; }
#tt-body-page .protected-form { justify-content: center; }
.protected-form input {
  flex: 1; min-width: 0; max-width: 240px; padding: 11px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); color: var(--text); font: inherit;
}
.protected-form button {
  padding: 11px 18px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 15px; font-weight: 600;
}

/* ---------- 글 본문 ---------- */
.post-head { padding: 56px 0 36px; margin-bottom: 40px; border-bottom: 1px solid var(--line-soft); }
.post-cat { display: inline-block; margin-bottom: 12px; color: var(--accent); font-size: 15px; font-weight: 600; }
.post-title { margin: 0; font-size: clamp(28px, 4.4vw, 38px); font-weight: 800; line-height: 1.35; letter-spacing: -.03em; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 16px 0 0; color: var(--muted); font-size: 14.5px; }
/* 날짜, 수정 일시, 읽는 시간은 한 덩어리로 두고 넘치면 줄째로 내린다. 휴대폰에서 칸마다 두 줄로 쪼개졌다 (2026-12-05) */
.post-meta > * { white-space: nowrap; }
.post-meta .post-updated { margin-left: 0 !important; }
.read-time:not(:empty)::before { content: ""; display: inline-block; width: 2px; height: 2px; margin-right: 10px; vertical-align: middle; border-radius: 50%; background: var(--muted); }
.read-time:empty { display: none; }
.post-admin { display: flex; gap: 12px; margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.post-admin a:hover { color: var(--accent); }

.post-body { font-size: 17px; line-height: 1.85; color: var(--text-2); letter-spacing: -.003em; }
.post-body > *:first-child { margin-top: 0; }
.post-body p { margin: 0 0 1.25em; }
/* 빈 줄 문단(_plugins/lb-blank-p.rb 가 p.lb-blank 표시)을 넣어 쓴 글은 문단 여백을 빼고 빈 줄 한 칸만 띄운다(티스토리와 같게, 2026-12-05 시안 A) */
.post-body:has(> p.lb-blank) > p { margin-bottom: 0; }
.post-body p[data-ke-size="size14"] { font-size: 15px; }
.post-body p[data-ke-size="size18"] { font-size: 19px; }
.post-body p[data-ke-size="size20"] { font-size: 21px; }
.post-body h2, .post-body h3, .post-body h4 {
  color: var(--text); font-weight: 700; letter-spacing: -.02em; line-height: 1.45;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.post-body h2 { margin: 2.4em 0 .8em; font-size: 26px; }
.post-body h3 { margin: 2em 0 .7em; font-size: 21px; }
.post-body h4 { margin: 1.8em 0 .6em; font-size: 18px; }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.post-body strong, .post-body b { color: var(--text); font-weight: 700; }
.post-body ul, .post-body ol { padding-left: 1.4em; margin: 0 0 1.25em; }
.post-body li { margin: .35em 0; }
.post-body li::marker { color: var(--muted); }

.post-body figure { margin: 2em 0; }
.post-body figure img, .post-body .imageblock img { border-radius: 12px; }
.post-body figcaption { margin-top: 10px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.6; }
.post-body .imagegridblock img { border-radius: 8px; }

.post-body blockquote { margin: 2em 0; padding: 2px 0 2px 20px; border-left: 3px solid var(--line); color: var(--text-3); }
.post-body blockquote[data-ke-style="style1"] { padding: 8px 0; border: 0; text-align: center; font-size: 19px; font-weight: 600; color: var(--text); }
.post-body blockquote[data-ke-style="style2"] { border-left-color: var(--accent); }
.post-body blockquote[data-ke-style="style3"] { padding: 20px 24px; border: 0; border-radius: 12px; background: var(--bg-soft); color: var(--text-2); }

.post-body hr {
  height: 0 !important; margin: 3em 0 !important; border: 0 !important;
  border-top: 1px solid var(--line) !important; background: none !important;
}

.post-body table { width: 100%; margin: 2em 0; border-collapse: collapse; font-size: 15px; }
.post-body th, .post-body td { padding: 10px 12px; border: 1px solid var(--line); }
.post-body th { background: var(--bg-soft); color: var(--text); }

.post-body code { padding: .15em .4em; border-radius: 6px; background: var(--bg-muted); color: var(--text); font-family: var(--mono); font-size: .86em; }
.post-body pre { margin: 2em 0; padding: 18px 20px; overflow-x: auto; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line-soft); font-size: 14px; line-height: 1.7; }
.post-body pre code { padding: 0; background: none; font-size: inherit; }

.post-body figure[data-ke-type="opengraph"] a {
  display: flex; overflow: hidden; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text); text-decoration: none;
}
.post-body figure[data-ke-type="opengraph"] .og-image { flex: none; width: 140px; background-size: cover; background-position: center; }
.post-body figure[data-ke-type="opengraph"] .og-text { padding: 14px 18px; }
.post-body figure[data-ke-type="opengraph"] .og-title { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.post-body figure[data-ke-type="opengraph"] .og-desc { margin: 0; color: var(--text-3); font-size: 13px; }
.post-body figure[data-ke-type="opengraph"] .og-host { color: var(--muted); font-size: 12px; }

.post .another_category { display: none; }
.post .container_postbtn { margin: 40px 0 0; }

/* ---------- 태그, 공유, 이전/다음 ---------- */
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 48px 0 0; font-size: 0; }
.post-tags a, .tag-cloud a {
  padding: 6px 12px; border-radius: 8px; background: var(--bg-muted);
  color: var(--text-3); font-size: 14px; transition: background-color .15s, color .15s;
}
.post-tags a::before { content: "#"; }
.post-tags a:hover, .tag-cloud a:hover { background: var(--accent-soft); color: var(--accent); }
.post-actions { display: flex; margin: 32px 0 0; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg);
  color: var(--text-3); font-size: 14px; cursor: pointer;
}
.pill-btn:hover, .pill-btn.is-done { color: var(--accent); border-color: var(--accent); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 48px 0 0; }
.post-nav:not(:has(a)) { display: none; }
.pn { display: block; min-width: 0; padding: 16px 18px; border-radius: 12px; background: var(--bg-soft); }
.pn-next { grid-column: 2; text-align: right; }
.pn-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 13px; }
.pn-title { display: block; font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn:hover .pn-title { color: var(--accent); }

.related { margin: 56px 0 0; }
.related-title { margin: 0 0 16px; font-size: 18px; font-weight: 700; }
.related-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.related-item a { display: block; height: 100%; }
.related-photo { display: block; aspect-ratio: 4 / 3; margin-bottom: 10px; overflow: hidden; border-radius: 10px; background: var(--bg-muted); }
.related-photo img { width: 100%; height: 100%; object-fit: cover; }
.related-item.text_type a { padding: 16px; border-radius: 10px; background: var(--bg-soft); }
.related-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 15px; font-weight: 600; line-height: 1.5;
}
.related-item a:hover .related-name { color: var(--accent); }
.related-date { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }

/* ---------- 댓글, 방명록 (티스토리 기본 댓글 앱) ---------- */
.comments { margin: 64px 0 0; padding-top: 32px; border-top: 1px solid var(--line); }
.guestbook-body { margin-top: 16px; }
[data-tistory-react-app="Comment"] .tt-comment-cont,
[data-tistory-react-app="Comment"] .tt-comment-cont * { font-family: var(--sans) !important; }
[data-tistory-react-app="Comment"] .tt-box-total .tt_txt_g,
[data-tistory-react-app="Comment"] .tt-box-total .tt_num_g { color: var(--text) !important; font-weight: 700 !important; }
[data-tistory-react-app="Comment"] .tt-link-user,
[data-tistory-react-app="Comment"] .tt_desc,
[data-tistory-react-app="Comment"] .tt-cmt,
[data-tistory-react-app="Comment"] .tt_txt_user { color: var(--text) !important; }
[data-tistory-react-app="Comment"] .tt_date,
[data-tistory-react-app="Comment"] .tt-link-comment .tt_txt_g,
[data-tistory-react-app="Comment"] .tt-link-comment .tt_num_g { color: var(--muted) !important; }
[data-tistory-react-app="Comment"] .tt-item-reply,
[data-tistory-react-app="Comment"] .tt-area-write,
[data-tistory-react-app="Comment"] .tt-box-textarea,
[data-tistory-react-app="Comment"] .tt-box-account input,
[data-tistory-react-app="Comment"] .tt-box-write { border-color: var(--line) !important; }
[data-tistory-react-app="Comment"] .tt-box-textarea,
[data-tistory-react-app="Comment"] .tt-box-account input,
[data-tistory-react-app="Comment"] .tt-box-write,
[data-tistory-react-app="Comment"] .tt_wrap_write { background: var(--bg) !important; color: var(--text) !important; }
[data-tistory-react-app="Comment"] .tt-btn_register {
  border: 0 !important; border-radius: 8px !important; background: var(--accent) !important; color: #fff !important;
}
[data-tistory-react-app="Comment"] .tt-btn_register:disabled { opacity: .45; }
[data-tistory-react-app="Comment"] .tt-list-modify { background: var(--bg) !important; border-color: var(--line) !important; }
[data-tistory-react-app="Comment"] .tt-list-modify a { color: var(--text) !important; }

/* ---------- 태그 모아보기 ---------- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; }
.tag-cloud .cloud1 { color: var(--text); font-weight: 700; }
.tag-cloud .cloud2 { color: var(--text-2); font-weight: 600; }

/* ---------- 페이지 번호 ---------- */
.paging { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 48px 0 0; font-size: 15px; }
#tt-body-page .paging, #tt-body-guestbook .paging, #tt-body-tag .paging { display: none; }
.pg-nums { display: flex; gap: 2px; }
.pg-num, .pg-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 8px; border-radius: 10px; color: var(--text-3);
}
.pg-num:hover, .pg-arrow:hover { background: var(--bg-muted); color: var(--text); }
.pg-num:has(.selected) { background: var(--text); color: var(--bg); font-weight: 700; }
.pg-num .selected { color: inherit; }
.pg-arrow.no-more-prev, .pg-arrow.no-more-next { opacity: .3; pointer-events: none; }

/* ---------- 푸터 ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--bg-soft); }
.footer-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 28px 24px 36px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  color: var(--muted); font-size: 14px;
}
.footer-copy { margin: 0; }
.footer-links { display: flex; gap: 16px; }
.footer-links a:hover { color: var(--text); }

/* ---------- 맨 위로 ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 24px; z-index: 80;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text-3); box-shadow: var(--shadow); cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--text); }

/* ---------- 반응형 ---------- */
@media (max-width: 860px) {
  .gnb { display: none; }
  .header-inner { justify-content: space-between; }
  .brand { position: absolute; left: 50%; transform: translateX(-50%); margin: 0; }
}
@media (max-width: 640px) {
  :root { --header-h: 56px; }
  .header-inner, .site-main, .footer-inner { padding-left: 16px; padding-right: 16px; }
  .brand { font-size: 18px; }
  .cover { padding: 40px 0 16px; }
  .cover-head { padding: 0 16px; }
  .cover-title { font-size: 19vw; }
  .cover-desc { margin: 0; }
  .cover-reel { margin-top: 32px; }
  .reel-track { min-height: 190px; }
  .reel-item { width: 140px; height: 176px; padding: 14px 12px; border-radius: 14px; }
  .reel-title { font-size: 15px; }
  .list-head { padding-top: 36px; }
  .card-link { grid-template-columns: minmax(0, 1fr) 88px; gap: 16px; padding: 22px 0; }
  .card-media { width: 88px; border-radius: 10px; }
  .card-title { font-size: 17px; }
  .card-summary { font-size: 14px; }
  .post-head { padding: 36px 0 28px; margin-bottom: 32px; }
  .post-body { font-size: 16px; line-height: 1.85; }
  .post-body h2 { font-size: 22px; }
  .post-body h3 { font-size: 19px; }
  .post-body figure { margin: 1.6em 0; }
  .post-body table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .post-body pre { padding: 14px; font-size: 13.5px; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .pn-next { grid-column: auto; }
  .related-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .to-top { right: 16px; bottom: 16px; }
}

/* =========================================================
   2026-12 잡지형 글 화면, 홈 카드 격자, 다른 블로그 링크
   ========================================================= */
:root { --serif: 'Noto Serif KR', 'Nanum Myeongjo', 'Batang', serif; }

/* ---------- 서랍: 빈 카테고리 숨김, 다른 블로그 ---------- */
.drawer-cat li.is-empty { display: none; }
.drawer-blogs { padding-top: 16px; }
.blog-link {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 9px 8px; border-radius: 8px; font-size: 15px;
}
.blog-link b { font-weight: 600; color: var(--text); }
.blog-link span { color: var(--muted); font-size: 12.5px; }
.blog-link:hover { background: var(--bg-muted); }

.card-title { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; }

/* =========================================================
   2026-12 홈 글 목록 (위 배너는 그대로)
   일기장 목록형: 최근 글 머리(제목 + 카테고리 칩) > 글 하나에 한 줄(날짜 | 제목과 요약 | 사진) > 다른 블로그
   왼쪽 날짜 칸(.card-when)은 script.js가 글 날짜를 일과 연월로 나눠 만든다
   ========================================================= */
#tt-body-index .site-main { max-width: calc(880px + 48px); }

/* ---------- 최근 글 머리 ---------- */
#tt-body-index:not(.is-paged) .home-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px;
  margin: 40px 0 0; padding-bottom: 20px; border-bottom: 1px solid var(--line);
}
.home-label { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.home-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.home-cats[hidden] { display: none; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg);
  color: var(--text-2); font-size: 14px; font-weight: 600; line-height: 1.4; cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background-color .15s ease;
}
.cat-chip b { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.cat-chip:hover { border-color: var(--accent); color: var(--accent); }
.cat-chip.is-all { border-color: var(--text); background: var(--text); color: var(--bg); }
.cat-chip.is-all b { color: inherit; opacity: .7; }
.cat-chip.is-more { border-style: dashed; color: var(--text-3); }

/* ---------- 홈 글 목록: 날짜 | 제목과 요약 | 사진 ---------- */
.card-when { display: none; }
#tt-body-index.is-paged .entries { padding-top: 40px; }
#tt-body-index .card-link {
  display: grid; grid-template-columns: 88px minmax(0, 1fr) 140px; grid-template-areas: "when body media";
  column-gap: 32px; align-items: start; padding: 32px 0; border-bottom: 1px solid var(--line-soft);
}
#tt-body-index .card:not(:has(.card-media img)) .card-link {
  grid-template-columns: 88px minmax(0, 1fr); grid-template-areas: "when body";
}
#tt-body-index .card-when { grid-area: when; display: flex; flex-direction: column; padding-top: 2px; }
#tt-body-index .card-when b { color: var(--text); font-family: var(--serif); font-size: 40px; font-weight: 700; line-height: 1; }
#tt-body-index .card-when span { margin-top: 8px; color: var(--muted); font-size: 13px; letter-spacing: .03em; }
#tt-body-index .card-body { grid-area: body; }
#tt-body-index .card-media { grid-area: media; width: 140px; aspect-ratio: 4 / 3; border-radius: 10px; }
/* 날짜는 왼쪽 칸에 있으니 글 위 줄에서는 카테고리만 */
#tt-body-index .card.has-when .card-date { display: none; }
#tt-body-index .card.has-when .card-cat::after { display: none; }
#tt-body-index .card-meta { margin: 0 0 8px; font-size: 13.5px; }
#tt-body-index .card-title { font-size: 23px; line-height: 1.45; }
#tt-body-index .card-summary { margin-top: 10px; font-size: 15px; line-height: 1.75; }

/* ---------- 홈 아래 다른 블로그 (칸 없이 글자 링크) ---------- */
#tt-body-index:not(.is-paged) .home-blogs {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 32px;
  margin: 56px 0 0; padding-top: 22px; border-top: 1px solid var(--line);
}
.home-blogs-label { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.home-blogs-list { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.home-blog { display: inline-flex; align-items: baseline; gap: 8px; }
.home-blog-kind { color: var(--muted); font-size: 13px; }
.home-blog-name { color: var(--text); font-family: var(--serif); font-size: 17px; font-weight: 700; transition: color .15s ease; }
.home-blog-name::after { content: "\2197"; margin-left: 4px; color: var(--muted); font-family: var(--sans); font-size: 13px; font-weight: 400; }
.home-blog:hover .home-blog-name { color: var(--accent); }

@media (max-width: 640px) {
  #tt-body-index:not(.is-paged) .home-bar { margin-top: 28px; padding-bottom: 14px; }
  /* 칩은 한 줄로 두고 옆으로 넘긴다 */
  .home-cats { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 32px); margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .home-cats::-webkit-scrollbar { display: none; }
  #tt-body-index.is-paged .entries { padding-top: 24px; }

  #tt-body-index .card-link { grid-template-columns: 50px minmax(0, 1fr) 84px; column-gap: 14px; padding: 22px 0; }
  #tt-body-index .card:not(:has(.card-media img)) .card-link { grid-template-columns: 50px minmax(0, 1fr); }
  #tt-body-index .card-when b { font-size: 28px; }
  #tt-body-index .card-when span { margin-top: 6px; font-size: 11.5px; letter-spacing: 0; }
  #tt-body-index .card-media { width: 84px; aspect-ratio: 1; border-radius: 8px; }
  #tt-body-index .card-title { font-size: 18px; }
  #tt-body-index .card-summary { margin-top: 6px; font-size: 14px; }

  #tt-body-index:not(.is-paged) .home-blogs { margin-top: 40px; flex-direction: column; gap: 10px; }
  .home-blogs-list { flex-direction: column; gap: 8px; }
}

/* ---------- 글 머리: 가운데 정렬한 잡지 제목 ---------- */
#tt-body-page .post-head {
  padding: 80px 0 0; margin-bottom: 56px; border-bottom: 0; text-align: center;
}
#tt-body-page .post-head::after {
  content: ""; display: block; width: 44px; height: 2px; margin: 40px auto 0; background: var(--accent);
}
#tt-body-page .post-head .post-cat {
  margin-bottom: 18px; font-size: 13.5px; letter-spacing: .06em;
}
#tt-body-page .post-head .post-title {
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(30px, 5.2vw, 50px); line-height: 1.32; letter-spacing: -.02em; text-wrap: balance;
}
#tt-body-page .post-head .post-meta { justify-content: center; margin-top: 22px; }
#tt-body-page .post-head .post-admin { justify-content: center; }

/* ---------- 본문 ---------- */
#tt-body-page .post-body { font-size: 17.5px; line-height: 1.9; }
#tt-body-page .post-body h2, #tt-body-page .post-body h3,
#tt-body-page .post-body h2[data-ke-size], #tt-body-page .post-body h3[data-ke-size] {
  font-family: var(--serif) !important; font-weight: 700 !important; letter-spacing: -.015em;
}
#tt-body-page .post-body h2, #tt-body-page .post-body h2[data-ke-size] { font-size: 28px !important; margin: 2.6em 0 .9em; }
#tt-body-page .post-body h3, #tt-body-page .post-body h3[data-ke-size] { font-size: 22px !important; }
#tt-body-page .post-body h2::after {
  content: ""; display: block; width: 28px; height: 2px; margin-top: 14px; background: var(--accent);
}

/* 큰 사진은 본문보다 넓게 */
/* 티스토리 content.css가 figure.imageblock을 display: table로 두어서 폭이 본문에 묶이므로 block으로 푼다 */
#tt-body-page .post-body figure.is-wide {
  display: block !important; width: auto !important; max-width: none !important;
  margin-top: 2.4em; margin-bottom: 2.4em;
}
#tt-body-page .post-body figure.imageblock.is-wide img { width: 100%; }
#tt-body-page .post-body figure.imageblock.is-wide figcaption { display: block; }
@media (min-width: 1000px) {
  #tt-body-page .post-body figure.is-wide { margin-left: -110px; margin-right: -110px; }
  #tt-body-page .post-body figure.is-wide figcaption { padding: 0 110px; }
}
#tt-body-page .post-body figure.is-wide img { border-radius: 16px; }
#tt-body-page .post-body figcaption { font-size: 13.5px; letter-spacing: .01em; }

/* 인용구는 잡지의 발췌문처럼 */
#tt-body-page .post-body blockquote,
#tt-body-page .post-body blockquote[data-ke-style] {
  position: relative; margin: 3em 0 !important; padding: 36px 12px 28px !important;
  border: 0 !important; border-top: 1px solid var(--line) !important; border-bottom: 1px solid var(--line) !important;
  border-radius: 0 !important; background: none !important; text-align: center !important;
  font-family: var(--serif) !important; font-size: 21px !important; font-weight: 500 !important;
  line-height: 1.75 !important; color: var(--text) !important;
}
#tt-body-page .post-body blockquote::before {
  content: "\201C"; position: absolute; top: -27px; left: 50%; transform: translateX(-50%);
  padding: 0 14px; background: var(--bg); font: 700 54px/1 var(--serif); color: var(--accent);
}
#tt-body-page .post-body blockquote p {
  margin: 0 0 .4em !important; font: inherit !important; color: inherit !important;
}
#tt-body-page .post-body blockquote p:last-child { margin-bottom: 0 !important; }

/* ---------- 글 끝 블로그 소개 ---------- */
.author {
  display: flex; align-items: center; gap: 18px; margin: 48px 0 0; padding: 24px;
  border-radius: 18px; background: var(--bg-soft); border: 1px solid var(--line-soft);
}
.author-img { width: 64px; height: 64px; flex: none; border-radius: 50%; object-fit: cover; background: var(--bg-muted); }
.author-body { min-width: 0; }
.author-name { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--text); }
.author-desc { margin: 4px 0 12px; color: var(--text-3); font-size: 14px; }
.author-desc:empty { display: none; }
.author-links { display: flex; flex-wrap: wrap; gap: 6px; }
.author-links a {
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text-2); font-size: 13px; font-weight: 600; transition: color .15s, border-color .15s;
}
.author-links a span { color: var(--muted); font-weight: 500; }
.author-links a:hover { color: var(--accent); border-color: var(--accent); }
/* 위 소개 카드와 겹치는 티스토리 기본 명함은 숨긴다 */
#tt-body-page .tt_box_namecard { display: none !important; }

@media (max-width: 640px) {
  #tt-body-page .post-head { padding-top: 44px; margin-bottom: 40px; }
  #tt-body-page .post-head::after { margin-top: 30px; }
  #tt-body-page .post-body { font-size: 16px; line-height: 1.85; }
  #tt-body-page .post-body h2, #tt-body-page .post-body h2[data-ke-size] { font-size: 22px !important; }
  #tt-body-page .post-body h3, #tt-body-page .post-body h3[data-ke-size] { font-size: 19px !important; }
  #tt-body-page .post-body blockquote,
  #tt-body-page .post-body blockquote[data-ke-style] { font-size: 18px !important; padding: 32px 4px 24px !important; }
  .author { align-items: flex-start; padding: 18px; gap: 14px; }
  .author-img { width: 52px; height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  /* Jekyll 판: 홈 카드 띠(.reel-track)는 빼서 이 설정(Windows 애니메이션 효과 끔, 원격 데스크톱)에서도 흐르게 한다. 속도는 skin.js 가 절반으로 줄인다.
     모두 끄는 규칙이라 :where() 로 우선순위를 0 으로 둔다(다른 !important 애니메이션 규칙이 이기도록). */
  :where(:not(.reel-track)), *::before, *::after { transition: none !important; animation: none !important; }
}
