@charset "utf-8";

/* =======================================================================
   드롭인 티스토리 스킨  style.css
   · 외부 이미지/폰트 파일 의존 없음 (어떤 블로그에도 그대로 사용)
   · 색·둥근모서리·본문폭은 아래 :root 변수만 바꾸면 한 번에 조정됩니다.
   ======================================================================= */

:root {
  --brand:   #18609C;   /* 메인 색 */
  --brand-2: #2F8FC4;   /* 보조 색 */
  --ink:     #2b3440;   /* 본문 진한 글자 */
  --body:    #46505c;   /* 본문 글자 */
  --muted:   #6b7785;   /* 흐린 글자 */
  --line:    #e8eef4;   /* 경계선 */
  --soft:    #f6f9fc;   /* 옅은 배경 */
  --radius:  12px;
  --wrapw:   1100px;    /* 헤더/목록 최대폭 */
  --readw:   760px;     /* 글 본문 읽기폭 */
}

/* ── 리셋 ── */
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; }
body{
  font-family:'Pretendard','Apple SD Gothic Neo','Noto Sans KR',sans-serif;
  font-size:16px; line-height:1.7; color:var(--body);
  background:#fff; -webkit-text-size-adjust:100%;
}
h1,h2,h3,h4,h5,h6,p,ul,ol,li,figure,blockquote{ margin:0; padding:0; }
ul,ol{ list-style:none; }
img{ border:0; max-width:100%; height:auto; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; color:inherit; background:none; border:0; cursor:pointer; }
input{ font:inherit; }

/* ── 접근성 ── */
#acc-nav{ position:absolute; left:-9999px; top:0; }
#acc-nav:focus{ left:8px; top:8px; z-index:9999; padding:8px 14px; background:#000; color:#fff; border-radius:8px; }


/* =======================================================================
   헤더 / 메뉴
   ======================================================================= */
#header{ border-bottom:1px solid var(--line); }
.header-top .inner{
  display:flex; align-items:center; gap:14px;
  max-width:var(--wrapw); margin:0 auto; padding:0 20px; min-height:64px;
}
.logo{ font-size:21px; font-weight:800; line-height:1.2; letter-spacing:-.02em; }
.logo a{ color:var(--ink); }

.util{ margin-left:auto; display:flex; align-items:center; gap:10px; }

.search{
  display:flex; align-items:center;
  background:var(--soft); border:1px solid var(--line);
  border-radius:999px; padding:0 4px 0 14px;
}
.search input{ width:130px; height:36px; border:0; background:transparent; outline:none; font-size:14px; color:var(--ink); }
.search input::placeholder{ color:var(--muted); }
.search button{ display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; color:var(--muted); }
.search button:hover{ color:var(--brand); }

.menu-toggle{ display:none; align-items:center; justify-content:center; color:var(--ink); }

/* GNB */
#gnb{ position:relative; }
#gnb ul{
  display:flex; flex-wrap:nowrap; overflow-x:auto;
  max-width:var(--wrapw); margin:0 auto; padding:0 12px;
  scrollbar-width:none; -ms-overflow-style:none;
}
#gnb ul::-webkit-scrollbar{ display:none; }
#gnb li{ flex:0 0 auto; }
#gnb a{ position:relative; display:block; padding:13px 16px; font-size:15px; color:var(--muted); white-space:nowrap; }
#gnb a:hover{ color:var(--brand); }
#gnb li.current a{ color:var(--brand); font-weight:600; }
#gnb li.current a::after{ content:""; position:absolute; left:16px; right:16px; bottom:0; height:2px; background:var(--brand); border-radius:2px; }
.gnb-close{ display:none; }


/* =======================================================================
   레이아웃 (단일 프레임)
   ======================================================================= */
.content-wrap{ max-width:var(--wrapw); margin:0 auto; padding:0 20px; }
#content{ width:100%; padding:44px 0 56px; }

/* 글(퍼머링크) 페이지 : 가운데 정렬 단일 컬럼 */
#tt-body-page #content{ max-width:var(--readw); margin:0 auto; padding-top:36px; }


/* =======================================================================
   목록 페이지 : 글 카드 (반응형 그리드)
   ======================================================================= */
#content > .inner{
  display:grid; grid-template-columns:repeat(3,1fr); gap:30px 26px;
}
#tt-body-page #content > .inner{ display:block; }   /* 글 페이지는 1단 */

.post-item a{ display:flex; flex-direction:column; height:100%; }
.post-item .thumb{
  display:block; aspect-ratio:16/9; border-radius:10px; overflow:hidden; background:var(--soft); margin-bottom:12px;
}
.post-item .thumb img{ width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.post-item a:hover .thumb img{ transform:scale(1.04); }
.post-item .title{ font-size:17px; font-weight:700; color:var(--ink); line-height:1.45;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.post-item a:hover .title{ color:var(--brand); }
.post-item .excerpt{ margin:7px 0 10px; font-size:14px; color:var(--muted); line-height:1.6;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.post-item .date{ margin-top:auto; font-size:12px; color:var(--muted); }


/* =======================================================================
   페이지네이션
   ======================================================================= */
.paging{ display:flex; align-items:center; justify-content:center; gap:6px; margin:46px 0 8px; }
.paging a{ display:inline-flex; align-items:center; justify-content:center;
  min-width:36px; height:36px; padding:0 10px; border-radius:8px;
  font-size:14px; color:var(--body); }
.paging .pg-num:hover, .paging .pg-arrow:hover{ background:var(--soft); color:var(--brand); }
.paging .pg-num.selected, .paging .pg-num[class*="current"]{ background:var(--brand); color:#fff; }
.paging .pg-nums{ display:inline-flex; gap:4px; }
.paging .no_more{ opacity:.3; pointer-events:none; }


/* =======================================================================
   글 상단 커버
   ======================================================================= */
.post-cover{
  position:relative; display:flex; align-items:flex-end; overflow:hidden;
  min-height:220px; margin:0 0 30px; border-radius:16px;
  background:#3a4a5a center/cover no-repeat;
}
.post-cover::before{ content:""; position:absolute; inset:0;
  background:linear-gradient(to top, rgba(15,30,45,.66), rgba(15,30,45,.12)); }
.post-cover .inner{ position:relative; z-index:1; width:100%; padding:26px 26px 24px; color:#fff; }
.post-cover .category{ font-size:13px; color:rgba(255,255,255,.88); }
.post-cover h1{ margin:9px 0 11px; font-size:27px; font-weight:700; line-height:1.35; color:#fff; }
.post-cover .meta{ font-size:13px; color:rgba(255,255,255,.82); }
.post-cover .meta span + span::before{ content:"·"; margin:0 8px; }


/* =======================================================================
   본문 콘텐츠
   ======================================================================= */
.entry-content{ font-size:18px; color:var(--body); }
.entry-content > * + *{ margin-top:18px; }
.entry-content p{ word-break:break-word; }
.entry-content a:not(.go-button){ color:var(--brand); text-decoration:underline; text-underline-offset:2px; }

/* H1 (본문 내부에 쓰일 경우) */
.entry-content h1{ margin:32px 0 18px; font-size:26px; font-weight:800; color:var(--ink); line-height:1.4; }

/* H2 — 깔끔한 컬러 배너 */
.entry-content h2{
  margin:2em 0 .8em; padding:13px 18px;
  font-size:21px; font-weight:700; line-height:1.45; color:#fff;
  background:linear-gradient(135deg, var(--brand), var(--brand-2));
  border-radius:12px; box-shadow:0 5px 14px rgba(24,96,156,.16);
}

/* H3 — 좌측 라인 강조 (심플) */
.entry-content h3{
  margin:34px 0 16px; padding:9px 14px 9px 16px;
  font-size:18px; font-weight:700; color:#134a78;
  background:var(--soft); border-left:4px solid var(--brand); border-radius:0 8px 8px 0;
}

/* H4 — 밑줄형 */
.entry-content h4{
  margin:26px 0 12px; padding-bottom:7px;
  font-size:16px; font-weight:700; color:var(--ink);
  border-bottom:2px solid var(--line);
}

/* 목록 */
.entry-content ul{ list-style:disc; padding-left:22px; }
.entry-content ol{ list-style:decimal; padding-left:22px; }
.entry-content li{ margin:7px 0; }

/* 인용 */
.entry-content blockquote{
  padding:14px 18px; border-left:4px solid var(--brand-2);
  background:var(--soft); border-radius:0 8px 8px 0; color:var(--body);
}

/* 이미지 */
.entry-content img{ border-radius:10px; }
.entry-content figure{ text-align:center; }

/* 코드 */
.entry-content pre{ padding:16px; background:#0f2230; color:#e6edf3; border-radius:10px;
  overflow-x:auto; font-size:14px; line-height:1.6; }
.entry-content code{ font-family:ui-monospace,Menlo,Consolas,monospace; }
.entry-content :not(pre) > code{ padding:2px 6px; background:var(--soft); border:1px solid var(--line); border-radius:5px; font-size:.92em; }

/* 구분선 */
.entry-content hr{ border:0; border-top:1px solid var(--line); margin:30px 0; }

/* 표 */
.entry-content table{ width:100%; border-collapse:collapse; margin:6px 0; font-size:15px; }
.entry-content th,.entry-content td{ padding:10px 12px; border:1px solid var(--line); text-align:left; }
.entry-content th{ background:var(--soft); color:var(--ink); font-weight:700; }


/* =======================================================================
   '바로 가기' 버튼  (아이콘/화살표/이미지 없음 — 순수 텍스트)
   ======================================================================= */
.entry-content a.go-button{
  display:block; width:100%; max-width:520px; margin:22px auto;
  padding:15px 22px;
  text-align:center; text-decoration:none !important;
  font-size:17px; font-weight:700; color:#fff !important;
  background:#e23b3b; border-radius:12px;
  transition:background .2s ease, transform .2s ease;
}
.entry-content a.go-button:hover{ background:#c92f2f; transform:translateY(-1px); }


/* =======================================================================
   목차 — 인라인
   ======================================================================= */
#toc-container{ border:1px solid var(--line); border-radius:var(--radius); background:#fff; margin:4px 0 30px; overflow:hidden; }
#toc-container .toc-title{
  display:flex; align-items:center; justify-content:space-between;
  padding:13px 18px; font-size:16px; font-weight:700; color:var(--brand);
  border-bottom:1px solid var(--line); cursor:pointer; user-select:none;
}
#toc-toggle-text{ font-size:12px; font-weight:400; color:var(--muted); }
#toc-list{ padding:12px 18px; counter-reset:toc-h2; }
#toc-list.hidden{ display:none; }
#toc-list li[data-level="2"]{ counter-increment:toc-h2; counter-reset:toc-h3; margin:7px 0 3px; }
#toc-list li[data-level="3"]{ counter-increment:toc-h3; margin:3px 0 3px 16px; }
#toc-list li[data-level="2"] > a::before{ content:counter(toc-h2)". "; color:var(--brand); font-weight:700; }
#toc-list li[data-level="3"] > a::before{ content:counter(toc-h2)"-"counter(toc-h3)". "; color:var(--brand-2); font-weight:600; }
#toc-list a{ display:inline-block; padding:2px 6px; border-radius:6px; color:var(--body);
  text-decoration:none; line-height:1.6; transition:.15s; }
#toc-list li[data-level="2"] > a{ font-size:15px; font-weight:600; color:var(--ink); }
#toc-list li[data-level="3"] > a{ font-size:14px; }
#toc-list a:hover{ color:var(--brand); background:var(--soft); }


/* =======================================================================
   목차 — 좌측 플로팅 (1320px 이상 넓은 화면에서만 표시)
   ======================================================================= */
#toc-float{
  display:none;
  position:fixed; top:120px; left:28px;
  width:230px; max-height:72vh; overflow:auto;
  background:#fff; border:1px solid var(--line); border-radius:var(--radius); z-index:900;
}
@media (min-width:1320px){
  #tt-body-page #toc-float.show{ display:block; }   /* 인라인 목차를 지나친 뒤에만 노출 */
}
#toc-float .tf-head{ padding:12px 16px; font-size:12px; font-weight:700; letter-spacing:.05em;
  color:var(--brand); border-bottom:1px solid var(--line); }
#toc-float ul{ padding:8px; counter-reset:tf-h2; }
#toc-float li[data-level="2"]{ counter-increment:tf-h2; counter-reset:tf-h3; }
#toc-float li[data-level="3"]{ counter-increment:tf-h3; margin-left:12px; }
#toc-float a{ display:block; padding:6px 10px; border-radius:7px; font-size:13px; line-height:1.45;
  color:var(--muted); text-decoration:none; border-left:2px solid transparent; transition:.15s; }
#toc-float li[data-level="2"] > a{ color:#3b4753; font-weight:600; }
#toc-float li[data-level="2"] > a::before{ content:counter(tf-h2)". "; color:var(--brand); font-weight:700; }
#toc-float li[data-level="3"] > a::before{ content:counter(tf-h2)"-"counter(tf-h3)". "; color:var(--brand-2); }
#toc-float a:hover{ background:var(--soft); color:var(--brand); }
#toc-float a.active{ background:var(--soft); color:var(--brand); font-weight:700; border-left-color:var(--brand); }
#toc-float::-webkit-scrollbar{ width:6px; }
#toc-float::-webkit-scrollbar-thumb{ background:#d4e1ee; border-radius:3px; }


/* =======================================================================
   태그 / 관련글 / 댓글
   ======================================================================= */
.tags{ margin:40px 0 0; }
.tags h2{ font-size:15px; font-weight:700; color:var(--ink); margin-bottom:12px; }
.tags a{ display:inline-block; margin:0 7px 8px 0; padding:5px 13px; border:1px solid var(--line);
  border-radius:999px; font-size:13px; color:var(--muted); }
.tags a:hover{ border-color:var(--brand); color:var(--brand); }

.related-articles{ margin:44px 0 0; }
.related-articles h2{ font-size:16px; font-weight:700; color:var(--ink); margin-bottom:14px; }
.related-articles ul{ display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }
.related-articles .thumb{ display:block; aspect-ratio:16/10; border-radius:9px; overflow:hidden; background:var(--soft); margin-bottom:8px; }
.related-articles .thumb img{ width:100%; height:100%; object-fit:cover; }
.related-articles .title{ font-size:14px; color:var(--body); line-height:1.45;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.related-articles a:hover .title{ color:var(--brand); }

.comments{ margin:48px 0 0; }


/* =======================================================================
   푸터
   ======================================================================= */
#footer{ border-top:1px solid var(--line); margin-top:54px; }
#footer .inner{ position:relative; max-width:var(--wrapw); margin:0 auto; padding:26px 20px; text-align:center; }
#footer .copyright{ font-size:13px; color:var(--muted); }
.page-top{ position:absolute; right:20px; top:50%; transform:translateY(-50%);
  padding:7px 12px; border:1px solid var(--line); border-radius:8px;
  font-size:12px; font-weight:700; color:var(--muted); }
.page-top:hover{ color:var(--brand); border-color:var(--brand); }


/* =======================================================================
   최상단 이동(TOP) 버튼 — 우측 하단 고정
   ======================================================================= */
#top-btn{
  position:fixed; right:22px; bottom:22px; z-index:950;
  width:46px; height:46px; border-radius:50%;
  display:inline-flex; align-items:center; justify-content:center;
  background:#fff; border:1px solid var(--line); color:var(--brand);
  box-shadow:0 4px 14px rgba(24,96,156,.16);
  opacity:0; visibility:hidden; transform:translateY(8px);
  transition:opacity .2s ease, transform .2s ease, visibility .2s ease;
}
#top-btn.show{ opacity:1; visibility:visible; transform:translateY(0); }
#top-btn:hover{ background:var(--soft); border-color:var(--brand); }
@media (max-width:768px){ #top-btn{ right:16px; bottom:16px; width:42px; height:42px; } }


/* =======================================================================
   반응형
   ======================================================================= */
@media (max-width:1024px){
  #content > .inner{ grid-template-columns:repeat(2,1fr); }
}

@media (max-width:768px){
  .menu-toggle{ display:inline-flex; }

  /* 모바일 메뉴 = 전체 오버레이 */
  #gnb{ position:fixed; inset:0; z-index:9000; background:#fff; display:none; overflow-y:auto; padding:64px 0 30px; }
  body.gnb-open #gnb{ display:block; }
  #gnb ul{ flex-direction:column; padding:0; overflow:visible; }
  #gnb li{ width:100%; }
  #gnb a{ padding:15px 24px; font-size:16px; border-bottom:1px solid var(--line); color:var(--ink); }
  #gnb li.current a::after{ display:none; }
  .gnb-close{ display:flex; position:absolute; top:16px; right:20px; color:var(--ink); }

  #content{ padding:30px 0 44px; }
  .post-cover{ min-height:180px; border-radius:12px; }
  .post-cover h1{ font-size:21px; }
  .entry-content{ font-size:16px; }
  .entry-content h2{ font-size:18px; padding:11px 15px; }
  .entry-content h3{ font-size:16px; }

  /* 표 가로 스크롤 (모바일 넘침 방지) */
  .entry-content table{ display:block; overflow-x:auto; white-space:nowrap; -webkit-overflow-scrolling:touch; }
}

@media (max-width:560px){
  #content > .inner{ grid-template-columns:1fr; }
  .related-articles ul{ grid-template-columns:1fr; }
  .search input{ width:96px; }
  .logo{ font-size:18px; }
}