/* 기본 폰트 */
@font-face {
    font-family: 'omyu_pretty';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2304-01@1.0/omyu_pretty.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* 코드블럭용 특수 폰트 */
@font-face {
    font-family: 'GangwonEduSaeeum_OTFMediumA';
    src: url('https://fastly.jsdelivr.net/gh/projectnoonnu/noonfonts_2201-2@1.0/GangwonEduSaeeum_OTFMediumA.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* 색상 변수 정의 */
:root {
  /* 파스텔 색상 팔레트 */
  --pastel-blue: #e3f2fd;
  --pastel-pink: #fce4ec;
  --pastel-purple: #f3e5f5;
  --pastel-yellow: #fff9c4;
  --pastel-mint: #e0f2f1;
  
  /* 메인 색상 */
  --accent-color: #7c93ff;
  --accent-hover: #6b82ee;
  --text-primary: #2c3e50;
  --text-secondary: #7f8c8d;
  --border-color: #e0e0e0;
  --background: #fafafa;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'omyu_pretty', -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  background: var(--background);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 티스토리 기본 폰트 오버라이드 */
.tt_article_useless_p_margin,
.contents_style {
  font-family: 'omyu_pretty', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif !important;
}

/* 티스토리 기본 요소 숨기기 */
#menubar,
.area_toolbar,
.tt_menubar_tools,
.tt_menubar_login,
.menu_toolbar,
.tt-menubar,
#ttoolbar,
.toolbar,
.another_category,
.btn_toolbar,
[class*="toolbar"],
[id*="toolbar"],
#daumLogo,
#daumHead,
#mEtc,
#daumGnb,
.wrap_toolbar {
  display: none !important;
}

/* 헤더 스타일 */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: all 0.3s ease;
}

.site-header.hero-header {
  z-index: 100 !important;
}

.site-header.hero-header .site-title a,
.site-header.hero-header .header-controls button {
  color: white;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px; /* 헤더 좌우 여백 줄임 */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s;
}

.site-title a:hover {
  color: var(--accent-color);
}

.header-controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

.menu-toggle,
.search-toggle {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.menu-toggle:hover,
.search-toggle:hover {
  opacity: 0.7;
}

/* 사이드바 스타일 */
.sidebar {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar.active {
  right: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 30px 30px 20px;
}

.sidebar-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.sidebar-close {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.5;
  line-height: 1;
}

.sidebar-close:hover {
  opacity: 1;
}

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 999;
}

.sidebar-overlay.active {
  display: block;
}

.sidebar-content {
  padding: 20px;
}

.sidebar-section {
  margin-bottom: 30px;
}

.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-links li {
  margin-bottom: 15px;
}

.sidebar-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
  transition: color 0.3s;
}

.sidebar-links a:hover {
  color: var(--accent-color);
}

/* 검색 모달 */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  z-index: 1001;
  align-items: center;
  justify-content: center;
}

.search-modal.active {
  display: flex;
}

.search-modal-content {
  position: relative;
  width: 90%;
  max-width: 600px;
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.search-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.search-close:hover {
  color: var(--text-primary);
}

.search-modal form {
  display: flex;
  gap: 15px;
}

.search-modal input[type="text"] {
  flex: 1;
  padding: 15px 20px;
  border: 2px solid var(--border-color);
  border-radius: 10px;
  font-size: 1.1rem;
  transition: border-color 0.3s;
}

.search-modal input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* 검색 모달 폼 */
.search-form-wrapper {
  display: flex;
  gap: 15px;
  align-items: center;
}

.search-submit-btn {
  padding: 12px 20px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-submit-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}

/* 사이드바 검색 */
.sidebar-search {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.sidebar-search-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.9rem;
  background: white;
  transition: border-color 0.3s;
}

.sidebar-search-input:focus {
  outline: none;
  border-color: var(--accent-color);
}

.sidebar-search-btn {
  padding: 10px 14px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-search-btn:hover {
  background: var(--accent-hover);
}

/* 메인 콘텐츠 */
.main-content {
  flex: 1;
  padding-top: 0;
}

/* 히어로 캐러셀 */
.hero-carousel {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: none;
  margin-bottom: 60px;
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.slide-background.default-bg {
  background: linear-gradient(135deg, var(--pastel-purple), var(--pastel-pink));
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.5) 100%
  );
  z-index: 1;
}

.slide-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  padding: 0 40px;
  max-width: 800px;
}

.slide-number {
  font-size: 5rem;
  font-weight: 700;
  opacity: 0.2;
  margin-bottom: 20px;
  line-height: 1;
}

.slide-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-excerpt {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 30px;
  line-height: 1.6;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.slide-link {
  display: inline-block;
  padding: 15px 40px;
  background: white;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 30px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.slide-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  background: var(--accent-color);
  color: white;
}

/* 캐러셀 컨트롤 */
.carousel-prev,
.carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.carousel-prev {
  left: 40px;
}

.carousel-next {
  right: 40px;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 캐러셀 인디케이터 */
.carousel-indicators {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  background: white;
  width: 30px;
  border-radius: 6px;
}

.carousel-indicator:hover {
  background: white;
}

/* 캐러셀 내 구독 버튼 */
.hero-carousel .subscribe-btn {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 40px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 3;
  box-shadow: 0 4px 15px rgba(124, 147, 255, 0.3);
}

.hero-carousel .subscribe-btn:hover {
  transform: translateX(-50%) translateY(-3px);
  box-shadow: 0 6px 20px rgba(124, 147, 255, 0.4);
  background: var(--accent-hover);
}

/* 포스트 리스트 섹션 */
.post-list-section {
  padding: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

/* 검색 정보 표시 - 헤더와 겹치지 않도록 여백 조정 */
.search-info {
  display: none;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  color: var(--text-primary);
  flex-grow: 1; /* 남은 공간 차지 */
}

/* 검색 페이지에서만 검색 정보 표시 및 레이아웃 조정 */
body.tt-body-search .search-info {
  display: flex;
}

/* 검색 페이지 전체 섹션 헤더와 겹침 방지 */
body.tt-body-search .post-list-section {
  padding-top: 100px; /* 헤더 높이 고려한 상단 여백 */
  min-height: calc(100vh - 100px); /* 최소 높이 설정 */
}

body.tt-body-search .section-header {
  padding-top: 20px; /* 섹션 내부 여백 */
  margin-bottom: 40px;
  background: white; /* 배경색 추가로 구분 명확히 */
  border-radius: 12px;
  padding: 20px;
}

/* 기본적으로 컨트롤 버튼은 우측 정렬 */
.section-controls {
  margin-left: auto;
}

/* 검색 페이지 레이아웃 조정 */
body.tt-body-search .main-content {
  padding-top: 0; /* post-list-section이 패딩 처리 */
}

body.tt-body-search .post-list {
  margin-top: 0;
}

/* 빈 검색 정보 숨기기 */
.search-info:empty,
.search-keyword:empty ~ .search-count {
  display: none;
}

.search-info svg {
  color: var(--text-secondary);
}

.search-keyword {
  font-weight: 600;
  color: var(--text-primary);
}

.search-count {
  color: var(--text-secondary);
  font-weight: normal;
}

.section-title {
  display: none;
}

.section-controls {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.view-toggles {
  display: flex;
  gap: 5px;
  background: var(--pastel-blue);
  padding: 5px;
  border-radius: 10px;
}

.view-toggle {
  background: transparent;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
  color: var(--text-secondary);
}

.view-toggle.active {
  background: white;
  color: var(--accent-color);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.view-toggle:hover:not(.active) {
  background: rgba(255, 255, 255, 0.5);
}

/* 포스트 그리드 */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

/* 리스트 뷰 - 좌측 썸네일, 우측 내용 레이아웃 */
.post-grid.list-view {
  grid-template-columns: 1fr;
  gap: 20px;
}

.post-grid.list-view .post-card {
  display: block;
  height: auto;
  min-height: 200px;
}

.post-grid.list-view .post-card-link {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  height: 100%;
  min-height: 200px; /* 최소 높이 설정 */
}

.post-grid.list-view .post-card-thumbnail {
  width: 300px;
  min-width: 300px;
  height: 100%; /* 부모 높이의 100% 차지 */
  min-height: 200px;
  border-radius: 12px 0 0 12px;
  flex-shrink: 0;
}

.post-grid.list-view .post-card-content {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.post-grid.list-view .post-card-title {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.post-grid.list-view .post-card-excerpt {
  display: block;
  -webkit-line-clamp: 2; /* 리스트뷰도 2줄로 통일 */
  max-height: none; /* 리스트뷰에서는 높이 제한 해제 */
}

/* 포스트 카드 */
.post-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  height: 400px; /* 높이를 줄여서 공간 확보 */
  display: flex;
  flex-direction: column;
  position: relative;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.post-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card-thumbnail {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--pastel-blue);
  flex-shrink: 0;
}

.post-thumbnail-bg {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail-bg {
  transform: scale(1.05);
}

.default-thumbnail {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--pastel-purple), var(--pastel-pink));
  display: flex;
  align-items: center;
  justify-content: center;
}

.year-label {
  font-size: 3rem;
  font-weight: 700;
  color: white;
  opacity: 0.3;
}

.post-card-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.post-card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.35;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-card-title .title-text {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex: 1;
}

.title-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  flex-shrink: 0;
}

/* 카테고리 표시 제거됨 - 레이아웃 문제 해결을 위해 */
.post-card-category {
  display: none;
}

.post-new-badge {
  display: inline-block;
  padding: 3px 8px;
  background: #ff6b6b;
  color: white;
  font-size: 0.7rem;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 3px rgba(255, 107, 107, 0.3);
}

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6; /* 라인 높이 증가 */
  margin-bottom: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* 3줄에서 2줄로 줄임 */
  -webkit-box-orient: vertical;
  flex: 1;
  min-height: 2.88rem; /* 2줄 * 0.9rem * 1.6 line-height = 2.88rem */
  max-height: 2.88rem; /* 최대 높이도 고정 */
}

.post-card-meta {
  display: flex;
  justify-content: flex-end; /* 우측 정렬 */
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

.post-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: right;
}

/* 페이지네이션 */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 60px;
  padding: 20px;
}

/* 페이지 번호 스타일 */
.page-numbers {
  display: flex;
  gap: 8px;
}

.page-num {
  padding: 10px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  background: white;
  cursor: pointer;
}

.page-num:hover {
  background: var(--pastel-blue);
  border-color: var(--accent-color);
  transform: translateY(-2px);
}

/* 현재 페이지 스타일 - Tistory가 span.selected를 자동으로 추가 */
.page-num span.selected {
  display: inline-block;
  padding: 10px 15px;
  background: var(--accent-color);
  color: white;
  border-radius: 8px;
  border: 1px solid var(--accent-color);
  margin: -10px -15px; /* 부모 padding 상쇄 */
}

.page-btn.prev,
.page-btn.next {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px !important;
  background: var(--pastel-purple) !important;
  border: none !important;
  font-weight: 500;
  width: 44px;
  height: 44px;
}

.page-btn.prev:hover,
.page-btn.next:hover {
  background: var(--accent-color) !important;
  color: white;
  transform: translateY(-2px);
}

.page-btn svg {
  flex-shrink: 0;
}

/* 포스트 히어로 섹션 */
.post-hero {
  position: relative;
  width: 100%;
  height: 40vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 60px;
}

.post-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}

.post-hero-bg.default-hero-bg {
  background: linear-gradient(135deg, var(--pastel-purple), var(--pastel-pink));
}

.post-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 1;
}

.post-hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  padding: 0 40px;
  max-width: 1200px;
}

.post-hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.post-hero-meta {
  font-size: 0.9rem;
  opacity: 0.95;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.9);
}

.post-hero-category {
  font-weight: 400;
  font-size: 0.85rem;
}

.separator {
  opacity: 0.7;
}

.post-hero-date {
  font-weight: 400;
  font-size: 0.85rem;
}

/* 싱글 포스트 컨테이너 - 전체 배경 */
body {
  background: #f5f5f5 !important;
}

/* 중앙 콘텐츠 영역 */
.single-post {
  max-width: 1000px;
  margin: 20px auto;
  background: white;
  min-height: calc(100vh - 40px);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.08);
  position: relative;
  padding: 50px 80px;
  border-radius: 20px;
}

.post-content {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 40px;
}

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin-top: 2em;
  margin-bottom: 1em;
  font-weight: 600;
  line-height: 1.3;
}

.post-content h1 {
  font-size: 2rem;
}

.post-content h2 {
  font-size: 1.7rem;
}

.post-content h3 {
  font-size: 1.4rem;
}

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

/* 티스토리 특수 클래스 대응 - 더 강력한 선택자 */
.tt_article_useless_p_margin p,
.contents_style p,
div[class*="article"] p,
div[class*="content"] p,
.post-content p,
article p {
  font-size: 1.25rem !important;
  line-height: 1.9 !important;
  font-family: 'omyu_pretty', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif !important;
}

/* 티스토리 에디터 제목 태그 우선순위 강화 */
.tt_article_useless_p_margin h1,
.contents_style h1,
.post-content h1 {
  font-size: 3rem !important;
  margin-top: 2em !important;
  margin-bottom: 1em !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

.tt_article_useless_p_margin h2,
.contents_style h2,
.post-content h2 {
  font-size: 2.5rem !important;
  margin-top: 2em !important;
  margin-bottom: 1.2em !important;
  padding-bottom: 0.3em !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  position: relative !important;
}

/* H2 그라데이션 언더라인 강화 - 더 진한 색상 */
.tt_article_useless_p_margin h2::after,
.contents_style h2::after,
.post-content h2::after {
  content: '' !important;
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 5px !important;
  background: linear-gradient(90deg, 
    #9c27b0 0%,    /* 진한 보라 */
    #2196f3 25%,   /* 진한 파랑 */
    #00bcd4 50%,   /* 진한 민트 */
    #e91e63 75%,   /* 진한 핑크 */
    #ffc107 100%) !important;  /* 진한 노랑 */
  border-radius: 2px !important;
  opacity: 0.7 !important;
}

.tt_article_useless_p_margin h3,
.contents_style h3,
.post-content h3 {
  font-size: 1.8rem !important;
  margin-top: 1.8em !important;
  margin-bottom: 0.8em !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

.tt_article_useless_p_margin h4,
.contents_style h4,
.post-content h4 {
  font-size: 1.5rem !important;
  margin-top: 1.5em !important;
  margin-bottom: 0.7em !important;
  font-weight: 600 !important;
}

/* 코드블럭 인라인 스타일 오버라이드 - 더 강력한 선택자 */
pre[data-ke-type="codeblock"],
pre.hljs,
.tt_article_useless_p_margin pre,
.contents_style pre,
.post-content pre,
div[class*="article"] pre,
div[class*="content"] pre,
.post-content pre[data-ke-type="codeblock"],
.post-content .hljs {
  background: var(--pastel-blue) !important;
  padding: 0.5em !important;
  border-radius: 12px !important;
  margin: 1em 0 !important;
  font-family: 'GangwonEduSaeeum_OTFMediumA', 'Courier New', monospace !important;
  font-size: 1.35rem !important;
  line-height: 1.8 !important;
  overflow-x: auto !important;
  display: block !important;
  border: none !important;
  box-shadow: none !important;
}

/* 코드블럭 내부 code 태그 */
pre[data-ke-type="codeblock"] code,
pre.hljs code,
.tt_article_useless_p_margin pre code,
.contents_style pre code,
.post-content pre code,
div[class*="article"] pre code,
div[class*="content"] pre code {
  background: transparent !important;
  padding: 0 !important;
  border: none !important;
  font-size: 1.35rem !important;
  font-family: 'GangwonEduSaeeum_OTFMediumA', 'Courier New', monospace !important;
  color: inherit !important;
}

/* 인라인 코드 스타일 강화 - 백틱 스타일 */
code:not(pre code),
.tt_article_useless_p_margin code:not(pre code),
.contents_style code:not(pre code),
.post-content code:not(pre code),
div[class*="article"] code:not(pre code),
div[class*="content"] code:not(pre code),
p code,
li code,
td code {
  background: rgba(175, 184, 193, 0.2) !important;
  padding: 0.2em 0.4em !important;
  border-radius: 6px !important;
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace !important;
  font-size: 0.875em !important;
  color: #e01e5a !important;
  border: 1px solid rgba(175, 184, 193, 0.2) !important;
  white-space: break-spaces !important;
  word-break: break-word !important;
  display: inline !important;
}

/* TOC (Table of Contents) 스타일 */
.toc-container {
  position: fixed;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 250px;
  max-width: 250px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 20px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.06);
  z-index: 50;
}

.toc-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text-primary);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--pastel-purple);
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item {
  margin-bottom: 8px;
}

.toc-item.toc-h2 {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 8px;
  padding-left: 0;
}

.toc-item.toc-h3 {
  font-size: 0.9rem;
  padding-left: 15px;
  margin-bottom: 6px;
}

.toc-item.toc-h4 {
  font-size: 0.85rem;
  padding-left: 30px;
  color: var(--text-secondary);
}

.toc-link {
  color: var(--text-primary);
  text-decoration: none;
  display: block;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toc-link:hover {
  background: var(--pastel-blue);
  color: var(--accent-color);
  transform: translateX(5px);
}

.toc-link.active {
  background: var(--pastel-purple);
  color: var(--accent-color);
  font-weight: 500;
}

/* 작은 화면에서 TOC 숨기기 */
@media (max-width: 1400px) {
  .toc-container {
    display: none;
  }
  
  .single-post {
    max-width: calc(100% - 40px);
    margin: 20px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
  }
}

@media (max-width: 768px) {
  .single-post {
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    padding: 30px 20px;
    box-shadow: none;
  }
  
  body {
    background: white !important;
  }
}

/* 티스토리 자동 생성 액션 버튼 숨기기 (커스텀 버튼 제외) */
.container_postbtn:not(.post-actions .postbtn_like),
#post_button_group,
.postbtn_ccl,
.wrap_btn_etc {
  display: none !important;
}

/* 기본 티스토리 버튼 컨테이너만 숨기기 */
body > .container_postbtn,
.single-post > .container_postbtn {
  display: none !important;
}

/* 우리 커스텀 버튼 내의 postbtn_like는 표시 */
.post-actions .postbtn_like {
  display: block !important;
}

/* 리스트 페이지에서 광고 숨기기 */
.tt-body-index .revenue_unit_wrap,
.tt-body-category .revenue_unit_wrap,
.tt-body-search .revenue_unit_wrap,
.tt-body-tag .revenue_unit_wrap,
.list-section .revenue_unit_wrap,
.post-grid .revenue_unit_wrap {
  display: none !important;
}

/* 리스트 페이지의 모든 광고 숨기기 */
.tt-body-index ins.adsbygoogle,
.tt-body-category ins.adsbygoogle,
.tt-body-search ins.adsbygoogle,
.tt-body-tag ins.adsbygoogle,
.tt-body-index .kakao_ad_area,
.tt-body-category .kakao_ad_area,
.tt-body-search .kakao_ad_area,
.tt-body-tag .kakao_ad_area {
  display: none !important;
}

/* hljs (highlight.js) 파라미터 색상 변경 */
.hljs-params {
  color: #d73a49 !important; /* 빨간색 계열 */
}

/* 다른 hljs 클래스들도 가독성 개선 */
.hljs-keyword {
  color: #d73a49 !important; /* 빨간색 */
}

.hljs-string {
  color: #032f62 !important; /* 진한 파란색 */
}

.hljs-comment {
  color: #6a737d !important; /* 회색 */
}

.hljs-function {
  color: #6f42c1 !important; /* 보라색 */
}

.hljs-number {
  color: #005cc5 !important; /* 파란색 */
}

.post-content img,
.tt-body-page figure.imageblock img,
figure.imageblock img,
#tt-body-page figure img,
figure img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 8px !important;
  margin: 1em 0 !important;
  display: inline-block !important;
}

.post-content a {
  color: var(--accent-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}

.post-content a:hover {
  border-bottom-color: var(--accent-color);
}

/* H4, H5, H6 추가 스타일 */
.post-content h4 {
  font-size: 1.35rem;
}

.post-content h5 {
  font-size: 1.2rem;
}

.post-content h6 {
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* 리스트 스타일 개선 */
.post-content ul,
.post-content ol {
  margin-bottom: 1.5em;
  padding-left: 2em;
}

.post-content li {
  font-size: 1.15rem;
  line-height: 1.8;
  margin-bottom: 0.5em;
}

.post-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 20px;
  margin: 2em 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.15rem;
}

/* 코드블럭 스타일 */
.post-content pre,
pre[data-ke-type="codeblock"],
.hljs {
  background: var(--pastel-blue);
  padding: 0.5em;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1em 0;
  font-family: 'GangwonEduSaeeum_OTFMediumA', 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #1a1a1a !important;
  font-weight: normal;
  border: 1px solid rgba(74, 144, 226, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* 인라인 코드 스타일 (백틱) - 마크다운 스타일 */
.post-content code,
.article-content code,
p code,
li code,
td code {
  background: rgba(27, 31, 35, 0.05);
  color: #e36209;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
  font-size: 85%;
  font-weight: normal;
  white-space: break-spaces;
  display: inline;
  line-height: inherit;
}

/* pre 내부의 code는 스타일 제외 */
pre code,
.hljs code,
[data-ke-type="codeblock"] code,
pre[data-ke-type="codeblock"] code {
  background: transparent !important;
  color: #1a1a1a !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: inherit !important;
  white-space: pre !important;
  display: block !important;
  line-height: inherit !important;
  font-family: 'GangwonEduSaeeum_OTFMediumA', 'Consolas', 'Monaco', 'Courier New', monospace !important;
  font-weight: normal !important;
}

/* 코드블럭 내 키워드 강조 */
pre .hljs-keyword,
pre .hljs-selector-tag,
pre .hljs-title {
  color: #0066cc !important;
  font-weight: 600 !important;
}

pre .hljs-string,
pre .hljs-attr {
  color: #008000 !important;
}

pre .hljs-comment {
  color: #666666 !important;
  font-style: italic;
}

pre .hljs-number,
pre .hljs-literal {
  color: #d73a49 !important;
}

pre .hljs-function,
pre .hljs-built_in,
pre .hljs-builtin-name {
  color: #6f42c1 !important;
}

/* 인라인 코드 호버 효과 제거 - 마크다운 스타일은 호버 효과 없음 */
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95em;
}

/* 리스트 스타일링 */
.post-content ul,
.post-content ol {
  margin: 1.5em 0;
  padding-left: 2em;
}

.post-content ul {
  list-style-type: disc;
}

.post-content ol {
  list-style-type: decimal;
}

.post-content li {
  margin-bottom: 0.5em;
  line-height: 1.8;
}

.post-content li ul,
.post-content li ol {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.post-content ul ul {
  list-style-type: circle;
}

.post-content ul ul ul {
  list-style-type: square;
}

/* 테이블 스타일 */
.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2em 0;
}

.post-content th,
.post-content td {
  padding: 12px;
  border: 1px solid var(--border-color);
  text-align: left;
}

.post-content th {
  background: var(--pastel-blue);
  font-weight: 600;
}

.post-content hr {
  border: none;
  height: 1px;
  background: var(--border-color);
  margin: 3em 0;
}

/* 포스트 태그 */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 30px 0;
  padding: 20px 0;
  border-top: 1px solid var(--border-color);
}

.post-tags a {
  padding: 8px 16px;
  background: var(--pastel-mint);
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.post-tags a:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
}

/* 포스트 액션 버튼 */
.post-actions {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid #e0e0e0;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.action-btn:hover {
  border-color: var(--accent-color);
  background: var(--pastel-blue);
  transform: translateY(-2px);
}

.action-btn svg {
  width: 20px;
  height: 20px;
}

.like-btn {
  cursor: pointer !important;
  position: relative;
  display: flex !important;
  align-items: center !important;
  min-height: 48px !important;
}

.like-btn:hover {
  border-color: #ff6b6b;
  background: #ffe5e5;
  color: #ff6b6b;
}

/* 공감 버튼 내용 */
.like-btn .like-content {
  display: flex !important;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

/* 공감 카운트 스타일 */
.like-btn .like-count {
  font-weight: 600;
  color: #666;
  margin-left: 4px;
}

.like-btn .like-count:before {
  content: '(';
}

.like-btn .like-count:after {
  content: ')';
}

/* 공감한 상태 스타일 */
.like-btn.liked {
  background: #ffe5e5;
  border-color: #ff6b6b;
}

.like-btn.liked .heart-icon {
  fill: #ff6b6b;
  stroke: #ff6b6b;
}

.like-btn.liked .like-text,
.like-btn.liked .like-count {
  color: #ff6b6b;
}

/* 티스토리가 생성하는 버튼을 투명 오버레이로 */
.like-btn .btn_post {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  opacity: 0 !important;
  cursor: pointer !important;
  z-index: 1 !important;
}

/* 구독 버튼 상태에 따른 스타일 */
.subscribe-btn.following,
.subscribe-floating.following {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
}

.subscribe-btn.following .txt_state,
.subscribe-floating.following .txt_state {
  font-size: 0;
}

.subscribe-btn.following .txt_state:after,
.subscribe-floating.following .txt_state:after {
  content: '구독중';
  font-size: 16px;
}

.subscribe-btn:hover {
  border-color: #4A90E2;
  background: var(--pastel-blue);
  color: #4A90E2;
}

/* 플로팅 버튼 */
.floating-buttons {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: flex;
  gap: 15px;
  z-index: 100;
}

.subscribe-floating,
.guestbook-floating {
  padding: 12px 20px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(124, 147, 255, 0.3);
  transition: all 0.3s ease;
  text-decoration: none;
}

.subscribe-floating:hover,
.guestbook-floating:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(124, 147, 255, 0.4);
  background: var(--accent-hover);
  color: white;
}

.subscribe-floating svg,
.guestbook-floating svg {
  width: 18px;
  height: 18px;
}

/* 포스트 히어로 관리자 컨트롤 */
.post-hero-admin {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 20px;
}

.hero-admin-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.hero-admin-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero-admin-btn.delete-btn:hover {
  background: rgba(255, 107, 107, 0.9);
  border-color: rgba(255, 107, 107, 0.3);
  color: white;
}

/* 광고 컨테이너 */
.ad-container {
  max-width: 1400px;
  margin: 40px auto;
  padding: 0 40px;
  text-align: center;
}

/* 푸터 */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
}

.site-footer {
  background: var(--pastel-mint);
  padding: 40px 0;
  margin-top: auto;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 20px;
}

.footer-links a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent-color);
}

.footer-copyright {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-copyright a {
  color: var(--accent-color);
  text-decoration: none;
}

.footer-copyright a:hover {
  text-decoration: underline;
}

/* 관리자 컨트롤 */
.admin-controls {
  margin-top: auto;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.admin-buttons {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 14px;
  justify-content: center;
}

.admin-btn {
  color: var(--text-primary);
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.admin-btn:hover {
  color: var(--accent-color);
  border-bottom-color: var(--accent-color);
}

/* 홈페이지에서 글 내용 숨기기 - 목록만 표시 */
body#tt-body-index .single-post,
body#tt-body-index .post-hero,
body#tt-body-index article.single-post,
body#tt-body-index section.post-hero,
body#tt-body-category .single-post,
body#tt-body-category .post-hero,
body#tt-body-category article.single-post,
body#tt-body-category section.post-hero,
body#tt-body-search .single-post,
body#tt-body-search .post-hero,
body#tt-body-search article.single-post,
body#tt-body-search section.post-hero {
    display: none !important;
}

/* 검색 및 카테고리 페이지 헤더 스타일 */
body#tt-body-search .site-header,
body#tt-body-category .site-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    margin-top: 0;
}

body#tt-body-search .site-header .site-title a,
body#tt-body-category .site-header .site-title a {
    color: var(--text-primary) !important;
}

body#tt-body-search .site-header .header-controls button,
body#tt-body-category .site-header .header-controls button {
    color: var(--text-primary) !important;
}

body#tt-body-search .site-header.hero-header,
body#tt-body-category .site-header.hero-header {
    position: relative;
    background: white;
}

/* 글 상세 페이지 헤더 스타일 - 검은색으로 */
.post-hero .site-header.hero-header .site-title a,
.post-hero .site-header.hero-header .header-controls button {
    color: var(--text-primary) !important;
}

/* 모든 페이지 헤더 좌우 여백 통일 */
.header-container {
    padding: 0 20px;
    max-width: 100%;
}

/* 검색, 카테고리 및 방명록 페이지 컨텐츠 겹침 방지 */
body#tt-body-search main,
body#tt-body-category main,
body#tt-body-guestbook main {
    padding-top: 80px;
}

body#tt-body-search .post-list-section,
body#tt-body-category .post-list-section {
    margin-top: 20px;
}

body#tt-body-guestbook .single-post {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: auto;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
  .post-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
  
  .single-post {
    max-width: 900px;
  }
}

@media (max-width: 768px) {
  .header-container,
  .post-list-section,
  .single-post {
    padding: 0 20px;
  }

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

  .post-grid.list-view .post-card {
    flex-direction: column;
  }

  .post-grid.list-view .post-card-thumbnail {
    width: 100%;
    border-radius: 12px 12px 0 0;
  }
  
  /* 모바일 본문 텍스트 크기 조정 */
  .post-content {
    font-size: 1.1rem;
    line-height: 1.75;
  }
  
  .post-content p {
    font-size: 1.1rem;
  }
  
  .post-content h1 {
    font-size: 2rem;
  }
  
  .post-content h2 {
    font-size: 1.7rem;
  }
  
  .post-content h3 {
    font-size: 1.4rem;
  }
  
  /* 모바일 코드블럭 크기 조정 */
  .post-content pre,
  pre[data-ke-type="codeblock"],
  .hljs {
    font-size: 0.95rem;
    padding: 0.4em;
    margin: 0.8em 0;
  }

  .section-header {
    flex-direction: column;
    gap: 20px;
  }

  .section-controls {
    width: 100%;
    justify-content: center;
  }

  .carousel-prev {
    left: 20px;
  }

  .carousel-next {
    right: 20px;
  }

  .slide-title {
    font-size: 2rem;
  }

  .slide-excerpt {
    font-size: 1rem;
  }

  .post-hero-title {
    font-size: 2rem;
  }

  .post-hero-meta {
    font-size: 1rem;
  }

  .author-profile {
    flex-direction: column;
    text-align: center;
  }

  .comment-guest-info,
  .guestbook-guest-info {
    grid-template-columns: 1fr !important;
  }

  .floating-buttons {
    bottom: 20px;
    right: 20px;
    flex-direction: column;
  }

  /* 모바일 포스트 히어로 */
  .post-hero {
    height: 25vh;
    min-height: 250px;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 1.2rem;
  }

  .post-card-title {
    font-size: 1rem;
  }

}

/* 카테고리 트리 - 티스토리 기본 카테고리 스타일 */
.category-tree {
  font-size: 0.95rem;
  background: white;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* 분류 전체보기 링크 숨기기 */
.category-tree a.link_tit {
  display: none !important;
}

.category-tree ul.tt_category,
.category-tree ul.category_list,
.category-tree ul.sub_category_list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.category-tree ul.category_list {
  margin-top: 0;
  margin-left: 0;
  padding-top: 0;
}

.category-tree ul.sub_category_list {
  margin-top: 5px;
  margin-left: 20px;
  position: relative;
}

.category-tree ul.sub_category_list::before {
  content: '';
  position: absolute;
  left: -15px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--border-color);
}

/* 분류 전체보기는 위에서 숨김 처리 */

.category-tree a.link_item {
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 12px;
  transition: all 0.3s;
  border-radius: 8px;
  margin-bottom: 8px;
  position: relative;
  font-weight: 600;
  background: linear-gradient(135deg, var(--pastel-blue) 0%, var(--pastel-pink) 100%);
}

.category-tree a.link_item::before {
  content: '📁';
  margin-right: 8px;
  font-size: 1.1rem;
}

.category-tree a.link_sub_item {
  color: var(--text-secondary);
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  padding-left: 30px;
  transition: all 0.3s;
  border-radius: 6px;
  margin-bottom: 4px;
  font-size: 0.9rem;
  position: relative;
}

.category-tree a.link_item:hover {
  opacity: 0.9;
  transform: translateX(5px);
}

.category-tree a.link_sub_item:hover {
  background: var(--pastel-blue);
  transform: translateX(5px);
  color: var(--accent-color);
}

.category-tree .c_cnt {
  color: white;
  background: var(--accent-color);
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: auto;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
}

/* 카테고리 글 개수 괄호 제거 */
.category-tree .c_cnt::before {
  content: '';
}

.category-tree .c_cnt::after {
  content: '';
}

/* NEW 아이콘 숨기기 */
.category-tree img {
  display: none !important;
}

/* 티스토리 기본 네임카드 숨기기 */
.tt_box_namecard,
[data-tistory-react-app="Namecard"] {
  display: none !important;
}

/* 작성자 프로필 */
.author-profile {
  display: flex;
  gap: 30px;
  padding: 30px;
  background: var(--pastel-blue);
  border-radius: 12px;
  margin: 40px 0;
}

.author-avatar {
  flex-shrink: 0;
}

.author-avatar img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.author-info {
  flex: 1;
}

.author-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.author-desc {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 15px;
}

.author-links {
  display: flex;
  gap: 15px;
}

.author-links a {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.author-links a:hover {
  color: var(--accent-color);
}

/* 접은글 (더보기) 스타일 - 꺾쇠 스타일 */
.btn-toggle-moreless {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: var(--primary-color);
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  user-select: none;
}

.btn-toggle-moreless:hover {
  background: var(--pastel-blue);
  border-color: var(--primary-color);
  transform: translateX(2px);
}

.btn-toggle-moreless::before {
  content: '▶';
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 0.75em;
  margin-right: 2px;
}

.btn-toggle-moreless.open::before {
  transform: rotate(90deg);
}

.btn-toggle-moreless::after {
  display: none;
}

/* 접은글 컨테이너 */
div[data-ke-type="moreLess"] {
  margin: 25px 0;
  position: relative;
}

/* 접은글 내용 */
.moreless-content {
  margin-top: 12px;
  padding: 0;
  background: transparent;
  border-left: 2.5px solid var(--primary-color);
  padding-left: 18px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.moreless-content.show {
  max-height: 5000px;
  opacity: 1;
  padding-top: 8px;
  padding-bottom: 8px;
}


/* 접은글 내부 콘텐츠 스타일링 */
.moreless-content h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.moreless-content p:first-child {
  margin-top: 0;
}

.moreless-content p:last-child {
  margin-bottom: 0;
}

/* 댓글 섹션 */
.comments-section,
.comments {
  padding: 20px;
}

.comments-section h3,
.comments h3,
.comment-title {
  font-size: 1.5rem;
  margin-top: 20px;
  margin-bottom: 30px;
  color: var(--text-primary);
}

.comments form {
  margin-top: 40px;
}

/* 댓글 작성 폼 */
.comment-form {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 25px;
  margin-top: 40px;
  margin-bottom: 40px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s ease;
}

.comment-form:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.comment-form .comment-input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-form .form-group,
.comment-input-wrapper .form-group {
  display: flex;
  gap: 10px;
}

.comment-form .form-group input,
.comment-input-wrapper .form-group input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.comment-form .form-group input:focus,
.comment-input-wrapper .form-group input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(124, 147, 255, 0.1);
  background: white;
}

.comment-form-footer {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  margin-top: 15px !important;
  gap: 15px !important;
}

.secret-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-secondary);
  user-select: none;
  padding: 5px 10px;
  border-radius: 6px;
  transition: all 0.2s ease;
  margin-right: auto;
}

.secret-label input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--accent-color);
  margin: 0;
}

.secret-label:hover {
  color: var(--text-color);
  background: var(--pastel-blue);
}

.secret-label span {
  font-weight: 500;
}

.comment-member-info {
  margin-bottom: 15px !important;
  padding: 12px !important;
  background: var(--pastel-blue) !important;
  border-radius: 8px !important;
  font-size: 0.95rem !important;
  color: var(--text-primary) !important;
}

.comment-guest-info {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 15px !important;
  margin-bottom: 15px !important;
}

.comment-guest-info input {
  padding: 10px 15px !important;
  border: 2px solid var(--border-color) !important;
  border-radius: 8px !important;
  font-size: 0.95rem !important;
  background: white !important;
  transition: border-color 0.3s !important;
}

.comment-guest-info input:focus {
  outline: none !important;
  border-color: var(--accent-color) !important;
  box-shadow: 0 0 0 3px rgba(124, 147, 255, 0.1) !important;
}

.comment-form textarea,
.comment-input-wrapper textarea {
  width: 100%;
  min-height: 100px;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.comment-form textarea:focus,
.comment-input-wrapper textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(124, 147, 255, 0.1);
  background: white;
}

.comment-form-controls {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 15px !important;
}

/* 중복 제거 - 위에 이미 정의됨 */

.comment-form button[type="submit"],
.comment-form-footer button {
  padding: 10px 24px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.comment-form button[type="submit"]:hover,
.comment-form-footer button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 147, 255, 0.3);
}

/* 티스토리 폼 제출 버튼 스타일 오버라이드 */
form[action*="/comment/add"] button[type="submit"] {
  padding: 12px 30px !important;
  background: var(--accent-color) !important;
  color: white !important;
  border: none !important;
  border-radius: 25px !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
}

form[action*="/comment/add"] button[type="submit"]:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(124, 147, 255, 0.3) !important;
}

/* 방명록 섹션 */
.guestbook-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px;
}

.guestbook-title {
  font-size: 2rem;
  margin-bottom: 40px;
  color: var(--text-primary);
}

.guestbook-form {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.guestbook-guest-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 15px;
}

.guestbook-guest-info input {
  padding: 10px 15px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95rem;
  background: white;
  transition: border-color 0.3s;
}

.guestbook-guest-info input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(124, 147, 255, 0.1);
}

.guestbook-form textarea {
  width: 100%;
  min-height: 120px;
  padding: 15px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.3s;
  margin-bottom: 15px;
}

.guestbook-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(124, 147, 255, 0.1);
}

.guestbook-form-controls {
  display: flex;
  justify-content: flex-end;
}

.guestbook-form-controls button {
  padding: 12px 30px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.guestbook-form-controls button:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 147, 255, 0.3);
}

.guestbook-list {
  margin-top: 40px;
}

.guestbook-item {
  display: flex;
  gap: 15px;
  padding: 25px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.guestbook-item:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.guestbook-avatar {
  flex-shrink: 0;
}

.guestbook-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.guestbook-body {
  flex: 1;
  min-width: 0;
}

.guestbook-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.guestbook-author {
  font-weight: 600;
  color: var(--text-primary);
}

.guestbook-date {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.guestbook-content {
  line-height: 1.6;
  color: var(--text-primary);
  word-wrap: break-word;
}

.guestbook-reply {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.guestbook-reply-item {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.reply-icon {
  color: var(--text-secondary);
  font-size: 1.2rem;
}

.guestbook-reply-content {
  flex: 1;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.reply-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-left: 10px;
}

/* 댓글 리스트 기본 스타일 제거 */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* 댓글 아바타 스타일링 */
.comment {
  display: flex !important;
  gap: 15px !important;
  padding: 25px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.comment:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.comment-content {
  flex: 1;
  min-width: 0;
}

/* 댓글 리스트 아바타 (작성된 댓글 표시용) */
.comment .comment-avatar {
  flex-shrink: 0;
}

.comment .comment-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.reply-avatar {
  flex-shrink: 0;
  margin-right: 12px;
}

.reply-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.reply-content {
  flex: 1;
}

.reply-list {
  list-style: none;
  padding: 0;
  margin: 15px 0 0 60px;
}

.reply-list .reply {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--pastel-blue);
  border-radius: 8px;
  margin-bottom: 8px;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.comment-author {
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  margin: 0 !important;
}

.comment-date {
  font-size: 0.875rem !important;
  color: var(--text-secondary) !important;
  margin: 0 !important;
}

.comment-content {
  line-height: 1.6;
  color: var(--text-primary);
  word-wrap: break-word;
}

.comment-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.comment-actions a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.comment-actions a:hover {
  color: var(--accent-color);
  background: var(--pastel-blue);
}

/* 히어로 헤더 버튼 수정 */
.hero-header .menu-toggle,
.hero-header .search-toggle {
  background: transparent;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s;
}

.hero-header .menu-toggle:hover,
.hero-header .search-toggle:hover {
  opacity: 0.8;
}

/* 사이드바 푸터 */
.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: auto;
  text-align: center;
}

.sidebar-footer .sidebar-credit {
  font-size: 12px;
  color: #999;
  margin: 0;
}

.sidebar-footer .sidebar-credit a {
  color: #4A90E2;
  text-decoration: none;
  font-weight: 500;
}

.sidebar-footer .sidebar-credit a:hover {
  text-decoration: underline;
}