/* =====================================================================
   Natural Beige Minimal - 스킨 스타일시트
   skin.html에서 <link rel="stylesheet" href="./style.css">로 불러옴

   기능별로 [기능: 이름] ~ [기능: 이름] 끝 주석으로 구분되어 있음
   불필요한 기능은 해당 주석 블록만 통째로 삭제하면 됨

   포함된 기능:
   - 다크모드 토글
   - 이미지 라이트박스
   - 읽기 진행률 바
   - 글 목차(TOC) 자동생성
   - 코드블록 복사 버튼
   - 읽는 시간 표시
   - 사이드바 sticky 고정
   - 관련글 카드 디자인 강화
   - 좋아요/공유 버튼
   - 페이지 로드 fade-in 애니메이션

   각 기능은 이 파일(CSS) + skin.html(HTML/JS) 양쪽에 코드가 있음
   ===================================================================== */

/* ── Pretendard (한글 본문 가독성용) ── */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@latest/dist/web/static/pretendard.min.css');

/* ── TOKENS ── */
:root {
  --bg:       #faf8f4;
  --bg2:      #f4f1eb;
  --bg3:      #ede9e1;
  --surface:  #ffffff;
  --border:   #e2ddd4;
  --border2:  #cdc7bb;
  --text1:    #1a1814;
  --text2:    #6b6560;
  --text3:    #a09a91;
  --accent:   #8b6f47;
  --accent-h: #7a6040;
  --accent2:  #5a7a5a;
  --tag-bg:   #f0ebe2;
  --serif:    'Noto Serif KR', 'Georgia', serif;
  --sans:     'DM Sans', 'Pretendard', -apple-system, sans-serif;
  --mono:     'DM Mono', monospace;
  --radius:   6px;
  --radius-lg:10px;
  --shadow:   0 4px 20px rgba(139,111,71,0.08);
  --tr:       0.22s ease;
}

/* ============================================================ */
/* [기능: 다크모드 토글]                                          */
/* 빼는 방법: 이 블록 전체(주석 시작~끝)를 통째로 삭제                */
/*    + 본문의 [기능: 다크모드 토글 - HTML] 블록 삭제               */
/*    + 스크립트의 [기능: 다크모드 토글 - JS] 블록 삭제              */
/* ============================================================ */
html[data-theme="dark"] {
  --bg:       #1a1814;
  --bg2:      #232019;
  --bg3:      #2d2820;
  --surface:  #252119;
  --border:   #3a342a;
  --border2:  #4a4338;
  --text1:    #ede9e1;
  --text2:    #b8b0a2;
  --text3:    #807868;
  --accent:   #c9a876;
  --accent-h: #d4b88a;
  --accent2:  #8fb088;
  --tag-bg:   #2d2820;
  --shadow:   0 4px 20px rgba(0,0,0,0.4);
}
/* 다크모드 토글 버튼 */
.theme-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--tr);
  flex-shrink: 0;
  padding: 0;
}
.theme-toggle:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.theme-toggle svg { width: 14px; height: 14px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
/* 다크모드에서 헤더 배경 보정 */
html[data-theme="dark"] .header {
  background: rgba(26,24,20,0.93);
}
/* 다크모드에서 article-header 그라데이션 보정 */
html[data-theme="dark"] .article-header::before {
  background: linear-gradient(to top, rgba(26,24,20,0.97) 0%, rgba(26,24,20,0.4) 60%, transparent 100%);
}
/* 다크모드에서 box-profile 그라데이션 보정 */
html[data-theme="dark"] .box-profile .inner-box {
  background: linear-gradient(to bottom, rgba(35,32,25,0.6), rgba(35,32,25,0.95));
}
/* 다크모드에서 area-promotion 오버레이 보정 */
html[data-theme="dark"] .area-promotion::after {
  background: linear-gradient(to bottom, rgba(26,24,20,0.2), rgba(26,24,20,0.75));
}
/* 깜빡임 방지 - 페이지 로드 시 즉시 테마 적용 */
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
/* ====== [기능: 다크모드 토글] 끝 ====== */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text1);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.8;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; transition: color var(--tr); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
input, button { font-family: var(--sans); }

/* ── LAYOUT ── */
#wrap { min-height: 100vh; display: flex; flex-direction: column; }
#container { flex: 1; max-width: 1120px; margin: 0 auto; width: 100%; padding: 0 24px; }

main.main {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 48px;
  padding: 40px 0 80px;
  align-items: start;
}

/* ── HEADER ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,248,244,0.93);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.inner-header {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.box-header { display: flex; align-items: center; gap: 32px; flex: 1; }

/* 로고 */
.title-logo { flex-shrink: 0; }
.title-logo .link_logo {
  font-family: var(--serif);
  font-size: 19px;
  font-style: italic;
  color: var(--text1);
  letter-spacing: 0.01em;
}
.title-logo .link_logo:hover { color: var(--accent); }
.title-logo .img_logo { height: 32px; width: auto; }

/* GNB */
.area-gnb { flex: 1; min-width: 0; }
.area-gnb nav,
.area-gnb nav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.area-gnb nav li { list-style: none; }
.area-gnb nav a {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text2);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: all var(--tr);
  white-space: nowrap;
}
.area-gnb nav a:hover,
.area-gnb nav li.selected > a,
.area-gnb nav a.selected {
  color: var(--accent);
  border-color: var(--border);
  background: var(--surface);
}

/* 검색 */
.util .search { display: flex; }
.searchInput {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text1);
  font-family: var(--sans);
  font-size: 12px;
  padding: 7px 16px;
  width: 160px;
  outline: none;
  transition: all var(--tr);
}
.searchInput::placeholder { color: var(--text3); }
.searchInput:focus { border-color: var(--accent); width: 200px; }

/* 모바일 메뉴 */
.button-menu { display: none; background: none; border: none; cursor: pointer; padding: 8px; }

/* 슬로건 숨김 */
.area-slogun, .area-align { display: none; }

/* 배너 */
.area-promotion {
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}
.area-promotion::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(250,248,244,0.2), rgba(250,248,244,0.75));
}
.inner-promotion { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; height: 100%; }
.box-promotion { text-align: center; }
.box-promotion strong { font-family: var(--serif); font-size: 48px; color: var(--text1); font-style: italic; display: block; }
.link-promotion {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 28px;
  border: 1px solid var(--border2);
  color: var(--text2);
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  border-radius: 20px;
  transition: all var(--tr);
}
.link-promotion:hover { background: var(--surface); color: var(--accent); border-color: var(--accent); }

/* ── 섹션 레이블 ── */
.sec-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.sec-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ── 목록 제목 ── */
.title-search {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: normal;
  color: var(--text1);
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.title-search span {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text3);
  font-weight: 400;
}

/* ── 아티클 카드 (목록) ── */
.article-type-common {
  display: grid;
  grid-template-columns: 160px 1fr;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  transition: box-shadow var(--tr), transform var(--tr);
  margin-bottom: 14px;
}
.article-type-common:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.article-type-common .thumbnail {
  width: 160px;
  height: 130px;
  background: var(--bg3);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
  overflow: hidden;
}
.article-type-common .img-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-type-common:hover .img-thumbnail { transform: scale(1.04); }

.article-content { padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between; }

.article-content .title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--text1);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--tr);
}
.article-type-common:hover .title { color: var(--accent); }

.article-content .summary {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text2);
  line-height: 1.65;
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.box-meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; }

.link-category {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--tag-bg);
  border: 1px solid #d8cfc4;
  border-radius: 20px;
  padding: 3px 9px;
}

.box-meta .date {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text3);
}
.box-meta .reply {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text3);
}

/* ── 뷰 페이지 ── */
.article-header {
  position: relative;
  min-height: 280px;
  background: var(--bg2);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 36px;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--border);
}
.article-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(250,248,244,0.97) 0%, rgba(250,248,244,0.3) 60%, transparent 100%);
}
.article-header .inner-header {
  position: relative;
  z-index: 1;
  padding: 32px;
  width: 100%;
}
.article-header .box-meta { flex-direction: column; align-items: flex-start; gap: 8px; }
.article-header .category {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.article-header .title-article {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--text1);
  line-height: 1.4;
  max-width: 640px;
}
.article-header .box-info {
  display: flex;
  gap: 16px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text2);
  margin-top: 4px;
}

/* 본문 */
.article-view {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;
  color: var(--text1);
  max-width: 680px;
}
.article-view h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  margin: 2em 0 0.7em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.article-view h3 { font-family: var(--serif); font-size: 18px; color: var(--accent); margin: 1.8em 0 0.6em; }
.article-view p { margin-bottom: 1.3em; }
.article-view img { border-radius: var(--radius-lg); margin: 2em 0; border: 1px solid var(--border); }
.article-view a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.article-view blockquote {
  border-left: 3px solid var(--accent);
  padding: 12px 18px 12px 22px;
  margin: 2em 0;
  color: var(--text2);
  font-style: normal;
  background: var(--bg2);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-view table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 14px; }
.article-view th {
  background: var(--bg2);
  color: var(--text2);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
  border: 1px solid var(--border);
}
.article-view td { padding: 10px 14px; border: 1px solid var(--border); color: var(--text1); font-family: var(--sans); font-size: 15px; }
.article-view tr:hover td { background: var(--bg2); }

/* 아티클 푸터 */
.article-footer { margin-top: 48px; }
.title-footer {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

/* 태그 */
.article-tag { margin-bottom: 28px; }
.box-tag a {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--accent);
  background: var(--tag-bg);
  border: 1px solid #d8cfc4;
  border-radius: 20px;
  padding: 4px 12px;
  margin: 3px 3px 3px 0;
  transition: all var(--tr);
}
.box-tag a:hover { background: var(--accent); color: var(--surface); border-color: var(--accent); }

/* 이전/다음 */
.article-page { margin-bottom: 28px; }
.article-page ul { display: flex; flex-direction: column; gap: 6px; }
.article-page li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 13px;
  transition: all var(--tr);
}
.article-page li a:hover { border-color: var(--border2); background: var(--bg2); }
.article-page li a span {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  flex-shrink: 0;
  width: 36px;
}
.article-page li strong { color: var(--text2); font-weight: 400; }

/* 관련글 */
.article-related { margin-bottom: 28px; }
.list-related { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.item-related .link-related {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--tr);
}
.item-related .link-related:hover { border-color: var(--border2); transform: translateY(-1px); }
.item-related .thumnail {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--bg3);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.item-related .box_content strong { font-size: 12px; color: var(--text1); display: block; line-height: 1.4; margin-bottom: 4px; }
.item-related .box_content .date { font-family: var(--sans); font-size: 10px; color: var(--text3); }

/* 댓글 */
.article-reply { margin-top: 28px; }

/* ── 페이지네이션 ── */
.area-paging {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.area-paging .paging_num {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
}
.area-paging .link_page,
.area-paging .link_num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text2);
  background: var(--surface);
  transition: all var(--tr);
  text-decoration: none;
}
.area-paging .link_page:hover,
.area-paging .link_num:hover,
.area-paging .link_num.selected {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}
.area-paging .no_more_prev,
.area-paging .no_more_next {
  opacity: 0.35;
  pointer-events: none;
}
.area-paging-more { text-align: center; margin-top: 20px; }
.paging-more {
  display: inline-flex;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text3);
  padding: 9px 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all var(--tr);
}
.paging-more:hover { color: var(--accent); border-color: var(--accent); }

/* ── 커버 그룹 ── */
.area-cover { margin-bottom: 48px; }
.title-cover {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: normal;
  color: var(--text1);
  margin-bottom: 18px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
}
.box-cover-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.link-title {
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text3);
  border: 1px solid var(--border);
  padding: 5px 14px;
  border-radius: 20px;
  transition: all var(--tr);
}
.link-title:hover { color: var(--accent); border-color: var(--accent); }

.box-article { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.article-type-crop,
.article-type-resize,
.article-type-thumbnail,
.article-type-poster {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--tr), transform var(--tr);
}
.article-type-crop:hover,
.article-type-resize:hover,
.article-type-thumbnail:hover,
.article-type-poster:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.article-type-crop .thumbnail,
.article-type-resize .thumbnail,
.article-type-thumbnail .thumbnail,
.article-type-poster .thumbnail {
  width: 100%;
  height: 170px;
  background: var(--bg3);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.article-type-crop .thumbnail img,
.article-type-resize .thumbnail img,
.article-type-thumbnail .thumbnail img,
.article-type-poster .thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.article-type-crop:hover .thumbnail img,
.article-type-resize:hover .thumbnail img,
.article-type-thumbnail:hover .thumbnail img,
.article-type-poster:hover .thumbnail img { transform: scale(1.05); }

.button-more {
  display: block;
  width: 100%;
  padding: 11px;
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text3);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all var(--tr);
}
.button-more:hover { color: var(--accent); border-color: var(--accent); }

/* ── 사이드바 ── */
.area-aside { display: flex; flex-direction: column; gap: 14px; }

/* 프로필 - preview 디자인 매치 */
.box-profile {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.box-profile .inner-box {
  padding: 22px 18px;
  background: linear-gradient(to bottom, rgba(244,241,235,0.6), rgba(244,241,235,0.95));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.img-profile {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border2);
  background: var(--bg3);
  margin-bottom: 10px;
}
.tit-g {
  font-family: var(--serif);
  font-size: 15px;
  font-style: italic;
  color: var(--text1);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.text-profile {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text2);
  line-height: 1.6;
}
.box-sns { display: flex; gap: 8px; margin-top: 12px; }
.link-sns {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--tr);
}
.link-sns:hover { border-color: var(--accent); }
.link-sns svg path { fill: var(--text3); transition: fill var(--tr); }
.link-sns:hover svg path { fill: var(--accent); }

.profile-btn-group { display: flex; gap: 6px; margin-top: 12px; }
.btn-g {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--tr);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-h); }
.btn-g:not(.btn-primary):hover { border-color: var(--border2); color: var(--text1); }

/* 사이드바 공통 박스 */
.box-category, .box-tag, .box-recent, .box-reply,
.box-notice, .box-archive, .box-calendar, .box-visit, .box-plugins {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.title-sidebar {
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}
.title-sidebar::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* 카테고리 - 접기/펼치기 가능한 트리 */
.box-category nav,
.box-category nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.box-category nav li { list-style: none; }

/* 대분류 (1뎁스) */
.box-category nav > ul > li > a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 9px 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text1);
  border-bottom: 1px solid var(--border);
  transition: color var(--tr);
}
.box-category nav > ul > li:last-child > a { border-bottom: none; }
.box-category nav > ul > li > a:hover { color: var(--accent); }

/* 하위 분류 (2뎁스) */
.box-category nav ul ul {
  padding: 4px 0 8px 14px;
  margin-bottom: 4px;
  border-left: 2px solid var(--border);
  margin-left: 4px;
}
.box-category nav ul ul li > a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  padding: 5px 8px;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text3);
  border-bottom: none;
  border-radius: var(--radius);
  transition: all var(--tr);
}
.box-category nav ul ul li > a:hover {
  color: var(--accent);
  background: var(--bg2);
}

/* 토글 버튼 (JS로 삽입됨) */
.cat-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: none;
  background: transparent;
  color: var(--text3);
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  transition: transform var(--tr), color var(--tr);
  flex-shrink: 0;
}
.cat-toggle:hover { color: var(--accent); }
.box-category li.has-children.is-open > a > .cat-toggle {
  transform: rotate(180deg);
}
.box-category li.has-children.is-collapsed > a > .cat-toggle {
  transform: rotate(0deg);
}

/* 하위가 있는 li 표시 */
.box-category li.has-children > a {
  cursor: pointer;
}

/* 탭 */
.tab-recent { display: flex; gap: 4px; margin-bottom: 12px; }
.tab-recent li a {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text3);
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  transition: all var(--tr);
}
.tab-recent li.on a,
.tab-recent li a:hover { color: var(--accent); border-color: var(--accent); background: var(--tag-bg); }

/* 최근글 */
.list-recent li { border-bottom: 1px solid var(--border); }
.list-recent li:last-child { border-bottom: none; }
.link-recent { display: flex; gap: 10px; align-items: center; padding: 9px 0; transition: all var(--tr); }
.link-recent:hover strong { color: var(--accent); }
.link-recent .thumbnail {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--bg3);
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.box-recent strong { font-family: var(--sans); font-size: 12px; color: var(--text1); display: block; line-height: 1.4; transition: color var(--tr); }
.box-recent span { font-family: var(--sans); font-size: 10px; color: var(--text3); margin-top: 2px; display: block; }

/* 태그 사이드바 */
.box_tag { display: flex; flex-wrap: wrap; gap: 5px; }
.box_tag a {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--accent);
  background: var(--tag-bg);
  border: 1px solid #d8cfc4;
  border-radius: 20px;
  padding: 3px 10px;
  transition: all var(--tr);
}
.box_tag a:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 방문자 */
.text-total { font-family: var(--serif); font-size: 30px; font-style: italic; color: var(--accent); margin-bottom: 8px; }
.item-visit { font-family: var(--sans); font-size: 11px; color: var(--text3); margin-bottom: 3px; }

/* 사이드바 리스트 */
.list-sidebar a {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text2);
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  transition: color var(--tr);
}
.list-sidebar a:last-child { border-bottom: none; }
.list-sidebar a:hover { color: var(--accent); }

/* 검색 (모바일) */
.util.use-sidebar { display: none; }

/* 빈 결과 */
.box-no-search { text-align: center; padding: 60px 20px; }
.box-no-search span { display: block; font-family: var(--sans); font-size: 13px; color: var(--text3); margin-bottom: 6px; }

/* 보호글 */
.area-protected { text-align: center; padding: 60px 20px; }
.text-protected { font-family: var(--sans); color: var(--text2); margin-bottom: 24px; line-height: 1.7; }
.text-protected span { display: block; font-size: 13px; color: var(--text3); margin-top: 6px; }
.box-protected { display: flex; gap: 8px; justify-content: center; }
.box-protected input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text1);
  font-family: var(--sans);
  font-size: 13px;
  padding: 9px 16px;
  outline: none;
}
.box-protected button {
  padding: 9px 20px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--tr);
}
.box-protected button:hover { background: var(--accent-h); }

/* 태그 페이지 */
.area-tag { padding: 32px 0; }

/* ── 푸터 ── */
#footer {
  border-top: 1px solid var(--border);
  background: var(--bg2);
  margin-top: auto;
}
.inner-footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text3);
}
.box-policy { display: flex; gap: 16px; }
.link-footer { color: var(--text3); transition: color var(--tr); }
.link-footer:hover { color: var(--accent); }
.text-info, address { font-style: normal; }
.box-site button {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text3);
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  cursor: pointer;
  transition: all var(--tr);
}
.box-site button:hover { color: var(--accent); border-color: var(--accent); }

/* ── 반응형 ── */

/* ============================================================ */
/* [기능: 이미지 라이트박스]                                       */
/* 빼는 방법: 이 블록 전체(주석 시작~끝)를 통째로 삭제                */
/*    + 스크립트의 [기능: 이미지 라이트박스 - JS] 블록 삭제           */
/* (HTML 마크업은 JS가 동적 생성하므로 따로 뺄 필요 없음)              */
/* ============================================================ */
.article-view img {
  cursor: zoom-in;
}
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  cursor: zoom-out;
}
.lightbox-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}
.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.25s ease;
  cursor: default;
  border: none;
  margin: 0;
}
.lightbox-overlay.is-open .lightbox-img {
  transform: scale(1);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--sans);
  font-size: 12px;
  max-width: 80vw;
  text-align: center;
  padding: 0 16px;
}
body.lightbox-open {
  overflow: hidden;
}
/* ====== [기능: 이미지 라이트박스] 끝 ====== */

/* ============================================================ */
/* [기능: 읽기 진행률 바]                                         */
/* 빼는 방법: 이 블록 + HTML 블록 + JS 블록 삭제                    */
/* ============================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(to right, var(--accent), var(--accent-h));
  z-index: 200;
  transition: width 0.1s ease-out;
  pointer-events: none;
}
/* ====== [기능: 읽기 진행률 바] 끝 ====== */

/* ============================================================ */
/* [기능: 글 목차 TOC 자동생성]                                    */
/* 빼는 방법: 이 블록 + JS 블록 삭제                                */
/* (HTML은 JS가 동적 생성하므로 따로 뺄 필요 없음)                    */
/* ============================================================ */
.toc-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 14px;
}
.toc-box .title-sidebar { margin-bottom: 12px; }
.toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc-list li { list-style: none; }
.toc-list a {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--text2);
  padding: 6px 8px;
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius) var(--radius) 0;
  line-height: 1.5;
  transition: all var(--tr);
}
.toc-list a:hover {
  color: var(--accent);
  background: var(--bg2);
  border-left-color: var(--accent);
}
.toc-list a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--tag-bg);
  font-weight: 500;
}
.toc-list .toc-h3 {
  padding-left: 22px;
  font-size: 11px;
  color: var(--text3);
}
/* ====== [기능: 글 목차 TOC 자동생성] 끝 ====== */

/* ============================================================ */
/* [기능: 코드블록 복사 버튼]                                      */
/* 빼는 방법: 이 블록 + JS 블록 삭제                                */
/* ============================================================ */
.article-view pre {
  position: relative;
  background: #2d2820;
  color: #ede9e1;
  border-radius: var(--radius);
  padding: 16px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  margin: 1.5em 0;
}
.article-view pre code { font-family: inherit; background: none; padding: 0; color: inherit; }
.article-view code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--bg3);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}
.code-copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: var(--radius);
  cursor: pointer;
  opacity: 0;
  transition: all var(--tr);
}
.article-view pre:hover .code-copy-btn { opacity: 1; }
.code-copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.code-copy-btn.is-copied {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
/* ====== [기능: 코드블록 복사 버튼] 끝 ====== */

/* ============================================================ */
/* [기능: 읽는 시간 표시]                                          */
/* 빼는 방법: 이 블록 + JS 블록 삭제                                */
/* ============================================================ */
.read-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text3);
}
.read-time::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text3);
  margin-right: 4px;
}
/* ====== [기능: 읽는 시간 표시] 끝 ====== */

/* ============================================================ */
/* [기능: 사이드바 sticky 고정]                                    */
/* 빼는 방법: 이 블록만 삭제                                        */
/* ============================================================ */
@media (min-width: 1025px) {
  .area-aside {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border2) transparent;
  }
  .area-aside::-webkit-scrollbar { width: 6px; }
  .area-aside::-webkit-scrollbar-thumb {
    background: var(--border2);
    border-radius: 3px;
  }
  .area-aside::-webkit-scrollbar-track { background: transparent; }
}
/* ====== [기능: 사이드바 sticky 고정] 끝 ====== */

/* ============================================================ */
/* [기능: 관련글 카드 디자인 강화]                                  */
/* 빼는 방법: 이 블록만 삭제                                        */
/* ============================================================ */
.article-related .list-related {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.article-related .item-related .link-related {
  flex-direction: column;
  gap: 0;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.article-related .item-related .link-related:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.article-related .item-related .thumnail {
  width: 100%;
  height: 110px;
  border-radius: 0;
}
.article-related .item-related .box_content {
  padding: 12px 14px;
}
.article-related .item-related .box_content strong {
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* ====== [기능: 관련글 카드 디자인 강화] 끝 ====== */

/* ============================================================ */
/* [기능: 좋아요/공유 버튼]                                        */
/* 빼는 방법: 이 블록 + HTML 블록 + JS 블록 삭제                    */
/* ============================================================ */
.article-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 20px;
  margin: 36px 0 28px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.article-share .share-label {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--text3);
  letter-spacing: 0.06em;
  margin-right: 4px;
}
.share-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--tr);
  padding: 0;
}
.share-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}
.share-btn svg { width: 16px; height: 16px; }
.share-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.share-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text1);
  color: var(--bg);
  padding: 10px 20px;
  border-radius: 20px;
  font-family: var(--sans);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 9998;
}
.share-toast.is-shown {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
/* ====== [기능: 좋아요/공유 버튼] 끝 ====== */

/* ============================================================ */
/* [기능: 페이지 로드 fade-in 애니메이션]                           */
/* 빼는 방법: 이 블록 + JS 블록 삭제                                */
/* ============================================================ */
.fade-in-target {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.fade-in-target.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .fade-in-target {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
/* ====== [기능: 페이지 로드 fade-in 애니메이션] 끝 ====== */

/* ============================================================ */
/* [기능: 메인 Hero 영역]                                          */
/* 빼는 방법: 이 블록 + skin.html의 [기능: 메인 Hero 영역 - HTML] 삭제  */
/* 커스터마이징: 색상/크기 조정은 여기서, 텍스트는 skin.html에서       */
/* ============================================================ */
.hero {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 56px 32px 48px;
  text-align: center;
  margin: -40px -24px 32px;  /* 컨테이너 padding 상쇄해서 가로 풀폭으로 */
  border-radius: 0;
}
.hero-badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--tag-bg);
  border: 1px solid #d4c4ae;
  border-radius: 20px;
  padding: 4px 14px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: 36px;
  color: var(--text1);
  font-weight: normal;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-bottom: 12px;
}
.hero p {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--text2);
  line-height: 1.7;
}

/* 다크모드에서 hero badge 보더 색 조정 */
html[data-theme="dark"] .hero-badge {
  border-color: var(--border2);
}

/* 모바일 반응형 */
@media (max-width: 768px) {
  .hero {
    padding: 40px 20px 36px;
    margin: -24px -24px 24px;
  }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 12px; }
}
/* ====== [기능: 메인 Hero 영역] 끝 ====== */

@media (max-width: 1024px) {
  main.main { grid-template-columns: 1fr; gap: 36px; }
  .area-aside { display: grid; grid-template-columns: repeat(2, 1fr); }
  .box-profile { grid-column: span 2; }
}

@media (max-width: 768px) {
  .inner-header { height: 56px; position: relative; }
  .area-gnb { display: none; }
  .util.use-top { display: none; }
  .button-menu { display: flex; }

  /* 햄버거 클릭 시 펼쳐지는 모바일 GNB */
  .area-gnb.is-open {
    display: block;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px 16px;
    z-index: 99;
  }
  .area-gnb.is-open nav,
  .area-gnb.is-open nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  .area-gnb.is-open nav a {
    display: block;
    padding: 10px 12px;
    border-radius: var(--radius);
  }

  main.main { padding: 24px 0 48px; }
  .article-type-common { grid-template-columns: 1fr; }
  .article-type-common .thumbnail { width: 100%; height: 180px; }
  .box-article { grid-template-columns: 1fr 1fr; }
  .list-related { grid-template-columns: 1fr; }
  .area-aside { grid-template-columns: 1fr; }
  .box-profile { grid-column: span 1; }
  .inner-footer { flex-direction: column; text-align: center; }
  .util.use-sidebar { display: block; margin-top: 16px; }
  .util.use-sidebar .searchInput { width: 100%; border-radius: 20px; }
}

@media (max-width: 480px) {
  .box-article { grid-template-columns: 1fr; }
  .article-header .title-article { font-size: 20px; }
  .area-aside { grid-template-columns: 1fr; }
}

/* ============================================================ */
/* [기능: 플로팅 글쓰기 버튼] (관리자 전용 — skin.html [##_role_group_##]) */
/* 빼는 방법: 이 블록 + skin.html의 .float-write 블록 삭제           */
/* ============================================================ */
.float-write {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 300;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 30px;
  box-shadow: 0 6px 22px rgba(139,111,71,0.38);
  transition: transform var(--tr), background var(--tr), box-shadow var(--tr);
}
.float-write:hover {
  background: var(--accent-h);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(139,111,71,0.45);
  color: #fff;
}
.float-write svg { width: 16px; height: 16px; }
@media (max-width: 768px) {
  .float-write { padding: 14px; border-radius: 50%; right: 16px; bottom: 16px; }
  .float-write span { display: none; }
}
/* ====== [기능: 플로팅 글쓰기 버튼] 끝 ====== */
