/* ================================================
   티스토리 스킨 — Mint & White & Pink Star ★
   ================================================ */

:root {
  --sb-w: 260px;

  /* 색상 */
  --bg:        #F9FDFB;
  --white:     #FFFFFF;
  --mint-xl:   #EBF7F1;   /* 아주 연한 민트 (배경용) */
  --mint-l:    #C9E8D8;   /* 연한 민트 */
  --mint:      #8ECBA3;   /* 메인 민트 */
  --mint-d:    #5BA878;   /* 진한 민트 (텍스트/강조) */
  --pink-l:    #FCEEF0;   /* 연한 핑크 (배경용) */
  --pink:      #F5BCCA;   /* 메인 핑크 포인트 */
  --pink-d:    #E07A8A;   /* 진한 핑크 (hover) */
  --text:      #303030;   /* 본문 텍스트 */
  --mid:       #707070;   /* 중간 텍스트 */
  --light:     #AAAAAA;   /* 연한 텍스트 */
  --border:    #E5F2EB;   /* 테두리 */

  /* ✏️ 폰트 — 전체는 페이퍼로지, 글 본문만 나눔스퀘어 네오 */
  --f-title:  'Paperlogy', sans-serif;
  --f-body:   'Paperlogy', sans-serif;
  --f-en:     'Paperlogy', sans-serif;

  --radius: 16px;
  --ease: 0.3s ease;
}

/* ── 기본 리셋 ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  font-weight: 300;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--ease), opacity var(--ease);
}

img {
  max-width: 100%;
  display: block;
}

ul { list-style: none; }

/* ================================================
   레이아웃 — 좌측 사이드바 + 우측 컨텐츠
   ================================================ */

#wrap {
  display: flex;
  min-height: 100vh;
}

/* ================================================
   사이드바
   ================================================ */

#sidebar {
  width: var(--sb-w);
  min-height: 100vh;
  background: var(--white);
  border-right: 1.5px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

.sb-inner {
  padding: 44px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-height: 100vh;
}

/* 로고 */
.sb-logo a {
  font-family: var(--f-title);
  font-size: 1.45rem;
  font-weight: 700; /* ✏️ 사이드바 블로그 이름 굵기: 100~900 */
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.3;
}

.sb-logo a:hover {
  color: var(--mint-d);
}

.logo-star {
  color: var(--pink);
  font-size: 1.1rem;
}

/* 블로그 설명 */
.sb-desc {
  font-size: 0.78rem;
  color: var(--light);
  line-height: 1.7;
  letter-spacing: 0.01em;
}

/* 네비게이션 */
.sb-nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-nav li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
  color: var(--mid);
  transition: background var(--ease), color var(--ease);
}

.sb-nav li > a:hover,
.sb-nav li.is-on > a {
  background: var(--mint-xl);
  color: var(--mint-d);
}

.sb-nav li.is-on > a {
  font-weight: 500;
}

.nav-icon {
  font-size: 0.9rem;
}

.nav-dot {
  color: var(--mint);
  font-size: 1.2rem;
  line-height: 1;
}

.nav-count {
  font-size: 0.72rem;
  color: var(--light);
  background: var(--mint-xl);
  padding: 1px 7px;
  border-radius: 20px;
  font-style: normal;
  margin-left: auto;
}

/* 서브 카테고리 */
.sub-nav {
  padding-left: 20px;
  margin-top: 2px;
}

.sub-nav li a {
  font-size: 0.78rem;
  padding: 5px 12px;
  display: block;
  color: var(--light);
  border-radius: 8px;
}

.sub-nav li a:hover {
  color: var(--mint-d);
  background: var(--mint-xl);
}

/* 장식 별 */
.sb-deco {
  display: flex;
  gap: 10px;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--mint);
  opacity: 0.45;
  margin-top: auto;
}

/* 검색 */
.sb-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 10px;
}

.sb-search input {
  flex: 1;
  border: none;
  background: none;
  font-size: 0.8rem;
  font-family: var(--f-en);
  color: var(--text);
  outline: none;
}

.sb-search input::placeholder {
  color: var(--light);
}

.sb-search button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--mint);
  transition: color var(--ease);
}

.sb-search button:hover {
  color: var(--pink-d);
}

/* ================================================
   컨텐츠 영역
   ================================================ */

#content {
  flex: 1;
  min-width: 0;
}

/* ================================================
   히어로 섹션
   ================================================ */

/* ================================================
   히어로 — 홈에서만 보임, 사진 꽉 차게
   ================================================ */

#hero {
  /* ✏️ 배경 사진 바꾸려면 아래 background-image URL을 교체하세요
     예시: background-image: url('https://이미지주소.jpg');
     지금은 그라디언트로 대체 중 */
  background-image: linear-gradient(150deg,
    #EBF7F1 0%,
    #F9FDFB 40%,
    #FCEEF5 80%,
    #F9FDFB 100%
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  width: 100%;
  height: 100vh;  /* 화면 전체 높이 */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* 홈일 때 #content가 꽉 차도록 */
body.is-home #content {
  display: flex;
  flex-direction: column;
}

/* 떠다니는 별들 */
.hs {
  position: absolute;
  color: var(--mint-l);
  animation: float 4s ease-in-out infinite;
  user-select: none;
  pointer-events: none;
}

.hs1 { top: 15%; left: 10%; font-size: 1.5rem; animation-delay: 0s;    color: var(--pink); opacity: 0.5; }
.hs2 { top: 22%; right: 15%; font-size: 2.5rem; animation-delay: 0.8s; opacity: 0.35; }
.hs3 { top: 65%; left: 8%;  font-size: 1.1rem; animation-delay: 1.5s;  color: var(--pink-l); opacity: 0.7; }
.hs4 { bottom: 18%; right: 12%; font-size: 2rem; animation-delay: 2s;  opacity: 0.3; }
.hs5 { bottom: 35%; left: 42%; font-size: 1.2rem; animation-delay: 0.4s; color: var(--pink); opacity: 0.45; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%       { transform: translateY(-18px) rotate(12deg); }
}

.hero-text {
  text-align: center;
  z-index: 1;
}

.hero-sub {
  font-family: var(--f-en);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: var(--mint-d);
  margin-bottom: 14px;
  opacity: 0.8;
}

.hero-main {
  font-family: var(--f-title);
  font-size: 5.5rem;   /* ✏️ 히어로 텍스트 크기 */
  font-weight: 700;    /* ✏️ 히어로 텍스트 굵기: 100~900 */
  color: var(--text);
  line-height: 1;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 0.83rem;
  color: var(--light);
  letter-spacing: 0.06em;
}

/* ================================================
   카테고리 헤더 (카테고리 진입 시 상단에 표시)
   ================================================ */

#category-header {
  padding: 52px 48px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cat-header-star {
  color: var(--pink);
  font-size: 1rem;
}

.cat-header-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* ================================================
   메인 영역
   ================================================ */

#main {
  width: 100%;
  padding: 40px 48px 60px;
  max-width: none;
}

/* ================================================
   카드 그리드 (글 목록)
   ================================================ */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 56px;
}

/* 첫 번째 카드 — 피처드 (전체 너비, 크게) */
.card--feat {
  grid-column: 1 / -1;
}

.card--feat .card-img {
  height: 360px;
}

.card--feat .card-title {
  font-size: 1.25rem;
}

/* 카드 공통 */
.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 36px rgba(142, 203, 163, 0.18);
  border-color: var(--mint-l);
}

.card a {
  display: block;
  height: 100%;
}

/* 카드 이미지 */
.card-img {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--mint-xl);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img--empty {
  background: linear-gradient(135deg, var(--mint-xl) 0%, var(--pink-l) 100%);
}

.empty-star {
  font-size: 2rem;
  color: var(--mint-l);
  opacity: 0.7;
}

/* 카드 본문 */
.card-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-cat {
  font-size: 0.68rem;
  font-family: var(--f-en);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--mint-xl);
  color: var(--mint-d);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
  font-weight: 500;
  align-self: flex-start;
}

.card-title {
  font-size: 0.97rem;
  font-weight: 500; /* ✏️ 카드 제목 굵기: 100~900 */
  line-height: 1.55;
  color: var(--text);
}

.card-sum {
  font-size: 0.78rem;
  color: var(--mid);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-date {
  font-size: 0.72rem;
  color: var(--light);
  font-family: var(--f-en);
  letter-spacing: 0.04em;
}

/* ================================================
   페이지네이션
   ================================================ */

.paging {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 72px;
}

.pg {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--mid);
  border: 1.5px solid transparent;
  transition: all var(--ease);
  font-family: var(--f-en);
}

.pg:hover,
.pg.on {
  border-color: var(--mint);
  color: var(--mint-d);
  background: var(--mint-xl);
}

.paging a:not(.pg) {
  font-size: 0.82rem;
  color: var(--light);
  padding: 0 6px;
  font-family: var(--f-en);
}

.paging a:not(.pg):hover {
  color: var(--mint-d);
}

/* ================================================
   글 상세
   ================================================ */

#post {
  max-width: 900px;
  padding-bottom: 80px;
}

/* 글 헤더 */
.post-head {
  margin-bottom: 48px;
}

.post-cat {
  display: inline-block;
  font-size: 0.68rem;
  font-family: var(--f-en);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--pink-l);
  color: var(--pink-d);
  padding: 3px 12px;
  border-radius: 20px;
  font-weight: 500;
  margin-bottom: 14px;
  transition: all var(--ease);
}

.post-cat:hover {
  background: var(--pink);
  color: var(--white);
}

.post-title {
  font-family: var(--f-title);
  font-size: 2.2rem;   /* ✏️ 글 상세 제목 크기 */
  font-weight: 700;    /* ✏️ 글 상세 제목 굵기: 100~900 */
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 14px;
}

.post-date {
  font-size: 0.75rem;
  color: var(--light);
  letter-spacing: 0.12em;
  font-family: var(--f-en);
}

/* 구분선 */
.post-divider {
  width: 28px;
  height: 2px;
  background: var(--mint-l);
  border-radius: 2px;
  margin-top: 24px;
}

/* 글 본문 */
.post-content {
  font-family: 'NanumSquareNeo', var(--f-body), sans-serif;
  font-size: 0.93rem;
  font-weight: 300;  /* ✏️ 글 본문 굵기: 300(얇게) / 400(보통) / 500(약간 굵게) */
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 44px;
}

/* 글 본문 내용만 나눔스퀘어 네오로 표시 */
.post-content,
.post-content p,
.post-content li,
.post-content span,
.post-content strong,
.post-content em,
.post-content b,
.post-content i,
.post-content u,
.post-content a,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6,
.post-content blockquote,
.post-content table,
.post-content th,
.post-content td {
  font-family: 'NanumSquareNeo', var(--f-body), sans-serif;
}

/* 본문 아래 티스토리 카테고리 박스는 스킨 기본 폰트 유지 */
.post-content .another_category,
.post-content .another_category * {
  font-family: var(--f-body);
}

.post-content h2 {
  font-family: var(--f-title);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 2.2em 0 0.7em;
  color: var(--text);
}

.post-content h3 {
  font-family: var(--f-title);
  font-size: 1.2rem;
  font-weight: 400;
  margin: 1.8em 0 0.5em;
  color: var(--text);
}

.post-content p {
  margin-bottom: 1.3em;
}

.post-content img {
  width: 100%;
  border-radius: var(--radius);
  margin: 2em 0;
}

.post-content a {
  color: var(--mint-d);
  border-bottom: 1px dotted var(--mint);
  transition: color var(--ease);
}

.post-content a:hover {
  color: var(--pink-d);
}

.post-content blockquote {
  margin: 2em 0;
  padding: 18px 22px;
  background: var(--mint-xl);
  border-left: 3px solid var(--mint);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--mid);
  font-size: 0.9rem;
}

.post-content code {
  background: var(--mint-xl);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.87em;
  color: var(--mint-d);
}

/* 티스토리 에디터 기본 구분선처럼 얇고 자연스럽게 */
.post-content hr,
.post-content hr[data-ke-style],
.post-content .tt_article_useless_p_margin hr {
  display: block;
  width: 100%;
  height: 0;
  margin: 28px 0;
  padding: 0;
  border: 0;
  border-top: 1px solid #e3ece7;
  background: transparent;
  box-shadow: none;
}



/* 코드 블록: 본문 폰트와 분리하고 highlight.js 문법 강조가 잘 보이도록 정리 */
.post-content pre {
  background: #f6f8fa !important;
  color: #2f3437;
  border: 1px solid #e3e8e5;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 1.8em 0;
  overflow-x: auto;
  line-height: 1.7;
  white-space: pre;
}

.post-content pre,
.post-content pre code,
.post-content pre *,
.post-content code {
  font-family: Consolas, Monaco, 'Courier New', monospace !important;
}

.post-content pre code {
  display: block;
  padding: 0;
  background: transparent !important;
  border-radius: 0;
  font-size: 0.9rem;
  line-height: inherit;
}

.post-content :not(pre) > code {
  background: #f6f8fa;
  color: #2f3437;
  border: 1px solid #e3e8e5;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 0.9em;
}

.post-content pre .hljs {
  background: transparent !important;
  padding: 0 !important;
}

/* 태그 */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 44px;
}

.ptag {
  font-size: 0.75rem;
  color: var(--mid);
  background: var(--white);
  border: 1.5px solid var(--border);
  padding: 4px 14px;
  border-radius: 20px;
  transition: all var(--ease);
}

.ptag:hover {
  background: var(--pink-l);
  border-color: var(--pink);
  color: var(--pink-d);
}

/* 이전/다음 글 */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 60px;
}

.pnav {
  padding: 18px 20px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all var(--ease);
}

.pnav:hover {
  border-color: var(--mint);
  background: var(--mint-xl);
}

.pnav small {
  font-size: 0.7rem;
  color: var(--mint-d);
  font-family: var(--f-en);
  letter-spacing: 0.06em;
}

.pnav strong {
  font-size: 0.83rem;
  font-weight: 400;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pnav--next {
  text-align: right;
}

/* ================================================
   댓글
   ================================================ */

#comments {
  border-top: 1.5px solid var(--border);
  padding-top: 44px;
}

/* ================================================
   글 상세 페이지 레이아웃 조정
   ================================================ */

body.is-post #main {
  padding-top: 72px;
}

/* ================================================
   스크롤바
   ================================================ */

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--mint-l);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--mint);
}

/* ================================================
   반응형
   ================================================ */

@media (max-width: 1100px) {
  :root { --sb-w: 220px; }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card--feat {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  #wrap {
    flex-direction: column;
  }

  #sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1.5px solid var(--border);
  }

  .sb-inner {
    padding: 20px 20px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    min-height: unset;
  }

  .sb-desc,
  .sb-deco,
  .sb-search {
    display: none;
  }

  .sb-nav ul {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .sb-nav li > a {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  #hero {
    height: 70vh;
  }

  .hero-main {
    font-size: 3.5rem;
  }

  #main {
    padding: 36px 20px;
  }

  .post-title {
    font-size: 1.7rem;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }
}

/* 티스토리 기본 카테고리 출력 보정 */
.tistory-category {
  margin-top: 6px;
}

.tistory-category ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tistory-category li {
  margin: 2px 0;
}

.tistory-category a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.84rem;
  color: var(--mid);
  transition: background var(--ease), color var(--ease);
}

.tistory-category a::before {
  content: "·";
  color: var(--mint);
  font-size: 1.2rem;
  line-height: 1;
}

.tistory-category a:hover,
.tistory-category li.is-on > a,
.tistory-category a.selected,
.tistory-category .selected > a {
  background: var(--mint-xl);
  color: var(--mint-d);
}

.tistory-category li.is-on > a,
.tistory-category a.selected,
.tistory-category .selected > a {
  font-weight: 500;
}

/* 티스토리 카테고리 카운트/괄호 정리 */
.tistory-category .c_cnt,
.tistory-category .count {
  font-size: 0.72rem;
  color: var(--light);
  background: var(--mint-xl);
  padding: 1px 7px;
  border-radius: 20px;
  font-style: normal;
  margin-left: auto;
}

/* 하위 카테고리 */
.tistory-category ul ul {
  padding-left: 20px;
  margin-top: 2px;
}

.tistory-category ul ul a {
  font-size: 0.78rem;
  padding: 5px 12px;
  color: var(--light);
  border-radius: 8px;
}

/* ================================================
   글 상세 하단 영역 정리: 관련글 + 이전/다음글
   ================================================ */

/* 티스토리가 본문 끝에 자동으로 넣는 '같은 카테고리의 다른 글' 박스 */
.post-content .another_category,
.another_category {
  width: 100% !important;
  max-width: 100% !important;
  margin: 52px 0 26px !important;
  padding: 18px 18px 16px !important;
  background: rgba(255, 255, 255, 0.68) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: none !important;
  color: var(--mid) !important;
}

.another_category h4,
.another_category h4 a {
  margin: 0 0 12px !important;
  padding: 0 0 10px !important;
  border-bottom: 1px solid var(--border) !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  color: var(--mid) !important;
  letter-spacing: -0.01em !important;
}

.another_category table {
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
}

.another_category th,
.another_category td {
  padding: 7px 0 !important;
  border: 0 !important;
  font-size: 0.78rem !important;
  line-height: 1.6 !important;
  color: var(--light) !important;
}

.another_category th a,
.another_category td a {
  color: var(--mid) !important;
  border: 0 !important;
}

.another_category th a:hover,
.another_category td a:hover {
  color: var(--mint-d) !important;
}

.another_category .date,
.another_category td:last-child {
  text-align: right !important;
  color: var(--light) !important;
  font-family: var(--f-en) !important;
  font-size: 0.72rem !important;
}

/* 이전/다음 글 박스 위치와 크기 보정 */
.post-nav {
  max-width: 100%;
  margin: 10px 0 52px;
  gap: 10px;
}

.post-nav:has(.pnav:only-child) {
  grid-template-columns: 1fr;
}

.pnav {
  min-height: 58px;
  padding: 15px 18px;
  background: rgba(255, 255, 255, 0.72);
}

.pnav small {
  font-size: 0.72rem;
}

.pnav strong {
  font-size: 0.82rem;
}

#comments {
  max-width: 100%;
  margin-top: 20px;
}

/* ================================================
   모바일 레이아웃 최종 보정 — 2026.05.25
   PC용 좌측 사이드바를 모바일에서는 상단 헤더 + 칩 메뉴로 변경
   ================================================ */
@media (max-width: 768px) {
  html {
    font-size: 14px;
  }

  body {
    overflow-x: hidden;
  }

  #wrap {
    display: block;
    width: 100%;
    min-height: 100vh;
  }

  #sidebar {
    position: relative !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    border-right: 0 !important;
    border-bottom: 1.5px solid var(--border) !important;
    background: rgba(255, 255, 255, 0.92);
  }

  .sb-inner {
    min-height: 0 !important;
    height: auto !important;
    padding: 22px 22px 18px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 16px !important;
  }

  .sb-logo a {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 1.55rem;
    line-height: 1.35;
    word-break: keep-all;
  }

  .sb-desc {
    display: none !important;
  }

  .sb-nav {
    width: 100%;
  }

  .tistory-category {
    margin-top: 0 !important;
    width: 100%;
  }

  /* 모바일에서는 카테고리 계층을 칩 메뉴처럼 납작하게 보여줌 */
  .tistory-category ul,
  .tistory-category ul ul,
  .sb-nav ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px 10px !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tistory-category li,
  .sb-nav li {
    display: inline-flex !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .tistory-category a,
  .sb-nav li > a {
    width: auto !important;
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 5px !important;
    padding: 6px 10px !important;
    border-radius: 999px !important;
    font-size: 0.84rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    color: var(--mid) !important;
    background: transparent;
  }

  .tistory-category a:hover,
  .tistory-category li.is-on > a,
  .tistory-category a.selected,
  .tistory-category .selected > a {
    background: var(--mint-xl) !important;
    color: var(--mint-d) !important;
  }

  .tistory-category a::before {
    font-size: 0.95rem !important;
    line-height: 1 !important;
  }

  .tistory-category .c_cnt,
  .tistory-category .count,
  .nav-count {
    margin-left: 4px !important;
    padding: 1px 6px !important;
    font-size: 0.68rem !important;
    line-height: 1.4 !important;
  }

  .sb-deco,
  .sb-search {
    display: none !important;
  }

  #content {
    width: 100% !important;
    min-width: 0 !important;
  }

  #category-header {
    padding: 28px 22px 0 !important;
  }

  #main {
    width: 100% !important;
    max-width: none !important;
    padding: 30px 22px 56px !important;
  }

  .card-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .card-img,
  .card--feat .card-img {
    height: 190px !important;
  }

  #hero {
    width: 100% !important;
    height: 72vh !important;
    min-height: 480px !important;
  }

  .hero-main {
    font-size: 3.4rem !important;
  }

  .hero-sub {
    font-size: 0.68rem !important;
    letter-spacing: 0.22em !important;
  }

  #post {
    width: 100% !important;
    max-width: 100% !important;
    padding-bottom: 64px !important;
  }

  body.is-post #main {
    padding-top: 42px !important;
  }

  .post-head {
    margin-bottom: 34px !important;
  }

  .post-title {
    font-size: 1.72rem !important;
    line-height: 1.45 !important;
    word-break: keep-all;
  }

  .post-content {
    font-size: 0.95rem !important;
    line-height: 2 !important;
    margin-bottom: 36px !important;
  }

  .post-content img {
    width: 100% !important;
    height: auto !important;
  }

  .post-content .another_category,
  .another_category,
  .post-nav,
  #comments {
    width: 100% !important;
    max-width: 100% !important;
  }

  .another_category {
    margin-top: 42px !important;
  }

  .post-nav {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 420px) {
  .sb-inner {
    padding: 20px 18px 16px !important;
  }

  .sb-logo a {
    font-size: 1.38rem;
  }

  #main {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .tistory-category ul,
  .tistory-category ul ul,
  .sb-nav ul {
    gap: 7px 8px !important;
  }

  .tistory-category a,
  .sb-nav li > a {
    padding: 5px 8px !important;
    font-size: 0.78rem !important;
  }

  #hero {
    height: 68vh !important;
    min-height: 420px !important;
  }
}

/* ================================================
   모바일 카테고리 재정리 최종 보정 — 2026.05.25
   칩 메뉴 방식이 티스토리 중첩 카테고리와 충돌해서
   모바일에서는 안정적인 세로/2열 리스트로 표시
   ================================================ */
@media (max-width: 768px) {
  #sidebar {
    position: relative !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    border-right: 0 !important;
    border-bottom: 1.5px solid var(--border) !important;
  }

  .sb-inner {
    display: block !important;
    padding: 24px 24px 20px !important;
    min-height: 0 !important;
  }

  .sb-logo {
    margin-bottom: 22px !important;
  }

  .sb-logo a {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 1.55rem !important;
    line-height: 1.35 !important;
  }

  .sb-desc,
  .sb-deco,
  .sb-search {
    display: none !important;
  }

  .sb-nav,
  .tistory-category {
    width: 100% !important;
    margin: 0 !important;
  }

  /* 최상위 카테고리는 세로로 안정화 */
  .tistory-category > ul,
  .sb-nav > ul {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .tistory-category > ul > li,
  .sb-nav > ul > li {
    display: block !important;
    width: 100% !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
  }

  .tistory-category a,
  .sb-nav li > a {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-height: 34px !important;
    padding: 7px 12px !important;
    border-radius: 12px !important;
    font-size: 0.86rem !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
  }

  .tistory-category .c_cnt,
  .tistory-category .count,
  .nav-count {
    margin-left: auto !important;
    flex-shrink: 0 !important;
  }

  /* 하위 카테고리는 부모 아래에서 2열로 정돈 */
  .tistory-category ul ul,
  .sb-nav ul ul {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px 8px !important;
    width: 100% !important;
    padding: 4px 0 0 18px !important;
    margin: 0 0 2px !important;
  }

  .tistory-category ul ul li,
  .sb-nav ul ul li {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .tistory-category ul ul a,
  .sb-nav ul ul a {
    width: 100% !important;
    min-height: 30px !important;
    padding: 5px 10px !important;
    font-size: 0.8rem !important;
    color: var(--mid) !important;
    background: transparent !important;
  }

  .tistory-category a:hover,
  .tistory-category li.is-on > a,
  .tistory-category a.selected,
  .tistory-category .selected > a {
    background: var(--mint-xl) !important;
    color: var(--mint-d) !important;
  }

  #content,
  #main,
  #post {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
  }
}

@media (max-width: 420px) {
  .sb-inner {
    padding: 22px 18px 18px !important;
  }

  .sb-logo a {
    font-size: 1.42rem !important;
  }

  .tistory-category ul ul,
  .sb-nav ul ul {
    grid-template-columns: 1fr !important;
    padding-left: 14px !important;
  }
}


/* 글 상세 폭 원래처럼 넓게 복구 — 2026.05.25 */
@media (min-width: 769px) {
  body.is-post #main {
    max-width: 900px;
  }

  #post {
    max-width: 900px;
  }

  .post-content .another_category,
  .another_category,
  .post-nav,
  #comments {
    max-width: 100% !important;
  }
}

/* ================================================
   2026.05.25 — 글 상세 폭 960px + 하단 관련글 네이버형 정리
   ================================================ */
@media (min-width: 769px) {
  body.is-post #main {
    max-width: 960px !important;
  }

  #post {
    width: 100% !important;
    max-width: 960px !important;
  }

  .post-content,
  #comments {
    width: 100% !important;
    max-width: 960px !important;
  }
}

/* 이전글/다음글 완전 숨김: 기존 코드가 남아 있어도 화면에 표시되지 않도록 보정 */
.post-nav,
.pnav,
[class*="prev_next"],
[class*="prev-next"] {
  display: none !important;
}

/* 티스토리 자동 '카테고리의 다른 글'을 네이버 블로그 하단 목록 느낌으로 정리 */
.post-content .another_category,
.another_category {
  display: block !important;
  width: 100% !important;
  max-width: 960px !important;
  margin: 64px 0 54px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--mid) !important;
  font-family: var(--f-body) !important;
}

.another_category h4 {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 0 !important;
  padding: 0 0 18px !important;
  border: 0 !important;
  font-size: 0 !important;
  line-height: 1.5 !important;
  color: var(--text) !important;
}

.another_category h4::before {
  content: "이 블로그 카테고리 글";
  display: inline-block;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.another_category h4::after {
  content: "전체글 보기";
  display: inline-block;
  font-size: 0.86rem;
  font-weight: 400;
  color: var(--mid);
}

.another_category h4 a {
  display: none !important;
}

.another_category table {
  width: 100% !important;
  margin: 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  border-top: 1px solid rgba(120, 150, 130, 0.32) !important;
  border-bottom: 1px solid rgba(120, 150, 130, 0.18) !important;
  table-layout: fixed !important;
}

.another_category tr {
  border-bottom: 1px solid rgba(120, 150, 130, 0.14) !important;
}

.another_category tr:last-child {
  border-bottom: 0 !important;
}

.another_category th,
.another_category td {
  padding: 13px 0 !important;
  border: 0 !important;
  background: transparent !important;
  font-size: 0.92rem !important;
  line-height: 1.55 !important;
  vertical-align: middle !important;
  color: var(--mid) !important;
}

.another_category th {
  width: auto !important;
  text-align: left !important;
  font-weight: 400 !important;
}

.another_category th a,
.another_category td a {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  border: 0 !important;
  color: var(--mid) !important;
  font-weight: 400 !important;
}

.another_category th a:hover,
.another_category td a:hover {
  color: var(--mint-d) !important;
}

.another_category .date,
.another_category td:last-child {
  width: 130px !important;
  text-align: right !important;
  color: var(--light) !important;
  font-size: 0.86rem !important;
  font-family: var(--f-en) !important;
  white-space: nowrap !important;
}

/* 모바일에서는 관련글도 화면 폭에 맞게 1열처럼 자연스럽게 정리 */
@media (max-width: 768px) {
  .post-content .another_category,
  .another_category {
    max-width: 100% !important;
    margin: 46px 0 42px !important;
  }

  .another_category h4 {
    align-items: flex-start !important;
    gap: 8px !important;
    padding-bottom: 14px !important;
  }

  .another_category h4::before {
    font-size: 0.95rem !important;
  }

  .another_category h4::after {
    font-size: 0.78rem !important;
    padding-top: 2px;
  }

  .another_category th,
  .another_category td {
    padding: 11px 0 !important;
    font-size: 0.84rem !important;
  }

  .another_category .date,
  .another_category td:last-child {
    width: 82px !important;
    font-size: 0.75rem !important;
  }
}

/* =========================================================
   REAL FINAL — PC 960px 적용 + 글 상세 페이징 제거 + 네이버 블로그식 관련글
   ========================================================= */

@media (min-width: 769px) {
  body.is-post #content {
    flex: 1 1 auto !important;
    width: calc(100vw - var(--sb-w)) !important;
    max-width: none !important;
  }

  body.is-post #main {
    width: min(960px, calc(100vw - var(--sb-w) - 96px)) !important;
    max-width: none !important;
    padding: 72px 0 64px 48px !important;
    margin: 0 !important;
    box-sizing: content-box !important;
  }

  body.is-post .card-grid {
    display: block !important;
    grid-template-columns: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
  }

  body.is-post #post,
  body.is-post .post-head,
  body.is-post .post-content,
  body.is-post #comments {
    width: 100% !important;
    max-width: none !important;
  }
}

/* 글 상세에서 아래에 뜨던 '이전글/다음글'은 사실 .paging 치환자가 만든 것이라 숨김 */
body.is-post .paging,
body.is-post .post-nav,
body.is-post .pnav,
body.is-post [class*="prev_next"],
body.is-post [class*="prev-next"],
body.is-post [class*="article_prev"],
body.is-post [class*="article_next"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

/* 티스토리 자동 관련글을 네이버 블로그식 리스트로 강제 정리 */
body.is-post .another_category,
body.is-post .another_category.another_category_color_gray,
body.is-post .post-content > .another_category,
body.is-post .tt_article_useless_p_margin .another_category {
  clear: both !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 64px 0 56px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: var(--f-body) !important;
  color: var(--mid) !important;
}

body.is-post .another_category h4 {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 0 0 17px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(80, 100, 90, 0.30) !important;
  background: transparent !important;
  color: var(--text) !important;
  font-size: 18px !important;
  line-height: 1.45 !important;
  font-weight: 700 !important;
}

body.is-post .another_category h4 a {
  display: inline !important;
  color: var(--text) !important;
  border: 0 !important;
  font-weight: 700 !important;
}

body.is-post .another_category h4::after {
  content: "전체글 보기";
  flex: 0 0 auto;
  color: var(--mid);
  font-size: 0.86rem;
  font-weight: 400;
}

body.is-post .another_category table {
  width: 100% !important;
  min-width: 100% !important;
  margin: 0 !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
  border: 0 !important;
  background: transparent !important;
}

body.is-post .another_category tbody,
body.is-post .another_category tr {
  width: 100% !important;
}

body.is-post .another_category tr {
  border-bottom: 1px solid rgba(80, 100, 90, 0.12) !important;
  background: transparent !important;
}

body.is-post .another_category tr:hover {
  background: rgba(235, 247, 241, 0.55) !important;
}

body.is-post .another_category th,
body.is-post .another_category td {
  height: auto !important;
  padding: 14px 0 !important;
  border: 0 !important;
  background: transparent !important;
  vertical-align: middle !important;
  color: var(--mid) !important;
  font-size: 16px !important;
  line-height: 1.5 !important;
  font-weight: 400 !important;
}

body.is-post .another_category th {
  width: auto !important;
  text-align: left !important;
}

body.is-post .another_category td {
  width: 140px !important;
  text-align: right !important;
  color: var(--light) !important;
  font-size: 15px !important;
  font-family: var(--f-en) !important;
  white-space: nowrap !important;
}

body.is-post .another_category th a,
body.is-post .another_category td a {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  border: 0 !important;
  color: var(--mid) !important;
  font-weight: 400 !important;
}

body.is-post .another_category th a:hover,
body.is-post .another_category td a:hover {
  color: var(--mint-d) !important;
}

@media (max-width: 768px) {
  body.is-post #main {
    width: auto !important;
    max-width: none !important;
    padding: 36px 20px 54px !important;
  }

  body.is-post .card-grid {
    display: block !important;
  }

  body.is-post .another_category {
    width: 100% !important;
    margin: 46px 0 42px !important;
  }

  body.is-post .another_category h4 {
    padding-bottom: 13px !important;
    font-size: 16px !important;
  }

  body.is-post .another_category h4::after {
    font-size: 0.76rem !important;
  }

  body.is-post .another_category th,
  body.is-post .another_category td {
    padding: 11px 0 !important;
    font-size: 14px !important;
  }

  body.is-post .another_category td {
    width: 82px !important;
    font-size: 13px !important;
  }
}


/* =========================================================
   2026.05.25 — FINAL CLEAN: PC 1200px + 하단 관련글 네이버형 재구성
   ========================================================= */
@media (min-width: 769px) {
  body.is-post #content {
    flex: 1 1 auto !important;
    width: calc(100vw - var(--sb-w)) !important;
    max-width: none !important;
  }

  body.is-post #main {
    width: min(1200px, calc(100vw - var(--sb-w) - 96px)) !important;
    max-width: none !important;
    padding: 72px 0 70px 48px !important;
    margin: 0 !important;
    box-sizing: content-box !important;
  }

  body.is-post .card-grid,
  body.is-post #post,
  body.is-post .post-head,
  body.is-post .post-content,
  body.is-post #comments {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }
}

/* 글 상세에서 이전글/다음글 완전 제거 */
body.is-post .paging,
body.is-post .post-nav,
body.is-post .pnav,
body.is-post [class*="prev_next"],
body.is-post [class*="prev-next"],
body.is-post [class*="article_prev"],
body.is-post [class*="article_next"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}

/* JS로 재구성한 관련글 영역 */
body.is-post .another_category {
  clear: both !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 66px 0 58px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-family: var(--f-body) !important;
}

.mint-related {
  width: 100%;
  max-width: none;
  color: var(--mid);
}

.mint-related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(112, 137, 122, 0.34);
}

.mint-related__title {
  font-size: 1.02rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.mint-related__title b {
  font-weight: 700;
  color: var(--text);
}

.mint-related__all {
  flex: 0 0 auto;
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--mid) !important;
  border: 0 !important;
  text-decoration: none !important;
}

.mint-related__all:hover {
  color: var(--mint-d) !important;
}

.mint-related__list {
  border-bottom: 1px solid rgba(112, 137, 122, 0.18);
}

.mint-related__row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 140px;
  align-items: center;
  gap: 24px;
  min-height: 52px;
  padding: 13px 0;
  border: 0 !important;
  border-bottom: 1px solid rgba(112, 137, 122, 0.13) !important;
  color: var(--mid) !important;
  text-decoration: none !important;
  background: transparent;
}

.mint-related__row:last-child {
  border-bottom: 0 !important;
}

.mint-related__row:hover {
  background: rgba(235, 247, 241, 0.55);
}

.mint-related__row-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.93rem;
  font-weight: 400;
  color: var(--mid);
}

.mint-related__date {
  text-align: right;
  white-space: nowrap;
  font-family: var(--f-en);
  font-size: 0.86rem;
  color: var(--light);
}

.mint-related__empty {
  padding: 18px 0;
  border-bottom: 1px solid rgba(112, 137, 122, 0.18);
  font-size: 0.9rem;
  color: var(--light);
}

@media (max-width: 768px) {
  body.is-post #main {
    width: auto !important;
    max-width: none !important;
    padding: 36px 20px 54px !important;
  }

  body.is-post .another_category {
    margin: 48px 0 42px !important;
  }

  .mint-related__head {
    gap: 12px;
    padding-bottom: 14px;
  }

  .mint-related__title {
    font-size: 0.95rem;
  }

  .mint-related__all {
    font-size: 0.76rem;
  }

  .mint-related__row {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 12px;
    min-height: 46px;
    padding: 11px 0;
  }

  .mint-related__row-title {
    font-size: 0.84rem;
  }

  .mint-related__date {
    font-size: 0.74rem;
  }
}


/* 2026.05.26 — readability font-size adjustment */
.cat-header-title,
#category-header h1,
.category-title {
  font-size: 22px !important;
}

body.is-post .another_category h4 {
  font-size: 18px !important;
}

body.is-post .another_category th,
body.is-post .another_category td {
  font-size: 16px !important;
}

body.is-post .another_category td,
body.is-post .another_category .date,
body.is-post .another_category td:last-child {
  font-size: 15px !important;
}

@media (max-width: 768px) {
  .cat-header-title,
  #category-header h1,
  .category-title {
    font-size: 18px !important;
  }
  body.is-post .another_category h4 {
    font-size: 16px !important;
  }
  body.is-post .another_category th,
  body.is-post .another_category td {
    font-size: 14px !important;
  }
  body.is-post .another_category td,
  body.is-post .another_category .date,
  body.is-post .another_category td:last-child {
    font-size: 13px !important;
  }
}

/* =================================================
   카테고리별 고정 색상
   - 글을 올릴 때마다 바뀌지 않고, 카테고리 이름 기준으로 고정됩니다.
   - 카테고리 이름을 바꾸면 아래 이름 매칭도 함께 수정해야 합니다.
   ================================================= */
.card-grid .card .card-cat,
.post-cat {
  background: #E7F7EF;
  color: #4D9B72;
}

/* webdesign — 초록 */
.card-cat.cat-theme-webdesign,
.post-cat.cat-theme-webdesign {
  background: #E7F7EF !important;
  color: #4D9B72 !important;
}

/* study/웹디필기 — 핑크 */
.card-cat.cat-theme-webdi-pilgi,
.post-cat.cat-theme-webdi-pilgi {
  background: #FFEAF2 !important;
  color: #D36C91 !important;
}

/* study/웹디실기 — 파란색 */
.card-cat.cat-theme-webdi-silgi,
.post-cat.cat-theme-webdi-silgi {
  background: #EAF2FF !important;
  color: #5D7FD6 !important;
}

/* making — 노란색 */
.card-cat.cat-theme-making,
.post-cat.cat-theme-making {
  background: #FFF3D8 !important;
  color: #B98225 !important;
}

/* 2026.05.26 — 목록 화면 최대 폭 확장 + 데스크톱 3열 고정 */
body:not(.is-post):not(.is-home) #main {
  width: 100% !important;
  max-width: none !important;
}

body:not(.is-post):not(.is-home) .card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body:not(.is-post):not(.is-home) #category-header {
  width: 100% !important;
  max-width: none !important;
}

@media (max-width: 1200px) {
  body:not(.is-post):not(.is-home) .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  body:not(.is-post):not(.is-home) .card-grid {
    grid-template-columns: 1fr !important;
  }
}


/* 코드 문법 강조 색상 보강: 밝은 회색 코드박스 안에서 더 또렷하게 보이도록 조정 */
.post-content pre code.hljs {
  color: #2f3437 !important;
}

.post-content pre .hljs-tag,
.post-content pre .hljs-name,
.post-content pre .hljs-selector-tag,
.post-content pre .hljs-selector-class,
.post-content pre .hljs-selector-id {
  color: #c2572f !important;
}

.post-content pre .hljs-attribute,
.post-content pre .hljs-property,
.post-content pre .hljs-keyword,
.post-content pre .hljs-built_in {
  color: #2f6fbd !important;
}

.post-content pre .hljs-string,
.post-content pre .hljs-number,
.post-content pre .hljs-literal,
.post-content pre .hljs-value {
  color: #2f8a57 !important;
}

.post-content pre .hljs-comment {
  color: #8b9691 !important;
  font-style: italic;
}

.post-content pre .hljs-title,
.post-content pre .hljs-function,
.post-content pre .hljs-variable {
  color: #8b5fc7 !important;
}

/* =================================================
   목록 카드 요약 정리
   - 코드/이미지/표가 요약에 섞여 카드가 깨지는 것을 방지
   - 목록에서는 텍스트 요약만 2줄로 표시
   ================================================= */
.card-sum,
.card-sum * {
  font-family: var(--f-body) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.card-sum img,
.card-sum figure,
.card-sum picture,
.card-sum pre,
.card-sum code,
.card-sum iframe,
.card-sum video,
.card-sum table,
.card-sum blockquote {
  display: none !important;
}

.card-img--empty {
  display: none !important;
}

.card:has(.card-img--empty) .card-body,
.card-body:first-child {
  padding-top: 18px;
}


/* =================================================
   목록 카드 대표이미지 처리
   - 대표이미지가 설정된 글: 카드 상단 이미지 표시
   - 대표이미지가 없는 글: 빈 썸네일 박스 숨김
   - 요약문 안에 섞인 이미지/코드/표만 숨김
   ================================================= */
.card .card-img:not(.card-img--empty) {
  display: flex !important;
}

.card .card-img--empty {
  display: none !important;
}

.card-sum img,
.card-sum figure,
.card-sum picture,
.card-sum pre,
.card-sum code,
.card-sum iframe,
.card-sum video,
.card-sum table,
.card-sum blockquote {
  display: none !important;
}

/* =================================================
   목록 카드: 대표 이미지를 오른쪽 작은 썸네일로 표시
   - 대표 이미지가 있는 글만 오른쪽 끝에 썸네일 표시
   - 대표 이미지가 없는 글은 텍스트가 자연스럽게 전체 폭 사용
   - 글 상세 페이지에는 영향 없음
   ================================================= */
body:not(.is-post) .card a {
  display: flex;
  align-items: stretch;
  gap: 14px;
  min-height: 132px;
  height: 100%;
}

body:not(.is-post) .card-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 18px 0 18px 20px;
}

body:not(.is-post) .card .card-img:not(.card-img--empty) {
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  margin: 18px 20px 18px 0;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--mint-xl);
  display: block !important;
}

body:not(.is-post) .card .card-img--empty {
  display: none !important;
}

body:not(.is-post) .card:not(:has(.card-img)) .card-body,
body:not(.is-post) .card:has(.card-img--empty) .card-body {
  padding-right: 20px;
}

body:not(.is-post) .card:has(.card-img:not(.card-img--empty)) .card-body {
  padding-right: 0;
}

body:not(.is-post) .card-sum {
  -webkit-line-clamp: 2;
}

@media (max-width: 720px) {
  body:not(.is-post) .card a {
    gap: 10px;
    min-height: 118px;
  }

  body:not(.is-post) .card-body {
    padding: 16px 0 16px 18px;
  }

  body:not(.is-post) .card .card-img:not(.card-img--empty) {
    flex-basis: 76px;
    width: 76px;
    height: 76px;
    margin: 16px 18px 16px 0;
    border-radius: 12px;
  }

  body:not(.is-post) .card:not(:has(.card-img)) .card-body,
  body:not(.is-post) .card:has(.card-img--empty) .card-body {
    padding-right: 18px;
  }
}

/* =================================================
   목록 카드 썸네일 위치 보정 v2
   - 대표 이미지는 카드 오른쪽 아래에만 작게 표시
   - 카테고리 배지/제목 영역은 건드리지 않음
   - 이미지가 없거나 깨지면 빈 박스가 보이지 않음
   ================================================= */
body:not(.is-post) .card {
  position: relative;
}

body:not(.is-post) .card a {
  display: block !important;
  min-height: 132px;
  height: 100%;
}

body:not(.is-post) .card-body {
  padding: 18px 20px 18px 20px !important;
}

body:not(.is-post) .card:has(.card-img:not(.card-img--empty)) .card-body {
  padding-right: 118px !important;
}

body:not(.is-post) .card .card-img:not(.card-img--empty) {
  position: absolute !important;
  right: 18px;
  bottom: 18px;
  width: 82px !important;
  height: 82px !important;
  margin: 0 !important;
  border-radius: 14px;
  overflow: hidden;
  background: transparent !important;
  display: block !important;
  flex: none !important;
}

body:not(.is-post) .card .card-img img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

body:not(.is-post) .card .card-img--empty,
body:not(.is-post) .card .card-img:empty {
  display: none !important;
}

@media (max-width: 720px) {
  body:not(.is-post) .card a {
    min-height: 118px;
  }

  body:not(.is-post) .card:has(.card-img:not(.card-img--empty)) .card-body {
    padding-right: 100px !important;
  }

  body:not(.is-post) .card .card-img:not(.card-img--empty) {
    right: 16px;
    bottom: 16px;
    width: 72px !important;
    height: 72px !important;
    border-radius: 12px;
  }
}

/* =================================================
   목록 카드 썸네일 최종 보정
   - 대표 이미지는 실제 이미지가 아니라 티스토리 썸네일 URL을 background-image로 표시
   - 카드 오른쪽 아래에만 작게 붙임
   - 대표 이미지가 없는 글은 이미지 영역 자체가 생성되지 않음
   - 카테고리 배지/제목 영역은 건드리지 않음
   ================================================= */
body:not(.is-post) .card {
  position: relative !important;
}

body:not(.is-post) .card a {
  display: block !important;
  min-height: 132px;
  height: 100%;
}

body:not(.is-post) .card-body {
  padding: 18px 20px !important;
}

body:not(.is-post) .card:has(.card-img) .card-body {
  padding-right: 118px !important;
}

body:not(.is-post) .card .card-img {
  position: absolute !important;
  right: 18px;
  bottom: 18px;
  width: 82px !important;
  height: 82px !important;
  margin: 0 !important;
  border-radius: 14px;
  overflow: hidden;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-color: transparent !important;
  display: block !important;
}

body:not(.is-post) .card .card-img:empty:not([style*="background-image"]) {
  display: none !important;
}

@media (max-width: 720px) {
  body:not(.is-post) .card a {
    min-height: 118px;
  }

  body:not(.is-post) .card:has(.card-img) .card-body {
    padding-right: 100px !important;
  }

  body:not(.is-post) .card .card-img {
    right: 16px;
    bottom: 16px;
    width: 72px !important;
    height: 72px !important;
    border-radius: 12px;
  }
}

/* =================================================
   사이드바 카테고리 계층 최종 보정 — 2026.05.27
   - 티스토리 기본 구조: .tt_category > home > .category_list > .sub_category_list
   - home 아래 1단계 카테고리를 하위 카테고리처럼 들여쓰기하지 않음
   - study 아래 웹디필기/웹디실기 같은 2단계만 안쪽으로 표시
   ================================================= */
.tistory-category,
.tistory-category * {
  box-sizing: border-box;
}

.tistory-category ul,
.tistory-category li {
  list-style: none !important;
}

.tistory-category ul {
  margin: 0 !important;
  padding: 0 !important;
}

.tistory-category li {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* 전체보기/home */
.tistory-category .tt_category > li > a,
.tistory-category > ul > li > a {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  width: 100% !important;
  min-height: 34px !important;
  margin: 0 0 8px !important;
  padding: 8px 12px !important;
  border-radius: 12px !important;
  font-size: 0.86rem !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  color: var(--mid) !important;
  background: transparent !important;
}

/* home 아래 1단계: web design, study, making */
.tistory-category .category_list {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.tistory-category .category_list > li {
  display: block !important;
  width: 100% !important;
  margin: 0 0 5px !important;
  padding: 0 !important;
}

.tistory-category .category_list > li > a {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  width: 100% !important;
  min-height: 31px !important;
  padding: 6px 12px !important;
  border-radius: 11px !important;
  font-size: 0.84rem !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  color: var(--mid) !important;
  background: transparent !important;
}

/* 2단계: study 아래 웹디필기/웹디실기 */
.tistory-category .sub_category_list {
  display: block !important;
  width: 100% !important;
  margin: -1px 0 5px !important;
  padding: 0 0 0 18px !important;
}

.tistory-category .sub_category_list > li {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.tistory-category .sub_category_list > li > a {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 5px !important;
  width: 100% !important;
  min-height: 25px !important;
  padding: 3px 8px !important;
  border-radius: 9px !important;
  font-size: 0.78rem !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  color: var(--light) !important;
  background: transparent !important;
}

/* 기존 점 장식이 1단계까지 붙어서 하위처럼 보이던 문제 제거 */
.tistory-category .tt_category > li > a::before,
.tistory-category .category_list > li > a::before,
.tistory-category > ul > li > a::before {
  content: none !important;
}

/* 진짜 하위 카테고리에만 작게 표시 */
.tistory-category .sub_category_list > li > a::before {
  content: "-" !important;
  flex: 0 0 auto !important;
  color: var(--light) !important;
  font-size: 0.78rem !important;
  line-height: 1 !important;
}

.tistory-category .c_cnt,
.tistory-category .count {
  margin-left: auto !important;
  flex-shrink: 0 !important;
  padding: 1px 7px !important;
  border-radius: 20px !important;
  font-size: 0.68rem !important;
  line-height: 1.35 !important;
  color: var(--light) !important;
  background: var(--mint-xl) !important;
}

.tistory-category a:hover,
.tistory-category li.is-on > a,
.tistory-category a.selected,
.tistory-category .selected > a {
  background: var(--mint-xl) !important;
  color: var(--mint-d) !important;
}

@media (max-width: 768px) {
  .tistory-category .tt_category,
  .tistory-category .category_list,
  .tistory-category .sub_category_list {
    display: block !important;
    width: 100% !important;
    grid-template-columns: none !important;
    gap: 0 !important;
  }

  .tistory-category .tt_category > li,
  .tistory-category .category_list > li,
  .tistory-category .sub_category_list > li {
    display: block !important;
    width: 100% !important;
  }

  .tistory-category .tt_category > li > a,
  .tistory-category .category_list > li > a,
  .tistory-category .sub_category_list > li > a {
    display: flex !important;
    width: 100% !important;
    white-space: nowrap !important;
  }

  .tistory-category .sub_category_list {
    padding-left: 18px !important;
  }
}

/* ================================================
   카테고리 사이드바 세로 간격 넓힘 — 2026.05.27
   ================================================ */
.tistory-category .category_list > li {
  margin: 0 0 10px !important;
}

.tistory-category .category_list > li > a {
  min-height: 38px !important;
  padding: 9px 12px !important;
  line-height: 1.45 !important;
}

.tistory-category .sub_category_list {
  margin: 3px 0 9px !important;
  padding-left: 18px !important;
}

.tistory-category .sub_category_list > li {
  margin: 2px 0 !important;
}

.tistory-category .sub_category_list > li > a {
  min-height: 29px !important;
  padding: 5px 8px !important;
  line-height: 1.45 !important;
}

@media (max-width: 768px) {
  .tistory-category .category_list > li {
    margin-bottom: 9px !important;
  }

  .tistory-category .category_list > li > a {
    min-height: 38px !important;
    padding-top: 9px !important;
    padding-bottom: 9px !important;
  }

  .tistory-category .sub_category_list > li > a {
    min-height: 30px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }
}


/* 2026-05-29: 카테고리 목록 페이지네이션 표시 보정 + 관련글 선 제거 */
.paging {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px 0 72px;
}

.paging .pg-nav,
.paging .pg {
  border: 0 !important;
  background: transparent !important;
  text-decoration: none !important;
}

.paging .pg-nav {
  font-size: 0.82rem;
  color: var(--mid) !important;
  padding: 6px 10px;
}

.paging .no-more-prev,
.paging .no-more-next {
  opacity: .35;
  pointer-events: none;
}

/* 글 상세 하단 '이 블로그 카테고리 글'의 가로선 제거 */
.mint-related__head,
.mint-related__list,
.mint-related__row,
body.is-post .another_category h4,
body.is-post .another_category table,
body.is-post .another_category tr,
.another_category table,
.another_category tr {
  border: 0 !important;
  border-bottom: 0 !important;
  border-top: 0 !important;
}

.mint-related__row:hover,
body.is-post .another_category tr:hover {
  background: transparent !important;
}


/* =================================================
   티스토리 코드블록 - 선택한 언어 라벨 표시 버전
   - 코드블럭 삽입창에서 Bash / HTML / CSS 등을 선택하면
     글 본문 코드박스 오른쪽 위에 자동으로 표시됨
   ================================================= */
.post-content pre.pretty-code-block,
.post-content pre[data-code-label] {
  position: relative !important;
  margin: 1.8em 0 !important;
  padding: 62px 24px 22px 54px !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: linear-gradient(to bottom, #383b48 0, #383b48 42px, #242832 42px, #242832 100%) !important;
  color: #c9d1d9 !important;
  overflow-x: auto !important;
  line-height: 1.75 !important;
  white-space: pre !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08) !important;
}

/* 우측 상단 언어 라벨 */
.post-content pre.pretty-code-block::before,
.post-content pre[data-code-label]::before {
  content: attr(data-code-label);
  position: absolute;
  top: 0;
  right: 18px;
  height: 42px;
  display: flex;
  align-items: center;
  color: #ff8a5c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .4px;
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif !important;
}

/* 좌측 동그라미 3개 */
.post-content pre.pretty-code-block::after,
.post-content pre[data-code-label]::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff6159;
  box-shadow: 20px 0 0 #ffbd44, 40px 0 0 #28c840;
}

.post-content pre.pretty-code-block code,
.post-content pre[data-code-label] code,
.post-content pre.pretty-code-block code.hljs,
.post-content pre[data-code-label] code.hljs {
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  color: #c9d1d9 !important;
  font-size: 0.9rem !important;
  line-height: inherit !important;
  font-family: Consolas, Monaco, 'D2Coding', 'Courier New', monospace !important;
}

/* 다크 코드박스 문법 강조 색상 */
.post-content pre.pretty-code-block .hljs-tag,
.post-content pre.pretty-code-block .hljs-name,
.post-content pre.pretty-code-block .hljs-selector-tag,
.post-content pre.pretty-code-block .hljs-selector-class,
.post-content pre.pretty-code-block .hljs-selector-id,
.post-content pre[data-code-label] .hljs-tag,
.post-content pre[data-code-label] .hljs-name,
.post-content pre[data-code-label] .hljs-selector-tag,
.post-content pre[data-code-label] .hljs-selector-class,
.post-content pre[data-code-label] .hljs-selector-id {
  color: #ff7b8a !important;
}

.post-content pre.pretty-code-block .hljs-attribute,
.post-content pre.pretty-code-block .hljs-property,
.post-content pre.pretty-code-block .hljs-keyword,
.post-content pre.pretty-code-block .hljs-built_in,
.post-content pre[data-code-label] .hljs-attribute,
.post-content pre[data-code-label] .hljs-property,
.post-content pre[data-code-label] .hljs-keyword,
.post-content pre[data-code-label] .hljs-built_in {
  color: #ffd166 !important;
}

.post-content pre.pretty-code-block .hljs-string,
.post-content pre.pretty-code-block .hljs-number,
.post-content pre.pretty-code-block .hljs-literal,
.post-content pre.pretty-code-block .hljs-value,
.post-content pre[data-code-label] .hljs-string,
.post-content pre[data-code-label] .hljs-number,
.post-content pre[data-code-label] .hljs-literal,
.post-content pre[data-code-label] .hljs-value {
  color: #8bd5a7 !important;
}

.post-content pre.pretty-code-block .hljs-comment,
.post-content pre[data-code-label] .hljs-comment {
  color: #7d8594 !important;
  font-style: italic;
}

.post-content pre.pretty-code-block .hljs-title,
.post-content pre.pretty-code-block .hljs-function,
.post-content pre.pretty-code-block .hljs-variable,
.post-content pre[data-code-label] .hljs-title,
.post-content pre[data-code-label] .hljs-function,
.post-content pre[data-code-label] .hljs-variable {
  color: #b993ff !important;
}

@media (max-width: 768px) {
  .post-content pre.pretty-code-block,
  .post-content pre[data-code-label] {
    padding: 58px 18px 20px 42px !important;
    font-size: 13px !important;
  }
}

/* =================================================
   코드블록 색상 재수정
   - 기존 밝은 글자색은 유지
   - HTML 속성명(lang, charset, content 등)처럼 갈색/노란색으로 보이던 부분만 밝게 변경
   - 우측 상단 언어 라벨은 선택 언어별 색상 적용
   ================================================= */
.post-content pre.pretty-code-block .hljs-attr,
.post-content pre.pretty-code-block .hljs-attribute,
.post-content pre.pretty-code-block .hljs-property,
.post-content pre[data-code-label] .hljs-attr,
.post-content pre[data-code-label] .hljs-attribute,
.post-content pre[data-code-label] .hljs-property {
  color: #e6edf3 !important;
}

.post-content pre.pretty-code-block[data-code-label="HTML"]::before,
.post-content pre[data-code-label="HTML"]::before {
  color: #ff6b6b !important;
}

.post-content pre.pretty-code-block[data-code-label="CSS"]::before,
.post-content pre[data-code-label="CSS"]::before {
  color: #4dabf7 !important;
}

.post-content pre.pretty-code-block[data-code-label="JS"]::before,
.post-content pre.pretty-code-block[data-code-label="TS"]::before,
.post-content pre[data-code-label="JS"]::before,
.post-content pre[data-code-label="TS"]::before {
  color: #ffd43b !important;
}

.post-content pre.pretty-code-block[data-code-label="BASH"]::before,
.post-content pre.pretty-code-block[data-code-label="SHELL"]::before,
.post-content pre[data-code-label="BASH"]::before,
.post-content pre[data-code-label="SHELL"]::before {
  color: #69db7c !important;
}

.post-content pre.pretty-code-block[data-code-label="PYTHON"]::before,
.post-content pre[data-code-label="PYTHON"]::before {
  color: #ffd43b !important;
}

.post-content pre.pretty-code-block[data-code-label="SQL"]::before,
.post-content pre[data-code-label="SQL"]::before {
  color: #b197fc !important;
}

.post-content pre.pretty-code-block[data-code-label="JAVA"]::before,
.post-content pre.pretty-code-block[data-code-label="KOTLIN"]::before,
.post-content pre.pretty-code-block[data-code-label="PHP"]::before,
.post-content pre.pretty-code-block[data-code-label="RUBY"]::before,
.post-content pre.pretty-code-block[data-code-label="GO"]::before,
.post-content pre.pretty-code-block[data-code-label="SWIFT"]::before,
.post-content pre[data-code-label="JAVA"]::before,
.post-content pre[data-code-label="KOTLIN"]::before,
.post-content pre[data-code-label="PHP"]::before,
.post-content pre[data-code-label="RUBY"]::before,
.post-content pre[data-code-label="GO"]::before,
.post-content pre[data-code-label="SWIFT"]::before {
  color: #ffa94d !important;
}

/* 카드 하단 대표이미지 썸네일 보강 */
.card-img--auto {
  display: block;
  border-top: 1px solid var(--border);
}


/* 대표이미지 썸네일 최종 v2 - 티스토리 기본 조건 태그 사용 */
body:not(.is-post) .card .card-img img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;
  border-radius: inherit !important;
}

body:not(.is-post) .card:not(:has(.card-img)) .card-body {
  padding-right: 20px !important;
}

body:not(.is-post) .card:has(.card-img) .card-body {
  padding-right: 118px !important;
}
