@charset "utf-8";
/* ===========================================================
   cracode — Terminal Skin for Tistory
   먹고보는 프로그래머
   =========================================================== */

/* ---------- Tokens ---------- */
:root {
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
               "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "D2Coding", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --w-max: 1240px;
  --w-side: 268px;
  --gap: 40px;
  --radius: 12px;
  --radius-sm: 8px;
  --t: .18s ease;
}

html[data-theme="dark"] {
  --bg:        #0d1016;
  --bg-soft:   #12161e;
  --panel:     #151a23;
  --panel-2:   #1b212c;
  --line:      #242c39;
  --line-soft: #1c232e;
  --tx:        #d3dae4;
  --tx-strong: #f2f5f9;
  --tx-dim:    #8994a4;
  --tx-faint:  #626d7d;
  --accent:    #5ee0a8;
  --accent-2:  #f0a35e;
  --accent-tx: #08120d;
  --sel:       rgba(94,224,168,.22);
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.28);
  --code-bg:   #0a0d12;
}

html[data-theme="light"] {
  --bg:        #fbfaf8;
  --bg-soft:   #f4f2ee;
  --panel:     #ffffff;
  --panel-2:   #f7f6f3;
  --line:      #e3e0d9;
  --line-soft: #eeece7;
  --tx:        #33383f;
  --tx-strong: #14171b;
  --tx-dim:    #6d747e;
  --tx-faint:  #99a0aa;
  --accent:    #0f9268;
  --accent-2:  #c0691a;
  --accent-tx: #ffffff;
  --sel:       rgba(15,146,104,.16);
  --shadow:    0 1px 2px rgba(20,23,27,.05), 0 8px 24px rgba(20,23,27,.06);
  --code-bg:   #1a1f28;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, em, img, strong,
ol, ul, li, form, label, table, thead, tbody, tr, th, td, article, aside, footer, header,
main, nav, section, figure, figcaption {
  margin: 0; padding: 0; border: 0; font: inherit; vertical-align: baseline;
}
ol, ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
table { border-collapse: collapse; border-spacing: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
body {
  font-family: var(--font-sans);
  font-size: .975rem;
  line-height: 1.75;
  color: var(--tx);
  background: var(--bg);
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  transition: background var(--t), color var(--t);
}
::selection { background: var(--sel); }
a { color: inherit; text-decoration: none; transition: color var(--t); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  padding: 10px 16px; background: var(--accent); color: var(--accent-tx);
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.hd-inner {
  max-width: var(--w-max); margin: 0 auto;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark {
  font-family: var(--font-mono); font-weight: 700; font-size: 1.05rem;
  color: var(--accent); letter-spacing: -.04em;
  animation: blink 1.6s steps(1) infinite;
}
@keyframes blink { 0%,60% { opacity: 1 } 61%,100% { opacity: .35 } }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong {
  font-weight: 700; font-size: 1.02rem; color: var(--tx-strong); letter-spacing: -.02em;
}
.brand-text em {
  font-style: normal; font-family: var(--font-mono);
  font-size: .66rem; color: var(--tx-faint); letter-spacing: .02em;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.gnb { flex: 1; display: flex; align-items: center; gap: 4px; min-width: 0; }
.gnb ul { display: flex; gap: 2px; flex-wrap: wrap; }
.gnb li { list-style: none; }
.gnb a {
  display: block; padding: 7px 12px; border-radius: 999px;
  font-size: .845rem; font-weight: 500; color: var(--tx-dim); white-space: nowrap;
}
.gnb a:hover { color: var(--tx-strong); background: var(--panel-2); }
.gnb .on > a, .gnb .selected > a, .gnb li.tt_current > a { color: var(--accent); }
.gnb-extra a { color: var(--tx-faint); }

.hd-tools { display: flex; gap: 6px; align-items: center; }
.owner-tools { display: flex; gap: 6px; align-items: center; }
.owner-tools .icon-btn { text-decoration: none; font-size: .95rem; line-height: 1; }
a.icon-btn { display: inline-grid; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px;
  border: 1px solid var(--line); color: var(--tx-dim);
  display: grid; place-items: center; font-size: .9rem;
  transition: all var(--t);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
html[data-theme="dark"]  .ico-sun  { display: block; }
html[data-theme="dark"]  .ico-moon { display: none; }
html[data-theme="light"] .ico-sun  { display: none; }
html[data-theme="light"] .ico-moon { display: block; }
.only-mobile { display: none; }

/* ---------- Layout ---------- */
.layout {
  max-width: var(--w-max); margin: 0 auto;
  padding: 44px 24px 90px;
  display: grid; grid-template-columns: var(--w-side) minmax(0, 1fr);
  gap: var(--gap); align-items: start;
}

/* ---------- Sidebar ---------- */
.sidebar { position: sticky; top: 90px; }
.widget + .widget { margin-top: 28px; }
.widget-title {
  font-family: var(--font-mono);
  font-size: .68rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--tx-faint);
  padding-bottom: 8px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.search-box {
  display: flex; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0 4px 0 12px;
  transition: border-color var(--t);
}
.search-box:focus-within { border-color: var(--accent); }
.search-box input {
  flex: 1; min-width: 0; height: 38px;
  background: none; border: 0; outline: none; font-size: .855rem;
}
.search-box input::placeholder { color: var(--tx-faint); }
.search-box .search-btn {
  width: 30px; height: 30px; border-radius: 6px; border: 0; background: none;
  color: var(--tx-dim); font-size: 1.05rem; cursor: pointer; flex-shrink: 0;
}
.search-box .search-btn:hover { color: var(--accent); }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.list-plain li {
  display: flex; align-items: baseline; gap: 8px;
  padding: 5px 0; font-size: .855rem;
}
.list-plain li a {
  flex: 1; min-width: 0; color: var(--tx-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.list-plain li a:hover { color: var(--accent); }
.list-plain .dim {
  font-family: var(--font-mono); font-size: .66rem;
  color: var(--tx-faint); flex-shrink: 0;
}

/* 티스토리 카테고리 트리 */
.widget-category .tt_category,
.widget-category ul { font-size: .875rem; }
.widget-category li { line-height: 1.6; }
.widget-category a {
  display: block; padding: 5px 10px; border-radius: 6px;
  color: var(--tx-dim); position: relative;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.widget-category a:hover { color: var(--tx-strong); background: var(--panel-2); }
.widget-category a.active,
.widget-category .tt_current_category > a {
  color: var(--accent); background: var(--sel); font-weight: 600;
}
.widget-category .category_list > li > a,
.widget-category > ul > li > a { font-weight: 600; color: var(--tx); }
.widget-category ul ul { margin: 2px 0 6px; padding-left: 10px; border-left: 1px solid var(--line-soft); }
.widget-category ul ul a { font-size: .82rem; }
.widget-category .c_cnt, .widget-category .cnt {
  font-family: var(--font-mono); font-size: .66rem; color: var(--tx-faint);
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-block; padding: 3px 9px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top;
  font-family: var(--font-mono); font-size: .72rem;
  color: var(--tx-dim); background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px;
  transition: all var(--t);
}
.tag:hover { color: var(--accent); border-color: var(--accent); }
.tag-cloud.big .tag { font-size: .82rem; padding: 6px 14px; }
.cloud1 { opacity: .6 } .cloud2 { opacity: .72 } .cloud3 { opacity: .85 }
.cloud4 { opacity: 1 } .cloud5 { opacity: 1; color: var(--accent-2); }

.counter { display: flex; gap: 6px; }
.counter div {
  flex: 1; text-align: center; padding: 10px 4px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.counter b {
  display: block; font-family: var(--font-mono);
  font-size: .9rem; font-weight: 700; color: var(--tx-strong);
}
.counter span {
  display: block; font-size: .6rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--tx-faint); margin-top: 2px;
}

/* ---------- Notice ---------- */
.notice-box { margin-bottom: 28px; display: grid; gap: 8px; }
.notice-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--panel); border: 1px solid var(--line);
  font-size: .88rem; color: var(--tx-dim);
}
.notice-item:hover { border-color: var(--accent); color: var(--tx-strong); }
.notice-tit { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notice-date { font-family: var(--font-mono); font-size: .68rem; color: var(--tx-faint); flex-shrink: 0; }
.badge {
  font-family: var(--font-mono); font-size: .64rem; font-weight: 700;
  letter-spacing: .06em; padding: 2px 7px; border-radius: 4px;
  background: var(--accent); color: var(--accent-tx);
}

/* ---------- List head ---------- */
.list-head { margin-bottom: 30px; }
.page-title {
  font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em;
  color: var(--tx-strong); line-height: 1.3;
}
.page-title::before {
  content: "# "; font-family: var(--font-mono); color: var(--accent); font-weight: 500;
}
.page-sub {
  margin-top: 6px; font-family: var(--font-mono);
  font-size: .74rem; color: var(--tx-faint);
}
.page-desc { margin-top: 8px; font-size: .87rem; color: var(--tx-dim); }
.list-head[style] {
  padding: 34px 26px; border-radius: var(--radius);
  background-size: cover; background-position: center;
}
.list-head[style] .page-title,
.list-head[style] .page-sub,
.list-head[style] .page-desc { color: #fff; }
.list-head[style] .page-title::before { color: var(--accent); }
.empty {
  padding: 60px 20px; text-align: center;
  font-family: var(--font-mono); font-size: .85rem; color: var(--tx-faint);
  border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------- Post cards ---------- */
.posts { display: grid; gap: 18px; }
.card {
  display: flex; align-items: center; gap: 22px; padding: 18px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: var(--shadow);
}
.card-thumb {
  display: block; overflow: hidden; border-radius: var(--radius-sm);
  background: var(--panel-2); aspect-ratio: 16 / 10;
  flex: 0 0 200px; width: 200px;
}
.card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
.card:hover .card-thumb img { transform: scale(1.045); }
.card-body { flex: 1 1 auto; min-width: 0; }
.meta {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: .7rem; color: var(--tx-faint);
}
.meta .cat { color: var(--accent-2); font-weight: 500; }
.meta .cat a { color: inherit; }
.meta .sep { opacity: .5; }
.card-title {
  margin: 8px 0 6px;
  font-size: 1.16rem; font-weight: 700; letter-spacing: -.02em;
  line-height: 1.45; color: var(--tx-strong);
}
.card-title a:hover { color: var(--accent); }
.card-summary {
  font-size: .865rem; color: var(--tx-dim); line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-foot {
  margin-top: 12px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
.more {
  font-family: var(--font-mono); font-size: .74rem;
  color: var(--accent); font-weight: 500;
}
.more:hover { color: var(--accent-2); }
.rp { font-family: var(--font-mono); font-size: .68rem; color: var(--tx-faint); }

/* ---------- Article ---------- */
.post {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 40px 44px 32px;
}
.post-head { padding-bottom: 22px; border-bottom: 1px solid var(--line-soft); margin-bottom: 30px; }
.post-title {
  margin-top: 10px;
  font-size: 1.95rem; font-weight: 800; letter-spacing: -.035em;
  line-height: 1.32; color: var(--tx-strong);
}

.protected {
  padding: 28px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius-sm);
  color: var(--tx-dim); font-size: .9rem;
}
.protected-form { margin-top: 14px; display: flex; gap: 8px; justify-content: center; }
.protected-form input {
  height: 38px; padding: 0 12px; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none;
}

/* 본문 타이포 */
.entry { font-size: 1.02rem; line-height: 1.85; color: var(--tx); }
.entry p { margin: 1.05em 0; }
.entry h1, .entry h2, .entry h3, .entry h4 {
  color: var(--tx-strong); font-weight: 700;
  letter-spacing: -.025em; line-height: 1.4;
  margin: 2em 0 .7em; scroll-margin-top: 84px;
}
.entry h1 { font-size: 1.6rem; }
.entry h2 {
  font-size: 1.35rem; padding-bottom: .35em;
  border-bottom: 1px solid var(--line-soft);
}
.entry h2::before {
  content: "## "; font-family: var(--font-mono);
  font-weight: 500; color: var(--accent); font-size: .85em;
}
.entry h3 { font-size: 1.14rem; }
.entry h3::before {
  content: "### "; font-family: var(--font-mono);
  font-weight: 500; color: var(--accent-2); font-size: .82em;
}
.entry h4 { font-size: 1.02rem; color: var(--tx-dim); }
.entry a {
  color: var(--accent);
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.entry a:hover { color: var(--accent-2); border-bottom-color: var(--accent-2); }
.entry strong, .entry b { font-weight: 700; color: var(--tx-strong); }
.entry em, .entry i { font-style: italic; }
.entry ul, .entry ol { margin: 1.05em 0; padding-left: 1.4em; }
.entry ul li { list-style: disc; }
.entry ol li { list-style: decimal; }
.entry li { margin: .35em 0; }
.entry li::marker { color: var(--tx-faint); }
.entry hr { margin: 2.4em 0; border-top: 1px solid var(--line); }
.entry blockquote {
  margin: 1.5em 0; padding: 14px 20px;
  border-left: 3px solid var(--accent);
  background: var(--panel-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--tx-dim);
}
.entry blockquote p:first-child { margin-top: 0; }
.entry blockquote p:last-child { margin-bottom: 0; }

/* 인라인 코드 */
.entry code {
  font-family: var(--font-mono); font-size: .855em;
  padding: .14em .42em; border-radius: 5px;
  background: var(--panel-2); border: 1px solid var(--line-soft);
  color: var(--accent-2);
}
/* 코드 블록 */
.entry pre {
  margin: 1.5em 0; padding: 18px 20px;
  background: var(--code-bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow-x: auto;
  font-family: var(--font-mono); font-size: .82rem; line-height: 1.65;
  color: #c9d3e0; -webkit-overflow-scrolling: touch;
}
.entry pre code {
  padding: 0; background: none; border: 0; color: inherit; font-size: inherit;
}
.entry pre::-webkit-scrollbar { height: 8px; }
.entry pre::-webkit-scrollbar-thumb { background: #39414f; border-radius: 4px; }
.entry pre::-webkit-scrollbar-track { background: transparent; }

/* 표 */
.table-scroll { overflow-x: auto; margin: 1.5em 0; }
.entry table { width: 100%; font-size: .88rem; }
.entry th, .entry td {
  padding: 9px 14px; border: 1px solid var(--line); text-align: left;
}
.entry th { background: var(--panel-2); font-weight: 600; color: var(--tx-strong); }
.entry tbody tr:hover { background: var(--panel-2); }

/* 이미지 / 첨부 */
.entry figure { margin: 1.6em 0; }
.entry img { border-radius: var(--radius-sm); margin: 0 auto; }
.entry figure.imageblock figcaption,
.entry figcaption {
  margin-top: 8px; text-align: center;
  font-size: .78rem; color: var(--tx-faint);
}
.entry .imageblock.alignCenter { text-align: center; }
.entry figure.fileblock a,
.entry .fileblock {
  display: block; padding: 14px 18px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--panel-2);
  font-size: .86rem; border-bottom: 1px solid var(--line);
}
.entry .txc-textbox, .entry .box {
  padding: 16px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--panel-2);
}
.entry iframe, .entry video { max-width: 100%; border-radius: var(--radius-sm); }
.entry .video-wrap, .entry figure.videoblock { position: relative; }

/* 태그 */
.tag-list {
  margin-top: 34px; padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.tag-head {
  font-family: var(--font-mono); font-size: .68rem;
  letter-spacing: .12em; color: var(--tx-faint); margin-right: 4px;
}
.tag-list a {
  display: inline-block; padding: 4px 11px; margin: 2px 3px 2px 0;
  font-family: var(--font-mono); font-size: .74rem;
  color: var(--tx-dim); background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 999px;
}
.tag-list a::before { content: "#"; color: var(--accent); margin-right: 2px; }
.tag-list a:hover { color: var(--accent); border-color: var(--accent); }

.admin-bar {
  margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: .72rem;
}
.admin-bar a {
  padding: 4px 10px; border: 1px dashed var(--line);
  border-radius: 6px; color: var(--tx-faint);
}
.admin-bar a:hover { color: var(--accent-2); border-color: var(--accent-2); }

/* 이전 글 / 다음 글 */
.prevnext { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pn {
  padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); background: var(--panel-2);
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.pn:hover { border-color: var(--accent); }
.pn-next { text-align: right; grid-column: 2; }
.pn-label { font-family: var(--font-mono); font-size: .66rem; color: var(--accent); }
.pn-title {
  font-size: .86rem; color: var(--tx-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pn:hover .pn-title { color: var(--tx-strong); }

/* 카테고리의 다른 글 */
.related-list { display: grid; gap: 2px; }
.related-list li { list-style: none; }
.related-list a {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: var(--radius-sm);
}
.related-list a:hover { background: var(--panel-2); }
.rl-thumb {
  width: 44px; height: 44px; flex-shrink: 0; overflow: hidden;
  border-radius: 6px; background: var(--panel-2);
}
.rl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rl-title {
  flex: 1; min-width: 0; font-size: .87rem; color: var(--tx-dim);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.related-list a:hover .rl-title { color: var(--accent); }
.rl-date { font-family: var(--font-mono); font-size: .66rem; color: var(--tx-faint); flex-shrink: 0; }

.post-foot {
  margin-top: 26px; padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.btn, .btn-ghost {
  display: inline-block; padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: .82rem; font-weight: 600; transition: all var(--t);
}
.btn { background: var(--accent); color: var(--accent-tx); }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { border: 1px solid var(--line); color: var(--tx-dim); }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }

.block-title {
  font-family: var(--font-mono);
  font-size: .74rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--tx-faint);
  margin-bottom: 14px;
}
.block-title .count { color: var(--accent); }
.related { margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line-soft); }

/* ---------- Comments / Guestbook ---------- */
.comments {
  margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--line-soft);
}
.guestbook {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px 30px;
}
.guestbook .page-title { margin-bottom: 22px; }

.comment-list { margin-top: 6px; }
.comment { list-style: none; border-bottom: 1px solid var(--line-soft); }
.comment:last-child { border-bottom: 0; }
.c-inner { display: flex; gap: 12px; padding: 14px 0; }
.c-avatar {
  flex: 0 0 34px; width: 34px; height: 34px;
  border-radius: 50%; overflow: hidden;
  background-color: var(--panel-2);
  background-size: cover; background-position: center;
  background-repeat: no-repeat;
  /* 치환자가 이미지 대신 텍스트를 뱉어도 새어나오지 않게 */
  font-size: 0; line-height: 0; color: transparent;
}
.c-avatar img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.c-main { flex: 1 1 auto; min-width: 0; }
.c-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.c-name { font-weight: 600; font-size: .87rem; color: var(--tx-strong); }
.c-name a { color: inherit; }
.c-date { font-family: var(--font-mono); font-size: .66rem; color: var(--tx-faint); }
.c-body { margin-top: 3px; font-size: .89rem; color: var(--tx); white-space: pre-line; }
.c-actions { margin-top: 6px; display: flex; gap: 12px; }
.c-actions a { font-size: .72rem; color: var(--tx-faint); }
.c-actions a:hover { color: var(--accent); }
.comment-reply { margin: 0 0 8px 46px; padding-left: 14px; border-left: 2px solid var(--line); }
.comment-reply .comment { border-bottom: 0; }
.comment-reply .c-inner { padding: 10px 0; }

/* 댓글/방명록 작성 폼 */
.cw { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); }
.guestbook .cw { border-top: 0; padding-top: 0; margin-top: 0; margin-bottom: 26px; }
.cw-row { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.cw-row input {
  flex: 1 1 130px; min-width: 0; height: 38px; padding: 0 12px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); outline: none; font-size: .85rem;
  transition: border-color var(--t);
}
.cw textarea {
  width: 100%; padding: 12px 14px; resize: vertical;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); outline: none;
  font-family: inherit; font-size: .88rem; line-height: 1.7;
  transition: border-color var(--t);
}
.cw-row input:focus, .cw textarea:focus { border-color: var(--accent); }
.cw-row input::placeholder, .cw textarea::placeholder { color: var(--tx-faint); }
.cw .secret {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px;
  font-size: .78rem; color: var(--tx-dim); cursor: pointer;
}
.cw .secret input { accent-color: var(--accent); }
.cw-foot { margin-top: 10px; display: flex; justify-content: flex-end; }
.cw-foot .btn { border: 0; cursor: pointer; }

/* 티스토리가 본문에 자동 삽입하는 '카테고리의 다른 글' */
.another_category {
  margin-top: 34px !important; padding: 18px 20px !important;
  border: 1px solid var(--line) !important; border-radius: var(--radius-sm) !important;
  background: var(--panel-2) !important;
}
.another_category h4 {
  font-family: var(--font-mono) !important; font-size: .72rem !important;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--tx-faint) !important; border: 0 !important; padding: 0 0 8px !important;
}
.another_category table { width: 100%; font-size: .87rem; }
.another_category td { border: 0 !important; padding: 7px 0 !important; }
.another_category a { color: var(--tx-dim) !important; border: 0 !important; }
.another_category a:hover { color: var(--accent) !important; }
.another_category tr:hover { background: transparent !important; }

/* 공감/공유 버튼 줄 */
.container_postbtn { margin: 28px 0 0 !important; }

/* ---------- Paging ---------- */
.paging {
  margin-top: 40px; display: flex; justify-content: center;
  align-items: center; gap: 6px; flex-wrap: wrap;
}
.paging .numbox { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.paging .pg {
  min-width: 36px; height: 36px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: .8rem;
  color: var(--tx-dim); background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: all var(--t);
}
.paging .pg:hover { color: var(--accent); border-color: var(--accent); }
.paging .selected, .paging .pg.selected, .paging .pg_selected {
  background: var(--accent); color: var(--accent-tx);
  border-color: var(--accent); font-weight: 700;
}
.paging .no-more-prev, .paging .no-more-next,
.paging .no_more_prev, .paging .no_more_next {
  opacity: .3; pointer-events: none;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--bg-soft); }
.ft-inner {
  max-width: var(--w-max); margin: 0 auto; padding: 34px 24px 46px;
  text-align: center;
}
.ft-brand {
  font-family: var(--font-mono); font-size: .85rem;
  font-weight: 700; color: var(--tx-dim);
}
.ft-copy {
  margin-top: 6px; font-family: var(--font-mono);
  font-size: .7rem; color: var(--tx-faint);
}
.ft-links { margin-top: 14px; display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.ft-links a { font-size: .76rem; color: var(--tx-faint); }
.ft-links a:hover { color: var(--accent); }

/* ---------- To top ---------- */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--tx-dim); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: all var(--t);
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  :root { --w-side: 230px; --gap: 30px; }
  .post { padding: 32px 30px 26px; }
}

@media (max-width: 860px) {
  .hd-inner { gap: 14px; padding: 0 16px; }
  .gnb { display: none; }
  .only-mobile { display: grid; }
  .brand-text em { display: none; }
  .owner-tools { display: none; }

  .layout {
    grid-template-columns: minmax(0, 1fr);
    padding: 26px 16px 70px; gap: 34px;
  }
  .sidebar {
    position: static; order: 2;
    padding-top: 28px; border-top: 1px solid var(--line-soft);
    display: none;
  }
  body.nav-open .sidebar { display: block; order: -1; border-top: 0; padding-top: 0; }
  .content { order: 1; }

  .card { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 14px; }
  .card-thumb { aspect-ratio: 16 / 9; }
  .post { padding: 24px 18px 22px; border-radius: var(--radius-sm); }
  .post-title { font-size: 1.5rem; }
  .page-title { font-size: 1.35rem; }
  .entry { font-size: .97rem; }
  .entry h2 { font-size: 1.2rem; }
  .entry pre { font-size: .76rem; padding: 14px; border-radius: 6px; }
  .post-foot { flex-direction: column; align-items: stretch; }
  .post-foot .btn-ghost { text-align: center; }
  .prevnext { grid-template-columns: minmax(0, 1fr); }
  .pn-next { grid-column: auto; text-align: left; }
  .guestbook { padding: 20px 16px; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .sidebar, .site-footer, .to-top,
  .comments, .comment-write, .paging, .post-foot { display: none !important; }
  body { background: #fff; color: #000; }
  .post { border: 0; padding: 0; }
}
