@charset "utf-8";

/*
 * 최적화된 CSS - 상위 0.1% 블로그 템플릿
 *
 * 01. Web Font & 기본 설정
 * 02. Type Selector Reset & 접근성
 * 03. 레이아웃 & 컴포넌트
 * 04. 콘텐츠 & 엔트리
 * 05. 코멘트 & 사이드바
 * 06. 반응형 & 다크모드
 */

/* ===== 01. Web Font & 기본 설정 ===== */
@font-face {
  font-family: 'Pretendard';
  font-weight: 400;
  font-display: swap;
  src: local('Pretendard Regular'), url('/fonts/Pretendard-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Pretendard';
  font-weight: 600;
  font-display: swap;
  src: local('Pretendard SemiBold'), url('/fonts/Pretendard-SemiBold.woff2') format('woff2');
}

/* 나눔명조 웹폰트 최적화 로딩 */
@font-face {
  font-family: 'Nanum Myeongjo';
  font-weight: 800;
  font-display: swap;
  src: local('Nanum Myeongjo ExtraBold'), url('/fonts/NanumMyeongjo-ExtraBold.woff2') format('woff2');
}

/* 이미지 로딩 스켈레톤 효과 */
img.observing:not(.loaded) {
  background: linear-gradient(90deg, #f0f0f0, #e0e0e0, #f0f0f0);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  min-height: 30px;
}

@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

:root {
  --main-bg-color: #fff;
  --main-text-color: #333;
  --main-link-color: #555;
  --main-hover-color: #333;
  --border-color: #eee;
  --accent-color: #04beb8;
  --skeleton-color-light: #f0f0f0;
  --skeleton-color-dark: #e0e0e0;
  --container-width: 1080px;
  --header-height: 66px;
}

/* ===== 02. Type Selector Reset & 접근성 ===== */
html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  line-height: 1.7;
  word-break: keep-all;
  background-color: var(--main-bg-color);
  color: var(--main-text-color);
  overflow-wrap: break-word;
}

div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, textarea, p, blockquote, th, td, figure {
  margin: 0;
  padding: 0;
}

header, footer, section, article, aside, nav, hgroup, details, menu, figure, figcaption {
  display: block;
}

button, input[type=submit], input[type=reset], input[type=button] {
  overflow: visible;
  cursor: pointer;
}

input[type=text], input[type=email], input[type=password], input[type=submit], textarea {
  -webkit-appearance: none;
  border-radius: 0;
}

input, select, textarea, button {
  font-family: 'Pretendard', sans-serif;
  font-size: 100%;
  border-radius: 0;
}

button {
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

ul li {
  list-style: none;
}

img, fieldset {
  border: none;
}

hr {
  display: none;
}

a, a:link {
  text-decoration: none;
  color: var(--main-link-color);
}

a:visited {
  text-decoration: none;
}

a:hover, a:focus {
  text-decoration: underline;
  color: var(--main-hover-color);
}

a:active {
  text-decoration: none;
}
/* ===== 03. 레이아웃 & 컴포넌트 - 접근성 & 헤더 ===== */
/* Accessibility Navigation */
#acc-nav {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: 0;
}

#acc-nav a {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin-left: -1px;
  margin-bottom: -1px;
  text-align: center;
  font-weight: bold;
  font-size: 0.875em;
  color: #000;
  white-space: nowrap;
}

#acc-nav a:focus, #acc-nav a:hover, #acc-nav a:active {
  width: 100%;
  height: auto;
  padding: 10px 0;
  background: #000;
  color: #fff;
  z-index: 1000;
}

/* Layout Selector - 공통 레이아웃 스타일 */
#header .inner, #footer .inner, #container .content-wrap {
  max-width: var(--container-width);
  margin: 0 auto;
  position: relative;
}

/* Header */
#header {
  border-bottom: 1px solid var(--border-color);
}

#header h1 {
  padding: 23px 0;
  font-family: 'Nanum Myeongjo';
  font-weight: 800;
  font-size: clamp(1.5rem, 1rem + 2vw, 2.5rem);
  line-height: 1.5;
  letter-spacing: -0.2px;
  color: #333;
}

#header h1 a {
  display: inline-block;
  height: 32px;
  text-decoration: none;
  color: #333;
  vertical-align: top;
}

#header h1 img {
  width: auto;
  height: 32px;
}

#header .util {
  position: absolute;
  top: 24px;
  right: 0;
}

#header .util .search {
  position: relative;
  float: left;
  overflow: hidden;
  width: 32px;
  background-color: #fff;
  box-sizing: border-box;
  transition: width 0.5s;
  will-change: width;
}

#header .util .search:before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  z-index: 20;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  text-indent: -999em;
  background: #fff url(./images/ico_package.png) no-repeat 0 0;
  vertical-align: top;
  box-sizing: border-box;
  outline: none;
  cursor: pointer;
}

#header .util .search input {
  width: 32px;
  height: 32px;
  padding: 5px 15px;
  border: 0;
  background-color: transparent;
  font-size: 0.875em;
  line-height: 1;
  outline: none;
  box-sizing: border-box;
}

#header .util .search input:focus {
  border-color: #484848;
}

#header .util .search input::placeholder {
  color: #969696;
}

#header .util .search button {
  position: absolute;
  top: 1px;
  right: 1px;
  z-index: 10;
  width: 30px;
  height: 30px;
  text-indent: -999em;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: #fff url(./images/ico_package.png) no-repeat -1px -1px;
  vertical-align: top;
  outline: none;
}

#header .util .search.on {
  width: 200px;
}

#header .util .search.on:before {
  content: none;
}

#header .util .search.on input {
  display: block;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 32px;
}

#header .util .search.on button {
  border-color: transparent;
}

#header .util .profile {
  position: relative;
  float: left;
  margin-left: 14px;
}

#header .util .profile button {
  display: block;
  overflow: hidden;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
}

#header .util .profile img {
  width: 100%;
  height: 100%;
}

#header .util .profile nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  z-index: 30;
  width: 96px;
  margin: 0 0 0 -48px;
  padding-top: 12px;
}

#header .util .profile ul {
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

#header .util .profile ul li a {
  display: block;
  margin-top: -1px;
  border: 1px solid var(--border-color);
  background-color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 0.875em;
  line-height: 2.3125rem;
  color: #777;
}

#header .util .profile ul li a:focus,
#header .util .profile ul li a:hover {
  background-color: #fafafa;
  color: #333;
}

#header .util .menu {
  display: none;
}

/* GNB Navigation */
#gnb {
  height: var(--header-height);
  overflow-x: auto;
  overflow-y: hidden;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

#gnb::-webkit-scrollbar {
  display: none;
}

#gnb ul {
  display: inline-block;
  margin-left: -30px;
  vertical-align: top;
}

#gnb ul li {
  float: left;
  padding: 0 26px;
}

#gnb ul li a {
  position: relative;
  display: block;
  text-decoration: none;
  padding: 22px 4px 24px;
  color: #777;
}

#gnb ul li a:hover,
#gnb ul li.current a {
  color: #333;
}

#gnb ul li.current a:after,
#gnb ul li a:hover:after,
#gnb ul li a:focus:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #333;
}
/* ===== 04. 포스트 관련 스타일 ===== */
/* Post Cover */
.post-cover {
  position: relative;
  z-index: 20;
  display: table;
  width: 100%;
  height: 340px;
  background-color: #cbcbcb;
  background-position: 50% 50%;
  background-size: cover;
  box-sizing: border-box;
}

.post-cover:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.25);
}

.post-cover .inner {
  display: table-cell;
  position: relative;
  z-index: 10;
  vertical-align: bottom;
  padding-bottom: 78px;
}

.post-cover .category {
  display: block;
  max-width: var(--container-width);
  margin: 0 auto 13px;
  font-size: 0.875em;
  color: #fff;
}

.post-cover h1 {
  max-width: var(--container-width);
  margin: 0 auto;
  font-weight: 300;
  font-size: 2.125em;
  line-height: 1.2352;
  color: #fff;
}

.post-cover a {
  text-decoration: none;
  color: #fff;
}

.post-cover .meta {
  display: block;
  max-width: var(--container-width);
  margin: 34px auto 0;
  font-size: 0.875em;
  color: rgba(255, 255, 255, 0.6);
}

.post-cover .meta a {
  color: rgba(255, 255, 255, 0.6);
}

.post-cover .meta a:before,
.post-cover .meta span:before {
  content: "";
  display: inline-block;
  width: 2px;
  height: 2px;
  margin: 0 8px 0 4px;
  background-color: rgba(255, 255, 255, 0.6);
  vertical-align: middle;
}

.post-cover .meta span:first-child:before {
  content: none;
}

/* Post Header & Items */
.post-header {
  padding-top: 4px;
}

.post-header h1 {
  margin-bottom: 18px;
  font-size: 1em;
  line-height: 1.375;
}

#tt-body-archive .post-header span:before {
  content: "'";
}

#tt-body-archive .post-header span:after {
  content: "' 에 등록된 글";
}

#tt-body-tag .post-header span:before {
  content: "#";
}

#tt-body-search .post-header span:before {
  content: "'";
}

#tt-body-search .post-header span:after {
  content: "'의 검색결과";
}

.post-header h1 em {
  margin-left: 7px;
  font-style: normal;
  color: var(--accent-color);
}

.post-item {
  display: flex;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
}

.post-item:nth-child(3n+1) {
  clear: both;
  margin-left: 0;
}

.post-item a {
  display: block;
  text-decoration: none;
}

.post-item .thum {
  position: relative;
  display: block;
  overflow: hidden;
  width: 120px;
  height: 120px;
  background-color: #f8f8f8;
  border-radius: 6px;
}

.post-item .thum img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.post-item:hover .thum img {
  transform: scale(1.05);
}

.post-item .title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #222;
}

.post-item .excerpt {
  display: block;
  overflow: hidden;
  max-width: 95%;
  margin-bottom: 15px;
  text-overflow: ellipsis;
  font-size: 0.8125em;
  line-height: 1.5rem;
  color: #999;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* ===== 05. 사이드바 ===== */
/* Aside(sidebar) */
.sidebar h2 {
  margin-bottom: 7px;
  font-weight: 500;
  font-size: 0.875em;
  color: #555;
}

.sidebar ul li {
  padding: 4px 0 5px;
  font-size: 0.8125em;
  line-height: 1.25rem;
  color: #777;
}

.sidebar ul li a {
  color: #777;
}

.sidebar ul li a:hover {
  color: #333;
}

.sidebar .sidebar-2 {
  margin-top: 38px;
  padding-top: 46px;
  border-top: 1px solid var(--border-color);
}

.sidebar .category {
  margin-bottom: 36px;
}

.sidebar .category ul li {
  padding: 0;
  font-size: 0.875em;
  font-weight: 600;
}

.sidebar .category ul li a {
  color: #555;
}

.sidebar .category ul li a:hover {
  color: #333;
}

.sidebar .category ul li ul {
  padding-top: 8px;
}

.sidebar .category ul li ul li {
  padding: 6px 0 7px;
  font-weight: 400;
  font-size: 1em;
}

.sidebar .category ul li ul li ul {
  overflow: hidden;
  margin-bottom: -4px;
  padding-top: 6px;
}

.sidebar .category ul li ul li ul li {
  position: relative;
  padding: 3px 0 3px 9px;
  font-size: 0.8125rem;
}

.sidebar .category ul li ul li ul li:before {
  content: "";
  position: absolute;
  bottom: 7px;
  left: 0;
  width: 2px;
  height: 100%;
  background-color: var(--border-color);
}

.sidebar .category ul li ul li ul li:first-child:before {
  top: 7px;
  bottom: auto;
}

.sidebar .category ul li ul li ul li a {
  color: #999;
}

.sidebar .notice {
  margin-bottom: 37px;
}

.sidebar .recent-comment {
  margin-bottom: 36px;
}

.sidebar .recent-comment ul li a {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar .post-list {
  margin-bottom: 46px;
}

.sidebar .post-list h2 {
  margin-bottom: 12px;
}

.sidebar .post-list ul li {
  overflow: hidden;
  margin-bottom: 18px;
  padding: 0;
}

.sidebar .post-list ul li img {
  float: right;
  width: 58px;
  height: 58px;
  margin: 2px 0 0 20px;
  border-radius: 3px;
}

.sidebar .post-list ul li a {
  display: block;
  overflow: hidden;
  text-decoration: none;
}

.sidebar .post-list ul li a:hover .title {
  text-decoration: underline;
}

.sidebar .post-list ul li .title {
  display: block;
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.sidebar .post-list ul li .date {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  line-height: 1;
}

.sidebar .social-list {
  margin-bottom: 46px;
}

.sidebar .social-list h2 {
  margin-bottom: 18px;
}

.sidebar .social-list .tab-list {
  overflow: hidden;
  width: 100%;
}

.sidebar .social-list ul li {
  margin-bottom: 15px;
  padding: 0 0 0 48px;
}

.sidebar .social-list ul li a {
  display: block;
  text-decoration: none;
}

.sidebar .social-list ul li a:hover .text {
  text-decoration: underline;
}

.sidebar .social-list ul li .avatar {
  float: left;
  overflow: hidden;
  width: 40px;
  height: 40px;
  margin-left: -48px;
  border-radius: 50%;
}

.sidebar .social-list ul li .title {
  display: block;
}

.sidebar .social-list ul li .date {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: #777;
}

/* 사이드바 태그 */
#aside .tags {
  margin: 0 0 41px;
  padding: 0;
  font-size: 1em;
}

#aside .tags h2 {
  margin-bottom: 8px;
  font-size: 0.875em;
}

#aside .tags a {
  float: none;
  margin: 0 4px 0 0;
  padding: 0;
  border: 0;
  font-size: 0.8125em;
  line-height: 2;
  color: #555;
}

#aside .tags a:after {
  content: ", ";
}

#aside .tags a:last-child:after {
  content: none;
}

#aside .tags a:hover,
#aside .tags a:focus {
  color: #333;
}

/* 사이드바 방문자 수 */
.sidebar .count {
  margin-bottom: 46px;
}

.sidebar .count h2 {
  margin-bottom: 3px;
}

.sidebar .count h2:before {
  content: "";
  display: block;
  width: 17px;
  height: 1px;
  margin-bottom: 18px;
  background-color: #555;
}

.sidebar .count p {
  margin-bottom: 6px;
  font-size: 0.8125em;
  color: #777;
}

.sidebar .count .total {
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 1.875em;
  color: #555;
}

/* 사이드바 소셜 채널 */
.sidebar .social-channel {
  margin-bottom: 48px;
}

.sidebar .social-channel ul {
  overflow: hidden;
  width: 100%;
}

.sidebar .social-channel ul li {
  float: left;
  margin-left: 10px;
  padding: 0;
}

.sidebar .social-channel ul li:first-child {
  margin-left: 0;
}

.sidebar .social-channel ul li a {
  display: block;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  text-indent: -999em;
  background: url(./images/ico_package.png) no-repeat 0 -100px;
  transition: background-color 0.3s;
}

.sidebar .social-channel ul li.youtube a {
  background-position-x: -50px;
}

.sidebar .social-channel ul li.instagram a {
  background-position-x: -100px;
}

.sidebar .social-channel ul li.twitter a {
  background-position-x: -150px;
}

.sidebar .social-channel ul li a:focus,
.sidebar .social-channel ul li a:hover {
  background-color: #757575;
  background-position-y: -150px;
}

/* ===== 06. 다크모드 & 미디어 쿼리 ===== */
/* 다크모드 */
@media (prefers-color-scheme: dark) {
  :root {
    --main-bg-color: #121212;
    --main-text-color: #f1f1f1;
    --main-link-color: #9ecbff;
    --main-hover-color: #fff;
    --border-color: #333;
    --accent-color: #04beb8;
    --skeleton-color-light: #222;
    --skeleton-color-dark: #333;
  }
  
  body {
    background-color: var(--main-bg-color);
    color: var(--main-text-color);
  }
  
  a, a:link {
    color: var(--main-link-color);
  }
  
  #header, .post-item, .comment-list ul li {
    border-color: var(--border-color);
  }
  
  .post-item .thum, 
  .cover-thumbnail-1 figure,
  .cover-thumbnail-2 figure,
  .cover-thumbnail-3 figure,
  .cover-thumbnail-4 figure,
  .related-articles figure {
    background-color: #2a2a2a;
  }
  
  .adsense-block, .emotion-cta, #footer {
    background-color: #1d1d1d;
    border-color: #444;
  }
  
  input, textarea, .btn, .page-btn, .page-num {
    background-color: #2a2a2a;
    border-color: #444;
    color: #eee;
  }
  
  .page-num.current {
    background-color: #fff;
    color: #000;
  }
  
  /* 다크모드에서 이미지 반전 방지 */
  img {
    filter: brightness(0.9);
  }
  
  /* 다크모드에서 코드 블록 */
  .entry-content pre {
    background-color: #2a2a2a;
    color: #ddd;
  }
  
  .entry-content code {
    background-color: #333;
    color: #ddd;
  }
  
  /* 다크모드 블록쿼트 */
  .entry-content blockquote {
    background-color: #222;
    border-left-color: #444;
  }
  
  /* 다크모드 태그 스타일 */
  .tags a {
    border-color: #444;
  }
  
  .tags a:hover {
    background-color: #333;
  }
  
  /* 다크모드 사이드바 */
  .sidebar .category ul li ul li ul li:before {
    background-color: #444;
  }
  
  /* 다크모드 이미지 로딩 스켈레톤 */
  img.observing:not(.loaded) {
    background: linear-gradient(90deg, #222, #333, #222);
    background-size: 200% 100%;
  }
}

/* 태블릿 미디어 쿼리 */
@media screen and (max-width: 1080px) {
  /* 공통 패딩 */
  #header .inner, #footer .inner, #container .content-wrap {
    padding-left: 24px;
    padding-right: 24px;
  }
  
  #gnb ul {
    margin-left: 0;
  }
  
  .main-slider .paging {
    left: 20px;
    right: auto;
    margin-left: 0;
  }
  
  /* 콘텐츠 패딩 */
  #content {
    padding: 34px 24px 40px;
  }
  
  /* 이벤트 커버 타이틀 */
  .cover-event ul li .title {
    -webkit-line-clamp: 1;
  }
  
  /* 포스트 커버 패딩 */
  .post-cover {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* 모바일 미디어 쿼리 */
@media screen and (max-width: 767px) {
  /* 헤더 모바일 최적화 */
  #header h1 {
    position: relative;
    z-index: 10;
    padding: 24px;
    background-color: #fff;
  }
  
  #header .util {
    top: 0;
    right: 0;
    width: 100%;
    padding: 24px 68px 24px 24px;
    box-sizing: border-box;
  }
  
  #header .util .search {
    float: right;
  }
  
  #header .util .search.on {
    z-index: 20;
    width: 100%;
  }
  
  #header .util .search.on input {
    float: right;
    width: 100%;
  }
  
  #header .util .profile {
    display: none;
  }
  
  /* 모바일 메뉴 버튼 */
  #header .util .menu {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 300;
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    text-indent: -999em;
    outline: none;
  }
  
 #header .util .menu span,
  #header .util .menu:before,
  #header .util .menu:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 1px;
    margin: 0 0 0 -8px;
    background-color: #7f7f7f;
    transition: transform .5s;
    -webkit-transition: transform .5s;
  }
  
  #header .util .menu:before {
    margin-top: -6px;
  }
  
  #header .util .menu:after {
    margin-top: 6px;
  }
  
  /* 모바일 GNB */
  #gnb {
    height: 69px;
  }
  
  #gnb ul {
    margin-left: 0;
  }
  
  #gnb ul li {
    padding: 0 24px;
  }
  
  #gnb ul li a {
    padding: 25px 0 24px;
  }
  
  /* 모바일 컨테이너 */
  #container .content-wrap {
    padding: 0;
  }
  
  #container .content-wrap:before {
    content: none;
  }
  
  /* 모바일 콘텐츠 */
  #content {
    float: none;
    width: auto;
    padding: 34px 24px 40px;
  }
  
  /* 모바일 사이드바 */
  #aside {
    position: fixed;
    top: 0;
    right: -278px;
    z-index: 400;
    float: none;
    overflow: auto;
    width: 278px;
    height: 100%;
    padding: 94px 24px 40px;
    background-color: #fff;
    box-sizing: border-box;
    transition: right .5s;
    -webkit-transition: right .5s;
  }

  .mobile-menu #aside {
    right: 0;
  }
  
  /* 모바일 사이드바 닫기 버튼 */
  #aside .close {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 300;
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    text-indent: -999em;
    outline: none;
  }
  
  #aside .close span {
    display: none;
  }
  
  #aside .close:before,
  #aside .close:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 1px;
    margin: 0 0 0 -8px;
    background-color: #7f7f7f;
  }
  
  #aside .close:before {
    transform: rotate(-45deg);
  }
  
  #aside .close:after {
    transform: rotate(45deg);
  }
  
  /* 모바일 사이드바 프로필 */
  #aside .profile {
    display: block;
    position: relative;
    margin-bottom: -40px;
  }
  
  #aside .profile:before {
    content: "";
    position: absolute;
    top: 0;
    left: -24px;
    z-index: 0;
    width: 100%;
    height: 100%;
    padding: 0 24px;
    background-color: #f5f5f5;
  }
  
  #aside .profile ul {
    position: relative;
    z-index: 10;
    text-align: center;
  }
  
  #aside .profile ul li {
    display: inline-block;
    padding: 16px 0 18px;
    font-size: 0.875em;
    color: #555;
    vertical-align: middle;
  }
  
  #aside .profile ul li a {
    display: inline-block;
    vertical-align: middle;
  }
  
  #aside .profile ul li:before {
    content: "";
    display: inline-block;
    width: 1px;
    height: 7px;
    margin: 0 20px 0 16px;
    background: url(./images/ico_package_2x.png) -100px -50px;
    background-size: 200px auto;
    vertical-align: middle;
  }
  
  #aside .profile ul li:first-child:before {
    content: none;
  }
  
  /* 모바일 푸터 */
  #footer {
    padding: 32px 24px 26px;
  }
  
  #footer p {
    margin-bottom: 11px;
    font-size: 0.8125em;
  }
  
  #footer .order-menu {
    margin-bottom: 29px;
  }
  
  #footer .order-menu a {
    display: block;
    margin-bottom: 0;
    line-height: 1.75rem;
  }
  
  #footer .order-menu a:before {
    content: none;
  }
  
  /* 모바일 인덱스 콘텐츠 */
  #tt-body-index #content {
    padding: 0;
  }
  
  #tt-body-index #content>.inner {
    padding: 0 24px;
  }
  
  #tt-body-index #content>.inner:first-child {
    padding-top: 40px;
  }
  
  #tt-body-index.list-type-text #content>.inner:first-child {
    padding-top: 200px;
  }
  
  #tt-body-index .pagination {
    margin: 0 20px 40px;
  }
  
  /* 모바일 기타 페이지 */
  #tt-body-page #content {
    padding-left: 0;
    padding-right: 0;
  }
  
  #tt-body-tag .tags,
  #tt-body-guestbook #content {
    padding-left: 0;
    padding-right: 0;
  }
  
  #tt-body-guestbook .post-header {
    margin: 0 24px 28px;
  }
  
  /* 레이아웃 조정 */
  .layout-aside-left #aside {
    padding: 80px 20px 40px;
  }
  
  /* 모바일 메인 슬라이더 */
  .main-slider ul li {
    height: 400px;
  }
  
  .main-slider ul li .inner {
    padding-bottom: 40px;
    vertical-align: bottom;
  }
  
  .main-slider ul li .text {
    max-width: 100%;
    font-weight: 300;
    font-size: 1.75em;
    line-height: 2.25rem;
    -webkit-line-clamp: 3;
  }
  
  .main-slider ul li .btn {
    margin-top: 15px;
  }
  
  .main-slider .paging {
    top: 40px;
    left: 0;
    right: auto;
    bottom: 20px;
    width: 100%;
    height: 8px;
    padding: 0 19px;
    text-align: left;
    box-sizing: border-box;
  }
  
  .main-slider .paging button {
    display: inline-block;
    margin: 0 5px;
    vertical-align: top;
  }
  
  /* 모바일 커버 썸네일 */
  .cover-thumbnail-1 {
    margin-bottom: 40px;
    padding: 36px 24px 7px;
    border-top: 8px solid #f5f5f5;
  }
  
  .cover-thumbnail-1 h2 {
    font-weight: 600;
  }
  
  .cover-thumbnail-1 .more {
    top: 40px;
    right: 24px;
  }
  
  .cover-thumbnail-1 ul {
    display: block;
    width: 100%;
    margin-left: 0;
    margin-bottom: -39px;
  }
  
  .cover-thumbnail-1 ul li {
    float: none;
    width: 100%;
    margin-bottom: 30px;
    padding-left: 0;
  }
  
  .cover-thumbnail-1 ul li .title {
    margin-bottom: 4px;
  }
  
  /* 모바일 커버 썸네일 2 */
  .cover-thumbnail-2 {
    width: auto;
    margin: 0;
    padding: 37px 24px 38px;
    border-top: 8px solid #f5f5f5;
  }
  
  .cover-thumbnail-2 h2 {
    font-weight: 600;
  }
  
  .cover-thumbnail-2 ul li figure {
    width: 98px;
    margin-left: 24px;
  }
  
  .cover-thumbnail-2 ul li .title {
    margin-bottom: 7px;
    padding-top: 3px;
    font-size: 1.125em;
  }
  
  .cover-thumbnail-2 ul li .excerpt {
    margin-bottom: 9px;
  }
}

/* ===== 특수 유틸리티 ===== */
/* 티스토리 자동광고만 제거 - 본문 보존용 */
#ad-top,
#ad-bottom,
#ad-middle,
.revenue_unit_wrap,
.ad_div,
.ad_article,
.article_ad,
.ad-area,
div[id*="google_ads"],
ins.adsbygoogle:not(.ads-keep) {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* iframe 광고만 정확히 지정 */
iframe[src*="doubleclick.net"],
iframe[src*="adfit"] {
  display: none !important;
}

/* 모바일에서 테이블 스크롤 */
.entry-content table {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  display: block;
  white-space: nowrap;
  border-collapse: collapse;
  margin-bottom: 22px;
}

.entry-content table td,
.entry-content table th {
  padding: 8px;
  border: 1px solid #e6e6e6;
  text-align: left;
}

.entry-content table th {
  background-color: #f8f8f8;
  font-weight: bold;
}

/* 코드 하이라이팅 향상 */
.entry-content pre {
  border-radius: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.entry-content pre::-webkit-scrollbar {
  height: 8px;
}

.entry-content pre::-webkit-scrollbar-track {
  background: transparent;
}

.entry-content pre::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  .entry-content pre::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
  }
}

/* 고해상도 디스플레이 지원 */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
       only screen and (min-resolution: 144dpi) {
  .main-slider .paging button,
  #footer .page-top,
  .sidebar .social-channel ul li a,
  .comment-list ul li .author-meta .control button,
  .page-nav a strong:after {
    background-image: url(./images/ico_package_2x.png);
    background-size: 200px auto;
  }
  
  .post-item.protected .thum:before {
    background-image: url(./images/ico_package_2x.png);
    background-size: 120px auto;
  }
}

/* 성능 최적화를 위한 keyframes 정의 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 접근성 관련 스타일 */
a:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 티스토리 댓글 스타일 최적화 */
.tt-comment-cont .tt-box-total .tt_txt_g {
  font-size: 14px;
}

.tt-comment-cont .tt-box-total .tt_num_g {
  font-size: 14px;
  color: #777;
}

.tt-comment-cont .tt-wrap-cmt .tt-link-user {
  font-size: 14px;
}

.tt-comment-cont .tt-wrap-cmt .tt_desc {
  font-size: 14px;
  color: #555;
}

.tt-comment-cont .tt-txt-mention {
  color: #555;
}

.tt-comment-cont .tt-btn_register {
  width: 100px;
  height: 36px;
  background-color: #333;
  font-size: 14px;
  color: #fff;
  border-radius: 0;
  border-color: #333;
}

.tt-comment-cont .tt-btn_register:hover {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.tt-comment-cont .tt-btn_register:focus {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

.my_edit .ico_more {
  fill: #fff !important;
}

@media screen and (max-width: 767px) {
  .tt-comments-wrap {
    padding: 0 24px;
  }
}
/* 이미지 컨테이너 - 600x400 비율 유지 */
.img-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  height: 0;
  padding-bottom: 66.67%; /* 400 ÷ 600 = 0.6667 = 66.67% */
  margin: 0 auto;
  overflow: hidden;
  background-color: #f5f5f5; /* 이미지 로딩 전 배경색 */
}
/* 전체 콘텐츠 영역에 좌우 여백 추가 */
.content-wrap, 
#content, 
.inner {
  padding-left: 16px !important;
  padding-right: 16px !important;
  box-sizing: border-box;
}

/* 미디어 쿼리를 사용하여 디바이스별 여백 조정 */
@media screen and (min-width: 768px) {
  /* 태블릿 */
  .content-wrap, 
  #content, 
  .inner {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}

@media screen and (min-width: 1024px) {
  /* 데스크탑 */
  .content-wrap, 
  #content, 
  .inner {
    padding-left: 32px !important;
    padding-right: 32px !important;
  }
}

/* 최대 콘텐츠 너비 설정 및 중앙 정렬 */
.content-wrap, 
#content, 
.inner {
  max-width: calc(var(--container-width) + 64px) !important; /* 기존 container-width에 여백 추가 */
  margin-left: auto !important;
  margin-right: auto !important;
}

/* 개별 요소에도 여백 적용 */
.entry-content p,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content ul,
.entry-content ol {
  padding-left: 16px;
  padding-right: 16px;
}

@media screen and (min-width: 768px) {
  .entry-content p,
  .entry-content h1,
  .entry-content h2,
  .entry-content h3,
  .entry-content h4,
  .entry-content ul,
  .entry-content ol {
    padding-left: 24px;
    padding-right: 24px;
  }
}
